summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/AnnotationWin.hxx83
-rw-r--r--sw/inc/EnhancedPDFExportHelper.hxx256
-rw-r--r--sw/inc/HandleAnchorNodeChg.hxx81
-rw-r--r--sw/inc/IDocumentChartDataProviderAccess.hxx69
-rw-r--r--sw/inc/IDocumentContentOperations.hxx203
-rwxr-xr-xsw/inc/IDocumentDeviceAccess.hxx145
-rw-r--r--sw/inc/IDocumentDrawModelAccess.hxx111
-rw-r--r--sw/inc/IDocumentExternalData.hxx69
-rw-r--r--sw/inc/IDocumentFieldsAccess.hxx191
-rw-r--r--sw/inc/IDocumentLayoutAccess.hxx78
-rw-r--r--sw/inc/IDocumentLineNumberAccess.hxx51
-rw-r--r--sw/inc/IDocumentLinksAdministration.hxx91
-rw-r--r--sw/inc/IDocumentListItems.hxx61
-rw-r--r--sw/inc/IDocumentListsAccess.hxx57
-rw-r--r--sw/inc/IDocumentMarkAccess.hxx251
-rw-r--r--sw/inc/IDocumentOutlineNodes.hxx57
-rw-r--r--sw/inc/IDocumentRedlineAccess.hxx259
-rw-r--r--sw/inc/IDocumentSettingAccess.hxx212
-rw-r--r--sw/inc/IDocumentState.hxx87
-rw-r--r--sw/inc/IDocumentStatistics.hxx60
-rw-r--r--sw/inc/IDocumentStylePoolAccess.hxx87
-rw-r--r--sw/inc/IDocumentTimerAccess.hxx60
-rw-r--r--sw/inc/IDocumentUndoRedo.hxx193
-rw-r--r--sw/inc/IGrammarContact.hxx87
-rw-r--r--sw/inc/IInterface.hxx67
-rw-r--r--sw/inc/IMark.hxx119
-rw-r--r--sw/inc/PostItMgr.hxx307
-rw-r--r--sw/inc/RefreshListenerContainer.hxx38
-rw-r--r--sw/inc/SidebarWin.hxx274
-rw-r--r--sw/inc/SidebarWindowsTypes.hxx53
-rw-r--r--sw/inc/SwAppletImpl.hxx79
-rw-r--r--sw/inc/SwCapObjType.hxx35
-rw-r--r--sw/inc/SwGetPoolIdFromName.hxx44
-rw-r--r--sw/inc/SwNodeNum.hxx118
-rw-r--r--sw/inc/SwNumberTree.hxx767
-rw-r--r--sw/inc/SwNumberTreeTypes.hxx39
-rw-r--r--sw/inc/SwRewriter.hxx50
-rw-r--r--sw/inc/SwSmartTagMgr.hxx65
-rw-r--r--sw/inc/SwStyleNameMapper.hxx204
-rw-r--r--sw/inc/SwUndoField.hxx85
-rw-r--r--sw/inc/SwUndoFmt.hxx250
-rw-r--r--sw/inc/SwUndoPageDesc.hxx90
-rw-r--r--sw/inc/SwUndoTOXChange.hxx47
-rw-r--r--sw/inc/SwXMLSectionList.hxx89
-rw-r--r--sw/inc/TextCursorHelper.hxx54
-rw-r--r--sw/inc/access.hrc62
-rw-r--r--sw/inc/accessibilityoptions.hxx53
-rw-r--r--sw/inc/accmap.hxx329
-rw-r--r--sw/inc/acmplwrd.hxx73
-rw-r--r--sw/inc/anchoreddrawobject.hxx223
-rw-r--r--sw/inc/anchoredobject.hxx642
-rw-r--r--sw/inc/authfld.hxx203
-rw-r--r--sw/inc/authratr.hxx54
-rw-r--r--sw/inc/bparr.hxx126
-rw-r--r--sw/inc/breakit.hxx122
-rw-r--r--sw/inc/calbck.hxx250
-rw-r--r--sw/inc/calc.hxx241
-rw-r--r--sw/inc/ccoll.hxx100
-rw-r--r--sw/inc/cellatr.hxx129
-rw-r--r--sw/inc/cellfml.hxx164
-rw-r--r--sw/inc/charatr.hxx178
-rw-r--r--sw/inc/charfmt.hxx61
-rw-r--r--sw/inc/chcmprse.hxx40
-rw-r--r--sw/inc/checkit.hxx54
-rw-r--r--sw/inc/chpfld.hxx102
-rw-r--r--sw/inc/chrdlg.hrc60
-rw-r--r--sw/inc/cmdid.h1310
-rw-r--r--sw/inc/colwd.hxx62
-rw-r--r--sw/inc/comcore.hrc123
-rw-r--r--sw/inc/crsrsh.hxx952
-rw-r--r--sw/inc/crsskip.hxx42
-rw-r--r--sw/inc/crstate.hxx217
-rw-r--r--sw/inc/cshtyp.hxx119
-rw-r--r--sw/inc/dbfld.hxx338
-rw-r--r--sw/inc/dbgoutsw.hxx129
-rw-r--r--sw/inc/dbmgr.hxx399
-rw-r--r--sw/inc/dbui.hrc126
-rw-r--r--sw/inc/dcontact.hxx561
-rw-r--r--sw/inc/ddefld.hxx117
-rw-r--r--sw/inc/dialog.hrc89
-rw-r--r--sw/inc/dlelstnr.hxx95
-rw-r--r--sw/inc/dobjfac.hxx47
-rw-r--r--sw/inc/doc.hxx2216
-rw-r--r--sw/inc/docary.hxx132
-rw-r--r--sw/inc/docfac.hxx48
-rwxr-xr-xsw/inc/dochdl.hrc54
-rw-r--r--sw/inc/docsh.hxx320
-rw-r--r--sw/inc/docstat.hxx52
-rw-r--r--sw/inc/docstyle.hxx245
-rw-r--r--sw/inc/docufld.hxx836
-rw-r--r--sw/inc/dpage.hxx64
-rw-r--r--sw/inc/drawdoc.hxx65
-rw-r--r--sw/inc/edglbldc.hxx77
-rw-r--r--sw/inc/edimp.hxx83
-rw-r--r--sw/inc/editsh.hxx995
-rw-r--r--sw/inc/envelp.hrc97
-rw-r--r--sw/inc/errhdl.hxx76
-rw-r--r--sw/inc/error.h50
-rw-r--r--sw/inc/expfld.hxx436
-rw-r--r--sw/inc/extinput.hxx59
-rw-r--r--sw/inc/fchrfmt.hxx83
-rw-r--r--sw/inc/fesh.hxx786
-rw-r--r--sw/inc/fldbas.hxx465
-rw-r--r--sw/inc/flddat.hxx148
-rw-r--r--sw/inc/flddropdown.hxx279
-rw-r--r--sw/inc/fldinit.hxx38
-rw-r--r--sw/inc/fldui.hrc292
-rw-r--r--sw/inc/fldupde.hxx39
-rw-r--r--sw/inc/flyenum.hxx55
-rw-r--r--sw/inc/flypos.hxx60
-rw-r--r--sw/inc/fmtanchr.hxx92
-rw-r--r--sw/inc/fmtautofmt.hxx75
-rw-r--r--sw/inc/fmtclbl.hxx54
-rw-r--r--sw/inc/fmtclds.hxx179
-rw-r--r--sw/inc/fmtcnct.hxx87
-rw-r--r--sw/inc/fmtcntnt.hxx66
-rw-r--r--sw/inc/fmtcol.hxx304
-rw-r--r--sw/inc/fmtcolfunc.hxx89
-rw-r--r--sw/inc/fmteiro.hxx60
-rw-r--r--sw/inc/fmtflcnt.hxx64
-rw-r--r--sw/inc/fmtfld.hxx119
-rw-r--r--sw/inc/fmtfollowtextflow.hxx66
-rw-r--r--sw/inc/fmtfordr.hxx72
-rw-r--r--sw/inc/fmtfsize.hxx113
-rw-r--r--sw/inc/fmtftn.hxx81
-rw-r--r--sw/inc/fmtftntx.hxx137
-rw-r--r--sw/inc/fmthdft.hxx114
-rw-r--r--sw/inc/fmtinfmt.hxx110
-rw-r--r--sw/inc/fmtline.hxx71
-rw-r--r--sw/inc/fmtlsplt.hxx58
-rwxr-xr-xsw/inc/fmtmeta.hxx229
-rw-r--r--sw/inc/fmtornt.hxx143
-rw-r--r--sw/inc/fmtpdsc.hxx99
-rw-r--r--sw/inc/fmtrfmrk.hxx64
-rw-r--r--sw/inc/fmtrowsplt.hxx58
-rw-r--r--sw/inc/fmtruby.hxx91
-rw-r--r--sw/inc/fmtsrnd.hxx93
-rw-r--r--sw/inc/fmtsrndenum.hxx41
-rw-r--r--sw/inc/fmtui.hrc89
-rw-r--r--sw/inc/fmturl.hxx92
-rw-r--r--sw/inc/fmtwrapinfluenceonobjpos.hxx77
-rw-r--r--sw/inc/format.hxx358
-rw-r--r--sw/inc/frmatr.hxx99
-rw-r--r--sw/inc/frmfmt.hxx323
-rw-r--r--sw/inc/ftnidx.hxx79
-rw-r--r--sw/inc/ftninfo.hxx117
-rw-r--r--sw/inc/globals.hrc290
-rw-r--r--sw/inc/globdoc.hxx53
-rw-r--r--sw/inc/grfatr.hxx370
-rw-r--r--sw/inc/helpid.h983
-rw-r--r--sw/inc/hfspacingitem.hxx59
-rw-r--r--sw/inc/hhcwrp.hxx121
-rw-r--r--sw/inc/hintids.hxx486
-rw-r--r--sw/inc/hints.hxx284
-rw-r--r--sw/inc/htmltbl.hxx491
-rw-r--r--sw/inc/index.hrc66
-rw-r--r--sw/inc/index.hxx217
-rw-r--r--sw/inc/inetfld.hxx109
-rw-r--r--sw/inc/init.hxx48
-rw-r--r--sw/inc/io.hxx176
-rw-r--r--sw/inc/iodetect.hxx127
-rw-r--r--sw/inc/istyleaccess.hxx69
-rw-r--r--sw/inc/itabenum.hxx54
-rw-r--r--sw/inc/lineinfo.hxx109
-rw-r--r--sw/inc/linkenum.hxx39
-rw-r--r--sw/inc/list.hxx74
-rw-r--r--sw/inc/listfunc.hxx38
-rw-r--r--sw/inc/makefile.mk49
-rw-r--r--sw/inc/mdiexp.hxx78
-rw-r--r--sw/inc/modcfg.hxx343
-rw-r--r--sw/inc/modeltoviewhelper.hxx111
-rw-r--r--sw/inc/ndarr.hxx352
-rw-r--r--sw/inc/ndgrf.hxx257
-rw-r--r--sw/inc/ndhints.hxx223
-rw-r--r--sw/inc/ndindex.hxx252
-rw-r--r--sw/inc/ndnotxt.hxx121
-rw-r--r--sw/inc/ndole.hxx171
-rw-r--r--sw/inc/ndtxt.hxx917
-rw-r--r--sw/inc/ndtyp.hxx69
-rw-r--r--sw/inc/newhdl.hxx73
-rw-r--r--sw/inc/node.hxx761
-rw-r--r--sw/inc/numrule.hxx374
-rw-r--r--sw/inc/pagedesc.hxx347
-rw-r--r--sw/inc/pageiter.hxx53
-rw-r--r--sw/inc/pagepreviewlayout.hxx624
-rw-r--r--sw/inc/pam.hxx280
-rw-r--r--sw/inc/paratr.hxx278
-rw-r--r--sw/inc/pausethreadstarting.hxx48
-rw-r--r--sw/inc/pch/precompiled_sw.cxx29
-rw-r--r--sw/inc/pch/precompiled_sw.hxx1004
-rw-r--r--sw/inc/poolfmt.awk73
-rw-r--r--sw/inc/poolfmt.hrc281
-rw-r--r--sw/inc/poolfmt.hxx443
-rw-r--r--sw/inc/postithelper.hxx159
-rwxr-xr-xsw/inc/printdata.hxx323
-rw-r--r--sw/inc/pvprtdat.hxx79
-rw-r--r--sw/inc/rcid.hrc271
-rw-r--r--sw/inc/redline.hxx314
-rw-r--r--sw/inc/redlnaut.hxx54
-rw-r--r--sw/inc/reffld.hxx162
-rw-r--r--sw/inc/ring.hxx52
-rw-r--r--sw/inc/rolbck.hxx452
-rw-r--r--sw/inc/rubylist.hxx54
-rw-r--r--sw/inc/section.hxx389
-rw-r--r--sw/inc/shellid.hxx73
-rw-r--r--sw/inc/shellio.hxx678
-rw-r--r--sw/inc/shellres.hxx120
-rw-r--r--sw/inc/sortopt.hxx69
-rw-r--r--sw/inc/splargs.hxx180
-rw-r--r--sw/inc/statstr.hrc54
-rw-r--r--sw/inc/stringhash.hxx104
-rw-r--r--sw/inc/sw.mk40
-rw-r--r--sw/inc/sw_primitivetypes2d.hxx46
-rw-r--r--sw/inc/swabstdlg.hxx498
-rw-r--r--sw/inc/swacorr.hxx59
-rw-r--r--sw/inc/swatrset.hxx353
-rw-r--r--sw/inc/swbaslnk.hxx95
-rw-r--r--sw/inc/swcalwrp.hxx55
-rw-r--r--sw/inc/swcli.hxx58
-rw-r--r--sw/inc/swcrsr.hxx312
-rw-r--r--sw/inc/swdbdata.hxx49
-rw-r--r--sw/inc/swdbtoolsclient.hxx76
-rw-r--r--sw/inc/swddetbl.hxx61
-rw-r--r--sw/inc/swdll.hxx69
-rw-r--r--sw/inc/swdllapi.h13
-rw-r--r--sw/inc/swerror.h112
-rw-r--r--sw/inc/swevent.hxx129
-rw-r--r--sw/inc/swfltopt.hxx44
-rw-r--r--sw/inc/swgstr.hxx148
-rw-r--r--sw/inc/swhints.hxx36
-rw-r--r--sw/inc/swmodule.hxx278
-rw-r--r--sw/inc/swpre.mk46
-rw-r--r--sw/inc/swprtopt.hxx102
-rw-r--r--sw/inc/swrect.hxx364
-rw-r--r--sw/inc/swregion.hxx57
-rw-r--r--sw/inc/swserv.hxx93
-rw-r--r--sw/inc/swstyle.h41
-rw-r--r--sw/inc/swtable.hxx490
-rw-r--r--sw/inc/swtblfmt.hxx99
-rw-r--r--sw/inc/swtypes.hxx338
-rw-r--r--sw/inc/swundo.hxx200
-rw-r--r--sw/inc/swunodef.hxx36
-rw-r--r--sw/inc/swunohelper.hxx81
-rw-r--r--sw/inc/swurl.hxx46
-rw-r--r--sw/inc/swwait.hxx44
-rw-r--r--sw/inc/tabcol.hxx107
-rw-r--r--sw/inc/tblafmt.hxx270
-rw-r--r--sw/inc/tblenum.hxx79
-rw-r--r--sw/inc/tblsel.hxx230
-rw-r--r--sw/inc/tgrditem.hxx120
-rw-r--r--sw/inc/tox.hxx793
-rw-r--r--sw/inc/toxe.hxx125
-rw-r--r--sw/inc/toxinit.hxx37
-rw-r--r--sw/inc/toxwrap.hxx77
-rw-r--r--sw/inc/txatbase.hxx244
-rw-r--r--sw/inc/txatritr.hxx99
-rw-r--r--sw/inc/txtatr.hxx118
-rw-r--r--sw/inc/txtflcnt.hxx68
-rw-r--r--sw/inc/txtfld.hxx81
-rw-r--r--sw/inc/txtftn.hxx81
-rw-r--r--sw/inc/txtinet.hxx81
-rw-r--r--sw/inc/txtrfmrk.hxx61
-rw-r--r--sw/inc/txttxmrk.hxx65
-rw-r--r--sw/inc/undobj.hxx1921
-rw-r--r--sw/inc/unoatxt.hxx306
-rw-r--r--sw/inc/unobaseclass.hxx174
-rw-r--r--sw/inc/unobookmark.hxx260
-rw-r--r--sw/inc/unochart.hxx433
-rw-r--r--sw/inc/unocoll.hxx581
-rw-r--r--sw/inc/unocore.hrc48
-rw-r--r--sw/inc/unocrsr.hxx122
-rw-r--r--sw/inc/unocrsrhelper.hxx218
-rw-r--r--sw/inc/unodraw.hxx353
-rw-r--r--sw/inc/unoevent.hxx118
-rw-r--r--sw/inc/unoevtlstnr.hxx58
-rw-r--r--sw/inc/unofield.hxx330
-rw-r--r--sw/inc/unoflatpara.hxx145
-rw-r--r--sw/inc/unofootnote.hxx229
-rw-r--r--sw/inc/unoframe.hxx379
-rw-r--r--sw/inc/unoidx.hxx375
-rw-r--r--sw/inc/unomailmerge.hxx206
-rw-r--r--sw/inc/unomap.hxx349
-rw-r--r--sw/inc/unomid.h157
-rw-r--r--sw/inc/unomod.hxx210
-rw-r--r--sw/inc/unoparaframeenum.hxx127
-rw-r--r--sw/inc/unoparagraph.hxx365
-rw-r--r--sw/inc/unoport.hxx325
-rw-r--r--sw/inc/unoprnms.hxx841
-rw-r--r--sw/inc/unoredline.hxx156
-rw-r--r--sw/inc/unoredlines.hxx105
-rw-r--r--sw/inc/unorefmark.hxx174
-rw-r--r--sw/inc/unosection.hxx255
-rw-r--r--sw/inc/unosett.hxx326
-rw-r--r--sw/inc/unosrch.hxx136
-rw-r--r--sw/inc/unostyle.hxx467
-rw-r--r--sw/inc/unotbl.hxx625
-rw-r--r--sw/inc/unotext.hxx346
-rw-r--r--sw/inc/unotextbodyhf.hxx210
-rw-r--r--sw/inc/unotextcursor.hxx347
-rw-r--r--sw/inc/unotextmarkup.hxx110
-rw-r--r--sw/inc/unotextrange.hxx338
-rwxr-xr-xsw/inc/unotxdoc.hxx615
-rw-r--r--sw/inc/usrfld.hxx132
-rwxr-xr-xsw/inc/viewopt.hxx615
-rw-r--r--sw/inc/viewsh.hxx636
-rw-r--r--sw/inc/viscrs.hxx223
-rw-r--r--sw/inc/wdocsh.hxx63
307 files changed, 63252 insertions, 0 deletions
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
new file mode 100644
index 000000000000..ef39ad6e4c8f
--- /dev/null
+++ b/sw/inc/AnnotationWin.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: $
+ *
+ * $Revision: $
+ *
+ * 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 _ANNOTATIONWIN_HXX
+#define _ANNOTATIONWIN_HXX
+
+#include <SidebarWin.hxx>
+
+class PopupMenu;
+class OutlinerParaObject;
+
+namespace sw { namespace annotation {
+
+class SwAnnotationWin : public sw::sidebarwindows::SwSidebarWin
+{
+ public:
+ SwAnnotationWin( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits,
+ SwSidebarItem& rSidebarItem,
+ SwFmtFld* aField );
+ virtual ~SwAnnotationWin();
+
+ virtual void UpdateData();
+ virtual void SetPostItText();
+ virtual void Delete();
+ virtual void GotoPos();
+
+ virtual String GetAuthor();
+ virtual Date GetDate();
+ virtual Time GetTime();
+
+ virtual sal_uInt32 MoveCaret();
+
+ virtual bool CalcFollow();
+ void InitAnswer(OutlinerParaObject* pText);
+
+ virtual bool IsProtected();
+
+ protected:
+ virtual MenuButton* CreateMenuButton();
+
+ private:
+ virtual SvxLanguageItem GetLanguage(void);
+ sal_uInt32 CountFollowing();
+
+ SwFmtFld* mpFmtFld;
+ SwPostItField* mpFld;
+ PopupMenu* mpButtonPopup;
+
+};
+
+} } // end of namespace sw::annotation
+#endif
diff --git a/sw/inc/EnhancedPDFExportHelper.hxx b/sw/inc/EnhancedPDFExportHelper.hxx
new file mode 100644
index 000000000000..333c591243ad
--- /dev/null
+++ b/sw/inc/EnhancedPDFExportHelper.hxx
@@ -0,0 +1,256 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ENHANCEDPDFEXPORTHELPER_HXX
+#define _ENHANCEDPDFEXPORTHELPER_HXX
+
+#include <vcl/pdfextoutdevdata.hxx>
+#include <i18npool/lang.h>
+#include <swrect.hxx>
+#include <swtypes.hxx>
+
+#include <map>
+#include <vector>
+#include <set>
+
+namespace vcl
+{
+ class PDFExtOutDevData;
+}
+class OutputDevice;
+class SwFrm;
+class SwLinePortion;
+class SwTxtPainter;
+class SwEditShell;
+namespace rtl
+{
+ class OUString;
+}
+class MultiSelection;
+class SwTxtNode;
+class SwNumRule;
+class SwTable;
+class SwNumberTreeNode;
+class String;
+class SvxLanguageItem;
+
+
+/*
+ * Mapping of OOo elements to tagged pdf elements:
+ *
+ * OOo element tagged pdf element
+ * ----------- ------------------
+ *
+ * Grouping elements:
+ *
+ * SwRootFrm Document
+ * Part
+ * Art
+ * SwSection Sect
+ * SwFtnContFrm and SwFlyFrm Div
+ * SwFmt "Quotations" BlockQuote
+ * SwFmt "Caption" Caption
+ * SwSection (TOC) TOC
+ * SwTxtNode in TOC TOCI
+ * SwSection (Index) Index
+ *
+ * Block-Level Structure Elements:
+ *
+ * SwTxtNode P
+ * SwFmt "Heading" H
+ * SwTxtNode with Outline H1 - H6
+ * SwTxtNode with NumRule L, LI, LBody
+ * SwTable Table
+ * SwRowFrm TR
+ * SwCellFrm in Headline row or
+ * SwFtm "Table Heading" TH
+ * SwCellFrm TD
+ *
+ * Inline-Level Structure Elements:
+ *
+ * SwTxtPortion Span
+ * SwFmt "Quotation" Quote
+ * SwFtnFrm Note
+ * Form
+ * Reference
+ * SwFldPortion (AuthorityField) BibEntry
+ * SwFmt "Source Text" Code
+ * SwFtnPortion, SwFldPortion (RefField) Link
+ *
+ * Illustration elements:
+ *
+ * SwFlyFrm with SwNoTxtFrm Figure
+ * SwFlyFrm with Math OLE Object Formula
+ *
+ */
+
+struct Num_Info
+{
+ const SwFrm& mrFrm;
+ Num_Info( const SwFrm& rFrm ) : mrFrm( rFrm ) {};
+};
+
+struct Frm_Info
+{
+ const SwFrm& mrFrm;
+ Frm_Info( const SwFrm& rFrm ) : mrFrm( rFrm ) {};
+};
+
+struct Por_Info
+{
+ const SwLinePortion& mrPor;
+ const SwTxtPainter& mrTxtPainter;
+ Por_Info( const SwLinePortion& rPor, const SwTxtPainter& rTxtPainer )
+ : mrPor( rPor ), mrTxtPainter( rTxtPainer ) {};
+};
+
+struct lt_TableColumn
+{
+ bool operator()( long nVal1, long nVal2 ) const
+ {
+ return nVal1 + ( MINLAY - 1 ) < nVal2;
+ }
+};
+
+/*************************************************************************
+ * class SwTaggedPDFHelper
+ * Analyses a given frame during painting and generates the appropriate
+ * structure elements.
+ *************************************************************************/
+
+class SwTaggedPDFHelper
+{
+ private:
+
+ // This will be incremented for each BeginTag() call.
+ // It denotes the number of tags to close during EndStructureElements();
+ BYTE nEndStructureElement;
+
+ // If an already existing tag is reopened for follows of flow frames,
+ // this value stores the tag id which has to be restored.
+ sal_Int32 nRestoreCurrentTag;
+
+ vcl::PDFExtOutDevData* mpPDFExtOutDevData;
+
+ const Num_Info* mpNumInfo;
+ const Frm_Info* mpFrmInfo;
+ const Por_Info* mpPorInfo;
+
+ void BeginTag( vcl::PDFWriter::StructElement aTagRole, const String& rTagName );
+ void EndTag();
+
+ void SetAttributes( vcl::PDFWriter::StructElement eType );
+
+ // These functions are called by the c'tor, d'tor
+ void BeginNumberedListStructureElements();
+ void BeginBlockStructureElements();
+ void BeginInlineStructureElements();
+ void EndStructureElements();
+
+ bool CheckReopenTag();
+ bool CheckRestoreTag() const;
+
+ public:
+
+ // pFrmInfo != 0 => BeginBlockStructureElement
+ // pPorInfo != 0 => BeginInlineStructureElement
+ // pFrmInfo, pPorInfo = 0 => BeginNonStructureElement
+ SwTaggedPDFHelper( const Num_Info* pNumInfo, const Frm_Info* pFrmInfo, const Por_Info* pPorInfo,
+ OutputDevice& rOut );
+ ~SwTaggedPDFHelper();
+
+ static bool IsExportTaggedPDF( const OutputDevice& rOut );
+};
+
+/*************************************************************************
+ * class SwEnhancedPDFExportHelper
+ * Analyses the document structure and export Notes, Hyperlinks, References,
+ * and Outline. Link ids created during pdf export are stored in
+ * aReferenceIdMap and aHyperlinkIdMap, in order to use them during
+ * tagged pdf output. Therefore the SwEnhancedPDFExportHelper is used
+ * before painting. Unfortunately links from the EditEngine into the
+ * Writer document require to be exported after they have been painted.
+ * Therefore SwEnhancedPDFExportHelper also has to be used after the
+ * painting process, the parameter bEditEngineOnly indicated that only
+ * the bookmarks from the EditEngine have to be processed.
+ *************************************************************************/
+
+typedef std::set< long, lt_TableColumn > TableColumnsMapEntry;
+typedef std::pair< SwRect, sal_Int32 > IdMapEntry;
+typedef std::vector< IdMapEntry > LinkIdMap;
+typedef std::map< const SwTable*, TableColumnsMapEntry > TableColumnsMap;
+typedef std::map< const SwNumberTreeNode*, sal_Int32 > NumListIdMap;
+typedef std::map< const SwNumberTreeNode*, sal_Int32 > NumListBodyIdMap;
+typedef std::map< const void*, sal_Int32 > FrmTagIdMap;
+
+class SwEnhancedPDFExportHelper
+{
+ private:
+
+ SwEditShell& mrSh;
+ OutputDevice& mrOut;
+
+ MultiSelection* pPageRange;
+
+ bool mbSkipEmptyPages;
+ bool mbEditEngineOnly;
+
+ static TableColumnsMap aTableColumnsMap;
+ static LinkIdMap aLinkIdMap;
+ static NumListIdMap aNumListIdMap;
+ static NumListBodyIdMap aNumListBodyIdMap;
+ static FrmTagIdMap aFrmTagIdMap;
+
+ static LanguageType eLanguageDefault;
+
+ void EnhancedPDFExport();
+ sal_Int32 CalcOutputPageNum( const SwRect& rRect ) const;
+
+ void MakeHeaderFooterLinks( vcl::PDFExtOutDevData& rPDFExtOutDevData,
+ const SwTxtNode& rTNd, const SwRect& rLinkRect,
+ sal_Int32 nDestId, const String& rURL, bool bIntern ) const;
+
+ public:
+
+ SwEnhancedPDFExportHelper( SwEditShell& rSh,
+ OutputDevice& rOut,
+ const rtl::OUString& rPageRange,
+ bool bSkipEmptyPages,
+ bool bEditEngineOnly );
+
+ ~SwEnhancedPDFExportHelper();
+
+ static TableColumnsMap& GetTableColumnsMap() {return aTableColumnsMap; }
+ static LinkIdMap& GetLinkIdMap() { return aLinkIdMap; }
+ static NumListIdMap& GetNumListIdMap() {return aNumListIdMap; }
+ static NumListBodyIdMap& GetNumListBodyIdMap() {return aNumListBodyIdMap; }
+ static FrmTagIdMap& GetFrmTagIdMap() { return aFrmTagIdMap; }
+
+ static LanguageType GetDefaultLanguage() {return eLanguageDefault; }
+};
+
+#endif
diff --git a/sw/inc/HandleAnchorNodeChg.hxx b/sw/inc/HandleAnchorNodeChg.hxx
new file mode 100644
index 000000000000..910ae4405f4b
--- /dev/null
+++ b/sw/inc/HandleAnchorNodeChg.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _HANDLEANCHORNODECHG_HXX
+#define _HANDLEANCHORNODECHG_HXX
+
+class SwFlyFrmFmt;
+class SwFmtAnchor;
+class SwFlyFrm;
+
+// OD 2006-02-28 #125892#
+// helper class to track change of anchor node of at-paragraph respectively
+// at-character anchored fly frames
+// if such a change happens, it has to be checked, if the count of the anchor
+// frames also change. if yes, a re-creation of the fly frames is needed:
+// - deletion of existing fly frames before the intrinsic anchor node changes
+// - creation of new fly frames after the intrinsic anchor node change.
+class SwHandleAnchorNodeChg
+{
+public:
+ /** checks, if re-creation of fly frames for an anchor node change at the
+ given fly frame format is necessary, and performs the first part.
+
+ @author OD
+
+ @param _rFlyFrmFmt
+ reference to the fly frame format instance, which is handled.
+
+ @param _rNewAnchorFmt
+ new anchor attribute, which will be applied at the given fly frame format
+
+ @param _pKeepThisFlyFrm
+ optional parameter - pointer to a fly frame of the given fly frame format,
+ which isn't deleted, if re-creation of fly frames is necessary.
+ */
+ SwHandleAnchorNodeChg( SwFlyFrmFmt& _rFlyFrmFmt,
+ const SwFmtAnchor& _rNewAnchorFmt,
+ SwFlyFrm* _pKeepThisFlyFrm = 0L );
+
+ /** calls <SwFlyFrmFmt::MakeFrms>, if re-creation of fly frames is necessary.
+
+ @author OD
+ */
+ ~SwHandleAnchorNodeChg();
+
+private:
+ // fly frame format, which is tracked for a anchor node change.
+ SwFlyFrmFmt& mrFlyFrmFmt;
+ // internal flag, which indicates that the certain anchor node change occurs
+ // and that re-creation of fly frames is necessary.
+ bool mbAnchorNodeChanged;
+
+ // no copy-constructor
+ SwHandleAnchorNodeChg( const SwHandleAnchorNodeChg& );
+ // no assignment-operator
+ void operator=( const SwHandleAnchorNodeChg );
+};
+#endif
diff --git a/sw/inc/IDocumentChartDataProviderAccess.hxx b/sw/inc/IDocumentChartDataProviderAccess.hxx
new file mode 100644
index 000000000000..46fa17feaa2e
--- /dev/null
+++ b/sw/inc/IDocumentChartDataProviderAccess.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTCHARTDATAPROVIDER_HXX_INCLUDED
+ #define IDOCUMENTCHARTDATAPROVIDER_HXX_INCLUDED
+
+#include "com/sun/star/uno/Reference.hxx"
+
+namespace com { namespace sun { namespace star { namespace frame {
+ class XModel;
+}}}}
+
+class SwTable;
+class SwChartDataProvider;
+class SwChartLockController_Helper;
+
+
+ /** Give access to the data-provider for chart
+ */
+ class IDocumentChartDataProviderAccess
+ {
+ public:
+
+ /**
+ returns or creates the data-provider for chart
+ */
+ virtual SwChartDataProvider * GetChartDataProvider( bool bCreate = false ) const = 0;
+
+ /**
+ calls createInternalDataProvider for all charts using the specified table
+ */
+ virtual void CreateChartInternalDataProviders( const SwTable *pTable ) = 0;
+
+ /**
+ returns chart controller helper that is used to lock/unlock all
+ charts when relevant parts of tables are changed
+ */
+ virtual SwChartLockController_Helper & GetChartControllerHelper() = 0;
+
+ protected:
+ virtual ~IDocumentChartDataProviderAccess() {};
+ };
+
+ #endif // IDOCUMENTCHARTDATAPROVIDER_HXX_INCLUDED
+
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx
new file mode 100644
index 000000000000..3b2c5deaa556
--- /dev/null
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
+ #define IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
+
+ #ifndef _SAL_TYPES_H_
+ #include <sal/types.h>
+ #endif
+
+ class SwPaM;
+ struct SwPosition;
+ class SwNode;
+ class SwNodeRange;
+ class String;
+ class Graphic;
+ class SfxItemSet;
+ class SfxPoolItem;
+ class GraphicObject;
+ class SdrObject;
+ class SwFrmFmt;
+ class SwDrawFrmFmt;
+ class SwFlyFrmFmt;
+ class SwNodeIndex;
+
+ namespace utl { class TransliterationWrapper; }
+ namespace svt { class EmbeddedObjectRef; }
+
+ /** Text operation/manipulation interface
+ */
+ class IDocumentContentOperations
+ {
+ public:
+ enum SwMoveFlags
+ {
+ DOC_MOVEDEFAULT = 0x00,
+ DOC_MOVEALLFLYS = 0x01,
+ DOC_CREATEUNDOOBJ = 0x02,
+ DOC_MOVEREDLINES = 0x04,
+ DOC_NO_DELFRMS = 0x08
+ };
+
+ // constants for inserting text
+ enum InsertFlags
+ { INS_DEFAULT = 0x00 // no extras
+ , INS_EMPTYEXPAND = 0x01 // expand empty hints at insert position
+ , INS_NOHINTEXPAND = 0x02 // do not expand any hints at insert pos
+ , INS_FORCEHINTEXPAND = 0x04 // expand all hints at insert position
+ };
+
+ public:
+ /** Kopieren eines Bereiches im oder in ein anderes Dokument !
+ Die Position kann auch im Bereich liegen !!
+ */
+ virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll ) const = 0;
+
+ /** Loesche die Section, in der der Node steht.
+ */
+ virtual void DeleteSection(SwNode* pNode) = 0;
+
+ /** loeschen eines BereichesSwFlyFrmFmt
+ */
+ virtual bool DeleteRange(SwPaM&) = 0;
+
+ /** loeschen gesamter Absaetze
+ */
+ virtual bool DelFullPara(SwPaM&) = 0;
+
+ /** complete delete of a given PaM
+
+ OD 2009-08-20 #i100466#
+ Add optional parameter <bForceJoinNext>, default value <false>
+ Needed for hiding of deletion redlines
+ */
+ virtual bool DeleteAndJoin( SwPaM&,
+ const bool bForceJoinNext = false ) = 0;
+
+ /** verschieben eines Bereiches
+ */
+ virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags) = 0;
+
+ /** verschieben ganzer Nodes
+ */
+ virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags) = 0;
+
+ /** verschieben eines Bereiches
+ */
+ virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags) = 0;
+
+ /** Ueberschreiben eines Strings in einem bestehenden Textnode.
+ */
+ virtual bool Overwrite(const SwPaM &rRg, const String& rStr) = 0;
+
+ /** Insert string into existing text node at position rRg.Point().
+ */
+ virtual bool InsertString(const SwPaM &rRg, const String&,
+ const enum InsertFlags nInsertMode = INS_EMPTYEXPAND ) = 0;
+
+ /** change text to Upper/Lower/Hiragana/Katagana/...
+ */
+ virtual void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&) = 0;
+
+ /** Einfuegen einer Grafik, Formel. Die XXXX werden kopiert.
+ */
+ virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const String& rGrfName, const String& rFltName, const Graphic* pGraphic,
+ const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+
+ /**
+ */
+ virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+
+ /** austauschen einer Grafik (mit Undo)
+ */
+ virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj) = 0;
+
+ /** Einfuegen eines DrawObjectes. Das Object muss bereits im DrawModel
+ angemeldet sein.
+ */
+ virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*) = 0;
+
+ /** Einfuegen von OLE-Objecten.
+ */
+ virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+
+ virtual SwFlyFrmFmt* InsertOLE(const SwPaM &rRg, const String& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*) = 0;
+
+ /** Aufspalten eines Nodes an rPos (nur fuer den TxtNode implementiert)
+ */
+ virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart) = 0;
+
+ /**
+ */
+ virtual bool AppendTxtNode(SwPosition& rPos) = 0;
+
+ /** Ersetz einen selektierten Bereich in einem TextNode mit dem
+ String. Ist fuers Suchen&Ersetzen gedacht.
+ bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String
+ ein ( nicht \& )
+ z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
+ --> "xx\t<Tab>..zzz..&"
+ */
+ virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr,
+ const bool bRegExReplace) = 0;
+
+ /** Einfuegen eines Attributs. Erstreckt sich rRg ueber
+ mehrere Nodes, wird das Attribut aufgespaltet, sofern
+ dieses Sinn macht. Nodes, in denen dieses Attribut keinen
+ Sinn macht, werden ignoriert. In vollstaendig in der
+ Selektion eingeschlossenen Nodes wird das Attribut zu
+ harter Formatierung, in den anderen (Text-)Nodes wird das
+ Attribut in das Attributearray eingefuegt. Bei einem
+ Zeichenattribut wird ein "leerer" Hint eingefuegt,
+ wenn keine Selektion
+ vorliegt; andernfalls wird das Attribut als harte
+ Formatierung dem durch rRg.Start() bezeichneten Node
+ hinzugefuegt. Wenn das Attribut nicht eingefuegt werden
+ konnte, liefert die Methode sal_False.
+ */
+ virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
+ const sal_uInt16 nFlags) = 0;
+
+ /**
+ */
+ virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
+ const sal_uInt16 nFlags) = 0;
+
+ /** Removes any leading white space from the paragraph
+ */
+ virtual void RemoveLeadingWhiteSpace(const SwPosition & rPos ) = 0;
+
+ protected:
+ virtual ~IDocumentContentOperations() {};
+};
+
+#endif // IDOCUMENTCONTENTOPERATIONS_HXX_INCLUDED
+
diff --git a/sw/inc/IDocumentDeviceAccess.hxx b/sw/inc/IDocumentDeviceAccess.hxx
new file mode 100755
index 000000000000..75e6d650a203
--- /dev/null
+++ b/sw/inc/IDocumentDeviceAccess.hxx
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTDEVICEACCESS_HXX_INCLUDED
+ #define IDOCUMENTDEVICEACCESS_HXX_INCLUDED
+
+ class SfxPrinter;
+ class JobSetup;
+ class SwPrintData;
+ class VirtualDevice;
+ class OutputDevice;
+
+ /** Provides access to the formatting devices of a document
+ */
+ class IDocumentDeviceAccess
+ {
+ public:
+
+ /** Return the printer set at the document.
+
+ @param bCreate
+ [in] if set, a printer will be created if not already done.
+
+ @returns
+ the printer set at the document.
+ */
+ virtual SfxPrinter* getPrinter(/*[in]*/ bool bCreate ) const = 0;
+
+ /** Set the printer at the document.
+
+ @param pP
+ [in] the new printer or 0.
+
+ @param bDeleteOld
+ [in] if set, the old printer will be deleted.
+
+ @param bCallPrtDataChanged
+ [in] if set, triggers all necessary invalidations.
+
+ @returns
+ the printer set at the document.
+ */
+ virtual void setPrinter(/*[in]*/ SfxPrinter* pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged ) = 0;
+
+ /** Return the virtual device set at the document.
+
+ @param bCreate
+ [in] if set, a virtual device will be created if not already done.
+
+ @returns
+ the virtual device set at the document.
+ */
+ virtual VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate ) const = 0;
+
+ /** Sets the current virtual device
+
+ @param pVd
+ [in] the new virtual device.
+
+ @param bDeleteOld
+ [in] if set, the old virtual device will be deleted.
+
+ @param bCallVirDevDataChanged
+ [in] if set, triggers all necessary invalidations.
+ */
+ virtual void setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool bCallVirDevDataChanged ) = 0;
+
+ /** Returns the current reference device
+
+ @param bCreate
+ [in] if set, the reference device will be created if not already done.
+
+ @returns
+ the current reference device
+ */
+ virtual OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const = 0;
+
+ /** Sets the type of the reference device used for formatting the document
+
+ @param bNewVirtual
+ [in] if set, the reference device will be a virtual device, otherwise
+ the printer is used for formatting the document
+
+ @param bNewHiRes
+ [in] if set, the virtual device will be the HiRes virtual device
+ */
+ virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual, /*[in]*/ bool bNewHiRes ) = 0;
+
+ /** Returns the Jobsetup
+
+ @returns
+ the current Jobsetup
+ */
+ virtual const JobSetup* getJobsetup() const = 0;
+
+ /** Sets the Jobsetup
+
+ @param rJobSetup
+ [in] the new Jobsetup.
+ */
+ virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup ) = 0;
+
+ /** Returns the PrintData
+
+ @returns
+ the current PrintData
+ */
+ virtual SwPrintData* getPrintData() const = 0;
+
+ /** Sets the PrintData
+
+ @param rPrtData
+ [in] the new PrintData.
+ */
+ virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData) = 0;
+
+ protected:
+ virtual ~IDocumentDeviceAccess() {};
+ };
+
+ #endif // IDOCUMENTDEVICEACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentDrawModelAccess.hxx b/sw/inc/IDocumentDrawModelAccess.hxx
new file mode 100644
index 000000000000..916554b69770
--- /dev/null
+++ b/sw/inc/IDocumentDrawModelAccess.hxx
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTDRAWMODEL_HXX_INCLUDED
+#define IDOCUMENTDRAWMODEL_HXX_INCLUDED
+
+#include <svx/svdtypes.hxx>
+
+class SdrModel;
+class SdrPageView;
+
+/** IDocumentDrawModelAccess
+ */
+class IDocumentDrawModelAccess
+{
+public:
+
+ /** Draw Model and id accessors
+ */
+ virtual const SdrModel* GetDrawModel() const = 0;
+ virtual SdrModel* GetDrawModel() = 0;
+ virtual SdrModel* _MakeDrawModel() = 0;
+ virtual SdrModel* GetOrCreateDrawModel() = 0;
+ virtual SdrLayerID GetHeavenId() const = 0;
+ virtual SdrLayerID GetHellId() const = 0;
+ virtual SdrLayerID GetControlsId() const = 0;
+ virtual SdrLayerID GetInvisibleHeavenId() const = 0;
+ virtual SdrLayerID GetInvisibleHellId() const = 0;
+ virtual SdrLayerID GetInvisibleControlsId() const = 0;
+
+ /** method to notify drawing page view about the invisible layers
+ OD 26.06.2003 #108784#
+ @author OD
+ */
+ virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView ) = 0;
+
+ /** method to determine, if a layer ID belongs to the visible ones.
+ OD 25.06.2003 #108784#
+ Note: If given layer ID is unknown, method asserts and returns <false>.
+ @author OD
+
+ @param _nLayerId
+ input parameter - layer ID, which has to be checked, if it belongs to
+ the visible ones.
+
+ @return bool, indicating, if given layer ID belongs to the visible ones.
+ */
+ virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const = 0;
+
+ /** method to determine, if the corresponding visible layer ID for a invisible one.
+
+ OD 25.06.2003 #108784#
+ Note: If given layer ID is a visible one, method returns given layer ID.
+ Note: If given layer ID is unknown, method returns given layer ID.
+
+ @author OD
+
+ @param _nInvisibleLayerId
+ input parameter - invisible layer ID for which the corresponding
+ visible one has to be returned.
+
+ @return sal_Int8, visible layer ID corresponding to given layer ID
+ */
+ virtual SdrLayerID GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisibleLayerId ) = 0;
+
+ /** method to determine, if the corresponding invisible layer ID for a visible one.
+
+ OD 25.06.2003 #108784#
+ Note: If given layer ID is a invisible one, method returns given layer ID.
+ Note: If given layer ID is unknown, method returns given layer ID.
+
+ @author OD
+
+ @param _nVisibleLayerId
+ input parameter - visible layer ID for which the corresponding
+ invisible one has to be returned.
+
+ @return sal_Int8, invisible layer ID corresponding to given layer ID
+ */
+ virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId ) = 0;
+
+protected:
+
+ virtual ~IDocumentDrawModelAccess() {};
+};
+
+#endif
diff --git a/sw/inc/IDocumentExternalData.hxx b/sw/inc/IDocumentExternalData.hxx
new file mode 100644
index 000000000000..51051e4fa020
--- /dev/null
+++ b/sw/inc/IDocumentExternalData.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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_I_DOCUMENT_EXTERNAL_DATA_HXX
+#define INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX
+
+#include <hash_map>
+#include <boost/shared_ptr.hpp>
+
+namespace sw
+{
+enum tExternalDataType { FIB, STTBF_ASSOC };
+
+struct ExternalDataTypeHash
+{
+ size_t operator()(tExternalDataType eType) const { return eType; }
+};
+
+class ExternalData
+{
+public:
+ ExternalData() {}
+ virtual ~ExternalData() {}
+};
+
+typedef ::boost::shared_ptr<ExternalData> tExternalDataPointer;
+}
+
+
+class IDocumentExternalData
+{
+protected:
+ typedef ::std::hash_map<sw::tExternalDataType, sw::tExternalDataPointer, sw::ExternalDataTypeHash>
+ tExternalData;
+
+ tExternalData m_externalData;
+
+ virtual ~IDocumentExternalData() {};
+
+public:
+ virtual void setExternalData(sw::tExternalDataType eType,
+ sw::tExternalDataPointer pPayload) = 0;
+ virtual sw::tExternalDataPointer getExternalData(sw::tExternalDataType eType) = 0;
+};
+
+#endif //INCLUDED_I_DOCUMENT_EXTERNAL_DATA_HXX
diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx
new file mode 100644
index 000000000000..693a24466b9d
--- /dev/null
+++ b/sw/inc/IDocumentFieldsAccess.hxx
@@ -0,0 +1,191 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTFIELDSACCESS_HXX_INCLUDED
+#define IDOCUMENTFIELDSACCESS_HXX_INCLUDED
+
+#include <sal/types.h>
+#include <tools/solar.h>
+
+class SwFldTypes;
+class SwFieldType;
+class SfxPoolItem;
+struct SwPosition;
+class SwDocUpdtFld;
+class SwCalc;
+class SwTxtFld;
+class SwField;
+class SwMsgPoolItem;
+class DateTime;
+class _SetGetExpFld;
+struct SwHash;
+class String;
+class SwNode;
+
+namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
+
+ /** Document fields related interfaces
+ */
+ class IDocumentFieldsAccess
+ {
+ public:
+ /**
+ */
+ virtual const SwFldTypes *GetFldTypes() const = 0;
+
+ /**
+ */
+ virtual SwFieldType *InsertFldType(const SwFieldType &) = 0;
+
+ /**
+ */
+ virtual SwFieldType *GetSysFldType( const sal_uInt16 eWhich ) const = 0;
+
+ /**
+ */
+ virtual SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName, bool bDbFieldMatching) const = 0;
+
+ /**
+ */
+ virtual void RemoveFldType(sal_uInt16 nFld) = 0;
+
+ /**
+ */
+ virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB) = 0;
+
+ /**
+ */
+ virtual void InsDeletedFldType(SwFieldType &) = 0;
+
+ // #111840#
+ /**
+ Puts a value into a field at a certain position.
+
+ A missing field at the given position leads to a failure.
+
+ @param rPosition position of the field
+ @param rVal the value
+ @param nMId
+
+ @retval TRUE putting of value was successful
+ @retval FALSE else
+ */
+ virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, USHORT nWhich) = 0;
+
+ // rufe das Update der Expression Felder auf; alle Ausdruecke werden
+ // neu berechnet.
+ // #111840#
+
+ /** Updates a field.
+
+ @param rDstFmtFld field to update
+ @param rSrcFld field containing the new values
+ @param pMsgHnt
+ @param bUpdateTblFlds TRUE: update table fields, too.
+
+ @retval TRUE update was successful
+ @retval FALSE else
+ */
+ virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds) = 0;
+
+ /**
+ */
+ virtual void UpdateRefFlds(SfxPoolItem* pHt) = 0;
+
+ /**
+ */
+ virtual void UpdateTblFlds(SfxPoolItem* pHt) = 0;
+
+ /**
+ */
+ virtual void UpdateExpFlds(SwTxtFld* pFld, bool bUpdateRefFlds) = 0;
+
+ /**
+ */
+ virtual void UpdateUsrFlds() = 0;
+
+ /**
+ */
+ virtual void UpdatePageFlds(SfxPoolItem*) = 0;
+
+ /**
+ */
+ virtual void LockExpFlds() = 0;
+
+ /**
+ */
+ virtual void UnlockExpFlds() = 0;
+
+ /**
+ */
+ virtual bool IsExpFldsLocked() const = 0;
+
+
+ virtual SwDocUpdtFld& GetUpdtFlds() const = 0;
+
+ /* @@@MAINTAINABILITY-HORROR@@@
+ SwNode (see parameter pChk) is (?) part of the private
+ data structure of SwDoc and should not be exposed
+ */
+ virtual bool SetFieldsDirty(bool b, const SwNode* pChk, ULONG nLen) = 0;
+
+ /**
+ */
+ virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime) = 0;
+
+ // Setze im Calculator alle SetExpresion Felder, die bis zur
+ // angegebenen Position (Node [ + ::com::sun::star::ucb::Content]) gueltig sind. Es kann
+ // eine erzeugte Liste aller Felder mit uebergegeben werden.
+ // (ist die Adresse != 0, und der Pointer == 0 wird eine neue
+ // Liste returnt.)
+ virtual void FldsToCalc(SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt) = 0;
+
+ /**
+ */
+ virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld) = 0;
+
+ /**
+ */
+ virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld) = 0;
+
+ /**
+ */
+ virtual bool IsNewFldLst() const = 0;
+
+ /**
+ */
+ virtual void SetNewFldLst( bool bFlag) = 0;
+
+ /**
+ */
+ virtual void InsDelFldInFldLst(bool bIns, const SwTxtFld& rFld) = 0;
+
+protected:
+ virtual ~IDocumentFieldsAccess() {};
+ };
+
+ #endif // IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED
diff --git a/sw/inc/IDocumentLayoutAccess.hxx b/sw/inc/IDocumentLayoutAccess.hxx
new file mode 100644
index 000000000000..8ff2f4c52588
--- /dev/null
+++ b/sw/inc/IDocumentLayoutAccess.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTLAYOUTACCESS_HXX_INCLUDED
+#define IDOCUMENTLAYOUTACCESS_HXX_INCLUDED
+
+#include <swtypes.hxx>
+
+class SwRootFrm;
+class SwFrmFmt;
+class SfxItemSet;
+class SwLayouter;
+class SwFmtAnchor;
+
+/** Provides access to the layout of a document.
+*/
+class IDocumentLayoutAccess
+{
+public:
+
+ /** Returns the layout set at the document.
+ */
+ virtual const SwRootFrm* GetRootFrm() const = 0;
+ virtual SwRootFrm* GetRootFrm() = 0;
+
+ /** !!!The old layout must be deleted!!!
+ */
+ virtual void SetRootFrm( SwRootFrm* pNew ) = 0;
+
+ /**
+ */
+ virtual SwFrmFmt* MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet ) = 0;
+
+ /**
+ */
+ virtual SwLayouter* GetLayouter() = 0;
+ virtual const SwLayouter* GetLayouter() const = 0;
+ virtual void SetLayouter( SwLayouter* pNew ) = 0;
+
+ /**
+ */
+ virtual void DelLayoutFmt( SwFrmFmt *pFmt ) = 0;
+
+ /**
+ */
+ virtual SwFrmFmt* CopyLayoutFmt( const SwFrmFmt& rSrc, const SwFmtAnchor& rNewAnchor,
+ bool bSetTxtFlyAtt, bool bMakeFrms ) = 0;
+
+protected:
+
+ virtual ~IDocumentLayoutAccess() {};
+ };
+
+ #endif // IDOCUMENTLAYOUTACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentLineNumberAccess.hxx b/sw/inc/IDocumentLineNumberAccess.hxx
new file mode 100644
index 000000000000..77c4c9e02307
--- /dev/null
+++ b/sw/inc/IDocumentLineNumberAccess.hxx
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTLINENUMBERACCESS_HXX_INCLUDED
+ #define IDOCUMENTLINENUMBERACCESS_HXX_INCLUDED
+
+ #ifndef _SAL_TYPES_H_
+ #include <sal/types.h>
+ #endif
+
+class SwLineNumberInfo;
+
+ /** Access to the line number information
+ */
+ class IDocumentLineNumberAccess
+ {
+ public:
+
+ virtual const SwLineNumberInfo& GetLineNumberInfo() const = 0;
+ virtual void SetLineNumberInfo(const SwLineNumberInfo& rInfo) = 0;
+
+ protected:
+ virtual ~IDocumentLineNumberAccess() {};
+};
+
+#endif // IDOCUMENTLINENUMBERACCESS_HXX_INCLUDED
+
diff --git a/sw/inc/IDocumentLinksAdministration.hxx b/sw/inc/IDocumentLinksAdministration.hxx
new file mode 100644
index 000000000000..c3e6855f3c81
--- /dev/null
+++ b/sw/inc/IDocumentLinksAdministration.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED
+#define IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED
+
+#include <tools/solar.h>
+
+class String;
+namespace com { namespace sun { namespace star { namespace uno { class Any; } } } }
+namespace sfx2 { class SvLinkSource; class LinkManager; }
+
+ /** Document links administration interface
+ */
+ class IDocumentLinksAdministration
+ {
+ public:
+ /** Links un-/sichtbar in LinkManager einfuegen (gelinkte Bereiche)
+ */
+ virtual bool IsVisibleLinks() const = 0;
+
+ /**
+ */
+ virtual void SetVisibleLinks(bool bFlag) = 0;
+
+ /**
+ */
+ virtual sfx2::LinkManager& GetLinkManager() = 0;
+
+ /**
+ */
+ virtual const sfx2::LinkManager& GetLinkManager() const = 0;
+
+ /** FME 2005-02-25 #i42634# Moved common code of SwReader::Read() and
+ SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
+ */
+ virtual void UpdateLinks(BOOL bUI) = 0;
+
+ /** SS fuers Linken von Dokumentteilen
+ */
+ virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const = 0;
+
+ /**
+ */
+ virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue) = 0;
+
+ /**
+ */
+ virtual ::sfx2::SvLinkSource* CreateLinkSource(const String& rItem) = 0;
+
+ /** embedded alle lokalen Links (Bereiche/Grafiken)
+ */
+ virtual bool EmbedAllLinks() = 0;
+
+ /**
+ */
+ virtual void SetLinksUpdated(const bool bNewLinksUpdated) = 0;
+
+ /**
+ */
+ virtual bool LinksUpdated() const = 0;
+
+protected:
+ virtual ~IDocumentLinksAdministration() {};
+ };
+
+ #endif // IDOCUMENTLINKSADMINISTRATION_HXX_INCLUDED
diff --git a/sw/inc/IDocumentListItems.hxx b/sw/inc/IDocumentListItems.hxx
new file mode 100644
index 000000000000..0232fc86f104
--- /dev/null
+++ b/sw/inc/IDocumentListItems.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTLISTITEMS_HXX_INCLUDED
+#define IDOCUMENTLISTITEMS_HXX_INCLUDED
+
+#include <vector>
+#include <tools/string.hxx>
+class SwNodeNum;
+
+/** Provides numbered items of a document.
+*/
+class IDocumentListItems
+{
+public:
+ typedef ::std::vector< const SwNodeNum* > tSortedNodeNumList;
+
+ virtual void addListItem( const SwNodeNum& rNodeNum ) = 0;
+ virtual void removeListItem( const SwNodeNum& rNodeNum ) = 0;
+
+ virtual String getListItemText( const SwNodeNum& rNodeNum,
+ const bool bWithNumber = true,
+ const bool bWithSpacesForLevel = false ) const = 0;
+
+ /** get vector of all list items
+ */
+ virtual void getListItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const = 0;
+
+ /** get vector of all list items, which are numbered
+ */
+ virtual void getNumItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const = 0;
+
+protected:
+ virtual ~IDocumentListItems() {};
+};
+
+ #endif // IDOCUMENTLISTITEMS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentListsAccess.hxx b/sw/inc/IDocumentListsAccess.hxx
new file mode 100644
index 000000000000..e811496edc56
--- /dev/null
+++ b/sw/inc/IDocumentListsAccess.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTLISTSACCESS_HXX_INCLUDED
+#define IDOCUMENTLISTSACCESS_HXX_INCLUDED
+
+#include <tools/string.hxx>
+
+class SwList;
+
+/** Provides access to the lists of a document.
+*/
+class IDocumentListsAccess
+{
+ public:
+ virtual SwList* createList( String sListId,
+ const String sDefaultListStyleName ) = 0;
+ virtual void deleteList( const String sListId ) = 0;
+ virtual SwList* getListByName( const String sListId ) const = 0;
+
+ virtual SwList* createListForListStyle( const String sListStyleName ) = 0;
+ virtual SwList* getListForListStyle( const String sListStyleName ) const = 0;
+ virtual void deleteListForListStyle( const String sListStyleName ) = 0;
+ // --> OD 2008-07-08 #i91400#
+ virtual void trackChangeOfListStyleName( const String sListStyleName,
+ const String sNewListStyleName ) = 0;
+ // <--
+
+ protected:
+ virtual ~IDocumentListsAccess() {};
+};
+
+#endif // IDOCUMENTLISTSACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
new file mode 100644
index 000000000000..55fc0901a7e0
--- /dev/null
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -0,0 +1,251 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTMARKACCESS_HXX_INCLUDED
+#define IDOCUMENTMARKACCESS_HXX_INCLUDED
+
+#include <sal/types.h>
+#include <IMark.hxx>
+#include <boost/shared_ptr.hpp>
+
+class SwPaM;
+class KeyCode;
+class String;
+struct SwPosition;
+class SwTxtNode;
+
+namespace sw { namespace mark {
+ class SaveBookmark; // FIXME: Ugly: SaveBookmark is a core-internal class, and should not be used in the interface
+}}
+
+/** Provides access to the marks of a document.
+*/
+class IDocumentMarkAccess
+{
+ public:
+ enum MarkType
+ {
+ UNO_BOOKMARK,
+ DDE_BOOKMARK,
+ BOOKMARK,
+ CROSSREF_HEADING_BOOKMARK,
+ CROSSREF_NUMITEM_BOOKMARK,
+ TEXT_FIELDMARK,
+ CHECKBOX_FIELDMARK,
+ NAVIGATOR_REMINDER
+ };
+
+ typedef ::boost::shared_ptr< ::sw::mark::IMark> pMark_t;
+ typedef ::std::vector< pMark_t > container_t;
+ typedef container_t::iterator iterator_t;
+ typedef container_t::const_iterator const_iterator_t;
+ typedef container_t::const_reverse_iterator const_reverse_iterator_t;
+
+ /** Generates a new mark in the document for a certain selection.
+
+ @param rPaM
+ [in] the selection being marked.
+
+ @param rProposedName
+ [in] the proposed name of the new mark.
+
+ @param eMark
+ [in] the type of the new mark.
+
+ @returns
+ a pointer to the new mark (name might have changed).
+ */
+ virtual ::sw::mark::IMark* makeMark(const SwPaM& rPaM,
+ const ::rtl::OUString& rProposedName,
+ MarkType eMark) =0;
+
+ virtual sw::mark::IFieldmark* makeFieldBookmark( const SwPaM& rPaM,
+ const rtl::OUString& rName,
+ const rtl::OUString& rType) = 0;
+ virtual sw::mark::IFieldmark* makeNoTextFieldBookmark( const SwPaM& rPaM,
+ const rtl::OUString& rName,
+ const rtl::OUString& rType) = 0;
+
+ /** Returns a mark in the document for a paragraph.
+ If there is none, a mark will be created.
+
+ @param rTxtNode
+ [in] the paragraph being marked (a selection over the paragraph is marked)
+
+ @param eMark
+ [in] the type of the new mark.
+
+ @returns
+ a pointer to the new mark (name might have changed).
+ */
+ virtual ::sw::mark::IMark* getMarkForTxtNode(const SwTxtNode& rTxtNode,
+ MarkType eMark) =0;
+
+ /** Moves an existing mark to a new selection and performs needed updates.
+ @param io_pMark
+ [in/out] the mark to be moved
+
+ @param rPaM
+ [in] new selection to be marked
+ */
+
+ virtual void repositionMark(::sw::mark::IMark* io_pMark,
+ const SwPaM& rPaM) =0;
+
+ /** Renames an existing Mark, if possible.
+ @param io_pMark
+ [in/out] the mark to be renamed
+
+ @param rNewName
+ [in] new name for the mark
+
+ @returns false, if renaming failed (because the name is already in use)
+ */
+ virtual bool renameMark(::sw::mark::IMark* io_pMark,
+ const ::rtl::OUString& rNewName) =0;
+
+ /** Corrects marks (absolute)
+ This method ignores the previous position of the mark in the paragraph
+
+ @param rOldNode
+ [in] the node from which nodes should be moved
+
+ @param rNewPos
+ [in] new position to which marks will be moved, if nOffset == 0
+
+ @param nOffset
+ [in] the offset by which the mark gets positioned of rNewPos
+ */
+ virtual void correctMarksAbsolute(const SwNodeIndex& rOldNode,
+ const SwPosition& rNewPos,
+ const xub_StrLen nOffset) =0;
+
+ /** Corrects marks (relative)
+ This method uses the previous position of the mark in the paragraph as offset
+
+ @param rOldNode
+ [in] the node from which nodes should be moved
+
+ @param rNewPos
+ [in] new position to which marks from the start of the paragraph will be
+ moved, if nOffset == 0
+
+ @param nOffset
+ [in] the offset by which the mark gets positioned of rNewPos in addition to
+ its old position in the paragraph
+ */
+ virtual void correctMarksRelative(const SwNodeIndex& rOldNode,
+ const SwPosition& rNewPos,
+ const xub_StrLen nOffset) =0;
+
+ /** Deletes marks in a range
+ */
+ virtual void deleteMarks(
+ const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd,
+ ::std::vector< ::sw::mark::SaveBookmark>* pSaveBkmk, // Ugly: SaveBookmark is core-internal
+ const SwIndex* pSttIdx,
+ const SwIndex* pEndIdx) =0;
+
+ /** Deletes a mark.
+
+ @param ppMark
+ [in] an iterator pointing to the Mark to be deleted.
+ */
+ virtual void deleteMark(const IDocumentMarkAccess::const_iterator_t ppMark) =0;
+
+ /** Deletes a mark.
+
+ @param ppMark
+ [in] the name of the mark to be deleted.
+ */
+ virtual void deleteMark(const ::sw::mark::IMark* const pMark) =0;
+
+ /** Clear (deletes) all marks.
+ */
+ virtual void clearAllMarks() =0;
+
+ /** returns a STL-like random access iterator to the begin of the sequence of marks.
+ */
+ virtual const_iterator_t getMarksBegin() const =0;
+
+ /** returns a STL-like random access iterator to the end of the sequence of marks.
+ */
+ virtual const_iterator_t getMarksEnd() const =0;
+
+ /** returns the number of marks.
+ */
+ virtual sal_Int32 getMarksCount() const =0;
+
+ /** Finds a mark by name.
+
+ @param rName
+ [in] the name of the mark to find.
+
+ @returns
+ an iterator pointing to the mark, or pointing to getMarksEnd() if nothing was found.
+ */
+ virtual const_iterator_t findMark(const ::rtl::OUString& rMark) const =0;
+
+
+ // interface IBookmarks (BOOKMARK, CROSSREF_NUMITEM_BOOKMARK, CROSSREF_HEADING_BOOKMARK)
+
+ /** returns a STL-like random access iterator to the begin of the sequence the IBookmarks.
+ */
+ virtual const_iterator_t getBookmarksBegin() const =0;
+
+ /** returns a STL-like random access iterator to the end of the sequence of IBookmarks.
+ */
+ virtual const_iterator_t getBookmarksEnd() const =0;
+
+ /** returns the number of IBookmarks.
+ */
+ virtual sal_Int32 getBookmarksCount() const =0;
+
+ /** Finds a bookmark by name.
+
+ @param rName
+ [in] the name of the bookmark to find.
+
+ @returns
+ an iterator pointing to the bookmark, or getBookmarksEnd() if nothing was found.
+ */
+ virtual const_iterator_t findBookmark(const ::rtl::OUString& rMark) const =0;
+
+
+ // Fieldmarks
+ virtual ::sw::mark::IFieldmark* getFieldmarkFor(const SwPosition& pos) const =0;
+ virtual ::sw::mark::IFieldmark* getFieldmarkBefore(const SwPosition& pos) const =0;
+ virtual ::sw::mark::IFieldmark* getFieldmarkAfter(const SwPosition& pos) const =0;
+
+ // Returns the MarkType used to create the mark
+ static MarkType SAL_DLLPUBLIC_EXPORT GetType(const ::sw::mark::IMark& rMark);
+ protected:
+ virtual ~IDocumentMarkAccess() {};
+};
+
+#endif // IDOCUMENTBOOKMARKACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentOutlineNodes.hxx b/sw/inc/IDocumentOutlineNodes.hxx
new file mode 100644
index 000000000000..88a8148a2a52
--- /dev/null
+++ b/sw/inc/IDocumentOutlineNodes.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTOUTLINENODES_HXX_INCLUDED
+#define IDOCUMENTOUTLINENODES_HXX_INCLUDED
+
+#include <sal/types.h>
+#include <tools/string.hxx>
+#include <vector>
+class SwTxtNode;
+
+/** Provides outline nodes of a document.
+*/
+class IDocumentOutlineNodes
+{
+public:
+ typedef ::std::vector< const SwTxtNode* > tSortedOutlineNodeList;
+
+ virtual sal_Int32 getOutlineNodesCount() const = 0;
+
+ virtual int getOutlineLevel( const sal_Int32 nIdx ) const = 0;
+ virtual String getOutlineText( const sal_Int32 nIdx,
+ const bool bWithNumber = true,
+ const bool bWithSpacesForLevel = false ) const = 0;
+ virtual SwTxtNode* getOutlineNode( const sal_Int32 nIdx ) const = 0;
+
+ virtual void getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const = 0;
+
+protected:
+ virtual ~IDocumentOutlineNodes() {};
+};
+
+ #endif // IDOCUMENTOUTLINENODES_HXX_INCLUDED
diff --git a/sw/inc/IDocumentRedlineAccess.hxx b/sw/inc/IDocumentRedlineAccess.hxx
new file mode 100644
index 000000000000..ed893dc1cf4a
--- /dev/null
+++ b/sw/inc/IDocumentRedlineAccess.hxx
@@ -0,0 +1,259 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTREDLINE_HXX_INCLUDED
+ #define IDOCUMENTREDLINE_HXX_INCLUDED
+
+ #ifndef _SAL_TYPES_H_
+ #include <sal/types.h>
+ #endif
+ #ifndef _SOLAR_H
+ #include <tools/solar.h>
+ #endif
+
+ #include <limits.h> // USHRT_MAX
+
+ #ifndef _COM_SUN_STAR_SEQUENCE_HXX_
+ #include <com/sun/star/uno/Sequence.hxx>
+ #endif
+
+ class SwRedline;
+ class SwRedlineTbl;
+ class SwPaM;
+ struct SwPosition;
+ class SwStartNode;
+ class SwNode;
+ class String;
+
+typedef USHORT RedlineMode_t;
+namespace nsRedlineMode_t
+{
+ const RedlineMode_t REDLINE_NONE = 0; // no RedlineMode
+ const RedlineMode_t REDLINE_ON = 0x01;// RedlineMode on
+ const RedlineMode_t REDLINE_IGNORE = 0x02;// ignore Redlines
+ const RedlineMode_t REDLINE_SHOW_INSERT = 0x10;// show all inserts
+ const RedlineMode_t REDLINE_SHOW_DELETE = 0x20;// show all delets
+ const RedlineMode_t REDLINE_SHOW_MASK = REDLINE_SHOW_INSERT | REDLINE_SHOW_DELETE;
+
+ // fuer die interne Verwaltung:
+ // die originalen Redlines inclusive des Contents entfernen
+ // (ClipBoard/Textbausteine)
+ const RedlineMode_t REDLINE_DELETE_REDLINES = 0x100;
+ // beim Loeschen innerhalb ein RedlineObjectes, waehrend des Appends,
+ // das DeleteRedline ignorieren
+ const RedlineMode_t REDLINE_IGNOREDELETE_REDLINES = 0x200;
+ // don't combine any readlines. This flags is may only used in the Undo.
+ const RedlineMode_t REDLINE_DONTCOMBINE_REDLINES = 0x400;
+}
+
+typedef USHORT RedlineType_t;
+namespace nsRedlineType_t
+{
+ // die RedlineTypen gehen von 0 bis 127
+ const RedlineType_t REDLINE_INSERT = 0x0;// Inhalt wurde eingefuegt
+ const RedlineType_t REDLINE_DELETE = 0x1;// Inhalt wurde geloescht
+ const RedlineType_t REDLINE_FORMAT = 0x2;// Attributierung wurde angewendet
+ const RedlineType_t REDLINE_TABLE = 0x3;// TabellenStruktur wurde veraendert
+ const RedlineType_t REDLINE_FMTCOLL = 0x4;// FormatVorlage wurde veraendert (Autoformat!)
+
+ // ab 128 koennen Flags hineinverodert werden
+ const RedlineType_t REDLINE_NO_FLAG_MASK = 0x7F;
+ //const RedlineType_t REDLINE_FLAG_MASK = 0xFF80;
+ const RedlineType_t REDLINE_FORM_AUTOFMT = 0x80;// kann als Flag im RedlineType stehen
+}
+
+/** IDocumentRedlineAccess
+*/
+class IDocumentRedlineAccess
+{
+ // Static helper functions
+public:
+ static bool IsShowChanges(const USHORT eM)
+ { return (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
+
+ static bool IsHideChanges(const USHORT eM)
+ { return nsRedlineMode_t::REDLINE_SHOW_INSERT == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
+
+ static bool IsShowOriginal(const USHORT eM)
+ { return nsRedlineMode_t::REDLINE_SHOW_DELETE == (eM & nsRedlineMode_t::REDLINE_SHOW_MASK); }
+
+ static bool IsRedlineOn(const USHORT eM)
+ { return nsRedlineMode_t::REDLINE_ON == (eM & (nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE )); }
+
+public:
+
+ /*************************************************
+ Query
+ *************************************************/
+
+ /** Query the currently set redline mode
+
+ @returns
+ the currently set redline mode
+ */
+ virtual RedlineMode_t GetRedlineMode() const = 0;
+
+ /** Set a new redline mode.
+
+ @param eMode
+ [in] the new redline mode.
+ */
+ virtual void SetRedlineMode_intern(/*[in]*/RedlineMode_t eMode) = 0;
+
+ /** Set a new redline mode.
+
+ @param eMode
+ [in] the new redline mode.
+ */
+ virtual void SetRedlineMode(/*[in]*/RedlineMode_t eMode) = 0;
+
+ /** Query if redlining is on.
+
+ @returns
+ </TRUE> if redlining is on </FALSE> otherwise
+ */
+ virtual bool IsRedlineOn() const = 0;
+
+ /**
+ */
+ virtual bool IsIgnoreRedline() const = 0;
+
+ /**
+ */
+ virtual const SwRedlineTbl& GetRedlineTbl() const = 0;
+
+
+ /*
+ */
+ virtual bool IsInRedlines(const SwNode& rNode) const = 0;
+
+ /***************************************************
+ Manipulation
+ ***************************************************/
+
+ /** Append a new redline
+
+ @param pPtr
+
+ @param bCallDelete
+
+ @returns
+ */
+ virtual bool AppendRedline(/*[in]*/SwRedline* pPtr, /*[in]*/bool bCallDelete) = 0;
+
+ /**
+ */
+ virtual bool SplitRedline(/*[in]*/const SwPaM& rPam) = 0;
+
+ /**
+ */
+ virtual bool DeleteRedline(
+ /*[in]*/const SwPaM& rPam,
+ /*[in]*/bool bSaveInUndo,
+ /*[in]*/sal_uInt16 nDelType) = 0;
+
+ /**
+ */
+ virtual bool DeleteRedline(
+ /*[in]*/const SwStartNode& rSection,
+ /*[in]*/bool bSaveInUndo,
+ /*[in]*/sal_uInt16 nDelType) = 0;
+
+ /**
+ */
+ virtual sal_uInt16 GetRedlinePos(
+ /*[in]*/const SwNode& rNode,
+ /*[in]*/sal_uInt16 nType) const = 0;
+
+ virtual void CompressRedlines() = 0;
+
+ /**
+ */
+ virtual const SwRedline* GetRedline(
+ /*[in]*/const SwPosition& rPos,
+ /*[in]*/sal_uInt16* pFndPos) const = 0;
+
+ /**
+ */
+ virtual bool IsRedlineMove() const = 0;
+
+ /**
+ */
+ virtual void SetRedlineMove(/*[in]*/bool bFlag) = 0;
+
+ /**
+ */
+ virtual bool AcceptRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete) = 0;
+
+ /**
+ */
+ virtual bool AcceptRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) = 0;
+
+ /**
+ */
+ virtual bool RejectRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete) = 0;
+
+ /**
+ */
+ virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete) = 0;
+
+ /**
+ */
+ virtual const SwRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const = 0;
+
+ /**
+ */
+ virtual const SwRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const = 0;
+
+ // alle Redline invalidieren, die Darstellung hat sich geaendert
+ virtual void UpdateRedlineAttr() = 0;
+
+ // legt gegebenenfalls einen neuen Author an
+ virtual sal_uInt16 GetRedlineAuthor() = 0;
+
+ // fuer die Reader usw. - neuen Author in die Tabelle eintragen
+ virtual sal_uInt16 InsertRedlineAuthor(const String& rAuthor) = 0;
+
+ // Kommentar am Redline an der Position setzen
+ virtual bool SetRedlineComment(
+ /*[in]*/const SwPaM& rPam,
+ /*[in]*/const String& rComment) = 0;
+
+ /**
+ */
+ virtual const ::com::sun::star::uno::Sequence <sal_Int8>& GetRedlinePassword() const = 0;
+
+ /**
+ */
+ virtual void SetRedlinePassword(
+ /*[in]*/const ::com::sun::star::uno::Sequence <sal_Int8>& rNewPassword) = 0;
+
+ protected:
+ virtual ~IDocumentRedlineAccess() {};
+ };
+
+ #endif
diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
new file mode 100644
index 000000000000..6be53158ddc8
--- /dev/null
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -0,0 +1,212 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTSETTINGACCESS_HXX_INCLUDED
+#define IDOCUMENTSETTINGACCESS_HXX_INCLUDED
+
+#include <tools/solar.h>
+#ifndef _VOS_REF_HXX
+#include <vos/ref.hxx>
+#endif
+#include <chcmprse.hxx>
+#include <fldupde.hxx>
+
+class SvxForbiddenCharactersTable;
+namespace com { namespace sun { namespace star { namespace i18n { struct ForbiddenCharacters; } } } }
+
+ /** Provides access to settings of a document
+ */
+ class IDocumentSettingAccess
+ {
+ public:
+ enum DocumentSettingId
+ {
+ // COMPATIBILITY FLAGS START
+ PARA_SPACE_MAX,
+ PARA_SPACE_MAX_AT_PAGES,
+
+ TAB_COMPAT,
+
+ ADD_FLY_OFFSETS,
+
+ OLD_NUMBERING,
+
+ ADD_EXT_LEADING,
+ USE_VIRTUAL_DEVICE,
+ USE_HIRES_VIRTUAL_DEVICE,
+ OLD_LINE_SPACING,
+ ADD_PARA_SPACING_TO_TABLE_CELLS,
+ USE_FORMER_OBJECT_POS,
+ USE_FORMER_TEXT_WRAPPING,
+ CONSIDER_WRAP_ON_OBJECT_POSITION,
+
+ IGNORE_FIRST_LINE_INDENT_IN_NUMBERING,
+ DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK,
+ DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT,
+ OUTLINE_LEVEL_YIELDS_OUTLINE_RULE,
+
+ DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE,
+ TABLE_ROW_KEEP,
+ IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION,
+ CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME,
+
+ UNIX_FORCE_ZERO_EXT_LEADING,
+ USE_OLD_PRINTER_METRICS,
+ TABS_RELATIVE_TO_INDENT,
+ PROTECT_FORM,
+ // --> OD 2008-06-05 #i89181#
+ TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
+ // <--
+ // COMPATIBILITY FLAGS END
+
+ BROWSE_MODE,
+ HTML_MODE,
+ GLOBAL_DOCUMENT,
+ GLOBAL_DOCUMENT_SAVE_LINKS,
+ LABEL_DOCUMENT,
+ PURGE_OLE,
+ KERN_ASIAN_PUNCTUATION
+ };
+
+ public:
+ /** Return the specified document setting.
+
+ @param id
+ [in] the identifier of the document setting to be returned.
+ See above for a list of valid document setting identifiers.
+
+ @returns
+ the value of the requested document setting.
+ */
+ virtual bool get(/*[in]*/ DocumentSettingId id) const = 0;
+
+ /** Set the specified document setting.
+
+ @param id
+ [in] the identifier of the document setting to be set.
+ See above for a list of valid document setting identifiers.
+
+ @param value
+ [in] the new value of the specified document setting.
+ */
+ virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) = 0;
+
+ /** Return the forbidden characters.
+
+ @param nLang
+ [in] the language for which the forbidden character list is returned.
+
+ @param bLocaleData
+ [in] if set and there is no user defined forbidden character list for
+ language lang, the default list for language lang will be returned.
+
+ @returns
+ a list of forbidden characters.
+ */
+ virtual const com::sun::star::i18n::ForbiddenCharacters*
+ getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const = 0;
+
+ /** Set the forbidden characters.
+
+ @param nLang
+ [in] the language for which the forbidden character list should be set.
+
+ @param rForbiddenCharacters
+ [in] the new list of forbidden characters for language lang.
+ */
+ virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang,
+ /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters ) = 0;
+
+ /** Get the forbidden character table and creates one if necessary.
+
+ @returns
+ the forbidden characters table.
+ */
+ virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() = 0;
+
+ /** Get the forbidden character table.
+
+ @returns
+ the forbidden characters table.
+ */
+ virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const = 0;
+
+ /** Get the current link update mode.
+
+ @param bGlobalSettings
+ [in] if set, the link update mode is obtained from the module,
+ if it is set to GLOBALSETTING
+
+ @returns
+ the current link update mode.
+ */
+ virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const = 0;
+
+ /** Set the current link update mode.
+
+ @param nMode
+ [in] the new link update mode.
+ */
+ virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode ) = 0;
+
+ /** Get the current field update mode.
+
+ @param bGlobalSettings
+ [in] if set, the field update mode is obtained from the module,
+ if it is set to GLOBALSETTING
+
+ @returns
+ the current field update mode.
+ */
+ virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const = 0;
+
+ /** Set the current field update mode.
+
+ @param nMode
+ [in] the new field update mode.
+ */
+ virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags nMode ) = 0;
+
+ /** Get the character compression type for Asian characters.
+
+ @returns
+ the current character compression mode.
+ */
+ virtual SwCharCompressType getCharacterCompressionType() const = 0;
+
+ /** Set the character compression type for Asian characters.
+
+ @param nMode
+ [in] the new character compression type.
+ */
+ virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType ) = 0;
+
+protected:
+ virtual ~IDocumentSettingAccess() {};
+ };
+
+ #endif // IDOCUMENTSETTINGACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentState.hxx b/sw/inc/IDocumentState.hxx
new file mode 100644
index 000000000000..6362f6213290
--- /dev/null
+++ b/sw/inc/IDocumentState.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTSTATE_HXX_INCLUDED
+ #define IDOCUMENTSTATE_HXX_INCLUDED
+
+ #include <tools/solar.h>
+
+ /** Get information about the current document state
+ */
+ class IDocumentState
+ {
+ public:
+ /** Bei Formataenderungen muss das zu Fuss gerufen werden!
+ */
+ virtual void SetModified() = 0;
+
+ /**
+ */
+ virtual void ResetModified() = 0;
+
+ /** Dokumentaenderungen?
+ */
+ virtual bool IsModified() const = 0;
+
+ /** Zustaende ueber Ladezustand
+ frueher DocInfo
+ */
+ virtual bool IsLoaded() const = 0;
+
+ /**
+ */
+ virtual bool IsUpdateExpFld() const = 0;
+
+ /**
+ */
+ virtual bool IsNewDoc() const = 0;
+
+ /**
+ */
+ virtual bool IsPageNums() const = 0;
+
+ /**
+ */
+ virtual void SetPageNums(bool b) = 0;
+
+ /**
+ */
+ virtual void SetNewDoc(bool b) = 0;
+
+ /**
+ */
+ virtual void SetUpdateExpFldStat(bool b) = 0;
+
+ /**
+ */
+ virtual void SetLoaded(bool b = sal_True) = 0;
+
+ protected:
+ virtual ~IDocumentState() {};
+ };
+
+ #endif // IDOCUMENTSTATE_HXX_INCLUDED
diff --git a/sw/inc/IDocumentStatistics.hxx b/sw/inc/IDocumentStatistics.hxx
new file mode 100644
index 000000000000..25c2d54d71e9
--- /dev/null
+++ b/sw/inc/IDocumentStatistics.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTSTATISTICS_HXX_INCLUDED
+ #define IDOCUMENTSTATISTICS_HXX_INCLUDED
+
+ struct SwDocStat;
+
+ /** Document statistics information
+ */
+ class IDocumentStatistics
+ {
+ public:
+
+ /** die DocInfo hat siche geaendert (Notify ueber die DocShell)
+ stosse die entsp. Felder zum Updaten an.
+ */
+ virtual void DocInfoChgd() = 0;
+
+ /** Dokument - Statistics
+ */
+ virtual const SwDocStat &GetDocStat() const = 0;
+
+ /**
+ */
+ virtual void SetDocStat(const SwDocStat& rStat) = 0;
+
+ /**
+ */
+ virtual void UpdateDocStat(SwDocStat& rStat) = 0;
+
+protected:
+ virtual ~IDocumentStatistics() {};
+ };
+
+ #endif // IDOCUMENTSTATISTICS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentStylePoolAccess.hxx b/sw/inc/IDocumentStylePoolAccess.hxx
new file mode 100644
index 000000000000..743b0d3304e4
--- /dev/null
+++ b/sw/inc/IDocumentStylePoolAccess.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTSTYLEPOOLACCESS_HXX_INCLUDED
+ #define IDOCUMENTSTYLEPOOLACCESS_HXX_INCLUDED
+
+ #ifndef _SAL_TYPES_H_
+ #include <sal/types.h>
+ #endif
+
+ class SwTxtFmtColl;
+ class SwCharFmt;
+ class SwFmt;
+ class SwFrmFmt;
+ class String;
+ class SwNumRule;
+ class SwPageDesc;
+
+ /** Access to the style pool
+ */
+ class IDocumentStylePoolAccess
+ {
+ public:
+
+ /** Gebe die "Auto-Collection" mit der Id zurueck. Existiert
+ sie noch nicht, dann erzuege sie
+ Ist der String-Pointer definiert, dann erfrage nur die
+ Beschreibung der Attribute, !! es legt keine Vorlage an !!
+ */
+ virtual SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage = true ) = 0;
+
+ /** return das geforderte automatische Format - Basis-Klasse !
+ */
+ virtual SwFmt* GetFmtFromPool( sal_uInt16 nId ) = 0;
+
+ /** returne das geforderte automatische Format
+ */
+ virtual SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId ) = 0;
+
+ /**
+ */
+ virtual SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId ) = 0;
+
+ /** returne die geforderte automatische Seiten-Vorlage
+ */
+ virtual SwPageDesc* GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage = true ) = 0;
+
+ /**
+ */
+ virtual SwNumRule* GetNumRuleFromPool( sal_uInt16 nId ) = 0;
+
+ /** pruefe, ob diese "Auto-Collection" in Dokument schon/noch benutzt wird
+ */
+ virtual bool IsPoolTxtCollUsed( sal_uInt16 nId ) const = 0;
+ virtual bool IsPoolFmtUsed( sal_uInt16 nId ) const = 0;
+ virtual bool IsPoolPageDescUsed( sal_uInt16 nId ) const = 0;
+
+ protected:
+ virtual ~IDocumentStylePoolAccess() {};
+};
+
+#endif // IDOCUMENTSTYLEPOOLACCESS_HXX_INCLUDED
+
diff --git a/sw/inc/IDocumentTimerAccess.hxx b/sw/inc/IDocumentTimerAccess.hxx
new file mode 100644
index 000000000000..f0d69e942af3
--- /dev/null
+++ b/sw/inc/IDocumentTimerAccess.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTTIMERACCESS_HXX_INCLUDED
+ #define IDOCUMENTTIMERACCESS_HXX_INCLUDED
+
+ /** Get information about the current document state
+ */
+ class IDocumentTimerAccess
+ {
+ public:
+ /**
+ Set modus to start, i.e. start timer if block count == 0
+ */
+ virtual void StartIdling() = 0;
+
+ /**
+ Set modus to stopped, i.e. stop timer if running
+ */
+ virtual void StopIdling() = 0;
+
+ /**
+ Increment block count, stop timer if running
+ */
+ virtual void BlockIdling() = 0;
+
+ /**
+ Decrement block count, start timer if block count == 0 AND modus == start
+ */
+ virtual void UnblockIdling() = 0;
+
+ protected:
+ virtual ~IDocumentTimerAccess() {};
+ };
+
+ #endif // IDOCUMENTTIMERACCESS_HXX_INCLUDED
diff --git a/sw/inc/IDocumentUndoRedo.hxx b/sw/inc/IDocumentUndoRedo.hxx
new file mode 100644
index 000000000000..a224395429a9
--- /dev/null
+++ b/sw/inc/IDocumentUndoRedo.hxx
@@ -0,0 +1,193 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IDOCUMENTUNDOREDO_HXX_INCLUDED
+#define IDOCUMENTUNDOREDO_HXX_INCLUDED
+
+#include <sal/types.h>
+#include <swundo.hxx>
+
+
+class SwUndoIter;
+class SwRewriter;
+class String;
+class SwUndoIds;
+class SwNodes;
+class SwUndo;
+
+
+typedef sal_uInt16 SwUndoNoModifiedPosition;
+
+/** IDocumentUndoRedo
+*/
+class IDocumentUndoRedo
+{
+public:
+ /**
+ */
+ virtual void SetUndoNoResetModified() = 0;
+
+ /**
+ */
+ virtual bool IsUndoNoResetModified() const = 0;
+
+ /** UndoHistory am Dokument pflegen
+ bei Save, SaveAs, Create wird UndoHistory zurueckgesetzt ???
+ */
+ virtual void DoUndo(bool bUn) = 0;
+
+ /**
+ */
+ virtual bool DoesUndo() const = 0;
+
+ /** Zusammenfassen von Kontinuierlichen Insert/Delete/Overwrite von
+ Charaktern. Default ist ::com::sun::star::sdbcx::Group-Undo.
+ */
+ virtual void DoGroupUndo(bool bUn) = 0;
+
+ /**
+ */
+ virtual bool DoesGroupUndo() const = 0;
+
+ /** macht rueckgaengig:
+ 0 letzte Aktion, sonst Aktionen bis zum Start der Klammerung nUndoId
+ In rUndoRange wird der restaurierte Bereich gesetzt.
+ */
+ virtual bool Undo( SwUndoIter& ) = 0; // -> #111827#
+
+ /** Opens undo block.
+
+ @param nUndoId undo ID for the start object
+ @param pRewriter rewriter for comments @see SwUndo::GetComment
+
+ If the given nUndoId is equal to zero an undo object with ID
+ UNDO_START will be generated.
+
+ @return the undo ID of the created object
+ */
+ virtual SwUndoId StartUndo( SwUndoId eUndoId, const SwRewriter * pRewriter) = 0;
+
+ /**
+ Closes undo block.
+
+ @param nUndoId undo ID for the closure object
+ @param pRewriter rewriter for comments @see SwUndo::GetComment
+
+ If the given nUndoId is equal to zero an undo object with ID
+ UNDO_START will be generated.
+
+ If pRewriter is not equal to zero the given rewriter will be
+ set for the generated closure object and the corresponding
+ start object. Otherwise an existent rewriter in theIDocumentRedlineAccess
+ corresponding start object will be propagated to the generated
+ closure object.
+ */
+ virtual SwUndoId EndUndo( SwUndoId eUndoId, const SwRewriter * pRewriter) = 0;
+
+ /** <- #111827#
+ loescht die gesamten UndoObjecte ( fuer Methoden die am Nodes
+ Array drehen ohne entsprechendes Undo !!)
+ */
+ virtual void DelAllUndoObj() = 0;
+
+ /** liefert die Id der letzten undofaehigen Aktion zurueck
+ oder USHRT_MAX fuellt ggf. VARARR mit ::com::sun::star::sdbcx::User-UndoIds
+ */
+ virtual SwUndoId GetUndoIds(String* pStr, SwUndoIds *pUndoIds) const = 0;
+
+ /**
+ */
+ virtual String GetUndoIdsStr(String* pStr, SwUndoIds *pUndoIds) const = 0;
+
+ /** gibt es Klammerung mit der Id?
+ */
+ virtual bool HasUndoId(SwUndoId eId) const = 0;
+
+ /* @@@MAINTAINABILITY-HORROR@@@
+ Implementation details made public.
+ die drei folgenden Methoden werden beim Undo und nur dort
+ benoetigt. Sollten sonst nicht aufgerufen werden.
+ */
+ virtual const SwNodes* GetUndoNds() const = 0;
+
+ virtual SwUndo* RemoveLastUndo(SwUndoId eUndoId) = 0;
+
+ /** 2002-05-31 dvo, #95884#: To prevent an undo array overflow when
+ doing nested undos, undo may have to be disabled. Undo-intensive
+ actions (like auto-format) should check this manually.
+ */
+ virtual bool HasTooManyUndos() const = 0;
+
+ /**
+ */
+ virtual bool Redo( SwUndoIter& ) = 0;
+
+ /** liefert die Id der letzten Redofaehigen Aktion zurueck
+ fuellt ggf. VARARR mit RedoIds
+ */
+ virtual SwUndoId GetRedoIds( String* pStr, SwUndoIds *pRedoIds) const = 0;
+
+ /**
+ */
+ virtual String GetRedoIdsStr( String* pStr, SwUndoIds *pRedoIds) const = 0;
+
+ /**
+ */
+ virtual bool Repeat( SwUndoIter&, sal_uInt16 nRepeatCnt) = 0;
+
+ /** liefert die Id der letzten Repeatfaehigen Aktion zurueck
+ fuellt ggf. VARARR mit RedoIds
+ */
+ virtual SwUndoId GetRepeatIds( String* pStr, SwUndoIds *pRedoIds) const = 0;
+
+ /**
+ */
+ virtual String GetRepeatIdsStr( String* pStr, SwUndoIds *pRedoIds) const = 0;
+
+ /** interne Verkuerzung fuer Insert am Ende
+ */
+ virtual void AppendUndo(SwUndo*) = 0;
+
+ /** loescht alle UndoObjecte von nUndoPos
+ bis zum Ende des Undo-Arrays
+ */
+ virtual void ClearRedo() = 0;
+
+ /** Manipulates the position of the undo stack which reset the modified flag
+ */
+ virtual void setUndoNoModifiedPosition( SwUndoNoModifiedPosition ) = 0;
+
+ /** Gets the position of the undo stack which reset the modified flag
+ */
+ virtual SwUndoNoModifiedPosition getUndoNoModifiedPosition() const = 0;
+
+protected:
+ virtual ~IDocumentUndoRedo() {};
+};
+
+#endif
+
diff --git a/sw/inc/IGrammarContact.hxx b/sw/inc/IGrammarContact.hxx
new file mode 100644
index 000000000000..44c54b55fe9f
--- /dev/null
+++ b/sw/inc/IGrammarContact.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IGRAMMARCONTACT_HXX_INCLUDED
+#define IGRAMMARCONTACT_HXX_INCLUDED
+
+struct SwPosition;
+class SwTxtNode;
+class SwGrammarMarkUp;
+class SwDoc;
+
+/** Organizer of the contact between SwTxtNodes and grammar checker
+*/
+class IGrammarContact
+{
+public:
+
+ /** Update cursor position reacts to a change of the current input cursor
+ As long as the cursor in inside a paragraph, the grammar checking does
+ not show new grammar faults. When the cursor leaves the paragraph, these
+ faults are shown.
+ @returns void
+ */
+ virtual void updateCursorPosition( const SwPosition& rNewPos ) = 0;
+
+ /** getGrammarCheck checks if the given text node is blocked by the current cursor
+ if not, the normal markup list is returned
+ if blocked, it will return a markup list "proxy"
+ @returns a markup list (grammar) for the given SwTxtNode
+ */
+ virtual SwGrammarMarkUp* getGrammarCheck( SwTxtNode& rTxtNode, bool bCreate ) = 0;
+
+ /** finishGrammarCheck() has to be called if a grammar checking has been completed
+ for a text node. If this text node has not been hided by the current proxy list
+ it will be repainted. Otherwise the proxy list replaces the old list and the
+ repaint will be triggered by a timer
+ @returns void
+ */
+ virtual void finishGrammarCheck( SwTxtNode& rTxtNode ) = 0;
+
+public:
+ virtual ~IGrammarContact() {}
+};
+
+/** Factory for a grammar contact
+@returns a new created grammar contact object
+*/
+IGrammarContact* createGrammarContact();
+
+/* Helper functions */
+
+/** getGrammarContact() delivers the grammar contact of the document (for a given textnode)
+@returns grammar contact
+*/
+IGrammarContact* getGrammarContact( const SwTxtNode& );
+
+/** finishGrammarCheck() calls the same function of the grammar contact of the document (for a given textnode)
+@returns void
+*/
+void finishGrammarCheck( SwTxtNode& );
+
+#endif // IGRAMMARCONTACT_HXX_INCLUDED
+
diff --git a/sw/inc/IInterface.hxx b/sw/inc/IInterface.hxx
new file mode 100644
index 000000000000..52b691c4aa85
--- /dev/null
+++ b/sw/inc/IInterface.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 IINTERFACE_HXX_INCLUDED
+ #define IINTERFACE_HXX_INCLUDED
+
+ #include <sal/types.h>
+
+ /** The base interface
+ */
+ class IInterface
+ {
+ public:
+
+ /** Aquire a reference to an instance. A caller shall release
+ the instance by calling 'release' when it is no longer needed.
+ 'acquire' and 'release' calls need to be balanced.
+
+ @returns
+ the current reference count of the instance for debugging purposes.
+ */
+ virtual sal_Int32 acquire() = 0;
+
+ /** Releases a reference to an instance. A caller has to call
+ 'release' when a before aquired reference to an instance
+ is no longer needed. 'acquire' and 'release' calls need to
+ be balanced.
+
+ @returns
+ the current reference count of the instance for debugging purposes.
+ */
+ virtual sal_Int32 release() = 0;
+
+ /** Returns the current reference count. This method should be used for
+ debugging purposes. Using it otherwise is a signal of a design flaw.
+ */
+ virtual sal_Int32 getReferenceCount() const = 0;
+
+protected:
+ virtual ~IInterface() {};
+ };
+
+ #endif // IDOCUMENT_HXX_INCLUDED
diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx
new file mode 100644
index 000000000000..6a46ae01d49e
--- /dev/null
+++ b/sw/inc/IMark.hxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _IMARK_HXX
+#define _IMARK_HXX
+
+#include <vcl/keycod.hxx>
+#include <calbck.hxx>
+#include <pam.hxx>
+#include <boost/operators.hpp>
+#include <map>
+
+#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
+#define SW_DECL_SWSERVEROBJECT_DEFINED
+SV_DECL_REF( SwServerObject )
+#endif
+
+
+struct SwPosition;
+
+namespace sw { namespace mark
+{
+ class IMark
+ : virtual public SwModify // inherited as interface
+ , public ::boost::totally_ordered<IMark>
+ {
+ public:
+ //getters
+ virtual const SwPosition& GetMarkPos() const =0;
+ // GetOtherMarkPos() is only guaranteed to return a valid
+ // reference if IsExpanded() returned true
+ virtual const SwPosition& GetOtherMarkPos() const =0;
+ virtual const SwPosition& GetMarkStart() const =0;
+ virtual const SwPosition& GetMarkEnd() const =0;
+ virtual const ::rtl::OUString& GetName() const =0;
+ virtual bool IsExpanded() const =0;
+ virtual bool IsCoveringPosition(const SwPosition& rPos) const =0;
+
+ //setters
+ // not available in IMark
+ // inside core, you can cast to MarkBase and use its setters,
+ // make sure to update the sortings in Markmanager in this case
+
+ //operators and comparisons (non-virtual)
+ bool operator<(const IMark& rOther) const
+ { return GetMarkStart() < rOther.GetMarkStart(); }
+ bool operator==(const IMark& rOther) const
+ { return GetMarkStart() == rOther.GetMarkStart(); }
+ bool StartsBefore(const SwPosition& rPos) const
+ { return GetMarkStart() < rPos; }
+ bool StartsAfter(const SwPosition& rPos) const
+ { return GetMarkStart() > rPos; }
+ bool EndsBefore(const SwPosition& rPos) const
+ { return GetMarkEnd() < rPos; }
+ bool EndsAfter(const SwPosition& rPos) const
+ { return GetMarkEnd() > rPos; }
+
+ virtual rtl::OUString ToString( ) const =0;
+ };
+
+ class IBookmark
+ : virtual public IMark
+ {
+ public:
+ virtual const ::rtl::OUString& GetShortName() const =0;
+ virtual const KeyCode& GetKeyCode() const =0;
+ virtual void SetShortName(const ::rtl::OUString&) =0;
+ virtual void SetKeyCode(const KeyCode&) =0;
+ };
+
+ class IFieldmark
+ : virtual public IMark
+ {
+ public:
+ typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Any> parameter_map_t;
+ //getters
+ virtual ::rtl::OUString GetFieldname() const =0;
+ virtual ::rtl::OUString GetFieldHelptext() const =0;
+ virtual parameter_map_t* GetParameters() =0;
+ virtual const parameter_map_t* GetParameters() const =0;
+
+ //setters
+ virtual void SetFieldname(const ::rtl::OUString& rFieldname) =0;
+ virtual void SetFieldHelptext(const ::rtl::OUString& rFieldHelptext) =0;
+ virtual void Invalidate() = 0;
+ };
+
+ class ICheckboxFieldmark
+ : virtual public IFieldmark
+ {
+ public:
+ virtual bool IsChecked() const =0;
+ virtual void SetChecked(bool checked) =0;
+ };
+}}
+#endif
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
new file mode 100644
index 000000000000..485a9a5733f7
--- /dev/null
+++ b/sw/inc/PostItMgr.hxx
@@ -0,0 +1,307 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _POSTITMGR_HXX
+#define _POSTITMGR_HXX
+
+#include <list>
+#include <vector>
+#include <editeng/outlobj.hxx>
+#include <tools/string.hxx>
+#include <tools/link.hxx>
+#include <tools/debug.hxx>
+#include <swrect.hxx>
+#include <unotools/configitem.hxx>
+#include <unotools/options.hxx>
+#include <com/sun/star/util/SearchOptions.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <SidebarWindowsTypes.hxx>
+#include <svl/lstner.hxx>
+
+class SwWrtShell;
+class SwDoc;
+class SwView;
+class SwPostItField;
+class SwFmtFld;
+class SwField;
+class SfxBroadcaster;
+class SfxHint;
+class SwEditWin;
+class Color;
+class SvxSearchItem;
+class SvxLanguageItem;
+namespace sw { namespace annotation {
+ class SwAnnotationWin;
+}}
+namespace sw { namespace sidebarwindows {
+ class SwSidebarWin;
+ class SwFrmSidebarWinContainer;
+}}
+class SwSidebarItem;
+class SwFrm;
+class Window;
+
+#define SORT_POS 1
+#define SORT_AUTHOR 2
+#define SORT_DATE 3
+
+#define COL_NOTES_SIDEPANE_ARROW_ENABLED RGB_COLORDATA(0,0,0)
+#define COL_NOTES_SIDEPANE_ARROW_DISABLED RGB_COLORDATA(172,168,153)
+
+typedef std::list<SwSidebarItem*> SwSidebarItem_list;
+typedef std::list<SwSidebarItem*>::iterator SwSidebarItem_iterator;
+
+
+struct SwPostItPageItem
+{
+ bool bScrollbar;
+ sw::sidebarwindows::SidebarPosition eSidebarPosition;
+ long lOffset;
+ SwRect mPageRect;
+ SwSidebarItem_list* mList;
+ SwPostItPageItem(): bScrollbar(false),lOffset(0)
+ {
+ mList = new SwSidebarItem_list;
+ }
+ ~SwPostItPageItem()
+ {
+ mList->clear();
+ delete mList;
+ }
+
+};
+
+struct FieldShadowState
+{
+ const SwPostItField* mpShadowFld;
+ bool bCursor;
+ bool bMouse;
+ FieldShadowState(): mpShadowFld(0),bCursor(false),bMouse(false)
+ {
+ }
+};
+
+class SwNoteProps: public utl::ConfigItem
+{
+ private:
+ bool bIsShowAnchor;
+ public:
+ SwNoteProps()
+ : ConfigItem(::rtl::OUString::createFromAscii("Office.Writer/Notes"))
+ , bIsShowAnchor(false)
+ {
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames = GetPropertyNames();
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aValues = GetProperties(rNames);
+ const ::com::sun::star::uno::Any* pValues = aValues.getConstArray();
+ DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed");
+ if (aValues.getLength())
+ pValues[0]>>=bIsShowAnchor;
+ }
+
+ bool IsShowAnchor()
+ {
+ return bIsShowAnchor;
+ }
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetPropertyNames()
+ {
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames;
+ if(!aNames.getLength())
+ {
+ static const char* aPropNames[] =
+ {
+ "ShowAnkor"
+ };
+ const int nCount = sizeof(aPropNames)/sizeof(const char*);
+ aNames.realloc(nCount);
+ ::rtl::OUString* pNames = aNames.getArray();
+ for(int i = 0; i < nCount; i++)
+ pNames[i] = ::rtl::OUString::createFromAscii(aPropNames[i]);
+ }
+ return aNames;
+ }
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+};
+
+class SwPostItMgr: public SfxListener
+{
+ private:
+ SwView* mpView;
+ SwWrtShell* mpWrtShell;
+ SwEditWin* mpEditWin;
+ std::list< SwSidebarItem*> mvPostItFlds;
+ std::vector<SwPostItPageItem*> mPages;
+ ULONG mnEventId;
+ bool mbWaitingForCalcRects;
+ sw::sidebarwindows::SwSidebarWin* mpActivePostIt;
+ bool mbLayout;
+ long mbLayoutHeight;
+ long mbLayouting;
+ bool mbReadOnly;
+ bool mbDeleteNote;
+ FieldShadowState mShadowState;
+ OutlinerParaObject* mpAnswer;
+ bool mbIsShowAnchor;
+
+ // data structure to collect the <SwSidebarWin> instances for certain <SwFrm> instances.
+ sw::sidebarwindows::SwFrmSidebarWinContainer* mpFrmSidebarWinContainer;
+
+ typedef std::list<sw::sidebarwindows::SwSidebarWin*>::iterator SwSidebarWin_iterator;
+
+ void AddPostIts(bool bCheckExistance = true,bool bFocus = true);
+ //void AddRedlineComments(bool bCheckExistance, bool bFocus);
+ void RemoveSidebarWin();
+ void PreparePageContainer();
+ void Scroll(const long lScroll,const unsigned long aPage );
+ void AutoScroll(const sw::sidebarwindows::SwSidebarWin* pPostIt,const unsigned long aPage );
+ bool ScrollbarHit(const unsigned long aPage,const Point &aPoint);
+ bool LayoutByPage( std::list<sw::sidebarwindows::SwSidebarWin*> &aVisiblePostItList,
+ const Rectangle aBorder,
+ long lNeededHeight);
+ void CheckForRemovedPostIts();
+ bool ArrowEnabled(USHORT aDirection,unsigned long aPage) const;
+ bool BorderOverPageBorder(unsigned long aPage) const;
+ bool HasScrollbars() const;
+ void Focus(SfxBroadcaster& rBC);
+
+ sal_Int32 GetInitialAnchorDistance() const;
+ sal_Int32 GetScrollSize() const;
+ sal_Int32 GetSpaceBetween() const;
+ void SetReadOnlyState();
+ DECL_LINK( CalcHdl, void*);
+
+ sw::sidebarwindows::SwSidebarWin* GetSidebarWin(const SfxBroadcaster* pBroadcaster) const;
+
+ void InsertItem( SfxBroadcaster* pItem, bool bCheckExistance, bool bFocus);
+ void RemoveItem( SfxBroadcaster* pBroadcast );
+
+ void Sort(const short aType);
+
+ public:
+ SwPostItMgr(SwView* aDoc);
+ ~SwPostItMgr();
+
+ typedef std::list< SwSidebarItem* >::const_iterator const_iterator;
+ const_iterator begin() const { return mvPostItFlds.begin(); }
+ const_iterator end() const { return mvPostItFlds.end(); }
+
+ void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ void LayoutPostIts();
+ bool CalcRects();
+
+ void MakeVisible( const sw::sidebarwindows::SwSidebarWin* pPostIt,
+ long aPage = -1);
+
+ bool ShowScrollbar(const unsigned long aPage) const;
+ bool HasNotes() const ;
+ bool ShowNotes() const;
+ bool IsShowAnchor() { return mbIsShowAnchor;}
+ unsigned long GetSidebarWidth(bool bPx = false) const;
+ unsigned long GetSidebarBorderWidth(bool bPx = false) const;
+ unsigned long GetNoteWidth();
+
+ void PrepareView(bool bIgnoreCount = false);
+
+ void CorrectPositions();
+
+ void SetLayout() { mbLayout = true; };
+ void Delete(String aAuthor);
+ void Delete();
+
+#if 0
+ void Hide( SwPostItField* pPostItField );
+#endif
+ void Hide( const String& rAuthor );
+ void Hide();
+ void Show();
+
+ void Rescale();
+
+ Rectangle GetBottomScrollRect(const unsigned long aPage) const;
+ Rectangle GetTopScrollRect(const unsigned long aPage) const;
+
+ bool IsHit(const Point &aPointPixel);
+ Color GetArrowColor(USHORT aDirection,unsigned long aPage) const;
+
+ sw::annotation::SwAnnotationWin* GetAnnotationWin(const SwPostItField* pFld) const;
+
+ sw::sidebarwindows::SwSidebarWin* GetNextPostIt( USHORT aDirection,
+ sw::sidebarwindows::SwSidebarWin* aPostIt);
+ long GetNextBorder();
+
+ sw::sidebarwindows::SwSidebarWin* GetActiveSidebarWin() { return mpActivePostIt; }
+ void SetActiveSidebarWin( sw::sidebarwindows::SwSidebarWin* p);
+ bool HasActiveSidebarWin() const;
+ bool HasActiveAnnotationWin() const;
+ void GrabFocusOnActiveSidebarWin();
+ void UpdateDataOnActiveSidebarWin();
+ void DeleteActiveSidebarWin();
+ void HideActiveSidebarWin();
+ void ToggleInsModeOnActiveSidebarWin();
+
+ sal_Int32 GetMinimumSizeWithMeta() const;
+ sal_Int32 GetSidebarScrollerHeight() const;
+
+ void SetShadowState(const SwPostItField* pFld,bool bCursor = true);
+
+ void SetSpellChecking();
+
+ Color GetColorDark(sal_uInt16 aAuthorIndex);
+ Color GetColorLight(sal_uInt16 aAuthorIndex);
+ Color GetColorAnchor(sal_uInt16 aAuthorIndex);
+
+
+ void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;}
+ OutlinerParaObject* IsAnswer() {return mpAnswer;}
+ void CheckMetaText();
+ void StartSpelling();
+
+ sal_uInt16 Replace(SvxSearchItem* pItem);
+ sal_uInt16 SearchReplace(const SwFmtFld &pFld, const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
+ sal_uInt16 FinishSearchReplace(const ::com::sun::star::util::SearchOptions& rSearchOptions,bool bSrchForward);
+
+ void AssureStdModeAtShell();
+
+ void ConnectSidebarWinToFrm( const SwFrm& rFrm,
+ const SwFmtFld& rFmtFld,
+ sw::sidebarwindows::SwSidebarWin& rSidebarWin );
+ void DisconnectSidebarWinFromFrm( const SwFrm& rFrm,
+ sw::sidebarwindows::SwSidebarWin& rSidebarWin );
+ bool HasFrmConnectedSidebarWins( const SwFrm& rFrm );
+ Window* GetSidebarWinForFrmByIndex( const SwFrm& rFrm,
+ const sal_Int32 nIndex );
+ void GetAllSidebarWinForFrm( const SwFrm& rFrm,
+ std::vector< Window* >* pChildren );
+};
+
+#endif
+
+
+
+
diff --git a/sw/inc/RefreshListenerContainer.hxx b/sw/inc/RefreshListenerContainer.hxx
new file mode 100644
index 000000000000..8860787a8abf
--- /dev/null
+++ b/sw/inc/RefreshListenerContainer.hxx
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _REFRESH_LISTENER_CONTAINER_HXX_
+#define _REFRESH_LISTENER_CONTAINER_HXX_
+
+#include <unoevtlstnr.hxx>
+
+class SwRefreshListenerContainer : public SwEventListenerContainer
+{
+public:
+ SwRefreshListenerContainer( ::com::sun::star::uno::XInterface* pxParent);
+ void Refreshed();
+};
+#endif
diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
new file mode 100644
index 000000000000..729dc18a780b
--- /dev/null
+++ b/sw/inc/SidebarWin.hxx
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SIDEBARWIN_HXX
+#define _SIDEBARWIN_HXX
+
+#include <postithelper.hxx>
+#include <SidebarWindowsTypes.hxx>
+
+#include <vcl/window.hxx>
+#include <swrect.hxx>
+
+#include <tools/datetime.hxx>
+#include <tools/date.hxx>
+
+#include <vcl/lineinfo.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <editeng/editstat.hxx>
+
+class SwPostItMgr;
+class SwPostItField;
+class OutlinerView;
+class Outliner;
+class ScrollBar;
+class SwEditWin;
+class SwView;
+class Edit;
+class MenuButton;
+//class SwRedline;
+class SwFrm;
+
+
+namespace sw { namespace sidebarwindows {
+
+class SidebarTxtControl;
+class AnchorOverlayObject;
+class ShadowOverlayObject;
+
+typedef sal_Int64 SwPostItBits;
+
+#define PB_Preview ((SwPostItBits)0x00000001)
+
+
+class SwSidebarWin : public Window
+{
+ public:
+ SwSidebarWin( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits,
+ SwSidebarItem& rSidebarItem );
+ virtual ~SwSidebarWin();
+
+ void SetSize( const Size& rNewSize );
+ void SetPosSizePixelRect( long nX,
+ long nY,
+ long nWidth,
+ long nHeight,
+ const SwRect &aRect,
+ const long PageBorder);
+ void SetPosAndSize();
+ void TranslateTopPosition(const long aAmount);
+ virtual void CheckMetaText();
+
+ inline Point GetAnchorPos() { return mAnchorRect.Pos(); }
+ SwEditWin* EditWin();
+
+ inline OutlinerView* GetOutlinerView() { return mpOutlinerView;}
+ bool HasScrollbar() const;
+ bool IsScrollbarVisible() const;
+ inline ScrollBar* Scrollbar() { return mpVScrollbar; }
+ inline ::sw::sidebarwindows::AnchorOverlayObject* Anchor() { return mpAnchor;}
+ inline ::sw::sidebarwindows::ShadowOverlayObject* Shadow() { return mpShadow;}
+
+ long GetPostItTextHeight();
+
+ void SwitchToPostIt(USHORT aDirection);
+ virtual void SwitchToFieldPos();
+
+ virtual sal_uInt32 MoveCaret() = 0;
+
+ virtual void UpdateData() = 0;
+ virtual void SetPostItText() = 0;
+ virtual void Delete();
+ virtual void GotoPos() = 0;
+
+ virtual String GetAuthor() = 0;
+ virtual Date GetDate() = 0;
+ virtual Time GetTime() = 0;
+
+ void ExecuteCommand(USHORT nSlot);
+ void InitControls();
+ void HidePostIt();
+ void DoResize();
+ void ResizeIfNeccessary(long aOldHeight, long aNewHeight);
+ void SetScrollbar();
+
+ void SetVirtualPosSize( const Point& aPoint, const Size& aSize);
+ const Point VirtualPos() { return mPosSize.TopLeft(); }
+ const Size VirtualSize() { return mPosSize.GetSize(); }
+
+ void ShowAnchorOnly(const Point &aPoint);
+ void ShowNote();
+ void HideNote();
+
+ void ResetAttributes();
+
+ void SetSidebarPosition(sw::sidebarwindows::SidebarPosition eSidebarPosition);
+ void SetReadonly(BOOL bSet);
+ BOOL IsReadOnly() { return mbReadonly;}
+ bool IsPreview() { return nFlags & PB_Preview;}
+
+ void SetColor(Color aColorDark,Color aColorLight, Color aColorAnchor);
+ const Color& ColorAnchor() { return mColorAnchor; }
+ const Color& ColorDark() { return mColorDark; }
+ const Color& ColorLight() { return mColorLight; }
+ void Rescale();
+
+ void SetViewState(::sw::sidebarwindows::ViewState bViewState);
+
+ bool IsFollow() { return mbIsFollow; }
+ void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; };
+ virtual bool CalcFollow() = 0;
+
+#if 0
+#endif
+
+ sal_Int32 GetMetaHeight();
+ sal_Int32 GetMinimumSizeWithMeta();
+ sal_Int32 GetMinimumSizeWithoutMeta();
+ sal_Int32 GetMetaButtonAreaWidth();
+ sal_Int32 GetScrollbarWidth();
+
+ void SetSpellChecking();
+
+ void ToggleInsMode();
+
+ virtual void ActivatePostIt();
+ virtual void DeactivatePostIt();
+
+ void SetChangeTracking( const SwPostItHelper::SwLayoutStatus aStatus,
+ const Color& aColor);
+ SwPostItHelper::SwLayoutStatus GetLayoutStatus() { return mLayoutStatus; }
+ Color GetChangeColor() { return mChangeColor; }
+
+ virtual bool IsProtected() {return mbReadonly;};
+
+ DECL_LINK( WindowEventListener, VclSimpleEvent* );
+ inline bool IsMouseOverSidebarWin() const { return mbMouseOver; }
+
+ void SetLanguage(const SvxLanguageItem aNewItem);
+
+ void ChangeSidebarItem( SwSidebarItem& rSidebarItem );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ protected:
+ virtual void DataChanged( const DataChangedEvent& aEvent);
+ virtual void LoseFocus();
+ virtual void Paint( const Rectangle& rRect);
+ virtual void GetFocus();
+ virtual MenuButton* CreateMenuButton() = 0;
+
+ void SetSizePixel( const Size& rNewSize );
+ SfxItemSet DefaultItem();
+
+ DECL_LINK(ModifyHdl, void*);
+ DECL_LINK(ScrollHdl, ScrollBar*);
+ DECL_LINK(DeleteHdl, void*);
+
+ inline SwView& DocView() { return mrView;}
+ inline SwPostItMgr& Mgr() { return mrMgr; }
+ inline Outliner* Engine() { return mpOutliner;}
+
+ private:
+ SwSidebarWin* GetTopReplyNote();
+
+ virtual SvxLanguageItem GetLanguage(void);
+
+ SwPostItMgr& mrMgr;
+ SwView& mrView;
+ const SwPostItBits nFlags;
+
+ ULONG mnEventId;
+
+ OutlinerView* mpOutlinerView;
+ Outliner* mpOutliner;
+
+ sw::sidebarwindows::SidebarTxtControl* mpSidebarTxtControl;
+ ScrollBar* mpVScrollbar;
+ Edit* mpMetadataAuthor;
+ Edit* mpMetadataDate;
+ MenuButton* mpMenuButton;
+
+ sw::sidebarwindows::AnchorOverlayObject* mpAnchor;
+ sw::sidebarwindows::ShadowOverlayObject* mpShadow;
+
+ Color mColorAnchor;
+ Color mColorDark;
+ Color mColorLight;
+ Color mChangeColor;
+
+ sw::sidebarwindows::SidebarPosition meSidebarPosition;
+
+ Rectangle mPosSize;
+ SwRect mAnchorRect;
+ long mPageBorder;
+
+ bool mbMouseOver;
+ SwPostItHelper::SwLayoutStatus mLayoutStatus;
+
+ bool mbReadonly;
+ bool mbIsFollow;
+
+ SwSidebarItem& mrSidebarItem;
+ const SwFrm* mpAnchorFrm;
+};
+
+} } // eof namespace sw::sidebarwindows
+
+
+// implementation for change tracking comments, fully functional, but not yet used
+/*
+class SwRedComment : public SwSidebarWin
+{
+ private:
+ SwRedline* pRedline;
+
+ protected:
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ public:
+ SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed);
+ virtual ~SwRedComment() {};
+
+ virtual void UpdateData();
+ virtual void SetPostItText();
+ virtual void Delete();
+ virtual void GotoPos();
+ virtual void SetPopup();
+ virtual void ActivatePostIt();
+ virtual void DeactivatePostIt();
+
+ virtual String GetAuthor();
+ virtual Date GetDate();
+ virtual Time GetTime();
+
+ virtual bool IsProtected();
+};
+*/
+
+#endif
diff --git a/sw/inc/SidebarWindowsTypes.hxx b/sw/inc/SidebarWindowsTypes.hxx
new file mode 100644
index 000000000000..8b86f87edf87
--- /dev/null
+++ b/sw/inc/SidebarWindowsTypes.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * 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: $
+ *
+ * $Revision: $
+ *
+ * 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 _SIDEBARWINDOWSTYPES_HXX
+#define _SIDEBARWINDOWSTYPES_HXX
+
+namespace sw { namespace sidebarwindows {
+
+enum ViewState
+{
+ VS_NORMAL,
+ VS_VIEW,
+ VS_EDIT
+};
+
+enum SidebarPosition
+{
+ SIDEBAR_LEFT, // sidebar on left side
+ SIDEBAR_RIGHT, // sidebar on right side
+ SIDEBAR_NONE // sidebar on neither side
+};
+
+} } // end of namespace sw::sidebarwindows
+
+#endif
diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx
new file mode 100644
index 000000000000..c5d052f660b2
--- /dev/null
+++ b/sw/inc/SwAppletImpl.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_APPLET_IMPL_HXX
+#define _SW_APPLET_IMPL_HXX
+
+#define SWHTML_OPTTYPE_IGNORE 0
+#define SWHTML_OPTTYPE_TAG 1
+#define SWHTML_OPTTYPE_PARAM 2
+#define SWHTML_OPTTYPE_SIZE 3
+
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+
+
+#include <tools/string.hxx>
+#include <sfx2/frmhtml.hxx>
+#include <sfx2/frmhtmlw.hxx>
+#ifndef _WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+#include <sot/storage.hxx>
+#include <svl/itemset.hxx>
+
+#include <svl/ownlist.hxx>
+
+class SfxItemSet;
+
+#define OOO_STRING_SW_HTML_O_Hidden "HIDDEN"
+
+class SwApplet_Impl
+{
+ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > xApplet;
+ SvCommandList aCommandList; // und die szugehorige Command-List
+ SfxItemSet aItemSet;
+ String sAlt;
+
+public:
+ static USHORT GetOptionType( const String& rName, BOOL bApplet );
+ SwApplet_Impl( SfxItemPool& rPool, USHORT nWhich1, USHORT nWhich2 );
+ SwApplet_Impl( SfxItemSet& rSet ): aItemSet ( rSet) {}
+ ~SwApplet_Impl();
+ void CreateApplet( const String& rCode, const String& rName,
+ BOOL bMayScript, const String& rCodeBase,
+ const String& rBaseURL );
+#ifdef SOLAR_JAVA
+ sal_Bool CreateApplet( const String& rBaseURL );
+ void AppendParam( const String& rName, const String& rValue );
+#endif
+ void FinishApplet();
+ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetApplet() { return xApplet; }
+ SfxItemSet& GetItemSet() { return aItemSet; }
+ const String& GetAltText() { return sAlt; }
+ void SetAltText( const String& rAlt ) {sAlt = rAlt;}
+};
+#endif
diff --git a/sw/inc/SwCapObjType.hxx b/sw/inc/SwCapObjType.hxx
new file mode 100644
index 000000000000..b256b51c6a53
--- /dev/null
+++ b/sw/inc/SwCapObjType.hxx
@@ -0,0 +1,35 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWCAPOBJTYPE_HXX
+#define _SWCAPOBJTYPE_HXX
+
+enum SwCapObjType
+{
+ FRAME_CAP, GRAPHIC_CAP, TABLE_CAP, OLE_CAP
+};
+
+#endif
diff --git a/sw/inc/SwGetPoolIdFromName.hxx b/sw/inc/SwGetPoolIdFromName.hxx
new file mode 100644
index 000000000000..92959457e534
--- /dev/null
+++ b/sw/inc/SwGetPoolIdFromName.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _GETPOOLIDFROMNAMEENUM_HXX
+#define _GETPOOLIDFROMNAMEENUM_HXX
+
+/* When using the NameMapper to translate pool ids to UI or programmatic
+ * names, this enum is used to define which family is required */
+
+typedef USHORT SwGetPoolIdFromName;
+
+namespace nsSwGetPoolIdFromName
+{
+ const SwGetPoolIdFromName GET_POOLID_TXTCOLL = 0x01;
+ const SwGetPoolIdFromName GET_POOLID_CHRFMT = 0x02;
+ const SwGetPoolIdFromName GET_POOLID_FRMFMT = 0x04;
+ const SwGetPoolIdFromName GET_POOLID_PAGEDESC = 0x08;
+ const SwGetPoolIdFromName GET_POOLID_NUMRULE = 0x10;
+}
+
+#endif
diff --git a/sw/inc/SwNodeNum.hxx b/sw/inc/SwNodeNum.hxx
new file mode 100644
index 000000000000..56fef5d0a558
--- /dev/null
+++ b/sw/inc/SwNodeNum.hxx
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_NODE_NUM_HXX
+#define _SW_NODE_NUM_HXX
+
+#include <SwNumberTree.hxx>
+
+class SwTxtNode;
+struct SwPosition;
+class SwNumRule;
+class SwNumFmt;
+
+class SW_DLLPUBLIC SwNodeNum : public SwNumberTreeNode
+{
+public:
+ // --> OD 2008-02-19 #refactorlists#
+ explicit SwNodeNum( SwTxtNode* pTxtNode );
+ explicit SwNodeNum( SwNumRule* pNumRule );
+ // <--
+ virtual ~SwNodeNum();
+
+ SwNumRule* GetNumRule() const;
+ void ChangeNumRule( SwNumRule& rNumRule );
+ SwTxtNode* GetTxtNode() const;
+
+ virtual bool IsNotificationEnabled() const;
+
+ virtual bool IsContinuous() const;
+
+ virtual bool IsCounted() const;
+
+ virtual bool LessThan(const SwNumberTreeNode & rNode) const;
+
+ virtual bool IsRestart() const;
+
+ virtual SwNumberTree::tSwNumTreeNumber GetStartValue() const;
+
+// String ToString() const;
+
+ SwPosition GetPosition() const;
+
+ // --> OD 2006-03-07 #131436#
+ // The number tree root node is deleted, when the corresponding numbering
+ // rule is deleted. In this situation the number tree should be empty -
+ // still registered text nodes aren't allowed. But it is possible, that
+ // text nodes of the undo nodes array are still registered. These will be
+ // unregistered.
+ // Text nodes of the document nodes array aren't allowed to be registered
+ // in this situation - this will be asserted.
+ static void HandleNumberTreeRootNodeDelete( SwNodeNum& rNodeNum );
+ // <--
+
+ /** determines the <SwNodeNum> instance, which is preceding the given text node
+
+ OD 2007-09-06 #i81002#
+
+ @author OD
+ */
+ const SwNodeNum* GetPrecedingNodeNumOf( const SwTxtNode& rTxtNode ) const;
+
+protected:
+ virtual SwNumberTreeNode * Create() const;
+
+ // --> OD 2006-04-26 #i64010#
+ virtual bool HasCountedChildren() const;
+ virtual bool IsCountedForNumbering() const;
+ // <--
+
+ // --> OD 2008-02-19 #refactorlists#
+ // method called before this tree node has been added to the list tree
+ virtual void PreAdd();
+ // method called at a child after this child has been removed from the list tree
+ virtual void PostRemove();
+ // <--
+private:
+ SwTxtNode * mpTxtNode;
+ SwNumRule * mpNumRule;
+
+ // --> OD 2006-03-07 #131436#
+ static void _UnregisterMeAndChildrenDueToRootDelete( SwNodeNum& rNodeNum );
+ // <--
+
+ SwNodeNum( const SwNodeNum& ); // no copy constructor
+ SwNodeNum& operator=( const SwNodeNum& ); // no assignment operator
+
+ virtual bool IsCountPhantoms() const;
+
+ virtual bool IsNotifiable() const;
+
+ virtual void NotifyNode();
+};
+
+#endif // _SW_NODE_NUM_HXX
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
new file mode 100644
index 000000000000..58c5f38a5696
--- /dev/null
+++ b/sw/inc/SwNumberTree.hxx
@@ -0,0 +1,767 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_NUMBER_TREE_HXX
+#define _SW_NUMBER_TREE_HXX
+
+#include <set>
+#include <vector>
+#include <tools/string.hxx>
+#include <swdllapi.h>
+#include <SwNumberTreeTypes.hxx>
+
+class SwNumberTreeNode;
+
+bool SwNumberTreeNodeLessThan (const SwNumberTreeNode * pA,
+ const SwNumberTreeNode * pB);
+
+struct compSwNumberTreeNodeLessThan
+{
+ bool operator()(const SwNumberTreeNode * pA,
+ const SwNumberTreeNode * pB) const
+ { return SwNumberTreeNodeLessThan(pA, pB); }
+};
+
+/**
+ A tree of numbered nodes.
+
+ Simple example:
+
+ <pre>
+ 1. kshdkjfs
+ 1.1. lskjf
+ 2. sdfjlksaf
+ 3. fkaöslk
+ 3.1. lfjlaskf
+ 3.2. jaslkjflsf
+ 3.2.1. hkljhkjhk
+
+ + R
+ + 1 kshdkjfs
+ | + 1 lskjf
+ + 2 sdfjlksaf
+ + 3 fkaöslk
+ + 1 lfjlaskf
+ + 2 jaslkjflsf
+ + 1 hkljhkjhk
+ </pre>
+
+ The root contains the nodes of the first level. Each node A of the
+ first level contains those nodes of the second level that have the
+ same first level number as A and so on for the subsidiary levels.
+
+ The numbering label of a node A is resolved by concatenating the
+ numbers of the nodes on the path from the root to A.
+
+ ------------------------------------------
+
+ Phantoms
+
+ A phantom is an auxiliary node that is used to emulate numberings
+ starting with nodes not at top level. The phantom contains the
+ number for the level but is not considered part of the numbering.
+
+ Constraint 1: A phantom is always the first child node.
+ Constraint 2: At each node there is at most one child that is a phantom.
+ Constraint 3: A phantom is the smallest of all numbering nodes.
+
+ Uncounted Phantoms
+
+ 0.1. dljflskjlasf
+ 5. ödsöfkaös
+ 5.1.
+
+ + R (nStart = 5)
+ + 0 (phantom, not counted)
+ | + 1 dljflskjlasf
+ + 5 ödsöfkaös
+ + 1
+
+ The phantom gets numbered with 0. The first non-phantom node gets
+ numbered with the start value.
+
+ -----------------------------------------
+
+ Counted Phantoms
+
+ 5.1. lgkjjgklg
+ 6. lkjfalskjflsaf
+ 6.1. ljdflaksjflkjasflkjsf
+
+ + R (nStart = 5)
+ + 5 (phantom, counted)
+ | + 1 lgkjjgklg
+ + 6 lkjfalskjflsaf
+ + 1 ljdflaksjflkjasflkjsf
+
+ The phantom gets numbered with the start value.
+*/
+class SW_DLLPUBLIC SwNumberTreeNode
+{
+protected:
+ typedef std::set<SwNumberTreeNode *, compSwNumberTreeNodeLessThan>
+ tSwNumberTreeChildren;
+
+public:
+ SwNumberTreeNode();
+
+ virtual ~SwNumberTreeNode();
+
+ /**
+ Add a child.
+
+ @param pChild child to add
+ @param nDepth depth in which to add the child
+ */
+ void AddChild( SwNumberTreeNode* pChild,
+ const int nDepth = 0 );
+
+ /**
+ Remove a child.
+
+ OD 2008-02-19 #refactorlists# - no longer virtual
+
+ @param pChild child to be removed
+ */
+ void RemoveChild( SwNumberTreeNode* pChild );
+
+ /**
+ Remove this child from the tree.
+ */
+ void RemoveMe();
+
+ /**
+ Returns the parent of this node.
+
+ @return the parent
+ */
+ inline SwNumberTreeNode* GetParent() const
+ {
+ return mpParent;
+ }
+
+ /**
+ Returns number of this node.
+
+ @param bValidate validate the number?
+
+ @return number of this node
+ */
+ SwNumberTree::tSwNumTreeNumber GetNumber( bool bValidate = true ) const;
+
+ // --> OD 2008-11-26 #158694#
+ bool IsContinueingPreviousSubTree() const;
+ // <--
+
+ /**
+ Returns level numbers of this node.
+
+ @return level numbers of this node
+ */
+ SwNumberTree::tNumberVector GetNumberVector() const;
+
+ /**
+ Return if numbering is restartet at this node.
+ */
+ virtual bool IsRestart() const = 0;
+
+ /**
+ Return start value.
+
+ @return start value
+ */
+ virtual SwNumberTree::tSwNumTreeNumber GetStartValue() const = 0;
+
+ /**
+ Return if this node is counted.
+
+ @retval true this node is counted
+ @retval false this node is NOT counted
+ */
+ virtual bool IsCounted() const;
+
+ /**
+ Return if this node is counted continuous.
+
+ @retval true This node is counted continuous.
+ @retval false else
+ */
+ virtual bool IsContinuous() const = 0;
+
+ /**
+ Return if a node is first non-phantom child of this node.
+
+ @param pNode the node to check
+
+ @retval true pNode is first child of this node
+ @retval false else
+ */
+ virtual bool IsFirst(const SwNumberTreeNode * pNode) const;
+
+ /**
+ Return if this node if the first non-phantom node in the tree.
+
+ @retval true this node is the first non-phantom node in the tree
+ @retval false else
+ */
+ virtual bool IsFirst() const;
+
+ /**
+ Return if this node is a phantom.
+
+ @retval true this node is a phantom
+ @retval false this node is NOT a phantom
+ */
+ bool IsPhantom() const;
+
+ /** set level of this node
+
+ OD 2008-03-13 #refactorlists#
+ precondition: node is already member of a list tree
+
+ @author OD
+ */
+ void SetLevelInListTree( const int nLevel );
+
+ /**
+ Return level of this node.
+
+ The level of this node is the length of the path from the root
+ to this node.
+
+ @return the level of this node
+ */
+ int GetLevelInListTree() const;
+
+ /**
+ Returns if this node is less than another node.
+
+ @param rTreeNode node to compare with
+
+ @attention A phantom node is considered the least element with
+ respect to lessThan.
+
+ @retval true this node is less than rTreeNode
+ @retval false else
+ */
+ virtual bool LessThan(const SwNumberTreeNode & rTreeNode) const;
+
+ /**
+ Invalidate this node and all its descendants.
+
+ All iterators holding the last valid node in the according list
+ of childs are set to the end of this list, thereby stating all
+ children in the list are invalid.
+ OD 2007-10-26 #i83479# - made public
+ */
+ void InvalidateTree() const;
+
+ /**
+ Notifies all invalid children of this node.
+ OD 2007-10-26 #i83479# - made public
+ */
+ void NotifyInvalidChildren();
+
+ /**
+ Notifies the node.
+
+ Calls Invalidate(this) on parent.
+ */
+ void InvalidateMe();
+
+ /**
+ Validate the tree.
+
+ Validates all nodes in this subtree.
+ */
+ void ValidateTree();
+
+ /**
+ Validates this node.
+
+ Calls Validate(this) on parent.
+ */
+ void ValidateMe();
+
+ /**
+ Notifies all invalid siblings of this node.
+ */
+ void NotifyInvalidSiblings();
+
+ /** notification of all nodes in the list tree on certain list level
+
+ OD 2008-04-17 #refactorlists#
+ */
+ void NotifyNodesOnListLevel( const int nListLevel );
+
+ /** Invalidation and notification of complete numbering tree
+
+ OD 2006-04-26 #i64010#
+ Usage: on <IsCounted()> state change its needed to invalidate the
+ complete numbering tree due to wide influence of this change.
+ */
+ inline void InvalidateAndNotifyTree()
+ {
+ if ( GetRoot() )
+ {
+ GetRoot()->InvalidateTree();
+ GetRoot()->Notify();
+ }
+ }
+
+ /**
+ Returns the greatest descendant of the root that is smaller than
+ this node, aka the predecessor of this node.
+
+ @return the predecessor
+ */
+ SwNumberTreeNode* GetPred( bool bSibling = false ) const;
+
+ /** determines the node, which is preceding the node
+
+ OD 2007-09-06 #i81002#
+ The search for the preceding node is performed for the tree below the
+ <this> node. To search the complete tree, the method has been called for
+ the root of the tree.
+
+ @author OD
+ */
+ const SwNumberTreeNode* GetPrecedingNodeOf( const SwNumberTreeNode& rNode ) const;
+
+// /**
+// Returns a string representation of this node.
+
+// @return the string representation of this node
+// */
+// virtual String ToString() const = 0;
+
+// /**
+// Print this subtree.
+
+// @param o output stream to direct output to
+// @param rIndent additional indent for the children of this node
+// @param rMyIndent indent to use for this node
+// @param nDepth number of levels to print (-1 means all levels)
+
+// @return output stream after output of this subtree
+// */
+// String print(const String & rIndent = String(" ",
+// RTL_TEXTENCODING_ASCII_US),
+// const String & rMyIndent = String(" ",
+// RTL_TEXTENCODING_ASCII_US),
+// int nDepth = -1) const;
+
+#ifdef DBG_UTIL
+ static unsigned long GetInstances();
+ unsigned long GetSerial();
+#endif
+
+#ifdef __SW_NUMBER_TREE_SANITY_CHECK
+ /**
+ Sanity check.
+
+ @param bRecursive descend to children
+
+ @retval true the structure of this node is sane
+ @retval false else
+ */
+ bool IsSane(bool bRecursive) const;
+#endif // __SW_NUMBER_TREE_SANITY_CHECK
+
+protected:
+ /**
+ the children
+ */
+ tSwNumberTreeChildren mChildren;
+
+ /**
+ Returns the root node of the tree this node is part of.
+
+ Important note: method call <GetRoot()->GetRoot()> returns NULL.
+
+ @return the root
+ */
+ SwNumberTreeNode* GetRoot() const;
+
+ /**
+ Return if the notification is not disabled on global conditions
+
+ @retval true Notification enabled in general.
+ @retval false else
+ */
+ virtual bool IsNotificationEnabled() const = 0;
+
+ /**
+ Returns how many children this node has got.
+
+ @return number of children
+ */
+ tSwNumberTreeChildren::size_type GetChildCount() const;
+
+ // --> OD 2006-04-26 #i64010# - made pure virtual
+ virtual bool HasCountedChildren() const = 0;
+ // <--
+
+ // --> OD 2006-04-26 #i64010#
+ virtual bool IsCountedForNumbering() const = 0;
+ // <--
+
+ // --> OD 2008-02-19 #refactorlists#
+ // method called before this tree node has been added to the list tree
+ virtual void PreAdd() = 0;
+ // method called after this tree node has been removed from the list tree
+ virtual void PostRemove() = 0;
+ // <--
+
+#ifdef __SW_NUMBER_TREE_SANITY_CHECK
+ /**
+ Sanity check with loop detection.
+
+ @param bRecursive descend to children
+ @param rParents vector for recording path
+
+ @retval true this node is sane
+ @retval false else */
+ virtual bool IsSane
+ (bool bRecursive, std::vector<const SwNumberTreeNode *> rParents) const;
+#endif // __SW_NUMBER_TREE_SANITY_CHECK
+
+ /**
+ the parent node
+ */
+ SwNumberTreeNode * mpParent;
+
+ /**
+ the number of the node
+ */
+ mutable SwNumberTree::tSwNumTreeNumber mnNumber;
+
+ // --> OD 2008-11-26 #158694#
+ // boolean indicating, that a node of a not counted parent node is continueing
+ // the numbering of parent's previous node sub tree.
+ // Example:
+ // 1. kshdkjfs
+ // 1.1. lskjf
+ // sdfjlksaf <-- not counted parent node
+ // 1.2. lfjlaskf <-- <mbContinueingPreviousSubTree = true>
+ mutable bool mbContinueingPreviousSubTree;
+ // <--
+
+ /**
+ true this node is a phantom
+ false this node is NOT a phantom
+ */
+ bool mbPhantom;
+
+ /**
+ Iterator to the last valid element. All children that are less
+ than or equal to the referenced child are valid. All children
+ greater than the referenced child are invalid.
+ */
+ mutable tSwNumberTreeChildren::iterator mItLastValid;
+
+#ifdef DBG_UTIL
+ /**
+ Counter for the number of created instances.
+ */
+ static unsigned long nInstances;
+
+ /**
+ Serial number.
+ */
+ unsigned long mnSerial;
+#endif
+
+ SwNumberTreeNode(const SwNumberTreeNode& );
+ SwNumberTreeNode& operator=( const SwNumberTreeNode& );
+
+ /**
+ Calls _GetNumberVector on parent and adds number of this node
+ at the end.
+
+ @param rVector return value
+ @param bValidate validate the number?
+ */
+ void _GetNumberVector( SwNumberTree::tNumberVector& rVector,
+ bool bValidate = true ) const;
+
+ /**
+ Invalidates a child.
+
+ Calls SetLastValid for the preceeding sibling of the child and
+ notifies all invalid children.
+
+ @param pChild the child to invalidate
+ */
+ void Invalidate( SwNumberTreeNode * pChild );
+
+ /** Invalidation of all children
+
+ OD 2005-10-19 #126009#
+ Usage: on <IsCounted()> state change the children have to be invalidated
+ */
+ inline void InvalidateChildren()
+ {
+ SetLastValid( mChildren.end() );
+ }
+
+ /** Invalidation of parent node, if its not counted.
+
+ OD 2005-10-19 #126009#
+ Usage: on <IsCounted()> state change the parent have to be invalidated
+ */
+ inline void InvalidateNotCountedParent()
+ {
+ if ( GetParent() && !GetParent()->IsCountedForNumbering() )
+ {
+ GetParent()->InvalidateMe();
+ }
+ }
+
+ /**
+ Set the last valid child of this node.
+
+ @param aItLastValid iterator pointing to the new last valid child
+ @param bValidating - true always set the last valid node to
+ aItLastValid
+ - false only set if aItLastValid is preceeding
+ the current last valid node
+ */
+ void SetLastValid(tSwNumberTreeChildren::iterator aItLastValid,
+ bool bValidating = false) const;
+
+ /**
+ Set this node as last valid child of its parent.
+
+ @param bValidation see aboce
+ */
+ void SetLastValid(bool bValidating) const;
+
+ /**
+ Return if this node is notifiable.
+
+ @attention If a not is not notifiable a notify request is *not*
+ forwarded to its descendants.
+
+ @retval true This node is notifiable.
+ @retval false else
+ */
+ virtual bool IsNotifiable() const = 0;
+
+ /**
+ Notifies the node.
+
+ Called when the number of the node got invalid.
+ */
+ virtual void NotifyNode() = 0;
+
+ /**
+ Notifies this node (NotifyNode) and all descendants.
+ */
+ void Notify();
+
+ /** Notification of parent node siblings, if its not counted.
+
+ OD 2005-10-19 #126009#
+ Usage: on <IsCounted()> state change the parent node and its siblings
+ have to be notified.
+ */
+ inline void NotifyNotCountedParentSiblings()
+ {
+ if ( GetParent() && !GetParent()->IsCountedForNumbering() )
+ {
+ GetParent()->NotifyInvalidSiblings();
+ }
+ }
+
+ /** notification of children nodes on certain depth
+
+ OD 2008-04-17 #refactorlists#
+
+ @author OD
+ */
+ void NotifyChildrenOnDepth( const int nDepth );
+
+ /**
+ Returns if a child A this node is valid.
+
+ A is valid if aItLastValid in parent refers to a node
+ greater than of equal to A.
+
+ @param pChild child to be tested
+
+ @retval true this node is valid
+ @retval false this node is NOT valid
+ */
+ bool IsValid(const SwNumberTreeNode * pChild) const;
+
+ /**
+ Returns if this node is valid.
+
+ @retval true this node is valid
+ @retval false else
+ */
+ bool IsValid() const;
+
+ /**
+ Validates a child.
+
+ @param pNode child to be validated
+
+ @attention All invalid children preceding pNode are validated, too.
+ */
+ void Validate(const SwNumberTreeNode * pNode) const;
+
+ /**
+ Validates a child using hierarchical numbering.
+
+ @param pNode child to be validated
+
+ @attention All invalid children preceding pNode are validated, too.
+ */
+ void ValidateHierarchical(const SwNumberTreeNode * pNode) const;
+
+ /**
+ Validates a child using continuous numbering.
+
+ @param pNode child to be validated
+
+ @attention All invalid children preceding pNode are validated, too.
+ */
+ void ValidateContinuous(const SwNumberTreeNode * pNode) const;
+
+ /**
+ Creates a new node of the same class.
+
+ @return the new node
+ */
+ virtual SwNumberTreeNode * Create() const = 0;
+
+ /**
+ Creates a phantom.
+
+ @return the created phantom
+ */
+ SwNumberTreeNode * CreatePhantom();
+
+ /**
+ Set if this node is a phantom.
+
+ @param bPhantom - true this node is a phantom
+ - false this node is a phantom
+ */
+ void SetPhantom(bool bPhantom = true);
+
+ /**
+ Return if phantoms are counted.
+
+ OD 2008-02-19 #refactorlists# - pure virtual now
+
+ @retval true phantoms are counted
+ @retval false else
+ */
+ virtual bool IsCountPhantoms() const = 0;
+
+ /**
+ Return if all descendants of this node are phantoms.
+
+ @retval true all descendants are phantoms
+ @retval false else
+ */
+ bool HasOnlyPhantoms() const;
+
+ // --> OD 2005-10-27 #126009#
+ bool HasPhantomCountedParent() const;
+ // <--
+
+ /**
+ HB, OD : return node, if it isn't a phantom, otherwise return first
+ non-phantom descendant.
+ Returns the first child of this node that is NOT a phantom.
+
+ @return the first non phantom child
+ */
+ SwNumberTreeNode* GetFirstNonPhantomChild();
+
+ /**
+ Removes recursively phantoms that have no children.
+
+ The resulting tree has no phantoms that either have no children or
+ whose descendancy consist entirely of phantoms.
+ */
+ void ClearObsoletePhantoms();
+
+ tSwNumberTreeChildren::iterator GetIterator(const SwNumberTreeNode * pChild) const;
+
+ /**
+ Moves all children to a given destination node.
+
+ @param pDest the destination node
+ */
+ void MoveChildren(SwNumberTreeNode * pDest);
+
+ /** Moves all children of this node that are greater than a given node
+ to the destination node.
+
+ OD 2005-10-14 #125991#
+ distinguish between node for comparing, whose children are greater,
+ and the destination node.
+
+ @param _rCompareNode
+ input parameter - reference to the node, which is used to determine
+ the greater children
+
+ @param _rDestNode
+ input parameter - reference to the node, which is the destination for
+ the greater children
+ */
+ void MoveGreaterChildren( SwNumberTreeNode& _rCompareNode,
+ SwNumberTreeNode& _rDestNode );
+
+ /**
+ Returns the last descendant of a node, if it has children.
+
+ @return last descendant of the node
+ */
+ SwNumberTreeNode* GetLastDescendant() const;
+
+};
+
+/**
+ Functor. Checks if a certain node is less than the functor's member.
+ */
+struct SwNumberTreeNodeIsLessThan
+{
+ const SwNumberTreeNode * pNode;
+
+ SwNumberTreeNodeIsLessThan(const SwNumberTreeNode * _pNode)
+ : pNode(_pNode) {}
+
+ bool operator()(const SwNumberTreeNode * _pNode) const
+ { return SwNumberTreeNodeLessThan(_pNode, pNode); }
+};
+#endif // _SW_NUMBER_TREE_HXX
diff --git a/sw/inc/SwNumberTreeTypes.hxx b/sw/inc/SwNumberTreeTypes.hxx
new file mode 100644
index 000000000000..39e5acd776cc
--- /dev/null
+++ b/sw/inc/SwNumberTreeTypes.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_NUMBER_TREE_TYPES_HXX
+#define _SW_NUMBER_TREE_TYPES_HXX
+
+#include <vector>
+
+namespace SwNumberTree
+{
+ typedef long tSwNumTreeNumber;
+ typedef std::vector<tSwNumTreeNumber> tNumberVector;
+}
+
+#endif // _SW_NUMBER_TREE_TYPES_HXX
diff --git a/sw/inc/SwRewriter.hxx b/sw/inc/SwRewriter.hxx
new file mode 100644
index 000000000000..8d2b9bd04bbe
--- /dev/null
+++ b/sw/inc/SwRewriter.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_REWRITER_HXX
+#define _SW_REWRITER_HXX
+
+#include <vector>
+#include <tools/string.hxx>
+
+typedef std::pair<String, String> SwRewriteRule;
+
+class SwRewriter
+{
+ std::vector<SwRewriteRule> mRules;
+
+public:
+ SwRewriter();
+ SwRewriter(const SwRewriter & rSrc);
+ ~SwRewriter();
+
+ void AddRule(const String & rWhat, const String & rWith);
+
+ String Apply(const String & rStr) const;
+};
+
+#endif // _SW_REWRITER_HXX
diff --git a/sw/inc/SwSmartTagMgr.hxx b/sw/inc/SwSmartTagMgr.hxx
new file mode 100644
index 000000000000..1a2ecb9c9fd6
--- /dev/null
+++ b/sw/inc/SwSmartTagMgr.hxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWSMARTTAGMGR_HXX
+#define _SWSMARTTAGMGR_HXX
+
+#include <svx/SmartTagMgr.hxx>
+
+
+/*************************************************************************
+ * class SwSmartTagMgr
+ *
+ * Wrapper for the svx SmartTagMgr
+ *************************************************************************/
+
+class SwSmartTagMgr : public SmartTagMgr
+{
+private:
+ static SwSmartTagMgr* mpTheSwSmartTagMgr;
+
+ SwSmartTagMgr( const rtl::OUString& rModuleName );
+ virtual ~SwSmartTagMgr();
+
+public:
+ static SwSmartTagMgr& Get();
+
+ // ::com::sun::star::util::XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::util::XChangesListener
+ virtual void SAL_CALL changesOccurred( const ::com::sun::star::util::ChangesEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+};
+
+/*
+namespace SwSmartTagMgr
+{
+ SmartTagMgr& Get();
+}
+*/
+
+#endif
diff --git a/sw/inc/SwStyleNameMapper.hxx b/sw/inc/SwStyleNameMapper.hxx
new file mode 100644
index 000000000000..688b066bc75a
--- /dev/null
+++ b/sw/inc/SwStyleNameMapper.hxx
@@ -0,0 +1,204 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWSTYLENAMEMAPPER_HXX
+#define _SWSTYLENAMEMAPPER_HXX
+
+#include <sal/types.h>
+#include <tools/string.hxx>
+#include <SwGetPoolIdFromName.hxx>
+#include "swdllapi.h"
+
+#ifndef INCLUDED_HASH_MAP
+#include <hash_map>
+#define INCLUDED_HASH_MAP
+#endif
+#include <stringhash.hxx>
+
+/* This class holds all data about the names of styles used in the user
+ * interface (UI names...these are localised into different languages).
+ * These UI names are loaded from the resource files on demand.
+ *
+ * It also holds all information about the 'Programmatic' names of styles
+ * which remain static (and are hardcoded in the corresponding cxx file)
+ * for all languages.
+ *
+ * This class also provides static functions which can be used for the
+ * following conversions:
+ *
+ * 1. Programmatic Name -> UI Name
+ * 2. Programmatic Name -> Pool ID
+ * 3. UI Name -> Programmatic Name
+ * 4. UI Name -> Pool ID
+ * 5. Pool ID -> UI Name
+ * 6. Pool ID -> Programmatic Name
+ *
+ * The relationship of these tables to the style families is as follows:
+ *
+ * 1. Paragraph contains the Text, Lists, Extra, Register, Doc and HTML
+ * name arrays.
+ * 2. Character contains the ChrFmt and HTMLChrFmt name arrays.
+ * 3. Page contains the PageDesc name array.
+ * 4. Frame contains the FrmFmt name array.
+ * 5. Numbering Rule contains the NumRule name array.
+ */
+
+/*
+ * There is a further complication that came to light later. If someone enters
+ * a user-defined style name which is the same as a programmatic name, this
+ * name clash must be handled.
+ *
+ * Therefore, when there is a danger of a nameclash, the boolean bDisambiguate
+ * must be set to true in the SwStyleNameMapper call (it defaults to false).
+ * This will cause the following to happen:
+ *
+ * If the UI style name either equals a programmatic name or already ends
+ * with " (user)", then it must append " (user)" to the end.
+ *
+ * When a programmatic name is being converted to a UI name, if it ends in
+ * " (user)", we simply remove it.
+ */
+
+class SvStringsDtor;
+class String;
+struct SwTableEntry;
+
+
+typedef ::std::hash_map < const String*, sal_uInt16, StringHash, StringEq > NameToIdHash;
+
+class SwStyleNameMapper
+{
+ friend void _InitCore();
+ friend void _FinitCore();
+
+protected:
+ // UI Name tables
+ static SvStringsDtor *pTextUINameArray,
+ *pListsUINameArray,
+ *pExtraUINameArray,
+ *pRegisterUINameArray,
+ *pDocUINameArray,
+ *pHTMLUINameArray,
+ *pFrmFmtUINameArray,
+ *pChrFmtUINameArray,
+ *pHTMLChrFmtUINameArray,
+ *pPageDescUINameArray,
+ *pNumRuleUINameArray,
+ // Programmatic Name tables
+ *pTextProgNameArray,
+ *pListsProgNameArray,
+ *pExtraProgNameArray,
+ *pRegisterProgNameArray,
+ *pDocProgNameArray,
+ *pHTMLProgNameArray,
+ *pFrmFmtProgNameArray,
+ *pChrFmtProgNameArray,
+ *pHTMLChrFmtProgNameArray,
+ *pPageDescProgNameArray,
+ *pNumRuleProgNameArray;
+
+ static NameToIdHash *pParaUIMap,
+ *pCharUIMap,
+ *pPageUIMap,
+ *pFrameUIMap,
+ *pNumRuleUIMap,
+
+ *pParaProgMap,
+ *pCharProgMap,
+ *pPageProgMap,
+ *pFrameProgMap,
+ *pNumRuleProgMap;
+
+ static SvStringsDtor* NewUINameArray( SvStringsDtor*&,
+ sal_uInt16 nStt,
+ sal_uInt16 nEnd );
+
+ static SvStringsDtor* NewProgNameArray( SvStringsDtor*&,
+ const SwTableEntry *pTable,
+ sal_uInt8 nCount);
+
+ static void fillNameFromId ( sal_uInt16 nId, String &rName, sal_Bool bProgName );
+ static const String& getNameFromId ( sal_uInt16 nId, const String &rName, sal_Bool bProgName );
+ static const NameToIdHash& getHashTable ( SwGetPoolIdFromName, sal_Bool bProgName );
+ static sal_Bool SuffixIsUser ( const String & rString );
+ static void CheckSuffixAndDelete ( String & rString );
+
+public:
+ // This gets the UI Name from the programmatic name
+ static const String& GetUIName ( const String& rName, SwGetPoolIdFromName );
+ static void FillUIName ( const String& rName, String& rFillName, SwGetPoolIdFromName, sal_Bool bDisambiguate = sal_False );
+
+ // Get the programmatic Name from the UI name
+ static const String& GetProgName ( const String& rName, SwGetPoolIdFromName );
+ static void FillProgName ( const String& rName, String& rFillName, SwGetPoolIdFromName, sal_Bool bDisambiguate = sal_False );
+
+ // This gets the UI Name from the Pool ID
+ SW_DLLPUBLIC static void FillUIName ( sal_uInt16 nId, String& rFillName );
+ SW_DLLPUBLIC static const String& GetUIName ( sal_uInt16 nId, const String& rName );
+
+ // This gets the programmatic Name from the Pool ID
+ static void FillProgName( sal_uInt16 nId, String& rFillName );
+ SW_DLLPUBLIC static const String& GetProgName ( sal_uInt16 nId, const String& rName );
+
+ // This gets the PoolId from the UI Name
+ SW_DLLPUBLIC static sal_uInt16 GetPoolIdFromUIName( const String& rName, SwGetPoolIdFromName );
+
+ // Get the Pool ID from the programmatic name
+ static sal_uInt16 GetPoolIdFromProgName( const String& rName, SwGetPoolIdFromName );
+
+ // used to convert the 4 special ExtraProg/UINames for
+ // RES_POOLCOLL_LABEL_DRAWING, RES_POOLCOLL_LABEL_ABB,
+ // RES_POOLCOLL_LABEL_TABLE, RES_POOLCOLL_LABEL_FRAME
+ // forth and back.
+ // Non-matching names remain unchanged.
+ SW_DLLPUBLIC static const String GetSpecialExtraProgName( const String& rExtraUIName );
+ static const String GetSpecialExtraUIName( const String& rExtraProgName );
+
+ static const SvStringsDtor& GetTextUINameArray();
+ static const SvStringsDtor& GetListsUINameArray();
+ static const SvStringsDtor& GetExtraUINameArray();
+ static const SvStringsDtor& GetRegisterUINameArray();
+ static const SvStringsDtor& GetDocUINameArray();
+ static const SvStringsDtor& GetHTMLUINameArray();
+ static const SvStringsDtor& GetFrmFmtUINameArray();
+ static const SvStringsDtor& GetChrFmtUINameArray();
+ static const SvStringsDtor& GetHTMLChrFmtUINameArray();
+ static const SvStringsDtor& GetPageDescUINameArray();
+ static const SvStringsDtor& GetNumRuleUINameArray();
+
+ static const SvStringsDtor& GetTextProgNameArray();
+ static const SvStringsDtor& GetListsProgNameArray();
+ static const SvStringsDtor& GetExtraProgNameArray();
+ static const SvStringsDtor& GetRegisterProgNameArray();
+ static const SvStringsDtor& GetDocProgNameArray();
+ static const SvStringsDtor& GetHTMLProgNameArray();
+ static const SvStringsDtor& GetFrmFmtProgNameArray();
+ static const SvStringsDtor& GetChrFmtProgNameArray();
+ static const SvStringsDtor& GetHTMLChrFmtProgNameArray();
+ static const SvStringsDtor& GetPageDescProgNameArray();
+ static const SvStringsDtor& GetNumRuleProgNameArray();
+};
+#endif // _NAME_MAPPER_HXX
diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx
new file mode 100644
index 000000000000..33f5cfd85e49
--- /dev/null
+++ b/sw/inc/SwUndoField.hxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_UNDO_FIELD_HXX
+#define _SW_UNDO_FIELD_HXX
+
+#include <undobj.hxx>
+
+class SwDoc;
+class SwField;
+class SwMsgPoolItem;
+
+class SwUndoField : public SwUndo
+{
+ ULONG nNodeIndex;
+ xub_StrLen nOffset;
+
+protected:
+ SwDoc * pDoc;
+ SwPosition GetPosition();
+
+public:
+ SwUndoField(const SwPosition & rPos, SwUndoId nId = UNDO_FIELD );
+ virtual ~SwUndoField();
+};
+
+class SwUndoFieldFromDoc : public SwUndoField
+{
+ SwField * pOldField, * pNewField;
+ SwMsgPoolItem * pHnt;
+ BOOL bUpdate;
+
+public:
+ SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & aOldField,
+ const SwField & aNewField,
+ SwMsgPoolItem * pHnt, BOOL bUpdate,
+ SwUndoId nId = UNDO_FIELD );
+ virtual ~SwUndoFieldFromDoc();
+
+ virtual void Undo(SwUndoIter & rIt);
+ virtual void Redo(SwUndoIter & rIt);
+ virtual void Repeat(SwUndoIter & rIt);
+};
+
+class SwUndoFieldFromAPI : public SwUndoField
+{
+ com::sun::star::uno::Any aOldVal, aNewVal;
+ USHORT nWhich;
+
+public:
+ SwUndoFieldFromAPI(const SwPosition & rPos,
+ const com::sun::star::uno::Any & rOldVal,
+ const com::sun::star::uno::Any & rNewVal,
+ USHORT nWhich);
+ virtual ~SwUndoFieldFromAPI();
+
+ virtual void Undo(SwUndoIter & rIt);
+ virtual void Redo(SwUndoIter & rIt);
+ virtual void Repeat(SwUndoIter & rIt);
+};
+
+#endif // _SW_UNDO_FIELD_HXX
diff --git a/sw/inc/SwUndoFmt.hxx b/sw/inc/SwUndoFmt.hxx
new file mode 100644
index 000000000000..ea23724fa817
--- /dev/null
+++ b/sw/inc/SwUndoFmt.hxx
@@ -0,0 +1,250 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_UNDO_TXT_FMT_COLL_HXX
+#define _SW_UNDO_TXT_FMT_COLL_HXX
+
+#include <undobj.hxx>
+#include <swundo.hxx>
+
+class SwDoc;
+class SwTxtFmtColl;
+class String;
+class SwRewriter;
+class SfxItemSet;
+
+class SwUndoFmtCreate : public SwUndo
+{
+protected:
+ SwFmt * pNew;
+ String sDerivedFrom;
+ SwDoc * pDoc;
+ mutable String sNewName;
+ SfxItemSet * pNewSet;
+ USHORT nId; // FmtId related
+ BOOL bAuto;
+
+public:
+
+ SwUndoFmtCreate(SwUndoId nUndoId, SwFmt * pNew, SwFmt * pDerivedFrom,
+ SwDoc * pDoc);
+ virtual ~SwUndoFmtCreate();
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+
+ virtual SwRewriter GetRewriter() const;
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom) = 0;
+ virtual void Delete() = 0;
+ virtual SwFmt * Find(const String & rName) const = 0;
+};
+
+class SwUndoFmtDelete : public SwUndo
+{
+protected:
+ String sDerivedFrom;
+ SwDoc * pDoc;
+ String sOldName;
+ SfxItemSet aOldSet;
+ USHORT nId; // FmtId related
+ BOOL bAuto;
+
+public:
+ SwUndoFmtDelete(SwUndoId nUndoId, SwFmt * pOld, SwDoc * pDoc);
+ ~SwUndoFmtDelete();
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+
+ virtual SwRewriter GetRewriter() const;
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom) = 0;
+ virtual void Delete(SwFmt * pFmt) = 0;
+ virtual SwFmt * Find(const String & rName) const = 0;
+};
+
+class SwUndoRenameFmt : public SwUndo
+{
+protected:
+ String sOldName, sNewName;
+ SwDoc * pDoc;
+// SwUndoId nId;
+
+public:
+ SwUndoRenameFmt(SwUndoId nUndoId, const String & sOldName,
+ const String & sNewName,
+ SwDoc * pDoc);
+ ~SwUndoRenameFmt();
+
+ void Undo(SwUndoIter & rIter);
+ void Redo(SwUndoIter & rIter);
+
+ SwRewriter GetRewriter() const;
+
+ virtual SwFmt * Find(const String & rName) const = 0;
+};
+
+class SwUndoTxtFmtCollCreate : public SwUndoFmtCreate
+{
+public:
+ SwUndoTxtFmtCollCreate(SwTxtFmtColl * pNew, SwTxtFmtColl * pDerivedFrom,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete();
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoTxtFmtCollDelete : public SwUndoFmtDelete
+{
+public:
+ SwUndoTxtFmtCollDelete(SwTxtFmtColl * pOld, SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete(SwFmt * pFmt);
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoRenameFmtColl : public SwUndoRenameFmt
+{
+public:
+ SwUndoRenameFmtColl(const String & sOldName,
+ const String & sNewName,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoCharFmtCreate : public SwUndoFmtCreate
+{
+public:
+ SwUndoCharFmtCreate(SwCharFmt * pNew, SwCharFmt * pDerivedFrom,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete();
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoCharFmtDelete : public SwUndoFmtDelete
+{
+public:
+ SwUndoCharFmtDelete(SwCharFmt * pOld, SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete(SwFmt * pFmt);
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoRenameCharFmt : public SwUndoRenameFmt
+{
+public:
+ SwUndoRenameCharFmt(const String & sOldName,
+ const String & sNewName,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoFrmFmtCreate : public SwUndoFmtCreate
+{
+ BOOL bAuto;
+
+public:
+ SwUndoFrmFmtCreate(SwFrmFmt * pNew, SwFrmFmt * pDerivedFrom,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete();
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoFrmFmtDelete : public SwUndoFmtDelete
+{
+public:
+ SwUndoFrmFmtDelete(SwFrmFmt * pOld, SwDoc * pDoc);
+
+ virtual SwFmt * Create(SwFmt * pDerivedFrom);
+ virtual void Delete(SwFmt * pFmt);
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoRenameFrmFmt : public SwUndoRenameFmt
+{
+public:
+ SwUndoRenameFrmFmt(const String & sOldName,
+ const String & sNewName,
+ SwDoc * pDoc);
+
+ virtual SwFmt * Find(const String & rName) const;
+};
+
+class SwUndoNumruleCreate : public SwUndo
+{
+ const SwNumRule * pNew;
+ mutable SwNumRule aNew;
+ SwDoc * pDoc;
+ mutable bool bInitialized;
+
+public:
+ SwUndoNumruleCreate(const SwNumRule * pNew, SwDoc * pDoc);
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+
+ SwRewriter GetRewriter() const;
+};
+
+class SwUndoNumruleDelete : public SwUndo
+{
+ SwNumRule aOld;
+ SwDoc * pDoc;
+
+public:
+ SwUndoNumruleDelete(const SwNumRule & aRule, SwDoc * pDoc);
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+
+ SwRewriter GetRewriter() const;
+};
+
+class SwUndoNumruleRename : public SwUndo
+{
+ String aOldName, aNewName;
+ SwDoc * pDoc;
+
+ public:
+ SwUndoNumruleRename(const String & aOldName, const String & aNewName,
+ SwDoc * pDoc);
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+
+ SwRewriter GetRewriter() const;
+};
+#endif // _SW_UNDO_TXT_FMT_COLL_HXX
diff --git a/sw/inc/SwUndoPageDesc.hxx b/sw/inc/SwUndoPageDesc.hxx
new file mode 100644
index 000000000000..84a734b57937
--- /dev/null
+++ b/sw/inc/SwUndoPageDesc.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_UNDO_PAGE_DESC_HXX
+#define _SW_UNDO_PAGE_DESC_HXX
+
+#include <undobj.hxx>
+#include <pagedesc.hxx>
+
+class SwDoc;
+class SwPageDesc;
+
+
+class SwUndoPageDesc : public SwUndo
+{
+ SwPageDescExt aOld, aNew;
+ SwDoc * pDoc;
+ bool bExchange;
+
+ // To avoid duplication of (header/footer)content nodes for simple page desc changes
+ void ExchangeContentNodes( SwPageDesc& rSource, SwPageDesc &rDest );
+
+public:
+ SwUndoPageDesc(const SwPageDesc & aOld, const SwPageDesc & aNew,
+ SwDoc * pDoc);
+ virtual ~SwUndoPageDesc();
+
+ virtual void Undo(SwUndoIter & rIt);
+ virtual void Redo(SwUndoIter & rIt);
+ virtual void Repeat(SwUndoIter & rIt);
+
+ virtual SwRewriter GetRewriter() const;
+};
+
+class SwUndoPageDescCreate : public SwUndo
+{
+ const SwPageDesc * pDesc; // #116530#
+ SwPageDescExt aNew;
+ SwDoc * pDoc;
+
+public:
+ SwUndoPageDescCreate(const SwPageDesc * pNew, SwDoc * pDoc); // #116530#
+ virtual ~SwUndoPageDescCreate();
+
+ virtual void Undo(SwUndoIter & rIt);
+ virtual void Redo(SwUndoIter & rIt);
+ virtual void Repeat(SwUndoIter & rIt);
+
+ virtual SwRewriter GetRewriter() const;
+};
+
+class SwUndoPageDescDelete : public SwUndo
+{
+ SwPageDescExt aOld;
+ SwDoc * pDoc;
+
+public:
+ SwUndoPageDescDelete(const SwPageDesc & aOld, SwDoc * pDoc);
+ virtual ~SwUndoPageDescDelete();
+
+ virtual void Undo(SwUndoIter & rIt);
+ virtual void Redo(SwUndoIter & rIt);
+ virtual void Repeat(SwUndoIter & rIt);
+
+ virtual SwRewriter GetRewriter() const;
+};
+#endif // _SW_UNDO_PAGE_DESC_CHANGE_HXX
diff --git a/sw/inc/SwUndoTOXChange.hxx b/sw/inc/SwUndoTOXChange.hxx
new file mode 100644
index 000000000000..36498fec9643
--- /dev/null
+++ b/sw/inc/SwUndoTOXChange.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_UNDO_TOX_CHANGE_HXX
+#define _SW_UNDO_TOX_CHANGE_HXX
+#include <undobj.hxx>
+#include <tox.hxx>
+
+class SwUndoTOXChange : public SwUndo
+{
+ SwTOXBase * pTOX, aOld, aNew;
+
+ void UpdateTOXBaseSection();
+
+public:
+ SwUndoTOXChange(SwTOXBase * pTOX, const SwTOXBase & rNew);
+ virtual ~SwUndoTOXChange();
+
+ virtual void Undo(SwUndoIter & rIter);
+ virtual void Redo(SwUndoIter & rIter);
+ virtual void Repeat(SwUndoIter & rIter);
+};
+
+#endif //_SW_UNDO_TOX_CHANGE_HXX
diff --git a/sw/inc/SwXMLSectionList.hxx b/sw/inc/SwXMLSectionList.hxx
new file mode 100644
index 000000000000..ea3aff8b2ebd
--- /dev/null
+++ b/sw/inc/SwXMLSectionList.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_XMLSECTIONLIST_HXX
+#define _SW_XMLSECTIONLIST_HXX
+
+#include <xmloff/xmlictxt.hxx>
+#include <xmloff/xmlimp.hxx>
+
+class SvStrings;
+
+class SwXMLSectionList : public SvXMLImport
+{
+protected:
+ // This method is called after the namespace map has been updated, but
+ // before a context for the current element has been pushed.
+ virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+public:
+ SvStrings & rSectionList;
+
+ // #110680#
+ SwXMLSectionList(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ SvStrings & rNewSectionList );
+
+ virtual ~SwXMLSectionList ( )
+ throw();
+};
+
+class SvXMLSectionListContext : public SvXMLImportContext
+{
+private:
+ SwXMLSectionList & rLocalRef;
+public:
+ SvXMLSectionListContext ( SwXMLSectionList& rImport,
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+ ~SvXMLSectionListContext ( void );
+};
+
+class SvXMLIgnoreSectionListContext : public SvXMLImportContext
+{
+private:
+ SwXMLSectionList & rLocalRef;
+public:
+ SvXMLIgnoreSectionListContext ( SwXMLSectionList& rImport,
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+ ~SvXMLIgnoreSectionListContext ( void );
+};
+#endif
diff --git a/sw/inc/TextCursorHelper.hxx b/sw/inc/TextCursorHelper.hxx
new file mode 100644
index 000000000000..cd7e185f3c4c
--- /dev/null
+++ b/sw/inc/TextCursorHelper.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_TEXTCURSORHELPER_HXX
+#define _SW_TEXTCURSORHELPER_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+class SwDoc;
+class SwPaM;
+
+class OTextCursorHelper : public ::cppu::ImplHelper1< ::com::sun::star::lang::XUnoTunnel>
+{
+public:
+
+ OTextCursorHelper(){}
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual const SwPaM* GetPaM() const = 0;
+ virtual SwPaM* GetPaM() = 0;
+ virtual const SwDoc* GetDoc() const = 0;
+ virtual SwDoc* GetDoc() = 0;
+};
+
+#endif // _SW_TEXTCURSORHELPER_HXX
+
+
diff --git a/sw/inc/access.hrc b/sw/inc/access.hrc
new file mode 100644
index 000000000000..b6c6bb30086e
--- /dev/null
+++ b/sw/inc/access.hrc
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ACCESS_HRC
+#define _ACCESS_HRC
+
+#include "rcid.hrc"
+
+#define STR_ACCESS_DOC_NAME (RC_ACCESS_BEGIN + 1)
+#define STR_ACCESS_DOC_DESC (RC_ACCESS_BEGIN + 2)
+#define STR_ACCESS_HEADING_WITH_NUM_DESC (RC_ACCESS_BEGIN + 3)
+#define STR_ACCESS_HEADER_NAME (RC_ACCESS_BEGIN + 4)
+#define STR_ACCESS_HEADER_DESC (RC_ACCESS_BEGIN + 5)
+#define STR_ACCESS_FOOTER_NAME (RC_ACCESS_BEGIN + 6)
+#define STR_ACCESS_FOOTER_DESC (RC_ACCESS_BEGIN + 7)
+#define STR_ACCESS_FOOTNOTE_NAME (RC_ACCESS_BEGIN + 8)
+#define STR_ACCESS_FOOTNOTE_DESC (RC_ACCESS_BEGIN + 9)
+#define STR_ACCESS_ENDNOTE_NAME (RC_ACCESS_BEGIN + 10)
+#define STR_ACCESS_ENDNOTE_DESC (RC_ACCESS_BEGIN + 11)
+#define STR_ACCESS_REPLACEMENT_POSTIT (RC_ACCESS_BEGIN + 12)
+#define STR_ACCESS_REPLACEMENT_FRAME (RC_ACCESS_BEGIN + 13)
+#define STR_ACCESS_REPLACEMENT_BULLET_GRAPHICS (RC_ACCESS_BEGIN + 14)
+#define STR_ACCESS_TABLE_DESC (RC_ACCESS_BEGIN + 15)
+#define STR_ACCESS_PAGE_NAME (RC_ACCESS_BEGIN + 16)
+#define STR_ACCESS_PAGE_DESC (RC_ACCESS_BEGIN + 17)
+#define STR_ACCESS_ANNOTATION_AUTHOR_NAME (RC_ACCESS_BEGIN + 18)
+#define STR_ACCESS_ANNOTATION_DATE_NAME (RC_ACCESS_BEGIN + 19)
+#define STR_ACCESS_ANNOTATION_BUTTON_NAME (RC_ACCESS_BEGIN + 20)
+#define STR_ACCESS_ANNOTATION_BUTTON_DESC (RC_ACCESS_BEGIN + 21)
+
+#define ACCESS_ACT_END STR_ACCESS_ANNOTATION_BUTTON_DESC
+
+#if ACCESS_ACT_END > RC_ACCESS_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+
+#endif
diff --git a/sw/inc/accessibilityoptions.hxx b/sw/inc/accessibilityoptions.hxx
new file mode 100644
index 000000000000..79be20d8cc07
--- /dev/null
+++ b/sw/inc/accessibilityoptions.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ACCESSIBILITYOPTIONS_HXX
+#define _ACCESSIBILITYOPTIONS_HXX
+
+#include <tools/solar.h>
+
+struct SwAccessibilityOptions
+{
+ BOOL bIsAlwaysAutoColor :1;
+ BOOL bIsStopAnimatedText :1;
+ BOOL bIsStopAnimatedGraphics :1;
+
+ SwAccessibilityOptions() :
+ bIsAlwaysAutoColor(FALSE),
+ bIsStopAnimatedText(FALSE),
+ bIsStopAnimatedGraphics(FALSE) {}
+
+ inline BOOL IsAlwaysAutoColor() const { return bIsAlwaysAutoColor; }
+ inline void SetAlwaysAutoColor( BOOL b ) { bIsAlwaysAutoColor = b; }
+
+ inline BOOL IsStopAnimatedGraphics() const { return bIsStopAnimatedText;}
+ inline void SetStopAnimatedGraphics( BOOL b ) { bIsStopAnimatedText = b; }
+
+ inline BOOL IsStopAnimatedText() const { return bIsStopAnimatedGraphics; }
+ inline void SetStopAnimatedText( BOOL b ) { bIsStopAnimatedGraphics = b;}
+};
+#endif
+
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
new file mode 100644
index 000000000000..01c4593fe636
--- /dev/null
+++ b/sw/inc/accmap.hxx
@@ -0,0 +1,329 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ACCMAP_HXX
+#define _ACCMAP_HXX
+
+#include <cppuhelper/weakref.hxx>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <vos/ref.hxx>
+#include <vos/mutex.hxx>
+#include <svx/IAccessibleViewForwarder.hxx>
+#include <svx/IAccessibleParent.hxx>
+#include <tools/debug.hxx>
+#include <tools/fract.hxx>
+
+#include <vector>
+
+class ViewShell;
+class Rectangle;
+class SwFrm;
+class SwTxtFrm;
+class SwPageFrm;
+class SwAccessibleContext;
+class SwAccessibleContextMap_Impl;
+class SwAccessibleEventList_Impl;
+class SwAccessibleEventMap_Impl;
+class SwShapeList_Impl;
+class SdrObject;
+namespace accessibility {
+ class AccessibleShape;
+}
+class SwAccessibleShapeMap_Impl;
+struct SwAccessibleEvent_Impl;
+class SwAccessibleSelectedParas_Impl;
+class SwRect;
+class MapMode;
+class SwAccPreviewData;
+struct PrevwPage;
+class Window;
+
+// real states for events
+#define ACC_STATE_EDITABLE 0x01
+#define ACC_STATE_OPAQUE 0x02
+
+// pseudo states for events
+// --> OD 2009-01-07 #i88069# - pseudo state for event TEXT_ATTRIBUTE_CHANGED
+#define ACC_STATE_TEXT_ATTRIBUTE_CHANGED 0x0200
+// <--
+// --> OD 2005-12-12 #i27301# - pseudo state for event TEXT_SELECTION_CHANGED
+#define ACC_STATE_TEXT_SELECTION_CHANGED 0x0100
+// <--
+#define ACC_STATE_CARET 0x80
+#define ACC_STATE_RELATION_FROM 0x40
+#define ACC_STATE_RELATION_TO 0x20
+
+#define ACC_STATE_RELATION_MASK 0x60
+
+#define ACC_STATE_MASK 0x1F
+
+// --> OD 2005-12-12 #i27301# - introduce type definition of states
+typedef sal_uInt16 tAccessibleStates;
+// <--
+
+class SwAccessibleMap : public accessibility::IAccessibleViewForwarder,
+ public accessibility::IAccessibleParent
+{
+ mutable ::vos::OMutex maMutex;
+ ::vos::OMutex maEventMutex;
+ SwAccessibleContextMap_Impl *mpFrmMap;
+ SwAccessibleShapeMap_Impl *mpShapeMap;
+ SwShapeList_Impl *mpShapes;
+ SwAccessibleEventList_Impl *mpEvents;
+ SwAccessibleEventMap_Impl *mpEventMap;
+ // --> OD 2005-12-13 #i27301# - data structure to keep information about
+ // accessible paragraph, which have a selection.
+ SwAccessibleSelectedParas_Impl* mpSelectedParas;
+ // <--
+ ViewShell *mpVSh;
+ /// for page preview: store preview data, VisArea, and mapping of
+ /// preview-to-display coordinates
+ SwAccPreviewData* mpPreview;
+
+ ::com::sun::star::uno::WeakReference < ::com::sun::star::accessibility::XAccessible > mxCursorContext;
+
+ sal_Int32 mnPara;
+ sal_Int32 mnFootnote;
+ sal_Int32 mnEndnote;
+
+
+ sal_Bool mbShapeSelected;
+
+ void FireEvent( const SwAccessibleEvent_Impl& rEvent );
+
+ void AppendEvent( const SwAccessibleEvent_Impl& rEvent );
+
+ void InvalidateCursorPosition(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rAcc );
+ void DoInvalidateShapeSelection();
+ void DoInvalidateShapeFocus();
+ void InvalidateShapeSelection();
+
+ void _InvalidateRelationSet( const SwFrm* pFrm, sal_Bool bFrom );
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>
+ _GetDocumentView( sal_Bool bPagePreview );
+
+ /** method to build up a new data structure of the accessible pararaphs,
+ which have a selection
+
+ OD 2005-12-13 #i27301#
+ Important note: method has to used inside a mutual exclusive section
+
+ @author OD
+ */
+ SwAccessibleSelectedParas_Impl* _BuildSelectedParas();
+
+public:
+
+ SwAccessibleMap( ViewShell *pSh );
+ ~SwAccessibleMap();
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> GetDocumentView();
+
+ // OD 15.01.2003 #103492# - complete re-factoring of method due to new
+ // page/print preview functionality.
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> GetDocumentPreview(
+ const std::vector<PrevwPage*>& _rPrevwPages,
+ const Fraction& _rScale,
+ const SwPageFrm* _pSelectedPageFrm,
+ const Size& _rPrevwWinSize );
+
+ ::vos::ORef < SwAccessibleContext > GetContextImpl(
+ const SwFrm *pFrm,
+ sal_Bool bCreate = sal_True );
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> GetContext(
+ const SwFrm *pFrm,
+ sal_Bool bCreate = sal_True );
+
+ ::vos::ORef < ::accessibility::AccessibleShape > GetContextImpl(
+ const SdrObject *pObj,
+ SwAccessibleContext *pParentImpl,
+ sal_Bool bCreate = sal_True );
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> GetContext(
+ const SdrObject *pObj,
+ SwAccessibleContext *pParentImpl,
+ sal_Bool bCreate = sal_True );
+
+ inline ViewShell* GetShell() const
+ {
+ return mpVSh;
+ }
+
+ const SwRect& GetVisArea() const;
+
+ /** get size of a dedicated preview page
+
+ OD 15.01.2003 #103492#
+ complete re-factoring of previous method due to new page/print preview
+ functionality.
+
+ @author OD
+
+ @param _nPrevwPageNum
+ input parameter - physical page number of page visible in the page preview
+
+ @return an object of class <Size>
+ */
+ Size GetPreViewPageSize( sal_uInt16 _nPrevwPageNum ) const;
+
+ void RemoveContext( const SwFrm *pFrm );
+ void RemoveContext( const SdrObject *pObj );
+
+ // Dispose frame and its children if bRecursive is set
+ void Dispose( const SwFrm* pFrm,
+ const SdrObject* pObj,
+ Window* pWindow,
+ sal_Bool bRecursive = sal_False );
+
+ void InvalidatePosOrSize( const SwFrm* pFrm,
+ const SdrObject* pObj,
+ Window* pWindow,
+ const SwRect& rOldFrm );
+
+ void InvalidateContent( const SwFrm *pFrm );
+
+ // --> OD 2009-01-06 #i88069#
+ void InvalidateAttr( const SwTxtFrm& rTxtFrm );
+ // <--
+
+ void InvalidateCursorPosition( const SwFrm *pFrm );
+ void InvalidateFocus();
+
+ void SetCursorContext(
+ const ::vos::ORef < SwAccessibleContext >& rCursorContext );
+
+ // Invalidate state of whole tree. If an action is open, this call
+ // is processed when the last action ends.
+ // --> OD 2005-12-12 #i27301# - use new type definition for <_nStates>
+ void InvalidateStates( tAccessibleStates _nStates,
+ const SwFrm* _pFrm = 0 );
+
+ void InvalidateRelationSet( const SwFrm* pMaster, const SwFrm* pFollow );
+
+ /** invalidation CONTENT_FLOWS_FROM/_TO relation of a paragraph
+
+ OD 2005-12-01 #i27138#
+
+ @author OD
+
+ @param _rTxtFrm
+ input parameter - reference to paragraph, whose CONTENT_FLOWS_FROM/_TO
+ has to be invalidated.
+
+ @param _bFrom
+ input parameter - boolean indicating, if relation CONTENT_FLOWS_FROM
+ (value <true>) or CONTENT_FLOWS_TO (value <false>) has to be invalidated.
+ */
+ void InvalidateParaFlowRelation( const SwTxtFrm& _rTxtFrm,
+ const bool _bFrom );
+
+ /** invalidation of text selection of a paragraph
+
+ OD 2005-12-12 #i27301#
+
+ @author OD
+ */
+ void InvalidateParaTextSelection( const SwTxtFrm& _rTxtFrm );
+
+ /** invalidation of text selection of all paragraphs
+
+ OD 2005-12-13 #i27301#
+
+ @author OD
+ */
+ void InvalidateTextSelectionOfAllParas();
+
+ sal_Int32 GetChildIndex( const SwFrm& rParentFrm,
+ Window& rChild ) const;
+
+ // update preview data (and fire events if necessary)
+ // OD 15.01.2003 #103492# - complete re-factoring of method due to new
+ // page/print preview functionality.
+ void UpdatePreview( const std::vector<PrevwPage*>& _rPrevwPages,
+ const Fraction& _rScale,
+ const SwPageFrm* _pSelectedPageFrm,
+ const Size& _rPrevwWinSize );
+
+ void InvalidatePreViewSelection( sal_uInt16 nSelPage );
+ sal_Bool IsPageSelected( const SwPageFrm *pPageFrm ) const;
+
+ void FireEvents();
+
+
+ // IAccessibleViewForwarder
+
+ virtual sal_Bool IsValid() const;
+ virtual Rectangle GetVisibleArea() const;
+ virtual Point LogicToPixel (const Point& rPoint) const;
+ virtual Size LogicToPixel (const Size& rSize) const;
+ virtual Point PixelToLogic (const Point& rPoint) const;
+ virtual Size PixelToLogic (const Size& rSize) const;
+
+ // IAccessibleParent
+ virtual sal_Bool ReplaceChild (
+ ::accessibility::AccessibleShape* pCurrentChild,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _rxShape,
+ const long _nIndex,
+ const ::accessibility::AccessibleShapeTreeInfo& _rShapeTreeInfo
+ ) throw (::com::sun::star::uno::RuntimeException);
+
+ // additional Core/Pixel conversions for internal use; also works
+ // for preview
+ Point PixelToCore (const Point& rPoint) const;
+ Rectangle CoreToPixel (const Rectangle& rRect) const;
+
+private:
+ /** get mapping mode for LogicToPixel and PixelToLogic conversions
+
+ OD 15.01.2003 #103492#
+ Replacement method <PreviewAdjust(..)> by new method <GetMapMode>.
+ Method returns mapping mode of current output device and adjusts it,
+ if the shell is in page/print preview.
+ Necessary, because <PreviewAdjust(..)> changes mapping mode at current
+ output device for mapping logic document positions to page preview window
+ positions and vice versa and doesn't take care to recover its changes.
+
+ @author OD
+
+ @param _rPoint
+ input parameter - constant reference to point to determine the mapping
+ mode adjustments for page/print preview.
+
+ @param _orMapMode
+ output parameter - reference to the mapping mode, which is determined
+ by the method
+ */
+ void GetMapMode( const Point& _rPoint,
+ MapMode& _orMapMode ) const;
+};
+#endif
diff --git a/sw/inc/acmplwrd.hxx b/sw/inc/acmplwrd.hxx
new file mode 100644
index 000000000000..8dda01f28493
--- /dev/null
+++ b/sw/inc/acmplwrd.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ACMPLWRD_HXX
+#define _ACMPLWRD_HXX
+
+
+#define _SVSTDARR_STRINGSISORTDTOR
+#include <svl/svstdarr.hxx>
+
+class SwDoc;
+class SwAutoCompleteWord_Impl;
+class SwAutoCompleteClient;
+
+class SwAutoCompleteWord
+{
+ friend class SwAutoCompleteClient;
+
+ SvStringsISortDtor aWordLst; // contains extended strings carrying source information
+ SvPtrarr aLRULst;
+
+ SwAutoCompleteWord_Impl* pImpl;
+ USHORT nMaxCount, nMinWrdLen;
+ BOOL bLockWordLst;
+
+ void DocumentDying(const SwDoc& rDoc);
+public:
+ SwAutoCompleteWord( USHORT nWords = 500, USHORT nMWrdLen = 10 );
+ ~SwAutoCompleteWord();
+
+ BOOL InsertWord( const String& rWord, SwDoc& rDoc );
+
+ BOOL GetRange( const String& rWord, USHORT& rStt, USHORT& rEnd ) const;
+
+ const String& operator[]( USHORT n ) const { return *aWordLst[ n ]; }
+
+ BOOL IsLockWordLstLocked() const { return bLockWordLst; }
+ void SetLockWordLstLocked( BOOL bFlag ) { bLockWordLst = bFlag; }
+
+ void SetMaxCount( USHORT n );
+
+ USHORT GetMinWordLen() const { return nMinWrdLen; }
+ void SetMinWordLen( USHORT n );
+
+ const SvStringsISortDtor& GetWordList() const { return aWordLst; }
+ void CheckChangedList( const SvStringsISortDtor& rNewLst );
+};
+
+
+#endif
diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx
new file mode 100644
index 000000000000..11b637957f8e
--- /dev/null
+++ b/sw/inc/anchoreddrawobject.hxx
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ANCHOREDDRAWOBJECT_HXX
+#define _ANCHOREDDRAWOBJECT_HXX
+
+#include <anchoredobject.hxx>
+#include <tools/gen.hxx>
+
+/** class for the positioning of drawing objects
+
+ OD 2004-03-25 #i26791#
+
+ @author OD
+*/
+class SW_DLLPUBLIC SwAnchoredDrawObject : public SwAnchoredObject
+{
+ private:
+ // boolean, indicating that the object position has been invalidated
+ // and that a positioning has to be performed.
+ bool mbValidPos;
+
+ // rectangle, keeping the last object rectangle after the postioning
+ // --> OD 2004-09-29 #i34748# - change <maLastObjRect> to a pointer
+ Rectangle* mpLastObjRect;
+
+ // boolean, indicating that anchored drawing object hasn't been attached
+ // to a anchor frame yet. Once, it is attached to a anchor frame the
+ // boolean changes its state.
+ bool mbNotYetAttachedToAnchorFrame;
+
+ // --> OD 2004-08-09 #i28749# - boolean, indicating that anchored
+ // drawing object hasn't been positioned yet. Once, it's positioned the
+ // boolean changes its state.
+ bool mbNotYetPositioned;
+
+ // --> OD 2006-03-17 #i62875#
+ // boolean, indicating that after change of layout direction the
+ // anchored drawing object has to be captured on the page, if it exceeds
+ // the left or right page margin.
+ // Needed for compatibility option <DoNotCaptureDrawObjsOnPage>
+ bool mbCaptureAfterLayoutDirChange;
+ // <--
+
+ /** method for the intrinsic positioning of a at-paragraph|at-character
+ anchored drawing object
+
+ OD 2004-08-12 #i32795# - helper method for method <MakeObjPos>
+
+ @author OD
+ */
+ void _MakeObjPosAnchoredAtPara();
+
+ /** method for the intrinsic positioning of a at-page|at-frame anchored
+ drawing object
+
+ OD 2004-08-12 #i32795# - helper method for method <MakeObjPos>
+
+ @author OD
+ */
+ void _MakeObjPosAnchoredAtLayout();
+
+ /** method to set positioning attributes (not for as-character anchored)
+
+ OD 2004-10-20 #i35798#
+ During load the positioning attributes aren't set.
+ Thus, the positioning attributes are set by the current object geometry.
+ This method is also used for the conversion for drawing objects
+ (not anchored as-character) imported from OpenOffice.org file format
+ once and directly before the first positioning.
+
+ @author OD
+ */
+ void _SetPositioningAttr();
+
+ /** method to set internal anchor position of <SdrObject> instance
+ of the drawing object
+
+ For drawing objects the internal anchor position of the <SdrObject>
+ instance has to be set.
+ Note: This adjustment is not be done for as-character anchored
+ drawing object - the positioning code takes care of this.
+ OD 2004-07-29 #i31698# - API for drawing objects in Writer has
+ been adjusted. Thus, this method will only set the internal anchor
+ position of the <SdrObject> instance to the anchor position given
+ by its anchor frame.
+
+ @author OD
+ */
+ void _SetDrawObjAnchor();
+
+ /** method to invalidate the given page frame
+
+ OD 2004-07-02 #i28701#
+
+ @author OD
+ */
+ void _InvalidatePage( SwPageFrm* _pPageFrm );
+
+ protected:
+ virtual void ObjectAttachedToAnchorFrame();
+
+ /** method to assure that anchored object is registered at the correct
+ page frame
+
+ OD 2004-07-02 #i28701#
+
+ @author OD
+ */
+ virtual void RegisterAtCorrectPage();
+
+ // --> OD 2006-08-10 #i68520#
+ virtual bool _SetObjTop( const SwTwips _nTop);
+ virtual bool _SetObjLeft( const SwTwips _nLeft);
+ // <--
+
+ // --> OD 2006-10-05 #i70122#
+ virtual const SwRect GetObjBoundRect() const;
+ // <--
+ public:
+ TYPEINFO();
+
+ SwAnchoredDrawObject();
+ virtual ~SwAnchoredDrawObject();
+
+ // declaration of pure virtual methods of base class <SwAnchoredObject>
+ virtual void MakeObjPos();
+ virtual void InvalidateObjPos();
+ inline bool IsValidPos() const
+ {
+ return mbValidPos;
+ }
+
+ // accessors to the format
+ virtual SwFrmFmt& GetFrmFmt();
+ virtual const SwFrmFmt& GetFrmFmt() const;
+
+ // accessors to the object area and its position
+ virtual const SwRect GetObjRect() const;
+ // --> OD 2004-09-29 #i34748# - change return type to a pointer.
+ // Return value can be NULL.
+ const Rectangle* GetLastObjRect() const;
+ // <--
+ // --> OD 2004-09-29 #i34748# - change method
+ void SetLastObjRect( const Rectangle& _rNewObjRect );
+ // <--
+
+ /** adjust positioning and alignment attributes for new anchor frame
+
+ OD 2004-04-21
+ Set horizontal and vertical position/alignment to manual position
+ relative to anchor frame area using the anchor position of the
+ new anchor frame and the current absolute drawing object position.
+ Note: For correct Undo/Redo method should only be called inside a
+ Undo-/Redo-action.
+ OD 2004-08-24 #i33313# - add second optional parameter <_pNewObjRect>
+
+ @author OD
+
+ @param <_pNewAnchorFrm>
+ input parameter - new anchor frame for the anchored object.
+
+ @param <_pNewObjRect>
+ optional input parameter - proposed new object rectangle. If not
+ provided the current object rectangle is taken.
+ */
+ void AdjustPositioningAttr( const SwFrm* _pNewAnchorFrm,
+ const SwRect* _pNewObjRect = 0L );
+
+ /** method to notify background of drawing object
+
+ OD 2004-06-30 #i28701#
+
+ @author OD
+ */
+ virtual void NotifyBackground( SwPageFrm* _pPageFrm,
+ const SwRect& _rRect,
+ PrepareHint _eHint );
+
+ // --> OD 2005-08-16 #i53320#
+ inline bool NotYetPositioned() const
+ {
+ return mbNotYetPositioned;
+ }
+ // <--
+
+ // --> OD 2006-03-17 #i62875#
+ // change of layout direction needs to be tracked
+ // for setting <mbCaptureAfterLayoutDirChange>.
+ virtual void UpdateLayoutDir();
+ // <--
+ // --> OD 2006-03-17 #i62875#
+ bool IsOutsidePage() const;
+ // <--
+
+ // new Loop control
+ void ValidateThis() { mbValidPos = true; }
+};
+
+#endif
diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx
new file mode 100644
index 000000000000..c9f53e51f069
--- /dev/null
+++ b/sw/inc/anchoredobject.hxx
@@ -0,0 +1,642 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ANCHOREDOBJECT_HXX
+#define _ANCHOREDOBJECT_HXX
+
+#include <tools/rtti.hxx>
+#include <swtypes.hxx>
+#include <swrect.hxx>
+
+class SdrObject;
+class SwFrm;
+class SwLayoutFrm;
+// --> OD 2004-07-14 #117380#
+class SwTxtFrm;
+// <--
+// --> OD 2004-06-30 #i28701#
+class SwPageFrm;
+class SwObjPositioningInProgress;
+// <--
+class SwFrmFmt;
+class SwFmtAnchor;
+
+/** wrapper class for the positioning of Writer fly frames and drawing objects
+
+ OD 2004-03-22 #i26791#
+ Purpose of this class is to provide a unified interface for the positioning
+ of Writer fly frames (derived classes of <SwFlyFrm>) and of drawing objects
+ (derived classes of <SwDrawFrm>).
+
+ @author OD
+*/
+class SW_DLLPUBLIC SwAnchoredObject
+{
+ private:
+ // drawing object representing the anchored object in the drawing layer
+ SdrObject* mpDrawObj;
+ // frame the object is anchored at
+ SwFrm* mpAnchorFrm;
+ // --> OD 2004-06-30 #i28701# - page frame the object is registered at
+ // note: no page frame for as-character anchored objects
+ SwPageFrm* mpPageFrm;
+ // <--
+ // current relative position (relative to anchor position of anchor frame)
+ Point maRelPos;
+
+ // for to-character anchored objects:
+ // Last known anchor character retangle.
+ // Used to decide, if invalidation has to been performed, if anchor position
+ // has changed, and used to position object.
+ SwRect maLastCharRect;
+
+ // for to-character anchored objects:
+ // Last known top of line, in which the anchor character is in.
+ // Used to decide, if invalidation has to been performed, if anchor position
+ // has changed, and used to position object.
+ SwTwips mnLastTopOfLine;
+
+ // for to-paragraph and to-character anchored objects:
+ // Layout frame vertical position is orient at - typically its the upper
+ // of the anchor frame, but it could also by the upper of a follow or
+ // a following layout frame in the text flow.
+ const SwLayoutFrm* mpVertPosOrientFrm;
+
+ // --> OD 2004-06-30 #i28701# - boolean, indicating that the object
+ // positioning algorithm is in progress.
+ bool mbPositioningInProgress;
+ // <--
+
+ // --> OD 2004-06-29 #i28701# - Booleans needed for the layout process.
+ // Values only of relevance for to-paragraph and to-character anchored
+ // floating screen object, for whose the 'straight-forward positioning
+ // process are applied
+ // Otherwise value of <mbConsiderForTextWrap> is treated as <true>,
+ // value of <mbPositionLocked> is treated as <false> and
+ // value of <mbRestartLayoutProcess> is treated as <false>.
+ // --> OD 2004-10-22 #i35911# - add boolean <mbClearEnvironment>
+ // Indicates that due to its position and wrapping style its layout
+ // environment is cleared - all content is moved forward.
+ // Treated as <false>, if not the 'straight-forward positioning process"
+ // is applied.
+ bool mbConsiderForTextWrap;
+ bool mbPositionLocked;
+ // --> OD 2005-01-10 #i40147# - boolean needed to keep position of
+ // anchored object locked due to special object positioning for sections.
+ bool mbKeepPositionLockedForSection;
+ // <--
+ bool mbRestartLayoutProcess;
+ bool mbClearedEnvironment;
+ // <--
+
+ // --> OD 2004-08-25 #i3317# - boolean, indicating that temporarly
+ // the wrapping style influence of the anchored object has to be
+ // considered during its positioning.
+ // This boolean is used, if compatibility option 'Consider wrapping style
+ // influence on object positioning' is OFF and a positioning loop is
+ // detected in method <SwFlyAtCntFrm::MakeAll()> or method
+ // <SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()>.
+ // The boolean is reset to <false>, when the layout process for a
+ // page frame starts - see class <NotifyLayoutOfPageInProgress>.
+ bool mbTmpConsiderWrapInfluence;
+ // <--
+
+ // --> OD 2006-06-21 #i68520#
+ mutable SwRect maObjRectWithSpaces;
+ mutable bool mbObjRectWithSpacesValid;
+ mutable SwRect maLastObjRect;
+ // <--
+
+ /** method to indicate, that positioning of anchored object is in progress
+
+ note: method is implemented empty
+
+ @author OD
+ */
+ friend class SwObjPositioningInProgress;
+ inline void SetPositioningInProgress( const bool _bPosInProgress )
+ {
+ mbPositioningInProgress = _bPosInProgress;
+ }
+
+
+ /** check anchor character rectangle
+
+ OD 2004-03-25 #i26791#
+ helper method for method <CheckCharRectAndTopOfLine()>
+ For to-character anchored Writer fly frames the member <maLastCharRect>
+ is updated. This is checked for change and depending on the applied
+ positioning, it's decided, if the Writer fly frame has to be invalidated.
+ OD 2004-07-14 #117380#
+ improvement - add second parameter <_rAnchorCharFrm>
+
+ @author OD
+
+ @param _rAnch
+ input parameter - reference to anchor position
+
+ @param _rAnchorCharFrm
+ input parameter - reference to the text frame containing the anchor
+ character.
+ */
+ void _CheckCharRect( const SwFmtAnchor& _rAnch,
+ const SwTxtFrm& _rAnchorCharFrm );
+
+ /** check top of line
+
+ OD 2004-03-25 #i26791#
+ helper method for method <CheckCharRectAndTopOfLine()>
+ For to-character anchored Writer fly frames the member <mnLastTopOfLine>
+ is updated. This is checked for change and depending on the applied
+ positioning, it's decided, if the Writer fly frame has to be invalidated.
+ OD 2004-07-14 #117380#
+ improvement - add second parameter <_rAnchorCharFrm>
+
+ @author OD
+
+ @param _rAnch
+ input parameter - reference to anchor position
+
+ @param _rAnchorCharFrm
+ input parameter - reference to the text frame containing the anchor
+ character.
+ */
+ void _CheckTopOfLine( const SwFmtAnchor& _rAnch,
+ const SwTxtFrm& _rAnchorCharFrm );
+
+ // --> OD 2005-03-30 #120729# - needed for the hotfix
+ // method <lcl_HideObj(..)> sets needed data structure values for the
+ // object positioning
+ friend bool lcl_HideObj( const SwTxtFrm& _rFrm,
+ const RndStdIds _eAnchorType,
+ const xub_StrLen _nObjAnchorPos,
+ SwAnchoredObject* _pAnchoredObj );
+ // <--
+ protected:
+ SwAnchoredObject();
+
+ void SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFrm );
+
+ /** method to assure that anchored object is registered at the correct
+ page frame
+
+ OD 2004-07-02 #i28701#
+
+ @author OD
+ */
+ virtual void RegisterAtCorrectPage() = 0;
+
+ /** method to indicate, that anchored object is attached to a anchor frame
+
+ @author OD
+ */
+ virtual void ObjectAttachedToAnchorFrame();
+
+ /** method to determine, if other anchored objects, also attached at
+ to the anchor frame, have to consider its wrap influence.
+
+ // --> OD 2005-02-22 #i43255#
+
+ @author OD
+ */
+ bool ConsiderObjWrapInfluenceOfOtherObjs() const;
+
+ /** method to apply temporary consideration of wrapping style influence
+ to the anchored objects, which are anchored at the same anchor frame
+
+ OD 2006-07-24 #b6449874#
+
+ @author OD
+ */
+ void SetTmpConsiderWrapInfluenceOfOtherObjs( const bool bTmpConsiderWrapInfluence );
+
+ // --> OD 2006-08-10 #i68520#
+ virtual bool _SetObjTop( const SwTwips _nTop) = 0;
+ virtual bool _SetObjLeft( const SwTwips _nLeft) = 0;
+ // <--
+
+ // --> OD 2006-10-05 #i70122#
+ virtual const SwRect GetObjBoundRect() const = 0;
+ // <--
+ public:
+ TYPEINFO();
+
+ virtual ~SwAnchoredObject();
+
+ // accessors to member <mpDrawObj>
+ void SetDrawObj( SdrObject& _rDrawObj );
+ const SdrObject* GetDrawObj() const;
+ SdrObject* DrawObj();
+
+ // accessors to member <mpAnchorFrm>
+ const SwFrm* GetAnchorFrm() const;
+ SwFrm* AnchorFrm();
+ void ChgAnchorFrm( SwFrm* _pNewAnchorFrm );
+ /** determine anchor frame containing the anchor position
+
+ OD 2004-10-08 #i26945#
+ the anchor frame, which is determined, is <mpAnchorFrm>
+ for an at-page, at-frame or at-paragraph anchored object
+ and the anchor character frame for an at-character and as-character
+ anchored object.
+
+ @author OD
+ */
+ SwFrm* GetAnchorFrmContainingAnchPos();
+
+ // --> OD 2004-06-30 #i28701# - accessors to member <mpPageFrm>
+ SwPageFrm* GetPageFrm();
+ const SwPageFrm* GetPageFrm() const;
+ void SetPageFrm( SwPageFrm* _pNewPageFrm );
+ // <--
+
+ /** method to determine the page frame, on which the 'anchor' of
+ the given anchored object is.
+
+ OD 2004-07-02 #i28701#
+ OD 2004-09-23 #i33751#, #i34060#
+ Adjust meaning of method and thus its name: If the anchored object
+ or its anchor isn't correctly inserted in the layout, no page frame
+ can be found. Thus, the return type changed to be a pointer and can
+ be NULL.
+
+ @author OD
+
+ @param _rAnchoredObj
+ input parameter - anchored object, for which the page frame of its
+ 'anchor' has to be determined.
+
+ @return SwPageFrm&
+ page frame, the 'anchor' of the given anchored object is on
+ */
+ SwPageFrm* FindPageFrmOfAnchor();
+
+ /** get frame, which contains the anchor character, if the object
+ is anchored at-character or as-character.
+
+ OD 2004-10-04 #i26945#
+
+ @author OD
+
+ @return SwTxtFrm*
+ text frame containing the anchor character. It's NULL, if the object
+ isn't anchored at-character resp. as-character.
+ */
+ SwTxtFrm* FindAnchorCharFrm();
+
+ // accessors to data of position calculation:
+ // frame vertical position is orient at
+ inline const SwLayoutFrm* GetVertPosOrientFrm() const
+ {
+ return mpVertPosOrientFrm;
+ }
+ // --> OD 2004-11-29 #115759# - method to clear member <mpVertPosOrientFrm>
+ inline void ClearVertPosOrientFrm()
+ {
+ mpVertPosOrientFrm = 0L;
+ }
+ // <--
+
+ /** check anchor character rectangle and top of line
+
+ OD 2004-03-25 #i26791#
+ For to-character anchored Writer fly frames the members <maLastCharRect>
+ and <maLastTopOfLine> are updated. These are checked for change and
+ depending on the applied positioning, it's decided, if the Writer fly
+ frame has to be invalidated.
+ OD 2004-07-15 #117380#
+ add parameter <_bCheckForParaPorInf>, default value <true>
+
+ @author OD
+
+ @param _bCheckForParaPorInf
+ input parameter - boolean indicating, if check on paragraph portion
+ information has to be done.
+ */
+ void CheckCharRectAndTopOfLine( const bool _bCheckForParaPorInf = true );
+
+ // accessors to member <maLastCharRect>
+ const SwRect& GetLastCharRect() const;
+ SwTwips GetRelCharX( const SwFrm* pFrm ) const;
+ SwTwips GetRelCharY( const SwFrm* pFrm ) const;
+ void AddLastCharY( long nDiff );
+ void ResetLastCharRectHeight();
+
+ // accessor to member <nmLastTopOfLine>
+ SwTwips GetLastTopOfLine() const;
+ // OD 2004-05-18 #i28701# - follow-up of #i22341#
+ void AddLastTopOfLineY( SwTwips _nDiff );
+
+ /** reset members <maLastCharRect> and <mnLastTopOfLine>
+
+ OD 2004-06-29 #i27801#
+
+ @author OD
+ */
+ void ClearCharRectAndTopOfLine();
+
+ /** method to determine position for the object and set the position
+ at the object
+
+ @author OD
+ */
+ virtual void MakeObjPos() = 0;
+
+ /** is positioning of anchored object in progress
+
+ @author OD
+ */
+ inline bool IsPositioningInProgress() const
+ {
+ return mbPositioningInProgress;
+ }
+
+ /** method to determine, if invalidation of position is allowed
+
+ OD 2004-07-01 #i28701#
+
+ @author OD
+ */
+ bool InvalidationOfPosAllowed() const;
+
+ /** method to invalidate position of the anchored object
+
+ @author OD
+ */
+ virtual void InvalidateObjPos() = 0;
+
+ /** method to perform necessary invalidations for the positioning of
+ objects, for whose the wrapping style influence has to be considered
+ on the object positioning.
+
+ OD 2004-06-30 #i28701#
+
+ @author OD
+ */
+ void InvalidateObjPosForConsiderWrapInfluence( const bool _bNotifyBackgrd );
+
+ /** method to trigger notification of 'background'
+
+ OD 2004-07-01 #i28701#
+
+ @author OD
+ */
+ virtual void NotifyBackground( SwPageFrm* _pPageFrm,
+ const SwRect& _rRect,
+ PrepareHint _eHint ) = 0;
+
+ // accessors to the current relative position (relative to anchor
+ // position of anchor frame)
+ const Point GetCurrRelPos() const;
+ void SetCurrRelPos( Point _aRelPos );
+
+ // accessors to the format
+ virtual SwFrmFmt& GetFrmFmt() = 0;
+ virtual const SwFrmFmt& GetFrmFmt() const = 0;
+
+ // accessors to the object area and its position
+ virtual const SwRect GetObjRect() const = 0;
+ // --> OD 2006-08-10 #i68520#
+ void SetObjTop( const SwTwips _nTop);
+ void SetObjLeft( const SwTwips _nLeft);
+ // <--
+
+ /** method update layout direction the layout direction, the anchored
+ object is assigned to
+
+ OD 2004-07-27 #i31698#
+ method has typically to be called, if the anchored object gets its
+ anchor frame assigned and if the anchor frame changes its layout direction
+ OD 2006-03-17 #i62875#
+ made virtual, because it's needed to be overloaded by <SwAnchoredDrawObject>
+
+ @author OD
+ */
+ virtual void UpdateLayoutDir();
+
+ /** method to determine object area inclusive its spacing
+
+ OD 2004-06-30 #i28701#
+ OD 2006-08-10 #i68520# - return constant reference
+
+ @author OD
+ */
+ const SwRect& GetObjRectWithSpaces() const;
+
+ // --> OD 2006-08-10 #i68520#
+ inline void InvalidateObjRectWithSpaces() const
+ {
+ mbObjRectWithSpacesValid = false;
+ }
+ // <--
+
+ /** method to determine, if wrapping style influence of the anchored
+ object has to be considered on the object positioning
+
+ OD 2004-06-30 #i28701#
+ Note: result of this method also decides, if the boolean for the
+ layout process are of relevance.
+
+ @author OD
+ */
+ bool ConsiderObjWrapInfluenceOnObjPos() const;
+
+ // --> OD 2004-06-29 #i28701# - accessors to booleans for layout process
+ bool ConsiderForTextWrap() const;
+ void SetConsiderForTextWrap( const bool _bConsiderForTextWrap );
+ bool PositionLocked() const;
+ inline void LockPosition()
+ {
+ mbPositionLocked = true;
+ }
+ inline void UnlockPosition()
+ {
+ if ( !mbKeepPositionLockedForSection )
+ {
+ mbPositionLocked = false;
+ }
+ }
+ // --> OD 2005-01-10 #i40147#
+ inline void SetKeepPosLocked( const bool _bKeepPosLocked )
+ {
+ mbKeepPositionLockedForSection = _bKeepPosLocked;
+ }
+ // <--
+ bool RestartLayoutProcess() const;
+ void SetRestartLayoutProcess( const bool _bRestartLayoutProcess );
+ // --> OD 2004-10-22 #i35911# - accessors for <mbClearedEnvironment>
+ bool ClearedEnvironment() const;
+ void SetClearedEnvironment( const bool _bClearedEnvironment );
+ // <--
+ // --> OD 2005-03-03 #i43913# - reset booleans for layout process
+ inline void ResetLayoutProcessBools()
+ {
+ mbPositioningInProgress = false;
+ mbConsiderForTextWrap = false;
+ mbPositionLocked = false;
+ mbKeepPositionLockedForSection = false;
+ mbRestartLayoutProcess = false;
+ mbClearedEnvironment = false;
+ mbTmpConsiderWrapInfluence = false;
+ }
+ // <--
+
+ /** method to determine, if due to anchored object size and wrapping
+ style, its layout environment is cleared.
+
+ OD 2004-10-22 #i35911#
+
+ @author OD
+ */
+ bool HasClearedEnvironment() const;
+
+ /** method to update anchored object in the <SwSortedObjs> lists
+
+ OD 2004-07-01 #i28701#
+ Method is not proposed to be called during a layout process is
+ running. It has been used on the change of the anchored object
+ attributes, which belongs the sort criteria of <SwSortedObjs>.
+ If document compatibility option 'Consider wrapping style influence
+ on object positioning' is ON, additionally all anchored objects
+ at the anchor frame and all following anchored objects on the page
+ frame are invalidated.
+
+ @author OD
+ */
+ void UpdateObjInSortedList();
+
+ /** method to determine, if a format on the anchored object is possible
+
+ OD 2004-07-23 #i28701#
+ A format isn't possible, if anchored object is in an invisible layer.
+ Note: method is virtual to refine the conditions for the sub-classes.
+
+ @author OD
+ */
+ virtual bool IsFormatPossible() const;
+
+ // --> OD 2004-08-25 #i3317# - accessors to member <mbTmpConsiderWrapInfluence>
+ void SetTmpConsiderWrapInfluence( const bool _bTmpConsiderWrapInfluence );
+ bool IsTmpConsiderWrapInfluence() const;
+ // <--
+
+ /** method to determine, if the anchored object is overlapping with a
+ previous column
+
+ OD 2004-08-25 #i3317#
+ overlapping with a previous column means, that the object overlaps
+ with a column, which is a previous one of the column its anchor
+ frame is in.
+ Only applied for at-paragraph and at-character anchored objects.
+
+ @author OD
+ */
+ bool OverlapsPrevColumn() const;
+
+ /** method to determine position of anchored object relative to
+ anchor frame
+
+ OD 2005-01-06 #i30669#
+ Usage: Needed layout information for WW8 export
+
+ @author OD
+
+ @return Point - determined relative position
+ */
+ Point GetRelPosToAnchorFrm() const;
+
+ /** method to determine position of anchored object relative to
+ page frame
+
+ OD 2005-01-06 #i30669#
+ Usage: Needed layout information for WW8 export
+ OD 2005-01-27 #i33818# - add parameters <_bFollowTextFlow> and
+ <_obRelToTableCell>
+ If <_bFollowTextFlow> is set and object is anchored inside table,
+ the position relative to the table cell is determined. Output
+ parameter <_obRelToTableCell> reflects this situation
+
+ @author OD
+
+ @param _bFollowTextFlow
+ input parameter - boolean indicating, if the anchored object has to
+ follow the text flow.
+
+ @param _obRelToTableCell
+ output parameter - boolean indicating, the determine position is
+ relative to the table cell
+
+ @return Point - determined relative position
+ */
+ Point GetRelPosToPageFrm( const bool _bFollowTextFlow,
+ bool& _obRelToTableCell ) const;
+
+ /** method to determine position of anchored object relative to
+ anchor character
+
+ OD 2005-01-06 #i30669#
+ Usage: Needed layout information for WW8 export
+
+ @author OD
+
+ @return Point - determined relative position
+ */
+ Point GetRelPosToChar() const;
+
+ /** method to determine position of anchored object relative to
+ top of line
+
+ OD 2005-01-06 #i30669#
+ Usage: Needed layout information for WW8 export
+
+ @author OD
+
+ @return Point - determined relative position
+ */
+ Point GetRelPosToLine() const;
+};
+
+// ============================================================================
+// OD 2004-04-13 #i26791#, #i28701#
+// helper class for notify that positioning of an anchored object is in progress
+// ============================================================================
+class SwObjPositioningInProgress
+{
+ private:
+ SwAnchoredObject* mpAnchoredObj;
+ // --> OD 2005-08-09 #i52904# - introduce boolean indicating old state
+ // of anchored object regarding positioning in progress in order to
+ // consider nested usage of class <SwObjPositioningInProgress>
+ bool mbOldObjPositioningInProgress;
+ // <--
+
+ public:
+ SwObjPositioningInProgress( SdrObject& _rSdrObj );
+ SwObjPositioningInProgress( SwAnchoredObject& _rAnchoredObj );
+ ~SwObjPositioningInProgress();
+};
+
+#endif
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
new file mode 100644
index 000000000000..7d3ff5514b72
--- /dev/null
+++ b/sw/inc/authfld.hxx
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _AUTHFLD_HXX
+#define _AUTHFLD_HXX
+
+#include "swdllapi.h"
+#include <fldbas.hxx>
+#include <toxe.hxx>
+
+#define _SVSTDARR_LONGS
+#include <svl/svstdarr.hxx>
+
+class SwAuthDataArr;
+/* -----------------21.09.99 13:32-------------------
+
+ --------------------------------------------------*/
+class SwAuthEntry
+{
+ String aAuthFields[AUTH_FIELD_END];
+ USHORT nRefCount;
+public:
+ SwAuthEntry() : nRefCount(0){}
+ SwAuthEntry( const SwAuthEntry& rCopy );
+ BOOL operator==(const SwAuthEntry& rComp);
+
+ inline const String& GetAuthorField(ToxAuthorityField ePos)const;
+ inline void SetAuthorField(ToxAuthorityField ePos,
+ const String& rField);
+
+ void AddRef() { ++nRefCount; }
+ void RemoveRef() { --nRefCount; }
+ USHORT GetRefCount() { return nRefCount; }
+};
+/* -----------------20.10.99 16:49-------------------
+
+ --------------------------------------------------*/
+struct SwTOXSortKey
+{
+ ToxAuthorityField eField;
+ BOOL bSortAscending;
+ SwTOXSortKey() :
+ eField(AUTH_FIELD_END),
+ bSortAscending(TRUE){}
+};
+
+/* -----------------14.09.99 16:15-------------------
+
+ --------------------------------------------------*/
+class SwAuthorityField;
+class SortKeyArr;
+
+class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType
+{
+ SwDoc* m_pDoc;
+ SwAuthDataArr* m_pDataArr;
+ SvLongs* m_pSequArr;
+ SortKeyArr* m_pSortKeyArr;
+ sal_Unicode m_cPrefix;
+ sal_Unicode m_cSuffix;
+ BOOL m_bIsSequence :1;
+ BOOL m_bSortByDocument :1;
+ LanguageType m_eLanguage;
+ String m_sSortAlgorithm;
+
+ // @@@ private copy assignment, but public copy ctor? @@@
+ const SwAuthorityFieldType& operator=( const SwAuthorityFieldType& );
+
+public:
+ SwAuthorityFieldType(SwDoc* pDoc);
+ SwAuthorityFieldType( const SwAuthorityFieldType& );
+ ~SwAuthorityFieldType();
+
+ virtual SwFieldType* Copy() const;
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+
+ inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
+ SwDoc* GetDoc(){ return m_pDoc; }
+ void RemoveField(long nHandle);
+ long AddField(const String& rFieldContents);
+ BOOL AddField(long nHandle);
+ void DelSequenceArray()
+ {
+ m_pSequArr->Remove(0, m_pSequArr->Count());
+ }
+
+ const SwAuthEntry* GetEntryByHandle(long nHandle) const;
+
+ void GetAllEntryIdentifiers( SvStringsDtor& rToFill )const;
+ const SwAuthEntry* GetEntryByIdentifier(const String& rIdentifier)const;
+
+ bool ChangeEntryContent(const SwAuthEntry* pNewEntry);
+ // import interface
+ USHORT AppendField(const SwAuthEntry& rInsert);
+ long GetHandle(USHORT nPos);
+
+ USHORT GetSequencePos(long nHandle);
+
+ BOOL IsSequence() const {return m_bIsSequence;}
+ void SetSequence(BOOL bSet)
+ {
+ DelSequenceArray();
+ m_bIsSequence = bSet;
+ }
+
+ void SetPreSuffix( sal_Unicode cPre, sal_Unicode cSuf)
+ {
+ m_cPrefix = cPre;
+ m_cSuffix = cSuf;
+ }
+ sal_Unicode GetPrefix() const { return m_cPrefix;}
+ sal_Unicode GetSuffix() const { return m_cSuffix;}
+
+ BOOL IsSortByDocument() const {return m_bSortByDocument;}
+ void SetSortByDocument(BOOL bSet)
+ {
+ DelSequenceArray();
+ m_bSortByDocument = bSet;
+ }
+
+ USHORT GetSortKeyCount() const ;
+ const SwTOXSortKey* GetSortKey(USHORT nIdx) const ;
+ void SetSortKeys(USHORT nKeyCount, SwTOXSortKey nKeys[]);
+
+ //initui.cxx
+ static const String& GetAuthFieldName(ToxAuthorityField eType);
+ static const String& GetAuthTypeName(ToxAuthorityType eType);
+
+ LanguageType GetLanguage() const {return m_eLanguage;}
+ void SetLanguage(LanguageType nLang) {m_eLanguage = nLang;}
+
+ const String& GetSortAlgorithm()const {return m_sSortAlgorithm;}
+ void SetSortAlgorithm(const String& rSet) {m_sSortAlgorithm = rSet;}
+
+};
+/* -----------------14.09.99 16:15-------------------
+
+ --------------------------------------------------*/
+class SwAuthorityField : public SwField
+{
+ long m_nHandle;
+ mutable long m_nTempSequencePos;
+public:
+ SwAuthorityField(SwAuthorityFieldType* pType, const String& rFieldContents);
+ SwAuthorityField(SwAuthorityFieldType* pType, long nHandle);
+ ~SwAuthorityField();
+
+ const String& GetFieldText(ToxAuthorityField eField) const;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ virtual void SetPar1(const String& rStr);
+ virtual SwFieldType* ChgTyp( SwFieldType* );
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+
+ long GetHandle() const { return m_nHandle; }
+
+ virtual String GetDescription() const;
+};
+
+// --- inlines -----------------------------------------------------------
+inline const String& SwAuthEntry::GetAuthorField(ToxAuthorityField ePos)const
+{
+ DBG_ASSERT(AUTH_FIELD_END > ePos, "wrong index");
+ return aAuthFields[ePos];
+}
+inline void SwAuthEntry::SetAuthorField(ToxAuthorityField ePos, const String& rField)
+{
+ DBG_ASSERT(AUTH_FIELD_END > ePos, "wrong index");
+ if(AUTH_FIELD_END > ePos)
+ aAuthFields[ePos] = rField;
+}
+
+#endif
+
diff --git a/sw/inc/authratr.hxx b/sw/inc/authratr.hxx
new file mode 100644
index 000000000000..f8fe69818439
--- /dev/null
+++ b/sw/inc/authratr.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _AUTHRATR_HXX
+#define _AUTHRATR_HXX
+
+#include <tools/solar.h>
+#include <tools/color.hxx>
+#include "swdllapi.h"
+
+#define COL_NONE TRGB_COLORDATA( 0x80, 0xFF, 0xFF, 0xFF )
+
+class SW_DLLPUBLIC AuthorCharAttr
+{
+public:
+ USHORT nItemId;
+ USHORT nAttr;
+ ColorData nColor;
+
+ AuthorCharAttr();
+
+ inline BOOL operator == ( const AuthorCharAttr& rAttr ) const
+ {
+ return nItemId == rAttr.nItemId && nAttr == rAttr.nAttr &&
+ nColor == rAttr.nColor;
+ }
+};
+
+
+#endif
diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx
new file mode 100644
index 000000000000..31a98adef990
--- /dev/null
+++ b/sw/inc/bparr.hxx
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _BPARR_HXX
+#define _BPARR_HXX
+
+#include <tools/solar.h>
+#include <tools/debug.hxx>
+#include <swdllapi.h>
+
+struct BlockInfo;
+class BigPtrArray;
+
+class BigPtrEntry
+{
+ friend class BigPtrArray;
+ BlockInfo* pBlock;
+ USHORT nOffset;
+public:
+ virtual ~BigPtrEntry() {}
+protected:
+ BigPtrEntry() : pBlock(0), nOffset(0) {}
+
+ inline ULONG GetPos() const;
+ inline BigPtrArray& GetArray() const;
+};
+typedef BigPtrEntry* ElementPtr;
+
+
+typedef BOOL (*FnForEach)( const ElementPtr&, void* pArgs );
+
+// 1000 Eintr„ge pro Block = etwas weniger als 4K
+#define MAXENTRY 1000
+
+
+// Anzahl Eintraege, die bei der Kompression frei bleiben duerfen
+// dieser Wert ist fuer den Worst Case, da wir MAXBLOCK mit ca 25%
+// Overhead definiert haben, reichen 80% = 800 Eintraege vollkommen aus
+// Will mann voellige Kompression haben, muss eben 100 angegeben werden.
+
+#define COMPRESSLVL 80
+
+struct BlockInfo { // Block-Info:
+ BigPtrArray* pBigArr; // in diesem Array steht der Block
+ ElementPtr* pData; // Datenblock
+ ULONG nStart, nEnd; // Start- und EndIndex
+ USHORT nElem; // Anzahl Elemente
+};
+
+class SW_DLLPUBLIC BigPtrArray
+{
+ BlockInfo** ppInf; // Block-Infos
+ ULONG nSize; // Anzahl Elemente
+ USHORT nMaxBlock; // akt. max Anzahl Bloecke
+ USHORT nBlock; // Anzahl Bloecke
+ USHORT nCur; // letzter Block
+
+ USHORT Index2Block( ULONG ) const; // Blocksuche
+ BlockInfo* InsBlock( USHORT ); // Block einfuegen
+ void BlockDel( USHORT ); // es wurden Bloecke geloescht
+ void UpdIndex( USHORT ); // Indexe neu berechnen
+
+protected:
+ // fuelle alle Bloecke auf.
+ // Der short gibt in Prozent an, wie voll die Bloecke werden sollen.
+ // Der ReturnWert besagt, das irgendetwas "getan" wurde
+ USHORT Compress( short = COMPRESSLVL );
+
+public:
+ BigPtrArray();
+ ~BigPtrArray();
+
+ ULONG Count() const { return nSize; }
+
+ void Insert( const ElementPtr& r, ULONG pos );
+ void Remove( ULONG pos, ULONG n = 1 );
+ void Move( ULONG from, ULONG to );
+ void Replace( ULONG pos, const ElementPtr& r);
+
+ ElementPtr operator[]( ULONG ) const;
+ void ForEach( FnForEach fn, void* pArgs = NULL )
+ {
+ ForEach( 0, nSize, fn, pArgs );
+ }
+ void ForEach( ULONG nStart, ULONG nEnd, FnForEach fn, void* pArgs = NULL );
+};
+
+
+
+inline ULONG BigPtrEntry::GetPos() const
+{
+ DBG_ASSERT( this == pBlock->pData[ nOffset ], "Element nicht im Block" );
+ return pBlock->nStart + nOffset;
+}
+
+inline BigPtrArray& BigPtrEntry::GetArray() const
+{
+ return *pBlock->pBigArr;
+}
+
+
+#endif
diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx
new file mode 100644
index 000000000000..4c016593fab6
--- /dev/null
+++ b/sw/inc/breakit.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _BREAKIT_HXX
+#define _BREAKIT_HXX
+
+#include <tools/solar.h>
+#include <i18npool/lang.h>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/i18n/XScriptTypeDetector.hpp>
+#include <com/sun/star/i18n/ForbiddenCharacters.hdl>
+#include <swdllapi.h>
+
+class String;
+
+/*************************************************************************
+ * class SwBreakIt
+ *************************************************************************/
+
+
+class SW_DLLPUBLIC SwBreakIt
+{
+ com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ mutable com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > xBreak;
+ com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector > xCTLDetect;
+
+
+ com::sun::star::lang::Locale * m_pLocale;
+ com::sun::star::i18n::ForbiddenCharacters * m_pForbidden;
+
+ LanguageType aLast; // language of the current locale
+ LanguageType aForbiddenLang; // language of the current forbiddenChar struct
+
+ void _GetLocale( const LanguageType aLang );
+ void _GetForbidden( const LanguageType aLang );
+
+ void createBreakIterator() const;
+ void createScriptTypeDetector();
+
+ // forbidden and not implemented.
+ SwBreakIt();
+ SwBreakIt( const SwBreakIt &);
+ SwBreakIt & operator= ( const SwBreakIt &);
+
+ // private (see @ _Create, _Delete).
+ explicit SwBreakIt(
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rxMSF);
+ ~SwBreakIt();
+
+public:
+ // private (see @ source/core/bastyp/init.cxx).
+ static void _Create(
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rxMSF);
+ static void _Delete();
+
+public:
+ static SwBreakIt * Get();
+
+ com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > GetBreakIter()
+ {
+ createBreakIterator();
+ return xBreak;
+ }
+
+ com::sun::star::uno::Reference< com::sun::star::i18n::XScriptTypeDetector > GetScriptTypeDetector()
+ {
+ createScriptTypeDetector();
+ return xCTLDetect;
+ }
+
+ const com::sun::star::lang::Locale& GetLocale( const LanguageType aLang )
+ {
+ if( !m_pLocale || aLast != aLang )
+ _GetLocale( aLang );
+ return *m_pLocale;
+ }
+
+ const com::sun::star::i18n::ForbiddenCharacters& GetForbidden( const LanguageType aLang )
+ {
+ if( !m_pForbidden || aForbiddenLang != aLang )
+ _GetForbidden( aLang );
+ return *m_pForbidden;
+ }
+
+ USHORT GetRealScriptOfText( const String& rTxt, xub_StrLen nPos ) const;
+ USHORT GetAllScriptsOfText( const String& rTxt ) const;
+};
+
+#define SW_BREAKITER() SwBreakIt::Get()
+#define SW_XBREAKITER() SW_BREAKITER()->GetBreakIter()
+
+// @@@ backward compatibility @@@
+SW_DLLPUBLIC extern SwBreakIt* pBreakIt;
+
+#endif
+
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
new file mode 100644
index 000000000000..6ce5e181947a
--- /dev/null
+++ b/sw/inc/calbck.hxx
@@ -0,0 +1,250 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+/*************************************************************
+#* Service-Klassen
+ *************************************************************/
+
+/*
+#* Aendert sich ein Attribut in einem Format, so muss diese
+#* Aenderung an alle abhaengigen Formate und ueber sie an
+#* alle betroffenen Nodes propagiert werden. Dabei muss
+#* festgestellt werden, ob die Aenderung einen Effekt haben
+#* kann, oder ob das geaenderte Attribut von dem abhaengigen
+#* Format ueberdefiniert wird (so dass ohnehin der
+#* Attributwert des abhaengigen Formates den geaenderten
+#* Wert verdeckt). Weiterhin kann der betroffene Node
+#* feststellen, ob er von dem geaenderten Attribut Gebrauch
+#* macht (Beispiel: Linienabstand fuer Unterstreichung wurde
+#* geaendert, das Attribut Unterstreichung wurde aber nicht
+#* verwendet). So wird bei Aenderungen der minimale Aufwand
+#* zum Reformatieren erkannt.
+ */
+#ifndef _CALBCK_HXX
+#define _CALBCK_HXX
+
+#include <tools/rtti.hxx>
+#include "swdllapi.h"
+
+class SwModify;
+class SwClientIter;
+class SfxPoolItem;
+class SvStream;
+
+// ----------
+// SwClient
+// ----------
+
+class SW_DLLPUBLIC SwClient
+{
+ friend class SwModify;
+ friend class SwClientIter;
+
+ SwClient *pLeft, *pRight; // fuer die AVL-Sortierung
+ BOOL bModifyLocked : 1; // wird in SwModify::Modify benutzt,
+ // eigentlich ein Member des SwModify
+ // aber aus Platzgruenden hier.
+ BOOL bInModify : 1; // ist in einem Modify. (Debug!!!)
+ BOOL bInDocDTOR : 1; // Doc wird zerstoert, nicht "abmelden"
+ BOOL bInCache : 1; // Ist im BorderAttrCache des Layout,
+ // Traegt sich dann im Modify aus!
+ BOOL bInSwFntCache : 1; // Ist im SwFont-Cache der Formatierung
+
+protected:
+ SwModify *pRegisteredIn;
+
+ // single argument ctors shall be explicit.
+ explicit SwClient(SwModify *pToRegisterIn);
+
+public:
+ inline SwClient();
+ virtual ~SwClient();
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ const SwModify* GetRegisteredIn() const { return pRegisteredIn; }
+
+ //rtti, abgeleitete moegens gleichtun oder nicht. Wenn sie es gleichtun
+ //kann ueber die Abhaengigkeitsliste eines Modify typsicher gecastet
+ //werden.
+ TYPEINFO();
+
+ void LockModify() { bModifyLocked = TRUE; }
+ void UnlockModify() { bModifyLocked = FALSE; }
+ void SetInCache( BOOL bNew ) { bInCache = bNew; }
+ void SetInSwFntCache( BOOL bNew ) { bInSwFntCache = bNew; }
+ BOOL IsModifyLocked() const { return bModifyLocked; }
+ BOOL IsInDocDTOR() const { return bInDocDTOR; }
+ BOOL IsInCache() const { return bInCache; }
+ BOOL IsInSwFntCache() const { return bInSwFntCache; }
+
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+private:
+ SwClient( const SwClient& );
+ SwClient &operator=( const SwClient& );
+};
+
+inline SwClient::SwClient() :
+ pLeft(0), pRight(0), pRegisteredIn(0)
+{ bModifyLocked = bInModify = bInDocDTOR = bInCache = bInSwFntCache = FALSE; }
+
+
+// ----------
+// SwModify
+// ----------
+
+// Klasse hat eine doppelt Verkette Liste fuer die Abhaengigen.
+
+class SW_DLLPUBLIC SwModify: public SwClient
+{
+ friend SvStream& operator<<( SvStream& aS, SwModify & );
+
+ friend class SwClientIter;
+ SwClient* pRoot;
+
+ SwClient *_Remove(SwClient *pDepend);
+
+public:
+ SwModify() : pRoot(0) {}
+
+ // single argument ctors shall be explicit.
+ explicit SwModify(SwModify *pToRegisterIn );
+ virtual ~SwModify();
+
+ virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
+ void Add(SwClient *pDepend);
+ SwClient *Remove(SwClient *pDepend)
+ { return bInDocDTOR ? 0 : _Remove( pDepend ); }
+
+ const SwClient* GetDepends() const { return pRoot; }
+
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ void SetInDocDTOR() { bInDocDTOR = TRUE; }
+
+ void CheckCaching( const USHORT nWhich );
+
+ BOOL IsLastDepend() const
+ { return pRoot && !pRoot->pLeft && !pRoot->pRight; }
+
+private:
+ // forbidden and not implemented (see @ SwClient).
+ SwModify & operator= (const SwModify &);
+
+protected:
+ // forbidden and not implemented (see @ SwClient),
+ // but GCC >= 3.4 needs an accessible "T (const T&)"
+ // to pass a "T" as a "const T&" argument
+ SwModify (const SwModify &);
+};
+
+// ----------
+// SwDepend
+// ----------
+
+/*
+ * Sehr sinnvolle Klasse, wenn ein Objekt von mehreren Objekten
+ * abhaengig ist. Diese sollte fuer jede Abhaengigkeit ein Objekt
+ * der Klasse SwDepend als Member haben.
+ */
+class SW_DLLPUBLIC SwDepend: public SwClient
+{
+ SwClient *pToTell;
+
+public:
+ SwDepend() : pToTell(0) {}
+ SwDepend(SwClient *pTellHim, SwModify *pDepend);
+
+ SwClient* GetToTell() { return pToTell; }
+ virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
+
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem & ) const;
+
+private:
+ // forbidden and not implemented (see @ SwClient).
+ SwDepend (const SwDepend &);
+ SwDepend & operator= (const SwDepend &);
+};
+
+
+class SwClientIter
+{
+ friend SwClient* SwModify::_Remove(SwClient *); // fuer Ptr-Korrektur
+ friend void SwModify::Add(SwClient *); // nur fuer ASSERT !
+
+ SwModify const& rRoot;
+ SwClient *pAkt, *pDelNext;
+ // fuers Updaten der aller Iteratoren beim Einfuegen/Loeschen von
+ // Clients, wenn der Iterator gerade draufsteht.
+ SwClientIter *pNxtIter;
+
+ SwClient* mpWatchClient; // if set, SwModify::_Remove checks if this client is removed
+
+ TypeId aSrchId; // fuer First/Next - suche diesen Type
+
+public:
+ SW_DLLPUBLIC SwClientIter( SwModify const& );
+ SW_DLLPUBLIC ~SwClientIter();
+
+ const SwModify& GetModify() const { return rRoot; }
+
+#ifndef CFRONT
+ SwClient* operator++(int); // zum Naechsten
+ SwClient* operator--(int); // zum Vorherigen
+#endif
+ SwClient* operator++(); // zum Naechsten
+ SwClient* operator--(); // zum Vorherigen
+
+ SwClient* GoStart(); // zum Anfang
+ SwClient* GoEnd(); // zum Ende
+
+ inline SwClient* GoRoot(); // wieder ab Root (==Start) anfangen
+
+ SwClient* operator()() const
+ { return pDelNext == pAkt ? pAkt : pDelNext; }
+
+ int IsChanged() const { return pDelNext != pAkt; }
+
+ SW_DLLPUBLIC SwClient* First( TypeId nType );
+ SW_DLLPUBLIC SwClient* Next();
+
+ const SwClient* GetWatchClient() const { return mpWatchClient; }
+ void SetWatchClient( SwClient* pWatch ) { mpWatchClient = pWatch; }
+};
+
+inline SwClient* SwClientIter::GoRoot() // wieder ab Root anfangen
+{
+ pAkt = rRoot.pRoot;
+ return (pDelNext = pAkt);
+}
+
+
+
+#endif
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
new file mode 100644
index 000000000000..f5cbcc6c8c38
--- /dev/null
+++ b/sw/inc/calc.hxx
@@ -0,0 +1,241 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CALC_HXX
+#define _CALC_HXX
+
+#include <svl/svarray.hxx>
+
+#ifndef __SBX_SBXVALUE //autogen
+#include <basic/sbxvar.hxx>
+#endif
+#include "swdllapi.h"
+
+class CharClass;
+class LocaleDataWrapper;
+class SwFieldType;
+class SwDoc;
+
+#define TBLSZ 47 // sollte Primzahl sein, wegen HashTable
+
+const sal_Unicode cListDelim = '|';
+
+/******************************************************************************
+ * Calculate Operations
+ ******************************************************************************/
+enum SwCalcOper
+{
+ CALC_NAME, CALC_NUMBER, CALC_ENDCALC,
+ CALC_PLUS='+', CALC_MINUS='-', CALC_MUL='*',
+ CALC_DIV='/', CALC_PRINT=';', CALC_ASSIGN='=',
+ CALC_LP='(', CALC_RP=')', CALC_PHD='%',
+ CALC_POW='^',
+ CALC_LISTOP = cListDelim,
+ CALC_NOT=256, CALC_AND=257, CALC_OR=258,
+ CALC_XOR=259, CALC_EQ=260, CALC_NEQ=261,
+ CALC_LEQ=262, CALC_GEQ=263, CALC_LES=264,
+ CALC_GRE=265, CALC_SUM=266, CALC_MEAN=267,
+ CALC_SQRT=268, CALC_MIN=269, CALC_MIN_IN=270,
+ CALC_MAX=271, CALC_MAX_IN=272, CALC_SIN=273,
+ CALC_COS=274, CALC_TAN=275, CALC_ASIN=276,
+ CALC_ACOS=278, CALC_ATAN=279, CALC_TDIF=280,
+ CALC_ROUND=281, CALC_DATE=282, CALC_MONTH=283,
+ CALC_DAY=284
+};
+
+//-- Calculate Operations Strings -----------------------------------------
+
+extern const sal_Char __FAR_DATA sCalc_Add[];
+extern const sal_Char __FAR_DATA sCalc_Sub[];
+extern const sal_Char __FAR_DATA sCalc_Mul[];
+extern const sal_Char __FAR_DATA sCalc_Div[];
+extern const sal_Char __FAR_DATA sCalc_Phd[];
+extern const sal_Char __FAR_DATA sCalc_Sqrt[];
+extern const sal_Char __FAR_DATA sCalc_Pow[];
+extern const sal_Char __FAR_DATA sCalc_Or[];
+extern const sal_Char __FAR_DATA sCalc_Xor[];
+extern const sal_Char __FAR_DATA sCalc_And[];
+extern const sal_Char __FAR_DATA sCalc_Not[];
+extern const sal_Char __FAR_DATA sCalc_Eq[];
+extern const sal_Char __FAR_DATA sCalc_Neq[];
+extern const sal_Char __FAR_DATA sCalc_Leq[];
+extern const sal_Char __FAR_DATA sCalc_Geq[];
+extern const sal_Char __FAR_DATA sCalc_L[];
+extern const sal_Char __FAR_DATA sCalc_G[];
+extern const sal_Char __FAR_DATA sCalc_Sum[];
+extern const sal_Char __FAR_DATA sCalc_Mean[];
+extern const sal_Char __FAR_DATA sCalc_Min[];
+extern const sal_Char __FAR_DATA sCalc_Max[];
+extern const sal_Char __FAR_DATA sCalc_Sin[];
+extern const sal_Char __FAR_DATA sCalc_Cos[];
+extern const sal_Char __FAR_DATA sCalc_Tan[];
+extern const sal_Char __FAR_DATA sCalc_Asin[];
+extern const sal_Char __FAR_DATA sCalc_Acos[];
+extern const sal_Char __FAR_DATA sCalc_Atan[];
+extern const sal_Char __FAR_DATA sCalc_Tdif[];
+extern const sal_Char __FAR_DATA sCalc_Round[];
+extern const sal_Char __FAR_DATA sCalc_Date[];
+
+/******************************************************************************
+ * Calculate ErrorCodes
+ ******************************************************************************/
+enum SwCalcError
+{
+ CALC_NOERR=0,
+ CALC_SYNTAX, // Syntax Fehler
+ CALC_ZERODIV, // Division durch Null
+ CALC_BRACK, // Fehlerhafte Klammerung
+ CALC_POWERR, // Ueberlauf in Quadratfunktion
+ CALC_VARNFND, // Variable wurde nicht gefunden
+ CALC_OVERFLOW, // Ueberlauf
+ CALC_WRONGTIME // falsches Zeitformat
+};
+
+class SwSbxValue : public SbxValue
+{
+ bool bVoid;
+public:
+ //JP 03.02.99: immer auf eine Zahl defaulten, damit auch gerechnet wird.
+ // Ansonsten wird daraus ein SbxEMPTY und damit ist nichts
+ // anzufangen.
+ SwSbxValue( long n = 0 ) : bVoid(false) { PutLong( n ); }
+ SwSbxValue( const double& rD ) : bVoid(false) { PutDouble( rD ); }
+ SwSbxValue( const SwSbxValue& rVal ) :
+ SvRefBase( rVal ),
+ SbxValue( rVal ),
+ bVoid(rVal.bVoid)
+ {}
+ virtual ~SwSbxValue();
+
+
+ // Strings sonderbehandeln
+ BOOL GetBool() const;
+ // Strings sonderbehandeln BOOLs sonderbehandeln
+ double GetDouble() const;
+ SwSbxValue& MakeDouble();
+
+ bool IsVoidValue() {return bVoid;}
+ void SetVoidValue(bool bSet) {bVoid = bSet;}
+};
+
+/******************************************************************************
+ * Calculate HashTables fuer VarTable und Operations
+ ******************************************************************************/
+struct SwHash
+{
+ SwHash( const String& rStr );
+ virtual ~SwHash();
+ String aStr;
+ SwHash *pNext;
+};
+
+struct SwCalcExp : public SwHash
+{
+ SwSbxValue nValue;
+ const SwFieldType* pFldType;
+
+ SwCalcExp( const String& rStr, const SwSbxValue& rVal,
+ const SwFieldType* pFldType = 0 );
+};
+
+SwHash* Find( const String& rSrch, SwHash** ppTable,
+ USHORT nTblSize, USHORT* pPos = 0 );
+
+void DeleteHashTable( SwHash** ppTable, USHORT nTblSize );
+
+// falls _CalcOp != 0, dann ist das ein gueltiger Operator
+struct _CalcOp;
+_CalcOp* FindOperator( const String& rSearch );
+
+/******************************************************************************
+ * class SwCalc
+ ******************************************************************************/
+class SwCalc
+{
+ SwHash* VarTable[ TBLSZ ];
+ String aVarName, sCurrSym;
+ String sCommand;
+ SvPtrarr aRekurStk;
+ SwSbxValue nLastLeft;
+ SwSbxValue nNumberValue;
+ SwCalcExp aErrExpr;
+ xub_StrLen nCommandPos;
+
+ SwDoc& rDoc;
+ const LocaleDataWrapper* pLclData;
+ CharClass* pCharClass;
+
+ USHORT nListPor;
+ SwCalcOper eCurrOper;
+ SwCalcOper eCurrListOper;
+ SwCalcError eError;
+
+
+ SwCalcOper GetToken();
+ SwSbxValue Expr();
+ SwSbxValue Term();
+ SwSbxValue Prim();
+
+ BOOL ParseTime( USHORT*, USHORT*, USHORT* );
+
+ String GetColumnName( const String& rName );
+ String GetDBName( const String& rName );
+
+ // dont call this methods
+ SwCalc( const SwCalc& );
+ SwCalc& operator=( const SwCalc& );
+
+public:
+ SwCalc( SwDoc& rD );
+ ~SwCalc();
+
+ SwSbxValue Calculate( const String &rStr );
+ String GetStrResult( const SwSbxValue& rValue, BOOL bRound = TRUE );
+ String GetStrResult( double, BOOL bRound = TRUE );
+
+ SwCalcExp* VarInsert( const String& r );
+ SwCalcExp* VarLook( const String &rStr, USHORT ins = 0 );
+ void VarChange( const String& rStr, const SwSbxValue& rValue );
+ void VarChange( const String& rStr, double );
+ SwHash** GetVarTable() { return VarTable; }
+
+ BOOL Push( const VoidPtr pPtr );
+ void Pop( const VoidPtr pPtr );
+
+ void SetCalcError( SwCalcError eErr ) { eError = eErr; }
+ BOOL IsCalcError() const { return 0 != eError; }
+
+ static BOOL Str2Double( const String& rStr, xub_StrLen& rPos,
+ double& rVal,
+ const LocaleDataWrapper* pData = 0 );
+ static BOOL Str2Double( const String& rStr, xub_StrLen& rPos,
+ double& rVal, SwDoc* pDoc );
+
+ SW_DLLPUBLIC static BOOL IsValidVarName( const String& rStr,
+ String* pValidName = 0 );
+};
+
+#endif
diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx
new file mode 100644
index 000000000000..d91c20409d0a
--- /dev/null
+++ b/sw/inc/ccoll.hxx
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CCOLL_HXX
+#define _CCOLL_HXX
+
+#include <svl/poolitem.hxx>
+#include <tools/string.hxx>
+#include <sfx2/tabdlg.hxx>
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#include <svtools/svtabbx.hxx>
+
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#include <tools/resary.hxx>
+#include "swdllapi.h"
+#include "cmdid.h"
+
+#include <rtl/string.hxx>
+
+//***********************************************************
+
+struct CollName {
+// const char* pStr;
+ ULONG nCnd;
+ ULONG nSubCond;
+ };
+
+//***********************************************************
+
+#define COND_COMMAND_COUNT 28
+
+struct CommandStruct
+{
+ ULONG nCnd;
+ ULONG nSubCond;
+};
+
+//***********************************************************
+
+sal_Int16 GetCommandContextIndex( const rtl::OUString &rContextName );
+rtl::OUString GetCommandContextByIndex( sal_Int16 nIndex );
+
+//***********************************************************
+
+class SW_DLLPUBLIC SwCondCollItem : public SfxPoolItem
+{
+ static CommandStruct aCmds[COND_COMMAND_COUNT];
+
+ String sStyles[COND_COMMAND_COUNT];
+
+public:
+ SwCondCollItem(USHORT nWhich = FN_COND_COLL);
+ ~SwCondCollItem();
+
+ TYPEINFO();
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ static const CommandStruct* GetCmds();
+
+ const String& GetStyle(USHORT nPos) const;
+ void SetStyle( const String* pStyle, USHORT nPos);
+
+};
+
+#endif
+
diff --git a/sw/inc/cellatr.hxx b/sw/inc/cellatr.hxx
new file mode 100644
index 000000000000..b870da64231f
--- /dev/null
+++ b/sw/inc/cellatr.hxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CELLATR_HXX
+#define _CELLATR_HXX
+
+#include <svl/intitem.hxx>
+#include <svl/zforlist.hxx>
+#include "swdllapi.h"
+#include "format.hxx"
+#include "cellfml.hxx"
+
+class SW_DLLPUBLIC SwTblBoxNumFormat : public SfxUInt32Item
+{
+ BOOL bAuto; // automatisch vergebenes Flag
+public:
+ SwTblBoxNumFormat( UINT32 nFormat = NUMBERFORMAT_TEXT,
+ BOOL bAuto = FALSE );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ inline SwTblBoxNumFormat& operator=( const SwTblBoxNumFormat& rAttr )
+ {
+ SetValue( rAttr.GetValue() );
+ SetAutoFlag( rAttr.GetAutoFlag() );
+ return *this;
+ }
+
+ BOOL GetAutoFlag() const { return bAuto; }
+ void SetAutoFlag( BOOL bFlag = TRUE ) { bAuto = bFlag; }
+};
+
+class SwTblBoxFormula : public SfxPoolItem, public SwTableFormula
+{
+ SwModify* pDefinedIn; // Modify-Object, in dem die Formel steht
+ // kann nur TablenBoxFormat sein
+
+public:
+ SwTblBoxFormula( const String& rFormula );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ // erfrage und setze den Modify-Pointer
+ inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
+ inline void ChgDefinedIn( const SwModify* pNew )
+ { pDefinedIn = (SwModify*)pNew; }
+ // suche den Node, in dem die Formel steht:
+ // BoxAttribut -> BoxStartNode
+ virtual const SwNode* GetNodeOfFormula() const;
+
+ SwTableBox* GetTableBox();
+ const SwTableBox* GetTableBox() const
+ { return ((SwTblBoxFormula*)this)->GetTableBox(); }
+
+ // Status aendern
+ void ChangeState( const SfxPoolItem* pItem );
+ // berechne die Formel
+ void Calc( SwTblCalcPara& rCalcPara, double& rValue );
+};
+
+class SW_DLLPUBLIC SwTblBoxValue : public SfxPoolItem
+{
+ double nValue;
+public:
+ SwTblBoxValue();
+ SwTblBoxValue( const double aVal );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ inline SwTblBoxValue& operator=( const SwTblBoxValue& rCmp )
+ {
+ nValue = rCmp.nValue;
+ return *this;
+ }
+
+ double GetValue() const { return nValue; }
+};
+
+
+
+//***************************************************************************
+
+inline const SwTblBoxNumFormat &SwAttrSet::GetTblBoxNumFmt(BOOL bInP) const
+ { return (const SwTblBoxNumFormat&)Get( RES_BOXATR_FORMAT,bInP); }
+inline const SwTblBoxFormula &SwAttrSet::GetTblBoxFormula(BOOL bInP) const
+ { return (const SwTblBoxFormula&)Get( RES_BOXATR_FORMULA,bInP); }
+inline const SwTblBoxValue &SwAttrSet::GetTblBoxValue(BOOL bInP) const
+ { return (const SwTblBoxValue&)Get( RES_BOXATR_VALUE, bInP); }
+
+//***************************************************************************
+
+inline const SwTblBoxNumFormat &SwFmt::GetTblBoxNumFmt(BOOL bInP) const
+ { return aSet.GetTblBoxNumFmt(bInP); }
+inline const SwTblBoxFormula &SwFmt::GetTblBoxFormula(BOOL bInP) const
+ { return aSet.GetTblBoxFormula(bInP); }
+inline const SwTblBoxValue &SwFmt::GetTblBoxValue(BOOL bInP) const
+ { return aSet.GetTblBoxValue(bInP); }
+
+#endif
diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx
new file mode 100644
index 000000000000..df24004a64fb
--- /dev/null
+++ b/sw/inc/cellfml.hxx
@@ -0,0 +1,164 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CELLFML_HXX
+#define _CELLFML_HXX
+
+#include <tools/string.hxx>
+
+class SwTable;
+class SwNode;
+class SwTableSortBoxes;
+class SwSelBoxes;
+class SwCalc;
+class SwTableBox;
+class SwTableFmlUpdate;
+class SwDoc;
+class String;
+
+class SwTblCalcPara
+{
+ const SwTableBox* pLastTblBox;
+ USHORT nStackCnt, nMaxSize;
+
+public:
+ SwTableSortBoxes *pBoxStk; // Stack fuers erkennen von Rekursionen !
+ SwCalc& rCalc; // akt. Calculator
+ const SwTable* pTbl; // akt. Tabelle
+
+ SwTblCalcPara( SwCalc& rCalculator, const SwTable& rTable );
+ ~SwTblCalcPara();
+
+ BOOL CalcWithStackOverflow();
+ BOOL IsStackOverFlow() const { return nMaxSize == nStackCnt; }
+ BOOL IncStackCnt() { return nMaxSize == ++nStackCnt; }
+ void DecStackCnt() { if( nStackCnt ) --nStackCnt; }
+ void SetLastTblBox( const SwTableBox* pBox ) { pLastTblBox = pBox; }
+};
+
+
+
+class SwTableFormula
+{
+typedef void (SwTableFormula:: *FnScanFormel)( const SwTable&, String&,
+ String&, String*, void* ) const;
+
+ void BoxNmsToPtr( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void PtrToBoxNms( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void RelNmsToBoxNms( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void RelBoxNmsToPtr( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void BoxNmsToRelNm( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void _MakeFormel( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void _GetFmlBoxes( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void _HasValidBoxes( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+ void _SplitMergeBoxNm( const SwTable&, String&, String&, String* = 0,
+ void* pPara = 0 ) const;
+
+ void GetBoxes( const SwTableBox& rStt, const SwTableBox& rEnd,
+ SwSelBoxes& rBoxes ) const;
+ String ScanString( FnScanFormel fnFormel, const SwTable& rTbl,
+ void* = 0 ) const;
+
+ const SwTable* FindTable( SwDoc& rDoc, const String& rNm ) const;
+
+protected:
+ enum NameType { EXTRNL_NAME, INTRNL_NAME, REL_NAME };
+
+ String sFormel; // akt. Formel
+ NameType eNmType; // akt. Darstellungs Art
+ BOOL bValidValue; // TRUE: Formel neu berechnen
+
+ // suche den Node, in dem die Formel steht:
+ // TextFeld -> TextNode,
+ // BoxAttribut -> BoxStartNode
+ // !!! MUSS VON JEDER ABLEITUNG UEBERLADEN WERDEN !!!
+ virtual const SwNode* GetNodeOfFormula() const = 0;
+
+ SwTableFormula( const String& rFormel );
+
+ String MakeFormel( SwTblCalcPara& rCalcPara ) const
+ {
+ return ScanString( &SwTableFormula::_MakeFormel,
+ *rCalcPara.pTbl, &rCalcPara );
+ }
+
+ static USHORT GetLnPosInTbl( const SwTable& rTbl, const SwTableBox* pBox );
+
+public:
+
+ SwTableFormula( const SwTableFormula& rCpy ) { *this = rCpy; }
+ virtual ~SwTableFormula();
+ SwTableFormula& operator=( const SwTableFormula& rCpy )
+ {
+ sFormel = rCpy.sFormel;
+ eNmType = rCpy.eNmType;
+ bValidValue = rCpy.bValidValue;
+ return *this;
+ }
+
+ // erzeuge aus der internen (fuer CORE) die externe (fuer UI) Formel
+ void PtrToBoxNm( const SwTable* pTbl );
+ // erzeuge aus der externen (fuer UI) die interne (fuer CORE) Formel
+ void BoxNmToPtr( const SwTable* pTbl );
+ // erzeuge aus der externen/internen Formel die relative Formel
+ void ToRelBoxNm( const SwTable* pTbl );
+ // wird vorm/nach dem mergen/splitten von Tabellen rerufen
+ void ToSplitMergeBoxNm( SwTableFmlUpdate& rTblUpd );
+
+ // ist gerade eine intern Darstellung aktiv
+ BOOL IsIntrnlName() const { return eNmType == INTRNL_NAME; }
+ // erfrage die akt. Darstellung der Formel
+ NameType GetNameType() const { return eNmType; }
+
+ // erfrage/setze das Flag, ob der akt. Wert gueltig ist
+ BOOL IsValid() const { return bValidValue; }
+ inline void ChgValid( BOOL bNew ) { bValidValue = bNew; }
+
+ const String& GetFormula() const { return sFormel; }
+ void SetFormula( const String& rNew )
+ {
+ sFormel = rNew;
+ bValidValue = FALSE;
+ eNmType = EXTRNL_NAME;
+ }
+
+ USHORT GetBoxesOfFormula( const SwTable& rTbl, SwSelBoxes& rBoxes );
+ // sind alle Boxen gueltig, auf die sich die Formel bezieht?
+ BOOL HasValidBoxes() const;
+};
+
+
+
+#endif
diff --git a/sw/inc/charatr.hxx b/sw/inc/charatr.hxx
new file mode 100644
index 000000000000..f9c4e113ea61
--- /dev/null
+++ b/sw/inc/charatr.hxx
@@ -0,0 +1,178 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CHARATR_HXX
+#define _CHARATR_HXX
+
+#include <format.hxx>
+#include <hintids.hxx> // fuer die WhichIds
+
+
+/******************************************************************************
+ * Implementierung der Charakter-Attribut Methoden vom SwAttrSet
+ * AMA 12.10.94: Umstellung auf SvxItems.
+ ******************************************************************************/
+
+inline const SvxPostureItem &SwAttrSet::GetPosture(BOOL bInP) const
+ { return (const SvxPostureItem&)Get( RES_CHRATR_POSTURE,bInP); }
+inline const SvxPostureItem &SwAttrSet::GetCJKPosture(BOOL bInP) const
+ { return (const SvxPostureItem&)Get( RES_CHRATR_CJK_POSTURE,bInP); }
+inline const SvxPostureItem &SwAttrSet::GetCTLPosture(BOOL bInP) const
+ { return (const SvxPostureItem&)Get( RES_CHRATR_CTL_POSTURE,bInP); }
+inline const SvxWeightItem &SwAttrSet::GetWeight(BOOL bInP) const
+ { return (const SvxWeightItem&)Get( RES_CHRATR_WEIGHT,bInP); }
+inline const SvxWeightItem &SwAttrSet::GetCJKWeight(BOOL bInP) const
+ { return (const SvxWeightItem&)Get( RES_CHRATR_CJK_WEIGHT,bInP); }
+inline const SvxWeightItem &SwAttrSet::GetCTLWeight(BOOL bInP) const
+ { return (const SvxWeightItem&)Get( RES_CHRATR_CTL_WEIGHT,bInP); }
+inline const SvxShadowedItem &SwAttrSet::GetShadowed(BOOL bInP) const
+ { return (const SvxShadowedItem&)Get( RES_CHRATR_SHADOWED,bInP); }
+inline const SvxAutoKernItem &SwAttrSet::GetAutoKern(BOOL bInP) const
+ { return (const SvxAutoKernItem&)Get( RES_CHRATR_AUTOKERN,bInP); }
+inline const SvxWordLineModeItem &SwAttrSet::GetWordLineMode(BOOL bInP) const
+ { return (const SvxWordLineModeItem&)Get( RES_CHRATR_WORDLINEMODE,bInP); }
+inline const SvxContourItem &SwAttrSet::GetContour(BOOL bInP) const
+ { return (const SvxContourItem&)Get( RES_CHRATR_CONTOUR,bInP); }
+inline const SvxKerningItem &SwAttrSet::GetKerning(BOOL bInP) const
+ { return (const SvxKerningItem&)Get( RES_CHRATR_KERNING,bInP); }
+inline const SvxUnderlineItem &SwAttrSet::GetUnderline(BOOL bInP) const
+ { return (const SvxUnderlineItem&)Get( RES_CHRATR_UNDERLINE,bInP); }
+inline const SvxOverlineItem &SwAttrSet::GetOverline(BOOL bInP) const
+ { return (const SvxOverlineItem&)Get( RES_CHRATR_OVERLINE,bInP); }
+inline const SvxCrossedOutItem &SwAttrSet::GetCrossedOut(BOOL bInP) const
+ { return (const SvxCrossedOutItem&)Get( RES_CHRATR_CROSSEDOUT,bInP); }
+inline const SvxFontHeightItem &SwAttrSet::GetSize(BOOL bInP) const
+ { return (const SvxFontHeightItem&)Get( RES_CHRATR_FONTSIZE,bInP); }
+inline const SvxFontHeightItem &SwAttrSet::GetCJKSize(BOOL bInP) const
+ { return (const SvxFontHeightItem&)Get( RES_CHRATR_CJK_FONTSIZE,bInP); }
+inline const SvxFontHeightItem &SwAttrSet::GetCTLSize(BOOL bInP) const
+ { return (const SvxFontHeightItem&)Get( RES_CHRATR_CTL_FONTSIZE,bInP); }
+inline const SvxPropSizeItem &SwAttrSet::GetPropSize(BOOL bInP) const
+ { return (const SvxPropSizeItem&)Get( RES_CHRATR_PROPORTIONALFONTSIZE,bInP); }
+inline const SvxFontItem &SwAttrSet::GetFont(BOOL bInP) const
+ { return (const SvxFontItem&)Get( RES_CHRATR_FONT,bInP); }
+inline const SvxFontItem &SwAttrSet::GetCJKFont(BOOL bInP) const
+ { return (const SvxFontItem&)Get( RES_CHRATR_CJK_FONT,bInP); }
+inline const SvxFontItem &SwAttrSet::GetCTLFont(BOOL bInP) const
+ { return (const SvxFontItem&)Get( RES_CHRATR_CTL_FONT,bInP); }
+inline const SvxColorItem &SwAttrSet::GetColor(BOOL bInP) const
+ { return (const SvxColorItem&)Get( RES_CHRATR_COLOR,bInP); }
+inline const SvxCharSetColorItem &SwAttrSet::GetCharSetColor(BOOL bInP) const
+ { return (const SvxCharSetColorItem&)Get( RES_CHRATR_CHARSETCOLOR,bInP); }
+inline const SvxLanguageItem &SwAttrSet::GetLanguage(BOOL bInP) const
+ { return (const SvxLanguageItem&)Get( RES_CHRATR_LANGUAGE,bInP); }
+inline const SvxLanguageItem &SwAttrSet::GetCJKLanguage(BOOL bInP) const
+ { return (const SvxLanguageItem&)Get( RES_CHRATR_CJK_LANGUAGE,bInP); }
+inline const SvxLanguageItem &SwAttrSet::GetCTLLanguage(BOOL bInP) const
+ { return (const SvxLanguageItem&)Get( RES_CHRATR_CTL_LANGUAGE,bInP); }
+inline const SvxEscapementItem &SwAttrSet::GetEscapement(BOOL bInP) const
+ { return (const SvxEscapementItem&)Get( RES_CHRATR_ESCAPEMENT,bInP); }
+inline const SvxCaseMapItem &SwAttrSet::GetCaseMap(BOOL bInP) const
+ { return (const SvxCaseMapItem&)Get( RES_CHRATR_CASEMAP,bInP); }
+inline const SvxNoHyphenItem &SwAttrSet::GetNoHyphenHere(BOOL bInP) const
+ { return (const SvxNoHyphenItem&)Get( RES_CHRATR_NOHYPHEN,bInP); }
+inline const SvxBlinkItem &SwAttrSet::GetBlink(BOOL bInP) const
+ { return (const SvxBlinkItem&)Get( RES_CHRATR_BLINK,bInP); }
+inline const SvxBrushItem &SwAttrSet::GetChrBackground( BOOL bInP ) const
+ { return (const SvxBrushItem&)Get( RES_CHRATR_BACKGROUND, bInP ); }
+inline const SvxEmphasisMarkItem &SwAttrSet::GetEmphasisMark( BOOL bInP ) const
+ { return (const SvxEmphasisMarkItem&)Get( RES_CHRATR_EMPHASIS_MARK, bInP ); }
+inline const SvxTwoLinesItem &SwAttrSet::Get2Lines( BOOL bInP ) const
+ { return (const SvxTwoLinesItem&)Get( RES_CHRATR_TWO_LINES, bInP ); }
+inline const SvxCharScaleWidthItem &SwAttrSet::GetCharScaleW( BOOL bInP ) const
+ { return (const SvxCharScaleWidthItem&)Get( RES_CHRATR_SCALEW, bInP ); }
+inline const SvxCharRotateItem &SwAttrSet::GetCharRotate( BOOL bInP ) const
+ { return (const SvxCharRotateItem&)Get( RES_CHRATR_ROTATE, bInP ); }
+inline const SvxCharReliefItem &SwAttrSet::GetCharRelief( BOOL bInP ) const
+ { return (const SvxCharReliefItem&)Get( RES_CHRATR_RELIEF, bInP ); }
+inline const SvxCharHiddenItem &SwAttrSet::GetCharHidden( BOOL bInP ) const
+ { return (const SvxCharHiddenItem&)Get( RES_CHRATR_HIDDEN, bInP ); }
+
+/******************************************************************************
+ * Implementierung der Charakter-Attribut Methoden vom SwFmt
+ * AMA: 12.10.94: Umstellung auf SvxItems.
+ ******************************************************************************/
+
+inline const SvxPostureItem &SwFmt::GetPosture(BOOL bInP) const
+ { return aSet.GetPosture(bInP); }
+inline const SvxWeightItem &SwFmt::GetWeight(BOOL bInP) const
+ { return aSet.GetWeight(bInP); }
+inline const SvxShadowedItem &SwFmt::GetShadowed(BOOL bInP) const
+ { return aSet.GetShadowed(bInP); }
+inline const SvxAutoKernItem &SwFmt::GetAutoKern(BOOL bInP) const
+ { return aSet.GetAutoKern(bInP); }
+inline const SvxWordLineModeItem &SwFmt::GetWordLineMode(BOOL bInP) const
+ { return aSet.GetWordLineMode(bInP); }
+inline const SvxContourItem &SwFmt::GetContour(BOOL bInP) const
+ { return aSet.GetContour(bInP); }
+inline const SvxKerningItem &SwFmt::GetKerning(BOOL bInP) const
+ { return aSet.GetKerning(bInP); }
+inline const SvxUnderlineItem &SwFmt::GetUnderline(BOOL bInP) const
+ { return aSet.GetUnderline(bInP); }
+inline const SvxOverlineItem &SwFmt::GetOverline(BOOL bInP) const
+ { return aSet.GetOverline(bInP); }
+inline const SvxCrossedOutItem &SwFmt::GetCrossedOut(BOOL bInP) const
+ { return aSet.GetCrossedOut(bInP); }
+inline const SvxFontHeightItem &SwFmt::GetSize(BOOL bInP) const
+ { return aSet.GetSize(bInP); }
+inline const SvxPropSizeItem &SwFmt::GetPropSize(BOOL bInP) const
+ { return aSet.GetPropSize(bInP); }
+inline const SvxFontItem &SwFmt::GetFont(BOOL bInP) const
+ { return aSet.GetFont(bInP); }
+inline const SvxFontItem &SwFmt::GetCJKFont(BOOL bInP) const
+ { return aSet.GetCJKFont(bInP); }
+inline const SvxFontItem &SwFmt::GetCTLFont(BOOL bInP) const
+ { return aSet.GetCTLFont(bInP); }
+inline const SvxColorItem &SwFmt::GetColor(BOOL bInP) const
+ { return aSet.GetColor(bInP); }
+ inline const SvxCharSetColorItem &SwFmt::GetCharSetColor(BOOL bInP) const
+ { return aSet.GetCharSetColor(bInP); }
+inline const SvxLanguageItem &SwFmt::GetLanguage(BOOL bInP) const
+ { return aSet.GetLanguage(bInP); }
+inline const SvxEscapementItem &SwFmt::GetEscapement(BOOL bInP) const
+ { return aSet.GetEscapement(bInP); }
+inline const SvxCaseMapItem &SwFmt::GetCaseMap(BOOL bInP) const
+ { return aSet.GetCaseMap(bInP); }
+inline const SvxNoHyphenItem &SwFmt::GetNoHyphenHere(BOOL bInP) const
+ { return aSet.GetNoHyphenHere(bInP); }
+inline const SvxBlinkItem &SwFmt::GetBlink(BOOL bInP) const
+ { return aSet.GetBlink(bInP); }
+inline const SvxBrushItem &SwFmt::GetChrBackground(BOOL bInP) const
+ { return aSet.GetChrBackground(bInP); }
+inline const SvxEmphasisMarkItem &SwFmt::GetEmphasisMark( BOOL bInP ) const
+ { return aSet.GetEmphasisMark(bInP); }
+inline const SvxTwoLinesItem &SwFmt::Get2Lines( BOOL bInP ) const
+ { return aSet.Get2Lines(bInP); }
+inline const SvxCharScaleWidthItem &SwFmt::GetCharScaleW( BOOL bInP ) const
+ { return aSet.GetCharScaleW(bInP); }
+inline const SvxCharRotateItem &SwFmt::GetCharRotate( BOOL bInP ) const
+ { return aSet.GetCharRotate(bInP); }
+inline const SvxCharReliefItem &SwFmt::GetCharRelief( BOOL bInP ) const
+ { return aSet.GetCharRelief(bInP); }
+inline const SvxCharHiddenItem &SwFmt::GetCharHidden( BOOL bInP ) const
+ { return aSet.GetCharHidden(bInP); }
+
+#endif
diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx
new file mode 100644
index 000000000000..a3e4b22a0b88
--- /dev/null
+++ b/sw/inc/charfmt.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CHARFMT_HXX
+#define _CHARFMT_HXX
+
+#include <format.hxx>
+
+class SwCharFmt : public SwFmt
+{
+ friend class SwDoc;
+ friend class SwTxtFmtColl;
+
+ SwCharFmt( SwAttrPool& rPool, const sal_Char* pFmtName,
+ SwCharFmt *pDerivedFrom )
+ : SwFmt( rPool, pFmtName, aCharFmtSetRange, pDerivedFrom, RES_CHRFMT )
+ {}
+ SwCharFmt( SwAttrPool& rPool, const String &rFmtName,
+ SwCharFmt *pDerivedFrom )
+ : SwFmt( rPool, rFmtName, aCharFmtSetRange, pDerivedFrom, RES_CHRFMT )
+ {}
+
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+};
+
+namespace CharFmt
+{
+ extern const SfxItemSet* GetItemSet( const SfxPoolItem& rAttr );
+ extern const SfxPoolItem* GetItem( const SwTxtAttr& rAttr, USHORT nWhich );
+ extern BOOL IsItemIncluded( const USHORT nWhich, const SwTxtAttr *pAttr );
+}
+
+#endif
+
+
+
diff --git a/sw/inc/chcmprse.hxx b/sw/inc/chcmprse.hxx
new file mode 100644
index 000000000000..04a87435eadb
--- /dev/null
+++ b/sw/inc/chcmprse.hxx
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CHCMPRSE_HXX
+#define _CHCMPRSE_HXX
+
+enum SwCharCompressType{ CHARCOMPRESS_NONE,
+ CHARCOMPRESS_PUNCTUATION,
+ CHARCOMPRESS_PUNCTUATION_KANA };
+
+
+#endif
+
+
+
+
diff --git a/sw/inc/checkit.hxx b/sw/inc/checkit.hxx
new file mode 100644
index 000000000000..ed6293dcd787
--- /dev/null
+++ b/sw/inc/checkit.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CHECKIT_HXX
+#define _CHECKIT_HXX
+
+#include <com/sun/star/uno/Reference.h>
+
+#ifndef _COM_SUN_STAR_I18N_XEXTENDEDINPUTSEQUENCECHECKER_HDL_
+#include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp>
+#endif
+
+/*************************************************************************
+ * class SwCheckIt
+ *
+ * Wrapper for the XInputSequenceChecker
+ *************************************************************************/
+
+class SwCheckIt
+{
+public:
+ com::sun::star::uno::Reference < com::sun::star::i18n::XExtendedInputSequenceChecker > xCheck;
+
+ SwCheckIt();
+};
+
+extern SwCheckIt* pCheckIt;
+
+#endif
+
diff --git a/sw/inc/chpfld.hxx b/sw/inc/chpfld.hxx
new file mode 100644
index 000000000000..40f2f9ecf1d3
--- /dev/null
+++ b/sw/inc/chpfld.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CHPFLD_HXX
+#define _CHPFLD_HXX
+
+#include "fldbas.hxx"
+
+
+class SwFrm;
+class SwCntntNode;
+class SwTxtNode;
+
+
+enum SwChapterFormat
+{
+ CF_BEGIN,
+ CF_NUMBER = CF_BEGIN, // nur die Kapitelnummer
+ CF_TITLE, // nur die "Ueberschrift"
+ CF_NUM_TITLE, // Kapitelnummer und "Ueberschrift"
+ CF_NUMBER_NOPREPST, // nur die Kapitelnummer ohne Post/Prefix
+ CF_NUM_NOPREPST_TITLE, // Kapitelnummer ohne Post/Prefix und "Ueberschrift"
+ CF_END
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Kapitel
+ --------------------------------------------------------------------*/
+
+class SwChapterFieldType : public SwFieldType
+{
+public:
+ SwChapterFieldType();
+
+ virtual SwFieldType* Copy() const;
+
+};
+
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Kapitelnummer
+ --------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwChapterField : public SwField
+{
+ friend class SwChapterFieldType;
+ BYTE nLevel;
+ String sTitle, sNumber, sPre, sPost;
+public:
+ SwChapterField(SwChapterFieldType*, sal_uInt32 nFmt = 0);
+
+ // --> OD 2008-02-14 #i53420#
+// void ChangeExpansion( const SwFrm*,
+// const SwTxtNode*,
+// BOOL bSrchNum = FALSE);
+ void ChangeExpansion( const SwFrm*,
+ const SwCntntNode*,
+ BOOL bSrchNum = FALSE);
+ // <--
+ void ChangeExpansion(const SwTxtNode &rNd, BOOL bSrchNum);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline BYTE GetLevel() const;
+ inline void SetLevel(BYTE);
+
+ inline const String& GetNumber() const;
+ inline const String& GetTitle() const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline BYTE SwChapterField::GetLevel() const { return nLevel; }
+inline void SwChapterField::SetLevel(BYTE nLev) { nLevel = nLev; }
+inline const String& SwChapterField::GetNumber() const { return sNumber; }
+inline const String& SwChapterField::GetTitle() const { return sTitle; }
+
+#endif // _CHPFLD_HXX
diff --git a/sw/inc/chrdlg.hrc b/sw/inc/chrdlg.hrc
new file mode 100644
index 000000000000..447229eb8965
--- /dev/null
+++ b/sw/inc/chrdlg.hrc
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CHRDLG_HRC
+#define _CHRDLG_HRC
+
+#include "rcid.hrc"
+
+#define DLG_CHAR (RC_CHRDLG_BEGIN + 1)
+#define DLG_PARA (RC_CHRDLG_BEGIN + 2)
+#define DLG_PAGE (RC_CHRDLG_BEGIN + 3)
+#define DLG_BREAK (RC_CHRDLG_BEGIN + 5)
+#define DLG_PAGENUM (RC_CHRDLG_BEGIN + 6)
+#define DLG_HEADER_FOOTER (RC_CHRDLG_BEGIN + 7)
+#define DLG_DROPCAPS (RC_CHRDLG_BEGIN + 8)
+#define DLG_DRAWCHAR (RC_CHRDLG_BEGIN + 9)
+#define DLG_DRAWPARA (RC_CHRDLG_BEGIN + 10)
+
+// Tabpages -> jetzt in globals.hrc
+
+#define STR_TEXTCOLL_HEADER (RC_CHRDLG_BEGIN + 2)
+#define STR_PAGEFMT_HEADER (RC_CHRDLG_BEGIN + 4)
+#define SW_STR_NONE (RC_CHRDLG_BEGIN + 5)
+//#define STR_NUMFMT (RC_CHRDLG_BEGIN + 6)
+
+#define MSG_ILLEGAL_PAGENUM (RC_CHRDLG_BEGIN + 1)
+
+#define CHRDLG_ACT_END DLG_DRAWPARA
+
+#if CHRDLG_ACT_END > RC_CHRDLG_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#define DLG_SWDROPCAPS (RC_CHRDLG_BEGIN + 11)
+
+#endif
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
new file mode 100644
index 000000000000..a206392aad3b
--- /dev/null
+++ b/sw/inc/cmdid.h
@@ -0,0 +1,1310 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+/******************************************************************************
+Achtung: Ab sofort sind in diesem File keine C++-Kommentare (//) mehr
+ erlaubt, da es von swicli.c included wird!
+******************************************************************************/
+
+#ifndef INCLUDED_SW_CMDID_H
+#define INCLUDED_SW_CMDID_H
+
+#include <sfx2/sfx.hrc>
+
+#ifndef SW_UNOMID_H
+#include <unomid.h>
+#endif
+
+/* Flags die mittels des Disable-Features in den Slot-Definitionen ausgenutzt
+ * werden */
+#define SW_DISABLE_ON_PROTECTED_CURSOR 0x00000001
+#define SW_DISABLE_ON_MAILBOX_EDITOR 0x00000002
+
+
+#define FN_FILE SID_SW_START
+#define FN_EDIT (SID_SW_START + 100)
+#define FN_VIEW (SID_SW_START + 200)
+#define FN_INSERT (SID_SW_START + 300)
+#define FN_FORMAT (SID_SW_START + 400)
+#define FN_EXTRA (SID_SW_START + 600)
+#define FN_WINDOW (SID_SW_START + 700)
+#define FN_HELP (SID_SW_START + 800)
+#define FN_SELECTION (SID_SW_START + 900)
+#define FN_QUERY (SID_SW_START + 1000)
+#define FN_ENVELP (SID_SW_START + 1050)
+#define FN_PARAM (SID_SW_START + 1100)
+#define FN_STAT (SID_SW_START + 1180)
+#define FN_PRNOPT (SID_SW_START + 1200)
+#define FN_PGPREVIEW (SID_SW_START + 1250)
+#define FN_FRAME (SID_SW_START + 1300)
+#define FN_INSERT2 (SID_SW_START + 1400)
+#define FN_FORMAT2 (SID_SW_START + 1600)
+#define FN_EDIT2 (SID_SW_START + 1800)
+#define FN_QUERY2 (SID_SW_START + 2000)
+#define FN_EXTRA2 (SID_SW_START + 2200)
+#define FN_PARAM2 (SID_SW_START + 2400)
+#define FN_NOTES (SID_SW_START + 2500)
+
+ /* More accurately, this range should be from FN_EXTRA2 to FN_PARAM2-1, but
+ * FN_NUMBER_NEWSTART comes from FN_FORMAT2, and FN_PARAM_LINK_DISPLAY_NAME
+ * comes from FN_PARAM2 so we need to include FORMAT2,
+ * EDIT2 and QUERY2 and PARAM2 in the range...hopefully this will be fixed
+ * soon */
+
+#define FN_UNO_RANGE_BEGIN FN_FORMAT2
+#define FN_UNO_RANGE_END (FN_PARAM2 + 199)
+
+
+#define HELP_OFFSET 1100
+#define CMD_STR_OFFSET 2200
+#define CMD_STR_OFFSET_MULTILANG 3300
+#define CMDID_END 5500
+
+/*--------------------------------------------------------------------
+ Bereich: Datei
+ --------------------------------------------------------------------*/
+#define FN_CLOSE_FILE (FN_FILE + 1 ) /* Schliessen */
+#define FN_LAUNCH_REGISTRY (FN_FILE + 2 ) /* Ablage */
+
+
+#define FN_NEW_GLOBAL_DOC (FN_FILE + 4 ) /* Globaldokument erzeugen */
+#define FN_NEW_FILE (FN_FILE + 5 ) /* Neu */
+#define FN_NEW_FILE_DLG (FN_FILE + 6 ) /* Neu Dialog */
+#define FN_OPEN_FILE (FN_FILE + 7 ) /* Oeffnen */
+#define FN_EDIT_FILE (FN_FILE + 8 ) /* Oeffnen oder ToTop */
+
+#define FN_INETFILE (FN_FILE + 9 ) /* Internet File-Dialog */
+
+#define FN_PRINT_FILE (FN_FILE + 10) /* Drucken */
+#define FN_PRINT_FILE_OPTIONS (FN_FILE + 11) /* Drucken Optionen */
+#define FN_SAVE_FILE_AS (FN_FILE + 12) /* Speichern unter */
+#define FN_SAVE_FILE (FN_FILE + 13) /* Speichern */
+#define FN_SETUP_PRINTER (FN_FILE + 14) /* Druckereinstellung */
+#define FN_SETUP_PRINTER_DLG (FN_FILE + 15) /* Druckereinstellung */
+#define FN_SHOW_PREVIEW (FN_FILE + 16) /* Druckbild */
+#define FN_EXIT (FN_FILE + 17) /* Writer beenden */
+#define FN_PRINT_CFG_DLG (FN_FILE + 18) /* Optionen Drucken */
+
+
+
+#define FN_SAVE_ALL (FN_FILE + 23) /* Alle Files speichern */
+#define FN_NEW_FILE_DEFAULT (FN_FILE + 24) /* Neue Datei mit Standardvorlage */
+#define FN_PRINT_FILE_DEFAULT (FN_FILE + 25) /* Drucken mit Defaults */
+#define FN_LAUNCH_EQ_EDITOR (FN_FILE + 26) /* Formel Editor */
+#define FN_CHANGE_PRINTER (FN_FILE + 27) /* Drucker einstellen */
+#define FN_FAX_END (FN_FILE + 29) /* Faxen fertig, Id fuer PostMessage */
+
+#define FN_SELECT_DATABASE (FN_FILE + 30) /* Selektion Datenbank */
+#define FN_DOC_INFO_DLG (FN_FILE + 31) /* Dokumentinfo */
+#define FN_DOC_MGR_DLG (FN_FILE + 32) /* Dokument-Manager */
+
+#define FN_GET_DOCSTAT (FN_FILE + 33) /* Dokumentstatistik einzeln auslesen */
+
+
+#define FN_SAVE_SELECTION (FN_FILE + 35) /* Selektion speichern */
+
+#define FN_OUTLINE_TO_IMPRESS (FN_FILE + 36) /* Outline zu StarImpress senden */
+#define FN_OUTLINE_TO_CLIPBOARD (FN_FILE + 37) /* Outline in das Clipboad copieren */
+
+#define FN_NEW_HTML_DOC (FN_FILE + 40 ) /* HTML-Dokument "erzeugen" */
+
+#define FN_APP_START (FN_FILE + 98) /* fuer Makro bei App.Start */
+#define FN_APP_END (FN_FILE + 99) /* fuer Makro bei App.Ende */
+
+/*--------------------------------------------------------------------
+ Bereich: Bearbeiten
+ --------------------------------------------------------------------*/
+#define FN_CLEAR (FN_EDIT + 1 ) /* Loeschen */
+#define FN_COPY (FN_EDIT + 2 ) /* Kopieren */
+#define FN_CUT (FN_EDIT + 3 ) /* Ausschneiden */
+#define FN_EDIT_FIELD (FN_EDIT + 4 ) /* Textbefehl bearbeiten */
+#define FN_EDIT_FIELD_DLG (FN_EDIT + 5 ) /* Textbefehl bearbeiten */
+#define FN_EDIT_FILE_INFO (FN_EDIT + 6 ) /* Dokumentinfo */
+#define FN_EDIT_FILE_INFO_DLG (FN_EDIT + 7 ) /* Dokumentinfo Dialog */
+#define FN_EDIT_LINK (FN_EDIT + 8 ) /* Verknuepfungen */
+#define FN_EDIT_LINK_DLG (FN_EDIT + 9 ) /* Verknuepfungen */
+#define FN_GOTO (FN_EDIT + 11) /* Gehe zu */
+
+#define FN_PASTE (FN_EDIT + 13) /* Einfuegen */
+#define FN_PASTESPECIAL_DLG (FN_EDIT + 15) /* Verknuepfung einfuegen */
+#define FN_NUMBER_BULLETS (FN_EDIT + 21) /* Bullets */
+#define FN_REPEAT (FN_EDIT + 22) /* Letzten Befehl wiederholen */
+#define FN_EDIT_IDX_ENTRY_DLG (FN_EDIT + 23) /* Index-Entry bearbeiten */
+#define FN_UPDATE_FIELDS (FN_EDIT + 26) /* Feldinhalte erneuern */
+#define FN_EXECUTE_MACROFIELD (FN_EDIT + 27) /* Macrofeld ausfuehren */
+#define FN_EDIT_FORMULA (FN_EDIT + 28) /* Formel in RibbonBar bearbeiten */
+#define FN_CALC_TABLE (FN_EDIT + 29) /* Tabelle durchrechnen */
+
+/*--------------------------------------------------------------------
+ Bereich: Bullets
+ --------------------------------------------------------------------*/
+#define FN_NUM_BULLET_DOWN (FN_EDIT + 30) /* Runterstufen */
+#define FN_NUM_BULLET_UP (FN_EDIT + 31) /* Raufstufen */
+#define FN_NUM_BULLET_PREV (FN_EDIT + 32) /* zum vorigen Eintrag */
+#define FN_NUM_BULLET_NEXT (FN_EDIT + 33) /* zum naechsten Eintrag */
+#define FN_NUM_BULLET_MOVEUP (FN_EDIT + 34) /* nach oben schieben */
+#define FN_NUM_BULLET_MOVEDOWN (FN_EDIT + 35) /* nach unten schieben */
+#define FN_NUM_BULLET_NONUM (FN_EDIT + 36) /* Eintrag ohne Nummer */
+#ifndef FN_NUM_BULLET_OFF //in SVX already
+#define FN_NUM_BULLET_OFF (FN_EDIT + 37) /* Numerierung aus */
+#endif
+
+
+// schon im SVX
+//#define FN_NUM_BULLET_ON (FN_EDIT + 38) /* Numerierung mit Bullets an */
+
+#define FN_NUM_BULLET_OUTLINE_DOWN (FN_EDIT + 39) /* Runterstufen mit Unterpunkten */
+#define FN_NUM_BULLET_OUTLINE_UP (FN_EDIT + 40) /* Raufstufen mit Unterpunkten */
+#define FN_NUM_BULLET_OUTLINE_MOVEUP (FN_EDIT + 41) /* nach oben schieben mit Unterpunkten */
+#define FN_NUM_BULLET_OUTLINE_MOVEDOWN (FN_EDIT + 42) /* nach unten schieben mit Unterpunkten */
+#define FN_UPDATE_INPUTFIELDS (FN_EDIT + 43) /* Eingabefelder updaten */
+// schon im SVX
+//#define FN_NUM_NUMBERING_ON (FN_EDIT + 44) /* Numerierung an */
+
+#define FN_NUM_OR_NONUM (FN_EDIT + 46) /* Nummer ein-/aus */
+
+#define FN_GOTO_NEXT_INPUTFLD (FN_EDIT + 47) /* zum naechsten EingabeFeld */
+#define FN_GOTO_PREV_INPUTFLD (FN_EDIT + 48) /* zum vorherigen EingabeFeld */
+
+#define FN_REPEAT_SEARCH (FN_EDIT + 50) /* Suche wiederholen */
+#define FN_REPEAT_REPLACE (FN_EDIT + 51) /* Ersetzen wiederholen */
+#define FN_UPDATE_GRAFIC (FN_EDIT + 53) /* Grafik aendern */
+#define FN_SETTAB_ATCURPOS (FN_EDIT + 54) /* Tab an der aktuellen Pos setzen */
+#define FN_SET_LR_IND_ATCURPOS (FN_EDIT + 55) /* EZE und LR setzen */
+#define FN_FRMCNT_TO_BODY (FN_EDIT + 56) /* Rahmeninhalt zu Text */
+#define FN_UPDATE_TOXBASE (FN_EDIT + 57) /* Naechstes Verzeichnis erneuern */
+
+#define FN_REPAGINATE (FN_EDIT + 61) /* Neuformatierung erzwingen */
+#define FN_EDIT_FOOTNOTE (FN_EDIT + 62) /* Fussnote bearbeiten */
+
+#define FN_EDIT_REGION (FN_EDIT + 65) /* Bereiche bearbeiten */
+#define FN_GOTO_REFERENCE (FN_EDIT + 66) /* Von der Refmark zur Referenz */
+
+// schon im Svx definiert
+#define FN_NEXT_BOOKMARK (FN_EDIT + 68) /* */
+#define FN_PREV_BOOKMARK (FN_EDIT + 69) /* */
+
+/*Navigator ToolBoxen*/
+#define FN_SELECT_BOOKMARK (FN_EDIT + 70) /**/
+#define FN_ITEM_DOWN (FN_EDIT + 71) /**/
+#define FN_ITEM_LEFT (FN_EDIT + 72) /**/
+#define FN_ITEM_RIGHT (FN_EDIT + 73) /**/
+#define FN_ITEM_UP (FN_EDIT + 74) /**/
+#define FN_DOWN (FN_EDIT + 75) /**/
+
+#define FN_SELECT_FOOTER (FN_EDIT + 77) /**/
+#define FN_SELECT_FRAME (FN_EDIT + 78) /**/
+#define FN_SELECT_HEADER (FN_EDIT + 79) /**/
+#define FN_PAGENUMBER (FN_EDIT + 80) /**/
+#define FN_SELECT_AUTO_BOOKMARK (FN_EDIT + 81) /**/
+#define FN_SELECT_FOOTNOTE (FN_EDIT + 82) /**/
+#define FN_SELECT_SET_AUTO_BOOKMARK (FN_EDIT + 83) /**/
+#define FN_SELECT_TABLE (FN_EDIT + 84) /**/
+#define FN_SELECT_INDEX (FN_EDIT + 85) /**/
+#define FN_UP (FN_EDIT + 86) /**/
+
+
+//#define FN_DELETE_REGION (FN_EDIT + 89) /* Bereiche loeschen */
+
+
+#define FN_SELECT_PARA (FN_EDIT + 97) /* Absatz selektieren */
+
+#define FN_SELECT_CONTENT (FN_EDIT + 99) /* Navigator - Inhaltstyp */
+
+
+
+
+//#define FN_REDLINE_PROTECT (FN_EDIT2 + 23) /* Redlining password */ ->moved to SVX
+#define FN_UPDATE_ALL_LINKS (FN_EDIT2 + 24) /* alle Links updaten */
+
+//#define FN_REDLINE_ON (FN_EDIT2 + 25) /* Redlining anschalten */ -> moved to SVX
+#define FN_REDLINE_SHOW (FN_EDIT2 + 26) /* Redlining anzeigen */
+#define FN_REDLINE_COMMENT (FN_EDIT2 + 27) /* Redlining kommentieren */
+
+#define FN_UPDATE_ALL (FN_EDIT2 + 28) /* FN_UPDATE_ALL_LINKS,
+ FN_UPDATE_FIELDS,
+ FN_UPDATE_TOX,
+ CalcLayout */
+
+#define FN_REDLINE_ACCEPT (FN_EDIT2 + 29) /* Redlining annehmen/ablehnen */
+#define FN_ATTR_COLUMNS (FN_EDIT2 + 31) /* SlotId fuer SwFmtCol */
+#define FN_EDIT_CURRENT_TOX (FN_EDIT2 + 32) /* edit current index */
+#define FN_EDIT_AUTH_ENTRY_DLG (FN_EDIT2 + 33) /* edit authorities entry*/
+#define FN_UPDATE_CHARTS (FN_EDIT2 + 34) /* update all charts */
+
+#define FN_EDIT_HYPERLINK (FN_EDIT2 + 35) /* edit hyperlink */
+#define FN_NUM_CONTINUE (FN_EDIT2 + 36) /* continue previous numbering */
+#define FN_REDLINE_ACCEPT_DIRECT (FN_EDIT2 + 37) /* accept redline at current position*/
+#define FN_REDLINE_REJECT_DIRECT (FN_EDIT2 + 38) /* reject redline at current position*/
+#define FN_REMOVE_HYPERLINK (FN_EDIT2 + 39) /* remove hyperlink attribute */
+#define FN_COPY_HYPERLINK_LOCATION (FN_EDIT2 + 40) /* copy hyperlink URL to clipboard */
+
+/*--------------------------------------------------------------------
+ Bereich: Bearbeiten
+ --------------------------------------------------------------------*/
+
+#define FN_REFRESH_VIEW (FN_VIEW + 1) /* Refresh/Redraw */
+#define FN_SHOW_OUTLINE_VIEW (FN_VIEW + 2) /* Gliederungsansicht */
+
+#define FN_DRAW_WRAP_DLG (FN_VIEW + 3) /* Draw Umlauf-Dlg */
+
+#define FN_RULER (FN_VIEW + 11) /* Horizontales Lineal */
+
+#define FN_VIEW_GRAPHIC (FN_VIEW + 13) /* Grafiken anzeigen */
+#define FN_VIEW_BOUNDS (FN_VIEW + 14) /* Begrenzungen */
+#define FN_VIEW_FIELDS (FN_VIEW + 15) /* Textbefehle */
+#define FN_VLINEAL (FN_VIEW + 16) /* Vertikales Lineal */
+#define FN_VSCROLLBAR (FN_VIEW + 17) /* Vertikaler Scrollbar */
+#define FN_HSCROLLBAR (FN_VIEW + 18) /* Horizontaler Scrollbar */
+#define FN_TOOLBOX_TOGGLE (FN_VIEW + 19) /* Toolboxinhalte umschalten */
+#define FN_VIEWOPTIONS_ON (FN_VIEW + 20) /* Gruppe Viewoptions an */
+#define FN_VIEWOPTIONS_OFF (FN_VIEW + 21) /* Gruppe Viewoptions aus */
+#define FN_CONTROLS_ON (FN_VIEW + 22) /* Gruppe Bedienelemte an */
+#define FN_CONTROLS_OFF (FN_VIEW + 23) /* Gruppe Bedienelemte aus */
+
+#define FN_VIEW_META_CHARS (FN_VIEW + 24) /* Sonderzeichen anzeigen */
+#define FN_VIEW_MARKS (FN_VIEW + 25) /* Markierungen anzeigen */
+#define FN_VIEW_FIELDNAME (FN_VIEW + 26) /* Feldname anzeigen */
+#define FN_VIEW_TABLEGRID (FN_VIEW + 27) /* Tabellenbegrenzungen anzeigen */
+
+#define FN_SET_PAGE (FN_VIEW + 29) /* Seitenvorlage am Absatz setzen */
+
+#define FN_TOOLBOX_SWITCH (FN_VIEW + 30) /* Auf Textshell umschalten */
+
+
+//noch mehr Navigator
+#define FN_CONTENT_LB (FN_VIEW + 32) /**/
+#define FN_SHOW_CONTENT_BOX (FN_VIEW + 33) /**/
+#define FN_SHOW_ROOT (FN_VIEW + 34) /**/
+#define FN_DROP_REGION (FN_VIEW + 35) /**/
+#define FN_OUTLINE_LEVEL (FN_VIEW + 36) /**/
+
+#define FN_PRINT_LAYOUT (FN_VIEW + 37) /* invertierter BrowseMode */
+
+#define FN_DROP_REGION_LINK (FN_VIEW + 38) /**/
+#define FN_DROP_REGION_COPY (FN_VIEW + 39) /**/
+
+#define FN_SCROLL_NAVIGATION (FN_VIEW + 40) /* Navigationscontroller am Scrollbar*/
+#define FN_SCROLL_NEXT_PREV (FN_VIEW + 41) /* arbeitet den MoveType ab */
+
+#define FN_VIEW_HIDDEN_PARA (FN_VIEW + 42) /* Versteckte Absaetze */
+#define FN_VIEW_SMOOTH_SCROLL (FN_VIEW + 43)
+
+#define FN_GLOBAL_SWITCH (FN_VIEW + 44) /* umschalten zw. Global und Inhalt*/
+#define FN_GLOBAL_EDIT (FN_VIEW + 45) /* bearbeiten */
+#define FN_GLOBAL_UPDATE (FN_VIEW + 46) /* aktualisieren */
+#define FN_GLOBAL_OPEN (FN_VIEW + 47) /* oeffnen */
+#define FN_GLOBAL_SAVE_CONTENT (FN_VIEW + 48) /* Inhalt der Verknuepfung mitspeichern */
+#define FN_CREATE_NAVIGATION (FN_VIEW + 49) /* Navigations-Controller erzeugen */
+#define FN_PREVIEW_ZOOM (FN_VIEW + 51) /* der Tabellencontroller fuer den Zoom */
+
+#define FN_SET_MODOPT_TBLNUMFMT (FN_VIEW + 52) /* Zahlenerkennung in Tabellen */
+#define FN_HSCROLL_METRIC (FN_VIEW + 53) /* Metric horizontal scrollbar */
+#define FN_VSCROLL_METRIC (FN_VIEW + 54) /* Metric vertical scrollbar */
+#define FN_VIEW_NOTES (FN_VIEW + 55)
+
+/*--------------------------------------------------------------------
+ Bereich: Einfuegen
+ --------------------------------------------------------------------*/
+// schon im Svx definiert
+#define FN_INSERT_BOOKMARK (FN_INSERT + 2 ) /* Sprungmarke einfuegen */
+
+// schon im SVX unter der gleichen Id
+//#define FN_INSERT_BREAK (FN_INSERT + 3 ) /* Umbruch */
+
+#define FN_INSERT_BREAK_DLG (FN_INSERT + 4 ) /* Umbruch */
+#define FN_INSERT_COLUMN_BREAK (FN_INSERT + 5 ) /* Spaltenumbruch */
+#define FN_INSERT_DATE_TIME (FN_INSERT + 6 ) /* Datum/Uhrzeit */
+#define FN_INSERT_FIELD (FN_INSERT + 8 ) /* Textbefehl */
+#define FN_CHANGE_DBFIELD (FN_INSERT + 9 ) /* Datenbankfeld aendern */
+
+#define FN_INSERT_CAPTION (FN_INSERT + 10) /* Beschriftung */
+#define FN_INSERT_DBFIELD (FN_INSERT + 11) /* Insert database field - for recording */
+#define FN_INSERT_FOOTNOTE_DLG (FN_INSERT + 12) /* Dialog Fussnote */
+
+#define FN_INSERT_REF_FIELD (FN_INSERT + 13) /* Refernzfeld einfuegen */
+
+#define FN_INSERT_HYPERLINK (FN_INSERT + 14) /* Zeichendialog/HyperlinkPage*/
+
+#define FN_INSERT_INDEX (FN_INSERT + 16) /* Stichworteintrag */
+#define FN_INSERT_INDEX_DLG (FN_INSERT + 17) /* Stichworteintrag */
+#define FN_INSERT_LINEBREAK (FN_INSERT + 18) /* Zeilenumbruch */
+#define FN_INSERT_FIELD_DATA_ONLY (FN_INSERT + 19) /* field dialog for mail merge*/
+#define FN_INSERT_OBJECT (FN_INSERT + 21) /* Object */
+#define FN_INSERT_OBJECT_DLG (FN_INSERT + 22) /* Object */
+#define FN_INSERT_PAGEBREAK (FN_INSERT + 23) /* Seitenumbruch */
+#define FN_INSERT_PAGENO (FN_INSERT + 24) /* Seitennummer */
+#define FN_INSERT_PARAGRAPH (FN_INSERT + 25) /* Absatz */
+#define FN_INSERT_RECORD (FN_INSERT + 26) /* Datensatz einfuegen */
+#define FN_MERGE_RECORD (FN_INSERT + 27) /* Datensatz mischen */
+#define FN_INSERT_SYMBOL (FN_INSERT + 28) /* Sonderzeichen */
+#define FN_POSTIT (FN_INSERT + 29) /* PostIt einfuegen/bearbeiten */
+#define FN_INSERT_TABLE (FN_INSERT + 30) /* Tabelle */
+#define FN_INSERT_STRING (FN_INSERT+31)
+#define FN_INSERT_COLS (FN_INSERT + 32) /* Spalten einfuegen */
+#define FN_INSERT_FRAME_INTERACT (FN_INSERT + 33) /* Rahmen einfuegen aktiv */
+#define FN_INSERT_FRAME (FN_INSERT + 34) /* Rahmen einfuegen */
+
+#define FN_INSERT_IDX_ENTRY_DLG (FN_INSERT + 35) /* Verzeichniseintrag einfuegen */
+#define FN_INSERT_FRAME_INTERACT_NOCOL (FN_INSERT + 36) /*insert interactive non column frame*/
+
+//#define FN_INSERT_SOFT_HYPHEN (FN_INSERT + 43) /* weicher Trenner */
+//#define FN_INSERT_HARD_SPACE (FN_INSERT + 44) /* hartes Space */
+
+
+#define FN_TOOL_GROUP (FN_INSERT + 47) /* Objekte gruppieren */
+#define FN_TOOL_UNGROUP (FN_INSERT + 48) /* Gruppierng aufheben */
+
+#define FN_TOOL_ANKER (FN_INSERT + 49) /* Draw-Objekt umankern */
+#define FN_TOOL_ANKER_PAGE (FN_INSERT + 50) /* Draw-Objekt an Seite verankern */
+#define FN_TOOL_ANKER_PARAGRAPH (FN_INSERT + 51) /* Draw-Objekt am Absatz verankern */
+#define FN_TOOL_HIERARCHIE (FN_INSERT + 52) /* Hierarchie aendern */
+
+#define FN_MAILMERGE_WIZARD (FN_INSERT + 64) /* mail merge wizard */
+#define FN_QRY_OPEN_TABLE (FN_INSERT + 65) /* Datenbank oeffnen (Basic) */
+#define FN_TOOL_ANKER_FRAME (FN_INSERT + 66) /* Draw-Objekt am Rahmen verankern */
+#define FN_QRY_MERGE (FN_INSERT + 67) /* Datensatz einfuegen (Serienbrief) */
+#define FN_MAILMERGE_CHILDWINDOW (FN_INSERT + 68) /* back-to-mail-merge-wizard child window*/
+#define FN_INSERT_SMA (FN_INSERT + 69) /* Einfuegen StarMath */
+
+#define FN_QRY_GET_COLUMN_NAME (FN_INSERT + 70) /* Anzahl der Spalten (Basic) */
+#define FN_QRY_GET_COLUMN_TYPE (FN_INSERT + 71) /* Type des Datenbankfeldes ermitteln (Basic) */
+#define FN_QRY_GET_COLUMN_TEXT (FN_INSERT + 72) /* Inhalt des aktuellen Datensatzes (Basic) */
+#define FN_QRY_DEL_DEFINED_DB (FN_INSERT + 75) /* Datenbankdefinition loeschen (Basic) */
+
+#define FN_DRAWTEXT_ATTR_DLG (FN_INSERT + 76) /* DrawText positionieren */
+
+#define FN_QRY_APPEND_RECORD (FN_INSERT + 77) /* Neuen Datensatz anhaengen */
+#define FN_QRY_UPDATE_RECORD (FN_INSERT + 78) /* Datensatzspalte aendern */
+#define FN_QRY_DELETE_RECORD (FN_INSERT + 79) /* Datensatz loeschen */
+#define FN_QRY_GET_PHYS_RECORD_ID (FN_INSERT + 80) /* Physikalische (absolute) Datensatznummer erfragen (Basic) */
+
+#define FN_TOOL_ANKER_CHAR (FN_INSERT + 84) /* DrawObject zeichengebunden */
+//#define FN_INSERT_HARDHYPHEN (FN_INSERT + 85) /* Bindestrich ohne Umbruch*/
+
+#define FN_QRY_INSERT (FN_INSERT + 86) /* Datensatz-Selektion in Text einfuegen */
+#define FN_QRY_MERGE_FIELD (FN_INSERT + 87) /* Datensatz-Selektion in Felder einfuegen */
+#define FN_QRY_INSERT_FIELD (FN_INSERT + 88) /* Datenbankfeld einfuegen */
+
+#define FN_INSERT_CTRL (FN_INSERT + 89) /* Werkzeugleistencontroller Einfuegen*/
+#define FN_INSERT_OBJ_CTRL (FN_INSERT + 90) /* Werkzeugleistencontroller Einfuegen/Objekt*/
+#define FN_INSERT_FIELD_CTRL (FN_INSERT + 91) /* Werkzeugleistencontroller Einfuegen/Feldbefehle*/
+
+#define FN_INSERT_FLD_DATE (FN_INSERT + 92)
+#define FN_INSERT_FLD_TIME (FN_INSERT + 93)
+#define FN_INSERT_FLD_PGNUMBER (FN_INSERT + 94)
+#define FN_INSERT_FLD_PGCOUNT (FN_INSERT + 95)
+#define FN_INSERT_FLD_TOPIC (FN_INSERT + 96)
+#define FN_INSERT_FLD_TITLE (FN_INSERT + 97)
+#define FN_INSERT_FLD_AUTHOR (FN_INSERT + 98)
+#define FN_INSERT_FOOTNOTE (FN_INSERT + 99)
+
+/*--------------------------------------------------------------------
+ Bereich: Einfuegen (2.Teil)
+ --------------------------------------------------------------------*/
+
+#define FN_QRY_GET_ALL_DBNAME (FN_INSERT2 + 1) /* Alle konfigurierten Datenabanknamen ermitteln */
+#define FN_QRY_GET_DBNAME_COUNT (FN_INSERT2 + 2) /* Anzahl aller konfigurierten Datenabanknamen */
+#define FN_QRY_GET_TABLE_NAME (FN_INSERT2 + 3) /* Tabellenname einer Datenbank ermitteln */
+#define FN_QRY_GET_TABLE_COUNT (FN_INSERT2 + 4) /* Anzahl aller Tabellen einer Datenbank ermitteln */
+#define FN_MAILMERGE_SENDMAIL_CHILDWINDOW (FN_INSERT2 + 5) /* child window provided by mailmerge */
+
+
+#define FN_SBA_BRW_UPDATE (FN_INSERT2 + 7) /* Datensaetze in Felder einfuegen */
+#define FN_SBA_BRW_INSERT (FN_INSERT2 + 8) /* Datensaetze in Text einfuegen */
+#define FN_SBA_BRW_MERGE (FN_INSERT2 + 9) /* Serienbriefdruck */
+#define FN_JAVAEDIT (FN_INSERT2 + 10) /* Scriptfeld bearbeiten */
+#define FN_INSERT_HRULER (FN_INSERT2 + 11) /* horiz. Grafiklinie einfuegen */
+#define FN_TOOL_ANKER_AT_CHAR (FN_INSERT2 + 12) /* Object zeichengebunden */
+
+#define FN_INSERT_PAGEHEADER (FN_INSERT2 + 13) /* Standard Kopfzeile einfuegen */
+#define FN_INSERT_PAGEFOOTER (FN_INSERT2 + 14) /* Standard Fusszeile einfuegen */
+
+#define FN_INSERT_ENDNOTE (FN_INSERT2 + 18) /* Endnote einfuegen*/
+#define FN_INSERT_REGION (FN_INSERT2 + 19) /* Insert section */
+
+#define FN_INSERT_MULTI_TOX (FN_INSERT2 + 20) /* insert any TOX */
+#define FN_INSERT_AUTH_ENTRY_DLG (FN_INSERT2 + 21) /* insert entry for table of authorities*/
+
+/*--------------------------------------------------------------------
+ Bereich: Format
+ --------------------------------------------------------------------*/
+
+#define FN_AUTOFORMAT_APPLY (FN_FORMAT + 1 ) /* Autoformat-Optionen anwenden */
+#define FN_AUTOFORMAT_AUTO (FN_FORMAT + 2 ) /* Autoformat waehrend der Eingabe */
+#define FN_GROW_FONT_SIZE (FN_FORMAT + 3 ) /* Groesse */
+#define FN_SHRINK_FONT_SIZE (FN_FORMAT + 4 ) /* Groesse */
+#define FN_UNDERLINE_DOUBLE (FN_FORMAT + 5 ) /* Doppelt unterstreichen */
+#define FN_AUTOFORMAT_REDLINE_APPLY (FN_FORMAT + 6 ) /* Autoformat mit Redlining anwenden */
+#define FN_SET_SUPER_SCRIPT (FN_FORMAT + 11) /* Hochstellung */
+#define FN_SET_SUB_SCRIPT (FN_FORMAT + 12) /* Tiefstellung */
+
+#define FN_SET_CASEMAP (FN_FORMAT + 14) /* CaseMap */
+#define FN_SET_LANGUAGE (FN_FORMAT + 15) /* Sprache */
+#define FN_SET_KERNING (FN_FORMAT + 16) /* Kerning */
+
+#define FN_INDENT_TO_TABSTOP (FN_FORMAT + 17) /* Einrueckung auf die naechste Tabpostion */
+//schon in svxids.hrc
+//#define FN_SET_JUSTIFY_PARA (FN_FORMAT + 21) /* Ausrichtung Absatz */
+#define FN_FLIP_HORZ_GRAFIC (FN_FORMAT + 25) /* Spiegeln horizontal */
+#define FN_FLIP_VERT_GRAFIC (FN_FORMAT + 26) /* Spiegeln vertikal */
+#define FN_SET_LINE_SPACE (FN_FORMAT + 27) /* Zeilenabstand parametrisiert */
+#define FN_SET_ADJUST (FN_FORMAT + 28) /* Ausrichtung parametrisiert */
+#define FN_SET_LRMARGIN (FN_FORMAT + 29) /* linker/rechter Rand */
+#define FN_SET_ULMARGIN (FN_FORMAT + 30) /* oberer/unterer Rand */
+#define FN_UNINDENT_TO_TABSTOP (FN_FORMAT + 31) /* Einrueckung auf die vorgige Tabpostion */
+
+#define FN_SET_HYPHEN_ZONE (FN_FORMAT + 32) /* Silbentrennung */
+#define FN_SET_KEEP_TOGETHER (FN_FORMAT + 34) /* nicht trennen */
+#define FN_SET_KEEP_WITH_NEXT (FN_FORMAT + 35) /* mit folgendem zus. */
+#define FN_SET_WIDOW (FN_FORMAT + 36) /* Widows */
+#define FN_SET_ORPHAN (FN_FORMAT + 37) /* Orphans */
+
+
+#define FN_REGISTER_COLLECTION (FN_FORMAT + 43) /* Referenzvorlage an der Seite */
+#define FN_REGISTER_MODE (FN_FORMAT + 44) /* Registermodus an/aus */
+#define FN_NUM_FORMAT_TABLE_DLG (FN_FORMAT + 45) /* Zahlenformat in Tabelle */
+#define FN_FORMAT_BORDER_DLG (FN_FORMAT + 48) /* Umrandung */
+#define FN_FORMAT_PAGE_COLUMN_DLG (FN_FORMAT + 49) /* Spalten pro Seite */
+#define FN_FORMAT_BACKGROUND_DLG (FN_FORMAT + 50) /* Hintergrund */
+#define FN_FORMAT_PAGE (FN_FORMAT + 51) /* Seite */
+#define FN_FORMAT_PAGE_DLG (FN_FORMAT + 52) /* Seite */
+#define FN_FORMAT_COLUMN (FN_FORMAT + 53) /* Spalten */
+#define FN_FORMAT_DROPCAPS (FN_FORMAT + 54) /* Initialien */
+#define FN_FORMAT_FRAME (FN_FORMAT + 55) /* Rahmen */
+#define FN_FORMAT_FRAME_DLG (FN_FORMAT + 56) /* Rahmen */
+#define FN_FORMAT_GRAFIC (FN_FORMAT + 57) /* Grafik */
+#define FN_FORMAT_GRAFIC_DLG (FN_FORMAT + 58) /* Grafik */
+#define FN_FORMAT_TABLE (FN_FORMAT + 59) /* Tabelle */
+#define FN_FORMAT_TABLE_DLG (FN_FORMAT + 60) /* Tabelle */
+#define FN_FORMAT_OLE_DLG (FN_FORMAT + 61) /* OLE bearbeiten */
+
+#define FN_NEW_STYLE_BY_EXAMPLE (FN_FORMAT + 62) /* Vorlage erzeugen by Example */
+#define FN_UPDATE_STYLE_BY_EXAMPLE (FN_FORMAT + 63) /* Vorlage aktualisieren */
+#define FN_STYLE_SHEET_FRAME_DLG (FN_FORMAT + 64) /* Rahmenvorlage */
+#define FN_STYLE_SHEET_DOC_DLG (FN_FORMAT + 65) /* Dokumentvorlage */
+#define FN_STYLE_SHEET_GRAFIK_DLG (FN_FORMAT + 66) /* Dokumentvorlage */
+#define FN_FORMAT_FOOTNOTE (FN_FORMAT + 67) /* Fussnoten */
+#define FN_FORMAT_FOOTNOTE_DLG (FN_FORMAT + 68) /* Fussnoten-Dialog */
+
+// schon im Svx definiert
+//#define FN_FORMAT_RESET (FN_FORMAT + 69) /* Format zuruecksetzen */
+
+#define FN_FRAME_TO_TOP (FN_FORMAT + 70) /* Rahmen nach oben */
+#define FN_FRAME_TO_BOTTOM (FN_FORMAT + 71) /* Rahmen nach unten */
+
+#define FN_FRAME_NOWRAP (FN_FORMAT + 72) /* Rahmen kein Umlauf */
+#define FN_FRAME_WRAP (FN_FORMAT + 73) /* Rahmen Umlauf */
+#define FN_FRAME_WRAPTHRU (FN_FORMAT + 74) /* Rahmen Durchlauf */
+
+#define FN_FRAME_ALIGN_HORZ_LEFT (FN_FORMAT + 75) /* Rahmen horz. links */
+#define FN_FRAME_ALIGN_HORZ_RIGHT (FN_FORMAT + 76) /* Rahmen horz. rechts */
+#define FN_FRAME_ALIGN_HORZ_CENTER (FN_FORMAT + 77) /* Rahmen horz. zentriert */
+#define FN_FRAME_ALIGN_VERT_TOP (FN_FORMAT + 78) /* Rahmen vert. oben */
+#define FN_FRAME_ALIGN_VERT_BOTTOM (FN_FORMAT + 79) /* Rahmen vert. unten */
+#define FN_FRAME_ALIGN_VERT_CENTER (FN_FORMAT + 80) /* Rahmen vert. zentriert */
+
+#define FN_SET_FRM_POSITION (FN_FORMAT + 82)/* Rahmenposition -- " -- */
+#define FN_SET_FRM_OPTIONS (FN_FORMAT + 86)/* Rahmenoptionen -- " -- */
+
+#define FN_SET_PAGE_STYLE (FN_FORMAT + 93) /* Anwenden Seitenv. */
+
+
+#define FN_TABLE_REP (FN_FORMAT + 99) /* TableRepresentation */
+#define FN_CONVERT_TEXT_TABLE (FN_FORMAT + 100) /* Konvertierung Text <-> Tabelle */
+#define FN_TABLE_INSERT_ROW (FN_FORMAT + 101) /* Tabelle: Zeile einfuegen */
+#define FN_TABLE_INSERT_COL (FN_FORMAT + 102) /* Tabelle: Spalte einfuegen */
+#define FN_TABLE_DELETE_ROW (FN_FORMAT + 103) /* Tabelle: Zeile loeschen */
+#define FN_TABLE_DELETE_COL (FN_FORMAT + 104) /* Tabelle: Spalte loeschen */
+#define FN_TABLE_SPLIT_CELLS (FN_FORMAT + 105) /* Tabelle: Zellen teilen */
+#define FN_TABLE_MERGE_CELLS (FN_FORMAT + 106) /* Tabelle: Zellen verbinden */
+#define FN_TABLE_SET_ROW_HEIGHT (FN_FORMAT + 107) /* Tabelle: Zeilenhoehe setzen */
+#define FN_TABLE_SET_COL_WIDTH (FN_FORMAT + 108) /* Tabelle: Spaltenbreite setzen */
+#define FN_TABLE_SET_ULSPACE (FN_FORMAT + 109) /* Tabelle: oberen / unteren Abstand einstellen */
+#define FN_OPTIMIZE_TABLE (FN_FORMAT + 110) /* ToolBoxItem fuer Optimierung in Tabellen */
+#define FN_TABLE_SET_SHADOW (FN_FORMAT + 111) /* Tabelle: Schatten einstellen */
+#define FN_TABLE_GOTO_CELL (FN_FORMAT + 112) /* Tabelle: Zelle anspringen */
+#define FN_TABLE_SELECT_ROW (FN_FORMAT + 113) /* Tabelle: Zeile selektieren */
+#define FN_TABLE_SELECT_COL (FN_FORMAT + 114) /* Tabelle: Spalte selektieren */
+#define FN_TABLE_SELECT_ALL (FN_FORMAT + 115) /* Tabelle: Tabelle selektieren */
+#define FN_TABLE_SET_READ_ONLY (FN_FORMAT + 116) /* Tabelle: Tabelle schuetzen */
+#define FN_TABLE_SET_READ_ONLY_CELLS (FN_FORMAT + 117) /* Tabelle: Tabellezellen schuetzen */
+#define FN_TABLE_UNSET_READ_ONLY_CELLS (FN_FORMAT + 119) /* Tabelle: Tabellezellen schuetzen aufheben */
+#define FN_TABLE_HEADLINE_REPEAT (FN_FORMAT + 120) /* also used in SwXTextTable*/
+#define FN_TABLE_ADJUST_CELLS (FN_FORMAT + 121) /* Tabelle: Zellen anpassen */
+
+#define FN_FRAME_UP (FN_FORMAT + 122) /* Rahmen um eine Ebene nach oben */
+#define FN_FRAME_DOWN (FN_FORMAT + 123) /* Rahmen um eine Ebene nach unten */
+
+#define FN_TABLE_INSERT_CHART (FN_FORMAT + 124)
+
+#define FN_SET_FRM_LRSPACE (FN_FORMAT + 125) /* Rahmen Seitenabstand */
+#define FN_SET_FRM_ULSPACE (FN_FORMAT + 126) /* Rahmen Kopf-/Fussabstand */
+#define FN_TABLE_SET_LRSPACE (FN_FORMAT + 127) /* Tabelle: linker / rechter Abstand einstellen */
+#define FN_TABLE_OPTIMAL_HEIGHT (FN_FORMAT + 128) /* Zellenhoehe optimal*/
+#define FN_TABLE_DELETE_TABLE (FN_FORMAT + 129) /* remove current table*/
+#define FN_TABLE_SELECT_CELL (FN_FORMAT + 130) /* selects the current table cell */
+#define FN_CONVERT_TEXT_TO_TABLE (FN_FORMAT + 131) /* convert selected text to table */
+#define FN_CONVERT_TABLE_TO_TEXT (FN_FORMAT + 132) /* convert a table to text */
+#define FN_TABLE_SORT_DIALOG (FN_FORMAT + 133) /* sorting in tables*/
+/*--------------------------------------------------------------------
+ Bereich: Seitenvorlage
+ --------------------------------------------------------------------*/
+
+#define FN_NEW_PAGE_STYLE (FN_FORMAT + 129) /* Anlegen Seitenvorlage */
+#define FN_PAGE_STYLE_SET_LR_MARGIN (FN_FORMAT + 130) /* linker / rechter Rand */
+#define FN_PAGE_STYLE_SET_UL_MARGIN (FN_FORMAT + 131) /* oberer / unterer Rand */
+#define FN_PAGE_STYLE_SET_PAGE (FN_FORMAT + 134) /* linke, rechte... */
+#define FN_PAGE_STYLE_SET_PAPER_SIZE (FN_FORMAT + 135) /* Papiergroesse */
+#define FN_PAGE_STYLE_SET_PAPER_BIN (FN_FORMAT + 136) /* Druckerschacht */
+#define FN_PAGE_STYLE_SET_NUMBER_FORMAT (FN_FORMAT + 137) /* Numerierungsart */
+#define FN_PAGE_STYLE_SET_COLS (FN_FORMAT + 138) /* Spaltenanzahl */
+
+
+/* OS: Diese Ids werden nur noch fuer die Hilfe benoetigt und sind fuer den
+ Dialog durch die Ids ohne _DLG ersetzt*/
+#define FN_TABLE_INSERT_COL_DLG (FN_FORMAT + 142) /* Tabelle: Dlg. Spalte einfuegen */
+#define FN_TABLE_INSERT_ROW_DLG (FN_FORMAT + 143) /* Tabelle: Dlg. Zeile einfuegen */
+
+#define FN_GOTO_NEXT_CELL (FN_FORMAT + 145) /* Table: go to next cell */
+#define FN_GOTO_PREV_CELL (FN_FORMAT + 146) /* Table: go to previous cell */
+
+
+#define FN_TABLE_HEADLINE_COUNT (FN_FORMAT + 147) /* number of repeated headlines of tables */
+//hier geht's weiter !
+/*--------------------------------------------------------------------
+ Bereich: Ribbon
+ --------------------------------------------------------------------*/
+
+#define FN_SET_BACKGROUND_COLOR (FN_FORMAT + 150) /* Hintergrundfarbe */
+
+#define FN_SET_BORDER_POS (FN_FORMAT + 152) /* Position Umrandung */
+#define FN_SET_BORDER_LINES (FN_FORMAT + 153) /* Linienart Umrandung */
+#define FN_SET_BORDER_COLOR (FN_FORMAT + 154) /* Farbe Umrandung */
+
+#define FN_FORMULA_CALC (FN_FORMAT + 156) /* Formelauswahl */
+#define FN_FORMULA_CANCEL (FN_FORMAT + 157) /* Formel nicht uebernehmen */
+#define FN_FORMULA_APPLY (FN_FORMAT + 158) /* Formel uebernehmen */
+
+#define FN_TABLE_UNSET_READ_ONLY (FN_FORMAT + 159) /* Zellenschutz fuer Tab. aufheben */
+
+#define FN_FORMULA_POSITION (FN_FORMAT + 160) /* Positionsanzeige */
+#define FN_FORMULA_EDIT (FN_FORMAT + 161) /* Editfeld */
+
+
+#define FN_FRAME_WRAP_IDEAL (FN_FORMAT + 163) /* Rahmen Idealer Umlauf */
+#define FN_FRAME_WRAPTHRU_TRANSP (FN_FORMAT + 164) /* Rahmen Transparenter Durchlauf */
+
+#define FN_FRAME_ALIGN_VERT_ROW_TOP (FN_FORMAT + 165) /* Rahmen vert. Zeile oben */
+#define FN_FRAME_ALIGN_VERT_ROW_BOTTOM (FN_FORMAT + 166) /* Rahmen vert. Zeile unten */
+#define FN_FRAME_ALIGN_VERT_ROW_CENTER (FN_FORMAT + 167) /* Rahmen vert. Zeile zentriert */
+
+#define FN_FRAME_ALIGN_VERT_CHAR_TOP (FN_FORMAT + 168) /* Rahmen vert. Zeichen oben */
+#define FN_FRAME_ALIGN_VERT_CHAR_BOTTOM (FN_FORMAT + 169) /* Rahmen vert. Zeichen unten */
+#define FN_FRAME_ALIGN_VERT_CHAR_CENTER (FN_FORMAT + 170) /* Rahmen vert. Zeichen zentriert */
+
+#define FN_TABLE_SET_DEF_BORDER (FN_FORMAT + 171) /* vordefinierte Umrandungen setzen */
+
+#define FN_FRAME_WRAP_LEFT (FN_FORMAT + 172) /* Rahmen Umlauf links */
+#define FN_FRAME_WRAP_RIGHT (FN_FORMAT + 173) /* Rahmen Umlauf links */
+
+#define FN_TABLE_SET_ROW_AUTOHEIGHT (FN_FORMAT + 174) /* Tabelle: Minimale automatische Zeilenhoehe setzen */
+
+
+#define FN_WRAP_ANCHOR_ONLY (FN_FORMAT + 181) /* Umlauf nur fuer ersten Absatz */
+
+#define FN_TABLE_BALANCE_CELLS (FN_FORMAT + 182) /* Spalten gleichmaessig verteilen */
+#define FN_TABLE_BALANCE_ROWS (FN_FORMAT + 183) /* Zeilen gleichmaessig verteilen */
+
+#define FN_FRAME_WRAP_CONTOUR (FN_FORMAT + 184) /* Rahmen Kunturumlauf */
+
+#define FN_TABLE_VERT_NONE (FN_FORMAT + 185) /* vertikale Ausrichtung in Tabellenzellen */
+#define FN_TABLE_VERT_CENTER (FN_FORMAT + 186) /* -"- */
+#define FN_TABLE_VERT_BOTTOM (FN_FORMAT + 187) /* -"- */
+#define FN_TABLE_SET_VERT_ALIGN (FN_FORMAT + 188) /* -"- */
+#define FN_TABLE_MODE_FIX (FN_FORMAT + 189) /* Tabellenmodus */
+#define FN_TABLE_MODE_FIX_PROP (FN_FORMAT + 190) /* -"- */
+#define FN_TABLE_MODE_VARIABLE (FN_FORMAT + 191) /* -"- */
+#define FN_TABLE_BOX_TEXTDIRECTION (FN_FORMAT + 192) /* text direction of table cells */
+
+#define FN_TABLE_AUTOSUM (FN_FORMAT + 195) /* Autosumme*/
+#define FN_SET_CONTROL_HANDLER (FN_FORMAT + 199) /* Macro setzen */
+
+#define FN_IS_IMAGE (FN_FORMAT2 + 6) /* Numerierung : mit Grafik?*/
+
+#define FN_GOTO_NEXT_REGION (FN_FORMAT2 + 9) /* Naechsten Bereich anspringen */
+#define FN_GOTO_PREV_REGION (FN_FORMAT2 + 10) /* Vorherigen " */
+
+#define FN_GET_SBXCONTROL (FN_FORMAT2 + 11) /* SbxObject rausreichen */
+#define FN_ABSTRACT_NEWDOC (FN_FORMAT2 + 12) /* Abstract in neuem Doc */
+#define FN_ABSTRACT_STARIMPRESS (FN_FORMAT2 + 13) /* Abstract an StarImpress */
+/* OD 2006-03-09 #i51726# - all drawing objects can be named now. */
+#define FN_NAME_SHAPE (FN_FORMAT2 + 14) /* Name shapes */
+
+// #i68101#
+#define FN_TITLE_DESCRIPTION_SHAPE (FN_FORMAT2 + 15) /* shape title and description */
+
+#define FN_NUMBER_FORMAT (FN_FORMAT2 + 120) /* Boxen/NumberFormatter eistellen */
+#define FN_NUMBER_STANDARD (FN_FORMAT2 + 121)
+#define FN_NUMBER_TWODEC (FN_FORMAT2 + 123)
+#define FN_NUMBER_SCIENTIFIC (FN_FORMAT2 + 124)
+#define FN_NUMBER_DATE (FN_FORMAT2 + 125)
+#define FN_NUMBER_TIME (FN_FORMAT2 + 126)
+#define FN_NUMBER_CURRENCY (FN_FORMAT2 + 127)
+#define FN_NUMBER_PERCENT (FN_FORMAT2 + 128)
+
+
+
+#define FN_FRAME_CHAIN (FN_FORMAT2 + 136)
+#define FN_FRAME_UNCHAIN (FN_FORMAT2 + 137)
+
+#define FN_NUMBER_NEWSTART (FN_FORMAT2 + 138)
+#define FN_NUMBER_NEWSTART_AT (FN_FORMAT2 + 139)
+
+#define FN_FRAME_MIRROR_ON_EVEN_PAGES (FN_FORMAT2 + 140)
+#define FN_GRAPHIC_MIRROR_ON_EVEN_PAGES (FN_FORMAT2 + 141)
+
+#define FN_TABLE_SPLIT_TABLE (FN_FORMAT2 + 142)
+#define FN_SYNC_LABELS (FN_FORMAT2 + 143)
+
+#define FN_FORMAT_LINENUMBER (FN_FORMAT2 + 144)
+
+#define FN_TABLE_RELATIVE_WIDTH (FN_FORMAT2 + 147) /* Tabelle: relative Breite - UNO */
+#define FN_TABLE_WIDTH (FN_FORMAT2 + 148) /* Tabelle: Breite - UNO */
+#define FN_TABLE_IS_RELATIVE_WIDTH (FN_FORMAT2 + 149) /* Tabelle: ist Breite relativ?- UNO */
+
+#define FN_INC_INDENT_OFFSET (FN_FORMAT2 + 150)
+#define FN_DEC_INDENT_OFFSET (FN_FORMAT2 + 151)
+
+#define FN_TABLE_MERGE_TABLE (FN_FORMAT2 + 152)
+#define FN_TABLE_ROW_SPLIT (FN_FORMAT2 + 153)
+
+#define FN_FORMAT_APPLY_HEAD1 (FN_FORMAT2 + 154)
+#define FN_FORMAT_APPLY_HEAD2 (FN_FORMAT2 + 155)
+#define FN_FORMAT_APPLY_HEAD3 (FN_FORMAT2 + 156)
+#define FN_FORMAT_APPLY_DEFAULT (FN_FORMAT2 + 157)
+#define FN_FORMAT_APPLY_TEXTBODY (FN_FORMAT2 + 158)
+#define FN_REMOVE_DIRECT_CHAR_FORMATS (FN_FORMAT2 + 159)
+
+#define FN_SAVE_GRAPHIC (FN_FORMAT2 + 160)
+
+/*--------------------------------------------------------------------
+ Bereich: Extras
+ --------------------------------------------------------------------*/
+
+#define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* Zeilennumerierung */
+#define FN_HYPHENATE_OPT_DLG (FN_EXTRA + 5 ) /* Silbentrennung */
+#define FN_ADD_UNKNOWN (FN_EXTRA + 6 ) /* Woerter lernen */
+#define FN_DICTIONARY_DLG (FN_EXTRA + 8 ) /* Woerterbuecher */
+#define FN_NUMBERING (FN_EXTRA + 9 ) /* Nummerierung/Bullets */
+#define FN_NUMBERING_DLG (FN_EXTRA + 10) /* Nummerierung/Bullets */
+#define FN_NUMBERING_OUTLINE (FN_EXTRA + 11) /* Gliederungsnumerierung */
+#define FN_NUMBERING_OUTLINE_DLG (FN_EXTRA + 12) /* Gliederungsnumerierung */
+#define FN_SORTING_DLG (FN_EXTRA + 14) /* Sortieren */
+#define FN_CALCULATE (FN_EXTRA + 15) /* Berechnen */
+#define FN_GENERATE_TOC_DLG (FN_EXTRA + 16) /* Inhaltsverzeichnis */
+#define FN_GENERATE_INDEX_DLG (FN_EXTRA + 17) /* Stichwortverzeichnis */
+#define FN_GENERATE_DIR_DLG (FN_EXTRA + 18) /* Verzeichnis */
+#define FN_GLOSSARY_DLG (FN_EXTRA + 20) /* Textbausteine */
+#define FN_MACRO_CHOOSER (FN_EXTRA + 21) /* Makro aufnehmen */
+
+
+#define FN_PLAY_MACRO (FN_EXTRA + 23) /* Makro abspielen */
+#define FN_LAUNCH_BASIC (FN_EXTRA + 25) /* Makro abspielen */
+#define FN_EXPAND_GLOSSARY (FN_EXTRA + 28) /* Textbausteine expandieren */
+#define FN_CONFIG_TOOLBOX (FN_EXTRA + 29) /* Konfiguration Toolbox */
+#define FN_CONFIG_MENU (FN_EXTRA + 30) /* Konfiguration Menu */
+#define FN_CONFIG_KEY (FN_EXTRA + 31) /* Konfiguration Tastatur */
+#define FN_CHANGE_PAGENUM (FN_EXTRA + 34) /* Seitennummer aendern */
+
+#define FN_MACRO_POPUP (FN_EXTRA + 37) /* Alle Macrofunktionen */
+#define FN_BULLET (FN_EXTRA + 38) /* Bullet-Liste */
+
+
+// Bereich: Gloassaries
+
+// schon im Svx definiert
+
+//#define FN_GET_GLOSSARY_GROUP_COUNT (FN_EXTRA + 42) /* Anzahl der Bausteingruppen */
+
+#define FN_AUTO_CORRECT (FN_EXTRA + 49 ) /* Autocorrect aus Basic */
+
+
+#define FN_UPDATE_TOX (FN_EXTRA + 53) /* alle Verzeichnisse aktualisieren */
+#define FN_UPDATE_CUR_TOX (FN_EXTRA + 54) /* aktuelles Verzeichnisse aktualisieren */
+#define FN_REMOVE_CUR_TOX (FN_EXTRA + 55) /* remove the current TOX*/
+
+#define FN_NAVIGATION_PI_GOTO_PAGE (FN_EXTRA + 59 ) /* Seitenanwahl aus Navi-PI */
+
+
+#define FN_LETTER_WIZZARD (FN_EXTRA + 60 )
+#define FN_FAX_WIZZARD (FN_EXTRA + 61 )
+#define FN_MEMO_WIZZARD (FN_EXTRA + 62 )
+#define FN_AGENDA_WIZZARD (FN_EXTRA + 63 )
+
+#define FN_SET_BASIC_METRIC (FN_EXTRA + 80) /* Defaultmetrik Basic setzen */
+
+#define FN_RESERVED_9 (FN_EXTRA + 86) /* Platzhalter */
+#define FN_RESERVED_8 (FN_EXTRA + 87) /* Platzhalter */
+#define FN_RESERVED_7 (FN_EXTRA + 88) /* Platzhalter */
+#define FN_RESERVED_6 (FN_EXTRA + 89) /* Platzhalter */
+#define FN_RESERVED_5 (FN_EXTRA + 90) /* Platzhalter */
+#define FN_RESERVED_4 (FN_EXTRA + 91) /* Platzhalter */
+#define FN_RESERVED_3 (FN_EXTRA + 92) /* Platzhalter */
+#define FN_RESERVED_2 (FN_EXTRA + 93) /* Platzhalter */
+#define FN_RESERVED_1 (FN_EXTRA + 94) /* Platzhalter */
+
+#define FN_COLLECTION_GROUP_CNT (FN_EXTRA + 96)
+#define FN_COLLECTION_GROUP_IDX (FN_EXTRA + 97)
+#define FN_COLL_TYPE (FN_EXTRA + 98) /* Typ fuer GlobalDoc-Collection*/
+#define FN_COLL_ADD (FN_EXTRA + 99)
+
+#define FN_COLL_TITLE (FN_EXTRA2 + 1) /* Bereichsname oder Index-Title */
+#define FN_SHADOWCURSOR (FN_EXTRA2 + 4) /* Shadow Cursor ein/ausschalten */
+
+
+#define FN_VIEW_IN_FRAME (FN_EXTRA2 + 8) /* die View befindet sich in einem FrameDoc*/
+
+#define FN_UNO_PARA_STYLE (FN_EXTRA2 + 9) // jetzt kommen diverse UNO-Ids fuer die
+#define FN_UNO_PAGE_STYLE (FN_EXTRA2 + 10) // PropertyMap
+
+#define FN_UNO_FRAME_STYLE_NAME (FN_EXTRA2 + 12)
+#define FN_UNO_NUM_START_VALUE (FN_EXTRA2 + 13)
+#define FN_UNO_NUM_LEVEL (FN_EXTRA2 + 14)
+#define FN_UNO_NUM_RULES (FN_EXTRA2 + 15)
+#define FN_UNO_DOCUMENT_INDEX_MARK (FN_EXTRA2 + 16)
+#define FN_UNO_DOCUMENT_INDEX (FN_EXTRA2 + 17)
+#define FN_UNO_TEXT_FIELD (FN_EXTRA2 + 18)
+#define FN_UNO_TEXT_TABLE (FN_EXTRA2 + 19)
+#define FN_UNO_CELL (FN_EXTRA2 + 20)
+#define FN_UNO_TEXT_FRAME (FN_EXTRA2 + 21)
+#define FN_UNO_REFERENCE_MARK (FN_EXTRA2 + 22)
+#define FN_UNO_TEXT_SECTION (FN_EXTRA2 + 23)
+#define FN_UNO_FOOTNOTE (FN_EXTRA2 + 24)
+#define FN_UNO_ENDNOTE (FN_EXTRA2 + 25)
+#define FN_UNO_RANGE_COL_LABEL (FN_EXTRA2 + 26)
+#define FN_UNO_RANGE_ROW_LABEL (FN_EXTRA2 + 27)
+#define FN_UNO_TABLE_COLUMS (FN_EXTRA2 + 28)
+#define FN_UNO_TABLE_BORDER (FN_EXTRA2 + 29)
+#define FN_UNO_TABLE_COLUMN_SEPARATORS (FN_EXTRA2 + 30)
+#define FN_UNO_TABLE_COLUMN_RELATIVE_SUM (FN_EXTRA2 + 31)
+#define FN_UNO_TABLE_CELL_BACKGROUND (FN_EXTRA2 + 32)
+#define FN_UNO_ROW_HEIGHT (FN_EXTRA2 + 33)
+#define FN_UNO_ROW_AUTO_HEIGHT (FN_EXTRA2 + 34)
+#define FN_UNO_HEADER (FN_EXTRA2 + 35)
+#define FN_UNO_HEADER_LEFT (FN_EXTRA2 + 36)
+#define FN_UNO_HEADER_RIGHT (FN_EXTRA2 + 37)
+#define FN_UNO_FOOTER (FN_EXTRA2 + 38)
+#define FN_UNO_FOOTER_LEFT (FN_EXTRA2 + 39)
+#define FN_UNO_FOOTER_RIGHT (FN_EXTRA2 + 40)
+#define FN_UNO_HEADER_BACKGROUND (FN_EXTRA2 + 41)
+#define FN_UNO_HEADER_BOX (FN_EXTRA2 + 42)
+#define FN_UNO_HEADER_LR_SPACE (FN_EXTRA2 + 43)
+#define FN_UNO_HEADER_SHADOW (FN_EXTRA2 + 44)
+#define FN_UNO_FOOTER_BACKGROUND (FN_EXTRA2 + 45)
+#define FN_UNO_FOOTER_BOX (FN_EXTRA2 + 46)
+#define FN_UNO_FOOTER_LR_SPACE (FN_EXTRA2 + 47)
+#define FN_UNO_FOOTER_SHADOW (FN_EXTRA2 + 48)
+#define FN_UNO_HEADER_BODY_DISTANCE (FN_EXTRA2 + 49)
+#define FN_UNO_HEADER_IS_DYNAMIC_DISTANCE (FN_EXTRA2 + 50)
+#define FN_UNO_FOOTER_BODY_DISTANCE (FN_EXTRA2 + 51)
+#define FN_UNO_FOOTER_IS_DYNAMIC_DISTANCE (FN_EXTRA2 + 52)
+#define FN_UNO_HEADER_SHARE_CONTENT (FN_EXTRA2 + 53)
+#define FN_UNO_FOOTER_SHARE_CONTENT (FN_EXTRA2 + 54)
+#define FN_UNO_HEADER_HEIGHT (FN_EXTRA2 + 55)
+#define FN_UNO_FOOTER_HEIGHT (FN_EXTRA2 + 56)
+#define FN_UNO_HEADER_ON (FN_EXTRA2 + 57)
+#define FN_UNO_FOOTER_ON (FN_EXTRA2 + 58)
+#define FN_UNO_FOLLOW_STYLE (FN_EXTRA2 + 59)
+
+#define FN_API_CALL (FN_EXTRA2 + 60)
+
+#define FN_UNO_IS_PHYSICAL (FN_EXTRA2 + 61)
+#define FN_UNO_IS_AUTO_UPDATE (FN_EXTRA2 + 62)
+#define FN_UNO_DISPLAY_NAME (FN_EXTRA2 + 63)
+
+#define FN_UNO_WRAP (FN_EXTRA2 + 64)
+#define FN_UNO_ANCHOR_TYPES (FN_EXTRA2 + 65)
+#define FN_UNO_PARA_CHAPTER_NUMBERING_LEVEL (FN_EXTRA2 + 66)
+#define FN_UNO_PARA_CONDITIONAL_STYLE_NAME (FN_EXTRA2 + 67)
+
+#define FN_UNO_CATEGORY (FN_EXTRA2 + 68)
+#define FN_UNO_IS_NUMBER (FN_EXTRA2 + 69)
+#define FN_UNO_TEXT_WRAP (FN_EXTRA2 + 70)
+#define FN_UNO_ANCHOR_TYPE (FN_EXTRA2 + 71)
+#define FN_SKIP_HIDDEN_TEXT (FN_EXTRA2 + 72)
+#define FN_SKIP_PROTECTED_TEXT (FN_EXTRA2 + 73)
+#define FN_UNO_Z_ORDER (FN_EXTRA2 + 74)
+#define FN_UNO_REDLINE_NODE_START (FN_EXTRA2 + 75)
+#define FN_UNO_REDLINE_NODE_END (FN_EXTRA2 + 76)
+#define FN_UNO_TEXT_PORTION_TYPE (FN_EXTRA2 + 77)
+#define FN_UNO_CONTROL_CHARACTER (FN_EXTRA2 + 78)
+#define FN_UNO_BOOKMARK (FN_EXTRA2 + 79)
+#define FN_UNO_IS_COLLAPSED (FN_EXTRA2 + 80)
+#define FN_UNO_IS_START (FN_EXTRA2 + 81)
+#define FN_UNO_IS_AUTOMATIC_CONTOUR (FN_EXTRA2 + 82)
+#define FN_UNO_IS_PIXEL_CONTOUR (FN_EXTRA2 + 83)
+#define FN_UNO_ALTERNATIVE_TEXT (FN_EXTRA2 + 84)
+#define FN_UNO_ACTUAL_SIZE (FN_EXTRA2 + 85)
+#define FN_UNO_GRAPHIC_U_R_L (FN_EXTRA2 + 86)
+#define FN_UNO_GRAPHIC_FILTER (FN_EXTRA2 + 87)
+#define FN_UNO_CELL_NAME (FN_EXTRA2 + 88)
+#define FN_INSERT_GLOSSARY (FN_EXTRA2 + 89)
+#define FN_NEW_GLOSSARY (FN_EXTRA2 + 90)
+#define FN_SET_ACT_GLOSSARY (FN_EXTRA2 + 91)
+
+#define FN_UNO_HEADER_EAT_SPACING (FN_EXTRA2 + 92)
+#define FN_UNO_FOOTER_EAT_SPACING (FN_EXTRA2 + 93)
+#define FN_UNO_CHARFMT_SEQUENCE (FN_EXTRA2 + 94)
+#define FN_UNO_CLSID (FN_EXTRA2 + 95)
+#define FN_UNO_MODEL (FN_EXTRA2 + 96)
+#define FN_UNO_COMPONENT (FN_EXTRA2 + 97)
+#define FN_WORDCOUNT_DIALOG (FN_EXTRA2 + 98)
+
+//#define FN_UNO_DEFAULT_OUTLINE_LEVEL (FN_EXTRA2 + 99)//#outline level,removed by zahojianwei
+
+#define FN_XFORMS_DESIGN_MODE (FN_EXTRA2 + 100)
+
+#define FN_UNO_PARA_STYLE_CONDITIONS (FN_EXTRA2 + 101)
+#define FN_UNO_GRAPHIC (FN_EXTRA2 + 102)
+
+#define FN_UNO_REPLACEMENT_GRAPHIC_URL (FN_EXTRA2 + 102)
+#define FN_UNO_CELL_ROW_SPAN (FN_EXTRA2 + 103)
+#define FN_UNO_TABLE_BORDER_DISTANCES (FN_EXTRA2 + 104)
+#define FN_SPELL_GRAMMAR_DIALOG (FN_EXTRA2 + 105)
+#define FN_UNO_STREAM_NAME (FN_EXTRA2 + 106)
+// --> OD 2008-07-14 #i91601#
+#define FN_UNO_LIST_ID (FN_EXTRA2 + 107)
+// <--
+#define FN_UNO_REPLACEMENT_GRAPHIC (FN_EXTRA2 + 108)
+
+#define FN_UNO_PARA_CONT_PREV_SUBTREE (FN_EXTRA2 + 109)
+#define FN_UNO_PARA_NUM_STRING (FN_EXTRA2 + 110)
+#define FN_UNO_TABLE_NAME (FN_EXTRA2 + 111)
+#define FN_UNO_META (FN_EXTRA2 + 112)
+#define FN_UNO_NESTED_TEXT_CONTENT (FN_EXTRA2 + 113)
+
+/*--------------------------------------------------------------------
+ Bereich: Hilfe
+ --------------------------------------------------------------------*/
+
+/*--------------------------------------------------------------------
+ Bereich: Traveling & Selektion
+ --------------------------------------------------------------------*/
+
+#define FN_CHAR_LEFT (FN_SELECTION + 1 ) /* */
+#define FN_CHAR_RIGHT (FN_SELECTION + 2 ) /* */
+#define FN_LINE_UP (FN_SELECTION + 3 ) /* */
+#define FN_LINE_DOWN (FN_SELECTION + 4 ) /* */
+#define FN_START_OF_LINE (FN_SELECTION + 5 ) /* StartOfLine */
+#define FN_END_OF_LINE (FN_SELECTION + 6 ) /* EndOfLine */
+#define FN_START_OF_DOCUMENT (FN_SELECTION + 7 ) /* StartOfDocument */
+//schon in svxids.hrc
+//#define FN_END_OF_DOCUMENT (FN_SELECTION + 8 ) /* EndOfDocument */
+#define FN_START_OF_NEXT_PAGE (FN_SELECTION + 9 ) /* StartOfNextPage ??? */
+#define FN_END_OF_NEXT_PAGE (FN_SELECTION + 10) /* ??? */
+#define FN_START_OF_PREV_PAGE (FN_SELECTION + 11) /* StartOfPrevPage ??? */
+#define FN_END_OF_PREV_PAGE (FN_SELECTION + 12) /* ??? */
+#define FN_START_OF_PAGE (FN_SELECTION + 13) /* StartOfPage */
+#define FN_END_OF_PAGE (FN_SELECTION + 14) /* EndOfPage */
+#define FN_START_OF_WINDOW (FN_SELECTION + 15) /* StartOfWindow */
+#define FN_END_OF_WINDOW (FN_SELECTION + 16) /* EndOfWindow */
+#define FN_START_OF_COLUMN (FN_SELECTION + 17) /* StartOfColumn */
+#define FN_END_OF_COLUMN (FN_SELECTION + 18) /* EndOfColumn */
+#define FN_START_OF_PARA (FN_SELECTION + 19) /* StartOfPara */
+#define FN_END_OF_PARA (FN_SELECTION + 20) /* EndOfPara */
+#define FN_NEXT_WORD (FN_SELECTION + 21) /* NextWord */
+#define FN_PREV_WORD (FN_SELECTION + 22) /* PrevWord */
+#define FN_NEXT_SENT (FN_SELECTION + 23) /* NextSentence */
+#define FN_PREV_SENT (FN_SELECTION + 24) /* PrevSentence */
+#define FN_DELETE (FN_SELECTION + 25) /* Delete */
+#define FN_BACKSPACE (FN_SELECTION + 26) /* Backspace */
+#define FN_DELETE_SENT (FN_SELECTION + 27) /* DeleteToEndOfSentence */
+#define FN_DELETE_BACK_SENT (FN_SELECTION + 28) /* DeleteToStartOfSentence */
+#define FN_DELETE_WORD (FN_SELECTION + 29) /* DeleteToEndOfWord */
+#define FN_DELETE_BACK_WORD (FN_SELECTION + 30) /* DeleteToStartOfWord */
+#define FN_DELETE_LINE (FN_SELECTION + 31) /* DeleteToEndOfLine */
+#define FN_DELETE_BACK_LINE (FN_SELECTION + 32) /* DeleteToStartOfLine */
+#define FN_DELETE_PARA (FN_SELECTION + 33) /* DeleteToEndOfPara */
+#define FN_DELETE_BACK_PARA (FN_SELECTION + 34) /* DeleteToStartOfPara */
+#define FN_DELETE_WHOLE_LINE (FN_SELECTION + 35) /* DeleteLine ??? */
+#define FN_SET_INS_MODE (FN_SELECTION + 36) /* Einfuegemodus / Overwrite */
+#define FN_PAGEUP (FN_SELECTION + 37) /* PageUpWithCursor */
+#define FN_PAGEDOWN (FN_SELECTION + 38) /* PageDownWithCursor */
+#define FN_SET_ADD_MODE (FN_SELECTION + 39) /* Selektionsmodus */
+#define FN_SET_EXT_MODE (FN_SELECTION + 40) /* Selektionsmodus */
+#define FN_ESCAPE (FN_SELECTION + 41) /* Normal */
+#define FN_SHIFT_BACKSPACE (FN_SELECTION + 42) /* wie Backspace */
+#define FN_SELECT_WORD (FN_SELECTION + 43) /* Wort selektieren */
+
+#define FN_GOTO_NEXT_OBJ (FN_SELECTION + 44) /* N�chstes Objekt anspringen */
+#define FN_GOTO_PREV_OBJ (FN_SELECTION + 45) /* Vorhergehendes Objekt anspringen */
+
+#define FN_START_TABLE (FN_SELECTION + 47) /* an den Anfang der Tabelle */
+#define FN_END_TABLE (FN_SELECTION + 48) /* an das Ende der Tabelle */
+#define FN_NEXT_TABLE (FN_SELECTION + 49) /* zur vorhergehenden Tabelle */
+#define FN_PREV_TABLE (FN_SELECTION + 50) /* zur naechsten Tabelle */
+
+#define FN_START_OF_NEXT_COLUMN (FN_SELECTION + 51) /* zum Anfang der naechsten Spalte */
+#define FN_END_OF_NEXT_COLUMN (FN_SELECTION + 52) /* zum Ende der naechsten Spalte */
+#define FN_START_OF_PREV_COLUMN (FN_SELECTION + 53) /* zum Anfang der vorhergehenden Spalte */
+#define FN_END_OF_PREV_COLUMN (FN_SELECTION + 54) /* zum Ende der vorhergehenden Spalte */
+
+#define FN_FOOTNOTE_TO_ANCHOR (FN_SELECTION + 55) /* aus der Fussnote zum Anchor */
+#define FN_NEXT_FOOTNOTE (FN_SELECTION + 56) /* zur naechsten Fussnote */
+#define FN_PREV_FOOTNOTE (FN_SELECTION + 57) /* zur vorhergehenden Fussnote */
+
+#define FN_CNTNT_TO_NEXT_FRAME (FN_SELECTION + 58) /* aus dem Inhalt zum naechsten Rahmen */
+#define FN_FRAME_TO_ANCHOR (FN_SELECTION + 59) /* vom Rahmen zum Anker */
+
+#define FN_TO_HEADER (FN_SELECTION + 60) /* Toggle zwischen Content und Kopfzeile */
+#define FN_TO_FOOTER (FN_SELECTION + 61) /* Toggle zwischen Content und Fusszeile */
+
+#define FN_IDX_MARK_TO_IDX (FN_SELECTION + 62) /* von der Verzeichnismarkierung zum Verzeichnis */
+
+#define FN_TO_FOOTNOTE_AREA (FN_SELECTION + 63) /* jump into the appropriate footnote area */
+
+#define FN_SET_BLOCK_MODE (FN_SELECTION + 64) /* selection mode: block */
+
+
+
+#define FN_PREV_PARA (FN_SELECTION + 74)
+#define FN_NEXT_PARA (FN_SELECTION + 75)
+
+#define FN_GOTO_NEXT_MARK (FN_SELECTION + 76) /* N�chsten Platzhalter anspringen */
+#define FN_GOTO_PREV_MARK (FN_SELECTION + 77) /* Vorhergehenden Platzhalter anspringen */
+
+// schon im SVX unter der gleichen Id
+//#define FN_START_DOC_DIRECT (FN_SELECTION + 78) /* Direkt zum Dokanfang springen */
+//#define FN_END_DOC_DIRECT (FN_SELECTION + 79) /* Direkt zum Dokanfang springen */
+
+#define FN_NEXT_TOXMARK (FN_SELECTION + 83) /* zur naechsten Verz. Markierung */
+#define FN_PREV_TOXMARK (FN_SELECTION + 84) /* zur vorherigen Verz. Markierung */
+#define FN_NEXT_TBLFML (FN_SELECTION + 85) /* zur naechsten Tabellenformel */
+#define FN_PREV_TBLFML (FN_SELECTION + 86) /* zur vorherigen Tabellenformel */
+#define FN_NEXT_TBLFML_ERR (FN_SELECTION + 87) /* zur naechsten fehl. Tabellenformel */
+#define FN_PREV_TBLFML_ERR (FN_SELECTION + 88) /* zur vorherigen fehl. Tabellenformel */
+
+#define FN_READONLY_SELECTION_MODE (FN_SELECTION + 89) /* switches text selection mode in readonly documents*/
+#define FN_SELECTION_MODE_DEFAULT (FN_SELECTION + 90) /* use default selection mode - not block mode */
+#define FN_SELECTION_MODE_BLOCK (FN_SELECTION + 91) /* switch on block selection */
+
+/*--------------------------------------------------------------------
+ QUERY-Block
+ --------------------------------------------------------------------*/
+
+
+
+#define FN_IS_MODIFIED (FN_QUERY +16) /* Dokument geaendert? */
+#define FN_RESET_MODIFIED (FN_QUERY +17) /* Geaendert-Flag zuruecksetzen */
+
+#define FN_GET_DOC_INFO (FN_QUERY +22) /* Wert Dokumentinfo erfragen */
+#define FN_GET_ERRNO (FN_QUERY +26) /* Error-Nummer abfragen */
+#define FN_GET_DOCMAN_PATH (FN_QUERY +27) /* Pfad zu einer Gruppe im Docmgr erfragen */
+
+#define FN_TXTATR_INET (FN_QUERY +29) /* INet-Attribut */
+#define FN_EXECUTE_DRAG (FN_QUERY +30) /* D&D starten */
+
+#define FN_GET_PRINT_AREA (FN_QUERY +32) /* Attribut fuer druckbaren Seitenbereich besorgen */
+
+
+
+// #define FN_IS_START_OF_PAGE (FN_QUERY +40) /**/
+// #define FN_IS_END_OF_PAGE (FN_QUERY +41) /**/
+
+#define FN_GET_PARAGRAPH (FN_QUERY +48) /* Paragraph-Object von der Textshell
+ an die View weiterreichen*/
+// hier ist Schluss!!!
+
+#define FN_DB_FORM_LETTER (FN_QUERY2 + 0) /* form letter */
+#define FN_DB_INSERT_CONTENT (FN_QUERY2 + 1) /* merge data into fields*/
+#define FN_DB_INSERT_COLUMNS (FN_QUERY2 + 2) /* insert data into text/table/as fields*/
+#define FN_DB_CONNECTION_ANY (FN_QUERY2 + 3)
+#define FN_DB_COLUMN_ANY (FN_QUERY2 + 4)
+#define FN_DB_DATA_SOURCE_ANY (FN_QUERY2 + 5)
+#define FN_DB_DATA_COMMAND_ANY (FN_QUERY2 + 6)
+#define FN_DB_DATA_COMMAND_TYPE_ANY (FN_QUERY2 + 7)
+#define FN_DB_DATA_COLUMN_NAME_ANY (FN_QUERY2 + 8)
+#define FN_DB_DATA_SELECTION_ANY (FN_QUERY2 + 9)
+#define FN_DB_DATA_CURSOR_ANY (FN_QUERY2 + 10)
+
+/*--------------------------------------------------------------------
+ Bereich: Envelope
+ --------------------------------------------------------------------*/
+
+#define FN_ENVELOP (FN_ENVELP )
+
+#define FN_DELETE_NOTE (FN_NOTES+0)
+#define FN_DELETE_NOTE_AUTHOR (FN_NOTES+1)
+#define FN_DELETE_ALL_NOTES (FN_NOTES+2)
+#define FN_HIDE_NOTE (FN_NOTES+3)
+#define FN_HIDE_NOTE_AUTHOR (FN_NOTES+4)
+#define FN_HIDE_ALL_NOTES (FN_NOTES+5)
+
+#define FN_DELETE_COMMENT (FN_NOTES+6)
+#define FN_REPLY (FN_NOTES+7)
+
+
+/*--------------------------------------------------------------------
+ Bereich: Parameter
+ --------------------------------------------------------------------*/
+
+#define FN_PARAM_TABLE_COLS (FN_PARAM)
+#define FN_PARAM_TABLE_ROWS (FN_PARAM+1)
+#define FN_PARAM_MOVE_COUNT (FN_PARAM+2)
+#define FN_PARAM_MOVE_SELECTION (FN_PARAM+3)
+
+#define FN_PARAM_SEARCH_WORDONLY (FN_PARAM+5)
+#define FN_PARAM_SEARCH_EXACT (FN_PARAM+6)
+#define FN_PARAM_SEARCH_REGEXP (FN_PARAM+7)
+#define FN_PARAM_SEARCH_BACKWARDS (FN_PARAM+8)
+#define FN_PARAM_SEARCH_FINDALL (FN_PARAM+9)
+#define FN_PARAM_SEARCH_SELECTION (FN_PARAM+10)
+#define FN_PARAM_SEARCH_TEXT (FN_PARAM+11)
+#define FN_PARAM_SEARCH_TEXTREPLACE (FN_PARAM+12)
+
+#define FN_PARAM_PARADLGLIMITS (FN_PARAM+15)
+#define FN_PARAM_FRMMODE (FN_PARAM+16)
+
+#define FN_PARAM_ADDPRINTER (FN_PARAM+18)
+#define FN_PARAM_GRID (FN_PARAM+19)
+#define FN_PARAM_DOCDISP (FN_PARAM+20)
+#define FN_PARAM_ELEM (FN_PARAM+21)
+#define FN_PARAM_SWTEST (FN_PARAM+22)
+
+#define FN_PARAM_FTN_INFO (FN_PARAM+23)
+
+#define FN_PARAM_REGION_NAME (FN_PARAM+24)
+#define FN_PARAM_REGION_CONDITION (FN_PARAM+25)
+#define FN_PARAM_REGION_HIDDEN (FN_PARAM+26)
+#define FN_PARAM_REGION_PROTECT (FN_PARAM+27)
+#define FN_PARAM_REGION_EDIT_IN_READONLY (FN_PARAM+28)
+
+#define FN_PARAM_INSERT_AFTER (FN_PARAM+29)
+//#define FN_PARAM_FILTER (FN_PARAM+30) already defined in svx/svxids.hrc
+#define FN_PARAM_INDEX_NAME (FN_PARAM+31)
+#define FN_PARAM_INDEX_OPTIONS (FN_PARAM+32)
+#define FN_PARAM_INDEX_FORMAT (FN_PARAM+33)
+#define FN_PARAM_INDEX_LEVEL (FN_PARAM+34)
+#define FN_PARAM_INDEX_TEMPLATE (FN_PARAM+35)
+#define FN_PARAM_INDEX_ALTSTR (FN_PARAM+36)
+#define FN_PARAM_INDEX_PRIMKEY (FN_PARAM+37)
+#define FN_PARAM_INDEX_SECKEY (FN_PARAM+38)
+#define FN_PARAM_WIDTH (FN_PARAM+39)
+#define FN_PARAM_LOCATION (FN_PARAM+40)
+#define FN_PARAM_DIR (FN_PARAM+41)
+#define FN_PARAM_COUNT (FN_PARAM+42)
+#define FN_PARAM_COLOR (FN_PARAM+43)
+
+#define FN_PARAM_TABLE_NAME (FN_PARAM+44)
+#define FN_PARAM_TABLE_WIDTH (FN_PARAM+45)
+#define FN_PARAM_TABLE_ULSPACE (FN_PARAM+46)
+#define FN_PARAM_TABLE_LRSPACE (FN_PARAM+47)
+#define FN_PARAM_TABLE_SHADOW (FN_PARAM+48)
+#define FN_PARAM_TABLE_ALIGN (FN_PARAM+49)
+#define FN_PARAM_TABLE_HEADLINE (FN_PARAM+50)
+#define FN_PARAM_TABLE_SPACE (FN_PARAM+51)
+#define FN_PARAM_TABLE_COLUMNS (FN_PARAM+52)
+
+#define FN_PARAM_GRF_CONNECT (FN_PARAM+53)
+#define FN_PARAM_FIELD_TYPE (FN_PARAM+54)
+//already defined in svxids.hrc: #define FN_PARAM_FIELD_CONTENT (FN_PARAM+55)
+#define FN_PARAM_FIELD_SUBTYPE (FN_PARAM+56)
+#define FN_PARAM_FIELD_FORMAT (FN_PARAM+57)
+
+
+#define FN_PARAM_EVENT (FN_PARAM+68)
+#define FN_PARAM_URL (FN_PARAM+69)
+#define FN_PARAM_GRF_REALSIZE (FN_PARAM+70)
+#define FN_PARAM_GRF_DIALOG (FN_PARAM+71)
+#define FN_PARAM_GRF_CLIENTMAP (FN_PARAM+74) /* ClientMap */
+#define FN_PARAM_GRF_SERVERMAP (FN_PARAM+75) /* ServerMap */
+#define FN_PARAM_GRF_TARGETFRAME (FN_PARAM+76) /* TargetFrame */
+#define FN_INET_FIELD_MACRO (FN_PARAM+77) /* Id fuer URL-Feld-Macros*/
+
+#define FN_PARAM_PRINTER (FN_PARAM+78) /* Drucker* */
+#define FN_PARAM_STDFONTS (FN_PARAM+79) /* ConfigItem Standardfonts */
+
+#define FN_PARAM_WRTSHELL (FN_PARAM2) /* SwWrtShell */
+
+#define FN_COND_COLL (FN_PARAM2+1) /* Item fuer bed. Vorlagen */
+#define FN_PARAM_SELECTION (FN_PARAM2+2) /* selektiertes Wort fuer Format/Zeichen/Hyperlink */
+
+#define FN_PARAM_ACT_NUMBER (FN_PARAM2+3) /* PointerItem die aktuelle NumRule */
+#define FN_PARAM_CHILD_LEVELS (FN_PARAM2+4) /* Werden Child-Levels benutzt ?*/
+
+#define FN_PARAM_NUM_PRESET (FN_PARAM2+5) /* vorgewaehlte Numerierung*/
+
+#define FN_PARAM_HEIGHT (FN_PARAM2+6) /* Param fuer Hoehe */
+#define FN_PARAM_DIST (FN_PARAM2+7) /* und Breite, wg. metrischer Umwandlung */
+
+#define FN_PARAM_SHADOWCURSOR (FN_PARAM2+8) /* Fuer ShadowCursor Optionen */
+
+#define FN_PARAM_ACT_NUMLEVEL (FN_PARAM2+9) /* BYTE-Item mit aktuellen NumLevel */
+
+#define FN_PARAM_9 (FN_PARAM2+10)
+#define FN_PARAM_10 (FN_PARAM2+11)
+
+#define FN_TEXT_RANGE (FN_PARAM2+12) /* TextRange Property*/
+
+#define FN_PARAM_CRSR_IN_PROTECTED (FN_PARAM2+13) /* Cursor in geschuetzten Bereichen*/
+#define FN_PARAM_TOX_TYPE (FN_PARAM2+14) /* TOX type in tox dialog*/
+#define FN_PARAM_LINK_DISPLAY_NAME (FN_PARAM2+15) /* LinkDisplayName property*/
+#define FN_PARAM_NUM_LEVEL (FN_PARAM2+16) /* rtf filter*/
+#define FN_PARAM_COUNTOUR_PP (FN_PARAM2+17) /* contour PolyPolygon*/
+
+#define FN_ANCHOR_POSITION (FN_PARAM2+18) /* AnchorPosition property */
+#define FN_DROP_TEXT (FN_PARAM2+18) /* text set in drop caps tab page - for recording */
+#define FN_DROP_CHAR_STYLE_NAME (FN_PARAM2+19) /* character style of drop caps - for recording */
+#define FN_PARAM_CHAIN_PREVIOUS (FN_PARAM2+20) /* Name of frame to be added as chain successor */
+#define FN_PARAM_CHAIN_NEXT (FN_PARAM2+21) /* Name of frame to be added as chain predecessor */
+#define FN_PARAM_DATABASE_PROPERTIES (FN_PARAM2+22) /* transport a Sequence<PropertyValue> containing database properties*/
+// --> OD 2004-08-06 #i28749#
+// com::sun::star::text::Shape::TransformationInHoriL2R property
+#define FN_SHAPE_TRANSFORMATION_IN_HORI_L2R (FN_PARAM2+23)
+// com::sun::star::text::Shape::PositionLayoutDir property
+#define FN_SHAPE_POSITION_LAYOUT_DIR (FN_PARAM2+24)
+// <--
+// --> OD 2004-10-28 #i36248#
+#define FN_SHAPE_STARTPOSITION_IN_HORI_L2R (FN_PARAM2+25)
+#define FN_SHAPE_ENDPOSITION_IN_HORI_L2R (FN_PARAM2+26)
+
+// <--
+/*--------------------------------------------------------------------
+ Bereich: Druckoptionen
+ --------------------------------------------------------------------*/
+
+#define FN_PRNOPT_GRAPHIC (FN_PRNOPT + 1)
+#define FN_PRNOPT_TABLE (FN_PRNOPT + 2)
+#define FN_PRNOPT_LEFT_PAGE (FN_PRNOPT + 3)
+#define FN_PRNOPT_RIGHT_PAGE (FN_PRNOPT + 4)
+#define FN_PRNOPT_REVERSE (FN_PRNOPT + 5)
+#define FN_PRNOPT_PAPER_FROM_SETUP (FN_PRNOPT + 6)
+#define FN_PRNOPT_POSTITS (FN_PRNOPT + 8)
+
+#define FN_PRNOPT_BEGIN FN_PRNOPT_GRAPHIC
+#define FN_PRNOPT_END FN_PRNOPT_POSTITS
+
+/*--------------------------------------------------------------------
+ Beschreibung: Status : nicht mehr als 19!
+ --------------------------------------------------------------------*/
+
+#define FN_STAT_PAGE (FN_STAT + 1)
+#define FN_STAT_TEMPLATE (FN_STAT + 2)
+#define FN_STAT_ZOOM (FN_STAT + 3)
+#define FN_STAT_INSOVER (FN_STAT + 4)
+#define FN_STAT_SELMODE (FN_STAT + 5)
+#define FN_STAT_CONTEXT (FN_STAT + 7)
+#define FN_STAT_BOOKMARK (FN_STAT + 8) /* Fuer Popup Bookmarks*/
+
+/*--------------------------------------------------------------------
+ Bereich: Seitenvorschau
+ --------------------------------------------------------------------*/
+
+#define FN_SHOW_TWO_PAGES (FN_PGPREVIEW + 1)
+//already in svx/svxids.hrc
+#ifndef FN_SHOW_MULTIPLE_PAGES
+#define FN_SHOW_MULTIPLE_PAGES (FN_PGPREVIEW + 2)
+#endif
+#define FN_PRINT_PAGEPREVIEW (FN_PGPREVIEW + 3)
+#define FN_CLOSE_PAGEPREVIEW (FN_PGPREVIEW + 4)
+#define FN_SHOW_BOOKVIEW (FN_PGPREVIEW + 5)
+
+/*--------------------------------------------------------------------
+ Bereich: Rahmenattribute
+ --------------------------------------------------------------------*/
+
+#define FN_OPAQUE (FN_FRAME + 1)
+#define FN_SET_PROTECT (FN_FRAME + 2)
+#define FN_SURROUND (FN_FRAME + 3)
+#define FN_VERT_ORIENT (FN_FRAME + 4)
+#define FN_HORI_ORIENT (FN_FRAME + 5)
+#define FN_SET_FRM_NAME (FN_FRAME + 6)
+#define FN_KEEP_ASPECT_RATIO (FN_FRAME + 7)
+#define FN_GRF_KEEP_ZOOM (FN_FRAME + 8)
+
+#define FN_IID_COL1 (FN_FRAME + 13)
+#define FN_IID_COL2 (FN_FRAME + 14)
+#define FN_IID_COL3 (FN_FRAME + 15)
+#define FN_IID_COLLEFT (FN_FRAME + 16)
+#define FN_IID_COLRIGHT (FN_FRAME + 17)
+
+#define FN_SET_FRM_ALT_NAME (FN_FRAME + 18)
+// --> OD 2009-07-13 #i73249#
+#define FN_UNO_TITLE (FN_FRAME + 19)
+#define FN_UNO_DESCRIPTION (FN_FRAME + 20)
+// <--
+
+
+//Member-Ids fuer Fill/SetVariable an Items
+#define MID_STYLE 0xe0
+#define MID_PWIDTH 0xe1
+#define MID_ADJUST 0xe2
+#define MID_TDIST 0xe3
+#define MID_BDIST 0xe4
+#define MID_LINES 0xe5
+#define MID_CHARS 0xe6
+#define MID_DIST 0xe7
+
+#define MID_1 0xe8
+#define MID_2 0xe9
+#define MID_3 0xea
+#define MID_4 0xeb
+#define MID_5 0xec
+#define MID_6 0xed
+#define MID_7 0xee
+#define MID_8 0xef
+#define MID_9 0xf0
+#define MID_A 0xf1
+#define MID_B 0xf2
+#define MID_C 0xf3
+#define MID_D 0xf4
+#define MID_E 0xf5
+#define MID_F 0xf6
+#define MID_10 0xf7
+#define MID_11 0xf8
+#define MID_12 0xf9
+#define MID_13 0xfa
+
+#ifndef SID_SW_DOCMAN_PATH
+#define SID_SW_DOCMAN_PATH (SID_OFASLOTS_START + 6)
+#endif
+
+// defines fuer Event-Zuweisung per Macro
+#define MAC_EVENT_MOUSEOVER 0x01 //
+#define MAC_EVENT_MOUSECLICK 0x02 // Hyperlink ausloesen
+#define MAC_EVENT_MOUSEOUT 0x03 //
+#define MAC_EVENT_OBJECT_SELECT 0x04 // Obj. selektieren
+#define MAC_EVENT_KEYINPUT_ALPHA 0x05 //
+#define MAC_EVENT_KEYINPUT_NOALPHA 0x06 //
+#define MAC_EVENT_FRM_RESIZE 0x07 //
+#define MAC_EVENT_FRM_MOVE 0x08 //
+#define MAC_EVENT_IMAGE_LOAD 0x09 //
+#define MAC_EVENT_IMAGE_ABORT 0x0a //
+#define MAC_EVENT_IMAGE_ERROR 0x0b //
+
+#endif /* INCLUDED_SW_CMDID_H */
diff --git a/sw/inc/colwd.hxx b/sw/inc/colwd.hxx
new file mode 100644
index 000000000000..3afb1647f4ad
--- /dev/null
+++ b/sw/inc/colwd.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _COLWD_HXX
+#define _COLWD_HXX
+
+
+#include <svx/stddlg.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/field.hxx>
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+
+
+
+class SwTableFUNC;
+
+class SwTableWidthDlg : public SvxStandardDialog
+{
+ FixedText aColFT;
+ NumericField aColEdit;
+ FixedText aWidthFT;
+ MetricField aWidthEdit;
+ FixedLine aWidthFL;
+ OKButton aOKBtn;
+ CancelButton aCancelBtn;
+ HelpButton aHelpBtn;
+ SwTableFUNC &rFnc;
+
+protected:
+ virtual void Apply();
+ DECL_LINK( LoseFocusHdl, Edit* pEdt=0 );
+
+public:
+ SwTableWidthDlg(Window *pParent, SwTableFUNC &rFnc );
+};
+
+#endif
diff --git a/sw/inc/comcore.hrc b/sw/inc/comcore.hrc
new file mode 100644
index 000000000000..981c89ef37db
--- /dev/null
+++ b/sw/inc/comcore.hrc
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _COMCORE_HRC
+#define _COMCORE_HRC
+
+#include "rcid.hrc"
+
+// ---------------
+// die Strings
+// ---------------
+
+#define STR_COMCORE_READERROR (RC_COMCORE_BEGIN + 0)
+#define MSG_COMCORE_ASKSEARCH (RC_COMCORE_BEGIN + 1)
+#define STR_TABLE_DEFNAME (RC_COMCORE_BEGIN + 2)
+#define STR_GRAPHIC_DEFNAME (RC_COMCORE_BEGIN + 3)
+#define STR_OBJECT_DEFNAME (RC_COMCORE_BEGIN + 4)
+#define STR_FRAME_DEFNAME (RC_COMCORE_BEGIN + 5)
+#define STR_REGION_DEFNAME (RC_COMCORE_BEGIN + 6)
+#define STR_COMCORE_CANT_SHOW (RC_COMCORE_BEGIN + 7)
+#define RID_GRAPHIC_REPLACEBMP (RC_COMCORE_BEGIN + 8)
+#define RID_GRAPHIC_ERRORBMP (RC_COMCORE_BEGIN + 9)
+#define STR_NUMRULE_DEFNAME (RC_COMCORE_BEGIN + 10)
+#define STR_EMPTYPAGE (RC_COMCORE_BEGIN + 11)
+#define RID_SHELLRES_AUTOFMTSTRS (RC_COMCORE_BEGIN + 12)
+#define STR_MULT_INTERACT_HYPH_WARN (RC_COMCORE_BEGIN + 13)
+#define STR_MULT_INTERACT_SPELL_WARN (RC_COMCORE_BEGIN + 14)
+#define STR_SPELL_TITLE (RC_COMCORE_BEGIN + 15)
+#define STR_HYPH_TITLE (RC_COMCORE_BEGIN + 16)
+#define MSG_DISABLE_UNDO_QUESTION (RC_COMCORE_BEGIN + 17)
+#define MSG_DISABLE_READLINE_QUESTION (RC_COMCORE_BEGIN + 18)
+// -> #111827#
+#define STR_REDLINE_INSERT (RC_COMCORE_BEGIN + 19)
+#define STR_REDLINE_DELETE (RC_COMCORE_BEGIN + 20)
+#define STR_REDLINE_FORMAT (RC_COMCORE_BEGIN + 21)
+#define STR_REDLINE_TABLE (RC_COMCORE_BEGIN + 22)
+#define STR_REDLINE_FMTCOLL (RC_COMCORE_BEGIN + 23)
+#define STR_CLIPBOARD (RC_COMCORE_BEGIN + 24)
+#define STR_START_QUOTE (RC_COMCORE_BEGIN + 25)
+#define STR_END_QUOTE (RC_COMCORE_BEGIN + 26)
+#define STR_LDOTS (RC_COMCORE_BEGIN + 27)
+#define STR_YIELDS (RC_COMCORE_BEGIN + 28)
+#define STR_PARAGRAPHS (RC_COMCORE_BEGIN + 29)
+#define STR_MULTISEL (RC_COMCORE_BEGIN + 30)
+#define STR_REDLINE_MULTIPLE (RC_COMCORE_BEGIN + 31)
+#define STR_N_REDLINES (RC_COMCORE_BEGIN + 32)
+#define STR_FIELD (RC_COMCORE_BEGIN + 33)
+// <- #111827#
+// -> #115575#
+#define STR_FRAME (RC_COMCORE_BEGIN + 34)
+#define STR_OLE (RC_COMCORE_BEGIN + 35)
+#define STR_MATH_FORMULA (RC_COMCORE_BEGIN + 36)
+#define STR_CHART (RC_COMCORE_BEGIN + 37)
+#define STR_NOTE (RC_COMCORE_BEGIN + 38)
+#define STR_REFERENCE (RC_COMCORE_BEGIN + 39)
+#define STR_SCRIPT (RC_COMCORE_BEGIN + 40)
+#define STR_AUTHORITY_ENTRY (RC_COMCORE_BEGIN + 41)
+#define STR_SPECIALCHAR (RC_COMCORE_BEGIN + 42)
+#define STR_FOOTNOTE (RC_COMCORE_BEGIN + 43)
+#define STR_GRAPHIC (RC_COMCORE_BEGIN + 44)
+#define STR_DRAWING_OBJECTS (RC_COMCORE_BEGIN + 45)
+#define STR_TABLE_NAME (RC_COMCORE_BEGIN + 46)
+#define STR_PARAGRAPH_UNDO (RC_COMCORE_BEGIN + 47)
+// <- #115575#
+// -> PB #146850#
+#define RID_GRAPHIC_REPLACEBMP_HC (RC_COMCORE_BEGIN + 48)
+#define RID_GRAPHIC_ERRORBMP_HC (RC_COMCORE_BEGIN + 49)
+// <- #146850#
+
+// defines fuer die Autoformat Redline Kommentare
+#define STR_AUTOFMTREDL_DEL_EMPTY_PARA 0
+#define STR_AUTOFMTREDL_USE_REPLACE 1
+#define STR_AUTOFMTREDL_CPTL_STT_WORD 2
+#define STR_AUTOFMTREDL_CPTL_STT_SENT 3
+#define STR_AUTOFMTREDL_TYPO 4
+#define STR_AUTOFMTREDL_USER_STYLE 5
+#define STR_AUTOFMTREDL_BULLET 6
+#define STR_AUTOFMTREDL_UNDER 7
+#define STR_AUTOFMTREDL_BOLD 8
+#define STR_AUTOFMTREDL_FRACTION 9
+#define STR_AUTOFMTREDL_DETECT_URL 10
+#define STR_AUTOFMTREDL_DASH 11
+#define STR_AUTOFMTREDL_ORDINAL 12
+#define STR_AUTOFMTREDL_RIGHT_MARGIN 13
+#define STR_AUTOFMTREDL_SET_TMPL_TEXT 14
+#define STR_AUTOFMTREDL_SET_TMPL_INDENT 15
+#define STR_AUTOFMTREDL_SET_TMPL_NEG_INDENT 16
+#define STR_AUTOFMTREDL_SET_TMPL_TEXT_INDENT 17
+#define STR_AUTOFMTREDL_SET_TMPL_HEADLINE 18
+#define STR_AUTOFMTREDL_SET_NUMBULET 19
+#define STR_AUTOFMTREDL_DEL_MORELINES 20
+#define STR_AUTOFMTREDL_NON_BREAK_SPACE 21
+// !!!!!!!!!!!!!!!!!!!!!!!!!! das Ende immer richtig setzen !!!!!!!!!!!!
+#define STR_AUTOFMTREDL_END 22
+
+
+#endif
+
+
+
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
new file mode 100644
index 000000000000..22cb3613502e
--- /dev/null
+++ b/sw/inc/crsrsh.hxx
@@ -0,0 +1,952 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CRSRSH_HXX
+#define _CRSRSH_HXX
+
+#include <com/sun/star/i18n/WordType.hpp>
+
+#include <tools/string.hxx>
+#include <tools/link.hxx>
+#include <tools/rtti.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx> // fuer SWPOSDOC
+#include <viewsh.hxx> // fuer ViewShell
+#include <calbck.hxx> // fuer SwClient
+#include <cshtyp.hxx> // fuer die CursorShell Typen
+#include <crstate.hxx> // fuer die CursorMove-Staties
+#include <toxe.hxx> // SwTOXSearchDir
+#include <tblsel.hxx> //SwTblSearchType
+#include <viscrs.hxx>
+#include <node.hxx>
+#include <tblsel.hxx>
+#include <IDocumentMarkAccess.hxx>
+
+
+// einige Forward Deklarationen
+
+class KeyCode;
+class SfxItemSet;
+class SfxPoolItem;
+class SwCntntFrm;
+class SwCrsrShell;
+class SwCursor;
+class SwField;
+class SwFieldType;
+class SwFmt;
+class SwFmtFld;
+class SwNodeIndex;
+class SwPaM;
+class SwShellCrsr;
+class SwShellTableCrsr;
+class SwTableNode;
+class SwTxtFmtColl;
+class SwVisCrsr;
+class SwTxtINetFmt;
+class SwFmtINetFmt;
+class SwTxtAttr;
+class SwTableBox;
+class SwCellFrms;
+class SwTOXMark;
+class SwRedline;
+class IBlockCursor;
+class SwCntntNode; // #i23726#
+// --> OD 2008-06-19 #i90516#
+class SwPostItField;
+// <--
+struct SwPosition;
+
+namespace com { namespace sun { namespace star { namespace util {
+ struct SearchOptions;
+} } } }
+
+namespace com { namespace sun { namespace star { namespace text {
+ class XTextRange;
+}}}}
+
+namespace com { namespace sun { namespace star { namespace container {
+ class XStringKeyMap;
+}}}}
+
+// enum und struktur, um ueber die Doc-Position Informationen zu erfragen
+
+struct SwContentAtPos
+{
+ enum IsAttrAtPos
+ {
+ SW_NOTHING = 0x0000,
+ SW_FIELD = 0x0001,
+ SW_CLICKFIELD = 0x0002,
+ SW_FTN = 0x0004,
+ SW_INETATTR = 0x0008,
+ SW_TABLEBOXFML = 0x0010,
+ SW_REDLINE = 0x0020,
+ SW_OUTLINE = 0x0040,
+ SW_TOXMARK = 0x0080,
+ SW_REFMARK = 0x0100,
+ SW_NUMLABEL = 0x0200, // #i23726#
+ SW_CONTENT_CHECK = 0x0400, // --> FME 2005-05-13 #i43742# <--
+ SW_SMARTTAG = 0x0800,
+ SW_FORMCTRL = 0x1000
+#ifndef PRODUCT
+ ,SW_CURR_ATTRS = 0x4000 // nur zum Debuggen
+ ,SW_TABLEBOXVALUE = 0x8000 // nur zum Debuggen
+#endif
+ } eCntntAtPos;
+
+ union {
+ const SwField* pFld;
+ const SfxPoolItem* pAttr;
+ const SwRedline* pRedl;
+ SwCntntNode * pNode; // #i23726#
+ const sw::mark::IFieldmark* pFldmark;
+ } aFnd;
+
+ int nDist; // #i23726#
+
+ String sStr;
+ const SwTxtAttr* pFndTxtAttr;
+
+ SwContentAtPos( int eGetAtPos = 0xffff )
+ : eCntntAtPos( (IsAttrAtPos)eGetAtPos )
+ {
+ aFnd.pFld = 0;
+ pFndTxtAttr = 0;
+ nDist = 0; // #i23726#
+ }
+
+ // befindet sich der Node in einem geschuetzten Bereich?
+ BOOL IsInProtectSect() const;
+ bool IsInRTLText()const;
+};
+
+// ReturnWerte von SetCrsr (werden verodert)
+const int CRSR_POSOLD = 0x01, // Cursor bleibt an alter Doc-Position
+ CRSR_POSCHG = 0x02; // Position vom Layout veraendert
+
+// Helperfunction to resolve backward references in regular expressions
+
+String *ReplaceBackReferences( const com::sun::star::util::SearchOptions& rSearchOpt, SwPaM* pPam );
+
+// die Cursor - Shell
+class SW_DLLPUBLIC SwCrsrShell : public ViewShell, public SwModify
+{
+ friend class SwCallLink;
+ friend class SwVisCrsr;
+ friend class SwSelPaintRects;
+ friend class SwChgLinkFlag;
+
+ //Braucht den Crsr als IntrnlCrsr.
+ friend BOOL GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
+
+public: // public, damit defaultet werden kann !!
+
+ /* ein enum fuer den Aufruf von UpdateCrsr */
+ enum CrsrFlag {
+ UPDOWN = (1 << 0), // Up/Down auf Spalte halten
+ SCROLLWIN = (1 << 1), // Window Scrollen
+ CHKRANGE = (1 << 2), // ueberpruefen von ueberlappenden PaM's
+ NOCALRECT = (1 << 3), // CharRect nicht neu berechnen
+ READONLY = (1 << 4) // Sichtbar machen trotz Readonly
+ };
+
+private:
+
+ SwRect aCharRect; // Char-SRectangle auf dem der Cursor steht
+ Point aCrsrHeight; // Hohe&Offset von sichtbaren Cursor
+ Point aOldRBPos; // Right/Bottom von letzter VisArea
+ // (wird im Invalidate vom Cursor benutzt)
+
+
+ // um event. Macro was anhaengt auszufuehren.
+ Link aFlyMacroLnk; // Link will be called, if the Crsr is set
+ // into a fly. A macro can be then becalled
+ Link aChgLnk; // link will be called by every attribut/
+ // format changes at cursor position.
+ Link aGrfArrivedLnk; // Link calls to UI if a grafik is arrived
+
+
+ SwShellCrsr* pCurCrsr; // der aktuelle Cursor
+ SwShellCrsr* pCrsrStk; // Stack fuer den Cursor
+ SwVisCrsr *pVisCrsr; // der Sichtbare-Cursor
+
+ IBlockCursor *pBlockCrsr; // interface of cursor for block (=rectangular) selection
+
+ SwShellTableCrsr* pTblCrsr; // Tabellen-Crsr; nur in Tabellen, wenn
+ // die Selection ueber 2 Spalten liegt
+
+ SwNodeIndex* pBoxIdx; // fuers erkennen der veraenderten
+ SwTableBox* pBoxPtr; // Tabellen-Zelle
+
+ long nUpDownX; // versuche den Cursor bei Up/Down immer in
+ // der gleichen Spalte zu bewegen
+ long nLeftFrmPos;
+ ULONG nAktNode; // save CursorPos at Start-Action
+ xub_StrLen nAktCntnt;
+ USHORT nAktNdTyp;
+ bool bAktSelection;
+
+ /*
+ * Mit den Methoden SttCrsrMove und EndCrsrMove wird dieser Zaehler
+ * Inc-/Decrementiert. Solange der Zaehler ungleich 0 ist, erfolgt
+ * auf den akt. Cursor kein Update. Dadurch koennen "komplizierte"
+ * Cursorbewegungen (ueber Find()) realisiert werden.
+ */
+ USHORT nCrsrMove;
+ USHORT nBasicActionCnt; // Actions, die vom Basic geklammert wurden
+ CrsrMoveState eMvState; // Status fuers Crsr-Travelling - GetCrsrOfst
+
+ // --> OD 2008-04-02 #refactorlists#
+ String sMarkedListId;
+ int nMarkedListLevel;
+ // <--
+
+ BOOL bHasFocus : 1; // Shell ist in einem Window "aktiv"
+ BOOL bSVCrsrVis : 1; // SV-Cursor Un-/Sichtbar
+ BOOL bChgCallFlag : 1; // Attributaenderung innerhalb von
+ // Start- und EndAction
+ BOOL bVisPortChgd : 1; // befindet sich im VisPortChg-Aufruf
+ // (wird im Invalidate vom Cursor benutzt)
+
+ BOOL bCallChgLnk : 1; // Flag fuer abgeleitete Klassen:
+ // TRUE -> ChgLnk callen
+ // Zugriff nur ueber SwChgLinkFlag
+ BOOL bAllProtect : 1; // Flag fuer Bereiche
+ // TRUE -> alles geschuetzt / versteckt
+ BOOL bInCMvVisportChgd : 1; // Flag fuer CrsrMoves
+ // TRUE -> die Sicht wurde verschoben
+ BOOL bGCAttr : 1; // TRUE -> es existieren nichtaufgespannte Attr.
+ BOOL bIgnoreReadonly : 1; // TRUE -> Beim naechsten EndAction trotz
+ // Readonly den Crsr sichtbar machen.
+ BOOL bSelTblCells : 1; // TRUE -> Zellen uebers InputWin selektieren
+ BOOL bAutoUpdateCells : 1; // TRUE -> Zellen werden autoformatiert
+ BOOL bBasicHideCrsr : 1; // TRUE -> HideCrsr vom Basic
+ BOOL bSetCrsrInReadOnly : 1;// TRUE -> Cursor darf in ReadOnly-Bereiche
+ BOOL bOverwriteCrsr : 1; // TRUE -> show Overwrite Crsr
+
+ // OD 11.02.2003 #100556# - flag to allow/avoid execution of marcos (default: true)
+ bool mbMacroExecAllowed : 1;
+
+ SW_DLLPRIVATE void UpdateCrsr( USHORT eFlags
+ =SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE,
+ BOOL bIdleEnd = FALSE );
+
+ SW_DLLPRIVATE void _ParkPams( SwPaM* pDelRg, SwShellCrsr** ppDelRing );
+
+ // -> #i27615#
+
+ /** Mark a certain list level of a certain list
+
+ OD 2008-04-02 #refactorlists#
+ levels of a certain lists are marked now
+
+ @param sListId list Id of the list whose level is marked
+ @param nLevel to be marked list level
+
+ An empty sListId denotes that no level of a list is marked.
+ */
+ SW_DLLPRIVATE void MarkListLevel( const String& sListId,
+ const int nLevel );
+ // <- #i27615#
+
+ // private method(s) accessed from public inline method(s) must be exported.
+ BOOL LeftRight( BOOL, USHORT, USHORT, BOOL );
+ SW_DLLPRIVATE BOOL UpDown( BOOL, USHORT );
+ SW_DLLPRIVATE BOOL LRMargin( BOOL, BOOL bAPI = FALSE );
+ SW_DLLPRIVATE BOOL IsAtLRMargin( BOOL, BOOL bAPI = FALSE ) const;
+
+ SW_DLLPRIVATE short GetTextDirection( const Point* pPt = 0 ) const;
+
+typedef BOOL (SwCursor:: *FNCrsr)();
+ SW_DLLPRIVATE BOOL CallCrsrFN( FNCrsr );
+
+ SW_DLLPRIVATE const SwRedline* _GotoRedline( USHORT nArrPos, BOOL bSelect );
+
+protected:
+
+ inline SwMoveFnCollection* MakeFindRange( USHORT, USHORT, SwPaM* ) const;
+
+ /*
+ * Compare-Methode for the StackCursor and the current Cursor.
+ * The Methods return -1, 0, 1 for lower, equal, greater. The enum
+ * CrsrCompareType says which position is compared.
+ */
+ enum CrsrCompareType {
+ StackPtStackMk,
+ StackPtCurrPt,
+ StackPtCurrMk,
+ StackMkCurrPt,
+ StackMkCurrMk,
+ CurrPtCurrMk
+ };
+ int CompareCursor( CrsrCompareType eType ) const;
+
+ // Setzt alle PaMs in OldNode auf NewPos + Offset
+ void PaMCorrAbs(const SwNodeIndex &rOldNode, const SwPosition &rNewPos,
+ const xub_StrLen nOffset = 0 );
+
+ // --> FME 2004-07-30 #i32329# Enhanced table selection
+ BOOL _SelTblRowOrCol( bool bRow, bool bRowSimple = false );
+ // <--
+
+ // --> FME 2005-01-31 #i41424# Only update the marked number levels if necessary
+ bool SetInFrontOfLabel( BOOL bNew );
+ // <--
+
+ void RefreshBlockCursor();
+
+ /** Updates the marked list level according to the cursor.
+ */
+ SW_DLLPRIVATE void UpdateMarkedListLevel();
+
+public:
+ TYPEINFO();
+ SwCrsrShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 );
+ // verkleideter Copy-Constructor
+ SwCrsrShell( SwCrsrShell& rShell, Window *pWin );
+ virtual ~SwCrsrShell();
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ // neuen Cusror erzeugen und den alten anhaengen
+ SwPaM * CreateCrsr();
+ // loesche den aktuellen Cursor und der folgende wird zum Aktuellen
+ BOOL DestroyCrsr();
+ // TableCursor in normale Cursor verwandeln, Tablemode aufheben
+ void TblCrsrToCursor();
+ // enter block mode, change normal cursor into block cursor
+ void CrsrToBlockCrsr();
+ // leave block mode, change block cursor into normal cursor
+ void BlockCrsrToCrsr();
+
+ // SelAll() selects the document body content
+ // if ExtendedSelect() is called afterwards, the whole nodes array is selected
+ // only for usage in special cases allowed!
+ void ExtendedSelectAll();
+
+ SwPaM* GetCrsr( BOOL bMakeTblCrsr = TRUE ) const;
+ inline SwCursor* GetSwCrsr( BOOL bMakeTblCrsr = TRUE ) const;
+ // nur den akt. Cursor returnen
+ SwShellCrsr* _GetCrsr() { return pCurCrsr; }
+ const SwShellCrsr* _GetCrsr() const { return pCurCrsr; }
+
+ // uebergebenen Cursor anzeigen - fuer UNO
+ void SetSelection(const SwPaM& rCrsr);
+
+ // alle Cursor aus den ContentNodes entfernen und auf 0 setzen.
+ // Wurde aus der FEShell hierher verschoben.
+ void ParkCrsr( const SwNodeIndex &rIdx );
+
+ // gebe den akt. Cursor-Stack zurueck.
+ // ( Wird in der EditShell beim Loeschen von Inhalten benoetigt! )
+ inline SwPaM* GetStkCrsr() const;
+
+ // Start der Klammerung, SV-Cursor und selektierte Bereiche hiden
+ void StartAction();
+ // Ende der Klammerung, SV-Cursor und selektierte Bereiche anzeigen
+ void EndAction( const BOOL bIdleEnd = FALSE );
+
+ // Basiscursortravelling
+ long GetUpDownX() const { return nUpDownX; }
+
+ BOOL Left( USHORT nCnt, USHORT nMode, BOOL bAllowVisual = FALSE )
+ { return LeftRight( TRUE, nCnt, nMode, bAllowVisual ); }
+ BOOL Right( USHORT nCnt, USHORT nMode, BOOL bAllowVisual = FALSE )
+ { return LeftRight( FALSE, nCnt, nMode, bAllowVisual ); }
+ BOOL Up( USHORT nCnt = 1 ) { return UpDown( TRUE, nCnt ); }
+ BOOL Down( USHORT nCnt = 1 ) { return UpDown( FALSE, nCnt ); }
+ BOOL LeftMargin() { return LRMargin( TRUE ); }
+ BOOL RightMargin(BOOL bAPI = FALSE) { return LRMargin( FALSE, bAPI ); }
+ BOOL SttEndDoc( BOOL bStt );
+
+ BOOL MovePage( SwWhichPage, SwPosPage );
+ BOOL MovePara( SwWhichPara, SwPosPara );
+ BOOL MoveSection( SwWhichSection, SwPosSection );
+ BOOL MoveTable( SwWhichTable, SwPosTable );
+ BOOL MoveColumn( SwWhichColumn, SwPosColumn );
+ BOOL MoveRegion( SwWhichRegion, SwPosRegion );
+
+ // die Suchfunktionen
+ ULONG Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ BOOL bSearchInNotes,
+ SwDocPositions eStart, SwDocPositions eEnde,
+ BOOL& bCancel,
+ FindRanges eRng, int bReplace = FALSE );
+
+ ULONG Find( const SwTxtFmtColl& rFmtColl,
+ SwDocPositions eStart, SwDocPositions eEnde,
+ BOOL& bCancel,
+ FindRanges eRng, const SwTxtFmtColl* pReplFmt = 0 );
+
+ ULONG Find( const SfxItemSet& rSet, BOOL bNoCollections,
+ SwDocPositions eStart, SwDocPositions eEnde,
+ BOOL& bCancel,
+ FindRanges eRng,
+ const com::sun::star::util::SearchOptions* pSearchOpt = 0,
+ const SfxItemSet* rReplSet = 0 );
+
+ // Positionieren des Cursors
+ // returnt
+ // CRSR_POSCHG: wenn der ob der SPoint vom Layout korrigiert wurde.
+ // CRSR_POSOLD: wenn der Crsr nicht veraendert wurde
+ int SetCrsr( const Point &rPt, BOOL bOnlyText = FALSE, bool bBlock = true );
+
+
+ /*
+ * Benachrichtung, dass der sichtbare Bereich sich geaendert
+ * hat. aVisArea wird neu gesetzt, anschliessend wird
+ * gescrollt. Das uebergebene Rectangle liegt auf
+ * Pixelgrenzen, um Pixelfehler beim Scrollen zu vermeiden.
+ */
+ virtual void VisPortChgd( const SwRect & );
+
+ /*
+ * Virtuelle PaintMethode, damit die Selection nach dem Paint wieder
+ * sichtbar wird.
+ */
+ void Paint( const Rectangle & rRect );
+
+ // Bereiche
+ inline void SetMark();
+ inline BOOL HasMark();
+
+ void ClearMark();
+
+ /**
+ Ensure point and mark of the current PaM are in a specific order.
+
+ @param bPointFirst TRUE: If the point is behind the mark then
+ swap the PaM. FALSE: If the mark is behind the point then swap
+ the PaM.
+ */
+ void NormalizePam(BOOL bPointFirst = TRUE);
+
+ void SwapPam();
+ BOOL ChgCurrPam( const Point & rPt,
+ BOOL bTstOnly = TRUE, //Nur testen, nicht setzen
+ BOOL bTstHit = FALSE ); //Nur genaue Treffer
+ void KillPams();
+
+ // erzeuge eine Kopie vom Cursor und speicher diese im Stack
+ void Push();
+ /*
+ * Loescht einen Cursor (gesteuert durch bOldCrsr)
+ * - vom Stack oder ( bOldCrsr = TRUE )
+ * - den aktuellen und der auf dem Stack stehende wird zum aktuellen
+ *
+ * Return: es war auf dem Stack noch einer vorhanden
+ */
+ BOOL Pop( BOOL bOldCrsr = TRUE );
+ /*
+ * Verbinde zwei Cursor miteinander.
+ * Loesche vom Stack den obersten und setzen dessen Mark im Aktuellen.
+ */
+ void Combine();
+
+#if !defined(DBG_UTIL)
+ void SttCrsrMove() { ++nCrsrMove; StartAction(); }
+ void EndCrsrMove( const BOOL bIdleEnd = FALSE )
+ { EndAction( bIdleEnd ); --nCrsrMove; }
+#else
+ void SttCrsrMove();
+ void EndCrsrMove( const BOOL bIdleEnd = FALSE );
+#endif
+
+ /*
+ * Beim Abgeben des Focuses werden die selektierten Bereiche nicht mehr
+ * angezeigt; andererseits beim Erhalten des Focuses, werden alle selek-
+ * tierten Bereiche wieder angezeigt. (Bereiche muessen neu berechnet
+ * werden!)
+ */
+ BOOL HasShFcs() const { return bHasFocus; }
+ void ShLooseFcs();
+ void ShGetFcs( BOOL bUpdate = TRUE );
+
+ // Methoden zum Anzeigen bzw. Verstecken des sichtbaren Text-Cursors
+ void ShowCrsr();
+ void HideCrsr();
+ // Methoden zum Anzeigen bzw. Verstecken der selektierten Bereiche mit
+ // dem sichtbaren Cursor
+ void ShowCrsrs( BOOL bCrsrVis );
+ void HideCrsrs();
+
+ BOOL IsOverwriteCrsr() const { return bOverwriteCrsr; }
+ void SetOverwriteCrsr( BOOL bFlag ) { bOverwriteCrsr = bFlag; }
+
+ // gebe den aktuellen Frame, in dem der Cursor steht, zurueck
+ SwCntntFrm *GetCurrFrm( const BOOL bCalcFrm = TRUE ) const;
+
+ //TRUE wenn der Crsr wenn der Crsr wegen Readonly gehidet ist,
+ //FALSE wenn der arbeitet (trotz Readonly).
+ BOOL IsCrsrReadonly() const;
+ // Cursor steht in etwas geschuetztem oder in die Selektion umspannt
+ // etwas geschuetztes.
+ BOOL HasReadonlySel() const;
+ // darf der Cursor in ReadOnlyBereiche?
+ BOOL IsReadOnlyAvailable() const { return bSetCrsrInReadOnly; }
+ void SetReadOnlyAvailable( BOOL bFlag );
+ BOOL IsOverReadOnlyPos( const Point& rPt ) const;
+
+ // Methoden fuer aFlyMacroLnk
+ void SetFlyMacroLnk( const Link& rLnk ) { aFlyMacroLnk = rLnk; }
+ const Link& GetFlyMacroLnk() const { return aFlyMacroLnk; }
+
+ // Methoden geben/aendern den Link fuer die Attribut/Format-Aenderungen
+ void SetChgLnk( const Link &rLnk ) { aChgLnk = rLnk; }
+ const Link& GetChgLnk() const { return aChgLnk; }
+
+ // Methoden geben/aendern den Link fuers "Grafik vollstaendig geladen"
+ void SetGrfArrivedLnk( const Link &rLnk ) { aGrfArrivedLnk = rLnk; }
+ const Link& GetGrfArrivedLnk() const { return aGrfArrivedLnk; }
+
+ //ChgLink callen, innerhalb einer Action wird der Ruf verzoegert.
+ void CallChgLnk();
+
+ // Abfrage, ob der aktuelle Cursor eine Selektion aufspannt,
+ // also, ob Mark gesetzt und SPoint und Mark unterschiedlich sind.
+ BOOL HasSelection() const;
+
+ // Abfrage, ob ueberhaupt eine Selektion existiert, sprich der akt. Cursor
+ // aufgespannt oder nicht der einzigste ist.
+ inline BOOL IsSelection() const;
+ // returns if multiple cursors are available
+ inline BOOL IsMultiSelection() const;
+
+ // Abfrage, ob ein kompletter Absatz selektiert wurde
+ BOOL IsSelFullPara() const;
+ // Abfrage, ob die Selektion in einem Absatz ist
+ inline BOOL IsSelOnePara() const;
+
+ //Sollte fuer das Clipboard der WaitPtr geschaltet werden.
+ BOOL ShouldWait() const;
+
+ /*
+ * liefert das SRectangle, auf dem der Cursor steht.
+ */
+ const SwRect &GetCharRect() const { return aCharRect; }
+ /*
+ * liefert zurueck, ob der Cursor sich ganz oder teilweise im
+ * sichtbaren Bereich befindet.
+ */
+ BOOL IsCrsrVisible() const { return VisArea().IsOver( GetCharRect() ); }
+
+ // gebe die aktuelle Seitennummer zurueck:
+ // TRUE: in der der Cursor steht
+ // FALSE: die am oberen Rand sichtbar ist
+ void GetPageNum( USHORT &rnPhyNum, USHORT &rnVirtNum,
+ BOOL bAtCrsrPos = TRUE, const BOOL bCalcFrm = TRUE );
+ // bestimme in welche Richtung "leere Seiten" behandelt werden!
+ // (wird benutzt im PhyPage.. )
+ USHORT GetNextPrevPageNum( BOOL bNext = TRUE );
+
+ // setze den Cursor auf die Seite "nPage" an den Anfang
+ BOOL GotoPage( USHORT nPage );
+
+ // gebe alle Dokumentseiten zurueck
+ USHORT GetPageCnt();
+
+ // Gehe zur naechsten Selection
+ BOOL GoNextCrsr();
+ // gehe zur vorherigen Selection
+ BOOL GoPrevCrsr();
+
+ // at CurCrsr.SPoint
+ ::sw::mark::IMark* SetBookmark(
+ const KeyCode&,
+ const ::rtl::OUString& rName,
+ const ::rtl::OUString& rShortName,
+ IDocumentMarkAccess::MarkType eMark = IDocumentMarkAccess::BOOKMARK);
+ bool GotoMark( const ::sw::mark::IMark* const pMark ); // sets CurCrsr.SPoint
+ bool GotoMark( const ::sw::mark::IMark* const pMark, bool bAtStart );
+ bool GoNextBookmark(); // true, if there was one
+ bool GoPrevBookmark();
+
+ bool IsFormProtected();
+ ::sw::mark::IFieldmark* GetCurrentFieldmark();
+ ::sw::mark::IFieldmark* GetFieldmarkAfter();
+ ::sw::mark::IFieldmark* GetFieldmarkBefore();
+ bool GotoFieldmark( const ::sw::mark::IFieldmark* const pMark );
+
+ // aktualisiere den Crsrs, d.H. setze ihn wieder in den Content.
+ // Das sollte nur aufgerufen werden, wenn der Cursor z.B. beim
+ // Loeschen von Rahmen irgendwohin gesetzt wurde. Die Position
+ // ergibt sich aus seiner aktuellen Position im Layout !!
+ void UpdateCrsrPos();
+
+ // returne den am akt. Cursor selektierten Text. Dieser wird mit
+ // Felder etc. aufgefuellt!!
+ String GetSelTxt() const;
+ // gebe nur den Text ab der akt. Cursor Position zurueck (bis zum NodeEnde)
+ String GetText() const;
+
+ // pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen
+ inline const SwTableNode* IsCrsrInTbl( BOOL bIsPtInTbl = TRUE ) const;
+ // erfrage die Document - Layout - Position vom akt. Crsr
+ inline Point& GetCrsrDocPos( BOOL bPoint = TRUE ) const;
+ inline BOOL IsCrsrPtAtEnd() const;
+
+ inline const SwPaM* GetTblCrs() const;
+ inline SwPaM* GetTblCrs();
+
+ BOOL IsTblComplex() const;
+ BOOL IsTblComplexForChart();
+ // erfrage die akt. TabellenSelektion als Text
+ String GetBoxNms() const;
+
+ // setze Crsr in die naechsten/vorherigen Celle
+ BOOL GoNextCell( BOOL bAppendLine = TRUE );
+ BOOL GoPrevCell();
+ // gehe zu dieser Box (wenn vorhanden und in Tabelle!)
+ BOOL GotoTable( const String& rName );
+
+ // select a table row, column or box (based on the current cursor)
+ BOOL SelTblRow() { return _SelTblRowOrCol( true ); }
+ BOOL SelTblCol() { return _SelTblRowOrCol( false ); }
+ BOOL SelTblBox();
+ // --> FME 2004-07-30 #i32329# Enhanced table selection
+ BOOL SelTbl();
+ // <--
+
+ // zum naechsten/vorhergehenden Punkt auf gleicher Ebene
+ BOOL GotoNextNum();
+ BOOL GotoPrevNum();
+
+ // zu diesem Gliederungspunkt
+ BOOL GotoOutline( const String& rName );
+ // zum naechsten/vorhergehenden oder angegebenen OultineNode
+ void GotoOutline( USHORT nIdx );
+ // suche die "Outline-Position" im Nodes-Array vom akt. Kaiptel
+ USHORT GetOutlinePos( BYTE nLevel = UCHAR_MAX );
+ // selektiere den angeben Bereich von OutlineNodes. Optional
+ // inclusive der Childs. Die USHORT sind die Positionen im
+ // OutlineNds-Array!! (EditShell)
+ BOOL MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
+ BOOL bWithChilds = FALSE );
+
+ BOOL GotoNextOutline(); // naechster Node mit Outline-Num.
+ BOOL GotoPrevOutline(); // vorheriger Node mit Outline-Num.
+
+ /** Delivers the current shell cursor
+
+ Some operations have to run on the current cursor ring,
+ some on the pTblCrsr (if exist) or the current cursor ring and
+ some on the pTblCrsr or pBlockCrsr or the current cursor ring.
+ This small function checks the existence and delivers the wished cursor.
+
+ @param bBlock [bool]
+ if the block cursor is of interest or not
+
+ @return pTblCrsr if exist,
+ pBlockCrsr if exist and of interest (param bBlock)
+ otherwise pCurCrsr
+ */
+ SwShellCrsr* getShellCrsr( bool bBlock );
+ const SwShellCrsr* getShellCrsr( bool bBlock ) const
+ { return (const_cast<SwCrsrShell*>(this))->getShellCrsr( bBlock ); }
+
+ FASTBOOL IsBlockMode() const { return 0 != pBlockCrsr; }
+ const IBlockCursor* GetBlockCrsr() const { return pBlockCrsr; }
+ IBlockCursor* GetBlockCrsr() { return pBlockCrsr; }
+
+ // ist der Crsr in einer Tabelle und ist die Selection ueber
+ // zwei Spalten
+ BOOL IsTableMode() const { return 0 != pTblCrsr; }
+
+ // erfrage den Tabellen Crsr; ausserhalb von Tabellen immer 0
+ const SwShellTableCrsr* GetTableCrsr() const { return pTblCrsr; }
+ SwShellTableCrsr* GetTableCrsr() { return pTblCrsr; }
+ USHORT UpdateTblSelBoxes();
+
+ BOOL GotoFtnTxt(); // springe aus dem Content zur Fussnote
+ BOOL GotoFtnAnchor(); // springe aus der Fussnote zum Anker
+ BOOL GotoPrevFtnAnchor();
+ BOOL GotoNextFtnAnchor();
+
+ BOOL GotoFlyAnchor(); // springe aus dem Rahmen zum Anker
+ BOOL GotoHeaderTxt(); // springe aus dem Content zum Header
+ BOOL GotoFooterTxt(); // springe aus dem Content zum Footer
+ // springe in den Header/Footer des angegebenen oder akt. PageDesc
+ BOOL SetCrsrInHdFt( USHORT nDescNo = USHRT_MAX,
+ BOOL bInHeader = TRUE );
+ // is point of cursor in header/footer. pbInHeader return TRUE if it is
+ // in a headerframe otherwise in a footerframe
+ BOOL IsInHeaderFooter( BOOL* pbInHeader = 0 ) const;
+
+ // springe zum naechsten Verzeichnis [mit dem Namen]
+ BOOL GotoNextTOXBase( const String* = 0 );
+ // springe zum vorherigen Verzeichnis [mit dem Namen]
+ BOOL GotoPrevTOXBase( const String* = 0 );
+ BOOL GotoTOXMarkBase(); // springe zum Verzeichnis vom TOXMark
+ // springe zum naechsten (vorherigen) Verzeichniseintrag
+ BOOL GotoNxtPrvTOXMark( BOOL bNext = TRUE );
+ // Zur naechsten/ vorherigen Verzeichnismarke dieses Typs traveln
+ const SwTOXMark& GotoTOXMark( const SwTOXMark& rStart, SwTOXSearch eDir );
+
+ // springe zum naechsten (vorherigen) Tabellenformel
+ // optional auch nur zu kaputten Formeln springen
+ BOOL GotoNxtPrvTblFormula( BOOL bNext = TRUE,
+ BOOL bOnlyErrors = FALSE );
+ // jump to the next / previous hyperlink - inside text and also
+ // on graphics
+ BOOL SelectNxtPrvHyperlink( BOOL bNext = TRUE );
+
+ // springe zu dieser Refmark
+ BOOL GotoRefMark( const String& rRefMark, USHORT nSubType = 0,
+ USHORT nSeqNo = 0 );
+
+ // hole vom Start/Ende der akt. Selection das nte Zeichen
+ sal_Unicode GetChar( BOOL bEnd = TRUE, long nOffset = 0 );
+ // erweiter die akt. Selection am Anfang/Ende um n Zeichen
+ BOOL ExtendSelection( BOOL bEnd = TRUE, xub_StrLen nCount = 1 );
+ // setze nur den sichtbaren Cursor an die angegebene Dokument-Pos.
+ // returnt FALSE: wenn der ob der SPoint vom Layout korrigiert wurde.
+ // (wird zum Anzeigen von Drag&Drop/Copy-Cursor benoetigt)
+ BOOL SetVisCrsr( const Point &rPt );
+ inline void UnSetVisCrsr();
+
+ // springe zum nachsten/vorherigen Feld des entsprechenden Types
+ BOOL MoveFldType( const SwFieldType* pFldType, BOOL bNext,
+ USHORT nSubType = USHRT_MAX,
+ USHORT nResType = USHRT_MAX );
+ // springe genau zu diesem Feld
+ BOOL GotoFld( const SwFmtFld& rFld );
+
+ // returne die Anzahl der Cursor im Ring (Flag besagt ob man nur
+ // aufgepspannte haben will - sprich etwas selektiert ist (Basic))
+ USHORT GetCrsrCnt( BOOL bAll = TRUE ) const;
+
+ // Char Travelling - Methoden (in crstrvl1.cxx)
+ BOOL GoStartWord();
+ BOOL GoEndWord();
+ BOOL GoNextWord();
+ BOOL GoPrevWord();
+ BOOL GoNextSentence();
+ BOOL GoPrevSentence();
+ BOOL GoStartSentence();
+ BOOL GoEndSentence();
+ BOOL SelectWord( const Point* pPt = 0 );
+ BOOL ExpandToSentenceBorders();
+
+ // Position vom akt. Cursor erfragen
+ BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const;
+ BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ BOOL IsStartSentence() const;
+ BOOL IsEndSentence() const;
+ BOOL IsSttPara() const;
+ BOOL IsEndPara() const;
+ BOOL IsStartOfDoc() const;
+ BOOL IsEndOfDoc() const;
+ BOOL IsInFrontOfLabel() const;
+ BOOL IsAtLeftMargin() const { return IsAtLRMargin( TRUE ); }
+ BOOL IsAtRightMargin(BOOL bAPI = FALSE) const { return IsAtLRMargin( FALSE, bAPI ); }
+
+ // loesche alle erzeugten Crsr, setze den Tabellen-Crsr und den letzten
+ // Cursor auf seinen TextNode (oder StartNode?).
+ // Beim naechsten ::GetCrsr werden sie wieder alle erzeugt.
+ // Wird fuers Drag&Drop/ClipBorad-Paste in Tabellen benoetigt.
+ BOOL ParkTblCrsr();
+
+ // gibt es nicht aufgespannte Attribute?
+ BOOL IsGCAttr() const { return bGCAttr; }
+ void ClearGCAttr() { bGCAttr = FALSE; }
+ void UpdateAttr() { bGCAttr = TRUE; }
+
+ // ist das gesamte Dokument geschuetzt/versteckt?? (fuer UI,..)
+ BOOL IsAllProtect() const { return bAllProtect; }
+
+#ifdef SW_CRSR_TIMER
+ // setze das Flag am VisCrsr, ob dieser ueber Timer getriggert (TRUE)
+ // oder direkt (FALSE) angezeigt wird. (default ist Timer getriggert)
+ BOOL ChgCrsrTimerFlag( BOOL bTimerOn = TRUE );
+#endif
+
+ BOOL BasicActionPend() const { return nBasicActionCnt != nStartAction; }
+
+ // springe zum benannten Bereich
+ BOOL GotoRegion( const String& rName );
+
+ // zeige die aktuelle Selektion an
+ virtual void MakeSelVisible();
+
+ // setzte den Cursor auf einen NICHT geschuetzten/versteckten Node
+ BOOL FindValidCntntNode( BOOL bOnlyText = FALSE );
+
+ BOOL GetContentAtPos( const Point& rPt,
+ SwContentAtPos& rCntntAtPos,
+ BOOL bSetCrsr = FALSE,
+ SwRect* pFldRect = 0 );
+
+ // --> OD 2008-06-19 #i90516#
+ const SwPostItField* GetPostItFieldAtCursor() const;
+ // <--
+
+ // get smart tags at point position
+ void GetSmartTagTerm( const Point& rPt,
+ SwRect& rSelectRect,
+ ::com::sun::star::uno::Sequence< rtl::OUString >& rSmartTagTypes,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > >& rStringKeyMaps,
+ ::com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rRange );
+
+ // get smart tags at current cursor position
+ void GetSmartTagTerm( ::com::sun::star::uno::Sequence< rtl::OUString >& rSmartTagTypes,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > >& rStringKeyMaps,
+ ::com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rRange ) const;
+
+ BOOL IsPageAtPos( const Point &rPt ) const;
+
+ // Attribut selelktieren
+ BOOL SelectTxtAttr( USHORT nWhich, BOOL bExpand, const SwTxtAttr* pAttr = 0 );
+ BOOL GotoINetAttr( const SwTxtINetFmt& rAttr );
+ const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
+
+ BOOL CheckTblBoxCntnt( const SwPosition* pPos = 0 );
+ void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
+ void ClearTblBoxCntnt();
+ BOOL EndAllTblBoxEdit();
+
+ // wird gerufen, wenn eine Tabellenselektion im UpdateCrsr erzeugt wird,
+ // ohne das die UI davon etaws weiss
+ virtual void NewCoreSelection();
+
+ void SetSelTblCells( BOOL bFlag ) { bSelTblCells = bFlag; }
+ BOOL IsSelTblCells() const { return bSelTblCells; }
+
+ BOOL IsAutoUpdateCells() const { return bAutoUpdateCells; }
+ void SetAutoUpdateCells( BOOL bFlag ) { bAutoUpdateCells = bFlag; }
+
+ BOOL GetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode,
+ SwRect& rRect, short& rOrient );
+ BOOL SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode );
+
+ const SwRedline* SelNextRedline();
+ const SwRedline* SelPrevRedline();
+ const SwRedline* GotoRedline( USHORT nArrPos, BOOL bSelect = FALSE );
+
+ // is cursor or the point in/over a vertical formatted text?
+ BOOL IsInVerticalText( const Point* pPt = 0 ) const;
+ // is cursor or the point in/over a right to left formatted text?
+ BOOL IsInRightToLeftText( const Point* pPt = 0 ) const;
+
+ // If the current cursor position is inside a hidden range, the hidden range
+ // is selected and true is returned:
+ bool SelectHiddenRange();
+
+ // remove all invalid cursors
+ void ClearUpCrsrs();
+
+ // OD 11.02.2003 #100556# - set/get flag to allow/avoid execution of macros
+ inline void SetMacroExecAllowed( const bool _bMacroExecAllowed )
+ {
+ mbMacroExecAllowed = _bMacroExecAllowed;
+ }
+ inline bool IsMacroExecAllowed()
+ {
+ return mbMacroExecAllowed;
+ }
+
+ // #111827#
+ /**
+ Returns textual description of the current selection.
+
+ - If the current selection is a multi-selection the result is
+ STR_MULTISEL.
+ - Else the result is the text of the selection.
+
+ @return the textual description of the current selection
+ */
+ String GetCrsrDescr() const;
+
+ SwRect GetRectOfCurrentChar();
+};
+
+
+// Cursor Inlines:
+inline SwMoveFnCollection* SwCrsrShell::MakeFindRange(
+ USHORT nStt, USHORT nEnd, SwPaM* pPam ) const
+{
+ return pCurCrsr->MakeFindRange( (SwDocPositions)nStt, (SwDocPositions)nEnd, pPam );
+}
+
+inline SwCursor* SwCrsrShell::GetSwCrsr( BOOL bMakeTblCrsr ) const
+{
+ return (SwCursor*)GetCrsr( bMakeTblCrsr );
+}
+
+inline SwPaM* SwCrsrShell::GetStkCrsr() const { return pCrsrStk; }
+
+inline void SwCrsrShell::SetMark() { pCurCrsr->SetMark(); }
+
+inline BOOL SwCrsrShell::HasMark() { return( pCurCrsr->HasMark() ); }
+
+inline BOOL SwCrsrShell::IsSelection() const
+{
+ return IsTableMode() || pCurCrsr->HasMark() ||
+ pCurCrsr->GetNext() != pCurCrsr;
+}
+inline BOOL SwCrsrShell::IsMultiSelection() const
+{
+ return pCurCrsr->GetNext() != pCurCrsr;
+}
+
+inline BOOL SwCrsrShell::IsSelOnePara() const
+{
+ return pCurCrsr == pCurCrsr->GetNext() &&
+ pCurCrsr->GetPoint()->nNode == pCurCrsr->GetMark()->nNode;
+}
+
+inline const SwTableNode* SwCrsrShell::IsCrsrInTbl( BOOL bIsPtInTbl ) const
+{
+ return pCurCrsr->GetNode( bIsPtInTbl )->FindTableNode();
+}
+
+inline BOOL SwCrsrShell::IsCrsrPtAtEnd() const
+{
+ return pCurCrsr->End() == pCurCrsr->GetPoint();
+}
+
+inline Point& SwCrsrShell::GetCrsrDocPos( BOOL bPoint ) const
+{
+ return bPoint ? pCurCrsr->GetPtPos() : pCurCrsr->GetMkPos();
+}
+
+inline const SwPaM* SwCrsrShell::GetTblCrs() const
+{
+ return pTblCrsr;
+}
+
+inline SwPaM* SwCrsrShell::GetTblCrs()
+{
+ return pTblCrsr;
+}
+
+inline void SwCrsrShell::UnSetVisCrsr()
+{
+ pVisCrsr->Hide();
+ pVisCrsr->SetDragCrsr( FALSE );
+}
+
+#endif // _CRSRSH_HXX
diff --git a/sw/inc/crsskip.hxx b/sw/inc/crsskip.hxx
new file mode 100644
index 000000000000..84d9650c5eca
--- /dev/null
+++ b/sw/inc/crsskip.hxx
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CRSSKIP_HXX
+#define _CRSSKIP_HXX
+
+#include <tools/solar.h>
+
+
+// define for cursor travelling normally in western text cells and chars do
+// the same, but in complex text cell skip over legatures and char skip
+// into it.
+// These defines exist only to cut off the dependicies to I18N project.
+const USHORT CRSR_SKIP_CHARS = 0;
+const USHORT CRSR_SKIP_CELLS = 1;
+const USHORT CRSR_SKIP_HIDDEN = 2;
+
+#endif
diff --git a/sw/inc/crstate.hxx b/sw/inc/crstate.hxx
new file mode 100644
index 000000000000..de32f44c8f85
--- /dev/null
+++ b/sw/inc/crstate.hxx
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CRSTATE_HXX
+#define _CRSTATE_HXX
+
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <tools/gen.hxx>
+#include <swtypes.hxx>
+#include <swrect.hxx>
+
+
+enum SwFillMode
+{
+ FILL_TAB, // default, Auffuellen mit Tabulatoren
+ FILL_SPACE, // ... mit Tabulatoren und Spaces
+ FILL_MARGIN, // nur links, zentriert, rechts Ausrichten
+ FILL_INDENT // durch linken Absatzeinzug
+};
+
+struct SwFillCrsrPos
+{
+ SwRect aCrsr; // Position und Groesse des Shadowcursors
+ USHORT nParaCnt; // Anzahl der einzufuegenden Absaetze
+ USHORT nTabCnt; // Anzahl der Tabs bzw. Groesse des Einzugs
+ USHORT nSpaceCnt; // Anzahl der einzufuegenden Leerzeichen
+ USHORT nColumnCnt; // Anzahl der notwendigen Spaltenumbrueche
+ sal_Int16 eOrient; // Absatzausrichtung
+ SwFillMode eMode; // Gewuenschte Auffuellregel
+ SwFillCrsrPos( SwFillMode eMd = FILL_TAB ) :
+ nParaCnt( 0 ), nTabCnt( 0 ), nSpaceCnt( 0 ), nColumnCnt( 0 ),
+ eOrient( com::sun::star::text::HoriOrientation::NONE ), eMode( eMd )
+ {}
+};
+
+// Multiportion types: two lines, bidirectional, 270 degrees rotation,
+// ruby portion and 90 degrees rotation
+#define MT_TWOLINE 0
+#define MT_BIDI 1
+#define MT_ROT_270 3
+#define MT_RUBY 4
+#define MT_ROT_90 7
+
+struct Sw2LinesPos
+{
+ SwRect aLine; // Position and size of the line
+ SwRect aPortion; // Position and size of the multi portion
+ SwRect aPortion2; // needed for nested multi portions
+ BYTE nMultiType; // Multiportion type
+};
+
+/**
+ * SwSpecialPos. This structure is used to pass some additional information
+ * during the call of SwTxtFrm::GetCharRect(). An SwSpecialPos defines a position
+ * inside a portion which does not have a representation in the core string or
+ * which is only represented by one position, e.g., field portions,
+ * number portions, ergo sum and quo vadis portions.
+ *
+ * nCharOfst - The offset inside the special portion. Fields and its
+ * follow fields are treated as one long special portion.
+ * nLineOfst - The number of lines between the beginning of the special
+ * portion and nCharOfst. A line offset required to be
+ * nCharOfst relative to the beginning of the line.
+ * nExtendRange - Setting this identifies portions which are in front or
+ * behind the core string (number portion, quo vadis)
+ *
+ * Examples 1)
+ *
+ * Get the position of the second character inside a number portion:
+ * nCharOfst = 2; nLineOfst = 0; nExtendRange = SP_EXTEND_RANGE_BEFORE;
+ * Call SwTxtFrm:::GetCharRect with core string position 0.
+ *
+ * Example 2)
+ *
+ * Field A - Length = 5
+ * Follow field B - Length = 9
+ * Get the position of the third character in follow field B, core position
+ * of field A is 33.
+ * nCharOfst = 7; nLineOfst = 0; nExtendRange = SP_EXTEND_RANGE_NONE;
+ * Call SwTxtFrm:::GetCharRect with core string position 33.
+ */
+
+#define SP_EXTEND_RANGE_NONE 0
+#define SP_EXTEND_RANGE_BEFORE 1
+#define SP_EXTEND_RANGE_BEHIND 2
+
+struct SwSpecialPos
+{
+ xub_StrLen nCharOfst;
+ USHORT nLineOfst;
+ BYTE nExtendRange;
+
+ // #i27615#
+ SwSpecialPos() : nCharOfst(0), nLineOfst(0),
+ nExtendRange(SP_EXTEND_RANGE_NONE)
+ {}
+};
+
+// CrsrTravelling-Staties (fuer GetCrsrOfst)
+enum CrsrMoveState
+{
+ MV_NONE, // default
+ MV_UPDOWN, // Crsr Up/Down
+ MV_RIGHTMARGIN, // an rechten Rand
+ MV_LEFTMARGIN, // an linken Rand
+ MV_SETONLYTEXT, // mit dem Cursr nur im Text bleiben
+ MV_TBLSEL // nicht in wiederholte Headlines
+};
+
+// struct fuer spaetere Erweiterungen
+struct SwCrsrMoveState
+{
+ SwFillCrsrPos *pFill; // fuer das automatische Auffuellen mit Tabs etc.
+ Sw2LinesPos *p2Lines; // for selections inside/around 2line portions
+ SwSpecialPos* pSpecialPos; // for positions inside fields
+ Point aRealHeight; // enthaelt dann die Position/Hoehe des Cursors
+ CrsrMoveState eState;
+ BYTE nCursorBidiLevel;
+ BOOL bStop :1;
+ BOOL bRealHeight :1; // Soll die reale Hoehe berechnet werden?
+ BOOL bFieldInfo :1; // Sollen Felder erkannt werden?
+ BOOL bPosCorr :1; // Point musste korrigiert werden
+ BOOL bFtnNoInfo :1; // Fussnotennumerierung erkannt
+ BOOL bExactOnly :1; // GetCrsrOfst nur nach Exakten Treffern
+ // suchen lassen, sprich niemals in das
+ // GetCntntPos laufen.
+ BOOL bFillRet :1; // wird nur im FillModus temp. genutzt
+ BOOL bSetInReadOnly :1; // ReadOnlyBereiche duerfen betreten werden
+ BOOL bRealWidth :1; // Calculation of the width required
+ BOOL b2Lines :1; // Check 2line portions and fill p2Lines
+ BOOL bNoScroll :1; // No scrolling of undersized textframes
+ BOOL bPosMatchesBounds :1; // GetCrsrOfst should not return the next
+ // position if screen position is inside second
+ // have of bound rect
+
+ BOOL bCntntCheck :1; // --> FME 2005-05-13 #i43742# Cursor position over content? <--
+
+ // #i27615#
+ /**
+ cursor in front of label
+ */
+ BOOL bInFrontOfLabel :1;
+ BOOL bInNumPortion :1; // point is in number portion #i23726#
+ int nInNumPostionOffset; // distance from number portion's start
+
+ SwCrsrMoveState( CrsrMoveState eSt = MV_NONE ) :
+ pFill( NULL ),
+ p2Lines( NULL ),
+ pSpecialPos( NULL ),
+ eState( eSt ),
+ nCursorBidiLevel( 0 ),
+ bStop( FALSE ),
+ bRealHeight( FALSE ),
+ bFieldInfo( FALSE ),
+ bPosCorr( FALSE ),
+ bFtnNoInfo( FALSE ),
+ bExactOnly( FALSE ),
+ bSetInReadOnly( FALSE ),
+ bRealWidth( FALSE ),
+ b2Lines( FALSE ),
+ bNoScroll( FALSE ),
+ bPosMatchesBounds( FALSE ),
+ bCntntCheck( FALSE ), // --> FME 2005-05-13 #i43742# <--
+ bInFrontOfLabel( FALSE ), // #i27615#
+ bInNumPortion(FALSE), // #i26726#
+ nInNumPostionOffset(0) // #i26726#
+ {}
+ SwCrsrMoveState( SwFillCrsrPos *pInitFill ) :
+ pFill( pInitFill ),
+ pSpecialPos( NULL ),
+ eState( MV_SETONLYTEXT ),
+ nCursorBidiLevel( 0 ),
+ bStop( FALSE ),
+ bRealHeight( FALSE ),
+ bFieldInfo( FALSE ),
+ bPosCorr( FALSE ),
+ bFtnNoInfo( FALSE ),
+ bExactOnly( FALSE ),
+ bSetInReadOnly( FALSE ),
+ bRealWidth( FALSE ),
+ b2Lines( FALSE ),
+ bNoScroll( FALSE ),
+ bPosMatchesBounds( FALSE ),
+ bCntntCheck( FALSE ), // --> FME 2005-05-13 #i43742# <--
+ bInFrontOfLabel( FALSE ), // #i27615#
+ bInNumPortion(FALSE), // #i23726#
+ nInNumPostionOffset(0) // #i23726#
+ {}
+};
+
+
+#endif
+
+
diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx
new file mode 100644
index 000000000000..a99df015a7c1
--- /dev/null
+++ b/sw/inc/cshtyp.hxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _CSHTYP_HXX
+#define _CSHTYP_HXX
+
+#include <tools/solar.h>
+#include "swdllapi.h"
+
+class SwPaM;
+class SwCntntFrm;
+class SwLayoutFrm;
+
+// eine Struktur fuer den SwPaM. In dieser stehen die Methoden-Pointer
+// fuer das richtungsabhaengige Bewegen des Cursors.
+struct SwMoveFnCollection;
+typedef SwMoveFnCollection* SwMoveFn;
+
+
+// Type-Definition fuer die CrsrShell
+// Richtungsparameter fuer MovePage ( wird in SwCntntFrm initialisiert )
+typedef SwLayoutFrm * (*SwWhichPage)( const SwLayoutFrm * );
+typedef SwCntntFrm * (*SwPosPage)( const SwLayoutFrm * );
+extern SwWhichPage fnPagePrev, fnPageCurr, fnPageNext;
+extern SwPosPage fnPageStart, fnPageEnd;
+
+// Richtungsparameter fuer MovePara ( wird in SwPaM initialisiert )
+typedef SwMoveFnCollection* SwPosPara;
+typedef BOOL (*SwWhichPara)( SwPaM&, SwPosPara );
+extern SwWhichPara fnParaPrev, fnParaCurr, fnParaNext;
+extern SwPosPara fnParaStart, fnParaEnd;
+
+// Richtungsparameter fuer MoveSection
+typedef SwMoveFnCollection* SwPosSection;
+typedef BOOL (*SwWhichSection)( SwPaM&, SwPosSection );
+extern SwWhichSection fnSectionPrev, fnSectionCurr, fnSectionNext;
+extern SwPosSection fnSectionStart, fnSectionEnd;
+
+// Richtungsparameter fuer MoveTable
+typedef SwMoveFnCollection* SwPosTable;
+typedef BOOL (*SwWhichTable)( SwPaM&, SwPosTable, BOOL bInReadOnly );
+extern SwWhichTable fnTablePrev, fnTableCurr, fnTableNext;
+extern SwPosTable fnTableStart, fnTableEnd;
+
+// Richtungsparameter fuer MoveColumn
+typedef SwLayoutFrm * (*SwWhichColumn)( const SwLayoutFrm * );
+typedef SwCntntFrm * (*SwPosColumn)( const SwLayoutFrm * );
+extern SwWhichColumn fnColumnPrev, fnColumnCurr, fnColumnNext;
+extern SwPosColumn fnColumnStart, fnColumnEnd;
+
+// Richtungsparameter fuer MoveRegion (Bereiche!)
+typedef SwMoveFnCollection* SwPosRegion;
+typedef BOOL (*SwWhichRegion)( SwPaM&, SwPosRegion, BOOL bInReadOnly );
+extern SwWhichRegion fnRegionPrev, fnRegionCurr, fnRegionNext, fnRegionCurrAndSkip;
+extern SwPosRegion fnRegionStart, fnRegionEnd;
+
+
+
+/*
+ * folgende Kombinationen sind erlaubt:
+ * - suche einen im Body: -> FND_IN_BODY
+ * - suche alle im Body: -> FND_IN_BODYONLY | FND_IN_SELALL
+ * - suche in Selectionen: einen / alle -> FND_IN_SEL [ | FND_IN_SELALL ]
+ * - suche im nicht Body: einen / alle -> FND_IN_OTHER [ | FND_IN_SELALL ]
+ * - suche ueberall alle: -> FND_IN_SELALL
+ */
+enum FindRanges
+{
+ FND_IN_BODY = 0x00, // suche "eins" mur im Body-Text
+ FND_IN_OTHER = 0x02, // suche "alles" in Footer/Header/Fly...
+ FND_IN_SEL = 0x04, // suche in Selectionen
+ FND_IN_BODYONLY = 0x08, // suche nur im Body - nur in Verbindung mit
+ // FND_IN_SELALL !!!
+ FND_IN_SELALL = 0x01 // - alle ( nur im nicht Body und Selectionen)
+};
+
+
+enum SwDocPositions
+{
+ DOCPOS_START,
+ DOCPOS_CURR,
+ DOCPOS_END,
+ DOCPOS_OTHERSTART,
+ DOCPOS_OTHEREND
+};
+
+SW_DLLPUBLIC SwWhichPara GetfnParaCurr();
+SW_DLLPUBLIC SwPosPara GetfnParaStart();
+SW_DLLPUBLIC SwPosPara GetfnParaEnd();
+
+SW_DLLPUBLIC SwWhichTable GetfnTablePrev();
+SW_DLLPUBLIC SwWhichTable GetfnTableCurr();
+SW_DLLPUBLIC SwPosTable GetfnTableStart();
+SW_DLLPUBLIC SwPosTable GetfnTableEnd();
+
+#endif // _CSHTYP_HXX
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
new file mode 100644
index 000000000000..4114c0cfe0d3
--- /dev/null
+++ b/sw/inc/dbfld.hxx
@@ -0,0 +1,338 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DBFLD_HXX
+#define _DBFLD_HXX
+
+#include "swdllapi.h"
+#include "fldbas.hxx"
+#include "swdbdata.hxx"
+
+class SwDoc;
+class SwTxtFld;
+class SwFrm;
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBFieldType : public SwValueFieldType
+{
+ SwDBData aDBData; //
+ String sName; // only used in ::GetName() !
+ String sColumn;
+ long nRefCnt;
+
+public:
+
+ SwDBFieldType(SwDoc* pDocPtr, const String& rColumnName, const SwDBData& rDBData);
+ ~SwDBFieldType();
+
+ virtual const String& GetName() const;
+ virtual SwFieldType* Copy() const;
+
+ inline void AddRef() { nRefCnt++; }
+ void ReleaseRef();
+
+ const String& GetColumnName() const {return sColumn;}
+ const SwDBData& GetDBData() const {return aDBData;}
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ von SwFields abgeleitete Klassen. Sie ueberlagern die Expand-Funktion.
+ Der Inhalt wird entsprechend dem Format, soweit vorhanden, formatiert.
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBField : public SwValueField
+{
+ String aContent;
+ String sFieldCode; // contains Word's field code
+ USHORT nSubType;
+ BOOL bIsInBodyTxt : 1;
+ BOOL bValidValue : 1;
+ BOOL bInitialized : 1;
+
+public:
+ SwDBField(SwDBFieldType*, ULONG nFmt = 0);
+ virtual ~SwDBField();
+
+ virtual SwFieldType* ChgTyp( SwFieldType* );
+
+ // Der aktuelle Text
+ inline void SetExpansion(const String& rStr);
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nType);
+
+ // Name oder Inhalt
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+
+ // fuer Berechnungen in Ausdruecken
+ void ChgValue( double d, BOOL bVal );
+
+ // Evaluierung ueber den DBMgr String rauspulen
+ void Evaluate();
+
+ // Evaluierung fuer Kopf und Fusszeilen
+ void ChangeExpansion( const SwFrm*, const SwTxtFld* );
+ void InitContent();
+ void InitContent(const String& rExpansion);
+
+ inline void ChgBodyTxtFlag( BOOL bIsInBody );
+
+ inline BOOL IsInitialized() const { return bInitialized; }
+ inline void ClearInitialized() { bInitialized = FALSE; }
+ inline void SetInitialized() { bInitialized = TRUE; }
+
+ // Name erfragen
+ virtual const String& GetPar1() const;
+
+ // access to the command string
+ const String& GetFieldCode() const
+ { return sFieldCode;}
+ void SetFieldCode(const String& rStr)
+ { sFieldCode = rStr; }
+
+ // DBName
+ inline const SwDBData& GetDBData() const { return ((SwDBFieldType*)GetTyp())->GetDBData(); }
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline void SwDBField::SetExpansion(const String& rStr)
+ { aContent = rStr; }
+
+// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+inline void SwDBField::ChgBodyTxtFlag( BOOL bIsInBody )
+ { bIsInBodyTxt = bIsInBody; }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Basisklasse fuer alle weiteren Datenbankfelder
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBNameInfField : public SwField
+{
+ SwDBData aDBData;
+ USHORT nSubType;
+
+protected:
+ const SwDBData& GetDBData() const {return aDBData;}
+ SwDBData& GetDBData() {return aDBData;}
+
+ SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt = 0);
+
+public:
+ // DBName
+ inline const SwDBData& GetRealDBData() { return aDBData; }
+
+ SwDBData GetDBData(SwDoc* pDoc);
+ void SetDBData(const SwDBData& rDBData); // #111840#
+
+ // Name oder Inhalt
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nType);
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankfeld Naechster Satz
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBNextSetFieldType : public SwFieldType
+{
+public:
+ SwDBNextSetFieldType();
+
+ virtual SwFieldType* Copy() const;
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Naechsten Datensatz mit Bedingung
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBNextSetField : public SwDBNameInfField
+{
+ String aCond;
+ BOOL bCondValid;
+
+public:
+ SwDBNextSetField( SwDBNextSetFieldType*,
+ const String& rCond, const String& rDummy, const SwDBData& rDBData);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ void Evaluate(SwDoc*);
+ inline void SetCondValid(BOOL bCond);
+ inline BOOL IsCondValid() const;
+
+ // Condition
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline BOOL SwDBNextSetField::IsCondValid() const
+ { return bCondValid; }
+
+inline void SwDBNextSetField::SetCondValid(BOOL bCond)
+ { bCondValid = bCond; }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankfeld Naechster Satz
+ --------------------------------------------------------------------*/
+
+class SwDBNumSetFieldType : public SwFieldType
+{
+public:
+ SwDBNumSetFieldType();
+
+ virtual SwFieldType* Copy() const;
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datensatz mit Nummer xxx
+ Die Nummer steht in nFormat
+ ! kleiner Missbrauch
+ --------------------------------------------------------------------*/
+
+class SwDBNumSetField : public SwDBNameInfField
+{
+ String aCond;
+ String aPar2;
+ BOOL bCondValid;
+
+public:
+ SwDBNumSetField(SwDBNumSetFieldType*, const String& rCond, const String& rDBNum, const SwDBData& rDBData);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline BOOL IsCondValid() const;
+ inline void SetCondValid(BOOL bCond);
+ void Evaluate(SwDoc*);
+
+ // Condition
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // Datensatznummer
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ // Die Datensatznummer steht in nFormat !!
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline BOOL SwDBNumSetField::IsCondValid() const
+ { return bCondValid; }
+
+inline void SwDBNumSetField::SetCondValid(BOOL bCond)
+ { bCondValid = bCond; }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankname
+ --------------------------------------------------------------------*/
+
+class SwDBNameFieldType : public SwFieldType
+{
+ SwDoc *pDoc;
+public:
+ SwDBNameFieldType(SwDoc*);
+
+ String Expand(ULONG) const;
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBNameField : public SwDBNameInfField
+{
+public:
+ SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData, ULONG nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datensatznummer
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBSetNumberFieldType : public SwFieldType
+{
+public:
+ SwDBSetNumberFieldType();
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datenbankfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDBSetNumberField : public SwDBNameInfField
+{
+ long nNumber;
+
+public:
+ SwDBSetNumberField(SwDBSetNumberFieldType*, const SwDBData& rDBData, ULONG nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ void Evaluate(SwDoc*);
+
+ inline long GetSetNumber() const;
+ inline void SetSetNumber(long nNum);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline long SwDBSetNumberField::GetSetNumber() const
+ { return nNumber; }
+
+inline void SwDBSetNumberField::SetSetNumber(long nNum)
+ { nNumber = nNum; }
+
+
+#endif // _DBFLD_HXX
diff --git a/sw/inc/dbgoutsw.hxx b/sw/inc/dbgoutsw.hxx
new file mode 100644
index 000000000000..e1822bd4ace9
--- /dev/null
+++ b/sw/inc/dbgoutsw.hxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 __DBGOUTSW_HXX
+#define __DBGOUTSW_HXX
+
+#ifdef DEBUG
+
+#include <hash_map>
+#include <tox.hxx>
+class String;
+
+namespace rtl
+{
+class OUString;
+}
+class SwNode;
+class SwTxtAttr;
+class SwpHints;
+class SfxPoolItem;
+class SfxItemSet;
+struct SwPosition;
+class SwPaM;
+class SwNodeNum;
+class SwUndo;
+class SwUndos;
+class SwRect;
+class SwFrmFmt;
+class SwFrmFmts;
+class SwNodes;
+class SwRewriter;
+class SwNumRuleTbl;
+class SwNumRule;
+class SwOutlineNodes;
+class SwTxtFmtColl;
+class SwNodeRange;
+
+#define DBG_OUT_HERE printf("%s(%d):", __FILE__, __LINE__)
+#define DBG_OUT_HERE_FN printf("%s(%d) %s:", __FILE__, __LINE__, __FUNCTION__)
+#define DBG_OUT_HERE_LN printf("%s(%d)\n", __FILE__, __LINE__)
+#define DBG_OUT_HERE_FN_LN printf("%s(%d) %s\n", __FILE__, __LINE__, __FUNCTION__)
+#define DBG_OUT(x) printf("%s\n", dbg_out(x))
+#define DBG_OUT_LN(x) printf("%s(%d): %s\n", __FILE__, __LINE__, dbg_out(x))
+#define DBG_OUT_FN_LN(x) printf("%s: %s\n", __FUNCTION__, dbg_out(x))
+
+extern bool bDbgOutStdErr;
+extern bool bDbgOutPrintAttrSet;
+
+SW_DLLPUBLIC const char * dbg_out(const void * pVoid);
+SW_DLLPUBLIC const char * dbg_out(const String & aStr);
+SW_DLLPUBLIC const char * dbg_out(const ::rtl::OUString & aStr);
+SW_DLLPUBLIC const char * dbg_out(const SwRect & rRect);
+SW_DLLPUBLIC const char * dbg_out(const SwFrmFmt & rFrmFmt);
+SW_DLLPUBLIC const char * dbg_out(const SwNode & rNode);
+SW_DLLPUBLIC const char * dbg_out(const SwTxtAttr & rAttr);
+SW_DLLPUBLIC const char * dbg_out(const SwpHints &rHints);
+SW_DLLPUBLIC const char * dbg_out(const SfxPoolItem & rItem);
+SW_DLLPUBLIC const char * dbg_out(const SfxPoolItem * pItem);
+SW_DLLPUBLIC const char * dbg_out(const SfxItemSet & rSet);
+SW_DLLPUBLIC const char * dbg_out(SwNodes & rNodes);
+// const char * dbg_out(SwOutlineNodes & rNodes);
+SW_DLLPUBLIC const char * dbg_out(const SwPosition & rPos);
+SW_DLLPUBLIC const char * dbg_out(const SwPaM & rPam);
+SW_DLLPUBLIC const char * dbg_out(const SwNodeNum & rNum);
+SW_DLLPUBLIC const char * dbg_out(const SwUndo & rUndo);
+SW_DLLPUBLIC const char * dbg_out(const SwUndos & rUndos);
+SW_DLLPUBLIC const char * dbg_out(const SwRewriter & rRewriter);
+SW_DLLPUBLIC const char * dbg_out(const SwNumRule & rRule);
+SW_DLLPUBLIC const char * dbg_out(const SwTxtFmtColl & rFmt);
+SW_DLLPUBLIC const char * dbg_out(const SwFrmFmts & rFrmFmts);
+SW_DLLPUBLIC const char * dbg_out(const SwNumRuleTbl & rTbl);
+SW_DLLPUBLIC const char * dbg_out(const SwNodeRange & rRange);
+
+template<typename tKey, typename tMember, typename fHashFunction>
+String lcl_dbg_out(const std::hash_map<tKey, tMember, fHashFunction> & rMap)
+{
+ String aResult("[", RTL_TEXTENCODING_ASCII_US);
+
+ typename std::hash_map<tKey, tMember, fHashFunction>::const_iterator aIt;
+
+ for (aIt = rMap.begin(); aIt != rMap.end(); aIt++)
+ {
+ if (aIt != rMap.begin())
+ aResult += String(", ", RTL_TEXTENCODING_ASCII_US);
+
+ aResult += aIt->first;
+
+ char sBuffer[256];
+ sprintf(sBuffer, "(%p)", aIt->second);
+ aResult += String(sBuffer, RTL_TEXTENCODING_ASCII_US);
+ }
+
+ aResult += String("]", RTL_TEXTENCODING_ASCII_US);
+
+ return aResult;
+}
+
+template<typename tKey, typename tMember, typename fHashFunction>
+const char * dbg_out(const std::hash_map<tKey, tMember, fHashFunction> & rMap)
+{
+ return dbg_out(lcl_dbg_out(rMap));
+}
+SW_DLLPUBLIC const char * dbg_out(const SwFormToken & rToken);
+SW_DLLPUBLIC const char * dbg_out(const SwFormTokens & rTokens);
+#endif // DEBUG
+#endif // __DBGOUTSW_HXX
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
new file mode 100644
index 000000000000..d044f5e80fa6
--- /dev/null
+++ b/sw/inc/dbmgr.hxx
@@ -0,0 +1,399 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWDBMGR_HXX
+#define _SWDBMGR_HXX
+
+
+#include <tools/string.hxx>
+#include <tools/link.hxx>
+#include <svl/svarray.hxx>
+#include <com/sun/star/util/Date.hpp>
+#include "swdllapi.h"
+#include <swdbdata.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+namespace com{namespace sun{namespace star{
+ namespace sdbc{
+ class XConnection;
+ class XStatement;
+ class XDataSource;
+ class XResultSet;
+ }
+ namespace beans{
+
+ class XPropertySet;
+ struct PropertyValue;
+ }
+ namespace sdbcx{
+ class XColumnsSupplier;
+ }
+ namespace util{
+ class XNumberFormatter;
+ }
+ namespace mail{
+ class XSmtpService;
+ }
+}}}
+namespace svx {
+ class ODataAccessDescriptor;
+}
+
+struct SwDBFormatData
+{
+ com::sun::star::util::Date aNullDate;
+ com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatter> xFormatter;
+ com::sun::star::lang::Locale aLocale;
+};
+
+class SwView;
+class SwWrtShell;
+class SwPrtOptions;
+class SfxProgress;
+class ListBox;
+class Button;
+class SvNumberFormatter;
+class SwDbtoolsClient;
+class SwXMailMerge;
+class SwMailMergeConfigItem;
+
+// -----------------------------------------------------------------------
+
+enum DBMgrOptions
+{
+ DBMGR_MERGE, // Datensaetze in Felder
+ DBMGR_INSERT, // Datensaetze in Text
+ DBMGR_MERGE_MAILMERGE, // Serienbriefe drucken
+ DBMGR_MERGE_MAILING, // Serienbriefe als email versenden
+ DBMGR_MERGE_MAILFILES, // Serienbriefe als Datei(en) speichern
+ DBMGR_MERGE_DOCUMENTS, // Print merged documents
+ DBMGR_MERGE_SINGLE_FILE // save merge as single file
+};
+
+// -----------------------------------------------------------------------
+
+/*--------------------------------------------------------------------
+ Beschreibung: (neue) Logische Datenbanken verwalten
+ --------------------------------------------------------------------*/
+#define SW_DB_SELECT_UNKNOWN 0
+#define SW_DB_SELECT_TABLE 1
+#define SW_DB_SELECT_QUERY 2
+
+struct SwDSParam : public SwDBData
+{
+ com::sun::star::util::Date aNullDate;
+
+ ::com::sun::star::uno::Reference<com::sun::star::util::XNumberFormatter> xFormatter;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement> xStatement;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xResultSet;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aSelection;
+ BOOL bScrollable;
+ BOOL bEndOfDB;
+ BOOL bAfterSelection;
+ long nSelectionIndex;
+
+ SwDSParam(const SwDBData& rData) :
+ SwDBData(rData),
+ bScrollable(FALSE),
+ bEndOfDB(FALSE),
+ bAfterSelection(FALSE),
+ nSelectionIndex(0)
+ {}
+
+ SwDSParam(const SwDBData& rData,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& xResSet,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rSelection) :
+ SwDBData(rData),
+ xResultSet(xResSet),
+ aSelection(rSelection),
+ bScrollable(TRUE),
+ bEndOfDB(FALSE),
+ bAfterSelection(FALSE),
+ nSelectionIndex(0)
+ {}
+
+ void CheckEndOfDB()
+ {
+ if(bEndOfDB)
+ bAfterSelection = TRUE;
+ }
+};
+typedef SwDSParam* SwDSParamPtr;
+SV_DECL_PTRARR_DEL(SwDSParamArr, SwDSParamPtr, 0, 5)
+
+struct SwMergeDescriptor
+{
+ USHORT nMergeType;
+ SwWrtShell& rSh;
+ const ::svx::ODataAccessDescriptor& rDescriptor;
+ String sSaveToFilter; //export filter to save resulting files
+ String sSaveToFilterOptions; //
+ com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSaveToFilterData;
+
+ String sSubject;
+ String sAddressFromColumn;
+ String sMailBody;
+ String sAttachmentName;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aCopiesTo;
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aBlindCopiesTo;
+
+ ::com::sun::star::uno::Reference< com::sun::star::mail::XSmtpService > xSmtpServer;
+
+ sal_Bool bSendAsHTML;
+ sal_Bool bSendAsAttachment;
+
+ sal_Bool bPrintAsync;
+ sal_Bool bCreateSingleFile;
+
+ SwMailMergeConfigItem* pMailMergeConfigItem;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aPrintOptions;
+
+ SwMergeDescriptor( USHORT nType, SwWrtShell& rShell, ::svx::ODataAccessDescriptor& rDesc ) :
+ nMergeType(nType),
+ rSh(rShell),
+ rDescriptor(rDesc),
+ bSendAsHTML( sal_True ),
+ bSendAsAttachment( sal_False ),
+ bPrintAsync( sal_False ),
+ bCreateSingleFile( sal_False ),
+ pMailMergeConfigItem(0)
+ {}
+
+};
+
+struct SwNewDBMgr_Impl;
+class SwConnectionDisposedListener_Impl;
+class AbstractMailMergeDlg;
+
+class SW_DLLPUBLIC SwNewDBMgr
+{
+friend class SwConnectionDisposedListener_Impl;
+
+ static SwDbtoolsClient* pDbtoolsClient;
+
+ String sEMailAddrFld; // Mailing: Spaltenname der E-Mail Adresse
+ String sSubject; // Mailing: Subject
+ String sAttached; // Mailing: Attachte Files
+ USHORT nMergeType;
+ BOOL bInitDBFields : 1; // TRUE: Datenbank an Feldern beim Mergen
+ BOOL bSingleJobs : 1; // Einzelne Druckjobs bei Aufruf aus Basic
+ BOOL bCancel : 1; // Serienbrief-Save abgebrochen
+
+ BOOL bInMerge : 1; //merge process active
+ BOOL bMergeSilent : 1; // suppress display of dialogs/boxes (used when called over API)
+ BOOL bMergeLock : 1; // prevent update of database fields while document is
+ // actually printed at the ViewShell
+ SwDSParamArr aDataSourceParams;
+ SwNewDBMgr_Impl* pImpl;
+ const SwXMailMerge* pMergeEvtSrc; // != 0 if mail merge events are to be send
+
+ SW_DLLPRIVATE SwDSParam* FindDSData(const SwDBData& rData, BOOL bCreate);
+ SW_DLLPRIVATE SwDSParam* FindDSConnection(const ::rtl::OUString& rSource, BOOL bCreate);
+
+
+ SW_DLLPRIVATE DECL_LINK( PrtCancelHdl, Button * );
+
+ // Datensaetze als Text ins Dokument einfuegen
+ SW_DLLPRIVATE void ImportFromConnection( SwWrtShell* pSh);
+
+ // Einzelnen Datensatz als Text ins Dokument einfuegen
+ SW_DLLPRIVATE void ImportDBEntry(SwWrtShell* pSh);
+
+ // merge to file _and_ merge to e-Mail
+ SW_DLLPRIVATE BOOL MergeMailFiles(SwWrtShell* pSh,
+ const SwMergeDescriptor& rMergeDescriptor );
+ SW_DLLPRIVATE BOOL ToNextRecord(SwDSParam* pParam);
+
+public:
+ SwNewDBMgr();
+ ~SwNewDBMgr();
+
+ // Art des aktellen Mergens. Siehe DBMgrOptions-enum
+ inline USHORT GetMergeType() const { return nMergeType; }
+ inline void SetMergeType( USHORT nTyp ) { nMergeType = nTyp; }
+
+ // MailMergeEvent source
+ const SwXMailMerge * GetMailMergeEvtSrc() const { return pMergeEvtSrc; }
+ void SetMailMergeEvtSrc( const SwXMailMerge *pSrc ) { pMergeEvtSrc = pSrc; }
+
+ inline BOOL IsMergeSilent() const { return bMergeSilent != 0; }
+ inline void SetMergeSilent( BOOL bVal ) { bMergeSilent = bVal; }
+
+ // Mischen von Datensaetzen in Felder
+ BOOL MergeNew( const SwMergeDescriptor& rMergeDesc );
+ BOOL Merge(SwWrtShell* pSh);
+
+ // Datenbankfelder mit fehlendem Datenbankname initialisieren
+ inline BOOL IsInitDBFields() const { return bInitDBFields; }
+ inline void SetInitDBFields(BOOL b) { bInitDBFields = b; }
+
+ // Serienbriefe einzelnd oder alle zusammen drucken/speichern
+ inline BOOL IsSingleJobs() const { return bSingleJobs; }
+ inline void SetSingleJobs(BOOL b) { bSingleJobs = b; }
+
+ // Mailing
+ // email-Daten setzen
+ inline void SetEMailColumn(const String& sColName) { sEMailAddrFld = sColName; }
+ inline void SetSubject(const String& sSbj) { sSubject = sSbj; }
+ inline void SetAttachment(const String& sAtt) { sAttached = sAtt; }
+
+
+ // Listbox mit allen Tabellennamen einer Datenbank fuellen
+ BOOL GetTableNames(ListBox* pListBox, const String& rDBName );
+
+ // Listbox mit allen Spaltennamen einer Datenbanktabelle fuellen
+ BOOL GetColumnNames(ListBox* pListBox,
+ const String& rDBName, const String& rTableName, BOOL bAppend = FALSE);
+ BOOL GetColumnNames(ListBox* pListBox,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection,
+ const String& rTableName, BOOL bAppend = FALSE);
+
+ ULONG GetColumnFmt( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xSource,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection,
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xColumn,
+ SvNumberFormatter* pNFmtr,
+ long nLanguage );
+
+ ULONG GetColumnFmt( const String& rDBName,
+ const String& rTableName,
+ const String& rColNm,
+ SvNumberFormatter* pNFmtr,
+ long nLanguage );
+ sal_Int32 GetColumnType( const String& rDBName,
+ const String& rTableName,
+ const String& rColNm );
+
+ inline BOOL IsInMerge() const { return bInMerge; }
+ void EndMerge();
+
+ void ExecuteFormLetter(SwWrtShell& rSh,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties,
+ BOOL bWithDataSourceBrowser = FALSE);
+
+ void InsertText(SwWrtShell& rSh,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties);
+
+ // check if a data source is open
+ BOOL IsDataSourceOpen(const String& rDataSource,
+ const String& rTableOrQuery, sal_Bool bMergeOnly);
+
+ // open the source while fields are updated - for the calculator only!
+ BOOL OpenDataSource(const String& rDataSource, const String& rTableOrQuery,
+ sal_Int32 nCommandType = -1, bool bCreate = false);
+ sal_uInt32 GetSelectedRecordId(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1);
+ BOOL GetColumnCnt(const String& rSourceName, const String& rTableName,
+ const String& rColumnName, sal_uInt32 nAbsRecordId, long nLanguage,
+ String& rResult, double* pNumber);
+ //create and store or find an already stored connection to a data source for use
+ //in SwFldMgr and SwDBTreeList
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>
+ RegisterConnection(::rtl::OUString& rSource);
+
+ const SwDSParam* CreateDSData(const SwDBData& rData)
+ {return FindDSData(rData, TRUE);}
+ const SwDSParamArr& GetDSParamArray() const {return aDataSourceParams;}
+
+
+ //close all data sources - after fields were updated
+ void CloseAll(BOOL bIncludingMerge = TRUE);
+
+ BOOL GetMergeColumnCnt(const String& rColumnName, USHORT nLanguage,
+ String &rResult, double *pNumber, sal_uInt32 *pFormat);
+ BOOL ToNextMergeRecord();
+ BOOL ToNextRecord(const String& rDataSource, const String& rTableOrQuery, sal_Int32 nCommandType = -1);
+
+ BOOL ExistsNextRecord()const;
+ sal_uInt32 GetSelectedRecordId();
+ sal_Bool ToRecordId(sal_Int32 nSet);
+
+ const SwDBData& GetAddressDBName();
+
+ static String GetDBField(
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xColumnProp,
+ const SwDBFormatData& rDBFormatData,
+ double *pNumber = NULL);
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>
+ GetConnection(const String& rDataSource,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>& rxSource);
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>
+ GetColumnSupplier(::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>,
+ const String& rTableOrQuery,
+ BYTE eTableOrQuery = SW_DB_SELECT_UNKNOWN);
+
+ static ::com::sun::star::uno::Sequence<rtl::OUString> GetExistingDatabaseNames();
+
+ /**
+ Loads a data source from file and registers it. Returns the registered name.
+ */
+ static String LoadAndRegisterDataSource();
+
+ static SwDbtoolsClient& GetDbtoolsClient();
+ // has to be called from _FinitUI()
+ static void RemoveDbtoolsClient();
+
+ /** try to get the data source from the given connection through the XChild interface.
+ If this is not possible, the data source will be created through its name.
+ @param _xConnection
+ The connection which should support the XChild interface. (not a must)
+ @param _sDataSourceName
+ The data source name will be used to create the data source when the connection can not be used for it.
+ @return
+ The data source.
+ */
+ static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>
+ getDataSourceAsParent(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,const ::rtl::OUString& _sDataSourceName);
+
+ /** creates a RowSet, which must be disposed after use.
+ @param _sDataSourceName
+ The data source name
+ @param _sCommand
+ The command.
+ @param _nCommandType
+ The type of the command.
+ @param _xConnection
+ The active connection which may be <NULL/>.
+ @return
+ The new created RowSet.
+
+ */
+ static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>
+ createCursor( const ::rtl::OUString& _sDataSourceName,
+ const ::rtl::OUString& _sCommand,
+ sal_Int32 _nCommandType,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection
+ );
+ //merge into one document - returns the number of merged docs
+ sal_Int32 MergeDocuments( SwMailMergeConfigItem& rMMConfig, SwView& rSourceView );
+};
+
+#endif
+
diff --git a/sw/inc/dbui.hrc b/sw/inc/dbui.hrc
new file mode 100644
index 000000000000..2afc70221e3d
--- /dev/null
+++ b/sw/inc/dbui.hrc
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DBUI_HRC
+#define _DBUI_HRC
+
+// #include *****************************************************************
+
+#include "rcid.hrc"
+
+// Dialoge --------------------------------------------------------------------
+
+#define DLG_DBSELECTION (RC_DBUI_BEGIN)
+#define DLG_PRINTMONITOR (RC_DBUI_BEGIN + 1)
+#define DLG_AP_INSERT_DB_SEL (RC_DBUI_BEGIN + 2)
+
+#define DLG_MAILMERGEWIZARD (RC_DBUI_BEGIN + 3)
+#define DLG_MM_DOCSELECT_PAGE (RC_DBUI_BEGIN + 4)
+#define DLG_MM_OUTPUTTYPE_PAGE (RC_DBUI_BEGIN + 5)
+#define DLG_MM_ADDRESSBLOCK_PAGE (RC_DBUI_BEGIN + 6)
+#define DLG_MM_GREETINGS_PAGE (RC_DBUI_BEGIN + 7)
+#define DLG_MM_PREPAREMERGE_PAGE (RC_DBUI_BEGIN + 8)
+#define DLG_MM_MERGE_PAGE (RC_DBUI_BEGIN + 9)
+#define DLG_MM_OUTPUT_PAGE (RC_DBUI_BEGIN + 10)
+#define DLG_MM_ADDRESSLISTDIALOG (RC_DBUI_BEGIN + 11)
+#define DLG_MM_SELECTDBTABLEDDIALOG (RC_DBUI_BEGIN + 12)
+#define DLG_MM_DBTABLEPREVIEWDIALOG (RC_DBUI_BEGIN + 13)
+#define DLG_MM_CREATEADDRESSLIST (RC_DBUI_BEGIN + 14)
+#define DLG_MM_FIND_ENTRY (RC_DBUI_BEGIN + 15)
+#define DLG_MM_ADD_RENAME_ENTRY (RC_DBUI_BEGIN + 16)
+#define DLG_MM_CUSTOMIZE_ADDRESS_LIST (RC_DBUI_BEGIN + 17)
+#define DLG_MM_CUSTOMIZEADDRESSBLOCK (RC_DBUI_BEGIN + 18)
+#define DLG_MM_SELECTADDRESSBLOCK (RC_DBUI_BEGIN + 19)
+#define DLG_MM_ASSIGNFIELDS (RC_DBUI_BEGIN + 20)
+
+#define DLG_MM_LAYOUT_PAGE (RC_DBUI_BEGIN + 22)
+#define DLG_MM_COPYTO (RC_DBUI_BEGIN + 23)
+#define DLG_MM_MAILBODY (RC_DBUI_BEGIN + 24)
+#define DLG_MM_SENDMAILS (RC_DBUI_BEGIN + 25)
+#define DLG_MAILMERGECHILD (RC_DBUI_BEGIN + 26)
+#define DLG_MM_SAVEWARNING (RC_DBUI_BEGIN + 27)
+#define DLG_MM_QUERY (RC_DBUI_BEGIN + 28)
+#define DLG_MM_SENDWARNING (RC_DBUI_BEGIN + 29)
+#define DLG_MM_CREATIONMONITOR (RC_DBUI_BEGIN + 30)
+// Strings ------------------------------------------------------------------
+
+#define STR_DB_EMAIL (RC_DBUI_BEGIN)
+#define SA_ADDRESS_HEADER (RC_DBUI_BEGIN + 1)
+#define STR_NOTASSIGNED (RC_DBUI_BEGIN + 2)
+#define STR_FILTER_ALL (RC_DBUI_BEGIN + 3)
+#define STR_FILTER_SXB (RC_DBUI_BEGIN + 4)
+#define STR_FILTER_SXC (RC_DBUI_BEGIN + 5)
+#define STR_FILTER_DBF (RC_DBUI_BEGIN + 6)
+#define STR_FILTER_XLS (RC_DBUI_BEGIN + 7)
+#define STR_FILTER_TXT (RC_DBUI_BEGIN + 8)
+#define STR_FILTER_CSV (RC_DBUI_BEGIN + 9)
+#define STR_FILTER_ALL_DATA (RC_DBUI_BEGIN + 10)
+#define STR_FILTER_MDB (RC_DBUI_BEGIN + 11)
+#define STR_FILTER_ACCDB (RC_DBUI_BEGIN + 12)
+
+// Bitmaps ------------------------------------------------------------------
+
+
+// Elemente -----------------------------------------------------------------
+
+#define TLB_DBLIST 1
+#define BTN_OK 2
+#define BTN_CANCEL 3
+#define BTN_HELP 4
+
+#define FT_DOCNAME 5
+#define FT_PRINTING 6
+#define FT_PRINTER 7
+#define FT_PRINTINFO 8
+#define PB_CANCELPRNMON 9
+#define FT_SENDING 10
+#define STR_EMAILMON 11
+#define FT_STATUS 12
+#define FT_CREATEDOCUMENTS 13
+#define FT_PROGRESS 14
+#define FT_COUNTING 15
+#define STR_SAVEMON 16
+#define FT_SAVING 17
+
+#define MM_PART_TITLE 0
+#define MM_PART_FIRSTNAME 1
+#define MM_PART_LASTNAME 2
+#define MM_PART_COMPANY 3
+#define MM_PART_ADDRESS_1 4
+#define MM_PART_ADDRESS_2 5
+#define MM_PART_CITY 6
+#define MM_PART_REGION 7
+#define MM_PART_ZIP 8
+#define MM_PART_COUNTRY 9
+#define MM_PART_PHONE_PRIVATE 10
+#define MM_PART_PHONE_BUSINESS 11
+#define MM_PART_E_MAIL 12
+#define MM_PART_GENDER 13
+
+#endif
+
+
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
new file mode 100644
index 000000000000..5406fb042e95
--- /dev/null
+++ b/sw/inc/dcontact.hxx
@@ -0,0 +1,561 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DCONTACT_HXX
+#define _DCONTACT_HXX
+
+#include <svx/svdobj.hxx>
+// OD 14.05.2003 #108784#
+#include <svx/svdovirt.hxx>
+// OD 2004-01-16 #110582#
+#include <swtypes.hxx>
+#include <fmtanchr.hxx>
+#include <frmfmt.hxx>
+
+// OD 17.06.2003 #108784#
+#include <list>
+
+#include "calbck.hxx"
+
+class SfxPoolItem;
+class SwFrmFmt;
+class SwFlyFrmFmt;
+class SwFlyFrm;
+class SwFrm;
+class SwPageFrm;
+class SwVirtFlyDrawObj;
+class SwFmtAnchor;
+class SwFlyDrawObj;
+class SwRect;
+// OD 17.06.2003 #108784# - forward declaration for class <SwDrawVirtObj>
+class SwDrawContact;
+// OD 2004-01-16 #110582#
+struct SwPosition;
+class SwIndex;
+// OD 2004-03-25 #i26791#
+#include <anchoreddrawobject.hxx>
+
+//Der Umgekehrte Weg: Sucht das Format zum angegebenen Objekt.
+//Wenn das Object ein SwVirtFlyDrawObj ist so wird das Format von
+//selbigem besorgt.
+//Anderfalls ist es eben ein einfaches Zeichenobjekt. Diese hat einen
+//UserCall und der ist Client vom gesuchten Format.
+//Implementierung in dcontact.cxx
+SW_DLLPUBLIC SwFrmFmt *FindFrmFmt( SdrObject *pObj );
+inline const SwFrmFmt *FindFrmFmt( const SdrObject *pObj )
+{ return ::FindFrmFmt( (SdrObject*)pObj ); }
+sal_Bool HasWrap( const SdrObject* pObj );
+
+void setContextWritingMode( SdrObject* pObj, SwFrm* pAnchor );
+
+//Bei Aenderungen das Objekt aus dem ContourCache entfernen.
+//Implementierung in TxtFly.Cxx
+void ClrContourCache( const SdrObject *pObj );
+
+// liefert BoundRect inklusive Abstand
+// --> OD 2006-08-15 #i68520# - change naming
+SwRect GetBoundRectOfAnchoredObj( const SdrObject* pObj );
+// <--
+
+//Liefert den UserCall ggf. vom Gruppenobjekt
+// OD 2004-03-31 #i26791# - change return type
+SwContact* GetUserCall( const SdrObject* );
+
+// liefert TRUE falls das SrdObject ein Marquee-Object (Lauftext) ist
+BOOL IsMarqueeTextObj( const SdrObject& rObj );
+
+//Basisklasse fuer die folgenden KontaktObjekte (Rahmen+Zeichenobjekte)
+class SwContact : public SdrObjUserCall, public SwClient
+{
+ // OD 05.09.2003 #112039# - boolean, indicating destruction of contact object
+ // important note: boolean has to be set at the beginning of each destructor
+ // in the subclasses using method <SetInDTOR()>.
+ bool mbInDTOR;
+
+ /** method to move object to visible/invisible layer
+
+ OD 21.08.2003 #i18447#
+ Implementation for the public method <MoveObjToVisibleLayer(..)>
+ and <MoveObjToInvisibleLayer(..)>
+ If object is in invisble respectively visible layer, its moved to
+ the corresponding visible respectively invisible layers.
+ For group object the members are individually moved to the corresponding
+ layer, because <SdrObjGroup::GetLayer()> does return 0, if members
+ aren't on the same layer as the group object, and
+ <SdrObjGroup::SetLayer(..)|NbcSetLayer(..)> sets also the layer of
+ the members.
+ OD 2004-01-15 #110582# - moved from subclass <SwDrawContact>
+
+ @author OD
+
+ @param _bToVisible
+ input parameter - boolean indicating, if object has to be moved to
+ visible (== true) or invisible (== false) layer.
+
+ @param _pDrawObj
+ input parameter, which will be changed - drawing object, which will
+ change its layer.
+ */
+ void _MoveObjToLayer( const bool _bToVisible,
+ SdrObject* _pDrawObj );
+
+protected:
+ // OD 05.09.2003 #112039# - accessor to set member <mbInDTOR>
+ void SetInDTOR();
+
+public:
+ TYPEINFO();
+
+ //Fuer den Reader, es wir nur die Verbindung hergestellt.
+ SwContact( SwFrmFmt *pToRegisterIn );
+ virtual ~SwContact();
+
+ // OD 2004-03-29 #i26791#
+ virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const = 0;
+ virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj ) = 0;
+
+ // OD 13.05.2003 #108784# - made methods virtual and not inline
+ // OD 2004-04-01 #i26791# - made methods pure virtual
+ virtual const SdrObject *GetMaster() const = 0;
+ virtual SdrObject *GetMaster() = 0;
+ virtual void SetMaster( SdrObject* _pNewMaster ) = 0;
+
+ SwFrmFmt *GetFmt(){ return (SwFrmFmt*)GetRegisteredIn(); }
+ const SwFrmFmt *GetFmt() const
+ { return (const SwFrmFmt*)GetRegisteredIn(); }
+
+ // OD 05.09.2003 #112039# - accessor for member <mbInDTOR>
+ bool IsInDTOR() const;
+
+ /** method to move drawing object to corresponding visible layer
+
+ OD 21.08.2003 #i18447#
+ uses method <_MoveObjToLayer(..)>
+ OD 2004-01-15 #110582# - moved from subclass <SwDrawContact> and made virtual
+
+ @author OD
+
+ @param _pDrawObj
+ drawing object, which will be moved to the visible layer
+ */
+ virtual void MoveObjToVisibleLayer( SdrObject* _pDrawObj );
+
+ /** method to move drawing object to corresponding invisible layer
+
+ OD 21.08.2003 #i18447#
+ uses method <_MoveObjToLayer(..)>
+ OD 2004-01-15 #110582# - moved from subclass <SwDrawContact> and made virtual.
+
+ @author OD
+
+ @param _pDrawObj
+ drawing object, which will be moved to the visible layer
+ */
+ virtual void MoveObjToInvisibleLayer( SdrObject* _pDrawObj );
+
+ // -------------------------------------------------------------------------
+ // OD 2004-01-16 #110582# - some virtual helper methods for information
+ // about the object (Writer fly frame resp. drawing object)
+ const SwFmtAnchor& GetAnchorFmt() const
+ {
+ ASSERT( GetFmt(),
+ "<SwContact::GetAnchorFmt()> - no frame format -> crash" );
+
+ return GetFmt()->GetAnchor();
+ }
+
+ RndStdIds GetAnchorId() const { return GetAnchorFmt().GetAnchorId(); }
+ bool ObjAnchoredAtPage() const { return GetAnchorId() == FLY_AT_PAGE; }
+ bool ObjAnchoredAtFly() const { return GetAnchorId() == FLY_AT_FLY; }
+ bool ObjAnchoredAtPara() const { return GetAnchorId() == FLY_AT_PARA; }
+ bool ObjAnchoredAtChar() const { return GetAnchorId() == FLY_AT_CHAR; }
+ bool ObjAnchoredAsChar() const { return GetAnchorId() == FLY_AS_CHAR; }
+
+ const SwPosition& GetCntntAnchor() const
+ {
+ ASSERT( GetAnchorFmt().GetCntntAnchor(),
+ "<SwContact::GetCntntAnchor()> - no content anchor -> crash" );
+
+ return *(GetAnchorFmt().GetCntntAnchor());
+ }
+
+ const SwIndex& GetCntntAnchorIndex() const;
+
+ // -------------------------------------------------------------------------
+
+ /** get data collection of anchored objects, handled by with contact
+
+ OD 2004-08-23 #110810#
+
+ @author
+ */
+ virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const = 0;
+
+ /** get minimum order number of anchored objects handled by with contact
+
+ OD 2004-08-24 #110810#
+
+ @author
+ */
+ sal_uInt32 GetMinOrdNum() const;
+
+ /** get maximum order number of anchored objects handled by with contact
+
+ OD 2004-08-24 #110810#
+
+ @author
+ */
+ sal_uInt32 GetMaxOrdNum() const;
+};
+
+//KontactObjekt fuer die Verbindung zwischen Rahmen bzw. deren Formaten
+//im StarWriter (SwClient) und den Zeichenobjekten des Drawing (SdrObjUserCall)
+
+class SW_DLLPUBLIC SwFlyDrawContact : public SwContact
+{
+private:
+ // OD 2004-04-01 #i26791#
+ SwFlyDrawObj* mpMasterObj;
+
+ /** method to determine new order number for new instance of <SwVirtFlyDrawObj>
+
+ OD 2004-08-16 #i27030#
+ Used in method <CreateNewRef(..)>.
+
+ @author OD
+ */
+ sal_uInt32 _GetOrdNumForNewRef( const SwFlyFrm* pFlyFrm );
+
+public:
+ TYPEINFO();
+
+ //Legt das DrawObjekt an und meldet es beim Model an.
+ SwFlyDrawContact( SwFlyFrmFmt* pToRegisterIn, SdrModel* pMod );
+ virtual ~SwFlyDrawContact();
+
+ // OD 2004-03-29 #i26791#
+ virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const;
+ virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj );
+
+ // OD 2004-04-01 #i26791#
+ virtual const SdrObject* GetMaster() const;
+ virtual SdrObject* GetMaster();
+ virtual void SetMaster( SdrObject* _pNewMaster );
+
+ SwVirtFlyDrawObj* CreateNewRef( SwFlyFrm* pFly );
+
+ // virtuelle Methoden von SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ // OD 2004-01-16 #110582# - override methods to control Writer fly frames,
+ // which are linked, and to assure that all objects anchored at/inside the
+ // Writer fly frame are also made visible/invisible.
+ virtual void MoveObjToVisibleLayer( SdrObject* _pDrawObj );
+ virtual void MoveObjToInvisibleLayer( SdrObject* _pDrawObj );
+
+ /** get data collection of anchored objects handled by with contact
+
+ OD 2004-08-23 #110810#
+
+ @author
+ */
+ virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
+};
+
+// OD 16.05.2003 #108784# - new class for re-direct methods calls at a 'virtual'
+// drawing object to its referenced object.
+class SwDrawVirtObj : public SdrVirtObj
+{
+ private:
+ // data for connection to writer layout
+ // OD 2004-03-25 #i26791# - anchored drawing object instance for the
+ // 'virtual' drawing object
+ SwAnchoredDrawObject maAnchoredDrawObj;
+
+ // writer-drawing contact object the 'virtual' drawing object is controlled by.
+ // This object is also the <UserCall> of the drawing object, if it's
+ // inserted into the drawing layer.
+ SwDrawContact& mrDrawContact;
+
+ using SdrVirtObj::GetPlusHdl;
+
+ protected:
+ // AW: Need own sdr::contact::ViewContact since AnchorPos from parent is
+ // not used but something own (top left of new SnapRect minus top left
+ // of original SnapRect)
+ virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
+
+ public:
+ TYPEINFO();
+
+ SwDrawVirtObj( SdrObject& _rNewObj,
+ SwDrawContact& _rDrawContact );
+ virtual ~SwDrawVirtObj();
+
+ // access to offset
+ // OD 30.06.2003 #108784# - virtual!!!
+ virtual const Point GetOffset() const;
+
+ virtual SdrObject* Clone() const;
+ virtual void operator=( const SdrObject& rObj );
+
+ // connection to writer layout
+ // OD 2004-03-29 #i26791#
+ const SwAnchoredObject* GetAnchoredObj() const;
+ SwAnchoredObject* AnchoredObj();
+ const SwFrm* GetAnchorFrm() const;
+ SwFrm* AnchorFrm();
+ void RemoveFromWriterLayout();
+
+ // connection to drawing layer
+ void AddToDrawingPage();
+ void RemoveFromDrawingPage();
+
+ // is 'virtual' drawing object connected to writer layout and
+ // to drawing layer.
+ bool IsConnected() const;
+
+ virtual void NbcSetAnchorPos(const Point& rPnt);
+
+ // #108784#
+ // All overloaded methods which need to use the offset
+ virtual void RecalcBoundRect();
+ virtual ::basegfx::B2DPolyPolygon TakeXorPoly() const;
+ virtual ::basegfx::B2DPolyPolygon TakeContour() const;
+ virtual SdrHdl* GetHdl(sal_uInt32 nHdlNum) const;
+ virtual SdrHdl* GetPlusHdl(const SdrHdl& rHdl, USHORT nPlNum) const;
+ virtual void NbcMove(const Size& rSiz);
+ virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+ virtual void NbcRotate(const Point& rRef, long nWink, double sn, double cs);
+ virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
+ virtual void NbcShear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear);
+ virtual void Move(const Size& rSiz);
+ virtual void Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+ virtual void Rotate(const Point& rRef, long nWink, double sn, double cs);
+ virtual void Mirror(const Point& rRef1, const Point& rRef2);
+ virtual void Shear(const Point& rRef, long nWink, double tn, FASTBOOL bVShear);
+ virtual void RecalcSnapRect();
+ virtual const Rectangle& GetSnapRect() const;
+ virtual void SetSnapRect(const Rectangle& rRect);
+ virtual void NbcSetSnapRect(const Rectangle& rRect);
+ virtual const Rectangle& GetLogicRect() const;
+ virtual void SetLogicRect(const Rectangle& rRect);
+ virtual void NbcSetLogicRect(const Rectangle& rRect);
+ virtual Point GetSnapPoint(sal_uInt32 i) const;
+ virtual Point GetPoint(sal_uInt32 i) const;
+ virtual void NbcSetPoint(const Point& rPnt, sal_uInt32 i);
+
+ // #108784#
+ virtual FASTBOOL HasTextEdit() const;
+
+ // OD 17.06.2003 #108784# - overload 'layer' methods
+ virtual SdrLayerID GetLayer() const;
+ virtual void NbcSetLayer(SdrLayerID nLayer);
+ virtual void SetLayer(SdrLayerID nLayer);
+
+ // FullDrag support
+ virtual bool supportsFullDrag() const;
+ virtual SdrObject* getFullDragClone() const;
+
+ // #i97197#
+ virtual void SetBoundRectDirty();
+ virtual const Rectangle& GetCurrentBoundRect() const;
+ virtual const Rectangle& GetLastBoundRect() const;
+};
+
+// OD 26.06.2003 #108784#
+bool CheckControlLayer( const SdrObject *pObj );
+
+//KontactObjekt fuer die Verbindung von Formaten als Repraesentanten der
+//Zeichenobjekte im StarWriter (SwClient) und den Objekten selbst im Drawing
+//(SdrObjUserCall).
+
+// --> OD 2006-01-18 #129959#
+class NestedUserCallHdl;
+// <--
+
+class SwDrawContact : public SwContact
+{
+ private:
+ // OD 2004-03-25 #i26791# - anchored drawing object instance for the
+ // 'master' drawing object
+ SwAnchoredDrawObject maAnchoredDrawObj;
+
+ // OD 16.05.2003 #108784# - data structure for collecting 'virtual'
+ // drawing object supporting drawing objects in headers/footers.
+ std::list<SwDrawVirtObj*> maDrawVirtObjs;
+
+ // OD 2004-04-01 #i26791# - boolean indicating set 'master' drawing
+ // object has been cleared.
+ bool mbMasterObjCleared : 1;
+
+ // OD 10.10.2003 #112299# - internal flag to indicate that disconnect
+ // from layout is in progress
+ bool mbDisconnectInProgress : 1;
+
+ // --> OD 2006-01-18 #129959#
+ // Needed data for handling of nested <SdrObjUserCall> events in
+ // method <_Changed(..)>
+ bool mbUserCallActive : 1;
+ // event type, which is handled for <mpSdrObjHandledByCurrentUserCall>.
+ // Note: value only valid, if <mbUserCallActive> is TRUE.
+ SdrUserCallType meEventTypeOfCurrentUserCall;
+
+ friend class NestedUserCallHdl;
+ // <--
+
+ // unary function used by <list> iterator to find a disconnected 'virtual'
+ // drawing object
+ struct UsedOrUnusedVirtObjPred
+ {
+ bool mbUsedPred;
+ UsedOrUnusedVirtObjPred( bool _bUsed ) : mbUsedPred( _bUsed ) {};
+ bool operator() ( const SwDrawVirtObj* _pDrawVirtObj )
+ {
+ if ( mbUsedPred )
+ {
+ return _pDrawVirtObj->IsConnected();
+ }
+ else
+ {
+ return !_pDrawVirtObj->IsConnected();
+ }
+ }
+ };
+
+ // unary function used by <list> iterator to find a 'virtual' drawing
+ // object anchored at a given frame
+ struct VirtObjAnchoredAtFrmPred
+ {
+ const SwFrm* mpAnchorFrm;
+ VirtObjAnchoredAtFrmPred( const SwFrm& _rAnchorFrm );
+ bool operator() ( const SwDrawVirtObj* _pDrawVirtObj );
+ };
+
+ // OD 16.05.2003 #108784# - method for adding/removing 'virtual' drawing object.
+ SwDrawVirtObj* CreateVirtObj();
+ void DestroyVirtObj( SwDrawVirtObj* pVirtObj );
+ void RemoveAllVirtObjs();
+
+ // OD 2004-03-31 #i26791#
+ void _InvalidateObjs( const bool _bUpdateSortedObjsList = false );
+
+ // --> OD 2006-01-23 #124157#
+ // no copy-constructor and no assignment operator
+ SwDrawContact( const SwDrawContact& );
+ SwDrawContact& operator=( const SwDrawContact& );
+ // <--
+ public:
+ TYPEINFO();
+
+ SwDrawContact( SwFrmFmt *pToRegisterIn, SdrObject *pObj );
+ virtual ~SwDrawContact();
+
+ // OD 2004-03-29 #i26791#
+ // --> OD 2005-01-06 #i30669# - no default value for parameter <_pSdrObj>
+ virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const;
+ virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj );
+ // <--
+
+ // OD 2004-04-01 #i26791#
+ virtual const SdrObject* GetMaster() const;
+ virtual SdrObject* GetMaster();
+ virtual void SetMaster( SdrObject* _pNewMaster );
+
+ // OD 2004-03-29 #i26791#
+ const SwFrm* GetAnchorFrm( const SdrObject* _pDrawObj = 0L ) const;
+ SwFrm* GetAnchorFrm( SdrObject* _pDrawObj = 0L );
+
+ // --> OD 2004-06-30 #i28701# - page frame is now stored at member <maAnchoredDrawObj>
+ inline const SwPageFrm* GetPageFrm() const
+ {
+ return maAnchoredDrawObj.GetPageFrm();
+ }
+ inline SwPageFrm* GetPageFrm()
+ {
+ return maAnchoredDrawObj.GetPageFrm();
+ }
+ void SetPageFrm( SwPageFrm* _pNewPageFrm )
+ {
+ return maAnchoredDrawObj.SetPageFrm( _pNewPageFrm );
+ }
+ // <--
+ void ChkPage();
+ SwPageFrm* FindPage( const SwRect &rRect );
+
+ //Fuegt das SdrObject in die Arrays (SwPageFrm und SwFrm) des Layouts ein.
+ //Der Anker wird Anhand des Attributes SwFmtAnchor bestimmt.
+ //Das Objekt wird ggf. beim alten Anker abgemeldet.
+ void ConnectToLayout( const SwFmtAnchor *pAnch = 0 );
+ // OD 27.06.2003 #108784# - method to insert 'master' drawing object
+ // into drawing page
+ void InsertMasterIntoDrawPage();
+
+ void DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer = true );
+ // OD 19.06.2003 #108784# - disconnect for a dedicated drawing object -
+ // could be 'master' or 'virtual'.
+ void DisconnectObjFromLayout( SdrObject* _pDrawObj );
+ // OD 26.06.2003 #108784# - method to remove 'master' drawing object
+ // from drawing page.
+ // To be used by the undo for delete of object. Call it after method
+ // <DisconnectFromLayout( bool = true )> is already performed.
+ // Note: <DisconnectFromLayout( bool )> no longer removes the 'master'
+ // drawing object from drawing page.
+ void RemoveMasterFromDrawPage();
+
+ // OD 19.06.2003 #108784# - get drawing object ('master' or 'virtual')
+ // by frame.
+ SdrObject* GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm );
+
+ // virtuelle Methoden von SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ // virtuelle Methoden von SdrObjUserCall
+ virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect);
+
+ // wird von Changed() und auch vom UndoDraw benutzt, uebernimmt
+ // das Notifien von Absaetzen, die ausweichen muessen
+ void _Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle* pOldBoundRect);
+
+ //Moved alle SW-Verbindungen zu dem neuen Master.
+ void ChangeMasterObject( SdrObject *pNewMaster );
+
+ // OD 19.06.2003 #108784#
+ SwDrawVirtObj* AddVirtObj();
+
+ // OD 20.06.2003 #108784#
+ void NotifyBackgrdOfAllVirtObjs( const Rectangle* pOldBoundRect );
+
+ /** get data collection of anchored objects, handled by with contact
+
+ OD 2004-08-23 #110810#
+
+ @author
+ */
+ virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
+};
+
+#endif
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
new file mode 100644
index 000000000000..d9a011461eba
--- /dev/null
+++ b/sw/inc/ddefld.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DDEFLD_HXX
+#define _DDEFLD_HXX
+
+#include <sfx2/lnkbase.hxx>
+#include "swdllapi.h"
+#include "fldbas.hxx"
+
+class SwDoc;
+
+/*--------------------------------------------------------------------
+ Beschreibung: FieldType fuer DDE
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType
+{
+ String aName;
+ String aExpansion;
+
+ ::sfx2::SvBaseLinkRef refLink;
+ SwDoc* pDoc;
+
+ USHORT nRefCnt;
+ BOOL bCRLFFlag : 1;
+ BOOL bDeleted : 1;
+
+ SW_DLLPRIVATE void _RefCntChgd();
+
+public:
+ SwDDEFieldType( const String& rName, const String& rCmd,
+ USHORT = sfx2::LINKUPDATE_ONCALL );
+ ~SwDDEFieldType();
+
+ const String& GetExpansion() const { return aExpansion; }
+ void SetExpansion( const String& rStr ) { aExpansion = rStr,
+ bCRLFFlag = FALSE; }
+
+ virtual SwFieldType* Copy() const;
+ virtual const String& GetName() const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+
+ String GetCmd() const;
+ void SetCmd( const String& rStr );
+
+ USHORT GetType() const { return refLink->GetUpdateMode(); }
+ void SetType( USHORT nType ) { refLink->SetUpdateMode( nType ); }
+
+ BOOL IsDeleted() const { return bDeleted; }
+ void SetDeleted( BOOL b ) { bDeleted = b; }
+
+ void UpdateNow() { refLink->Update(); }
+ void Disconnect() { refLink->Disconnect(); }
+
+ const ::sfx2::SvBaseLink& GetBaseLink() const { return *refLink; }
+ ::sfx2::SvBaseLink& GetBaseLink() { return *refLink; }
+
+ const SwDoc* GetDoc() const { return pDoc; }
+ SwDoc* GetDoc() { return pDoc; }
+ void SetDoc( SwDoc* pDoc );
+
+ void IncRefCnt() { if( !nRefCnt++ && pDoc ) _RefCntChgd(); }
+ void DecRefCnt() { if( !--nRefCnt && pDoc ) _RefCntChgd(); }
+
+ void SetCRLFDelFlag( BOOL bFlag = TRUE ) { bCRLFFlag = bFlag; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: DDE-Feld
+ --------------------------------------------------------------------*/
+
+class SwDDEField : public SwField
+{
+public:
+ SwDDEField(SwDDEFieldType*);
+ ~SwDDEField();
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // ueber Typen Parameter ermitteln
+ // Name kann nicht geaendert werden
+ virtual const String& GetPar1() const;
+
+ // Commando
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+};
+
+
+#endif // _DDEFLD_HXX
diff --git a/sw/inc/dialog.hrc b/sw/inc/dialog.hrc
new file mode 100644
index 000000000000..bc11b017e13f
--- /dev/null
+++ b/sw/inc/dialog.hrc
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DIALOG_HRC
+#define _DIALOG_HRC
+
+// #include *****************************************************************
+
+#include "rcid.hrc"
+
+// Dialoge ******************************************************************
+
+#define DLG_SAVE_REGISTRY_FILE (RC_DIALOG_BEGIN + 1)
+
+#define DLG_PASSWD (RC_DIALOG_BEGIN + 3)
+#define DLG_PASTESPECIAL (RC_DIALOG_BEGIN + 5)
+#define DLG_LINKS (RC_DIALOG_BEGIN + 6)
+#define DLG_LINKEDIT (RC_DIALOG_BEGIN + 7)
+#define DLG_INSERT_ABSTRACT (RC_DIALOG_BEGIN + 8)
+#define DLG_ASCII_FILTER (RC_DIALOG_BEGIN + 9)
+#define DLG_WORDCOUNT (RC_DIALOG_BEGIN + 10)
+#define RID_QB_SPELL_CONTINUE (RC_DIALOG_BEGIN + 11)
+#define STR_SPELLING_COMPLETED (RC_DIALOG_BEGIN + 12)
+
+// Strings ******************************************************************
+
+#define STR_LINKEDIT_TEXT (RC_DIALOG_BEGIN + 1)
+
+#define STR_CLOSELINKMSG (RC_DIALOG_BEGIN + 3)
+#define STR_PATH_NOT_FOUND (RC_DIALOG_BEGIN + 4)
+
+#define STR_FLT_SGV (RC_DIALOG_BEGIN + 8)
+
+#define STR_NEWDLG_NAME (RC_DIALOG_BEGIN + 10)
+
+// Controls *****************************************************************
+
+#define CB_USE_PASSWD (RC_DIALOG_BEGIN )
+#define CB_READ_ONLY (RC_DIALOG_BEGIN + 1)
+
+// Bereiche *****************************************************************
+
+
+#define RC_REGIONSW_BEGIN (RC_DIALOG_BEGIN + 60)
+#define RC_REGIONSW_END (RC_DIALOG_BEGIN + 79)
+
+#define RC_MACASSGN_BEGIN (RC_DIALOG_BEGIN + 80)
+#define RC_MACASSGN_END (RC_DIALOG_BEGIN + 89)
+
+#define RC_DLG_ADDR (RC_DIALOG_BEGIN + 90)
+#define RC_SWDLG_BACKGROUND (RC_DIALOG_BEGIN + 91)
+#define RC_DLG_SWNUMFMTDLG (RC_DIALOG_BEGIN + 92)
+#define RC_DLG_SWBORDERDLG (RC_DIALOG_BEGIN + 93)
+#define RC_DLG_SWWRAPDLG (RC_DIALOG_BEGIN + 94)
+#define RC_DLG_SWFLDEDITDLG (RC_DIALOG_BEGIN + 95)
+// Ueberlaufpruefung ********************************************************
+
+#define DIALOG_ACT_END RC_MACASSGN_END
+
+#if DIALOG_ACT_END > RC_DIALOG_END
+#error Resource-Ueberlauf in #file, #line
+#endif
+
+#endif
+
diff --git a/sw/inc/dlelstnr.hxx b/sw/inc/dlelstnr.hxx
new file mode 100644
index 000000000000..225f470b44b0
--- /dev/null
+++ b/sw/inc/dlelstnr.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DLELSTNR_HXX_
+#define _DLELSTNR_HXX_
+
+#include <cppuhelper/weak.hxx>
+#include <com/sun/star/linguistic2/XDictionaryListEventListener.hpp>
+#include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp>
+#include <com/sun/star/frame/XTerminateListener.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
+#include <cppuhelper/implbase2.hxx> // helper for implementations
+
+
+namespace com { namespace sun { namespace star {
+ namespace linguistic2 {
+ class XDictionaryList;
+ class XLinguServiceManager;
+ class XProofreadingIterator;
+ }
+ namespace frame {
+ class XTerminateListener;
+ }
+} } }
+
+///////////////////////////////////////////////////////////////////////////
+// SwLinguServiceEventListener
+// is a EventListener that triggers spellchecking
+// and hyphenation when relevant changes (to the
+// dictionaries of the dictionary list, or properties) were made.
+//
+
+class SwLinguServiceEventListener :
+ public cppu::WeakImplHelper2
+ <
+ com::sun::star::linguistic2::XLinguServiceEventListener,
+ com::sun::star::frame::XTerminateListener
+ >
+{
+ com::sun::star::uno::Reference<
+ com::sun::star::frame::XDesktop > xDesktop;
+ com::sun::star::uno::Reference<
+ com::sun::star::linguistic2::XLinguServiceManager > xLngSvcMgr;
+ com::sun::star::uno::Reference<
+ com::sun::star::linguistic2::XProofreadingIterator > xGCIterator;
+
+ // disallow use of copy-constructor and assignment operator
+ SwLinguServiceEventListener(const SwLinguServiceEventListener &);
+ SwLinguServiceEventListener & operator = (const SwLinguServiceEventListener &);
+
+public:
+ SwLinguServiceEventListener();
+ virtual ~SwLinguServiceEventListener();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XDictionaryListEventListener
+ virtual void SAL_CALL processDictionaryListEvent( const ::com::sun::star::linguistic2::DictionaryListEvent& rDicListEvent) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XLinguServiceEventListener
+ virtual void SAL_CALL processLinguServiceEvent( const ::com::sun::star::linguistic2::LinguServiceEvent& rLngSvcEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XTerminateListener
+ virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& rEventObj ) throw(::com::sun::star::uno::RuntimeException);
+};
+
+
+#endif
+
diff --git a/sw/inc/dobjfac.hxx b/sw/inc/dobjfac.hxx
new file mode 100644
index 000000000000..8b25b38bb74b
--- /dev/null
+++ b/sw/inc/dobjfac.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DOBJFAC_HXX
+#define _DOBJFAC_HXX
+
+#include <tools/link.hxx>
+
+//-----------------------
+// class SwObjectFactory
+//-----------------------
+class SdrObjFactory;
+
+class SwObjectFactory
+{
+public:
+ DECL_LINK( MakeObject, SdrObjFactory * );
+};
+
+extern SwObjectFactory aSwObjectFactory;
+
+
+#endif // _DOBJFAC_HXX
+
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
new file mode 100644
index 000000000000..10befb703b96
--- /dev/null
+++ b/sw/inc/doc.hxx
@@ -0,0 +1,2216 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DOC_HXX
+#define _DOC_HXX
+
+/** SwDoc interfaces */
+
+#include <IInterface.hxx>
+#include <IDocumentSettingAccess.hxx>
+#include <IDocumentDeviceAccess.hxx>
+#include <IDocumentMarkAccess.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <IDocumentUndoRedo.hxx>
+#include <IDocumentLinksAdministration.hxx>
+#include <IDocumentFieldsAccess.hxx>
+#include <IDocumentContentOperations.hxx>
+#include <IDocumentStylePoolAccess.hxx>
+#include <IDocumentLineNumberAccess.hxx>
+#include <IDocumentStatistics.hxx>
+#include <IDocumentState.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <IDocumentLayoutAccess.hxx>
+#include <IDocumentTimerAccess.hxx>
+#include <IDocumentChartDataProviderAccess.hxx>
+// --> OD 2007-10-26 #i83479#
+#include <IDocumentOutlineNodes.hxx>
+#include <IDocumentListItems.hxx>
+#include <set>
+// <--
+// --> OD 2008-03-12 #refactorlists#
+#include <IDocumentListsAccess.hxx>
+class SwList;
+// <--
+#include <IDocumentExternalData.hxx>
+#define _SVSTDARR_STRINGSDTOR
+#include <svl/svstdarr.hxx>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <vcl/timer.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx>
+#include <ndarr.hxx>
+#include <swatrset.hxx>
+#include <toxe.hxx> // enums
+#include <flyenum.hxx>
+#include <itabenum.hxx>
+#include <swdbdata.hxx>
+#include <chcmprse.hxx>
+#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
+#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
+#include <vos/ref.hxx>
+#include <svx/svdtypes.hxx>
+#include <svl/style.hxx>
+#include <editeng/numitem.hxx>
+#include "comphelper/implementationreference.hxx"
+#include <com/sun/star/chart2/data/XDataProvider.hpp>
+#include <com/sun/star/linguistic2/XProofreadingIterator.hpp>
+
+#include <hash_map>
+#include <stringhash.hxx>
+
+#include <svtools/embedhlp.hxx>
+#include <vector>
+#include <set>
+#include <map>
+#include <memory>
+
+#include <boost/scoped_ptr.hpp>
+
+class SfxObjectShell;
+class SfxObjectShellRef;
+class SvxForbiddenCharactersTable;
+class SwExtTextInput;
+class DateTime;
+class EditFieldInfo;
+class JobSetup;
+class Color;
+class KeyCode;
+class Outliner;
+class OutputDevice;
+class Point;
+class SbxArray;
+class SdrModel;
+class SdrObject;
+class SdrUndoAction;
+class VirtualDevice;
+class SfxPrinter;
+class SvNumberFormatter;
+class SvStringsSort;
+class SvUShorts;
+class SvUShortsSort;
+class SvxMacro;
+class SvxMacroTableDtor;
+class SvxBorderLine;
+class SwAutoCompleteWord;
+class SwAutoCorrExceptWord;
+class SwCalc;
+class SwCellFrm;
+class SwCharFmt;
+class SwCharFmts;
+class SwConditionTxtFmtColl;
+class SwCrsrShell;
+class SwCursor;
+class SwDBNameInfField;
+class SwDocShell;
+class SwDocUpdtFld;
+class SwDrawFrmFmt;
+class SwDrawView;
+class SwEditShell;
+class SwFieldType;
+class SwField;
+class SwTxtFld;
+class SwFldTypes;
+class SwFlyFrmFmt;
+class SwFmt;
+class SwFmtINetFmt;
+class SwFmtRefMark;
+class SwFrmFmt;
+class SwFrmFmts;
+class SwFtnIdxs;
+class SwFtnInfo;
+class SwEndNoteInfo;
+class GraphicObject;
+class SwGrfFmtColl;
+class SwGrfFmtColls;
+class SwLineNumberInfo;
+class SwNewDBMgr;
+class SwNoTxtNode;
+class SwNodeIndex;
+class SwNodeRange;
+class SwNumRule;
+class SwNumRuleTbl;
+class SwPageDesc;
+class SwPosFlyFrms;
+class SwPagePreViewPrtData;
+class SwRedline;
+class SwRedlineTbl;
+class SwRootFrm;
+class SwRubyList;
+class SwRubyListEntry;
+class SwSectionFmt;
+class SwSectionFmts;
+class SwSectionData;
+class SwSelBoxes;
+class SwSpzFrmFmts;
+class SwTOXBase;
+class SwTOXBaseSection;
+class SwTOXMark;
+class SwTOXMarks;
+class SwTOXType;
+class SwTOXTypes;
+class SwTabCols;
+class SwTable;
+class SwTableAutoFmt;
+class SwTableBox;
+class SwTableBoxFmt;
+class SwTableFmt;
+class SwTableLineFmt;
+class SwTableNode;
+class SwTextBlocks;
+class SwTxtFmtColl;
+class SwTxtFmtColls;
+class SwURLStateChanged;
+class SwUndo;
+class SwUndoIds;
+class SwUndoIter;
+class SwUndos;
+class SwUnoCrsr;
+class SwUnoCrsrTbl;
+class ViewShell;
+class _SetGetExpFld;
+class SwDrawContact;
+class SwLayouter;
+class SdrView;
+class SdrMarkList;
+class SwAuthEntry;
+class SwLayoutCache;
+class IStyleAccess;
+struct SwCallMouseEvent;
+struct SwDocStat;
+struct SwHash;
+struct SwSortOptions;
+struct SwDefTOXBase_Impl;
+class SwPrintData;
+class SwPrintUIOptions;
+class SdrPageView;
+struct SwConversionArgs;
+class SwRewriter;
+class SwMsgPoolItem;
+class SwChartDataProvider;
+class SwChartLockController_Helper;
+class IGrammarContact;
+class SwPrintData;
+class SwRenderData;
+class SwPageFrm;
+class SwViewOption;
+
+namespace sw { namespace mark {
+ class MarkManager;
+}}
+namespace sw {
+ class MetaFieldManager;
+}
+
+namespace com { namespace sun { namespace star {
+namespace i18n {
+ struct ForbiddenCharacters; // comes from the I18N UNO interface
+}
+namespace uno {
+ template < class > class Sequence;
+}
+namespace container {
+ class XNameContainer; // for getXForms()/isXForms()/initXForms() methods
+}
+}}}
+
+namespace sfx2 {
+ class SvLinkSource;
+ class IXmlIdRegistry;
+ class LinkManager;
+}
+
+//PageDescriptor-Schnittstelle, Array hier wegen inlines.
+typedef SwPageDesc* SwPageDescPtr;
+SV_DECL_PTRARR_DEL( SwPageDescs, SwPageDescPtr, 4, 4 )
+
+// forward declartion
+void SetAllScriptItem( SfxItemSet& rSet, const SfxPoolItem& rItem );
+
+// global function to start grammar checking in the document
+void StartGrammarChecking( SwDoc &rDoc );
+
+class SW_DLLPUBLIC SwDoc :
+ public IInterface,
+ public IDocumentSettingAccess,
+ public IDocumentDeviceAccess,
+ public IDocumentRedlineAccess,
+ public IDocumentUndoRedo,
+ public IDocumentLinksAdministration,
+ public IDocumentFieldsAccess,
+ public IDocumentContentOperations,
+ public IDocumentStylePoolAccess,
+ public IDocumentLineNumberAccess,
+ public IDocumentStatistics,
+ public IDocumentState,
+ public IDocumentDrawModelAccess,
+ public IDocumentLayoutAccess,
+ public IDocumentTimerAccess,
+ public IDocumentChartDataProviderAccess,
+ // --> OD 2007-10-26 #i83479#
+ public IDocumentListItems,
+ public IDocumentOutlineNodes,
+ // <--
+ // --> OD 2008-03-12 #refactorlists#
+ public IDocumentListsAccess,
+ // <--
+ public IDocumentExternalData
+{
+
+ friend void _InitCore();
+ friend void _FinitCore();
+
+ //---------------- private Member --------------------------------
+
+ // -------------------------------------------------------------------
+ // die Objecte
+ SwNodes aNodes; // Inhalt des Dokumentes
+ SwNodes aUndoNodes; // Inhalt fuer das Undo
+ SwAttrPool* mpAttrPool; // der Attribut Pool
+ SwPageDescs aPageDescs; // PageDescriptoren
+ Link aOle2Link; // OLE 2.0-Benachrichtigung
+ /* @@@MAINTAINABILITY-HORROR@@@
+ Timer should not be members of the model
+ */
+ Timer aIdleTimer; // der eigene IdleTimer
+ Timer aOLEModifiedTimer; // Timer for update modified OLE-Objecs
+ SwDBData aDBData; // database descriptor
+ ::com::sun::star::uno::Sequence <sal_Int8 > aRedlinePasswd;
+ String sTOIAutoMarkURL; // ::com::sun::star::util::URL of table of index AutoMark file
+ SvStringsDtor aPatternNms; // Array fuer die Namen der Dokument-Vorlagen
+ com::sun::star::uno::Reference<com::sun::star::container::XNameContainer>
+ xXForms; // container with XForms models
+ mutable com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > m_xGCIterator;
+
+ const ::boost::scoped_ptr< ::sw::mark::MarkManager> pMarkManager;
+ const ::boost::scoped_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager;
+
+ // -------------------------------------------------------------------
+ // die Pointer
+ //Defaultformate
+ SwFrmFmt *pDfltFrmFmt;
+ SwFrmFmt *pEmptyPageFmt; // Format fuer die Default-Leerseite.
+ SwFrmFmt *pColumnContFmt; // Format fuer Spaltencontainer
+ SwCharFmt *pDfltCharFmt;
+ SwTxtFmtColl *pDfltTxtFmtColl; // Defaultformatcollections
+ SwGrfFmtColl *pDfltGrfFmtColl;
+
+ SwFrmFmts *pFrmFmtTbl; // Formattabellen
+ SwCharFmts *pCharFmtTbl;
+ SwSpzFrmFmts *pSpzFrmFmtTbl;
+ SwSectionFmts *pSectionFmtTbl;
+ SwFrmFmts *pTblFrmFmtTbl; // spz. fuer Tabellen
+ SwTxtFmtColls *pTxtFmtCollTbl; // FormatCollections
+ SwGrfFmtColls *pGrfFmtCollTbl;
+
+ SwTOXTypes *pTOXTypes; // Verzeichnisse
+ SwDefTOXBase_Impl * pDefTOXBases; // defaults of SwTOXBase's
+
+ SwRootFrm *pLayout; // Rootframe des spezifischen Layouts.
+ SdrModel *pDrawModel; // StarView Drawing
+
+ SwUndos *pUndos; // Undo/Redo History
+
+ SwDocUpdtFld *pUpdtFlds; // Struktur zum Field-Update
+ SwFldTypes *pFldTypes; // Feldtypen
+ SwNewDBMgr *pNewDBMgr; // Pointer auf den neuen DBMgr fuer
+ // Evaluierung der DB-Fields
+
+ VirtualDevice *pVirDev; // can be used for formatting
+ SfxPrinter *pPrt; // can be used for formatting
+ SwPrintData *pPrtData; // Print configuration
+
+ SwDoc *pGlossaryDoc; // Pointer auf das Glossary-Dokument. Dieses
+
+ SwNumRule *pOutlineRule;
+ SwFtnInfo *pFtnInfo;
+ SwEndNoteInfo *pEndNoteInfo;
+ SwLineNumberInfo*pLineNumberInfo;
+ SwFtnIdxs *pFtnIdxs;
+ SwDocStat *pDocStat; // Statistic Informationen
+ SvxMacroTableDtor *pMacroTable; // Tabelle der dokumentglobalen Macros
+
+ SwDocShell *pDocShell; // Ptr auf die SfxDocShell vom Doc
+ SfxObjectShellRef* pDocShRef; // fuers Kopieren von OLE-Nodes (wenn keine
+ // DocShell gesetzt ist, muss dieser
+ // Ref-Pointer gesetzt sein!!!!)
+ sfx2::LinkManager *pLinkMgr; // Liste von Verknuepften (Grafiken/DDE/OLE)
+
+ SwAutoCorrExceptWord *pACEWord; // fuer die automatische Uebernahme von
+ // autokorrigierten Woertern, die "zurueck"
+ // verbessert werden
+ SwURLStateChanged *pURLStateChgd; // SfxClient fuer Aenderungen in der
+ // INetHistory
+ SvNumberFormatter *pNumberFormatter; // NumFormatter fuer die Tabellen/Felder
+
+ mutable SwNumRuleTbl *pNumRuleTbl; // Liste aller benannten NumRules
+
+ // Hash map to find numrules by name
+ mutable std::hash_map<String, SwNumRule *, StringHash> maNumRuleMap;
+
+ // --> OD 2008-03-12 #refactorlists#
+ typedef std::hash_map< String, SwList*, StringHash > tHashMapForLists;
+ // container to hold the lists of the text document
+ tHashMapForLists maLists;
+ // relation between list style and its default list
+ tHashMapForLists maListStyleLists;
+ // <--
+
+ SwRedlineTbl *pRedlineTbl; // Liste aller Redlines
+ String *pAutoFmtRedlnComment; // Kommentar fuer Redlines, die
+ // uebers Autoformat eingefuegt werden
+ SwUnoCrsrTbl *pUnoCrsrTbl;
+
+ SwPagePreViewPrtData *pPgPViewPrtData; // Einzuege/Abstaende fuers
+ // Drucken der Seitenansicht
+ SwPaM *pExtInputRing;
+
+ SwLayouter *pLayouter; // ::com::sun::star::frame::Controller for complex layout formatting
+ // like footnote/endnote in sections
+ IStyleAccess *pStyleAccess; // handling of automatic styles
+ SwLayoutCache *pLayoutCache; // Layout cache to read and save with the
+ // document for a faster formatting
+
+ SwModify *pUnoCallBack;
+ IGrammarContact *mpGrammarContact; // for grammar checking in paragraphs during editing
+
+ mutable comphelper::ImplementationReference< SwChartDataProvider
+ , ::com::sun::star::chart2::data::XDataProvider >
+ aChartDataProviderImplRef;
+ SwChartLockController_Helper *pChartControllerHelper;
+
+ // table of forbidden characters of this document
+ vos::ORef<SvxForbiddenCharactersTable> xForbiddenCharsTable;
+
+ // --> OD 2007-10-26 #i83479#
+public:
+ struct lessThanNodeNum
+ {
+ bool operator()( const SwNodeNum* pNodeNumOne,
+ const SwNodeNum* pNodeNumTwo ) const;
+ };
+
+ typedef ::std::set< const SwNodeNum*, lessThanNodeNum > tImplSortedNodeNumList;
+private:
+ tImplSortedNodeNumList* mpListItemsList;
+ // <--
+
+ ::std::auto_ptr< ::sfx2::IXmlIdRegistry > m_pXmlIdRegistry;
+
+ // -------------------------------------------------------------------
+ // sonstige
+ sal_uInt16 nUndoPos; // akt. Undo-InsertPosition (fuers Redo!)
+ sal_uInt16 nUndoSavePos; // Position im Undo-Array, ab der das Doc
+ // nicht als modifiziert gilt
+ sal_uInt16 nUndoCnt; // Anzahl von Undo Aktionen
+ sal_uInt16 nUndoSttEnd; // != 0 -> innerhalb einer Klammerung
+
+ sal_uInt16 nAutoFmtRedlnCommentNo; // SeqNo fuers UI-seitige zusammenfassen
+ // von AutoFmt-Redlines. Wird vom SwAutoFmt
+ // verwaltet!
+ sal_uInt16 nLinkUpdMode; // UpdateMode fuer Links
+ SwFldUpdateFlags eFldUpdMode; // Mode fuer Felder/Charts automatisch aktualisieren
+ RedlineMode_t eRedlineMode; // aktueller Redline Modus
+ SwCharCompressType eChrCmprType; // for ASIAN: compress punctuation/kana
+
+ sal_Int32 mReferenceCount;
+ sal_Int32 mIdleBlockCount;
+ sal_Int8 nLockExpFld; // Wenn != 0 hat UpdateExpFlds() keine Wirkung
+
+ /* Draw Model Layer IDs
+ * LayerIds, Heaven == ueber dem Dokument
+ * Hell == unter dem Dokument
+ * Controls == ganz oben
+ */
+ SdrLayerID nHeaven;
+ SdrLayerID nHell;
+ SdrLayerID nControls;
+ SdrLayerID nInvisibleHeaven;
+ SdrLayerID nInvisibleHell;
+ SdrLayerID nInvisibleControls;
+
+ bool mbGlossDoc : 1; //TRUE: ist ein Textbaustein Dokument
+ bool mbModified : 1; //TRUE: Dokument ist veraendert
+ bool mbDtor : 1; //TRUE: ist im SwDoc DTOR
+ // leider auch temporaer von
+ // SwSwgReader::InLayout(), wenn fehlerhafte
+ // Frames geloescht werden muessen
+ bool mbUndo : 1; // TRUE: Undo eingeschaltet
+ bool mbGroupUndo : 1; // TRUE: Undos werden gruppiert
+ bool mbPageNums : 1; // TRUE: es gibt virtuelle Seitennummern
+ bool mbLoaded : 1; // TRUE: ein geladenes Doc
+ bool mbUpdateExpFld : 1; // TRUE: Expression-Felder updaten
+ bool mbNewDoc : 1; // TRUE: neues Doc
+ bool mbNewFldLst : 1; // TRUE: Felder-Liste neu aufbauen
+ bool mbCopyIsMove : 1; // TRUE: Copy ist ein verstecktes Move
+ bool mbNoDrawUndoObj : 1; // TRUE: keine DrawUndoObjecte speichern
+ bool mbVisibleLinks : 1; // TRUE: Links werden sichtbar eingefuegt
+ bool mbBrowseMode : 1; // TRUE: Dokument im BrowseModus anzeigen
+ bool mbInReading : 1; // TRUE: Dokument wird gerade gelesen
+ bool mbInXMLImport : 1; // TRUE: During xml import, attribute portion building is not necessary
+ bool mbUpdateTOX : 1; // TRUE: nach Dokument laden die TOX Updaten
+ bool mbInLoadAsynchron : 1; // TRUE: Dokument wird gerade asynchron geladen
+ bool mbHTMLMode : 1; // TRUE: Dokument ist im HTMLMode
+ bool mbInCallModified : 1; // TRUE: im Set/Reset-Modified Link
+ bool mbIsGlobalDoc : 1; // TRUE: es ist ein GlobalDokument
+ bool mbGlblDocSaveLinks : 1; // TRUE: im GlobalDoc. gelinkte Sect. mit speichern
+ bool mbIsLabelDoc : 1; // TRUE: es ist ein Etiketten-Dokument
+ bool mbIsAutoFmtRedline : 1; // TRUE: die Redlines werden vom Autoformat aufgezeichnet
+ bool mbOLEPrtNotifyPending : 1; // TRUE: Printer ist geaendert und beim
+ // Erzeugen der ::com::sun::star::sdbcx::View ist eine Benachrichtigung
+ // der OLE-Objekte PrtOLENotify() notwendig.
+ bool mbAllOLENotify : 1; // True: Benachrichtigung aller Objekte ist notwendig
+ bool mbIsRedlineMove : 1; // True: die Redlines werden in/aus der Section verschoben
+ bool mbInsOnlyTxtGlssry : 1; // True: insert 'only text' glossary into doc
+ bool mbContains_MSVBasic : 1; // True: MS-VBasic exist is in our storage
+ bool mbPurgeOLE : 1; // TRUE: Purge OLE-Objects
+ bool mbKernAsianPunctuation : 1; // TRUE: kerning also for ASIAN punctuation
+ bool mbReadlineChecked : 1; // TRUE: if the query was already shown
+ bool mbLinksUpdated : 1; // OD 2005-02-11 #i38810#
+ // flag indicating, that the links have been updated.
+ bool mbClipBoard : 1; // true: this document represents the clipboard
+ bool mbColumnSelection : 1; // true: this content has bee created by a column selection
+ // (clipboard docs only)
+
+#ifdef DBG_UTIL
+ bool mbXMLExport : 1; // TRUE: during XML export
+#endif
+
+ // --> OD 2006-03-21 #b6375613#
+ // Document flag to trigger conversion, which applys the workaround for documents,
+ // which uses a certain layout defect in OOo 1.x to layout the documents.
+ // This conversion is performed, when the frames for the layout are created.
+ // Thus, this document flag has to be set after load a document and before
+ // creating the document view.
+ bool mbApplyWorkaroundForB6375613 : 1;
+ // <--
+
+ //
+ // COMPATIBILITY FLAGS START
+ //
+ //
+ // HISTORY OF THE COMPATIBILITY FLAGS:
+ //
+ // SO5:
+ // mbParaSpaceMax def = FALSE, TRUE since SO8
+ // mbParaSpaceMaxAtPages def = FALSE, TRUE since SO8
+ //
+ // SO6:
+ // mbTabCompat def = FALSE, TRUE since SO8
+ //
+ // SO7:
+ // mbUseVirtualDevice def = TRUE
+ // mbAddFlyOffsets def = FALSE, hidden
+ //
+ // SO7pp1:
+ // bOldNumbering def = FALSE, hidden
+ //
+ // SO8:
+ // mbAddExternalLeading def = TRUE
+ // mbUseHiResolutionVirtualDevice def = TRUE, hidden
+ // mbOldLineSpacing def = FALSE
+ // mbAddParaSpacingToTableCells def = TRUE
+ // mbUseFormerObjectPos def = FALSE
+ // mbUseFormerTextWrapping def = FALSE
+ // mbConsiderWrapOnObjPos def = FALSE
+ //
+ // SO8pp1:
+ // mbIgnoreFirstLineIndentInNumbering def = FALSE, hidden
+ // mbDoNotJustifyLinesWithManualBreak def = FALSE, hidden
+ // mbDoNotResetParaAttrsForNumFont def = FALSE, hidden
+ //
+ // SO8pp3
+ // mbDoNotCaptureDrawObjsOnPage def = FALSE, hidden
+ // - Relevant for drawing objects, which don't follow the text flow, but
+ // whose position is outside the page area:
+ // FALSE: Such drawing objects are captured on the page area of its anchor.
+ // TRUE: Such drawing objects can leave the page area, they aren't captured.
+ // mbTableRowKeep def = FALSE, hidden
+ // mbIgnoreTabsAndBlanksForLineCalculation def = FALSE, hidden
+ // mbClipAsCharacterAnchoredWriterFlyFrame def = FALSE, hidden
+ // - Introduced in order to re-activate clipping of as-character anchored
+ // Writer fly frames in method <SwFlyInCntFrm::MakeAll()> for documents,
+ // which are created with version prior SO8/OOo 2.0
+ //
+ // SO8pp4
+ // mbUnixForceZeroExtLeading def = FALSE, hidden
+ //
+ // SO8pu8
+ // mbOldPrinterMetrics def = FALSE, hidden
+ //
+ // SO9
+ // #i24363# tab stops relative to indent
+ // mbTabRelativeToIndent def = TRUE, hidden
+ // #i89181# suppress tab stop at left indent for paragraphs in lists, whose
+ // list level position and space mode equals LABEL_ALIGNMENT and whose list
+ // label is followed by a tab character.
+ // mbTabAtLeftIndentForParagraphsInList def = FALSE, hidden
+
+ bool mbParaSpaceMax : 1;
+ bool mbParaSpaceMaxAtPages : 1;
+ bool mbTabCompat : 1;
+ bool mbUseVirtualDevice : 1;
+ bool mbAddFlyOffsets : 1;
+ bool mbAddExternalLeading : 1;
+ bool mbUseHiResolutionVirtualDevice : 1;
+ bool mbOldLineSpacing : 1; // OD 2004-01-06 #i11859#
+ bool mbAddParaSpacingToTableCells : 1; // OD 2004-02-16 #106629#
+ bool mbUseFormerObjectPos : 1; // OD 2004-03-12 #i11860#
+ bool mbUseFormerTextWrapping : 1; // FME 2005-05-11 #108724#
+ bool mbConsiderWrapOnObjPos : 1; // OD 2004-05-05 #i28701#
+ // TRUE: object positioning algorithm has consider the wrapping style of // the floating screen objects as given by its attribute 'WrapInfluenceOnObjPos'
+
+ // non-ui-compatibility flags:
+ bool mbOldNumbering : 1; // HBRINKM #111955#
+ bool mbIgnoreFirstLineIndentInNumbering : 1; // FME 2005-05-30# i47448#
+ bool mbDoNotJustifyLinesWithManualBreak : 1; // FME 2005-06-08 #i49277#
+ bool mbDoNotResetParaAttrsForNumFont : 1; // FME 2005-08-11 #i53199#
+ bool mbTableRowKeep : 1; // FME 2006-02-10 #131283#
+ bool mbIgnoreTabsAndBlanksForLineCalculation : 1; // FME 2006-03-01 #i3952#
+ bool mbDoNotCaptureDrawObjsOnPage : 1; // OD 2006-03-14 #i62875#
+ bool mbOutlineLevelYieldsOutlineRule : 1;
+ bool mbClipAsCharacterAnchoredWriterFlyFrames : 1; // OD 2006-04-13 #b6402800#
+ bool mbUnixForceZeroExtLeading : 1; // FME 2006-10-09 #i60945#
+ bool mbOldPrinterMetrics : 1; // FME 2007-05-14 #147385#
+ bool mbTabRelativeToIndent : 1; // #i24363# tab stops relative to indent
+ bool mbProtectForm : 1;
+ bool mbTabAtLeftIndentForParagraphsInList; // OD 2008-06-05 #i89181# - see above
+
+ // #i78591#
+ sal_uInt32 n32DummyCompatabilityOptions1;
+ sal_uInt32 n32DummyCompatabilityOptions2;
+ //
+ // COMPATIBILITY FLAGS END
+ //
+
+ sal_Bool mbStartIdleTimer ; // idle timer mode start/stop
+
+ static SwAutoCompleteWord *pACmpltWords; // Liste aller Worte fuers AutoComplete
+ static sal_uInt16 nUndoActions; // anzahl von Undo ::com::sun::star::chaos::Action
+
+ //---------------- private Methoden ------------------------------
+ void checkRedlining(RedlineMode_t& _rReadlineMode);
+
+ sal_Bool DelUndoObj( sal_uInt16 nEnde ); // loescht alle UndoObjecte vom Anfang
+ // bis zum angegebenen Ende
+ DECL_LINK( AddDrawUndo, SdrUndoAction * );
+ // DrawModel
+ void DrawNotifyUndoHdl(); // wegen CLOOKs
+
+ // nur fuer den internen Gebrauch deshalb privat.
+ // Kopieren eines Bereiches im oder in ein anderes Dokument !
+ // Die Position darf nicht im Bereich liegen !!
+ bool CopyImpl( SwPaM&, SwPosition&, const bool MakeNewFrms /*= true */,
+ const bool bCopyAll, SwPaM *const pCpyRng /*= 0*/ ) const;
+
+ SwFlyFrmFmt* _MakeFlySection( const SwPosition& rAnchPos,
+ const SwCntntNode& rNode, RndStdIds eRequestId,
+ const SfxItemSet* pFlyAttrSet,
+ SwFrmFmt* = 0 );
+
+ SwFlyFrmFmt* _InsNoTxtNode( const SwPosition&rPos, SwNoTxtNode*,
+ const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet,
+ SwFrmFmt* = 0 );
+
+ void CopyFlyInFlyImpl( const SwNodeRange& rRg,
+ const xub_StrLen nEndContentIndex,
+ const SwNodeIndex& rStartIdx,
+ const bool bCopyFlyAtFly = false ) const;
+ sal_Int8 SetFlyFrmAnchor( SwFrmFmt& rFlyFmt, SfxItemSet& rSet, sal_Bool bNewFrms );
+
+ // --> OD 2005-01-13 #i40550#
+ typedef SwFmt* (SwDoc:: *FNCopyFmt)( const String&, SwFmt*, BOOL, BOOL );
+ // <--
+ SwFmt* CopyFmt( const SwFmt& rFmt, const SvPtrarr& rFmtArr,
+ FNCopyFmt fnCopyFmt, const SwFmt& rDfltFmt );
+ void CopyFmtArr( const SvPtrarr& rSourceArr, SvPtrarr& rDestArr,
+ FNCopyFmt fnCopyFmt, SwFmt& rDfltFmt );
+ void CopyPageDescHeaderFooterImpl( bool bCpyHeader,
+ const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt );
+ SwFmt* FindFmtByName( const SvPtrarr& rFmtArr,
+ const String& rName ) const;
+
+ VirtualDevice& CreateVirtualDevice_() const;
+ SfxPrinter& CreatePrinter_() const;
+ void PrtDataChanged(); //Printer oder JobSetup geandert, es muss
+ //fuer entsprechende Invalidierungen und
+ //Benachrichtigungen gesorgt werden.
+
+ // gcc: aFtnInfo::CopyCtor ist private, also muessen wir uns auch schuetzen
+ SwDoc( const SwDoc &);
+
+ // fuer Felder:
+ void _InitFieldTypes(); // wird vom CTOR gerufen!!
+ void _MakeFldList( int eMode );
+
+ // Datenbankfelder:
+ void UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc );
+ void AddUsedDBToList( SvStringsDtor& rDBNameList,
+ const SvStringsDtor& rUsedDBNames );
+ void AddUsedDBToList( SvStringsDtor& rDBNameList, const String& rDBName );
+ sal_Bool IsNameInArray( const SvStringsDtor& rOldNames, const String& rName );
+ void GetAllDBNames( SvStringsDtor& rAllDBNames );
+ void ReplaceUsedDBs( const SvStringsDtor& rUsedDBNames,
+ const String& rNewName, String& rFormel );
+ SvStringsDtor& FindUsedDBs( const SvStringsDtor& rAllDBNames,
+ const String& rFormel,
+ SvStringsDtor& rUsedDBNames );
+
+ void InitDrawModel();
+ void ReleaseDrawModel();
+
+ void _CreateNumberFormatter();
+
+ sal_Bool _UnProtectTblCells( SwTable& rTbl );
+
+ // erzeuge Anhand der vorgebenen Collection Teildokumente
+ // falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene
+ sal_Bool SplitDoc( sal_uInt16 eDocType, const String& rPath,
+ const SwTxtFmtColl* pSplitColl );
+ sal_Bool SplitDoc( sal_uInt16 eDocType, const String& rPath, int nOutlineLevel = 0 ); //#outline level,add by zhaijianwei.
+
+
+ // Charts der angegebenen Tabelle updaten
+ void _UpdateCharts( const SwTable& rTbl, ViewShell& rVSh ) const;
+
+ BOOL _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry,
+ USHORT nMode );
+
+ // unser eigener 'IdlTimer' ruft folgende Methode
+ DECL_LINK( DoIdleJobs, Timer * );
+ // der CharTimer ruft diese Methode
+ DECL_LINK( DoUpdateAllCharts, Timer * );
+ DECL_LINK( DoUpdateModifiedOLE, Timer * );
+
+ SwFmt *_MakeCharFmt(const String &, SwFmt *, BOOL, BOOL );
+ SwFmt *_MakeFrmFmt(const String &, SwFmt *, BOOL, BOOL );
+ SwFmt *_MakeTxtFmtColl(const String &, SwFmt *, BOOL, BOOL );
+
+ void InitTOXTypes();
+ void Paste( const SwDoc& );
+ bool DeleteAndJoinImpl(SwPaM&, const bool);
+ bool DeleteAndJoinWithRedlineImpl(SwPaM&, const bool unused = false);
+ bool DeleteRangeImpl(SwPaM&, const bool unused = false);
+ bool DeleteRangeImplImpl(SwPaM &);
+ bool ReplaceRangeImpl(SwPaM&, String const&, const bool);
+
+public:
+
+ /** Life cycle
+ */
+ SwDoc();
+ ~SwDoc();
+
+ inline bool IsInDtor() const { return mbDtor; }
+
+ /* @@@MAINTAINABILITY-HORROR@@@
+ Implementation details made public.
+ */
+ SwNodes& GetNodes() { return aNodes; }
+ const SwNodes& GetNodes() const { return aNodes; }
+
+ /** IInterface
+ */
+ virtual sal_Int32 acquire();
+ virtual sal_Int32 release();
+ virtual sal_Int32 getReferenceCount() const;
+
+ /** IDocumentSettingAccess
+ */
+ virtual bool get(/*[in]*/ DocumentSettingId id) const;
+ virtual void set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value);
+ virtual const com::sun::star::i18n::ForbiddenCharacters* getForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ bool bLocaleData ) const;
+ virtual void setForbiddenCharacters(/*[in]*/ USHORT nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rForbiddenCharacters );
+ virtual vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable();
+ virtual const vos::ORef<SvxForbiddenCharactersTable>& getForbiddenCharacterTable() const;
+ virtual sal_uInt16 getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const;
+ virtual void setLinkUpdateMode( /*[in]*/ sal_uInt16 nMode );
+ virtual SwFldUpdateFlags getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const;
+ virtual void setFieldUpdateFlags( /*[in]*/ SwFldUpdateFlags eMode );
+ virtual SwCharCompressType getCharacterCompressionType() const;
+ virtual void setCharacterCompressionType( /*[in]*/SwCharCompressType nType );
+
+ /** IDocumentDeviceAccess
+ */
+ virtual SfxPrinter* getPrinter(/*[in]*/ bool bCreate ) const;
+ virtual void setPrinter(/*[in]*/ SfxPrinter* pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged );
+ virtual VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate ) const;
+ virtual void setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool bCallVirDevDataChanged );
+ virtual OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const;
+ virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewHiRes );
+ virtual const JobSetup* getJobsetup() const;
+ virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup );
+ virtual SwPrintData* getPrintData() const;
+ virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData);
+
+ /** IDocumentMarkAccess
+ */
+ IDocumentMarkAccess* getIDocumentMarkAccess();
+ const IDocumentMarkAccess* getIDocumentMarkAccess() const;
+
+ /** IDocumentRedlineAccess
+ */
+ virtual RedlineMode_t GetRedlineMode() const;
+ virtual void SetRedlineMode_intern(/*[in]*/RedlineMode_t eMode);
+ virtual void SetRedlineMode(/*[in]*/RedlineMode_t eMode);
+ virtual bool IsRedlineOn() const;
+ virtual bool IsIgnoreRedline() const;
+ virtual bool IsInRedlines(const SwNode& rNode) const;
+ virtual const SwRedlineTbl& GetRedlineTbl() const;
+ virtual bool AppendRedline(/*[in]*/SwRedline* pPtr, /*[in]*/bool bCallDelete);
+ virtual bool SplitRedline(const SwPaM& rPam);
+ virtual bool DeleteRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bSaveInUndo, /*[in]*/sal_uInt16 nDelType);
+ virtual bool DeleteRedline(/*[in]*/const SwStartNode& rSection, /*[in]*/bool bSaveInUndo, /*[in]*/sal_uInt16 nDelType);
+ virtual sal_uInt16 GetRedlinePos(/*[in]*/const SwNode& rNode, /*[in]*/sal_uInt16 nType) const;
+ virtual void CompressRedlines();
+ virtual const SwRedline* GetRedline(/*[in]*/const SwPosition& rPos, /*[in]*/sal_uInt16* pFndPos) const;
+ virtual bool IsRedlineMove() const;
+ virtual void SetRedlineMove(/*[in]*/bool bFlag);
+ virtual bool AcceptRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete);
+ virtual bool AcceptRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete);
+ virtual bool RejectRedline(/*[in]*/sal_uInt16 nPos, /*[in]*/bool bCallDelete);
+ virtual bool RejectRedline(/*[in]*/const SwPaM& rPam, /*[in]*/bool bCallDelete);
+ virtual const SwRedline* SelNextRedline(/*[in]*/SwPaM& rPam) const;
+ virtual const SwRedline* SelPrevRedline(/*[in]*/SwPaM& rPam) const;
+ virtual void UpdateRedlineAttr();
+ virtual sal_uInt16 GetRedlineAuthor();
+ virtual sal_uInt16 InsertRedlineAuthor(const String& rAuthor);
+ virtual bool SetRedlineComment(/*[in]*/const SwPaM& rPam, /*[in]*/const String& rComment);
+ virtual const ::com::sun::star::uno::Sequence <sal_Int8>& GetRedlinePassword() const;
+ virtual void SetRedlinePassword(/*[in]*/const ::com::sun::star::uno::Sequence <sal_Int8>& rNewPassword);
+
+ /** IDocumentUndoRedo
+ */
+ virtual void SetUndoNoResetModified();
+ virtual bool IsUndoNoResetModified() const;
+ virtual void DoUndo(bool bUn);
+ virtual bool DoesUndo() const;
+ virtual void DoGroupUndo(bool bUn);
+ virtual bool DoesGroupUndo() const;
+ virtual bool Undo(SwUndoIter& );
+ virtual SwUndoId StartUndo(SwUndoId eUndoId, const SwRewriter * pRewriter);
+ virtual SwUndoId EndUndo(SwUndoId eUndoId, const SwRewriter * pRewriter);
+ virtual void DelAllUndoObj();
+ virtual SwUndoId GetUndoIds(String* pStr, SwUndoIds *pUndoIds) const;
+ virtual String GetUndoIdsStr(String* pStr, SwUndoIds *pUndoIds) const;
+ virtual bool HasUndoId(SwUndoId eId) const;
+ virtual const SwNodes* GetUndoNds() const;
+ virtual SwUndo* RemoveLastUndo(SwUndoId eUndoId);
+ virtual bool HasTooManyUndos() const;
+ virtual bool Redo(SwUndoIter&);
+ virtual SwUndoId GetRedoIds(String* pStr, SwUndoIds *pRedoIds) const;
+ virtual String GetRedoIdsStr(String* pStr, SwUndoIds *pRedoIds) const;
+ virtual bool Repeat(SwUndoIter&, sal_uInt16 nRepeatCnt);
+ virtual SwUndoId GetRepeatIds(String* pStr, SwUndoIds *pRedoIds) const;
+ virtual String GetRepeatIdsStr(String* pStr, SwUndoIds *pRedoIds) const;
+ virtual void AppendUndo(SwUndo*);
+ virtual void ClearRedo();
+ virtual void setUndoNoModifiedPosition( SwUndoNoModifiedPosition );
+ virtual SwUndoNoModifiedPosition getUndoNoModifiedPosition() const;
+
+
+ /** abfragen/setzen der Anzahl von wiederherstellbaren Undo-Actions */
+ static sal_uInt16 GetUndoActionCount();
+ static void SetUndoActionCount(sal_uInt16 nNew);
+
+ /** IDocumentLinksAdministration
+ */
+ virtual bool IsVisibleLinks() const;
+ virtual void SetVisibleLinks(bool bFlag);
+ virtual sfx2::LinkManager& GetLinkManager();
+ virtual const sfx2::LinkManager& GetLinkManager() const;
+ virtual void UpdateLinks(BOOL bUI);
+ virtual bool GetData(const String& rItem, const String& rMimeType, ::com::sun::star::uno::Any& rValue) const;
+ virtual bool SetData(const String& rItem, const String& rMimeType, const ::com::sun::star::uno::Any& rValue);
+ virtual ::sfx2::SvLinkSource* CreateLinkSource(const String& rItem);
+ virtual bool EmbedAllLinks();
+ virtual void SetLinksUpdated(const bool bNewLinksUpdated);
+ virtual bool LinksUpdated() const;
+
+ /** IDocumentFieldsAccess
+ */
+ virtual const SwFldTypes *GetFldTypes() const;
+ virtual SwFieldType *InsertFldType(const SwFieldType &);
+ virtual SwFieldType *GetSysFldType( const sal_uInt16 eWhich ) const;
+ virtual SwFieldType* GetFldType(sal_uInt16 nResId, const String& rName, bool bDbFieldMatching) const;
+ virtual void RemoveFldType(sal_uInt16 nFld);
+ virtual void UpdateFlds( SfxPoolItem* pNewHt, bool bCloseDB);
+ virtual void InsDeletedFldType(SwFieldType &);
+ virtual bool PutValueToField(const SwPosition & rPos, const com::sun::star::uno::Any& rVal, USHORT nWhich);
+ virtual bool UpdateFld(SwTxtFld * rDstFmtFld, SwField & rSrcFld, SwMsgPoolItem * pMsgHnt, bool bUpdateTblFlds);
+ virtual void UpdateRefFlds(SfxPoolItem* pHt);
+ virtual void UpdateTblFlds(SfxPoolItem* pHt);
+ virtual void UpdateExpFlds(SwTxtFld* pFld, bool bUpdateRefFlds);
+ virtual void UpdateUsrFlds();
+ virtual void UpdatePageFlds(SfxPoolItem*);
+ virtual void LockExpFlds();
+ virtual void UnlockExpFlds();
+ virtual bool IsExpFldsLocked() const;
+ virtual SwDocUpdtFld& GetUpdtFlds() const;
+ virtual bool SetFieldsDirty(bool b, const SwNode* pChk, ULONG nLen);
+ virtual void SetFixFields(bool bOnlyTimeDate, const DateTime* pNewDateTime);
+ virtual void FldsToCalc(SwCalc& rCalc, ULONG nLastNd, sal_uInt16 nLastCnt);
+ virtual void FldsToCalc(SwCalc& rCalc, const _SetGetExpFld& rToThisFld);
+ virtual void FldsToExpand(SwHash**& ppTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld);
+ virtual bool IsNewFldLst() const;
+ virtual void SetNewFldLst( bool bFlag);
+ virtual void InsDelFldInFldLst(bool bIns, const SwTxtFld& rFld);
+
+ /** Returns the field at a certain position.
+ @param rPos position to search at
+ @return pointer to field at the given position or NULL in case no field is found
+ */
+ static SwField* GetField(const SwPosition& rPos);
+
+ /** Returns the field at a certain position.
+ @param rPos position to search at
+ @return pointer to field at the given position or NULL in case no field is found
+ */
+ static SwTxtFld* GetTxtFld(const SwPosition& rPos);
+
+ /** IDocumentContentOperations
+ */
+ virtual bool CopyRange(SwPaM&, SwPosition&, const bool bCopyAll) const;
+ virtual void DeleteSection(SwNode* pNode);
+ virtual bool DeleteRange(SwPaM&);
+ virtual bool DelFullPara(SwPaM&);
+ // --> OD 2009-08-20 #i100466#
+ // Add optional parameter <bForceJoinNext>, default value <false>
+ // Needed for hiding of deletion redlines
+ virtual bool DeleteAndJoin( SwPaM&,
+ const bool bForceJoinNext = false );
+ // <--
+ virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags);
+ virtual bool MoveNodeRange(SwNodeRange&, SwNodeIndex&, SwMoveFlags);
+ virtual bool MoveAndJoin(SwPaM&, SwPosition&, SwMoveFlags);
+ virtual bool Overwrite(const SwPaM &rRg, const String& rStr);
+ virtual bool InsertString(const SwPaM &rRg, const String&,
+ const enum InsertFlags nInsertMode = INS_EMPTYEXPAND );
+ virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const String& rGrfName, const String& rFltName, const Graphic* pGraphic,
+ const SfxItemSet* pFlyAttrSet, const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
+ virtual SwFlyFrmFmt* Insert(const SwPaM& rRg, const GraphicObject& rGrfObj, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
+ virtual SwDrawFrmFmt* Insert(const SwPaM &rRg, SdrObject& rDrawObj, const SfxItemSet* pFlyAttrSet, SwFrmFmt*);
+ virtual SwFlyFrmFmt* Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
+ virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&,
+ const SetAttrMode nFlags);
+ virtual bool InsertItemSet (const SwPaM &rRg, const SfxItemSet&,
+ const SetAttrMode nFlags);
+ virtual void ReRead(SwPaM&, const String& rGrfName, const String& rFltName, const Graphic* pGraphic, const GraphicObject* pGrfObj);
+ virtual void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&);
+ virtual SwFlyFrmFmt* InsertOLE(const SwPaM &rRg, const String& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet,
+ const SfxItemSet* pGrfAttrSet, SwFrmFmt*);
+ virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart);
+ virtual bool AppendTxtNode(SwPosition& rPos);
+ virtual void SetModified(SwPaM &rPaM);
+ virtual bool ReplaceRange(SwPaM& rPam, const String& rNewStr,
+ const bool bRegExReplace);
+ virtual void RemoveLeadingWhiteSpace(const SwPosition & rPos );
+
+ /** IDocumentStylePoolAccess
+ */
+ virtual SwTxtFmtColl* GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage = true );
+ virtual SwFmt* GetFmtFromPool( sal_uInt16 nId );
+ virtual SwFrmFmt* GetFrmFmtFromPool( sal_uInt16 nId );
+ virtual SwCharFmt* GetCharFmtFromPool( sal_uInt16 nId );
+ virtual SwPageDesc* GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage = true );
+ virtual SwNumRule* GetNumRuleFromPool( sal_uInt16 nId );
+ virtual bool IsPoolTxtCollUsed( sal_uInt16 nId ) const;
+ virtual bool IsPoolFmtUsed( sal_uInt16 nId ) const;
+ virtual bool IsPoolPageDescUsed( sal_uInt16 nId ) const;
+
+ /** IDocumentLineNumberAccess
+ */
+ virtual const SwLineNumberInfo& GetLineNumberInfo() const;
+ virtual void SetLineNumberInfo(const SwLineNumberInfo& rInfo);
+
+ /** IDocumentStatistics
+ */
+ virtual void DocInfoChgd();
+ virtual const SwDocStat &GetDocStat() const;
+ virtual void SetDocStat(const SwDocStat& rStat);
+ virtual void UpdateDocStat(SwDocStat& rStat);
+
+ /** IDocumentState
+ */
+ virtual void SetModified();
+ virtual void ResetModified();
+ virtual bool IsModified() const;
+ virtual bool IsLoaded() const;
+ virtual bool IsUpdateExpFld() const;
+ virtual bool IsNewDoc() const;
+ virtual bool IsPageNums() const;
+ virtual void SetPageNums(bool b);
+ virtual void SetNewDoc(bool b);
+ virtual void SetUpdateExpFldStat(bool b);
+ virtual void SetLoaded(bool b);
+
+ /** IDocumentDrawModelAccess
+ */
+ virtual const SdrModel* GetDrawModel() const;
+ virtual SdrModel* GetDrawModel();
+ virtual SdrLayerID GetHeavenId() const;
+ virtual SdrLayerID GetHellId() const;
+ virtual SdrLayerID GetControlsId() const;
+ virtual SdrLayerID GetInvisibleHeavenId() const;
+ virtual SdrLayerID GetInvisibleHellId() const;
+ virtual SdrLayerID GetInvisibleControlsId() const;
+ virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView );
+ virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const;
+ virtual SdrLayerID GetVisibleLayerIdByInvisibleOne( const SdrLayerID& _nInvisibleLayerId );
+ virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId );
+ virtual SdrModel* _MakeDrawModel();
+ virtual SdrModel* GetOrCreateDrawModel();
+
+ /** IDocumentLayoutAccess
+ */
+ virtual const SwRootFrm* GetRootFrm() const ;
+ virtual SwRootFrm* GetRootFrm();
+ virtual void SetRootFrm( SwRootFrm* pNew );
+ virtual SwLayouter* GetLayouter();
+ virtual const SwLayouter* GetLayouter() const;
+ virtual void SetLayouter( SwLayouter* pNew );
+ virtual SwFrmFmt* MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet );
+ virtual void DelLayoutFmt( SwFrmFmt *pFmt );
+ virtual SwFrmFmt* CopyLayoutFmt( const SwFrmFmt& rSrc, const SwFmtAnchor& rNewAnchor, bool bSetTxtFlyAtt, bool bMakeFrms );
+
+ /** IDocumentTimerAccess
+ */
+ virtual void StartIdling();
+ virtual void StopIdling();
+ virtual void BlockIdling();
+ virtual void UnblockIdling();
+
+ /** IDocumentChartDataProviderAccess
+ */
+ virtual SwChartDataProvider * GetChartDataProvider( bool bCreate = false ) const;
+ virtual void CreateChartInternalDataProviders( const SwTable *pTable );
+ virtual SwChartLockController_Helper & GetChartControllerHelper();
+
+ /** IDocumentListItems
+
+ OD 2007-10-26 #i83479#
+ */
+ virtual void addListItem( const SwNodeNum& rNodeNum );
+ virtual void removeListItem( const SwNodeNum& rNodeNum );
+ virtual String getListItemText( const SwNodeNum& rNodeNum,
+ const bool bWithNumber = true,
+ const bool bWithSpacesForLevel = false ) const;
+ virtual void getListItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const;
+ virtual void getNumItems( IDocumentListItems::tSortedNodeNumList& orNodeNumList ) const;
+
+ /** IDocumentOutlineNodes
+
+ OD 2007-11-15 #i83479#
+ */
+ virtual sal_Int32 getOutlineNodesCount() const;
+ virtual int getOutlineLevel( const sal_Int32 nIdx ) const;
+ virtual String getOutlineText( const sal_Int32 nIdx,
+ const bool bWithNumber,
+ const bool bWithSpacesForLevel ) const;
+ virtual SwTxtNode* getOutlineNode( const sal_Int32 nIdx ) const;
+ virtual void getOutlineNodes( IDocumentOutlineNodes::tSortedOutlineNodeList& orOutlineNodeList ) const;
+
+ /** IDocumentListsAccess
+
+ OD 2008-03-26 #refactorlists#
+ */
+ virtual SwList* createList( String sListId,
+ const String sDefaultListStyleName );
+ virtual void deleteList( const String sListId );
+ virtual SwList* getListByName( const String sListId ) const;
+ virtual SwList* createListForListStyle( const String sListStyleName );
+ virtual SwList* getListForListStyle( const String sListStyleName ) const;
+ virtual void deleteListForListStyle( const String sListStyleName );
+ // --> OD 2008-07-08 #i91400#
+ virtual void trackChangeOfListStyleName( const String sListStyleName,
+ const String sNewListStyleName );
+ // <--
+
+ /** IDocumentExternalData */
+ virtual void setExternalData(::sw::tExternalDataType eType,
+ ::sw::tExternalDataPointer pPayload);
+ virtual ::sw::tExternalDataPointer getExternalData(::sw::tExternalDataType eType);
+
+
+ /** INextInterface here
+ */
+
+ DECL_STATIC_LINK( SwDoc, BackgroundDone, SvxBrushItem *);
+ DECL_LINK(CalcFieldValueHdl, EditFieldInfo*);
+
+ /** OLE ???
+ */
+ bool IsOLEPrtNotifyPending() const { return mbOLEPrtNotifyPending; }
+ inline void SetOLEPrtNotifyPending( bool bSet = true );
+ void PrtOLENotify( sal_Bool bAll ); //Alle oder nur Markierte
+
+#ifdef DBG_UTIL
+ bool InXMLExport() const { return mbXMLExport; }
+ void SetXMLExport( bool bFlag ) { mbXMLExport = bFlag; }
+#endif
+
+ // liefert zu allen fliegenden Rahmen die Position im Dokument.
+ // Wird ein Pam-Pointer uebergeben, muessen die absatzgebundenen
+ // FlyFrames von der ::com::sun::star::awt::Selection vollstaendig umschlossen sein
+ // ( Start < Pos < End ) !!!
+ // (wird fuer die Writer benoetigt)
+ void GetAllFlyFmts( SwPosFlyFrms& rPosFlyFmts, const SwPaM* = 0,
+ sal_Bool bDrawAlso = sal_False ) const;
+
+ // wegen swrtf.cxx und define private public, jetzt hier
+ SwFlyFrmFmt *MakeFlyFrmFmt (const String &rFmtName, SwFrmFmt *pDerivedFrom);
+ SwDrawFrmFmt *MakeDrawFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom);
+
+ // JP 08.05.98: fuer Flys muss jetzt diese Schnittstelle benutzt
+ // werden. pAnchorPos muss gesetzt sein, wenn keine
+ // Seitenbindung vorliegt UND der ::com::sun::star::chaos::Anchor nicht schon
+ // im FlySet/FrmFmt mit gueltiger CntntPos gesetzt ist
+ /* #109161# new parameter bCalledFromShell
+
+ TRUE: An existing adjust item at pAnchorPos is propagated to
+ the content node of the new fly section. That propagation only
+ takes place if there is no adjust item in the paragraph style
+ for the new fly section.
+
+ FALSE: no propagation
+ */
+ SwFlyFrmFmt* MakeFlySection( RndStdIds eAnchorType,
+ const SwPosition* pAnchorPos,
+ const SfxItemSet* pSet = 0,
+ SwFrmFmt *pParent = 0,
+ BOOL bCalledFromShell = FALSE );
+ SwFlyFrmFmt* MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
+ const SwSelBoxes* pSelBoxes = 0,
+ SwFrmFmt *pParent = 0 );
+
+ void CopyWithFlyInFly( const SwNodeRange& rRg,
+ const xub_StrLen nEndContentIndex,
+ const SwNodeIndex& rInsPos,
+ sal_Bool bMakeNewFrms = sal_True,
+ sal_Bool bDelRedlines = sal_True,
+ sal_Bool bCopyFlyAtFly = sal_False ) const;
+
+ sal_Bool SetFlyFrmAttr( SwFrmFmt& rFlyFmt, SfxItemSet& rSet );
+
+ sal_Bool SetFrmFmtToFly( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFmt,
+ SfxItemSet* pSet = 0, sal_Bool bKeepOrient = sal_False );
+ // --> OD 2009-07-20 #i73249#
+ void SetFlyFrmTitle( SwFlyFrmFmt& rFlyFrmFmt,
+ const String& sNewTitle );
+ void SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
+ const String& sNewDescription );
+ // <--
+
+ /** Footnotes
+ */
+ // Fussnoten Informationen
+ const SwFtnInfo& GetFtnInfo() const { return *pFtnInfo; }
+ void SetFtnInfo(const SwFtnInfo& rInfo);
+ const SwEndNoteInfo& GetEndNoteInfo() const { return *pEndNoteInfo; }
+ void SetEndNoteInfo(const SwEndNoteInfo& rInfo);
+ SwFtnIdxs& GetFtnIdxs() { return *pFtnIdxs; }
+ const SwFtnIdxs& GetFtnIdxs() const { return *pFtnIdxs; }
+ // change footnotes in area
+ bool SetCurFtn( const SwPaM& rPam, const String& rNumStr,
+ sal_uInt16 nNumber, bool bIsEndNote );
+
+ /** Operations on the content of the document e.g.
+ spell-checking/hyphenating/word-counting
+ */
+ ::com::sun::star::uno::Any
+ Spell( SwPaM&, ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > &,
+ sal_uInt16* pPageCnt, sal_uInt16* pPageSt, bool bGrammarCheck,
+ SwConversionArgs *pConvArgs = 0 ) const;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenatedWord >
+ Hyphenate( SwPaM *pPam, const Point &rCrsrPos,
+ sal_uInt16* pPageCnt, sal_uInt16* pPageSt );
+
+ // count words in pam
+ void CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const;
+
+
+ /** ???
+ */
+ // Textbaustein Dokument?
+ void SetGlossDoc( bool bGlssDc = true ) { mbGlossDoc = bGlssDc; }
+ bool IsInsOnlyTextGlossary() const { return mbInsOnlyTxtGlssry; }
+
+ // Abstakt fuellen
+ void Summary( SwDoc* pExtDoc, sal_uInt8 nLevel, sal_uInt8 nPara, sal_Bool bImpress );
+
+ void ChangeAuthorityData(const SwAuthEntry* pNewData);
+
+ bool IsInCallModified() const { return mbInCallModified; }
+ sal_Bool IsInHeaderFooter( const SwNodeIndex& rIdx ) const;
+ short GetTextDirection( const SwPosition& rPos,
+ const Point* pPt = 0 ) const;
+ sal_Bool IsInVerticalText( const SwPosition& rPos,
+ const Point* pPt = 0 ) const;
+ /** Database ???
+ */
+
+ /* Datenbank && DB-Manager */
+ void SetNewDBMgr( SwNewDBMgr* pNewMgr ) { pNewDBMgr = pNewMgr; }
+ SwNewDBMgr* GetNewDBMgr() const { return pNewDBMgr; }
+ void ChangeDBFields( const SvStringsDtor& rOldNames,
+ const String& rNewName );
+ void SetInitDBFields(sal_Bool b);
+ // Von Feldern verwendete Datenbanken herausfinden
+ void GetAllUsedDB( SvStringsDtor& rDBNameList,
+ const SvStringsDtor* pAllDBNames = 0 );
+
+ void ChgDBData( const SwDBData& rNewData );
+ SwDBData GetDBData();
+ const SwDBData& GetDBDesc();
+ const SwDBData& _GetDBDesc() const { return aDBData; }
+
+ /** Some helper functions
+ */
+ String GetUniqueGrfName() const;
+ String GetUniqueOLEName() const;
+ String GetUniqueFrameName() const;
+
+ void SetFlyName( SwFlyFrmFmt& rFmt, const String& rName );
+ const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_Int8 nNdTyp = 0 ) const;
+
+ void GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName,
+ String* pFltName ) const;
+
+ // setze bei allen Flys ohne Namen einen gueltigen (Wird von den Readern
+ // nach dem Einlesen gerufen )
+ void SetAllUniqueFlyNames();
+
+ //Zuruecksetzen der Attribute; es werden alle TxtHints und bei
+ //vollstaendiger Selektion harte Formatierung (AUTO-Formate) entfernt
+ // --> OD 2008-11-28 #i96644#
+ // introduce new optional parameter <bSendDataChangedEvents> in order to
+ // control, if the side effect "send data changed events" is triggered or not.
+ void ResetAttrs( const SwPaM &rRg,
+ sal_Bool bTxtAttr = sal_True,
+ const SvUShortsSort* = 0,
+ const bool bSendDataChangedEvents = true );
+ // <--
+ void RstTxtAttrs(const SwPaM &rRg, BOOL bInclRefToxMark = FALSE );
+
+ // Setze das Attribut im angegebenen Format. Ist Undo aktiv, wird
+ // das alte in die Undo-History aufgenommen
+ void SetAttr( const SfxPoolItem&, SwFmt& );
+ void SetAttr( const SfxItemSet&, SwFmt& );
+
+ // --> OD 2008-02-12 #newlistlevelattrs#
+ // method to reset a certain attribute at the given format
+ void ResetAttrAtFormat( const USHORT nWhichId,
+ SwFmt& rChangedFormat );
+ // <--
+
+ // Setze das Attribut als neues default Attribut in diesem Dokument.
+ // Ist Undo aktiv, wird das alte in die Undo-History aufgenommen
+ void SetDefault( const SfxPoolItem& );
+ void SetDefault( const SfxItemSet& );
+
+ // Erfrage das Default Attribut in diesem Dokument.
+ const SfxPoolItem& GetDefault( sal_uInt16 nFmtHint ) const;
+ // TextAttribute nicht mehr aufspannen lassen
+ sal_Bool DontExpandFmt( const SwPosition& rPos, sal_Bool bFlag = sal_True );
+
+ /* Formate */
+ const SwFrmFmts* GetFrmFmts() const { return pFrmFmtTbl; }
+ SwFrmFmts* GetFrmFmts() { return pFrmFmtTbl; }
+ const SwCharFmts* GetCharFmts() const { return pCharFmtTbl;}
+
+ /* LayoutFormate (Rahmen, DrawObjecte), mal const mal nicht */
+ const SwSpzFrmFmts* GetSpzFrmFmts() const { return pSpzFrmFmtTbl; }
+ SwSpzFrmFmts* GetSpzFrmFmts() { return pSpzFrmFmtTbl; }
+
+ const SwFrmFmt *GetDfltFrmFmt() const { return pDfltFrmFmt; }
+ SwFrmFmt *GetDfltFrmFmt() { return pDfltFrmFmt; }
+ const SwFrmFmt *GetEmptyPageFmt() const { return pEmptyPageFmt; }
+ SwFrmFmt *GetEmptyPageFmt() { return pEmptyPageFmt; }
+ const SwFrmFmt *GetColumnContFmt() const{ return pColumnContFmt; }
+ SwFrmFmt *GetColumnContFmt() { return pColumnContFmt; }
+ const SwCharFmt *GetDfltCharFmt() const { return pDfltCharFmt;}
+ SwCharFmt *GetDfltCharFmt() { return pDfltCharFmt;}
+
+ // Returns the interface of the management of (auto)styles
+ IStyleAccess& GetIStyleAccess() { return *pStyleAccess; }
+
+ // Remove all language dependencies from all existing formats
+ void RemoveAllFmtLanguageDependencies();
+
+ SwFrmFmt *MakeFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom,
+ BOOL bBroadcast = FALSE, BOOL bAuto = TRUE);
+ void DelFrmFmt( SwFrmFmt *pFmt, BOOL bBroadcast = FALSE );
+ SwFrmFmt* FindFrmFmtByName( const String& rName ) const
+ { return (SwFrmFmt*)FindFmtByName( (SvPtrarr&)*pFrmFmtTbl, rName ); }
+
+ // --> OD 2005-01-13 #i40550#
+ SwCharFmt *MakeCharFmt(const String &rFmtName, SwCharFmt *pDerivedFrom,
+ BOOL bBroadcast = FALSE,
+ BOOL bAuto = TRUE );
+ // <--
+ void DelCharFmt(sal_uInt16 nFmt, BOOL bBroadcast = FALSE);
+ void DelCharFmt(SwCharFmt* pFmt, BOOL bBroadcast = FALSE);
+ SwCharFmt* FindCharFmtByName( const String& rName ) const
+ { return (SwCharFmt*)FindFmtByName( (SvPtrarr&)*pCharFmtTbl, rName ); }
+
+ /* Formatcollections (Vorlagen) */
+ // TXT
+ const SwTxtFmtColl* GetDfltTxtFmtColl() const { return pDfltTxtFmtColl; }
+ const SwTxtFmtColls *GetTxtFmtColls() const { return pTxtFmtCollTbl; }
+ // --> OD 2005-01-13 #i40550#
+ SwTxtFmtColl *MakeTxtFmtColl( const String &rFmtName,
+ SwTxtFmtColl *pDerivedFrom,
+ BOOL bBroadcast = FALSE,
+ BOOL bAuto = TRUE );
+ // <--
+ SwConditionTxtFmtColl* MakeCondTxtFmtColl( const String &rFmtName,
+ SwTxtFmtColl *pDerivedFrom,
+ BOOL bBroadcast = FALSE);
+ void DelTxtFmtColl(sal_uInt16 nFmt, BOOL bBroadcast = FALSE);
+ void DelTxtFmtColl( SwTxtFmtColl* pColl, BOOL bBroadcast = FALSE );
+ // --> OD 2007-11-06 #i62675#
+ // Add 4th optional parameter <bResetListAttrs>.
+ // 'side effect' of <SetTxtFmtColl> with <bReset = true> is that the hard
+ // attributes of the affected text nodes are cleared, except the break
+ // attribute, the page description attribute and the list style attribute.
+ // The new parameter <bResetListAttrs> indicates, if the list attributes
+ // (list style, restart at and restart with) are cleared as well in case
+ // that <bReset = true> and the paragraph style has a list style attribute set.
+ sal_Bool SetTxtFmtColl( const SwPaM &rRg, SwTxtFmtColl *pFmt,
+ bool bReset = true,
+ bool bResetListAttrs = false );
+ // <--
+ SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const
+ { return (SwTxtFmtColl*)FindFmtByName( (SvPtrarr&)*pTxtFmtCollTbl, rName ); }
+
+ void ChkCondColls();
+
+ // GRF
+ const SwGrfFmtColl* GetDfltGrfFmtColl() const { return pDfltGrfFmtColl; }
+ const SwGrfFmtColls *GetGrfFmtColls() const { return pGrfFmtCollTbl; }
+ SwGrfFmtColl *MakeGrfFmtColl(const String &rFmtName,
+ SwGrfFmtColl *pDerivedFrom);
+ SwGrfFmtColl* FindGrfFmtCollByName( const String& rName ) const
+ { return (SwGrfFmtColl*)FindFmtByName( (SvPtrarr&)*pGrfFmtCollTbl, rName ); }
+
+ // Tabellen-Formate
+ const SwFrmFmts* GetTblFrmFmts() const { return pTblFrmFmtTbl; }
+ SwFrmFmts* GetTblFrmFmts() { return pTblFrmFmtTbl; }
+ sal_uInt16 GetTblFrmFmtCount( sal_Bool bUsed ) const;
+ SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, sal_Bool bUsed ) const;
+ SwTableFmt* MakeTblFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom);
+ void DelTblFrmFmt( SwTableFmt* pFmt );
+ SwTableFmt* FindTblFmtByName( const String& rName, sal_Bool bAll = sal_False ) const;
+
+ //Rahmenzugriff
+ //iterieren ueber Flys - fuer Basic-Collections
+ sal_uInt16 GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL) const;
+ SwFrmFmt* GetFlyNum(sal_uInt16 nIdx, FlyCntType eType = FLYCNTTYPE_ALL);
+
+
+ // kopiere die Formate in die eigenen Arrays und returne diese
+ SwFrmFmt *CopyFrmFmt ( const SwFrmFmt& );
+ SwCharFmt *CopyCharFmt( const SwCharFmt& );
+ SwTxtFmtColl* CopyTxtColl( const SwTxtFmtColl& rColl );
+ SwGrfFmtColl* CopyGrfColl( const SwGrfFmtColl& rColl );
+
+ // ersetze alle Formate mit denen aus rSource
+ void ReplaceStyles( SwDoc& rSource );
+
+ // erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird
+ sal_Bool IsUsed( const SwModify& ) const;
+ sal_Bool IsUsed( const SwNumRule& ) const;
+
+ // setze den Namen der neu geladenen Dokument-Vorlage
+ sal_uInt16 SetDocPattern( const String& rPatternName );
+ // gebe den Dok-VorlagenNamen zurueck. !!! Kann auch 0 sein !!!
+ String* GetDocPattern( sal_uInt16 nPos ) const { return aPatternNms[nPos]; }
+
+ // Loesche alle nicht referenzierten FeldTypen
+ void GCFieldTypes(); // impl. in docfld.cxx
+
+ // akt. Dokument mit Textbausteindokument verbinden/erfragen
+ void SetGlossaryDoc( SwDoc* pDoc ) { pGlossaryDoc = pDoc; }
+
+ // travel over PaM Ring
+ sal_Bool InsertGlossary( SwTextBlocks& rBlock, const String& rEntry,
+ SwPaM& rPaM, SwCrsrShell* pShell = 0);
+
+ // get the set of printable pages for the XRenderable API by
+ // evaluating the respective settings (see implementation)
+ void CalculatePagesForPrinting( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
+ sal_Int32 nDocPageCount );
+ void UpdatePagesForPrintingWithPostItData( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
+ sal_Int32 nDocPageCount );
+ void CalculatePagePairsForProspectPrinting( SwRenderData &rData, const SwPrintUIOptions &rOptions,
+ sal_Int32 nDocPageCount );
+
+ sal_uInt16 GetPageCount() const;
+ const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
+
+ //PageDescriptor-Schnittstelle
+ sal_uInt16 GetPageDescCnt() const { return aPageDescs.Count(); }
+ const SwPageDesc& GetPageDesc( const sal_uInt16 i ) const { return *aPageDescs[i]; }
+ SwPageDesc* FindPageDescByName( const String& rName,
+ sal_uInt16* pPos = 0 ) const;
+
+ // kopiere den gesamten PageDesc - ueber Dokumentgrenzen und "tief"!
+ // optional kann das kopieren der PoolFmtId, -HlpId verhindert werden
+ void CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
+ sal_Bool bCopyPoolIds = sal_True );
+
+ // kopiere die Kopzeile (mit dem Inhalt!) aus dem SrcFmt
+ // ins DestFmt ( auch ueber Doc grenzen hinaus!)
+ void CopyHeader( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt )
+ { CopyPageDescHeaderFooterImpl( true, rSrcFmt, rDestFmt ); }
+ // kopiere die Fusszeile (mit dem Inhalt!) aus dem SrcFmt
+ // ins DestFmt ( auch ueber Doc grenzen hinaus!)
+ void CopyFooter( const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt )
+ { CopyPageDescHeaderFooterImpl( false, rSrcFmt, rDestFmt ); }
+
+ //fuer Reader
+
+ SwPageDesc * GetPageDesc( const String & rName );
+ SwPageDesc& _GetPageDesc( sal_uInt16 i ) const { return *aPageDescs[i]; }
+ void ChgPageDesc( const String & rName, const SwPageDesc& );
+ void ChgPageDesc( sal_uInt16 i, const SwPageDesc& );
+ BOOL FindPageDesc( const String & rName, sal_uInt16 * pFound );
+ // -> #116530#
+ void DelPageDesc( const String & rName, BOOL bBroadcast = FALSE);
+ void DelPageDesc( sal_uInt16 i, BOOL bBroadcast = FALSE );
+ // <- #116530#
+ void PreDelPageDesc(SwPageDesc * pDel); // #i7983#
+ // -> #116530#
+ sal_uInt16 MakePageDesc( const String &rName, const SwPageDesc* pCpy = 0,
+ BOOL bRegardLanguage = TRUE,
+ BOOL bBroadcast = FALSE);
+ void BroadcastStyleOperation(String rName, SfxStyleFamily eFamily,
+ USHORT nOp);
+ // <- #116530#
+
+
+ // --> FME 2005-03-16 #i44963# The html import sometimes overwrites the
+ // page sizes set in the page descriptions. This function is used to
+ // correct this.
+ void CheckDefaultPageFmt();
+ // <--
+
+ // Methoden fuer die Verzeichnisse:
+ // - Verzeichnismarke einfuegen loeschen travel
+ sal_uInt16 GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& ) const;
+ void DeleteTOXMark( const SwTOXMark* pTOXMark );
+ const SwTOXMark& GotoTOXMark( const SwTOXMark& rCurTOXMark,
+ SwTOXSearch eDir, sal_Bool bInReadOnly );
+
+ // - Verzeichnis einfuegen, und bei Bedarf erneuern
+ const SwTOXBaseSection* InsertTableOf( const SwPosition& rPos,
+ const SwTOXBase& rTOX,
+ const SfxItemSet* pSet = 0,
+ sal_Bool bExpand = sal_False );
+ const SwTOXBaseSection* InsertTableOf( ULONG nSttNd, ULONG nEndNd,
+ const SwTOXBase& rTOX,
+ const SfxItemSet* pSet = 0 );
+ const SwTOXBase* GetCurTOX( const SwPosition& rPos ) const;
+ const SwAttrSet& GetTOXBaseAttrSet(const SwTOXBase& rTOX) const;
+
+ sal_Bool DeleteTOX( const SwTOXBase& rTOXBase, sal_Bool bDelNodes = sal_False );
+ String GetUniqueTOXBaseName( const SwTOXType& rType,
+ const String* pChkStr = 0 ) const;
+
+ sal_Bool SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName);
+ void SetTOXBaseProtection(const SwTOXBase& rTOXBase, sal_Bool bProtect);
+
+ // nach einlesen einer Datei alle Verzeichnisse updaten
+ void SetUpdateTOX( bool bFlag = true ) { mbUpdateTOX = bFlag; }
+ bool IsUpdateTOX() const { return mbUpdateTOX; }
+
+ const String& GetTOIAutoMarkURL() const {return sTOIAutoMarkURL;}
+ void SetTOIAutoMarkURL(const String& rSet) {sTOIAutoMarkURL = rSet;}
+ void ApplyAutoMark();
+
+ bool IsInReading() const { return mbInReading; }
+ void SetInReading( bool bNew ) { mbInReading = bNew; }
+
+ bool IsClipBoard() const { return mbClipBoard; }
+ // N.B.: must be called right after constructor! (@see GetXmlIdRegistry)
+ void SetClipBoard( bool bNew ) { mbClipBoard = bNew; }
+
+ bool IsColumnSelection() const { return mbColumnSelection; }
+ void SetColumnSelection( bool bNew ) { mbColumnSelection = bNew; }
+
+ bool IsInXMLImport() const { return mbInXMLImport; }
+ void SetInXMLImport( bool bNew ) { mbInXMLImport = bNew; }
+
+ // - Verzeichnis-Typen verwalten
+ sal_uInt16 GetTOXTypeCount( TOXTypes eTyp ) const;
+ const SwTOXType* GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const;
+ sal_Bool DeleteTOXType( TOXTypes eTyp, sal_uInt16 nId );
+ const SwTOXType* InsertTOXType( const SwTOXType& rTyp );
+ const SwTOXTypes& GetTOXTypes() const { return *pTOXTypes; }
+
+ const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, sal_Bool bCreate = sal_False );
+ void SetDefaultTOXBase(const SwTOXBase& rBase);
+
+ // - Schluessel fuer die Indexverwaltung
+ sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
+
+ // Sortieren Tabellen Text
+ sal_Bool SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions&);
+ sal_Bool SortText(const SwPaM&, const SwSortOptions&);
+
+ // korrigiere die im Dokument angemeldeten SwPosition-Objecte,
+ // wie z.B. die ::com::sun::star::text::Bookmarks oder die Verzeichnisse.
+ // JP 22.06.95: ist bMoveCrsr gesetzt, verschiebe auch die Crsr
+
+ // Setzt alles in rOldNode auf rNewPos + Offset
+ void CorrAbs( const SwNodeIndex& rOldNode, const SwPosition& rNewPos,
+ const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False );
+ // Setzt alles im Bereich von [rStartNode, rEndNode] nach rNewPos
+ void CorrAbs( const SwNodeIndex& rStartNode, const SwNodeIndex& rEndNode,
+ const SwPosition& rNewPos, sal_Bool bMoveCrsr = sal_False );
+ // Setzt alles im Bereich von rRange nach rNewPos
+ void CorrAbs( const SwPaM& rRange, const SwPosition& rNewPos,
+ sal_Bool bMoveCrsr = sal_False );
+ // Setzt alles in rOldNode auf relative Pos
+ void CorrRel( const SwNodeIndex& rOldNode, const SwPosition& rNewPos,
+ const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False );
+
+ // GliederungsRegeln erfragen / setzen
+ // --> OD 2005-11-02 #i51089 - TUNING#
+ inline SwNumRule* GetOutlineNumRule() const
+ {
+ return pOutlineRule;
+ }
+ // <--
+ void SetOutlineNumRule( const SwNumRule& rRule );
+ void PropagateOutlineRule();
+
+ // Gliederung - hoch-/runterstufen
+ sal_Bool OutlineUpDown( const SwPaM& rPam, short nOffset = 1 );
+ // Gliederung - hoch-/runtermoven
+ sal_Bool MoveOutlinePara( const SwPaM& rPam, short nOffset = 1);
+ // zu diesem Gliederungspunkt
+ sal_Bool GotoOutline( SwPosition& rPos, const String& rName ) const;
+ // die Aenderungen an den Gliederungsvorlagen in die OutlineRule uebernehmen
+
+ // setzt, wenn noch keine Numerierung, sonst wird geaendert
+ // arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
+ // --> OD 2005-02-18 #i42921# - re-use unused 3rd parameter
+ // --> OD 2008-02-08 #newlistlevelattrs#
+ // Add optional parameter <bResetIndentAttrs> - default value FALSE.
+ // If <bResetIndentAttrs> equals true, the indent attributes "before text"
+ // and "first line indent" are additionally reset at the provided PaM, if
+ // the list style makes use of the new list level attributes.
+ // --> OD 2008-03-17 #refactorlists#
+ // introduce parameters <bCreateNewList> and <sContinuedListId>
+ // <bCreateNewList> indicates, if a new list is created by applying the
+ // given list style.
+ void SetNumRule( const SwPaM&,
+ const SwNumRule&,
+ const bool bCreateNewList,
+ const String sContinuedListId = String(),
+ sal_Bool bSetItem = sal_True,
+ const bool bResetIndentAttrs = false );
+ // <--
+ void SetCounted( const SwPaM&, bool bCounted);
+
+ // --> OD 2009-08-25 #i86492#
+ // no longer needed.
+ // SwDoc::SetNumRule( rPaM, rNumRule, false, <ListId>, sal_True, true ) have to be used instead.
+// /**
+// Replace numbering rules in a PaM by another numbering rule.
+
+// \param rPaM PaM to replace the numbering rules in
+// \param rNumRule numbering rule to replace the present numbering rules
+// */
+// void ReplaceNumRule(const SwPaM & rPaM, const SwNumRule & rNumRule);
+
+ void MakeUniqueNumRules(const SwPaM & rPaM);
+
+ void SetNumRuleStart( const SwPosition& rPos, sal_Bool bFlag = sal_True );
+ void SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt );
+
+ SwNumRule* GetCurrNumRule( const SwPosition& rPos ) const;
+
+ const SwNumRuleTbl& GetNumRuleTbl() const { return *pNumRuleTbl; }
+
+ // #i36749#
+ /**
+ Add numbering rule to document.
+
+ @param pRule rule to add
+ */
+ void AddNumRule(SwNumRule * pRule);
+
+ // --> OD 2008-02-11 #newlistlevelattrs#
+ // add optional parameter <eDefaultNumberFormatPositionAndSpaceMode>
+ sal_uInt16 MakeNumRule( const String &rName,
+ const SwNumRule* pCpy = 0,
+ BOOL bBroadcast = FALSE,
+ const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode =
+ SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
+ // <--
+ sal_uInt16 FindNumRule( const String& rName ) const;
+ SwNumRule* FindNumRulePtr( const String& rName ) const;
+
+ // loeschen geht nur, wenn die ::com::sun::star::chaos::Rule niemand benutzt!
+ // #106897#
+ sal_Bool RenameNumRule(const String & aOldName, const String & aNewName,
+ BOOL bBroadcast = FALSE);
+ sal_Bool DelNumRule( const String& rName, BOOL bBroadCast = FALSE );
+ String GetUniqueNumRuleName( const String* pChkStr = 0, sal_Bool bAutoNum = sal_True ) const;
+
+ void UpdateNumRule(); // alle invaliden Updaten
+ // #106897#
+ void ChgNumRuleFmts( const SwNumRule& rRule, const String * pOldName = 0 );
+ sal_Bool ReplaceNumRule( const SwPosition& rPos, const String& rOldRule,
+ const String& rNewRule );
+
+ // zum naechsten/vorhergehenden Punkt auf gleicher Ebene
+ sal_Bool GotoNextNum( SwPosition&, sal_Bool bOverUpper = sal_True,
+ sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 );
+ sal_Bool GotoPrevNum( SwPosition&, sal_Bool bOverUpper = sal_True,
+ sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 );
+
+ // #i23731#
+ /** Searches for a text node with a numbering rule.
+
+ OD 2005-10-24 #i55391# - add optional parameter <bInvestigateStartNode>
+ OD 2008-03-18 #refactorlists# - add output parameter <sListId>
+
+ \param rPos position to start search
+ \param bForward - TRUE: search forward
+ - FALSE: search backward
+ \param bNum - TRUE: search for enumeration
+ - FALSE: search for itemize
+ \param bOutline - TRUE: search for outline numbering rule
+ - FALSE: search for non-outline numbering rule
+ \param nNonEmptyAllowed number of non-empty paragraphs allowed between
+ rPos and found paragraph
+
+ @param sListId
+ output parameter - in case a list style is found, <sListId> holds the
+ list id, to which the text node belongs, which applies the found list style.
+
+ @param bInvestigateStartNode
+ input parameter - boolean, indicating, if start node, determined by given
+ start position has to be investigated or not.
+ */
+ const SwNumRule * SearchNumRule(const SwPosition & rPos,
+ const bool bForward,
+ const bool bNum,
+ const bool bOutline,
+ int nNonEmptyAllowed,
+ String& sListId,
+ const bool bInvestigateStartNode = false );
+
+ // Absaetze ohne Numerierung, aber mit Einzuegen
+ sal_Bool NoNum( const SwPaM& );
+ // Loeschen, Splitten der Aufzaehlungsliste
+ void DelNumRules( const SwPaM& );
+
+ // Invalidates all numrules
+ void InvalidateNumRules();
+
+ // Hoch-/Runterstufen
+ sal_Bool NumUpDown( const SwPaM&, sal_Bool bDown = sal_True );
+ // Bewegt selektierte Absaetze (nicht nur Numerierungen)
+ // entsprechend des Offsets. (negativ: zum Doc-Anf.)
+ sal_Bool MoveParagraph( const SwPaM&, long nOffset = 1, sal_Bool bIsOutlMv = sal_False );
+ // No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
+ sal_Bool NumOrNoNum( const SwNodeIndex& rIdx, sal_Bool bDel = sal_False);
+ // Animation der Grafiken stoppen
+ void StopNumRuleAnimations( OutputDevice* );
+
+ // fuege eine neue Tabelle auf der Position rPos ein. (es
+ // wird vor dem Node eingefuegt !!)
+ //JP 28.10.96:
+ // fuer AutoFormat bei der Eingabe: dann muessen die Spalten
+ // auf die vordefinierten Breite gesetzt werden. Im Array stehen die
+ // Positionen der Spalten!! (nicht deren Breite!)
+ /* #109161# new parameter bCalledFromShell:
+
+ TRUE: called from shell -> propagate existing adjust item at
+ rPos to every new cell. A existing adjust item in the table
+ heading or table contents paragraph style prevent that
+ propagation.
+
+ FALSE: do not propagate
+ */
+ const SwTable* InsertTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER
+ const SwPosition& rPos, sal_uInt16 nRows,
+ sal_uInt16 nCols, short eAdjust,
+ const SwTableAutoFmt* pTAFmt = 0,
+ const SvUShorts* pColArr = 0,
+ BOOL bCalledFromShell = FALSE,
+ BOOL bNewModel = TRUE );
+
+ // steht der Index in einer Tabelle, dann returne den TableNode sonst 0
+ SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx );
+ inline const SwTableNode* IsIdxInTbl( const SwNodeIndex& rIdx ) const;
+
+ // erzeuge aus dem makierten Bereich eine ausgeglichene Tabelle
+ const SwTable* TextToTable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER,
+ const SwPaM& rRange, sal_Unicode cCh,
+ short eAdjust,
+ const SwTableAutoFmt* = 0 );
+ // text to table conversion - API support
+ const SwTable* TextToTable( const std::vector< std::vector<SwNodeRange> >& rTableNodes );
+ // erzeuge aus der Tabelle wieder normalen Text
+ sal_Bool TableToText( const SwTableNode* pTblNd, sal_Unicode cCh );
+ // einfuegen von Spalten/Zeilen in der Tabelle
+ sal_Bool InsertCol( const SwCursor& rCursor,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool InsertCol( const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool InsertRow( const SwCursor& rCursor,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ sal_Bool InsertRow( const SwSelBoxes& rBoxes,
+ sal_uInt16 nCnt = 1, sal_Bool bBehind = sal_True );
+ // loeschen von Spalten/Zeilen in der Tabelle
+ sal_Bool DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn = false );
+ sal_Bool DeleteRow( const SwCursor& rCursor );
+ sal_Bool DeleteCol( const SwCursor& rCursor );
+ // teilen / zusammenfassen von Boxen in der Tabelle
+ sal_Bool SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert = sal_True,
+ sal_uInt16 nCnt = 1, sal_Bool bSameHeight = sal_False );
+ // returnt den enum TableMergeErr
+ sal_uInt16 MergeTbl( SwPaM& rPam );
+ String GetUniqueTblName() const;
+ sal_Bool IsInsTblFormatNum() const;
+ sal_Bool IsInsTblChangeNumFormat() const;
+ sal_Bool IsInsTblAlignNum() const;
+
+ // aus der FEShell wg.. Undo und bModified
+ void GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
+ const SwCellFrm* pBoxFrm = 0 ) const;
+ void SetTabCols( const SwTabCols &rNew, sal_Bool bCurRowOnly,
+ const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = 0 );
+ void GetTabRows( SwTabCols &rFill, const SwCursor* pCrsr,
+ const SwCellFrm* pBoxFrm = 0 ) const;
+ void SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const SwCursor* pCrsr,
+ const SwCellFrm* pBoxFrm = 0 );
+
+
+ // Direktzugriff fuer Uno
+ void SetTabCols(SwTable& rTab, const SwTabCols &rNew, const SwTabCols &rOld,
+ const SwTableBox *pStart, sal_Bool bCurRowOnly);
+
+ void SetRowsToRepeat( SwTable &rTable, USHORT nSet );
+
+ // AutoFormat fuer die Tabelle/TabellenSelection
+ sal_Bool SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew );
+ // Erfrage wie attributiert ist
+ sal_Bool GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet );
+ // setze das InsertDB als Tabelle Undo auf:
+ void AppendUndoForInsertFromDB( const SwPaM& rPam, BOOL bIsTable );
+ // setze die Spalten/Zeilen/ZTellen Breite/Hoehe
+ sal_Bool SetColRowWidthHeight( SwTableBox& rAktBox, sal_uInt16 eType,
+ SwTwips nAbsDiff, SwTwips nRelDiff );
+ SwTableBoxFmt* MakeTableBoxFmt();
+ SwTableLineFmt* MakeTableLineFmt();
+ // teste ob die Box ein numerischen Wert darstellt und aender dann ggfs.
+ // das Format der Box
+ void ChkBoxNumFmt( SwTableBox& rAktBox, sal_Bool bCallUpdate );
+ void SetTblBoxFormulaAttrs( SwTableBox& rBox, const SfxItemSet& rSet );
+ void ClearBoxNumAttrs( const SwNodeIndex& rNode );
+
+ sal_Bool InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
+ const SwTable* pCpyTbl = 0, sal_Bool bCpyName = sal_False,
+ sal_Bool bCorrPos = sal_False );
+
+ sal_Bool UnProtectCells( const String& rTblName );
+ sal_Bool UnProtectCells( const SwSelBoxes& rBoxes );
+ sal_Bool UnProtectTbls( const SwPaM& rPam );
+ sal_Bool HasTblAnyProtection( const SwPosition* pPos,
+ const String* pTblName = 0,
+ sal_Bool* pFullTblProtection = 0 );
+
+ // Tabelle an der Position in der GrundLine aufsplitten, sprich eine
+ // neue Tabelle erzeugen.
+ sal_Bool SplitTable( const SwPosition& rPos, sal_uInt16 eMode = 0,
+ sal_Bool bCalcNewSize = sal_False );
+ // und die Umkehrung davon. rPos muss in der Tabelle stehen, die bestehen
+ // bleibt. Das Flag besagt ob die aktuelle mit der davor oder dahinter
+ // stehenden vereint wird.
+ sal_Bool MergeTable( const SwPosition& rPos, sal_Bool bWithPrev = sal_True,
+ sal_uInt16 nMode = 0 );
+
+ // Charts der angegebenen Tabelle zum Update bewegen
+ void UpdateCharts( const String &rName ) const;
+ // update all charts, for that exists any table
+ void UpdateAllCharts() { DoUpdateAllCharts( 0 ); }
+ // Tabelle wird umbenannt und aktualisiert die Charts
+ void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
+
+ // returne zum Namen die im Doc gesetzte Referenz
+ const SwFmtRefMark* GetRefMark( const String& rName ) const;
+ // returne die RefMark per Index - fuer Uno
+ const SwFmtRefMark* GetRefMark( sal_uInt16 nIndex ) const;
+ // returne die Namen aller im Doc gesetzten Referenzen.
+ // Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine RefMark
+ // gesetzt ist
+ sal_uInt16 GetRefMarks( SvStringsDtor* = 0 ) const;
+
+ //Einfuegen einer Beschriftung - falls ein FlyFormat erzeugt wird, so
+ // returne dieses.
+ SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
+ const String& rNumberingSeparator,
+ const sal_Bool bBefore, const sal_uInt16 nId, const ULONG nIdx,
+ const String& rCharacterStyle,
+ const sal_Bool bCpyBrd = sal_True );
+ SwFlyFrmFmt* InsertDrawLabel(
+ const String &rTxt, const String& rSeparator, const String& rNumberSeparator,
+ const sal_uInt16 nId, const String& rCharacterStyle, SdrObject& rObj );
+
+ // erfrage den Attribut Pool
+ const SwAttrPool& GetAttrPool() const { return *mpAttrPool; }
+ SwAttrPool& GetAttrPool() { return *mpAttrPool; }
+
+ // suche ueber das Layout eine EditShell und ggfs. eine ViewShell
+ SwEditShell* GetEditShell( ViewShell** ppSh = 0 ) const;
+
+ // OLE 2.0-Benachrichtung
+ inline void SetOle2Link(const Link& rLink) {aOle2Link = rLink;}
+ inline const Link& GetOle2Link() const {return aOle2Link;}
+
+ // insert section (the ODF kind of section, not the nodesarray kind)
+ SwSection * InsertSwSection(SwPaM const& rRange, SwSectionData &,
+ SwTOXBase const*const pTOXBase = 0,
+ SfxItemSet const*const pAttr = 0, bool const bUpdate = true);
+ sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange,
+ const SwNode** ppSttNd = 0 ) const;
+ SwSection* GetCurrSection( const SwPosition& rPos ) const;
+ SwSectionFmts& GetSections() { return *pSectionFmtTbl; }
+ const SwSectionFmts& GetSections() const { return *pSectionFmtTbl; }
+ SwSectionFmt *MakeSectionFmt( SwSectionFmt *pDerivedFrom );
+ void DelSectionFmt( SwSectionFmt *pFmt, sal_Bool bDelNodes = sal_False );
+ void UpdateSection(sal_uInt16 const nSect, SwSectionData &,
+ SfxItemSet const*const = 0, bool const bPreventLinkUpdate = false);
+ String GetUniqueSectionName( const String* pChkStr = 0 ) const;
+
+ /* @@@MAINTAINABILITY-HORROR@@@
+ The model should not have anything to do with a shell.
+ Unnecessary compile/link time dependency.
+ */
+ // Pointer auf die SfxDocShell vom Doc, kann 0 sein !!!
+ SwDocShell* GetDocShell() { return pDocShell; }
+ const SwDocShell* GetDocShell() const { return pDocShell; }
+ void SetDocShell( SwDocShell* pDSh );
+
+ // falls beim Kopieren von OLE-Nodes eine DocShell angelegt werden muss,
+ // dann MUSS der Ref-Pointer besetzt sein!!!!
+ SfxObjectShellRef* GetRefForDocShell() { return pDocShRef; }
+ void SetRefForDocShell( SfxObjectShellRef* p ) { pDocShRef = p; }
+
+ // fuer die TextBausteine - diese habe nur ein SvPersist zur
+ // Verfuegung
+ SfxObjectShell* GetPersist() const;
+
+ // Pointer auf den Storage des SfxDocShells, kann 0 sein !!!
+ ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetDocStorage();
+
+ // abfrage/setze Flag, ob das Dokument im asynchronen Laden ist
+ bool IsInLoadAsynchron() const { return mbInLoadAsynchron; }
+ void SetInLoadAsynchron( bool bFlag ) { mbInLoadAsynchron = bFlag; }
+
+ // erzeuge um das zu Servende Object eine Selektion
+ sal_Bool SelectServerObj( const String& rStr, SwPaM*& rpPam,
+ SwNodeRange*& rpRange ) const;
+
+ // fuer Drag&Move: ( z.B. RefMarks "verschieben" erlauben )
+ bool IsCopyIsMove() const { return mbCopyIsMove; }
+ void SetCopyIsMove( bool bFlag ) { mbCopyIsMove = bFlag; }
+
+ // fuers Draw-Undo: Aktionen auf Flys wollen wir selbst behandeln
+ bool IsNoDrawUndoObj() const { return mbNoDrawUndoObj; }
+ void SetNoDrawUndoObj( bool bFlag ) { mbNoDrawUndoObj = bFlag; }
+ SwDrawContact* GroupSelection( SdrView& );
+ void UnGroupSelection( SdrView& );
+ sal_Bool DeleteSelection( SwDrawView& );
+
+ // Invalidiert OnlineSpell-WrongListen
+ void SpellItAgainSam( sal_Bool bInvalid, sal_Bool bOnlyWrong, sal_Bool bSmartTags );
+ void InvalidateAutoCompleteFlag();
+
+ // <--
+ void SetCalcFieldValueHdl(Outliner* pOutliner);
+
+ // erfrage ob die ::com::sun::star::util::URL besucht war. Uebers Doc, falls nur ein ::com::sun::star::text::Bookmark
+ // angegeben ist. Dann muss der Doc. Name davor gesetzt werden!
+ sal_Bool IsVisitedURL( const String& rURL ) const;
+
+ // speicher die akt. Werte fuer die automatische Aufnahme von Ausnahmen
+ // in die Autokorrektur
+ void SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew );
+ SwAutoCorrExceptWord* GetAutoCorrExceptWord() { return pACEWord; }
+
+ const SwFmtINetFmt* FindINetAttr( const String& rName ) const;
+
+ // rufe ins dunkle Basic, mit evt. Return String
+ sal_Bool ExecMacro( const SvxMacro& rMacro, String* pRet = 0, SbxArray* pArgs = 0 );
+ // rufe ins dunkle Basic/JavaScript
+ sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
+ sal_Bool bChkPtr = sal_False, SbxArray* pArgs = 0,
+ const Link* pCallBack = 0 );
+
+ // linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
+ // Numerierungen), optional kann man "um" den Offset stufen oder "auf"
+ // die Position gestuft werden (bModulus = sal_True)
+ void MoveLeftMargin( const SwPaM& rPam, sal_Bool bRight = sal_True,
+ sal_Bool bModulus = sal_True );
+
+ // Numberformatter erfragen
+ inline SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True );
+ inline const SvNumberFormatter* GetNumberFormatter( sal_Bool bCreate = sal_True ) const;
+
+ // loesche den nicht sichtbaren ::com::sun::star::ucb::Content aus dem Document, wie z.B.:
+ // versteckte Bereiche, versteckte Absaetze
+ sal_Bool RemoveInvisibleContent();
+ //restore the invisible content if it's available on the undo stack
+ sal_Bool RestoreInvisibleContent();
+ // replace fields by text - mailmerge support
+ BOOL ConvertFieldsToText();
+
+ // erzeuge Anhand der vorgebenen Collection Teildokumente
+ // falls keine angegeben ist, nehme die Kapitelvorlage der 1. Ebene
+ sal_Bool GenerateGlobalDoc( const String& rPath,
+ const SwTxtFmtColl* pSplitColl = 0 );
+ sal_Bool GenerateGlobalDoc( const String& rPath, int nOutlineLevel = 0 ); //#outline level,add by zhaojianwei
+ sal_Bool GenerateHTMLDoc( const String& rPath,
+ const SwTxtFmtColl* pSplitColl = 0 );
+ sal_Bool GenerateHTMLDoc( const String& rPath, int nOutlineLevel = 0 ); //#outline level,add by zhaojianwei
+
+ // vergleiche zwei Dokument miteinander
+ long CompareDoc( const SwDoc& rDoc );
+ // merge zweier Dokumente
+ long MergeDoc( const SwDoc& rDoc );
+ // setze Kommentar-Text fuers Redline, das dann per AppendRedline
+ // hereinkommt. Wird vom Autoformat benutzt. 0-Pointer setzt den Modus
+ // wieder zurueck. Die SequenceNummer ist fuers UI-seitige zusammen-
+ // fassen von Redlines.
+ void SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo = 0 );
+
+ bool IsAutoFmtRedline() const { return mbIsAutoFmtRedline; }
+ void SetAutoFmtRedline( bool bFlag ) { mbIsAutoFmtRedline = bFlag; }
+
+ // fuer AutoFormat: mit Undo/Redlining - Behandlung
+ void SetTxtFmtCollByAutoFmt( const SwPosition& rPos, sal_uInt16 nPoolId,
+ const SfxItemSet* pSet = 0 );
+ void SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& );
+
+ // !!!NUR fuer die SW-Textblocks!! beachtet kein LAYOUT!!!
+ void ClearDoc(); // loescht den gesamten Inhalt.
+
+ // erfrage / setze die Daten fuer die PagePreView
+ const SwPagePreViewPrtData* GetPreViewPrtData() const { return pPgPViewPrtData; }
+ // wenn der Pointer == 0 ist, dann wird im Doc der Pointer zerstoert,
+ // ansonsten wird das Object kopiert.
+ // Der Pointer geht NICHT in den Besitz des Doc's!!
+ void SetPreViewPrtData( const SwPagePreViewPrtData* pData );
+
+ // update all modified OLE-Objects. The modification is called over the
+ // StarOne - Interface --> Bug 67026
+ void SetOLEObjModified()
+ { if( GetRootFrm() ) aOLEModifiedTimer.Start(); }
+
+ // -------------------- Uno - Schnittstellen ---------------------------
+ const SwUnoCrsrTbl& GetUnoCrsrTbl() const { return *pUnoCrsrTbl; }
+ SwUnoCrsr* CreateUnoCrsr( const SwPosition& rPos, sal_Bool bTblCrsr = sal_False );
+ // -------------------- Uno - Schnittstellen ---------------------------
+
+ // -------------------- FeShell - Schnittstellen -----------------------
+ // !!!!! diese gehen immer davon aus, das ein Layout existiert !!!!
+ sal_Bool ChgAnchor( const SdrMarkList& _rMrkList,
+ RndStdIds _eAnchorType,
+ const sal_Bool _bSameOnly,
+ const sal_Bool _bPosCorr );
+
+ void SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew );
+ void GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const;
+ void SetRowSplit( const SwCursor& rCursor, const SwFmtRowSplit &rNew );
+ void GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) const;
+ sal_Bool BalanceRowHeight( const SwCursor& rCursor, sal_Bool bTstOnly = sal_True );
+ void SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew );
+ sal_Bool GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const;
+ void SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet );
+ void SetTabLineStyle( const SwCursor& rCursor,
+ const Color* pColor, sal_Bool bSetLine,
+ const SvxBorderLine* pBorderLine );
+ void GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const;
+ void SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew );
+ sal_Bool GetBoxAttr( const SwCursor& rCursor, SfxPoolItem &rToFill ) const;
+ void SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign );
+ sal_uInt16 GetBoxAlign( const SwCursor& rCursor ) const;
+ void AdjustCellWidth( const SwCursor& rCursor, sal_Bool bBalance = sal_False );
+
+ int Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest );
+ int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest );
+ void Unchain( SwFrmFmt &rFmt );
+
+ // fuers Copy/Move aus der FrmShell
+ SdrObject* CloneSdrObj( const SdrObject&, sal_Bool bMoveWithinDoc = sal_False,
+ sal_Bool bInsInPage = sal_True );
+
+ //
+ // -------------------- FeShell - Schnittstellen Ende ------------------
+
+
+ // Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe
+ // von japanischen/chinesischen Zeichen)
+ SwExtTextInput* CreateExtTextInput( const SwPaM& rPam );
+ void DeleteExtTextInput( SwExtTextInput* pDel );
+ SwExtTextInput* GetExtTextInput( const SwNode& rNd,
+ xub_StrLen nCntntPos = STRING_NOTFOUND) const;
+ SwExtTextInput* GetExtTextInput() const;
+
+ // Schnistelle fuer den Zugriff auf die AutoComplete-Liste
+ static SwAutoCompleteWord& GetAutoCompleteWords() { return *pACmpltWords; }
+
+ bool ContainsMSVBasic() const { return mbContains_MSVBasic; }
+ void SetContainsMSVBasic( bool bFlag ) { mbContains_MSVBasic = bFlag; }
+
+ // Interface for the list of Ruby - texts/attributes
+ USHORT FillRubyList( const SwPaM& rPam, SwRubyList& rList,
+ USHORT nMode );
+ USHORT SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
+ USHORT nMode );
+
+ void ReadLayoutCache( SvStream& rStream );
+ void WriteLayoutCache( SvStream& rStream );
+ SwLayoutCache* GetLayoutCache() const { return pLayoutCache; }
+
+ /** Checks if any of the text node contains hidden characters.
+ Used for optimization. Changing the view option 'view hidden text'
+ has to trigger a reformatting only if some of the text is hidden.
+ */
+ bool ContainsHiddenChars() const;
+
+ // call back for API wrapper
+ SwModify* GetUnoCallBack() const;
+
+ IGrammarContact* getGrammarContact() const { return mpGrammarContact; }
+
+ // -> #i27615#
+ /** Marks/Unmarks a list level of a certain list
+
+ OD 2008-04-02 #refactorlists#
+ levels of a certain lists are marked now
+
+ @param sListId list Id of the list whose level has to be marked/unmarked
+ @param nListLevel level to mark
+ @param bValue - TRUE mark the level
+ - FALSE unmark the level
+ */
+ void MarkListLevel( const String& sListId,
+ const int nListLevel,
+ const BOOL bValue );
+
+ /** Marks/Unmarks a list level of a certain list
+
+ OD 2008-04-02 #refactorlists#
+ levels of a certain lists are marked now
+
+ @param rList list whose level has to be marked/unmarked
+ @param nListLevel level to mark
+ @param bValue - TRUE mark the level
+ - FALSE unmark the level
+ */
+ void MarkListLevel( SwList& rList,
+ const int nListLevel,
+ const BOOL bValue );
+ // <- #i27615#
+
+ // Change a format undoable.
+ void ChgFmt(SwFmt & rFmt, const SfxItemSet & rSet);
+
+ void RenameFmt(SwFmt & rFmt, const String & sNewName,
+ BOOL bBroadcast = FALSE);
+
+ // Change a TOX undoable.
+ void ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew);
+
+ // #111827#
+ /**
+ Returns a textual description of a PaM.
+
+ @param rPaM the PaM to describe
+
+ If rPaM only spans one paragraph the result is:
+
+ '<text in the PaM>'
+
+ <text in the PaM> is shortened to nUndoStringLength characters.
+
+ If rPaM spans more than one paragraph the result is:
+
+ paragraphs (STR_PARAGRAPHS)
+
+ @return the textual description of rPaM
+ */
+ String GetPaMDescr(const SwPaM & rPaM) const;
+
+ // -> #i23726#
+ BOOL IsFirstOfNumRule(SwPosition & rPos);
+ // <- #i23726#
+
+ // --> #i31958# access methods for XForms model(s)
+
+ /// access container for XForms model; will be NULL if !isXForms()
+ com::sun::star::uno::Reference<com::sun::star::container::XNameContainer>
+ getXForms() const;
+
+ com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > GetGCIterator() const;
+
+ /// is this an XForms document?
+ bool isXForms() const;
+
+ /// initialize XForms models; turn this into an XForms document
+ void initXForms( bool bCreateDefaultModel );
+ // <-- #i31958# access methods for XForms model(s)
+
+ // --> OD 2006-03-21 #b6375613#
+ inline bool ApplyWorkaroundForB6375613() const
+ {
+ return mbApplyWorkaroundForB6375613;
+ }
+ void SetApplyWorkaroundForB6375613( bool p_bApplyWorkaroundForB6375613 );
+ // <--
+
+ //Update all the page masters
+ void SetDefaultPageMode(bool bSquaredPageMode);
+ sal_Bool IsSquaredPageMode() const;
+
+ // i#78591#
+ void Setn32DummyCompatabilityOptions1( sal_uInt32 CompatabilityOptions1 )
+ {
+ n32DummyCompatabilityOptions1 = CompatabilityOptions1;
+ }
+ sal_uInt32 Getn32DummyCompatabilityOptions1( )
+ {
+ return n32DummyCompatabilityOptions1;
+ }
+ void Setn32DummyCompatabilityOptions2( sal_uInt32 CompatabilityOptions2 )
+ {
+ n32DummyCompatabilityOptions2 = CompatabilityOptions2;
+ }
+ sal_uInt32 Getn32DummyCompatabilityOptions2( )
+ {
+ return n32DummyCompatabilityOptions2;
+ }
+
+ ::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
+ ::sw::MetaFieldManager & GetMetaFieldManager();
+ SfxObjectShell* CreateCopy(bool bCallInitNew) const;
+};
+
+
+// Diese Methode wird im Dtor vom SwDoc gerufen und loescht den Cache
+// der Konturobjekte
+void ClrContourCache();
+
+
+//------------------ inline impl. ---------------------------------
+
+inline const SwTableNode* SwDoc::IsIdxInTbl( const SwNodeIndex& rIdx ) const
+{
+ return ((SwDoc*)this)->IsIdxInTbl( rIdx );
+}
+
+inline SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate )
+{
+ if( bCreate && !pNumberFormatter )
+ _CreateNumberFormatter();
+ return pNumberFormatter;
+}
+
+inline const SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate ) const
+{
+ return ((SwDoc*)this)->GetNumberFormatter( bCreate );
+}
+
+inline void SwDoc::SetOLEPrtNotifyPending( bool bSet )
+{
+ mbOLEPrtNotifyPending = bSet;
+ if( !bSet )
+ mbAllOLENotify = sal_False;
+}
+
+// --> OD 2006-03-14 #i62875#
+// namespace <docfunc> for functions and procedures working on a Writer document.
+namespace docfunc
+{
+ /** method to check, if given Writer document contains at least one drawing object
+
+ OD 2006-03-17 #i62875#
+
+ @author OD
+
+ @param p_rDoc
+ input parameter - reference to the Writer document, which is investigated.
+ */
+ bool ExistsDrawObjs( SwDoc& p_rDoc );
+
+ /** method to check, if given Writer document contains only drawing objects,
+ which are completely on its page.
+
+ OD 2006-03-17 #i62875#
+
+ @author OD
+
+ @param p_rDoc
+ input parameter - reference to the Writer document, which is investigated.
+ */
+ bool AllDrawObjsOnPage( SwDoc& p_rDoc );
+
+ /** method to check, if the outline style has to written as a normal list style
+
+ OD 2006-09-27 #i69627#
+ The outline style has to written as a normal list style, if a parent
+ paragraph style of one of the paragraph styles, which are assigned to
+ the list levels of the outline style, has a list style set or inherits
+ a list style from its parent paragraphs style.
+ This information is needed for the OpenDocument file format export.
+
+ @author OD
+
+ @param rDoc
+ input parameter - reference to the text document, which is investigated.
+
+ @return boolean
+ indicating, if the outline style has to written as a normal list style
+ */
+ bool HasOutlineStyleToBeWrittenAsNormalListStyle( SwDoc& rDoc );
+}
+// <--
+#endif //_DOC_HXX
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
new file mode 100644
index 000000000000..2b5ad3fd5203
--- /dev/null
+++ b/sw/inc/docary.hxx
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DOCARY_HXX
+#define _DOCARY_HXX
+
+#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
+
+class SwFieldType;
+class SwFrmFmt;
+class SwCharFmt;
+class SwTOXType;
+class SwUndo;
+class SwSectionFmt;
+class SwNumRule;
+class SwRedline;
+class SwUnoCrsr;
+class SwOLENode;
+
+namespace com { namespace sun { namespace star { namespace i18n {
+ struct ForbiddenCharacters; // comes from the I18N UNO interface
+}}}}
+
+#ifndef _TABLE_HXX //autogen
+#include <tools/table.hxx>
+#endif
+#include <swtypes.hxx>
+#include <svl/svarray.hxx>
+
+typedef SwFieldType* SwFldTypePtr;
+#define GROW_FLDTYPES 16
+
+//PageDescriptor-Schnittstelle
+//typedef SwPageDesc * SwPageDescPtr;
+//SV_DECL_PTRARR_DEL(SwPageDescs, SwPageDescPtr,1,1);
+
+typedef SwFrmFmt* SwFrmFmtPtr;
+SV_DECL_PTRARR_DEL(SwFrmFmts,SwFrmFmtPtr,4,4)
+
+//Spezifische Frameformate (Rahmen, DrawObjecte)
+SV_DECL_PTRARR_DEL(SwSpzFrmFmts,SwFrmFmtPtr,0,4)
+
+typedef SwCharFmt* SwCharFmtPtr;
+SV_DECL_PTRARR_DEL(SwCharFmts,SwCharFmtPtr,4,4)
+
+SV_DECL_PTRARR_DEL( SwFldTypes, SwFldTypePtr, INIT_FLDTYPES, GROW_FLDTYPES )
+
+typedef SwTOXType* SwTOXTypePtr;
+SV_DECL_PTRARR_DEL( SwTOXTypes, SwTOXTypePtr, 0, 1 )
+
+// Undo
+#define INIT_UNDOS 5
+#define GROW_UNDOS 5
+// Das Array der Undo-History
+typedef SwUndo* SwUndoPtr;
+SV_DECL_PTRARR_DEL( SwUndos, SwUndoPtr, INIT_UNDOS, GROW_UNDOS )
+
+typedef SwSectionFmt* SwSectionFmtPtr;
+SV_DECL_PTRARR_DEL(SwSectionFmts,SwSectionFmtPtr,0,4)
+
+
+typedef SwNumRule* SwNumRulePtr;
+SV_DECL_PTRARR_DEL_VISIBILITY( SwNumRuleTbl, SwNumRulePtr, 0, 5, SW_DLLPUBLIC )
+
+typedef SwRedline* SwRedlinePtr;
+SV_DECL_PTRARR_SORT_DEL( _SwRedlineTbl, SwRedlinePtr, 0, 16 )
+
+class SwRedlineTbl : private _SwRedlineTbl
+{
+public:
+ SwRedlineTbl( BYTE nSize = 0, BYTE nG = 16 )
+ : _SwRedlineTbl( nSize, nG ) {}
+ ~SwRedlineTbl() {}
+
+ BOOL SavePtrInArr( SwRedlinePtr p ) { return _SwRedlineTbl::Insert( p ); }
+
+ BOOL Insert( SwRedlinePtr& p, BOOL bIns = TRUE );
+ BOOL Insert( SwRedlinePtr& p, USHORT& rInsPos, BOOL bIns = TRUE );
+ BOOL InsertWithValidRanges( SwRedlinePtr& p, USHORT* pInsPos = 0 );
+
+ void Remove( USHORT nP, USHORT nL = 1 );
+ void DeleteAndDestroy( USHORT nP, USHORT nL=1 );
+
+ // suche den naechsten oder vorherigen Redline mit dergleichen Seq.No
+ // Mit dem Lookahead kann die Suche eingeschraenkt werden. 0 oder
+ // USHRT_MAX suchen im gesamten Array.
+ USHORT FindNextOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
+ USHORT FindPrevOfSeqNo( USHORT nSttPos, USHORT nLookahead = 20 ) const;
+ USHORT FindNextSeqNo( USHORT nSeqNo, USHORT nSttPos,
+ USHORT nLookahead = 20 ) const;
+ USHORT FindPrevSeqNo( USHORT nSeqNo, USHORT nSttPos,
+ USHORT nLookahead = 20 ) const;
+
+ using _SwRedlineTbl::Count;
+ using _SwRedlineTbl::operator[];
+ using _SwRedlineTbl::GetObject;
+ using _SwRedlineTbl::Seek_Entry;
+ using _SwRedlineTbl::GetPos;
+};
+
+typedef SwUnoCrsr* SwUnoCrsrPtr;
+SV_DECL_PTRARR_DEL( SwUnoCrsrTbl, SwUnoCrsrPtr, 0, 4 )
+
+typedef SwOLENode* SwOLENodePtr;
+SV_DECL_PTRARR(SwOLENodes,SwOLENodePtr,16,16)
+
+
+#endif //_DOCARY_HXX
+
diff --git a/sw/inc/docfac.hxx b/sw/inc/docfac.hxx
new file mode 100644
index 000000000000..697da8692b4d
--- /dev/null
+++ b/sw/inc/docfac.hxx
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DOCFAC_HXX
+#define _DOCFAC_HXX
+
+#include <tools/solar.h>
+
+class SwDoc;
+
+class SwDocFac
+{
+protected:
+ SwDoc* pDoc;
+
+public:
+ SwDocFac( SwDoc *pDoc = 0 );
+ ~SwDocFac();
+
+ // Das Dokument ist nach dem Aufruf von Read(..) angelegt
+ SwDoc* GetDoc();
+};
+
+#endif
+
diff --git a/sw/inc/dochdl.hrc b/sw/inc/dochdl.hrc
new file mode 100755
index 000000000000..47b0b8014240
--- /dev/null
+++ b/sw/inc/dochdl.hrc
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DOCHDL_HRC
+#define _DOCHDL_HRC
+
+#include "rcid.hrc"
+
+#define STR_NOGLOS (RC_DOCHDL_BEGIN + 1)
+#define MSG_ERR_INSERT_GLOS (RC_DOCHDL_BEGIN + 3)
+#define MSG_CLPBRD_FORMAT_ERROR (RC_DOCHDL_BEGIN + 4)
+#define MSG_UPDATE_NEW_GLOS_FMT (RC_DOCHDL_BEGIN + 5)
+
+#define DLG_SEL_GLOS (RC_DOCHDL_BEGIN + 6)
+#define STR_NO_TABLE (RC_DOCHDL_BEGIN + 7)
+
+#define STR_PRIVATETEXT (RC_DOCHDL_BEGIN + 8)
+#define STR_PRIVATEGRAPHIC (RC_DOCHDL_BEGIN + 9)
+#define STR_PRIVATEOLE (RC_DOCHDL_BEGIN + 10)
+#define STR_DDEFORMAT (RC_DOCHDL_BEGIN + 11)
+
+
+#define DOCHDL_ACT_END STR_DDEFORMAT
+
+#if DOCHDL_ACT_END > RC_DOCHDL_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif
+
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
new file mode 100644
index 000000000000..3dd338a5e129
--- /dev/null
+++ b/sw/inc/docsh.hxx
@@ -0,0 +1,320 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWDOCSH_HXX
+#define _SWDOCSH_HXX
+
+#include <rtl/ref.hxx>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/uno/Sequence.h>
+#include <vcl/timer.hxx>
+#include <sfx2/docfac.hxx>
+#include <sfx2/objsh.hxx>
+#include "swdllapi.h"
+#include <swdll.hxx>
+#include <shellid.hxx>
+
+#include <svl/lstner.hxx>
+#include <svtools/embedhlp.hxx>
+
+class SwDoc;
+class SfxDocumentInfoDialog;
+class SfxStyleSheetBasePool;
+class SfxInPlaceClient;
+class FontList;
+class SwView;
+class SwWrtShell;
+class SwFEShell;
+class Reader;
+class SwReader;
+class SwCrsrShell;
+class SwSrcView;
+class SwPaM;
+class SwgReaderOption;
+class SwOLEObj;
+class IDocumentDeviceAccess;
+class IDocumentSettingAccess;
+class IDocumentTimerAccess;
+class IDocumentChartDataProviderAccess;
+
+
+class SW_DLLPUBLIC SwDocShell: public SfxObjectShell, public SfxListener
+{
+ SwDoc* pDoc; // Document
+ rtl::Reference< SfxStyleSheetBasePool > mxBasePool; // Durchreiche fuer Formate
+ FontList* pFontList; // aktuelle FontListe
+
+ // Nix geht ohne die WrtShell (historische Gruende)
+ // RuekwaertsPointer auf die View (historische Gruende)
+ // Dieser gilt solange bis im Activate ein neuer gesetzt wird
+ // oder dieser im Dtor der View geloescht wird
+ //
+ SwView* pView;
+ SwWrtShell* pWrtShell;
+
+ Timer aFinishedTimer; // Timer fuers ueberpriefen der
+ // Grafik-Links. Sind alle da,
+ // dann ist Doc voll. geladen
+
+ //SvPersistRef xOLEChildList; // fuers RemoveOLEObjects
+ comphelper::EmbeddedObjectContainer* pOLEChildList;
+ sal_Int16 nUpdateDocMode; // contains the com::sun::star::document::UpdateDocMode
+ bool bInUpdateFontList; //prevent nested calls of UpdateFontList
+ // Methoden fuer den Zugriff aufs Doc
+ SW_DLLPRIVATE void AddLink();
+ SW_DLLPRIVATE void RemoveLink();
+
+ // Hint abfangen fuer DocInfo
+ SW_DLLPRIVATE virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ // FileIO
+ SW_DLLPRIVATE virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+ SW_DLLPRIVATE virtual sal_Bool Load( SfxMedium& rMedium );
+ SW_DLLPRIVATE virtual sal_Bool LoadFrom( SfxMedium& rMedium );
+ SW_DLLPRIVATE virtual sal_Bool ConvertFrom( SfxMedium &rMedium );
+ SW_DLLPRIVATE virtual sal_Bool ConvertTo( SfxMedium &rMedium );
+ SW_DLLPRIVATE virtual sal_Bool SaveAs( SfxMedium& rMedium );
+ SW_DLLPRIVATE virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+
+ SW_DLLPRIVATE virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+
+ // DocInfo dem Doc melden
+ //
+ SW_DLLPRIVATE virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog(
+ Window *pParent, const SfxItemSet &);
+ // OLE-Geraffel
+ SW_DLLPRIVATE virtual void Draw( OutputDevice*, const JobSetup&, USHORT);
+
+ // Methoden fuer StyleSheets
+ SW_DLLPRIVATE USHORT Edit( const String &rName, const String& rParent, USHORT nFamily,
+ USHORT nMask, BOOL bNew,
+ BOOL bColumn = FALSE,
+ SwWrtShell* pActShell = 0,
+ BOOL bBasic = FALSE );
+ SW_DLLPRIVATE USHORT Delete(const String &rName, USHORT nFamily);
+ SW_DLLPRIVATE USHORT ApplyStyles(const String &rName, USHORT nFamily, SwWrtShell* pShell = 0,
+ USHORT nMode = 0 );
+ SW_DLLPRIVATE USHORT DoWaterCan( const String &rName, USHORT nFamily);
+ SW_DLLPRIVATE USHORT UpdateStyle(const String &rName, USHORT nFamily, SwWrtShell* pShell = 0);
+ SW_DLLPRIVATE USHORT MakeByExample(const String &rName,
+ USHORT nFamily, USHORT nMask, SwWrtShell* pShell = 0);
+
+ SW_DLLPRIVATE void InitDraw();
+ SW_DLLPRIVATE void SubInitNew(); // fuer InitNew und HtmlSourceModus
+
+ SW_DLLPRIVATE void RemoveOLEObjects();
+ SW_DLLPRIVATE void CalcLayoutForOLEObjects();
+
+ SW_DLLPRIVATE void Init_Impl();
+ SW_DLLPRIVATE DECL_STATIC_LINK( SwDocShell, IsLoadFinished, void* );
+
+
+ using SfxObjectShell::GetVisArea;
+ using SfxObjectShell::GetStyleFamilyBitmap;
+
+protected:
+ /// override to update text fields
+ virtual void DoFlushDocInfo();
+
+public:
+ using SotObject::GetInterface;
+
+ // aber selbst implementieren
+ SFX_DECL_INTERFACE(SW_DOCSHELL)
+ SFX_DECL_OBJECTFACTORY()
+ TYPEINFO();
+
+ static SfxInterface *_GetInterface() { return GetStaticInterface(); }
+
+ static rtl::OUString GetEventName( sal_Int32 nId );
+
+ //Das Doc wird fuer SO-Datenaustausch benoetigt!
+ SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED );
+ SwDocShell( const sal_uInt64 i_nSfxCreationFlags );
+ SwDocShell( SwDoc *pDoc, SfxObjectCreateMode eMode = SFX_CREATE_MODE_STANDARD );
+ ~SwDocShell();
+
+ // OLE 2.0-Benachrichtigung
+ DECL_LINK( Ole2ModifiedHdl, void * );
+
+ // OLE-Geraffel
+ virtual void SetVisArea( const Rectangle &rRect );
+ virtual Rectangle GetVisArea( USHORT nAspect ) const;
+ virtual Printer *GetDocumentPrinter();
+ virtual OutputDevice* GetDocumentRefDev();
+ virtual void OnDocumentPrinterChanged( Printer * pNewPrinter );
+ virtual ULONG GetMiscStatus() const;
+
+ virtual void PrepareReload();
+ virtual void SetModified( BOOL = TRUE );
+
+ // Dispatcher
+ void Execute(SfxRequest &);
+ void ExecStyleSheet(SfxRequest&);
+ void ExecDB(SfxRequest&);
+
+ void GetState(SfxItemSet &);
+ void StateAlways(SfxItemSet &);
+ void StateStyleSheet(SfxItemSet&, SwWrtShell* pSh = 0 );
+
+ // Doc rausreichen aber VORSICHT
+ inline SwDoc* GetDoc() { return pDoc; }
+ inline const SwDoc* GetDoc() const { return pDoc; }
+ IDocumentDeviceAccess* getIDocumentDeviceAccess();
+ const IDocumentSettingAccess* getIDocumentSettingAccess() const;
+ IDocumentChartDataProviderAccess* getIDocumentChartDataProviderAccess();
+
+
+ void UpdateFontList();
+ void UpdateChildWindows();
+
+ // globaler IO
+ virtual BOOL Save();
+
+ // fuer VorlagenPI
+ virtual SfxStyleSheetBasePool* GetStyleSheetPool();
+
+ // Fuer Organizer
+ virtual BOOL Insert(SfxObjectShell &rSource,
+ USHORT nSourceIdx1,
+ USHORT nSourceIdx2,
+ USHORT nSourceIdx3,
+ USHORT& nIdx1,
+ USHORT& nIdx2,
+ USHORT& nIdx3,
+ USHORT& nRemovedIdx);
+
+ virtual BOOL Remove(USHORT nIdx1,
+ USHORT nIdx2 = INDEX_IGNORE,
+ USHORT nIdx3 = INDEX_IGNORE);
+
+ virtual Bitmap GetStyleFamilyBitmap( SfxStyleFamily eFamily, BmpColorMode eColorMode );
+
+ // View setzen fuer Aktionen ueber Shell
+ void SetView(SwView* pVw);
+ const SwView *GetView() const { return pView; }
+ SwView *GetView() { return pView; }
+
+ // Zugriff auf die zur SwView gehoerige SwWrtShell
+ SwWrtShell *GetWrtShell() { return pWrtShell; }
+ const SwWrtShell *GetWrtShell() const { return pWrtShell; }
+
+ // fuer die Core - die kennt die DocShell aber keine WrtShell!
+ SwFEShell *GetFEShell();
+ const SwFEShell *GetFEShell() const
+ { return ((SwDocShell*)this)->GetFEShell(); }
+
+
+ // Fuer Einfuegen Dokument
+ Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
+ SwCrsrShell* pCrsrSh = 0, SwPaM* pPaM = 0);
+
+ virtual long DdeGetData( const String& rItem, const String& rMimeType,
+ ::com::sun::star::uno::Any & rValue );
+ virtual long DdeSetData( const String& rItem, const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue );
+ virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const String& rItem );
+ virtual void FillClass( SvGlobalName * pClassName,
+ sal_uInt32 * pClipFormat,
+ String * pAppName,
+ String * pLongUserName,
+ String * pUserName,
+ sal_Int32 nFileFormat,
+ sal_Bool bTemplate = sal_False ) const;
+
+ virtual void LoadStyles( SfxObjectShell& rSource );
+
+ void _LoadStyles( SfxObjectShell& rSource, BOOL bPreserveCurrentDocument );
+
+ // Seitenvorlagedialog anzeigen, ggf. auf Spaltenpage
+ void FormatPage( const String& rPage,
+ BOOL bColumn = FALSE,
+ SwWrtShell* pActShell = 0 );
+
+ // --> OD 2006-11-07 #i59688#
+ // linked graphics are now loaded on demand.
+ // Thus, loading of linked graphics no longer needed and necessary for
+ // the load of document being finished.
+// // Timer starten fuers ueberpruefen der Grafik-Links. Sind alle
+// // vollstaendig geladen, dann ist das Doc fertig
+// void StartLoadFinishedTimer();
+ void LoadingFinished();
+ // <--
+
+ // eine Uebertragung wird abgebrochen (wird aus dem SFX gerufen)
+ virtual void CancelTransfers();
+
+ // Doc aus Html-Source neu laden
+ void ReloadFromHtml( const String& rStreamName, SwSrcView* pSrcView );
+
+ sal_Int16 GetUpdateDocMode() const {return nUpdateDocMode;}
+
+ //Activate wait cursor for all windows of this document
+ //Optionally all dispatcher could be Locked
+ //Usually locking should be done using the class: SwWaitObject!
+ void EnterWait( BOOL bLockDispatcher );
+ void LeaveWait( BOOL bLockDispatcher );
+
+ void ToggleBrowserMode(BOOL bOn, SwView* pView = 0);
+
+ ULONG LoadStylesFromFile( const String& rURL, SwgReaderOption& rOpt,
+ BOOL bUnoCall );
+ void InvalidateModel();
+ void ReactivateModel();
+
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > GetEventNames();
+
+ // --> FME 2004-08-05 #i20883# Digital Signatures and Encryption
+ virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates );
+ // <--
+
+ // --> FME 2005-02-25 #i42634# Overwrites SfxObjectShell::UpdateLinks
+ // This new function is necessary to trigger update of links in docs
+ // read by the binary filter:
+ virtual void UpdateLinks();
+ // <--
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
+ GetController();
+
+ SfxInPlaceClient* GetIPClient( const ::svt::EmbeddedObjectRef& xObjRef );
+
+ virtual const ::sfx2::IXmlIdRegistry* GetXmlIdRegistry() const;
+
+ // passwword protection for Writer (derived from SfxObjectShell)
+ // see also: FN_REDLINE_ON, FN_REDLINE_ON
+ virtual bool IsChangeRecording() const;
+ virtual bool HasChangeRecordProtection() const;
+ virtual void SetChangeRecording( bool bActivate );
+ virtual bool SetProtectionPassword( const String &rPassword );
+ virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash );
+};
+
+class Graphic;
+//implemented in source/ui/docvw/romenu.cxx
+String ExportGraphic( const Graphic &rGraphic, const String &rGrfName );
+
+#endif
diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx
new file mode 100644
index 000000000000..edcf4abad52a
--- /dev/null
+++ b/sw/inc/docstat.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DOCSTAT_HXX
+#define _DOCSTAT_HXX
+
+#include <tools/solar.h>
+#include "swdllapi.h"
+
+
+struct SW_DLLPUBLIC SwDocStat
+{
+ USHORT nTbl;
+ USHORT nGrf;
+ USHORT nOLE;
+ ULONG nPage;
+ /// paragraphs for document statistic: non-empty and non-hidden ones
+ ULONG nPara;
+ /// all paragraphs, including empty/hidden ones
+ ULONG nAllPara;
+ ULONG nWord;
+ ULONG nChar;
+ BOOL bModified;
+
+ SwDocStat();
+ void Reset();
+};
+
+#endif
diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx
new file mode 100644
index 000000000000..91c44278878d
--- /dev/null
+++ b/sw/inc/docstyle.hxx
@@ -0,0 +1,245 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DOCSTYLE_HXX
+#define _DOCSTYLE_HXX
+
+#include <rtl/ref.hxx>
+
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_STRINGSDTOR
+#include <svl/svstdarr.hxx>
+#endif
+#include <svl/style.hxx>
+#include <svl/itemset.hxx>
+#include "swdllapi.h"
+
+class SwDoc;
+class SwDocStyleSheetPool;
+class SwPageDesc;
+class SwCharFmt;
+class SwTxtFmtColl;
+class SwFrmFmt;
+class SwNumRule;
+
+/*--------------------------------------------------------------------
+ Beschreibung: Lokale Hilfsklasse
+ --------------------------------------------------------------------*/
+class SwPoolFmtList : public SvStringsDtor
+{
+public:
+ SwPoolFmtList() {}
+ void Append( char cChar, const String& rStr );
+ void Erase();
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: temp. StyleSheet
+ --------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwDocStyleSheet : public SfxStyleSheetBase
+{
+ friend class SwDocStyleSheetPool;
+ friend class SwStyleSheetIterator;
+
+ SwCharFmt* pCharFmt;
+ SwTxtFmtColl* pColl;
+ SwFrmFmt* pFrmFmt;
+ const SwPageDesc* pDesc;
+ const SwNumRule* pNumRule;
+
+ SwDoc& rDoc;
+ SfxItemSet aCoreSet;
+
+ BOOL bPhysical;
+
+
+ // leere Huelse zum richtigen StyleSheet (Core) machen
+ SW_DLLPRIVATE void Create();
+
+ // den StyleSheet mit Daten fuellen
+ enum FillStyleType {
+ FillOnlyName,
+ FillAllInfo,
+ FillPhysical
+ };
+
+ SW_DLLPRIVATE BOOL FillStyleSheet( FillStyleType eFType );
+
+protected:
+ virtual ~SwDocStyleSheet();
+
+public:
+ SwDocStyleSheet( SwDoc& rDoc,
+ const String& rName,
+ SwDocStyleSheetPool& rPool,
+ SfxStyleFamily eFam,
+ USHORT nMask);
+
+ SwDocStyleSheet( const SwDocStyleSheet& );
+
+ void Reset();
+
+ void SetMask(USHORT nMsk) { nMask = nMsk; }
+ void SetFamily(SfxStyleFamily eFam) { nFamily = eFam; }
+
+ BOOL IsPhysical() const { return bPhysical; }
+ void SetPhysical(BOOL bPhys);
+
+ // --> OD 2008-02-11 #newlistlevelattrs#
+ // add optional parameter <bResetIndentAttrsAtParagraphStyle>, default value FALSE,
+ // which indicates that the indent attributes at a paragraph style should
+ // be reset in case that a list style is applied to the paragraph style and
+ // no indent attributes are applied.
+ void SetItemSet( const SfxItemSet& rSet,
+ const bool bResetIndentAttrsAtParagraphStyle = false );
+ // <--
+
+ virtual SfxItemSet& GetItemSet();
+ // --> OD 2008-02-12 #newlistlevelattrs#
+ // new method for paragraph styles to merge indent attributes of applied list
+ // style into the given item set, if the list style indent attributes are applicable.
+ void MergeIndentAttrsOfListStyle( SfxItemSet& rSet );
+ // <--
+ virtual const String& GetParent() const;
+ virtual const String& GetFollow() const;
+
+ virtual ULONG GetHelpId( String& rFile );
+ virtual void SetHelpId( const String& r, ULONG nId );
+
+ // Vorbelegen der member ohne physikalischen Zugriff
+ // wird vom StyleSheetPool benutzt
+ //
+ void PresetName(const String& rName) { aName = rName; }
+ void PresetNameAndFamily(const String& rName);
+ void PresetParent(const String& rName){ aParent = rName; }
+ void PresetFollow(const String& rName){ aFollow = rName; }
+
+ virtual BOOL SetName( const String& rStr);
+ virtual BOOL SetParent( const String& rStr);
+ virtual BOOL SetFollow( const String& rStr);
+
+ virtual BOOL HasFollowSupport() const;
+ virtual BOOL HasParentSupport() const;
+ virtual BOOL HasClearParentSupport() const;
+ virtual String GetDescription();
+ virtual String GetDescription(SfxMapUnit eUnit);
+
+ SwCharFmt* GetCharFmt();
+ SwTxtFmtColl* GetCollection();
+ SwFrmFmt* GetFrmFmt();
+ const SwPageDesc* GetPageDesc();
+ const SwNumRule* GetNumRule();
+ void SetNumRule(const SwNumRule& rRule);
+
+ virtual BOOL IsUsed() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Iterator fuer den Pool
+ --------------------------------------------------------------------*/
+
+class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener
+{
+ rtl::Reference< SwDocStyleSheet > mxIterSheet;
+ rtl::Reference< SwDocStyleSheet > mxStyleSheet;
+ SwPoolFmtList aLst;
+ USHORT nLastPos;
+ BOOL bFirstCalled;
+
+ void AppendStyleList(const SvStringsDtor& rLst,
+ BOOL bUsed,
+ USHORT nSection,
+ char cType);
+
+public:
+ SwStyleSheetIterator( SwDocStyleSheetPool* pBase,
+ SfxStyleFamily eFam, USHORT n=0xFFFF );
+ virtual ~SwStyleSheetIterator();
+
+ virtual USHORT Count();
+ virtual SfxStyleSheetBase *operator[](USHORT nIdx);
+ virtual SfxStyleSheetBase* First();
+ virtual SfxStyleSheetBase* Next();
+ virtual SfxStyleSheetBase* Find(const UniString& rStr);
+
+ virtual void Notify( SfxBroadcaster&, const SfxHint& );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Pool fuer
+ --------------------------------------------------------------------*/
+
+class SwDocStyleSheetPool : public SfxStyleSheetBasePool
+{
+ rtl::Reference< SwDocStyleSheet > mxStyleSheet;
+ SwDoc& rDoc;
+ BOOL bOrganizer : 1; // TRUE: fuer den Organizer
+
+
+ virtual SfxStyleSheetBase* Create( const String&, SfxStyleFamily, USHORT nMask);
+ virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& );
+
+ using SfxStyleSheetBasePool::Find;
+
+public:
+ SwDocStyleSheetPool( SwDoc&, BOOL bOrganizer = FALSE );
+
+ virtual void Replace( SfxStyleSheetBase& rSource,
+ SfxStyleSheetBase& rTarget );
+ virtual SfxStyleSheetBase& Make(const String&, SfxStyleFamily, USHORT nMask, USHORT nPos = 0xffff);
+
+ virtual SfxStyleSheetBase* Find( const String&, SfxStyleFamily eFam,
+ USHORT n=0xFFFF );
+
+ virtual BOOL SetParent( SfxStyleFamily eFam, const String &rStyle,
+ const String &rParent );
+
+ virtual void Remove( SfxStyleSheetBase* pStyle);
+
+ void SetOrganizerMode( BOOL bMode ) { bOrganizer = bMode; }
+ BOOL IsOrganizerMode() const { return bOrganizer; }
+
+ virtual SfxStyleSheetIterator* CreateIterator( SfxStyleFamily,
+ USHORT nMask );
+
+ SwDoc& GetDoc() const { return rDoc; }
+
+ void dispose();
+
+ virtual void SAL_CALL acquire( ) throw ();
+ virtual void SAL_CALL release( ) throw ();
+
+protected:
+ virtual ~SwDocStyleSheetPool();
+
+ //Fuer die daemlicheren Compiler
+private:
+ SwDocStyleSheetPool( const SwDocStyleSheetPool& );
+};
+
+
+#endif
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
new file mode 100644
index 000000000000..8483cf7b2d39
--- /dev/null
+++ b/sw/inc/docufld.hxx
@@ -0,0 +1,836 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DOCUFLD_HXX
+#define _DOCUFLD_HXX
+
+
+#include <tools/date.hxx>
+#include <tools/datetime.hxx>
+
+
+#include <svl/macitem.hxx>
+
+#include "fldbas.hxx"
+#include "numrule.hxx"
+
+class _SetGetExpFlds;
+class SwTxtFld;
+class SwFrm;
+class OutlinerParaObject;
+class SwTextAPIObject;
+
+enum SwAuthorFormat
+{
+ AF_BEGIN,
+ AF_NAME = AF_BEGIN,
+ AF_SHORTCUT,
+ AF_END,
+ AF_FIXED = 0x8000
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Untertyp der Dokumentstatistik
+ --------------------------------------------------------------------*/
+
+enum SwDocStatSubType
+{
+ DS_BEGIN,
+ DS_PAGE = DS_BEGIN,
+ DS_PARA,
+ DS_WORD,
+ DS_CHAR,
+ DS_TBL,
+ DS_GRF,
+ DS_OLE,
+ DS_END
+};
+
+typedef sal_uInt16 SwDocInfoSubType;
+namespace nsSwDocInfoSubType
+{
+ // NB: these must denote consecutive integers!
+ // NB2: these are extended by 4 DI_INFO values for backward compatibility
+ // in filter/html/htmlfld.cxx, so make sure that DI_SUBTYPE_END
+ // really is the end, and is at least 4 less than DI_SUB_*!
+ const SwDocInfoSubType DI_SUBTYPE_BEGIN = 0;
+ const SwDocInfoSubType DI_TITEL = DI_SUBTYPE_BEGIN;
+ const SwDocInfoSubType DI_THEMA = 1;
+ const SwDocInfoSubType DI_KEYS = 2;
+ const SwDocInfoSubType DI_COMMENT = 3;
+ const SwDocInfoSubType DI_CREATE = 4;
+ const SwDocInfoSubType DI_CHANGE = 5;
+ const SwDocInfoSubType DI_PRINT = 6;
+ const SwDocInfoSubType DI_DOCNO = 7;
+ const SwDocInfoSubType DI_EDIT = 8;
+ const SwDocInfoSubType DI_CUSTOM = 9;
+ const SwDocInfoSubType DI_SUBTYPE_END = 10;
+
+
+ const SwDocInfoSubType DI_SUB_AUTHOR = 0x0100;
+ const SwDocInfoSubType DI_SUB_TIME = 0x0200;
+ const SwDocInfoSubType DI_SUB_DATE = 0x0300;
+ const SwDocInfoSubType DI_SUB_FIXED = 0x1000;
+ const SwDocInfoSubType DI_SUB_MASK = 0xff00;
+}
+
+
+enum RegInfoFormat // Nur noch zum laden alter Dokumente!!!
+{
+ RF_AUTHOR,
+ RF_TIME,
+ RF_DATE,
+ RF_ALL
+};
+
+enum SwPageNumSubType
+{
+ PG_RANDOM,
+ PG_NEXT,
+ PG_PREV
+};
+
+enum SwExtUserSubType
+{
+ EU_COMPANY /*EU_FIRMA*/,
+ EU_FIRSTNAME /*EU_VORNAME*/,
+ EU_NAME /*EU_NAME*/,
+ EU_SHORTCUT /*EU_ABK*/,
+ EU_STREET /*EU_STRASSE*/,
+ EU_COUNTRY /*EU_LAND*/,
+ EU_ZIP /*EU_PLZ*/,
+ EU_CITY /*EU_ORT*/,
+ EU_TITLE /*EU_TITEL*/,
+ EU_POSITION /*EU_POS*/,
+ EU_PHONE_PRIVATE /*EU_TELPRIV*/,
+ EU_PHONE_COMPANY /*EU_TELFIRMA*/,
+ EU_FAX,
+ EU_EMAIL,
+ EU_STATE,
+ EU_FATHERSNAME,
+ EU_APARTMENT
+};
+
+enum SwJumpEditFormat
+{
+ JE_FMT_TEXT,
+ JE_FMT_TABLE,
+ JE_FMT_FRAME,
+ JE_FMT_GRAPHIC,
+ JE_FMT_OLE
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Seitennummer
+ --------------------------------------------------------------------*/
+
+class SwPageNumberFieldType : public SwFieldType
+{
+ sal_Int16 nNumberingType;
+ USHORT nNum, nMax;
+ BOOL bVirtuell;
+
+public:
+ SwPageNumberFieldType();
+
+ String& Expand( sal_uInt32 nFmt, short nOff, const String&, String& rRet ) const;
+ void ChangeExpansion( SwDoc* pDoc, USHORT nNum, USHORT nMax,
+ BOOL bVirtPageNum, const sal_Int16* pNumFmt = 0 );
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Seitennummerierung
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwPageNumberField : public SwField
+{
+ String sUserStr;
+ USHORT nSubType;
+ short nOffset;
+
+public:
+ SwPageNumberField(SwPageNumberFieldType*, USHORT nSub = PG_RANDOM,
+ sal_uInt32 nFmt = 0, short nOff = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ virtual USHORT GetSubType() const;
+ // virtual void SetSubType(USHORT nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+
+ const String& GetUserString() const { return sUserStr; }
+ void SetUserString( const String& rS ) { sUserStr = rS; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Autoren
+ --------------------------------------------------------------------*/
+
+class SwAuthorFieldType : public SwFieldType
+{
+public:
+ SwAuthorFieldType();
+
+ String Expand(ULONG) const;
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: AutorenFeld
+ --------------------------------------------------------------------*/
+
+class SwAuthorField : public SwField
+{
+ String aContent;
+
+public:
+ SwAuthorField(SwAuthorFieldType*, sal_uInt32 nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline void SetExpansion(const String& rStr) { aContent = rStr; }
+ inline const String& GetContent() const { return aContent; }
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Filename
+ --------------------------------------------------------------------*/
+
+class SwFileNameFieldType : public SwFieldType
+{
+ SwDoc *pDoc;
+public:
+ SwFileNameFieldType(SwDoc*);
+
+ String Expand(ULONG) const;
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: FileName
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwFileNameField : public SwField
+{
+ String aContent;
+
+public:
+ SwFileNameField(SwFileNameFieldType*, sal_uInt32 nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline void SetExpansion(const String& rStr) { aContent = rStr; }
+ inline const String& GetContent() const { return aContent; }
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: TemplName
+ --------------------------------------------------------------------*/
+
+class SwTemplNameFieldType : public SwFieldType
+{
+ SwDoc *pDoc;
+public:
+ SwTemplNameFieldType(SwDoc*);
+
+ String Expand(ULONG) const;
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: TemplName
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwTemplNameField : public SwField
+{
+public:
+ SwTemplNameField(SwTemplNameFieldType*, sal_uInt32 nFmt = 0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Docstatistik
+ --------------------------------------------------------------------*/
+
+class SwDocStatFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+ sal_Int16 nNumberingType;//com::sun::star::style::NumberingType
+
+public:
+ SwDocStatFieldType(SwDoc*);
+ String Expand(USHORT nSubType, sal_uInt32 nFmt) const;
+ virtual SwFieldType* Copy() const;
+
+ inline void SetNumFormat( sal_Int16 eFmt ) { nNumberingType = eFmt; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Dokumentstatistik
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDocStatField : public SwField
+{
+ USHORT nSubType;
+
+public:
+ SwDocStatField( SwDocStatFieldType*,
+ USHORT nSubType = 0, sal_uInt32 nFmt = 0);
+
+ void ChangeExpansion( const SwFrm* pFrm );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nSub);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: versteckter Text
+ --------------------------------------------------------------------*/
+
+class SwHiddenTxtFieldType : public SwFieldType
+{
+ BOOL bHidden;
+public:
+ SwHiddenTxtFieldType(BOOL bSetHidden = TRUE);
+
+ virtual SwFieldType* Copy() const;
+
+ void SetHiddenFlag( BOOL bSetHidden = TRUE );
+ inline BOOL GetHiddenFlag() const { return bHidden; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Versteckter Text
+ --------------------------------------------------------------------*/
+
+class SwHiddenTxtField : public SwField
+{
+ String aTRUETxt; // Text wenn Bedingung TRUE
+ String aFALSETxt; // Wenn Bedingung falsch
+ String aContent; // Ausgewerteter DB-Text
+
+ String aCond; // Bedingung
+ USHORT nSubType;
+
+ BOOL bCanToggle : 1; // kann das Feld einzeln getoggelt werden?
+ BOOL bIsHidden : 1; // ist es nicht sichtbar?
+ BOOL bValid : 1; // DB-Feld evaluiert?
+
+public:
+ SwHiddenTxtField( SwHiddenTxtFieldType*,
+ BOOL bConditional,
+ const String& rCond,
+ const String& rTxt,
+ BOOL bHidden = FALSE,
+ USHORT nSubType = TYP_HIDDENTXTFLD);
+
+ SwHiddenTxtField( SwHiddenTxtFieldType*,
+ const String& rCond,
+ const String& rTrue,
+ const String& rFalse,
+ USHORT nSubType = TYP_HIDDENTXTFLD);
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ void Evaluate(SwDoc*);
+
+ inline void SetValue(BOOL bHidden) { bIsHidden = bHidden; }
+ String GetColumnName(const String& rName);
+ String GetDBName(const String& rName, SwDoc *pDoc);
+
+ // Condition
+ virtual void SetPar1(const String& rStr);
+ virtual const String& GetPar1() const;
+
+ // True/False - String
+ virtual void SetPar2(const String& rStr);
+ virtual String GetPar2() const;
+
+
+ virtual USHORT GetSubType() const;
+ // virtual void SetSubType(USHORT nSub); // OM: entfernt, da unbenoetigt und gefaehrlich
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Feld das zu einer Leerzeile (ohne Hoehe) expandiert
+ --------------------------------------------------------------------*/
+
+class SwHiddenParaFieldType : public SwFieldType
+{
+public:
+ SwHiddenParaFieldType();
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Versteckter Absatz
+ --------------------------------------------------------------------*/
+
+class SwHiddenParaField : public SwField
+{
+ String aCond;
+ BOOL bIsHidden:1;
+public:
+ // Direkte Eingabe alten Wert loeschen
+ SwHiddenParaField(SwHiddenParaFieldType*, const String& rCond);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ void SetHidden(BOOL bHidden) { bIsHidden = bHidden; }
+ BOOL IsHidden() const { return bIsHidden; }
+
+ // Bedingung erfragen/setzen
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Macro ausfuehren
+ --------------------------------------------------------------------*/
+
+class SwMacroFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+
+public:
+ SwMacroFieldType(SwDoc*);
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Macrofeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwMacroField : public SwField
+{
+ String aMacro;
+ String aText;
+ BOOL bIsScriptURL;
+
+public:
+ // Direkte Eingabe alten Wert loeschen
+ SwMacroField( SwMacroFieldType*, const String& rLibAndName,
+ const String& rTxt);
+
+ inline const String& GetMacro() const { return aMacro; }
+ String GetLibName() const;
+ String GetMacroName() const;
+ SvxMacro GetSvxMacro() const;
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // Library und FileName
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // Macrotext
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+
+ static void CreateMacroString( String& rMacro,
+ const String& rMacroName,
+ const String& rLibraryName );
+
+ static BOOL isScriptURL( const String& str );
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: PostIts
+ --------------------------------------------------------------------*/
+
+class SwPostItFieldType : public SwFieldType
+{
+private:
+ SwDoc* mpDoc;
+public:
+ SwPostItFieldType(SwDoc* pDoc);
+
+ virtual SwFieldType* Copy() const;
+ SwDoc* GetDoc() {return mpDoc;};
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: PostIt
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwPostItField : public SwField
+{
+ String sTxt; // die Anmerkung
+ String sAuthor; // der Author
+ DateTime aDateTime; // Datum und Zeit der Anmerkung
+ OutlinerParaObject* mpText;
+ SwTextAPIObject* m_pTextObject;
+
+public:
+ SwPostItField( SwPostItFieldType*,
+ const String& rAuthor, const String& rTxt, const DateTime& rDate);
+ ~SwPostItField();
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline const Date GetDate() const { return aDateTime.GetDate(); }
+ inline const Time GetTime() const { return aDateTime.GetTime(); }
+
+ // Author
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // Text
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ const String& GetTxt() const { return sTxt; }
+
+ const OutlinerParaObject* GetTextObject() const;
+ void SetTextObject( OutlinerParaObject* pText );
+
+ sal_uInt32 GetNumberOfParagraphs() const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+ virtual String GetDescription() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: DokumentInfo
+ --------------------------------------------------------------------*/
+
+class SwDocInfoFieldType : public SwValueFieldType
+{
+public:
+ SwDocInfoFieldType(SwDoc* pDc);
+
+ String Expand(USHORT nSubType, sal_uInt32 nFormat, USHORT nLang, const String& rName) const;
+ virtual SwFieldType* Copy() const;
+};
+
+class SW_DLLPUBLIC SwDocInfoField : public SwValueField
+{
+ USHORT nSubType;
+ String aContent;
+ String aName;
+
+public:
+ SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, sal_uInt32 nFmt=0);
+ SwDocInfoField(SwDocInfoFieldType*, USHORT nSub, const String& rName, const String& rValue, sal_uInt32 nFmt=0);
+
+ virtual void SetSubType(USHORT);
+ virtual USHORT GetSubType() const;
+ virtual void SetLanguage(USHORT nLng);
+ virtual String Expand() const;
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual SwField* Copy() const;
+ String GetName() const { return aName; }
+ void SetName( const String& rName ) { aName = rName; }
+ inline void SetExpansion(const String& rStr) { aContent = rStr; }
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: erweiterte Benutzereinstellung
+ --------------------------------------------------------------------*/
+
+
+class SwExtUserFieldType : public SwFieldType
+{
+ String aData;
+public:
+ SwExtUserFieldType();
+
+ inline void SetData(const String& rStr) { aData = rStr; }
+
+ String Expand(USHORT nSubType, sal_uInt32 nFormat) const;
+ virtual SwFieldType* Copy() const;
+};
+
+class SwExtUserField : public SwField
+{
+ String aContent;
+ USHORT nType;
+
+public:
+ SwExtUserField(SwExtUserFieldType*, USHORT nSub, sal_uInt32 nFmt=0);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nSub);
+
+ inline void SetExpansion(const String& rStr) { aContent = rStr; }
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Relatives Seitennummern - Feld
+ --------------------------------------------------------------------*/
+
+class SwRefPageSetFieldType : public SwFieldType
+{
+public:
+ SwRefPageSetFieldType();
+
+ virtual SwFieldType* Copy() const;
+ // ueberlagert, weil es nichts zum Updaten gibt!
+ virtual void Modify( SfxPoolItem *, SfxPoolItem * );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Relative Seitennummerierung
+ --------------------------------------------------------------------*/
+
+class SwRefPageSetField : public SwField
+{
+ short nOffset;
+ BOOL bOn;
+
+public:
+ SwRefPageSetField( SwRefPageSetFieldType*, short nOff = 0,
+ BOOL bOn = TRUE );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ BOOL IsOn() const { return bOn; }
+
+ short GetOffset() const { return nOffset; }
+ void SetOffset( short nOff ) { nOffset = nOff; }
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: relatives Seitennummern - Abfrage Feld
+ --------------------------------------------------------------------*/
+
+class SwRefPageGetFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+ sal_Int16 nNumberingType;
+
+ void UpdateField( SwTxtFld* pTxtFld, _SetGetExpFlds& rSetList );
+
+public:
+ SwRefPageGetFieldType( SwDoc* pDoc );
+ virtual SwFieldType* Copy() const;
+
+ // ueberlagert, um alle RefPageGet-Felder zu updaten
+ virtual void Modify( SfxPoolItem *, SfxPoolItem * );
+ USHORT MakeSetList( _SetGetExpFlds& rTmpLst );
+
+ SwDoc* GetDoc() const { return pDoc; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Relative Seitennummerierung Abfragen
+ --------------------------------------------------------------------*/
+
+class SwRefPageGetField : public SwField
+{
+ String sTxt;
+public:
+ SwRefPageGetField( SwRefPageGetFieldType*, sal_uInt32 nFmt );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ void SetText( const String& rTxt ) { sTxt = rTxt; }
+
+ void ChangeExpansion( const SwFrm* pFrm, const SwTxtFld* pFld );
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Feld zum Anspringen und Editieren
+ --------------------------------------------------------------------*/
+
+class SwJumpEditFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+ SwDepend aDep;
+
+public:
+ SwJumpEditFieldType( SwDoc* pDoc );
+ virtual SwFieldType* Copy() const;
+
+ SwCharFmt* GetCharFmt();
+};
+
+class SwJumpEditField : public SwField
+{
+ String sTxt, sHelp;
+public:
+ SwJumpEditField( SwJumpEditFieldType*, sal_uInt32 nFormat,
+ const String& sText, const String& sHelp );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // Platzhalter-Text
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // HinweisText
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ SwCharFmt* GetCharFmt() const
+ { return ((SwJumpEditFieldType*)GetTyp())->GetCharFmt(); }
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Script Fieldtype
+ --------------------------------------------------------------------*/
+
+class SwScriptFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+public:
+ SwScriptFieldType( SwDoc* pDoc );
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Script Field
+ --------------------------------------------------------------------*/
+
+class SwScriptField : public SwField
+{
+ String sType; // Type von Code (Java/VBScript/...)
+ String sCode; // der Code als Text
+ // der Code als JavaCode ?
+
+ BOOL bCodeURL; // Code enthaelt URL eines Scripts
+
+public:
+ SwScriptField( SwScriptFieldType*, const String& rType,
+ const String& rCode, BOOL bURL=FALSE );
+
+ virtual String GetDescription() const;
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // Type
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+ // Text
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ BOOL IsCodeURL() const { return bCodeURL; }
+ void SetCodeURL( BOOL bURL ) { bCodeURL = bURL; }
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Combined Character Fieldtype
+ --------------------------------------------------------------------*/
+
+class SwCombinedCharFieldType : public SwFieldType
+{
+public:
+ SwCombinedCharFieldType();
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Script Field
+ --------------------------------------------------------------------*/
+
+#define MAX_COMBINED_CHARACTERS 6
+
+class SW_DLLPUBLIC SwCombinedCharField : public SwField
+{
+ String sCharacters; // combine these characters
+
+public:
+ SwCombinedCharField( SwCombinedCharFieldType*, const String& rChars );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // Characters
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+
+#endif // _DOCUFLD_HXX
diff --git a/sw/inc/dpage.hxx b/sw/inc/dpage.hxx
new file mode 100644
index 000000000000..6b791acf178a
--- /dev/null
+++ b/sw/inc/dpage.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DPAGE_HXX
+#define _DPAGE_HXX
+
+#ifndef _FM_FMPAGE_HXX
+#include <svx/fmpage.hxx>
+#endif
+#include <svx/svdobj.hxx>
+
+class SdrPageGridFrameList;
+class SwDrawDocument;
+class SwDoc;
+
+class SwDPage : public FmFormPage, public SdrObjUserCall
+{
+ SdrPageGridFrameList* pGridLst;
+ SwDoc& rDoc;
+
+public:
+ SwDPage(SwDrawDocument& rNewModel, BOOL bMasterPage=FALSE);
+ ~SwDPage();
+
+ // #i3694#
+ // This GetOffset() method is not needed anymore, it even leads to errors.
+ // virtual Point GetOffset() const;
+ virtual SdrObject* ReplaceObject( SdrObject* pNewObj, ULONG nObjNum );
+
+ virtual const SdrPageGridFrameList* GetGridFrameList(const SdrPageView* pPV,
+ const Rectangle *pRect) const;
+
+ BOOL RequestHelp( Window* pWindow, SdrView* pView, const HelpEvent& rEvt );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage();
+};
+
+#endif // _DPAGE_HXX
+
+
+
diff --git a/sw/inc/drawdoc.hxx b/sw/inc/drawdoc.hxx
new file mode 100644
index 000000000000..cca6390e9198
--- /dev/null
+++ b/sw/inc/drawdoc.hxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _DRAWDOC_HXX
+#define _DRAWDOC_HXX
+
+#ifndef _FM_FMMODEL_HXX
+#include <svx/fmmodel.hxx>
+#endif
+
+class SwDoc;
+class SwDocShell;
+
+//==================================================================
+
+class SwDrawDocument : public FmFormModel
+{
+ SwDoc* pDoc;
+public:
+ SwDrawDocument( SwDoc* pDoc );
+ ~SwDrawDocument();
+
+ const SwDoc& GetDoc() const { return *pDoc; }
+ SwDoc& GetDoc() { return *pDoc; }
+
+ virtual SdrPage* AllocPage(FASTBOOL bMasterPage);
+
+ // fuers "load on demand" von Grafiken im DrawingLayer
+ virtual SvStream* GetDocumentStream( SdrDocumentStreamInfo& rInfo ) const;
+
+ // fuers Speicher von Rechtecken als Control-Ersatz fuker Versionen < 5.0
+ virtual SdrLayerID GetControlExportLayerId( const SdrObject & ) const;
+
+protected:
+ // --> OD 2006-03-01 #b6382898#
+ // overload of <SdrModel::createUnoModel()> is needed to provide corresponding uno model.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel();
+ // <--
+};
+
+
+#endif
diff --git a/sw/inc/edglbldc.hxx b/sw/inc/edglbldc.hxx
new file mode 100644
index 000000000000..dd3187614ec4
--- /dev/null
+++ b/sw/inc/edglbldc.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _EDGLBLDC_HXX
+#define _EDGLBLDC_HXX
+
+#include <svl/svarray.hxx>
+
+class SwSection;
+class SwTOXBase;
+class SwTOXBaseSection;
+
+enum GlobalDocContentType {
+ GLBLDOC_UNKNOWN,
+ GLBLDOC_TOXBASE,
+ GLBLDOC_SECTION
+};
+
+class SwGlblDocContent
+{
+ GlobalDocContentType eType;
+ ULONG nDocPos;
+ union {
+ const SwTOXBase* pTOX;
+ const SwSection* pSect;
+ } PTR;
+
+public:
+ SwGlblDocContent( ULONG nPos );
+ SwGlblDocContent( const SwTOXBaseSection* pTOX );
+ SwGlblDocContent( const SwSection* pSect );
+
+ // Inhalte abfragen
+ GlobalDocContentType GetType() const { return eType; }
+ const SwSection* GetSection() const
+ { return GLBLDOC_SECTION == eType ? PTR.pSect : 0; }
+ const SwTOXBase* GetTOX() const
+ { return GLBLDOC_TOXBASE == eType ? PTR.pTOX : 0; }
+ ULONG GetDocPos() const { return nDocPos; }
+
+ // fuers Sortieren
+ inline int operator==( const SwGlblDocContent& rCmp ) const
+ { return GetDocPos() == rCmp.GetDocPos(); }
+ inline int operator<( const SwGlblDocContent& rCmp ) const
+ { return GetDocPos() < rCmp.GetDocPos(); }
+};
+
+
+typedef SwGlblDocContent* SwGlblDocContentPtr;
+SV_DECL_PTRARR_SORT_DEL( SwGlblDocContents, SwGlblDocContentPtr, 10, 10 )
+
+
+
+#endif
diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx
new file mode 100644
index 000000000000..60d6fbe99419
--- /dev/null
+++ b/sw/inc/edimp.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _EDIMP_HXX
+#define _EDIMP_HXX
+
+#include <tools/solar.h>
+#include <svl/svarray.hxx>
+
+class SwPaM;
+class SwNodeIndex;
+
+/*
+ * MACROS um ueber alle Bereiche zu iterieren
+ */
+#define PCURCRSR (_pStartCrsr)
+
+#define FOREACHPAM_START(pCURSH) \
+ {\
+ SwPaM *_pStartCrsr = (pCURSH)->GetCrsr(), *__pStartCrsr = _pStartCrsr; \
+ do {
+
+#define FOREACHPAM_END() \
+ } while( (_pStartCrsr=(SwPaM *)_pStartCrsr->GetNext()) != __pStartCrsr ); \
+ }
+
+
+
+struct SwPamRange
+{
+ ULONG nStart, nEnd;
+
+ SwPamRange() : nStart( 0 ), nEnd( 0 ) {}
+ SwPamRange( ULONG nS, ULONG nE ) : nStart( nS ), nEnd( nE ) {}
+
+ BOOL operator==( const SwPamRange& rRg )
+ { return nStart == rRg.nStart ? TRUE : FALSE; }
+ BOOL operator<( const SwPamRange& rRg )
+ { return nStart < rRg.nStart ? TRUE : FALSE; }
+};
+
+SV_DECL_VARARR_SORT( _SwPamRanges, SwPamRange, 0, 1 )
+
+class SwPamRanges : private _SwPamRanges
+{
+public:
+ SwPamRanges( const SwPaM& rRing );
+
+ void Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 );
+ SwPaM& SetPam( USHORT nArrPos, SwPaM& rPam );
+
+ USHORT Count() const
+ { return _SwPamRanges::Count(); }
+ SwPamRange operator[]( USHORT nPos ) const
+ { return _SwPamRanges::operator[](nPos); }
+};
+
+
+#endif
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
new file mode 100644
index 000000000000..9dc09103606e
--- /dev/null
+++ b/sw/inc/editsh.hxx
@@ -0,0 +1,995 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _EDITSH_HXX
+#define _EDITSH_HXX
+
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <tools/string.hxx>
+#include <svl/svarray.hxx>
+#include <vcl/font.hxx>
+#include <editeng/swafopt.hxx>
+#include "swdllapi.h"
+#include <crsrsh.hxx> // fuer Basisklasse
+#include <itabenum.hxx>
+#include <swdbdata.hxx>
+#include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
+#include <com/sun/star/linguistic2/ProofreadingResult.hpp>
+#include <fldupde.hxx>
+#include <tblenum.hxx>
+#include <IMark.hxx>
+
+#include <vector>
+#include <swundo.hxx>
+#include <svtools/embedhlp.hxx>
+
+class PolyPolygon;
+class SwDoc;
+class DateTime;
+class CommandExtTextInputData;
+
+class SvUShortsSort;
+class SvNumberFormatter;
+class SfxPoolItem;
+class SfxItemSet;
+class SvxAutoCorrect;
+
+class SwField; // fuer Felder
+class SwFieldType;
+class SwDDEFieldType;
+class SwNewDBMgr;
+
+struct SwDocStat;
+class SvStringsDtor;
+class SvStringsSort;
+class SwAutoCompleteWord;
+
+class SwFmtRefMark;
+
+class SwNumRule; // Numerierung
+//class SwNodeNum; // Numerierung
+
+class SwUndoIds; // fuer Undo
+class SwTxtFmtColl;
+class SwGrfNode;
+class SwFlyFrmFmt;
+
+class SwFrmFmt; // fuer GetTxtNodeFmts()
+class SwCharFmt;
+class SwExtTextInput;
+class SwRootFrm; // fuer CTOR
+class Graphic; // fuer GetGraphic
+class GraphicObject; // fuer GetGraphicObj
+class SwFmtINetFmt; // InsertURL
+class SwTable;
+class SwTextBlocks; // fuer GlossaryRW
+class SwFmtFtn;
+class SwSection;
+class SwSectionData;
+class SwSectionFmt;
+class SwTOXMarks;
+class SwTOXBase;
+class SwTOXType;
+class SwTableAutoFmt;
+class SwPageDesc;
+class SwTxtINetFmt;
+class SwSeqFldList;
+class SwGlblDocContent;
+class SwGlblDocContents;
+class SwRedline;
+class SwRedlineData;
+class SwFtnInfo;
+class SwEndNoteInfo;
+class SwLineNumberInfo;
+class SwAuthEntry;
+class SwRewriter;
+struct SwConversionArgs;
+
+
+namespace com { namespace sun { namespace star { namespace uno {
+ template < class > class Sequence;
+}}}}
+
+namespace svx{
+struct SpellPortion;
+typedef std::vector<SpellPortion> SpellPortions;
+}
+
+namespace sfx2{
+class LinkManager;
+}
+
+#define GETSELTXT_PARABRK_TO_BLANK 0
+#define GETSELTXT_PARABRK_KEEP 1
+#define GETSELTXT_PARABRK_TO_ONLYCR 2
+
+/****************************************************************
+ * zum Abfragen der INet-Attribute fuer den Navigator
+ ****************************************************************/
+struct SwGetINetAttr
+{
+ String sText;
+ const SwTxtINetFmt& rINetAttr;
+
+ SwGetINetAttr( const String& rTxt, const SwTxtINetFmt& rAttr )
+ : sText( rTxt ), rINetAttr( rAttr )
+ {}
+};
+SV_DECL_PTRARR_DEL( SwGetINetAttrs, SwGetINetAttr*, 0, 5 )
+
+/****************************************************************
+ * Typen der Inhaltsformen
+ ****************************************************************/
+#define CNT_TXT 0x0001
+#define CNT_GRF 0x0002
+#define CNT_OLE 0x0010
+/* Teste einen USHORT auf eine bestimmte Inhaltsform */
+#define CNT_HasTxt(USH) ((USH)&CNT_TXT)
+#define CNT_HasGrf(USH) ((USH)&CNT_GRF)
+#define CNT_HasOLE(USH) ((USH)&CNT_OLE)
+
+class SW_DLLPUBLIC SwEditShell: public SwCrsrShell
+{
+ static SvxSwAutoFmtFlags* pAutoFmtFlags;
+
+ // fuer die privaten Methoden DelRange und die vom AutoCorrect
+ friend class SwAutoFormat;
+ friend void _InitCore();
+ friend void _FinitCore();
+ // fuer die PamCorrAbs/-Rel Methoden
+ friend class SwUndo;
+
+ SW_DLLPRIVATE SfxPoolItem& _GetChrFmt( SfxPoolItem& ) const;
+
+ /*
+ * liefert einen Pointer auf einen SwGrfNode; dieser wird von
+ * GetGraphic() und GetGraphicSize() verwendet.
+ */
+ SW_DLLPRIVATE SwGrfNode *_GetGrfNode() const ;
+
+ SW_DLLPRIVATE void DeleteSel( SwPaM& rPam, BOOL* pUndo = 0 );
+
+ SW_DLLPRIVATE void _SetSectionAttr( SwSectionFmt& rSectFmt, const SfxItemSet& rSet );
+
+ using ViewShell::UpdateFlds;
+ using SwModify::GetInfo;
+
+public:
+ // Editieren (immer auf allen selektierten Bereichen)
+ void Insert( sal_Unicode, BOOL bOnlyCurrCrsr = FALSE );
+ void Insert2( const String &, const bool bForceExpandHints = false );
+ void Overwrite( const String & );
+
+ // Ersetz einen selektierten Bereich in einem TextNode mit dem
+ // String. Ist fuers Suchen&Ersetzen gedacht.
+ // bRegExpRplc - ersetze Tabs (\\t) und setze den gefundenen String
+ // ein ( nicht \& )
+ // z.B.: Fnd: "zzz", Repl: "xx\t\\t..&..\&"
+ // --> "xx\t<Tab>..zzz..&"
+ BOOL Replace( const String& rNewStr, BOOL bRegExpRplc = FALSE );
+
+ // loescht den Inhalt aller Bereiche;
+ // werden ganze Nodes selektiert, werden die Nodes geloescht
+ long Delete();
+
+ // remove a complete paragraph
+ BOOL DelFullPara();
+
+ // change text to Upper/Lower/Hiragana/Katagana/...
+ void TransliterateText( sal_uInt32 nType );
+ void TransliterateText( const String& rModuleName );
+
+ // count words in current selection
+ void CountWords( SwDocStat& rStat ) const;
+
+ // loesche den nicht sichtbaren Content aus dem Document, wie z.B.:
+ // versteckte Bereiche, versteckte Absaetze
+ BOOL RemoveInvisibleContent();
+
+ // replace fields by text - mailmerge support
+ BOOL ConvertFieldsToText();
+ // set all numbering start points to a fixed value - mailmerge support
+ void SetNumberingRestart();
+
+ // embedded alle lokalen Links (Bereiche/Grafiken)
+ USHORT GetLinkUpdMode(BOOL bDocSettings = FALSE) const;
+ void SetLinkUpdMode( USHORT nMode );
+
+ // kopiere den Inhalt aller Bereiche an die akt. Cursor-Position
+ // in die angegebene Shell
+ long Copy( SwEditShell* pDestShell = 0 );
+
+ // fuers Kopieren uebers ClipBoard:
+ // wird Tabelle in Tabelle kopiert, verschiebe aus dieser dann
+ // alle Cursor. Copy und Paste muss aufgrund der FlyFrames in
+ // der FEShell stehen!
+ // kopiere alle Selectionen und das Doc
+ //JP 21.10.96: und fuer die SVX-Autokorrektur
+ BOOL _CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pNdInsPos = 0 );
+
+ long SplitNode( BOOL bAutoFormat = FALSE, BOOL bCheckTableStart = TRUE );
+ sal_Bool AppendTxtNode();
+ void AutoFmtBySplitNode();
+
+ // ist der Cursor in einem INetAttribut, dann wird das komplett
+ // geloescht; inclusive des Hinweistextes (wird beim Drag&Drop gebraucht)
+ BOOL DelINetAttrWithText();
+
+ // ist der Cursor am Ende einer Zeichenvorlage, an der das DontExpand-Flag
+ // noch nicht gesetzt ist, wird dies gesetzt ( => return TRUE; )
+ BOOL DontExpandFmt();
+
+ // Anwenden / Entfernen von Attributen
+ // liefert Attribute im angeforderten AttributSet. Wenn nicht eindeutig
+ // steht im Set ein DONT_CARE !!
+ // --> OD 2008-01-16 #newlistlevelattrs#
+ // Renaming method to <GetCurAttr(..)> indicating that the attributes at
+ // the current cursors are retrieved.
+ // Introduce 2nd optional parameter <bMergeIndentValuesOfNumRule>.
+ // If <bMergeIndentValuesOfNumRule> == TRUE, the indent attributes of
+ // the corresponding list level of an applied list style is merged into
+ // the requested item set as a LR-SPACE item, if corresponding node has not
+ // its own indent attributes and the position-and-space mode of the list
+ // level is SvxNumberFormat::LABEL_ALIGNMENT.
+ BOOL GetCurAttr( SfxItemSet& ,
+ const bool bMergeIndentValuesOfNumRule = false ) const;
+ // <--
+ void SetAttr( const SfxPoolItem&, USHORT nFlags = 0 );
+ void SetAttr( const SfxItemSet&, USHORT nFlags = 0 );
+
+ // Setze das Attribut als neues default Attribut im Dokument.
+ void SetDefault( const SfxPoolItem& );
+
+ // Erfrage das Default Attribut vom Dokument.
+ const SfxPoolItem& GetDefault( USHORT nFmtHint ) const;
+
+ void ResetAttr( const SvUShortsSort* pAttrs = 0 );
+ void GCAttr();
+
+ // returns the scripttpye of the selection
+ USHORT GetScriptType() const;
+
+ // returns the language at current cursor position
+ USHORT GetCurLang() const;
+
+ // TABLE
+ USHORT GetTblFrmFmtCount( BOOL bUsed = FALSE ) const;
+ SwFrmFmt& GetTblFrmFmt(USHORT nFmt, BOOL bUsed = FALSE ) const;
+ String GetUniqueTblName() const;
+
+ // CHAR
+ USHORT GetCharFmtCount() const;
+ SwCharFmt& GetCharFmt(USHORT nFmt) const;
+ SwCharFmt* GetCurCharFmt() const;
+ void FillByEx(SwCharFmt*, BOOL bReset = FALSE);
+ SwCharFmt* MakeCharFmt( const String& rName, SwCharFmt* pDerivedFrom = 0 );
+ SwCharFmt* FindCharFmtByName( const String& rName ) const;
+
+
+ /* Formatcollections, neu */
+ /* GetXXXCount() liefert die Anzahl der im Dokument vorhandenen XXX
+ * GetXXX(i) liefert das i-te XXX (ERR_RAISE bei Ueberindizierung!)
+ * DelXXX(i) loescht das i-te XXX (ERR_RAISE bei Ueberindizierung!)
+ * GetCurXXX() liefert das am Cursor oder in den Bereichen
+ * geltende XXX (0, wenn nicht eindeutig!)
+ * SetXXX() setzt am Cursor oder in den Bereichen das XXX
+ * MakeXXX() macht ein XXX, abgeleitet vom pDerivedFrom
+ */
+
+ // TXT
+ SwTxtFmtColl& GetDfltTxtFmtColl() const;
+ USHORT GetTxtFmtCollCount() const;
+ SwTxtFmtColl& GetTxtFmtColl( USHORT nTxtFmtColl) const;
+ SwTxtFmtColl* GetCurTxtFmtColl() const;
+ // --> OD 2007-11-06 #i62675#
+ // Add 2nd optional parameter <bResetListAttrs> - see also <SwDoc::SetTxtFmtColl(..)>
+ void SetTxtFmtColl( SwTxtFmtColl*,
+ bool bResetListAttrs = false );
+ // <--
+ SwTxtFmtColl *MakeTxtFmtColl(const String &rFmtCollName,
+ SwTxtFmtColl *pDerivedFrom = 0);
+ void FillByEx(SwTxtFmtColl*, BOOL bReset = FALSE);
+ SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const;
+
+ // Gebe die "Auto-Collection" mit der Id zurueck. Existiert
+ // sie noch nicht, dann erzuege sie
+ SwTxtFmtColl* GetTxtCollFromPool( USHORT nId );
+ // return das geforderte automatische Format - Basis-Klasse !
+ SwFmt* GetFmtFromPool( USHORT nId );
+ // returne die geforderte automatische Seiten-Vorlage
+ SwPageDesc* GetPageDescFromPool( USHORT nId );
+
+ // erfrage ob die Absatz-/Zeichen-/Rahmen-/Seiten - Vorlage benutzt wird
+ BOOL IsUsed( const SwModify& ) const;
+
+ // returne das geforderte automatische Format
+ SwFrmFmt* GetFrmFmtFromPool( USHORT nId )
+ { return (SwFrmFmt*)SwEditShell::GetFmtFromPool( nId ); }
+ SwCharFmt* GetCharFmtFromPool( USHORT nId )
+ { return (SwCharFmt*)SwEditShell::GetFmtFromPool( nId ); }
+
+ // Felder
+ void Insert2(SwField&, const bool bForceExpandHints = false);
+ SwField* GetCurFld() const;
+
+ void UpdateFlds( SwField & ); // ein einzelnes Feld
+
+ USHORT GetFldTypeCount(USHORT nResId = USHRT_MAX, BOOL bUsed = FALSE) const;
+ SwFieldType* GetFldType(USHORT nId, USHORT nResId = USHRT_MAX, BOOL bUsed = FALSE) const;
+ SwFieldType* GetFldType(USHORT nResId, const String& rName) const;
+
+ void RemoveFldType(USHORT nId, USHORT nResId = USHRT_MAX);
+ void RemoveFldType(USHORT nResId, const String& rName);
+
+ void FieldToText( SwFieldType* pType );
+
+ void ChangeAuthorityData(const SwAuthEntry* pNewData);
+
+ // Datenbankinfo
+ SwDBData GetDBData() const;
+ const SwDBData& GetDBDesc() const;
+ void ChgDBData(const SwDBData& SwDBData);
+ void ChangeDBFields( const SvStringsDtor& rOldNames,
+ const String& rNewName );
+ void GetAllUsedDB( SvStringsDtor& rDBNameList,
+ SvStringsDtor* pAllDBNames = 0 );
+
+ BOOL IsAnyDatabaseFieldInDoc()const;
+ //check whether DB fields point to an available data source and returns it
+ BOOL IsFieldDataSourceAvailable(String& rUsedDataSource) const;
+ void UpdateExpFlds(BOOL bCloseDB = FALSE);// nur alle ExpressionFelder updaten
+ void SetFixFields( BOOL bOnlyTimeDate = FALSE,
+ const DateTime* pNewDateTime = 0 );
+ void LockExpFlds();
+ void UnlockExpFlds();
+
+ SwFldUpdateFlags GetFldUpdateFlags(BOOL bDocSettings = FALSE) const;
+ void SetFldUpdateFlags( SwFldUpdateFlags eFlags );
+
+ // fuer die Evaluierung der DBFelder (neuer DB-Manager)
+ SwNewDBMgr* GetNewDBMgr() const;
+
+ SwFieldType* InsertFldType(const SwFieldType &);
+
+ // Aenderungen am Dokument?
+ BOOL IsModified() const;
+ void SetModified();
+ void ResetModified();
+ void SetUndoNoResetModified();
+
+ // Dokument - Statistics
+ void UpdateDocStat( SwDocStat& rStat );
+
+ // Verzeichnismarke einfuegen loeschen
+ void Insert(const SwTOXMark& rMark);
+ void DeleteTOXMark(SwTOXMark* pMark);
+
+ // Alle Markierungen am aktuellen SPoint ermitteln
+ USHORT GetCurTOXMarks(SwTOXMarks& rMarks) const ;
+
+ // Verzeichnis einfuegen, und bei Bedarf erneuern
+ void InsertTableOf(const SwTOXBase& rTOX,
+ const SfxItemSet* pSet = 0);
+ BOOL UpdateTableOf(const SwTOXBase& rTOX,
+ const SfxItemSet* pSet = 0);
+ const SwTOXBase* GetCurTOX() const;
+ const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate = FALSE );
+ void SetDefaultTOXBase(const SwTOXBase& rBase);
+
+ BOOL IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const;
+ void SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly);
+
+ USHORT GetTOXCount() const;
+ const SwTOXBase* GetTOX( USHORT nPos ) const;
+ BOOL DeleteTOX( const SwTOXBase& rTOXBase, BOOL bDelNodes = FALSE );
+
+ // nach einlesen einer Datei alle Verzeichnisse updaten
+ void SetUpdateTOX( BOOL bFlag = TRUE );
+ BOOL IsUpdateTOX() const;
+
+ // Verzeichnis-Typen verwalten
+ USHORT GetTOXTypeCount(TOXTypes eTyp) const;
+ const SwTOXType* GetTOXType(TOXTypes eTyp, USHORT nId) const;
+ void InsertTOXType(const SwTOXType& rTyp);
+
+ // new field stuff
+ BOOL UpdateField(sw::mark::IFieldmark &fieldBM);
+
+ //AutoMark file
+ const String& GetTOIAutoMarkURL() const;
+ void SetTOIAutoMarkURL(const String& rSet);
+ void ApplyAutoMark();
+
+ // Schluessel fuer die Indexverwaltung
+ USHORT GetTOIKeys( SwTOIKeyType eTyp, SvStringsSort& rArr ) const;
+
+ void SetOutlineNumRule(const SwNumRule&);
+ const SwNumRule* GetOutlineNumRule() const;
+ // Gliederung - hoch-/runterstufen
+ BOOL OutlineUpDown( short nOffset = 1 );
+ // Gliederung - hoch-/runtermoven
+ BOOL MoveOutlinePara( short nOffset = 1);
+ // Outlines and SubOutline are protected ?
+ BOOL IsProtectedOutlinePara() const;
+
+ // Numerierung Aufzaehlunglisten
+ // liefert Regelwerk der aktuellen Aufzaehlung (FALSE sonst)
+ const SwNumRule* GetCurNumRule() const;
+
+ // setzt, wenn noch keine Numerierung, sonst wird geaendert
+ // arbeitet mit alten und neuen Regeln, nur Differenzen aktualisieren
+ // --> OD 2008-02-08 #newlistlevelattrs#
+ // Add optional parameter <bResetIndentAttrs> (default value FALSE).
+ // If <bResetIndentAttrs> equals true, the indent attributes "before text"
+ // and "first line indent" are additionally reset at the current selection,
+ // if the list style makes use of the new list level attributes.
+ // --> OD 2008-03-17 #refactorlists#
+ // introduce parameters <bCreateNewList> and <sContinuedListId>
+ // <bCreateNewList> indicates, if a new list is created by applying the
+ // given list style.
+ // If <bCreateNewList> equals FALSE, <sContinuedListId> may contain the
+ // list Id of a list, which has to be continued by applying the given list style
+ void SetCurNumRule( const SwNumRule&,
+ const bool bCreateNewList /*= false*/,
+ const String sContinuedListId = String(),
+ const bool bResetIndentAttrs = false );
+ // <--
+ // Absaetze ohne Numerierung, aber mit Einzuegen
+ BOOL NoNum();
+ // Loeschen, Splitten der Aufzaehlungsliste
+ void DelNumRules();
+ // Hoch-/Runterstufen
+ BOOL NumUpDown( BOOL bDown = TRUE );
+ // Hoch-/Runtermoven sowohl innerhalb als auch ausserhalb von Numerierungen
+ BOOL MoveParagraph( long nOffset = 1);
+ BOOL MoveNumParas( BOOL bUpperLower, BOOL bUpperLeft );
+ // No-/Numerierung ueber Delete/Backspace ein/abschalten #115901#
+ BOOL NumOrNoNum( BOOL bDelete = FALSE, BOOL bChkStart = TRUE);
+ // -> #i23726#
+ // --> OD 2008-06-09 #i90078#
+ // Remove unused default parameter <nLevel> and <bRelative>.
+ // Adjust method name and parameter name
+ void ChangeIndentOfAllListLevels( short nDiff );
+ // Adjust method name
+ void SetIndent(short nIndent, const SwPosition & rPos);
+ // <--
+ BOOL IsFirstOfNumRule() const;
+ BOOL IsFirstOfNumRule(const SwPaM & rPaM) const;
+ // <- #i23726#
+
+ BOOL IsNoNum( BOOL bChkStart = TRUE ) const;
+ // returne den Num-Level des Nodes, in dem sich der Point vom
+ // Cursor befindet. Return kann sein :
+ // - NO_NUMBERING, 0..MAXLEVEL-1, NO_NUMLEVEL .. NO_NUMLEVEL|MAXLEVEL-1
+ // --> OD 2008-02-29 #refactorlists# - removed <pHasChilds>
+// BYTE GetNumLevel( BOOL* pHasChilds = 0 ) const;
+ BYTE GetNumLevel() const;
+ // <--
+ // detect highest and lowest level to check moving of outline levels
+ void GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower );
+
+
+ // get Outline level of current paragraph
+ int GetCurrentParaOutlineLevel( ) const;// #outlinelevel add by zhaojianwei
+
+ // -> i29560
+ BOOL HasNumber() const;
+ BOOL HasBullet() const;
+ // <- i29560
+
+ String GetUniqueNumRuleName( const String* pChkStr = 0, BOOL bAutoNum = TRUE ) const;
+ void ChgNumRuleFmts( const SwNumRule& rRule );
+ // setze und erfrage, ob an aktueller PointPos eine Numerierung mit
+ // dem StartFlag startet
+ void SetNumRuleStart( BOOL bFlag = TRUE );
+ BOOL IsNumRuleStart() const;
+ void SetNodeNumStart( USHORT nStt );
+ // --> OD 2008-02-29 #refactorlists#
+ USHORT GetNodeNumStart() const;
+ // <--
+ BOOL ReplaceNumRule( const String& rOldRule, const String& rNewRule );
+ // Searches for a text node with a numbering rule.
+ // --> OD 2008-03-18 #refactorlists# - add output parameter <sListId>
+ // in case a list style is found, <sListId> holds the list id, to which the
+ // text node belongs, which applies the found list style.
+ const SwNumRule * SearchNumRule(const bool bForward,
+ const bool bNum,
+ const bool bOutline,
+ int nNonEmptyAllowed,
+ String& sListId );
+ // <--
+
+ // Undo
+ // UndoHistory am Dokument pflegen
+ // bei Save, SaveAs, Create wird UndoHistory zurueckgesetzt ???
+ void DoUndo( BOOL bOn = TRUE );
+ BOOL DoesUndo() const;
+ void DoGroupUndo( BOOL bUn = TRUE );
+ BOOL DoesGroupUndo() const;
+ void DelAllUndoObj();
+
+ // macht rueckgaengig:
+ // setzt Undoklammerung auf, liefert nUndoId der Klammerung
+ SwUndoId StartUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
+ // schliesst Klammerung der nUndoId, nicht vom UI benutzt
+ SwUndoId EndUndo( SwUndoId eUndoId = UNDO_EMPTY, const SwRewriter * pRewriter = 0 );
+ // liefert die Id der letzten undofaehigen Aktion zurueck
+ // fuellt ggf. VARARR mit User-UndoIds
+ SwUndoId GetUndoIds( String* pUndoStr = 0, SwUndoIds *pUndoIds = 0) const;
+ String GetUndoIdsStr( String* pUndoStr = 0, SwUndoIds *pUndoIds = 0) const;
+
+ // abfragen/setzen der Anzahl von wiederherstellbaren Undo-Actions
+ static USHORT GetUndoActionCount();
+ static void SetUndoActionCount( USHORT nNew );
+
+ // Redo
+ // liefert die Id der letzten Redofaehigen Aktion zurueck
+ // fuellt ggf. VARARR mit RedoIds
+ SwUndoId GetRedoIds( String* pRedoStr = 0, SwUndoIds *pRedoIds = 0) const;
+ String GetRedoIdsStr( String* pRedoStr = 0, SwUndoIds *pRedoIds = 0) const;
+
+ // Repeat
+ // liefert die Id der letzten Repeatfaehigen Aktion zurueck
+ // fuellt ggf. VARARR mit RedoIds
+ SwUndoId GetRepeatIds( String* pRepeatStr = 0, SwUndoIds *pRedoIds = 0) const;
+ String GetRepeatIdsStr( String* pRepeatStr = 0,
+ SwUndoIds *pRedoIds = 0) const;
+
+ // 0 letzte Aktion, sonst Aktionen bis zum Start der Klammerung nUndoId
+ // mit KillPaMs, ClearMark
+ BOOL Undo(SwUndoId nUndoId = UNDO_EMPTY, USHORT nCnt = 1 );
+ // wiederholt
+ USHORT Repeat( USHORT nCount );
+ // wiederholt
+ USHORT Redo( USHORT nCnt = 1 );
+ // fuer alle Sichten auf dieses Dokument
+ void StartAllAction();
+ void EndAllAction();
+
+ //Damit Start-/EndActions aufgesetzt werden koennen.
+ void CalcLayout();
+
+ // Inhaltsform bestimmen, holen, liefert Type am CurCrsr->SPoint
+ USHORT GetCntType() const;
+ BOOL HasOtherCnt() const; // gibt es Rahmen, Fussnoten, ...
+
+ /* Anwenden der ViewOptions mit Start-/EndAction */
+ inline void ApplyViewOptions( const SwViewOption &rOpt );
+
+ // Text innerhalb der Selektion erfragen
+ // Returnwert liefert FALSE, wenn der selektierte Bereich
+ // zu gross ist, um in den Stringpuffer kopiert zu werden
+ // oder andere Fehler auftreten
+ BOOL GetSelectedText( String &rBuf,
+ int nHndlParaBreak = GETSELTXT_PARABRK_TO_BLANK );
+
+ /*
+ * liefert eine Graphic, wenn CurCrsr->Point() auf einen
+ * SwGrfNode zeigt (und Mark nicht gesetzt ist oder auf die
+ * gleiche Graphic zeigt), sonst gibt's was auf die Finger
+ */
+ // --> OD 2005-02-09 #119353# - robust
+ const Graphic* GetGraphic( BOOL bWait = TRUE ) const;
+ const GraphicObject* GetGraphicObj() const;
+ // <--
+ BOOL IsGrfSwapOut( BOOL bOnlyLinked = FALSE ) const;
+ USHORT GetGraphicType() const;
+
+ const PolyPolygon *GetGraphicPolygon() const;
+ void SetGraphicPolygon( const PolyPolygon *pPoly );
+
+ // If there's an automatic, not manipulated polygon at the selected
+ // notxtnode, it has to be deleted, e.g. cause the object has changed.
+ void ClearAutomaticContour();
+
+ /*
+ * liefert die Groesse einer Graphic in Twips, wenn der Cursor
+ * auf einer Graphic steht; BOOL liefert FALSE, wenn s.o.
+ */
+ BOOL GetGrfSize(Size&) const;
+ /*
+ * liefert den Namen und den Filter einer Graphic, wenn der Cursor
+ * auf einer Graphic steht, sonst gibt's was auf die Finger!
+ * Ist ein String-Ptr != 0 dann returne den entsp. Namen
+ */
+ void GetGrfNms( String* pGrfName, String* pFltName,
+ const SwFlyFrmFmt* = 0 ) const;
+ /*
+ * erneutes Einlesen, falls Graphic nicht Ok ist. Die
+ * aktuelle wird durch die neue ersetzt.
+ */
+ void ReRead( const String& rGrfName, const String& rFltName,
+ const Graphic* pGraphic = 0,
+ const GraphicObject* pGrafObj = 0 );
+
+// // alternativen Text einer Grafik/OLe-Objectes abfragen/setzen
+// const String& GetAlternateText() const;
+// void SetAlternateText( const String& rTxt );
+
+ //eindeutige Identifikation des Objektes (fuer ImageMapDlg)
+ void *GetIMapInventor() const;
+ // --> OD 2007-03-01 #i73788#
+ // remove default parameter, because method always called this default value
+ Graphic GetIMapGraphic() const; //liefert eine Graphic fuer alle Flys!
+ // <--
+ const SwFlyFrmFmt* FindFlyByName( const String& rName, BYTE nNdTyp = 0 ) const;
+
+ //liefert ein ClientObject, wenn CurCrsr->Point() auf einen
+ //SwOLENode zeigt (und Mark nicht gesetzt ist oder auf das
+ //gleiche ClientObject zeigt), sonst gibt's was auf die
+ //Finger.
+ svt::EmbeddedObjectRef& GetOLEObject() const;
+ //Gibt es ein OleObject mit diesem Namen (SwFmt)?
+ BOOL HasOLEObj( const String &rName ) const;
+
+ //Liefert den Pointer auf die Daten des Chart, indem sich der Crsr
+ //befindet.
+ void SetChartName( const String &rName );
+
+ //Updaten der Inhalte aller Charts zu der Tabelle mit dem angegeben Namen
+ void UpdateCharts( const String &rName );
+
+ // aktuelles Wort erfragen
+ String GetCurWord();
+
+ // Textbaustein aus dem Textbausteindokument in
+ // das aktuelle Dokument, Vorlagen nur wenn es nicht schon gibt
+ void InsertGlossary( SwTextBlocks& rGlossary, const String& );
+ // aktuelle Selektion zum Textbaustein machen und ins
+ // Textbausteindokument einfuegen, einschliesslich Vorlagen
+ USHORT MakeGlossary( SwTextBlocks& rToFill, const String& rName,
+ const String& rShortName, BOOL bSaveRelFile = FALSE,
+ const String* pOnlyTxt=0 );
+ // speicher den gesamten Inhalt des Docs als Textbaustein
+ USHORT SaveGlossaryDoc( SwTextBlocks& rGlossary, const String& rName,
+ const String& rShortName,
+ BOOL bSaveRelFile = FALSE,
+ BOOL bOnlyTxt = FALSE );
+
+ // Linguistik
+ // Selektionen sichern
+ void HyphStart( SwDocPositions eStart, SwDocPositions eEnde );
+ // Selektionen wiederherstellen
+ void HyphEnd();
+ com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
+ HyphContinue( USHORT* pPageCnt, USHORT* pPageSt );
+ // zu trennendes Wort ignorieren
+ void HyphIgnore();
+
+ // zum Einfuegen des SoftHyphens, Position ist der Offset
+ // innerhalb des getrennten Wortes.
+ void InsertSoftHyph( const xub_StrLen nHyphPos );
+
+ //Tabelle
+ const SwTable& InsertTable( const SwInsertTableOptions& rInsTblOpts, // ALL_TBL_INS_ATTR
+ USHORT nRows, USHORT nCols,
+ sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
+ const SwTableAutoFmt* pTAFmt = 0 );
+
+ void InsertDDETable( const SwInsertTableOptions& rInsTblOpts, // HEADLINE_NO_BORDER
+ SwDDEFieldType* pDDEType,
+ USHORT nRows, USHORT nCols,
+ sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL );
+
+ void UpdateTable();
+ void SetTableName( SwFrmFmt& rTblFmt, const String &rNewName );
+
+ SwFrmFmt *GetTableFmt();
+ BOOL TextToTable( const SwInsertTableOptions& rInsTblOpts, //ALL_TBL_INS_ATTR
+ sal_Unicode cCh,
+ sal_Int16 eAdj = com::sun::star::text::HoriOrientation::FULL,
+ const SwTableAutoFmt* pTAFmt = 0 );
+ BOOL TableToText( sal_Unicode cCh );
+ BOOL IsTextToTableAvailable() const;
+
+ BOOL GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const;
+ void SetTblBoxFormulaAttrs( const SfxItemSet& rSet );
+
+ BOOL IsTableBoxTextFormat() const;
+ String GetTableBoxText() const;
+
+ // Change Modus erfragen/setzen
+ TblChgMode GetTblChgMode() const;
+ void SetTblChgMode( TblChgMode eMode );
+
+ // Tabelle an der Cursor Position aufsplitten
+ BOOL SplitTable( USHORT eMode );
+ // Tabellen verbinden
+ // CanMerge kann feststellen, ob Prev oder Next moeglich ist. Wird
+ // der Pointer pChkNxtPrv uebergeben, wird festgestellt in welche
+ // Richtung es moeglich ist.
+ BOOL CanMergeTable( BOOL bWithPrev = TRUE, BOOL* pChkNxtPrv = 0 ) const;
+ BOOL MergeTable( BOOL bWithPrev = TRUE, USHORT nMode = 0 );
+ // setze das InsertDB als Tabelle Undo auf:
+ void AppendUndoForInsertFromDB( BOOL bIsTable );
+
+ /*
+ functions used for spell checking and text conversion
+ */
+
+ // Selektionen sichern
+ void SpellStart( SwDocPositions eStart, SwDocPositions eEnde,
+ SwDocPositions eCurr, SwConversionArgs *pConvArgs = 0 );
+ // Selektionen wiederherstellen
+ void SpellEnd( SwConversionArgs *pConvArgs = 0, bool bRestoreSelection = true );
+ ::com::sun::star::uno::Any SpellContinue(
+ USHORT* pPageCnt, USHORT* pPageSt,
+ SwConversionArgs *pConvArgs = 0 );
+
+ // spells on a sentence basis - the SpellPortions are needed
+ // returns false if no error could be found
+ bool SpellSentence(::svx::SpellPortions& rToFill, bool bIsGrammarCheck );
+ // make SpellIter start with the current sentence when called next time
+ void PutSpellingToSentenceStart();
+ // moves the continuation position to the end of the currently checked sentence
+ void MoveContinuationPosToEndOfCheckedSentence();
+ //applies a changed sentence
+ void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck);
+
+
+ // check SwSpellIter data to see if the last sentence got grammar checked
+ bool HasLastSentenceGotGrammarChecked() const;
+ // Is text conversion active somewhere else?
+ BOOL HasConvIter() const;
+ // Is hyphenation active somewhere else?
+ BOOL HasHyphIter() const;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellAlternatives >
+ GetCorrection( const Point* pPt, SwRect& rSelectRect );
+
+
+ bool GetGrammarCorrection( ::com::sun::star::linguistic2::ProofreadingResult /*out*/ &rResult,
+ sal_Int32 /*out*/ &rErrorPosInText,
+ sal_Int32 /*out*/ &rErrorIndexInResult,
+ ::com::sun::star::uno::Sequence< rtl::OUString > /*out*/ &rSuggestions,
+ const Point* pPt, SwRect& rSelectRect );
+
+ void IgnoreGrammarErrorAt( SwPaM& rErrorPosition );
+ void SetLinguRange( SwDocPositions eStart, SwDocPositions eEnde );
+
+ // returne zum Namen die im Doc gesetzte Referenz
+ const SwFmtRefMark* GetRefMark( const String& rName ) const;
+ // returne die Namen aller im Doc gesetzten Referenzen
+ // Ist der ArrayPointer 0 dann returne nur, ob im Doc. eine RefMark
+ // gesetzt ist
+ USHORT GetRefMarks( SvStringsDtor* = 0 ) const;
+
+ // rufe die Autokorrektur auf
+ void AutoCorrect( SvxAutoCorrect& rACorr, BOOL bInsertMode = TRUE,
+ sal_Unicode cChar = ' ' );
+ BOOL GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord );
+
+ // dann setze nach entsprechenden Regeln unsere Vorlagen
+ void AutoFormat( const SvxSwAutoFmtFlags* pAFlags = 0 );
+
+ static SvxSwAutoFmtFlags* GetAutoFmtFlags();
+ static void SetAutoFmtFlags(SvxSwAutoFmtFlags *);
+
+ // errechnet die Selektion
+ String Calculate();
+
+ BOOL InsertURL( const SwFmtINetFmt& rFmt, const String& rStr,
+ BOOL bKeepSelection = FALSE );
+ USHORT GetINetAttrs( SwGetINetAttrs& rArr );
+
+ //SS Fuer holen/ersetzen DropCap-Inhalt
+ String GetDropTxt( const USHORT nChars ) const;
+ void ReplaceDropTxt( const String &rStr );
+
+ // may an outline be moved or copied?
+ // Check whether it's in text body, not in table, and not read-only (move)
+ BOOL IsOutlineMovable( USHORT nIdx ) const;
+ BOOL IsOutlineCopyable( USHORT nIdx ) const;
+
+ USHORT GetLineCount( BOOL bActPos = TRUE );
+
+ // erfrage und setze den Fussnoten-Text/Nummer. Set.. auf akt. SSelection!
+ BOOL GetCurFtn( SwFmtFtn* pToFillFtn = 0 );
+ bool SetCurFtn( const SwFmtFtn& rFillFtn );
+ bool HasFtns( bool bEndNotes = false ) const;
+//z.Zt nicht benoetigt USHORT GetFtnCnt( BOOL bEndNotes = FALSE ) const;
+ // gebe Liste aller Fussnoten und deren Anfangstexte
+ USHORT GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes = false );
+
+ SwSection const* InsertSection(
+ SwSectionData & rNewData, SfxItemSet const*const = 0 );
+ BOOL IsInsRegionAvailable() const;
+ const SwSection* GetCurrSection() const;
+ // liefert wie GetCurrSection() den aktuellen Bereich, allerdings geht diese Funktion
+ // ueber die Frames und erwischt dabei auch den Bereich, wenn der Cursor in einer
+ // Fussnote steht, deren Referenz in einem spaltigen Bereich steckt.
+ // Wenn man bOutOfTab setzt, wird der Bereich gesucht,
+ // der die Tabelle umfasst, nicht etwa ein innerer.
+ const SwSection* GetAnySection( BOOL bOutOfTab = FALSE, const Point* pPt = 0 ) const;
+
+ USHORT GetSectionFmtCount() const;
+ USHORT GetSectionFmtPos( const SwSectionFmt& ) const;
+ const SwSectionFmt& GetSectionFmt(USHORT nFmt) const;
+ void DelSectionFmt( USHORT nFmt );
+ void UpdateSection(sal_uInt16 const nSect, SwSectionData &,
+ SfxItemSet const*const = 0);
+ BOOL IsAnySectionInDoc( BOOL bChkReadOnly = FALSE,
+ BOOL bChkHidden = FALSE,
+ BOOL BChkTOX = FALSE ) const;
+
+ String GetUniqueSectionName( const String* pChkStr = 0 ) const;
+
+ //Attribute setzen
+ void SetSectionAttr(const SfxItemSet& rSet, SwSectionFmt* pSectFmt = 0);
+
+ // search inside the cursor selection for full selected sections.
+ // if any part of section in the selection return 0.
+ // if more than one in the selection return the count
+ USHORT GetFullSelectedSectionCount() const;
+
+ // special insert: Insert a new text node just before or after a section or
+ // table, if the cursor is positioned at the start/end of said
+ // section/table. The purpose of the method is to allow users to inert text
+ // at certain 'impossible' position, e.g. before a table at the document
+ // start or between to sections.
+ bool DoSpecialInsert();
+ bool CanSpecialInsert() const;
+
+ // Optimierung UI
+ void SetNewDoc(BOOL bNew = TRUE);
+
+ sfx2::LinkManager& GetLinkManager();
+ inline const sfx2::LinkManager& GetLinkManager() const;
+
+ // linken Rand ueber Objectleiste einstellen (aenhlich dem Stufen von
+ // Numerierungen), optional kann man "um" den Offset stufen oder "auf"
+ // die Position gestuft werden (bModulus = TRUE)
+ BOOL IsMoveLeftMargin( BOOL bRight = TRUE, BOOL bModulus = TRUE ) const;
+ void MoveLeftMargin( BOOL bRight = TRUE, BOOL bModulus = TRUE );
+
+ // Numberformatter vom Doc erfragen
+ SvNumberFormatter* GetNumberFormatter();
+ const SvNumberFormatter* GetNumberFormatter() const
+ { return ((SwEditShell*)this)->GetNumberFormatter(); }
+
+ // Schnitstellen fuers GlobalDokument
+ BOOL IsGlobalDoc() const;
+ void SetGlblDocSaveLinks( BOOL bFlag = TRUE );
+ BOOL IsGlblDocSaveLinks() const;
+ USHORT GetGlobalDocContent( SwGlblDocContents& rArr ) const;
+ BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
+ SwSectionData & rNew );
+ BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos,
+ const SwTOXBase& rTOX );
+ BOOL InsertGlobalDocContent( const SwGlblDocContent& rPos );
+ BOOL DeleteGlobalDocContent( const SwGlblDocContents& rArr,
+ USHORT nPos );
+ BOOL MoveGlobalDocContent( const SwGlblDocContents& rArr ,
+ USHORT nFromPos, USHORT nToPos,
+ USHORT nNewPos );
+ BOOL GotoGlobalDocContent( const SwGlblDocContent& rPos );
+
+ // alles fuers Redlining
+ USHORT GetRedlineMode() const;
+ void SetRedlineMode( USHORT eMode );
+ BOOL IsRedlineOn() const;
+ USHORT GetRedlineCount() const;
+ const SwRedline& GetRedline( USHORT nPos ) const;
+ BOOL AcceptRedline( USHORT nPos );
+ BOOL RejectRedline( USHORT nPos );
+ // suche das Redline zu diesem Data und returne die Pos im Array
+ // USHRT_MAX wird returnt, falls nicht vorhanden
+ USHORT FindRedlineOfData( const SwRedlineData& ) const;
+
+ // Kommentar am Redline an der Position setzen
+ BOOL SetRedlineComment( const String& rS );
+ const SwRedline* GetCurrRedline() const;
+
+ // Redline Anzeigeattribute wurden geaendert, Views updaten
+ void UpdateRedlineAttr();
+
+ // vergleiche zwei Dokument mit einander
+ long CompareDoc( const SwDoc& rDoc );
+ // merge zweier Dokumente
+ long MergeDoc( const SwDoc& rDoc );
+
+ // Dokumentglobale Fussnoteneigenschaften
+ const SwFtnInfo& GetFtnInfo() const;
+ void SetFtnInfo(const SwFtnInfo& rInfo);
+ const SwEndNoteInfo& GetEndNoteInfo() const;
+ void SetEndNoteInfo(const SwEndNoteInfo& rInfo);
+
+ //Einstellungen fuer Zeilennummierung
+ const SwLineNumberInfo &GetLineNumberInfo() const;
+ void SetLineNumberInfo( const SwLineNumberInfo& rInfo);
+
+ // Etiketten: Bereiche synchronisieren
+ void SetLabelDoc( BOOL bFlag = TRUE );
+ BOOL IsLabelDoc() const;
+
+ // Schnittstelle fuer die TextInputDaten - ( fuer die Texteingabe
+ // von japanischen/chinesischen Zeichen)
+ SwExtTextInput* CreateExtTextInput(LanguageType eInputLanguage);
+ String DeleteExtTextInput( SwExtTextInput* pDel = 0, BOOL bInsText = TRUE);
+// SwExtTextInput* GetExtTextInput() const;
+ void SetExtTextInputData( const CommandExtTextInputData& );
+
+ // Schnistelle fuer den Zugriff auf die AutoComplete-Liste
+ static SwAutoCompleteWord& GetAutoCompleteWords();
+
+ // returns a scaling factor of selected text. Used for the rotated
+ // character attribut dialog.
+ USHORT GetScalingOfSelectedText() const;
+
+ // ctor/dtor
+ SwEditShell( SwDoc&, Window*, const SwViewOption *pOpt = 0 );
+ // verkleideter Copy-Constructor
+ SwEditShell( SwEditShell&, Window* );
+ virtual ~SwEditShell();
+
+private:
+ // fuer METWARE:
+ // es wird nicht kopiert und nicht zugewiesen
+ SwEditShell(const SwEditShell &);
+ const SwEditShell &operator=(const SwEditShell &);
+};
+
+inline void SwEditShell::ApplyViewOptions( const SwViewOption &rOpt )
+{
+ SwCrsrShell::StartAction();
+ ViewShell::ApplyViewOptions( rOpt );
+ SwEditShell::EndAction();
+}
+
+inline const sfx2::LinkManager& SwEditShell::GetLinkManager() const
+{ return ((SwEditShell*)this)->GetLinkManager(); }
+
+/*
+ * Klasse fuer den automatisierten Aufruf von Start- und
+ * EndAction();
+ */
+class SwActKontext {
+ SwEditShell *pSh;
+public:
+ SwActKontext(SwEditShell *pShell);
+ ~SwActKontext();
+};
+
+#define ACT_KONTEXT(x) SwActKontext _aActKontext_(x)
+
+/*
+ * Klasse fuer den automatisierten Aufruf von Start- und
+ * EndCrsrMove();
+ */
+class SwMvKontext {
+ SwEditShell *pSh;
+public:
+ SwMvKontext(SwEditShell *pShell );
+ ~SwMvKontext();
+};
+
+#define MV_KONTEXT(x) SwMvKontext _aMvKontext_(x)
+
+
+
+#endif
diff --git a/sw/inc/envelp.hrc b/sw/inc/envelp.hrc
new file mode 100644
index 000000000000..ce210d4b6f2b
--- /dev/null
+++ b/sw/inc/envelp.hrc
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ENVELP_HRC
+#define _ENVELP_HRC
+
+// #include -------------------------------------------------------------------
+
+#include "rcid.hrc"
+
+// Dialoge --------------------------------------------------------------------
+
+#define DLG_ENV (RC_ENVELP_BEGIN )
+#define DLG_LAB (RC_ENVELP_BEGIN + 1)
+
+#define TP_ENV_ENV (RC_ENVELP_BEGIN + 2)
+#define TP_ENV_FMT (RC_ENVELP_BEGIN + 3)
+#define TP_ENV_PRT (RC_ENVELP_BEGIN + 4)
+
+#define TP_LAB_LAB (RC_ENVELP_BEGIN + 5)
+#define TP_LAB_FMT (RC_ENVELP_BEGIN + 6)
+#define TP_LAB_PRT (RC_ENVELP_BEGIN + 7)
+
+#define DLG_MAILMERGE (RC_ENVELP_BEGIN + 8)
+
+#define DLG_SYNC_BTN (RC_ENVELP_BEGIN + 9)
+#define DLG_SAVE_LABEL (RC_ENVELP_BEGIN + 10)
+
+// Bereiche -------------------------------------------------------------------
+
+#define RC_ENVLOP_BEGIN (RC_ENVELP_BEGIN )
+#define RC_ENVLOP_END (RC_ENVELP_BEGIN + 9)
+
+#define RC_ENVFMT_BEGIN (RC_ENVELP_BEGIN + 10)
+#define RC_ENVFMT_END (RC_ENVELP_BEGIN + 19)
+
+#define RC_ENVPRT_BEGIN (RC_ENVELP_BEGIN + 20)
+#define RC_ENVPRT_END (RC_ENVELP_BEGIN + 39)
+
+#define RC_LABEL_BEGIN (RC_ENVELP_BEGIN + 40)
+#define RC_LABEL_END (RC_ENVELP_BEGIN + 49)
+
+#define RC_LABFMT_BEGIN (RC_ENVELP_BEGIN + 50)
+#define RC_LABFMT_END (RC_ENVELP_BEGIN + 59)
+
+#define RC_LABPRT_BEGIN (RC_ENVELP_BEGIN + 60)
+#define RC_LABPRT_END (RC_ENVELP_BEGIN + 69)
+
+// Strings --------------------------------------------------------------------
+
+#define STR_DATABASE_NOT_OPENED (RC_ENVLOP_BEGIN + 60)
+#define STR_NO_DRIVERS (RC_ENVLOP_BEGIN + 61)
+#define DLG_MERGE_CREATE (RC_ENVLOP_BEGIN + 62)
+#define DLG_MERGE_FIELD_CONNECTIONS (RC_ENVLOP_BEGIN + 63)
+
+#define STR_BTN_NEW_DOC (RC_ENVLOP_BEGIN + 64)
+#define STR_BTN_NEWDOC (RC_ENVLOP_BEGIN + 65)
+#define STR_SENDER_TOKENS (RC_ENVLOP_BEGIN + 66)
+
+#define RC_ENVPRT_HC_BEGIN (RC_ENVLOP_BEGIN + 70)
+#define RC_ENVPRT_HC_END (RC_ENVLOP_BEGIN + 82)
+
+// Ueberlaufpruefung ----------------------------------------------------------
+
+#define ENVELP_ACT_END STR_SENDER_TOKENS
+
+#if ENVELP_ACT_END > RC_ENVPRT_HC_END
+#error Resource-Ueberlauf in #file, #line
+#endif
+
+#endif
+
+
diff --git a/sw/inc/errhdl.hxx b/sw/inc/errhdl.hxx
new file mode 100644
index 000000000000..222de5caaa10
--- /dev/null
+++ b/sw/inc/errhdl.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ERRHDL_HXX
+#define _ERRHDL_HXX
+
+#ifdef DBG_UTIL
+
+#include <tools/solar.h>
+#include <sal/types.h>
+#include "swdllapi.h"
+
+extern BOOL bAssert; // TRUE, wenn eine ASSERT-Box hochkam
+
+
+// -----------------------------------------------------------------------
+// Ausgabe einer Fehlermeldung inkl. Dateiname und Zeilennummer
+// wo der Fehler auftrat.
+// Die Funktion darf nicht direkt benutzt werden!
+// -----------------------------------------------------------------------
+SW_DLLPUBLIC void AssertFail( const sal_Char*, const sal_Char*, USHORT );
+SW_DLLPUBLIC void AssertFail( USHORT, const sal_Char*, USHORT );
+
+#define ASSERT( cond, message ) \
+ if( !(cond) ) { \
+ const char *_pErrorText = #message; \
+ const char *_pFileName = __FILE__; \
+ ::AssertFail( _pErrorText, _pFileName, __LINE__ ); \
+ }
+
+// -----------------------------------------------------------------------
+// Prueft ob die angegebene Bedingung wahr ist, wenn nicht wird eine
+// Fehlermeldung die ueber die ID Identifiziert wird, ausgegeben.
+// -----------------------------------------------------------------------
+#define ASSERT_ID( cond, id ) \
+ if( !(cond) ) { \
+ const char *_pFileName = __FILE__; \
+ ::AssertFail( (USHORT)id, _pFileName, __LINE__ ); \
+ }
+
+
+// -----------------------------------------------------------------------
+// Beim Bilden der Produktversion werden alle Debug-Utilities automatisch
+// ignoriert
+// -----------------------------------------------------------------------
+#else
+#define ASSERT( cond, message ) ;
+#define ASSERT_ID( cond, id ) ;
+#endif // PRODUCT
+
+
+
+#endif
diff --git a/sw/inc/error.h b/sw/inc/error.h
new file mode 100644
index 000000000000..649deeb8a5be
--- /dev/null
+++ b/sw/inc/error.h
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWERROR_H
+#define _SWERROR_H
+
+#define ERR_SWGBASE 25000
+
+/*** Error Codes **********************************************************/
+#define ERR_VAR_IDX (ERR_SWGBASE+ 0)
+#define ERR_OUTOFSCOPE (ERR_SWGBASE+ 1)
+
+/* Error Codes fuer Numerierungsregeln */
+#define ERR_NUMLEVEL (ERR_SWGBASE+ 2)
+
+/* Error Codes fuer TxtNode */
+#define ERR_NOHINTS (ERR_SWGBASE+ 3)
+
+// von _START bis _END sind in der COREDL.DLL entsprechende Strings
+// abgelegt, die erfragt werden koennen.
+#define ERR_SWGMSG_START (ERR_VAR_IDX)
+#define ERR_SWGMSG_END (ERR_NOHINTS)
+
+
+
+#endif
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
new file mode 100644
index 000000000000..00598528e891
--- /dev/null
+++ b/sw/inc/expfld.hxx
@@ -0,0 +1,436 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _EXPFLD_HXX
+#define _EXPFLD_HXX
+
+#include <svl/svarray.hxx>
+#include "swdllapi.h"
+#include <fldbas.hxx>
+#include <cellfml.hxx>
+
+class SfxPoolItem;
+class SwTxtNode;
+class SwFrm;
+struct SwPosition;
+class SwTxtFld;
+class SwDoc;
+class SwFmtFld;
+class _SetGetExpFlds;
+class SwEditShell;
+
+// Vorwaertsdeklaration: besorge den "Body-TextNode", fuer Exp.Fld in Fly's
+// Header/Footers/Footnodes
+const SwTxtNode* GetBodyTxtNode( const SwDoc& pDoc, SwPosition& rPos,
+ const SwFrm& rFrm );
+// Wandlung Address -> Adressen
+void ReplacePoint(String& sTmpName, BOOL bWithCommandType = FALSE);
+
+struct _SeqFldLstElem
+{
+ String sDlgEntry;
+ USHORT nSeqNo;
+
+ _SeqFldLstElem( const String& rStr, USHORT nNo )
+ : sDlgEntry( rStr ), nSeqNo( nNo )
+ {}
+};
+SV_DECL_PTRARR_DEL( _SwSeqFldList, _SeqFldLstElem*, 10, 10 )
+
+class SW_DLLPUBLIC SwSeqFldList : public _SwSeqFldList
+{
+public:
+ SwSeqFldList() : _SwSeqFldList( 10, 10 ) {}
+
+ BOOL InsertSort( _SeqFldLstElem* );
+ BOOL SeekEntry( const _SeqFldLstElem& , USHORT* pPos = 0 );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Ausdruck
+ --------------------------------------------------------------------*/
+
+class SwGetExpFieldType : public SwValueFieldType
+{
+public:
+ SwGetExpFieldType(SwDoc* pDoc);
+ virtual SwFieldType* Copy() const;
+
+ // ueberlagert, weil das Get-Field nicht veraendert werden kann
+ // und dann auch nicht aktualisiert werden muss. Aktualisierung
+ // erfolgt beim Aendern von Set-Werten !
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: GetExperession
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwGetExpField : public SwFormulaField
+{
+ String sExpand;
+ BOOL bIsInBodyTxt;
+ USHORT nSubType;
+
+ bool bLateInitialization; // #i82544#
+
+public:
+ SwGetExpField( SwGetExpFieldType*, const String& rFormel,
+ USHORT nSubType = nsSwGetSetExpType::GSE_EXPR, ULONG nFmt = 0);
+
+ virtual void SetValue( const double& rVal );
+ virtual void SetLanguage(USHORT nLng);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline const String& GetExpStr() const;
+ inline void ChgExpStr(const String& rExpand);
+
+ // wird von der Formatierung abgefragt
+ inline BOOL IsInBodyTxt() const;
+ // wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+ inline void ChgBodyTxtFlag( BOOL bIsInBody );
+ // fuer Felder in Header/Footer/Footnotes/Flys:
+ // (wird nur von der Formatierung aufgerufen!!)
+ void ChangeExpansion( const SwFrm&, const SwTxtFld& );
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+
+ // Die Formel aendern
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nType);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+
+ static USHORT GetReferenceTextPos( const SwFmtFld& rFmt, SwDoc& rDoc);
+ // #i82544#
+ void SetLateInitialization() { bLateInitialization = true;}
+};
+
+inline void SwGetExpField::ChgExpStr(const String& rExpand)
+ { sExpand = rExpand;}
+
+inline const String& SwGetExpField::GetExpStr() const
+ { return sExpand; }
+
+// wird von der Formatierung abgefragt
+inline BOOL SwGetExpField::IsInBodyTxt() const
+ { return bIsInBodyTxt; }
+
+// wird von UpdateExpFlds gesetzt (dort ist die Node-Position bekannt)
+inline void SwGetExpField::ChgBodyTxtFlag( BOOL bIsInBody )
+ { bIsInBodyTxt = bIsInBody; }
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Ausdruck setzen
+ --------------------------------------------------------------------*/
+
+class SwSetExpField;
+
+class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
+{
+ String sName;
+ const SwNode* pOutlChgNd;
+// sal_Unicode cDelim;
+ String sDelim;
+ USHORT nType;
+ BYTE nLevel;
+ BOOL bDeleted;
+
+public:
+ SwSetExpFieldType( SwDoc* pDoc, const String& rName,
+ USHORT nType = nsSwGetSetExpType::GSE_EXPR );
+ virtual SwFieldType* Copy() const;
+ virtual const String& GetName() const;
+
+ inline void SetType(USHORT nTyp);
+ inline USHORT GetType() const;
+
+ void SetSeqFormat(ULONG nFormat);
+ ULONG GetSeqFormat();
+
+ BOOL IsDeleted() const { return bDeleted; }
+ void SetDeleted( BOOL b ) { bDeleted = b; }
+
+ // ueberlagert, weil das Set-Field selbst dafuer sorgt, das
+ // es aktualisiert wird.
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+ inline const String& GetSetRefName() const;
+
+ USHORT SetSeqRefNo( SwSetExpField& rFld );
+
+ USHORT GetSeqFldList( SwSeqFldList& rList );
+ String MakeSeqName( USHORT nSeqNo );
+
+ // Seqencefelder ggfs. Kapitelweise numerieren
+// sal_Unicode GetDelimiter() const { return cDelim; }
+// void SetDelimiter( sal_Unicode c ) { cDelim = c; }
+ const String& GetDelimiter() const { return sDelim; }
+ void SetDelimiter( const String& s ) { sDelim = s; }
+ BYTE GetOutlineLvl() const { return nLevel; }
+ void SetOutlineLvl( BYTE n ) { nLevel = n; }
+ void SetChapter( SwSetExpField& rFld, const SwNode& rNd );
+ // Member nur fuers SwDoc::UpdateExpFld - wird nur waehrend der Laufzeit
+ // von SequencefeldTypen benoetigt!!!
+ const SwNode* GetOutlineChgNd() const { return pOutlChgNd; }
+ void SetOutlineChgNd( const SwNode* p ) { pOutlChgNd = p; }
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline void SwSetExpFieldType::SetType( USHORT nTyp )
+{
+ nType = nTyp;
+ EnableFormat( !(nType & (nsSwGetSetExpType::GSE_SEQ|nsSwGetSetExpType::GSE_STRING)));
+}
+
+inline USHORT SwSetExpFieldType::GetType() const
+ { return nType; }
+
+inline const String& SwSetExpFieldType::GetSetRefName() const
+ { return sName; }
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Ausdruck
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwSetExpField : public SwFormulaField
+{
+ String sExpand;
+ String aPText;
+ String aSeqText;
+ BOOL bInput;
+ USHORT nSeqNo;
+ USHORT nSubType;
+
+public:
+ SwSetExpField(SwSetExpFieldType*, const String& rFormel, ULONG nFmt = 0);
+
+ virtual void SetValue( const double& rVal );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ inline const String& GetExpStr() const;
+
+ inline void ChgExpStr( const String& rExpand );
+
+ inline void SetPromptText(const String& rStr);
+ inline const String& GetPromptText() const;
+
+ inline void SetInputFlag(BOOL bInp);
+ inline BOOL GetInputFlag() const;
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nType);
+
+ inline BOOL IsSequenceFld() const;
+
+ // fuer SequenceFelder - logische Nummer
+ inline void SetSeqNumber( USHORT n ) { nSeqNo = n; }
+ inline USHORT GetSeqNumber() const { return nSeqNo; }
+
+ // Der Name nur erfragen
+ virtual const String& GetPar1() const;
+
+ // Die Formel
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+inline const String& SwSetExpField::GetExpStr() const
+ { return sExpand; }
+
+inline void SwSetExpField::ChgExpStr( const String& rExpand )
+ { sExpand = rExpand; }
+
+inline void SwSetExpField::SetPromptText(const String& rStr)
+ { aPText = rStr; }
+
+inline const String& SwSetExpField::GetPromptText() const
+ { return aPText; }
+
+inline void SwSetExpField::SetInputFlag(BOOL bInp)
+ { bInput = bInp; }
+
+inline BOOL SwSetExpField::GetInputFlag() const
+ { return bInput; }
+
+inline BOOL SwSetExpField::IsSequenceFld() const
+ { return 0 != (nsSwGetSetExpType::GSE_SEQ & ((SwSetExpFieldType*)GetTyp())->GetType()); }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Eingabe im Text/Variable setzen
+ --------------------------------------------------------------------*/
+
+class SwInputFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+public:
+ SwInputFieldType( SwDoc* pDoc );
+
+ virtual SwFieldType* Copy() const;
+
+ SwDoc* GetDoc() const { return pDoc; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Eingabefeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwInputField : public SwField
+{
+ String aContent;
+ String aPText;
+ String aHelp;
+ String aToolTip;
+ USHORT nSubType;
+public:
+ // Direkte Eingabe ueber Dialog alten Wert loeschen
+ SwInputField(SwInputFieldType*, const String& rContent ,
+ const String& rPrompt, USHORT nSubType = 0,
+ ULONG nFmt = 0);
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // Content
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // aPromptText
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ virtual String GetHelp() const;
+ virtual void SetHelp(const String & rStr);
+
+ virtual String GetToolTip() const;
+ virtual void SetToolTip(const String & rStr);
+
+ virtual BOOL isFormField() const;
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nSub);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+/*--------------------------------------------------------------------
+ Description: Sorted list of input fields and DropDown fields
+ --------------------------------------------------------------------*/
+
+class SwInputFieldList
+{
+public:
+ SwInputFieldList( SwEditShell* pShell, BOOL bBuildTmpLst = FALSE );
+ ~SwInputFieldList();
+
+ USHORT Count() const;
+ SwField* GetField(USHORT nId);
+
+ void GotoFieldPos(USHORT nId);
+ void PushCrsr();
+ void PopCrsr();
+
+ // vergleiche TmpLst mit akt Feldern. Alle neue kommen in die SortLst
+ // damit sie geupdatet werden koennen. Returnt die Anzahl.
+ // (Fuer Textbausteine: nur seine Input-Felder aktualisieren)
+ USHORT BuildSortLst();
+
+ // Alle unselektierten Felder aus Liste entfernen
+ void RemoveUnselectedFlds();
+
+private:
+ SwEditShell* pSh;
+ _SetGetExpFlds* pSrtLst;
+ SvPtrarr aTmpLst;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Tabellen-Formelfeld
+ (Implementierung steht in tblcalc.cxx)
+ --------------------------------------------------------------------*/
+
+class SwTblFieldType : public SwValueFieldType
+{
+public:
+ SwTblFieldType(SwDoc* pDocPtr);
+ virtual SwFieldType* Copy() const;
+};
+
+
+// MSC will den hier nicht
+//typedef void (SwField:: *FnScanFormel)( const SwTable&, String&,
+// String&, String* = 0, void* = 0 );
+
+
+class SwTblField : public SwValueField, public SwTableFormula
+{
+ String sExpand;
+ USHORT nSubType;
+
+ // suche den TextNode, in dem das Feld steht
+ virtual const SwNode* GetNodeOfFormula() const;
+
+public:
+ SwTblField( SwTblFieldType*, const String& rFormel,
+ USHORT nSubType = 0, ULONG nFmt = 0);
+
+ virtual void SetValue( const double& rVal );
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nType);
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ const String& GetExpStr() const { return sExpand; }
+ void ChgExpStr(const String& rStr) { sExpand = rStr; }
+
+ // berechne sich selbst
+ void CalcField( SwTblCalcPara& rCalcPara );
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ // Die Formel
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+};
+
+
+#endif // _EXPFLD_HXX
diff --git a/sw/inc/extinput.hxx b/sw/inc/extinput.hxx
new file mode 100644
index 000000000000..b3a07efa1906
--- /dev/null
+++ b/sw/inc/extinput.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _EXTINPUT_HXX
+#define _EXTINPUT_HXX
+
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_USHORTS
+#include <svl/svstdarr.hxx>
+#endif
+#include <pam.hxx>
+#include <i18npool/lang.h>
+
+class CommandExtTextInputData;
+
+class SwExtTextInput : public SwPaM
+{
+ SvUShorts aAttrs;
+ String sOverwriteText;
+ BOOL bInsText : 1;
+ BOOL bIsOverwriteCursor : 1;
+ LanguageType eInputLanguage;
+public:
+ SwExtTextInput( const SwPaM& rPam, Ring* pRing = 0 );
+ virtual ~SwExtTextInput();
+
+ void SetInputData( const CommandExtTextInputData& rData );
+ const SvUShorts& GetAttrs() const { return aAttrs; }
+ void SetInsText( BOOL bFlag ) { bInsText = bFlag; }
+ BOOL IsOverwriteCursor() const { return bIsOverwriteCursor; }
+ void SetOverwriteCursor( BOOL bFlag );
+ void SetLanguage(LanguageType eSet) { eInputLanguage = eSet;}
+};
+
+#endif //_EXTINPUT_HXX
+
diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx
new file mode 100644
index 000000000000..ee557e8eeaba
--- /dev/null
+++ b/sw/inc/fchrfmt.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FCHRFMT_HXX
+#define _FCHRFMT_HXX
+
+
+#include <svl/poolitem.hxx>
+#include <calbck.hxx>
+#include <format.hxx>
+
+class SwCharFmt;
+class SwTxtCharFmt;
+class IntlWrapper;
+
+// ATT_CHARFMT *********************************************
+
+
+class SW_DLLPUBLIC SwFmtCharFmt: public SfxPoolItem, public SwClient
+{
+ friend class SwTxtCharFmt;
+ SwTxtCharFmt* pTxtAttr; // mein TextAttribut
+
+public:
+ SwFmtCharFmt() : pTxtAttr(0) {}
+
+ // single argument ctors shall be explicit.
+ explicit SwFmtCharFmt( SwCharFmt *pFmt );
+ virtual ~SwFmtCharFmt();
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtCharFmt( const SwFmtCharFmt& rAttr );
+private:
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtCharFmt & operator= (const SwFmtCharFmt &);
+public:
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ 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 );
+
+ // an das SwTxtCharFmt weiterleiten (vom SwClient)
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ void SetCharFmt( SwFmt* pFmt ) { pFmt->Add(this); }
+ SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
+};
+#endif
+
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
new file mode 100644
index 000000000000..216f902e4b6c
--- /dev/null
+++ b/sw/inc/fesh.hxx
@@ -0,0 +1,786 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FESH_HXX
+#define _FESH_HXX
+
+#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/embed/XClassifiedObject.hpp>
+
+#include <svx/svdobj.hxx>
+#include "swdllapi.h"
+#include <editsh.hxx>
+#include <flyenum.hxx>
+
+// OD 25.06.2003 #108784#
+#include <svx/svdtypes.hxx>
+
+#include <svtools/embedhlp.hxx>
+
+#ifndef INCLUDED_VECTOR
+#include <vector>
+#define INCLUDED_VECTOR
+#endif
+
+
+class SwFlyFrm;
+class SwTabCols;
+class SvxBrushItem;
+class SvxFrameDirectionItem;
+class SwTableAutoFmt;
+class SwFrm;
+class SwFmtFrmSize;
+class SwFmtRowSplit;
+class SvxBorderLine;
+class SdrObject;
+class Color;
+class Outliner;
+class SotDataObject;
+class SwFrmFmt;
+struct SwSortOptions;
+class SdrMarkList;
+
+namespace svx
+{
+ class ISdrObjectFilter;
+}
+
+
+// return values for GetFrmType() und GetSelFrmType().
+//! values can be combined via logival or
+#define FRMTYPE_NONE (USHORT) 0
+#define FRMTYPE_PAGE (USHORT) 1
+#define FRMTYPE_HEADER (USHORT) 2
+#define FRMTYPE_FOOTER (USHORT) 4
+#define FRMTYPE_BODY (USHORT) 8
+#define FRMTYPE_COLUMN (USHORT) 16
+#define FRMTYPE_TABLE (USHORT) 32
+#define FRMTYPE_FLY_FREE (USHORT) 64
+#define FRMTYPE_FLY_ATCNT (USHORT) 128
+#define FRMTYPE_FLY_INCNT (USHORT) 256
+#define FRMTYPE_FOOTNOTE (USHORT) 512
+#define FRMTYPE_FTNPAGE (USHORT) 1024
+#define FRMTYPE_FLY_ANY (USHORT) 2048
+#define FRMTYPE_DRAWOBJ (USHORT) 4096
+#define FRMTYPE_COLSECT (USHORT) 8192
+#define FRMTYPE_COLSECTOUTTAB (USHORT) 16384
+
+#define FRMTYPE_ANYCOLSECT ( FRMTYPE_COLSECT | FRMTYPE_COLSECTOUTTAB )
+
+//! values can be combined via logival or
+#define GOTOOBJ_DRAW_CONTROL (USHORT) 1
+#define GOTOOBJ_DRAW_SIMPLE (USHORT) 2
+#define GOTOOBJ_DRAW_ANY (USHORT) 3
+#define GOTOOBJ_FLY_FRM (USHORT) 4
+#define GOTOOBJ_FLY_GRF (USHORT) 8
+#define GOTOOBJ_FLY_OLE (USHORT) 16
+#define GOTOOBJ_FLY_ANY (USHORT) 28
+#define GOTOOBJ_GOTO_ANY (USHORT) 31
+
+//! values can be combined via logival or
+#define FLYPROTECT_CONTENT (USHORT) 1 // kann verodert werden!
+#define FLYPROTECT_SIZE (USHORT) 2
+#define FLYPROTECT_POS (USHORT) 4
+#define FLYPROTECT_PARENT (USHORT) 8 // nur Parents untersuchen
+#define FLYPROTECT_FIXED (USHORT) 16 // nur nicht aufhebbarer Schutz
+ // z.B. durch OLE-Server, gilt auch
+ // fuer Dialog
+
+
+enum ObjCntType //Fuer das Ermitteln des Cntnts per Positon (D&D)
+{
+ OBJCNT_NONE,
+ OBJCNT_FLY,
+ OBJCNT_GRF,
+ OBJCNT_OLE,
+ OBJCNT_SIMPLE,
+ OBJCNT_CONTROL,
+ OBJCNT_URLBUTTON,
+
+ OBJCNT_GROUPOBJ,
+ OBJCNT_DONTCARE // nicht bestimmbar - unterschiedliche Objecte selektiert
+};
+
+//fuer GetAnyCurRect
+enum CurRectType
+{
+ RECT_PAGE, //Rect der aktuellen Seite.
+ RECT_PAGE_CALC, //... Seite wird ggf. Formatiert
+ RECT_PAGE_PRT, //Rect der aktuellen PrtArea der Seite
+ RECT_FRM, //Rect des aktuellen Rahmen
+ RECT_FLY_EMBEDDED, //Rect des aktuellen FlyFrm
+ RECT_FLY_PRT_EMBEDDED, //Rect der PrtArea des FlyFrm
+ RECT_SECTION, //Rect des aktuellen Bereichs
+ RECT_OUTTABSECTION, //Rect des aktuellen Bereichs,
+ // aber ausserhalb der Tabelle
+ RECT_SECTION_PRT, //Rect der aktuellen PrtArea des Bereichs
+ RECT_OUTTABSECTION_PRT, //Rect der aktuellen PrtArea des Bereichs,
+ // aber ausserhalb der Tabelle
+ RECT_HEADERFOOTER, //Rect des aktuellen Headers/Footer
+ RECT_HEADERFOOTER_PRT, //Rect der PrtArea des aktuellen Headers/Footers
+
+ RECT_PAGES_AREA //Rect covering the pages area
+};
+
+struct SwGetCurColNumPara
+{
+ const SwFrmFmt* pFrmFmt;
+ const SwRect* pPrtRect, *pFrmRect;
+ SwGetCurColNumPara() : pFrmFmt( 0 ), pPrtRect( 0 ), pFrmRect( 0 ) {}
+};
+
+#define SW_PASTESDR_INSERT 1
+#define SW_PASTESDR_REPLACE 2
+#define SW_PASTESDR_SETATTR 3
+
+#define SW_ADD_SELECT 1
+#define SW_ENTER_GROUP 2
+#define SW_LEAVE_FRAME 4
+
+#define SW_MOVE_UP 0
+#define SW_MOVE_DOWN 1
+#define SW_MOVE_LEFT 2
+#define SW_MOVE_RIGHT 3
+
+#define SW_TABCOL_NONE 0
+#define SW_TABCOL_HORI 1
+#define SW_TABCOL_VERT 2
+#define SW_TABROW_HORI 3
+#define SW_TABROW_VERT 4
+// --> FME 2004-07-30 #i32329# Enhanced table selection
+#define SW_TABSEL_HORI 5
+#define SW_TABSEL_HORI_RTL 6
+#define SW_TABROWSEL_HORI 7
+#define SW_TABROWSEL_HORI_RTL 8
+#define SW_TABCOLSEL_HORI 9
+#define SW_TABSEL_VERT 10
+#define SW_TABROWSEL_VERT 11
+#define SW_TABCOLSEL_VERT 12
+// <--
+
+class SdrDropMarkerOverlay;
+
+class SW_DLLPUBLIC SwFEShell : public SwEditShell
+{
+ SdrDropMarkerOverlay *pChainFrom, *pChainTo;
+ BOOL bCheckForOLEInCaption;
+
+ SW_DLLPRIVATE SwFlyFrm *FindFlyFrm() const;
+ SW_DLLPRIVATE SwFlyFrm *FindFlyFrm( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const;
+
+ //Actions fuer alle Shells beenden und ChangeLink rufen.
+ SW_DLLPRIVATE void EndAllActionAndCall();
+
+ SW_DLLPRIVATE void ScrollTo( const Point &rPt );
+
+ // OD 25.06.2003 #108784# - correct type of 1st parameter
+ SW_DLLPRIVATE void ChangeOpaque( SdrLayerID nLayerId );
+
+ // Used for mouse operations on a table:
+ // Returns a cell frame that is 'close' to rPt.
+ SW_DLLPRIVATE const SwFrm *GetBox( const Point &rPt, bool* pbRow = 0, bool* pbCol = 0 ) const;
+
+ //0 == in keiner Spalte
+ SW_DLLPRIVATE USHORT _GetCurColNum( const SwFrm *pFrm,
+ SwGetCurColNumPara* pPara ) const;
+
+ SW_DLLPRIVATE void _GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const;
+ SW_DLLPRIVATE void _GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const;
+
+ SW_DLLPRIVATE BOOL ImpEndCreate();
+
+ SW_DLLPRIVATE ObjCntType GetObjCntType( const SdrObject& rObj ) const;
+
+ // Methoden fuers kopieren von DrawObjecten
+ SW_DLLPRIVATE BOOL CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
+ const Point& rInsPt, BOOL bIsMove,
+ BOOL bSelectInsert );
+
+ // get list of marked SdrObjects;
+ // helper method for GetSelFrmType, IsSelContainsControl
+ SW_DLLPRIVATE const SdrMarkList* _GetMarkList() const;
+
+ SW_DLLPRIVATE BOOL CheckHeadline( bool bRepeat ) const;
+
+ using SwEditShell::Copy;
+
+public:
+
+ using SwEditShell::Insert;
+
+ TYPEINFO();
+ SwFEShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 );
+ SwFEShell( SwEditShell& rShell, Window *pWin );
+ virtual ~SwFEShell();
+
+ // Copy und Paste Methoden fuer das interne Clipboard
+ BOOL Copy( SwDoc* pClpDoc, const String* pNewClpTxt = 0 );
+ BOOL Paste( SwDoc* pClpDoc, BOOL bIncludingPageFrames = sal_False);
+ //paste some pages into another doc - used in mailmerge
+ BOOL PastePages( SwFEShell& rToFill, USHORT nStartPage, USHORT nEndPage);
+ // Copy-Methode fuer Drag&Drop
+ BOOL Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt,
+ BOOL bIsMove = FALSE, BOOL bSelectInsert = TRUE );
+
+ void SelectFlyFrm( SwFlyFrm& rFrm, BOOL bNew = FALSE );
+
+ // befindet sich der selektierte Rahmen innerhalb eines anderen?
+ const SwFrmFmt* IsFlyInFly();
+
+//SS fuer DrawObjekte und Rahmen-----------------------------
+
+ //Wenn ein Objekt angegeben wurde, so wird genau diese Markiert (anstatt
+ //ueber die Position zu suchen.
+ BOOL SelectObj( const Point& rSelPt, BYTE nFlag = 0, SdrObject *pObj = 0 );
+ void DelSelectedObj();
+
+ //Selektion nach oben unten bewegen (Z-Order).
+ //TRUE == ganz nach oben/unten
+ //FALSE == einen ueberholen
+ void SelectionToTop ( BOOL bTop = TRUE );
+ void SelectionToBottom( BOOL bBottom = TRUE );
+
+ short GetLayerId() const; //1 Heaven, 0 Hell, -1 Uneindeutig
+ void SelectionToHeaven(); //Ueber dem Dokument
+ void SelectionToHell(); //Unter dem Dokument
+
+ // folgende zwei Methoden returnen den enum SdrHdlKind, um sich ein
+ // includen von SVDRAW.HXX zu ersparen als int deklariert.
+ bool IsObjSelectable( const Point& rPt );
+ int IsInsideSelectedObj( const Point& rPt ); //!! returns enum values
+
+ // #107513#
+ // Test if there is a draw object at that position and if it should be selected.
+ // The 'should' is aimed at Writer text fly frames which may be in front of
+ // the draw object.
+ sal_Bool ShouldObjectBeSelected(const Point& rPt);
+
+ sal_Bool MoveAnchor( USHORT nDir );
+
+ // Returns if Upper of frame at current position is section frame
+ // Currently only used by the rules. To be replaced by something more
+ // sophisticated one day.
+ bool IsDirectlyInSection() const;
+
+ //Returnwerte siehe oben FrmType.
+ //pPt: Crsr bzw. DocPos; bStopAtFly: Bei Flys anhalten oder ueber den Anchor weitergehen
+ // Obgleich (0,TRUE) eine Art Standard ist, sind die Parameter nicht defaultet, damit
+ // bei jeder Benutzung insbesondere das bStopAtFly bewusst genutzt wird.
+ USHORT GetFrmType( const Point *pPt, BOOL bStopAtFly ) const;
+ USHORT GetSelFrmType() const; //Selektion (Drawing)
+
+ /** #108784# check whether selected frame contains a control;
+ * companion method to GetSelFrmType, used for preventing
+ * drag&drop of controls into header */
+ bool IsSelContainsControl() const;
+
+ ObjCntType GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const;
+ ObjCntType GetObjCntTypeOfSelection( SdrObject** ppObj = 0 ) const;
+
+ //Zum Anpassen der PosAttr bei Ankerwechseln.
+ SwRect GetObjRect() const;
+ //Zum Verschieben von Flys mit der Tastatur
+ SwRect GetFlyRect() const;
+ // OD 18.09.2003 #i17567#, #108749#, #110354# - adjustments to allow
+ // negative vertical positions for fly frames anchored
+ // to paragraph or to character.
+ // OD 02.10.2003 #i18732# - adjustments for new option 'FollowTextFlow'
+ // OD 12.11.2003 #i22341# - adjustments for new vertical alignment at top of line
+ void CalcBoundRect( SwRect& _orRect,
+ const RndStdIds _nAnchorId,
+ const sal_Int16 _eHoriRelOrient = com::sun::star::text::RelOrientation::FRAME,
+ const sal_Int16 _eVertRelOrient = com::sun::star::text::RelOrientation::FRAME,
+ const SwPosition* _pToCharCntntPos = NULL,
+ const bool _bFollowTextFlow = false,
+ bool _bMirror = false,
+ Point* _opRef = NULL,
+ Size* _opPercent = NULL ) const;
+
+ // Groesse von Drawobjekten setzen
+ void SetObjRect( const SwRect& rRect );
+
+ long BeginDrag( const Point *pPt, BOOL bProp );
+ long Drag ( const Point *pPt, BOOL bProp );
+ long EndDrag ( const Point *pPt, BOOL bProp );
+ void BreakDrag();
+
+ //Methoden fuer die Statuszeile.
+ Point GetAnchorObjDiff() const; //Abstand zum Anker
+ Point GetObjAbsPos() const; //Absolute Position
+ Size GetObjSize() const; //Groesse, ggf. die umschliessende
+
+ //SS fuer die BriefUmschlaege: hole alle Seitengebundenen Objekte
+ //und setze diese auf eine neue Seite.
+ void GetPageObjs( SvPtrarr& rFillArr );
+ void SetPageObjsNewPage( SvPtrarr& rFillArr, int nOffset = 1 );
+
+ // zeige die aktuelle Selektion an ( ggfs. den Rahmen/DrawObject)
+ virtual void MakeSelVisible();
+
+ // returne das FrmFmt von dem evt. unter dem Point stehenden Object.
+ // Das Object wird nicht selektiert!
+ const SwFrmFmt* GetFmtFromObj( const Point& rPt, SwRect** pRectToFill = 0 ) const;
+ // returns a format too, if the point is over the text of any fly
+ const SwFrmFmt* GetFmtFromAnyObj( const Point& rPt ) const;
+
+ //Welcher Schutz ist am selektierten Objekt gesetzt?
+ //!! returns several flags in BYTE
+ BYTE IsSelObjProtected( USHORT /*FLYPROTECT_...*/ eType ) const;
+
+ //Liefert neben der Grafik in rName bei gelinkten Grafiken den Namen mit
+ //Pfad und sonst den Grafiknamen. rbLink ist TRU bei gelinkten Grafiken.
+ const Graphic *GetGrfAtPos( const Point &rDocPos,
+ String &rName, BOOL &rbLink ) const;
+
+ // --> OD 2009-07-13 #i73249#
+ const String GetObjTitle() const;
+ void SetObjTitle( const String& rTitle );
+ const String GetObjDescription() const;
+ void SetObjDescription( const String& rDescription );
+ // <--
+
+//SS fuer Rahmen --------------------------------------------
+
+ BOOL IsFrmSelected() const;
+ BOOL GetFlyFrmAttr( SfxItemSet &rSet ) const;
+ BOOL SetFlyFrmAttr( SfxItemSet &rSet );
+ BOOL ResetFlyFrmAttr( USHORT nWhich, const SfxItemSet* pSet = 0 );
+ const SwFrmFmt *NewFlyFrm( const SfxItemSet &rSet, BOOL bAnchValid = FALSE,
+ SwFrmFmt *pParent = 0 );
+ void SetFlyPos( const Point &rAbsPos);
+ Point FindAnchorPos( const Point &rAbsPos, BOOL bMoveIt = FALSE );
+ // determines whether a frame or its environment is vertically formatted and right-to-left
+ BOOL IsFrmVertical(BOOL bEnvironment, BOOL& bRightToLeft) const;
+
+ SwFrmFmt* GetCurFrmFmt() const; //Wenn Rahmen, dann Rahmenvorlage, sonst 0
+ void SetFrmFmt( SwFrmFmt *pFmt, BOOL bKeepOrient = FALSE, Point* pDocPos = 0 ); //Wenn Rahmen, dann Rahmenvorlage setzen
+ const SwFlyFrm *GetCurrFlyFrm() const { return FindFlyFrm(); }
+
+ // finde/loeschen den Fly, in dem der Cursor steht
+ SwFrmFmt* WizzardGetFly();
+
+ //Selebstaendiges selektieren von Flys
+ BOOL GotoNextFly( USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY )
+ { return GotoObj( TRUE, eType ); }
+ BOOL GotoPrevFly( USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_FLY_ANY)
+ { return GotoObj( FALSE, eType); }
+
+ //iterieren ueber Flys - fuer Basic-Collections
+ USHORT GetFlyCount( FlyCntType eType = FLYCNTTYPE_ALL ) const;
+ const SwFrmFmt* GetFlyNum(USHORT nIdx, FlyCntType eType = FLYCNTTYPE_ALL) const;
+
+ //Wenn ein fly selectiert ist, zieht er den Crsr in den ersten CntntFrm
+ const SwFrmFmt* SelFlyGrabCrsr();
+
+ //Get FlyFrameFormat; fuer UI Macro Anbindung an Flys
+ const SwFrmFmt* GetFlyFrmFmt() const;
+ SwFrmFmt* GetFlyFrmFmt();
+
+ //OLE, Server fordert neue Groesse an, die gewuenschten Werte werden
+ //als Rahmenattribute eingestellt. Wenn die Werte nicht erlaubt sind,
+ //so wird von der Formatierung geclippt und eine Scalierung eingestellt.
+ //siehe CalcAndSetScale().
+ // The return value is the applied size.
+ Size RequestObjectResize( const SwRect &rRect, const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& );
+
+ //The layout has been changed, so the active object has to be moved after that
+ virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset );
+
+ //Der Client fuer das OleObject muss bezueglich der Scalierung auf dem
+ //neuesten Stand gehalten werden. Impl in der WrtShell.
+ //Wird ein Pointer auf eine Size uebergeben, so ist diese die aktuelle
+ //Core-Groesse des Objectes. Anderfalls wird die Groesse per GetCurFlyRect()
+ //besorgt.
+ virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
+ const SwRect *pFlyPrtRect = 0,
+ const SwRect *pFlyFrmRect = 0 ) = 0;
+
+ //Objekte mit ActivateWhenVisible werden beim Paint Connected.
+ //gerufen von notxtfrm::Paint, impl in wrtsh
+ virtual void ConnectObj( svt::EmbeddedObjectRef&,
+ const SwRect &rPrt,
+ const SwRect &rFrm ) = 0;
+
+ //Sichbaren Bereich auf das Object setzen, wenn es noch nicht sichtbar ist.
+ void MakeObjVisible( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& ) const;
+
+ // check resize of OLE-Object
+ BOOL IsCheckForOLEInCaption() const { return bCheckForOLEInCaption; }
+ void SetCheckForOLEInCaption( BOOL bFlag ) { bCheckForOLEInCaption = bFlag; }
+
+ // setze am selektierten FlyFrame einen Namen
+ void SetFlyName( const String& rName );
+ const String& GetFlyName() const;
+
+ // erezeuge eindeutige Namen fuer Rahmen
+ String GetUniqueGrfName() const;
+ String GetUniqueOLEName() const;
+ String GetUniqueFrameName() const;
+
+ // springe zum benannten Rahmen (Grafik/OLE)
+ BOOL GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL,
+ BOOL bSelFrame = TRUE );
+ // steht an der Position eine Grafik mit einer URL ?
+ const SwFrmFmt* IsURLGrfAtPos( const Point& rPt, String* pURL = 0,
+ String *pTargetFrameName = 0,
+ String *pURLDescription = 0 ) const;
+
+ //Fuer das Chain wird immer der durch das Format spezifizierte Fly
+ //mit dem durch den Point getroffenen verbunden.
+ //In rRect wird das Rect des Flys geliefert (fuer Highlight desselben)
+ int Chainable( SwRect &rRect, const SwFrmFmt &rSource, const Point &rPt ) const;
+ int Chain( SwFrmFmt &rSource, const Point &rPt );
+ int Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest );
+ void Unchain( SwFrmFmt &rFmt );
+ void HideChainMarker();
+ void SetChainMarker();
+
+ Size GetGraphicDefaultSize() const;
+
+//SS fuer DrawObjekte ---------------------
+
+ //Temporaer um Bug zu umgehen.
+ void CheckUnboundObjects();
+
+ //Achtung: Uneindeutikeiten bei Mehrfachselektionen.
+ BOOL GetObjAttr( SfxItemSet &rSet ) const;
+ BOOL SetObjAttr( const SfxItemSet &rSet );
+
+ const SdrObject* GetBestObject( BOOL bNext, USHORT eType = GOTOOBJ_DRAW_ANY, BOOL bFlat = TRUE, const ::svx::ISdrObjectFilter* pFilter = NULL );
+ BOOL GotoObj( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType = GOTOOBJ_DRAW_ANY);
+
+ //Setzen vom DragMode (z.B. Rotate), tut nix bei Rahmenselektion.
+ void SetDragMode( UINT16 eSdrDragMode );
+
+ USHORT IsObjSelected() const; //Liefert gleich die Anzahl der Objekte,
+ //zaehlt aber nicht die Objekte in Gruppen.
+ sal_Bool IsObjSelected( const SdrObject& rObj ) const;
+
+ void EndTextEdit(); //Loescht ggf. das Objekt.
+
+ //Ankertyp des selektierten Objektes, -1 bei Uneindeutigkeit oder
+ //Rahmenselektion; FLY_AT_PAGE bzw. FLY_AT_PARA aus frmatr.hxx sonst.
+ short GetAnchorId() const;
+
+ //Erzeugen von DrawObjekten, beim Begin wird der Objekttyp mitgegeben.
+ //Beim End kann ein Cmd mitgegeben werden, hier ist ggf.
+ //SDRCREATE_RESTRAINTEND fuer Ende oder SDRCREATE_NEXTPOINT fuer ein
+ //Polygon relevant. Nach dem RESTRAINTEND ist das Objekt erzeugt und
+ //selektiert.
+ //Mit BreakCreate wird der Vorgang abgebrochen, dann ist kein Objekt
+ //mehr selektiert.
+ BOOL BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos );
+ BOOL BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, UINT32 eObjInventor, const Point &);
+ void MoveCreate ( const Point &rPos );
+ BOOL EndCreate ( UINT16 eSdrCreateCmd );
+ void BreakCreate();
+ BOOL IsDrawCreate() const;
+ void CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect, USHORT nSlotId);
+
+ // Funktionen f�r Rubberbox, um Draw-Objekte zu selektieren
+ BOOL BeginMark( const Point &rPos );
+ void MoveMark ( const Point &rPos );
+ BOOL EndMark ();
+ void BreakMark();
+
+ //Gruppe erzeugen, aufloesen, nix bei Rahmenselektion.
+ BOOL IsGroupSelected(); //Kann auch eine Mischselektion sein!
+ void GroupSelection(); //Hinterher ist die Gruppe selektiert.
+ void UnGroupSelection(); //Die Einzelobjekte sind Selektiert
+ //Es koennen noch immer Gruppen dabei sein.
+
+ // OD 27.06.2003 #108784# - change return type.
+ bool IsGroupAllowed() const;
+
+ void MirrorSelection( BOOL bHorizontal ); //Bei FALSE Vertikal
+
+ //frmatr.hxx. Hier kein enum wg. Abhaengigkeiten
+ //Der BOOL ist nur fuer internen Gebrauch! Anker wird nur - anhand der
+ //aktuellen Dokumentposition - neu gesetzt aber nicht umgesetzt.
+ void ChgAnchor( int eAnchorId, BOOL bSameOnly = FALSE,
+ BOOL bPosCorr = TRUE );
+
+ BOOL SetDrawingAttr( SfxItemSet &rSet );
+
+ // hole die selectierten DrawObj als Grafik (MetaFile/Bitmap)
+ // Return-Wert besagt ob konvertiert wurde!!
+ BOOL GetDrawObjGraphic( ULONG nFmt, Graphic& rGrf ) const;
+
+ void Paste( SvStream& rStm, USHORT nAction, const Point* pPt = 0 );
+ BOOL Paste( const Graphic &rGrf );
+ BOOL Paste( SotDataObject& rObj, const Point& rPt );
+
+ BOOL IsAlignPossible() const;
+ void SetCalcFieldValueHdl(Outliner* pOutliner);
+
+ void Insert(const String& rGrfName,
+ const String& rFltName,
+ const Graphic* pGraphic = 0,
+ const SfxItemSet* pFlyAttrSet = 0,
+ const SfxItemSet* pGrfAttrSet = 0,
+ SwFrmFmt* = 0 );
+
+ // Insertion of a drawing object which have to be already inserted in the DrawModel
+ void InsertDrawObj( SdrObject& rDrawObj,
+ const Point& rInsertPosition );
+
+ BOOL ReplaceSdrObj( const String& rGrfName, const String& rFltName,
+ const Graphic* pGrf = 0 );
+
+//------------------------------------------
+
+ //Auskunft ueber naechstliegenden Inhalt zum uebergebenen Point
+ Point GetCntntPos( const Point& rPoint, BOOL bNext ) const;
+
+ //convert document position into position relative to the current page
+ Point GetRelativePagePosition(const Point& rDocPos);
+
+ //Layout-Selektion Hiden/Zeigen und aufruf an die CrsrSh weiterreichen.
+ void ShLooseFcs();
+ void ShGetFcs( BOOL bUpdate = TRUE );
+
+ //PageDescriptor-Schnittstelle
+ void ChgCurPageDesc( const SwPageDesc& );
+ USHORT GetCurPageDesc( const BOOL bCalcFrm = TRUE ) const;
+ USHORT GetMousePageDesc( const Point &rPt ) const;
+ USHORT GetPageDescCnt() const;
+ SwPageDesc* FindPageDescByName( const String& rName,
+ BOOL bGetFromPool = FALSE,
+ USHORT* pPos = 0 );
+
+ const SwPageDesc& GetPageDesc( USHORT i ) const;
+ void ChgPageDesc( USHORT i, const SwPageDesc& );
+ // if inside all selection only one PageDesc, return this.
+ // Otherwise return 0 pointer
+ const SwPageDesc* GetSelectedPageDescs() const;
+
+ const SwRect& GetAnyCurRect( CurRectType eType,
+ const Point* pPt = 0,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >& =
+ ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject >() ) const;
+
+ //Seitennummer der Seite in der der Point liegt, 0 wenn keine
+ //getroffen ist.
+ USHORT GetPageNumber( const Point &rPoint ) const;
+ BOOL GetPageNumber( long nYPos, BOOL bAtCrsrPos, USHORT& rPhyNum, USHORT& rVirtNum, String &rDisplay ) const;
+
+ SwFlyFrmFmt* InsertObject( const svt::EmbeddedObjectRef&,
+ const SfxItemSet* pFlyAttrSet = 0,
+ const SfxItemSet* pGrfAttrSet = 0,
+ SwFrmFmt* = 0 );
+ BOOL FinishOLEObj(); // Server wird beendet
+
+ //Attribute der Tabelle besorgen/setzen.
+ void GetTblAttr( SfxItemSet & ) const;
+ void SetTblAttr( const SfxItemSet & );
+
+ //Tabelle vollstaendig selektiert?
+ BOOL HasWholeTabSelection() const;
+ //Ist der Inhalt einer Tabellenzelle oder mindestens eine Tabellenzelle
+ //vollstaendig selektiert ist
+ BOOL HasBoxSelection() const;
+
+ BOOL InsertRow( USHORT nCnt, BOOL bBehind );
+ BOOL InsertCol( USHORT nCnt, BOOL bBehind ); // 0 == am Ende
+ BOOL DeleteCol();
+ BOOL DeleteRow();
+
+ BOOL DeleteTblSel(); //Aktuelle Selektion, ggf. die ganze Tabelle.
+
+ USHORT MergeTab(); //Merged selektierte Tabellenteile zusammen
+ //Fehler ueber enum zurueck
+ // Zelle Vertikal oder Horizontal splitten.
+ BOOL SplitTab( BOOL nVert = TRUE, USHORT nCnt = 1, BOOL bSameHeight = FALSE );
+ BOOL Sort(const SwSortOptions&); //Sortieren.
+
+ void SetRowHeight( const SwFmtFrmSize &rSz );
+ //Der Pointer muss vom Aufrufer zerstoert werden wenn != 0
+ void GetRowHeight( SwFmtFrmSize *&rpSz ) const;
+
+ void SetRowSplit( const SwFmtRowSplit &rSz );
+ void GetRowSplit( SwFmtRowSplit *&rpSz ) const;
+
+ void SetBoxAlign( USHORT nOrient );
+ USHORT GetBoxAlign() const; //USHRT_MAX fuer uneindeutig!
+
+ //Ausgleichen der Zeilenhoehen. Mit bTstOnly festellen ob mehr als eine
+ //Zeile markiert ist.
+ BOOL BalanceRowHeight( BOOL bTstOnly );
+
+ void SetTabBorders( const SfxItemSet& rSet );
+ void GetTabBorders( SfxItemSet& rSet) const;
+ void SetTabLineStyle(const Color* pColor, BOOL bSetLine = FALSE, const SvxBorderLine* pBorderLine = NULL);
+
+ void SetTabBackground( const SvxBrushItem &rNew );
+ void GetTabBackground( SvxBrushItem &rToFill ) const;
+
+ void SetBoxBackground( const SvxBrushItem &rNew );
+ BOOL GetBoxBackground( SvxBrushItem &rToFill ) const; //FALSE uneindeutig
+
+ void SetBoxDirection( const SvxFrameDirectionItem& rNew );
+ BOOL GetBoxDirection( SvxFrameDirectionItem& rToFill ) const; //FALSE uneindeutig
+
+ void SetRowBackground( const SvxBrushItem &rNew );
+ BOOL GetRowBackground( SvxBrushItem &rToFill ) const; //FALSE uneindeutig
+
+ BYTE WhichMouseTabCol( const Point &rPt ) const;
+ void GetTabCols( SwTabCols &rToFill ) const; //Spalten- und Randinfo.
+ void SetTabCols( const SwTabCols &rNew, BOOL bCurRowOnly = TRUE );
+ void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const;
+ void SetMouseTabCols( const SwTabCols &rNew, BOOL bCurRowOnly,
+ const Point &rPt );
+
+ // --> FME 2004-07-30 #i20126# Enhanced table selection
+ // pEnd will be used during MouseMove
+ bool SelTblRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
+ // <--
+
+ // #i24134# adjustment of table rows via Ruler
+ void GetTabRows( SwTabCols &rToFill ) const;
+ void SetTabRows( const SwTabCols &rNew, BOOL bCurColOnly );
+ void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const;
+ void SetMouseTabRows( const SwTabCols &rNew, BOOL bCurColOnly, const Point &rPt );
+
+ void ProtectCells(); //Falls eine Tabselektion besteht, wird sie ver-
+ // nichtet, wenn der Cursor nicht in Readonly darf
+ void UnProtectCells(); // auf die Tabellenselektin
+ void UnProtectTbls(); //bei allen Tabellen in der Selektion den Schutz aufheben
+ BOOL HasTblAnyProtection( const String* pTblName = 0,
+ BOOL* pFullTblProtection = 0 );
+ BOOL CanUnProtectCells() const;
+
+ USHORT GetRowsToRepeat() const;
+ void SetRowsToRepeat( USHORT nNumOfRows );
+ USHORT GetVirtPageNum( const BOOL bCalcFrm = TRUE );
+ //returns the number of table rows currently selected
+ //if the selection start at the top of the table
+ USHORT GetRowSelectionFromTop() const;
+
+ BOOL IsInRepeatedHeadline() const { return CheckHeadline( true ); }
+ BOOL IsInHeadline() const { return CheckHeadline( false ); }
+
+ //Stellt die Breiten der Zellen so ein, dass der Inhalt moeglichst
+ //nicht umgebrochen werden muss.
+ //bBalance sorgt fuer einen Ausgleich der markierten Spalten.
+ void AdjustCellWidth( BOOL bBalance = FALSE );
+ //Nicht erlaubt, wenn nur leere Zellen selektiert sind.
+ BOOL IsAdjustCellWidthAllowed( BOOL bBalance = FALSE ) const;
+
+ //Ausgleich der Zellenbreiten, mit bTstOnly feststellen, ob mehr als
+ //eine Zelle markiert ist.
+ BOOL BalanceCellWidth( BOOL bTstOnly );
+
+ // AutoFormat fuer die Tabelle/TabellenSelection
+ BOOL SetTableAutoFmt( const SwTableAutoFmt& rNew );
+ // Erfrage wie attributiert ist
+ BOOL GetTableAutoFmt( SwTableAutoFmt& rGet );
+ // aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe
+ BOOL SetColRowWidthHeight( USHORT eType, USHORT nDiff = 283 );
+ // Autosumme
+ BOOL GetAutoSum( String& rFml ) const;
+
+ //Phy: Tatsaechliche Seitenanzahl.
+ //Virt: Vom User evtl. gesetzten Offset mit einbeziehen.
+ USHORT GetPhyPageNum();
+
+ // Setzt an der aktuellen Postion einen neuen Page Offset
+ void SetNewPageOffset( USHORT nOffset );
+ void SetPageOffset( USHORT nOffset ); //Aendert den letzten Page Offset
+ USHORT GetPageOffset() const; //Liefert den letzten Page Offset
+
+ //SS fuer Beschriftungen
+ void InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
+ const String& rNumberSeparator,
+ const BOOL bBefore, const USHORT nId,
+ const String& rCharacterStyle,
+ const BOOL bCpyBrd = TRUE );
+
+ //Das Lineal will auch noch etwas von uns wissen.
+ USHORT GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == in keiner Spalte
+ USHORT GetCurMouseColNum( const Point &rPt,
+ SwGetCurColNumPara* pPara = 0 ) const;
+ USHORT GetCurTabColNum() const; //0 == in keiner Tabelle
+ USHORT GetCurMouseTabColNum( const Point &rPt ) const;
+ USHORT GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; // aktuelle aeussere Spalte
+
+ BOOL IsTableRightToLeft() const;
+ BOOL IsMouseTableRightToLeft( const Point &rPt ) const;
+ BOOL IsTableVertical() const;
+
+ BOOL IsLastCellInRow() const;
+ // Die Breite des aktuellen Bereichs fuer Spaltendialog
+ long GetSectionWidth( SwFmt& rFmt ) const;
+
+ void GetConnectableFrmFmts
+ (SwFrmFmt & rFmt, const String & rReference, BOOL bSuccessors,
+ ::std::vector< String > & aPrevPageVec,
+ ::std::vector< String > & aThisPageVec,
+ ::std::vector< String > & aNextPageVec,
+ ::std::vector< String > & aRestVec);
+
+ /** SwFEShell::GetShapeBackgrd
+
+ OD 02.09.2002 for #102450#:
+ method determines background color of the page the selected drawing
+ object is on and returns this color.
+ If no color is found, because no drawing object is selected or ...,
+ color COL_BLACK (default color on constructing object of class Color)
+ is returned.
+
+ @author OD
+
+ @returns an object of class Color
+ */
+ const Color GetShapeBackgrd() const;
+
+ /** Is default horizontal text direction for selected drawing object right-to-left
+
+ OD 09.12.2002 #103045#
+ Because drawing objects only painted for each page only, the default
+ horizontal text direction of a drawing object is given by the corresponding
+ page property.
+
+ @author OD
+
+ @returns boolean, indicating, if the horizontal text direction of the
+ page, the selected drawing object is on, is right-to-left.
+ */
+ bool IsShapeDefaultHoriTextDirR2L() const;
+
+ void ParkCursorInTab();
+
+ // -> #i23726#
+ SwTxtNode * GetNumRuleNodeAtPos(const Point &rPot);
+ BOOL IsNumLabel( const Point &rPt, int nMaxOffset = -1 );
+ // <- #i23726#
+ // --> OD 2005-02-21 #i42921#
+ bool IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode,
+ const Point& _rDocPos ) const;
+ // <--
+
+};
+
+#endif
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
new file mode 100644
index 000000000000..a2e08366ba24
--- /dev/null
+++ b/sw/inc/fldbas.hxx
@@ -0,0 +1,465 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FLDBAS_HXX
+#define _FLDBAS_HXX
+
+#ifndef FIELDIDS_ONLY // SWG-Testreader!!
+
+#include <i18npool/lang.h>
+#include <tools/debug.hxx>
+#include <tools/string.hxx>
+#include "swdllapi.h"
+#include <calbck.hxx>
+#include <com/sun/star/uno/Any.hxx>
+
+class SwDoc;
+class SvStringsDtor;
+class SvNumberFormatter;
+
+#endif // FIELDIDS_ONLY
+
+/*--------------------------------------------------------------------
+ Beschreibung: die ID's fuer die Feldtypen
+ --------------------------------------------------------------------*/
+
+enum RES_FIELDS
+{
+// Fuer die alten Dokumente muessen die Field-Which IDS erhalten bleiben !!!!
+ RES_FIELDS_BEGIN,
+ RES_DBFLD = RES_FIELDS_BEGIN,
+ RES_USERFLD,
+ RES_FILENAMEFLD,
+ RES_DBNAMEFLD,
+ RES_DATEFLD,
+ RES_TIMEFLD,
+ RES_PAGENUMBERFLD,
+ RES_AUTHORFLD,
+ RES_CHAPTERFLD,
+ RES_DOCSTATFLD,
+ RES_GETEXPFLD,
+ RES_SETEXPFLD,
+ RES_GETREFFLD,
+ RES_HIDDENTXTFLD,
+ RES_POSTITFLD,
+ RES_FIXDATEFLD,
+ RES_FIXTIMEFLD,
+ RES_REGFLD,
+ RES_VARREGFLD,
+ RES_SETREFFLD,
+ RES_INPUTFLD,
+ RES_MACROFLD,
+ RES_DDEFLD,
+ RES_TABLEFLD,
+ RES_HIDDENPARAFLD,
+ RES_DOCINFOFLD,
+ RES_TEMPLNAMEFLD,
+ RES_DBNEXTSETFLD,
+ RES_DBNUMSETFLD,
+ RES_DBSETNUMBERFLD,
+ RES_EXTUSERFLD,
+ RES_REFPAGESETFLD,
+ RES_REFPAGEGETFLD,
+ RES_INTERNETFLD,
+ RES_JUMPEDITFLD,
+ RES_SCRIPTFLD,
+ RES_DATETIMEFLD,
+ RES_AUTHORITY, //Table of authorities
+ RES_COMBINED_CHARS,
+ RES_DROPDOWN,
+ RES_FIELDS_END
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Liste der FieldTypes am UI
+ --------------------------------------------------------------------*/
+
+enum SwFldTypesEnum
+{
+ TYP_BEGIN,
+ TYP_DATEFLD = TYP_BEGIN, // 0
+ TYP_TIMEFLD,
+ TYP_FILENAMEFLD,
+ TYP_DBNAMEFLD,
+ TYP_CHAPTERFLD,
+ TYP_PAGENUMBERFLD,
+ TYP_DOCSTATFLD,
+ TYP_AUTHORFLD,
+ TYP_SETFLD,
+ TYP_GETFLD,
+ TYP_FORMELFLD, // 10
+ TYP_HIDDENTXTFLD,
+ TYP_SETREFFLD,
+ TYP_GETREFFLD,
+ TYP_DDEFLD,
+ TYP_MACROFLD,
+ TYP_INPUTFLD,
+ TYP_HIDDENPARAFLD,
+ TYP_DOCINFOFLD,
+ TYP_DBFLD,
+ TYP_USERFLD, // 20
+ TYP_POSTITFLD,
+ TYP_TEMPLNAMEFLD,
+ TYP_SEQFLD,
+ TYP_DBNEXTSETFLD,
+ TYP_DBNUMSETFLD,
+ TYP_DBSETNUMBERFLD,
+ TYP_CONDTXTFLD,
+ TYP_NEXTPAGEFLD,
+ TYP_PREVPAGEFLD,
+ TYP_EXTUSERFLD, // 30
+ TYP_FIXDATEFLD,
+ TYP_FIXTIMEFLD,
+ TYP_SETINPFLD,
+ TYP_USRINPFLD,
+ TYP_SETREFPAGEFLD,
+ TYP_GETREFPAGEFLD,
+ TYP_INTERNETFLD,
+ TYP_JUMPEDITFLD,
+ TYP_SCRIPTFLD, // 40
+ TYP_AUTHORITY,
+ TYP_COMBINED_CHARS,
+ TYP_DROPDOWN,
+ TYP_END
+};
+
+
+enum SwFileNameFormat
+{
+ FF_BEGIN,
+ FF_NAME = FF_BEGIN,
+ FF_PATHNAME,
+ FF_PATH,
+ FF_NAME_NOEXT,
+ FF_UI_NAME,
+ FF_UI_RANGE,
+ FF_END,
+ FF_FIXED = 0x8000
+};
+
+enum SwVarFormat
+{
+ VVF_CMD = 0x0010, // Kommando anzeigen
+ VVF_INVISIBLE = 0x0040, // unsichtbar
+ VVF_XXP = 0x0400, // 1234%
+ VVF_XX_XXP = 0x0800, // 1.234,56%
+ VVF_CLEAR = 0x000f,
+
+// ab hier neue Formate
+ VVF_SYS = 0x2000, //Zahlenformat aus der Systemeinstellung
+ VVF_X = 0x2100, // 1234
+ VVF_X_X = 0x2200, // 1234,5
+ VVF_X_XX = 0x2300, // 1245,56
+ VVF_XX_X = 0x2400, // 1.234,5
+ VVF_XX_XX = 0x2500, // 1.234,56
+ VVF_XX_XXX = 0x2600, // 1.234,567
+ VVF_SYS_CUR = 0x2700, // W???hrungsformat aus der Systemeinstellung
+ VVF_CUR_X = 0x2800, // DM 1234
+ VVF_CUR_XX_XX = 0x2900, // DM 1234,56 DM 1234,00
+ VVF_CUR_XX_X0 = 0x2a00, // DM 1234,56 DM 1234,--
+ VVF_X_CUR = 0x2b00, // 1234 DM
+ VVF_XX_XX_CUR = 0x2c00, // 1234,56 DM 1234,00 DM
+ VVF_XX_X0_CUR = 0x2d00, // 1234,56 DM 1234,-- DM
+// Kompatibilitaet:
+ VF_CMD = VVF_CMD,
+ VF_INVISIBLE = VVF_INVISIBLE,
+ VF_XXP = VVF_XXP,
+ VF_XX_XXP = VVF_XX_XXP,
+ VF_VISIBLE = VVF_SYS,
+ VF_XX = VVF_X,
+ VF_XX_XX = VVF_XX_XX,
+ VF_XX_XX_CUR = VVF_SYS_CUR,
+ VF_CLEAR = VVF_CLEAR
+
+};
+
+typedef USHORT SwGetSetExpType;
+namespace nsSwGetSetExpType
+{
+ const SwGetSetExpType GSE_STRING = 0x0001; // String
+ const SwGetSetExpType GSE_EXPR = 0x0002; // Expression
+ const SwGetSetExpType GSE_INP = 0x0004; // InputField
+ const SwGetSetExpType GSE_SEQ = 0x0008; // Sequence
+ const SwGetSetExpType GSE_FORMULA = 0x0010; // Formel
+}
+
+typedef USHORT SwExtendedSubType;
+namespace nsSwExtendedSubType
+{
+ const SwExtendedSubType SUB_CMD = 0x0100; // Kommando anzeigen
+ const SwExtendedSubType SUB_INVISIBLE = 0x0200; // unsichtbar
+ const SwExtendedSubType SUB_OWN_FMT = 0x0400; // SwDBField: Uebernimmt Formatierung nicht
+ // aus Datenbank
+}
+
+enum SwInputFieldSubType
+{
+ INP_TXT = 0x01,
+ INP_USR = 0x02,
+ INP_VAR = 0x03
+};
+
+
+enum SwUserType
+{
+ UF_STRING = 0x01,
+ UF_EXPR = 0x02
+};
+
+enum SwDateTimeSubType
+{
+ FIXEDFLD = 1,
+ DATEFLD = 2,
+ TIMEFLD = 4
+};
+
+#ifndef FIELDIDS_ONLY // SWG-Testreader!!
+
+
+extern USHORT __FAR_DATA aTypeTab[];
+
+/*--------------------------------------------------------------------
+ Beschreibung: Allgemeine Tools
+ --------------------------------------------------------------------*/
+
+String GetResult(double nVal, sal_uInt32 nNumFmt, USHORT nLang = LANGUAGE_SYSTEM);
+void SetErrorStr(const String& rStr);
+//String ExpandDate(const Date& rDate, ULONG nFmt, USHORT nLang);
+//String ExpandTime(const Time& rTime, ULONG nFmt, USHORT nLang);
+String FormatNumber(USHORT nNum, sal_uInt32 nFormat);
+
+/*--------------------------------------------------------------------
+ Beschreibung: Instanzen von SwFields und Abgeleiteten kommen 0-n mal vor.
+ Zu jeder Klasse SwFields existiert
+ 1 Instanz der zugehoerigen Typenklasse
+ Basisklasse aller Feldtypen ist SwFieldType
+ --------------------------------------------------------------------*/
+
+DBG_NAMEEX(SwFieldType)
+
+class SW_DLLPUBLIC SwFieldType : public SwModify
+{
+ USHORT nWhich;
+
+ friend void _FinitUI(); // um den Pointer zu loeschen!
+ static SvStringsDtor* pFldNames;
+
+ static void _GetFldName(); // legt die FldNames an, fldmgr.cxx!
+
+protected:
+ // single argument ctors shall be explicit.
+ explicit SwFieldType( USHORT nWhichId );
+
+public:
+
+#ifdef DBG_UTIL
+ virtual ~SwFieldType();
+#endif
+ static const String& GetTypeStr( USHORT nTypeId );
+
+ // nur in abgeleiteten Klassen
+ virtual const String& GetName() const;
+ virtual SwFieldType* Copy() const = 0;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich );
+
+ USHORT Which() const { return nWhich; }
+
+ inline void UpdateFlds() const;
+};
+
+inline void SwFieldType::UpdateFlds() const
+{
+ ((SwFieldType*)this)->Modify( 0, 0 );
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Basisklasse aller Felder.
+ Ueber Which wird der Typ des Feldes abgefragt.
+ Ueber Expand() wird der expandierte Inhalt
+ des Feldes in Erfahrung gebracht.
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwField
+{
+private:
+ mutable String m_Cache; /// #i85766# cached expansion (for clipboard)
+ USHORT nLang; // Immer ueber SetLanguage aendern!
+ BOOL bIsAutomaticLanguage;
+ sal_uInt32 nFormat;
+
+ SwFieldType* pType;
+
+ virtual String Expand() const = 0;
+ virtual SwField* Copy() const = 0;
+
+protected:
+ void SetFormat(sal_uInt32 nSet) {nFormat = nSet;}
+
+ SwField(SwFieldType* pTyp, sal_uInt32 nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM);
+
+public:
+ virtual ~SwField();
+
+ // Typ feststellen
+ inline SwFieldType* GetTyp() const;
+
+ // neuen Typ setzen (wird fuer das Kopieren zwischen Dokumenten benutzt)
+ virtual SwFieldType* ChgTyp( SwFieldType* );
+
+ /** expand the field.
+ @param bInClipboard field is in clipboard document?
+ @return the generated text (suitable for display)
+ */
+ String ExpandField(bool const bInClipboard) const;
+
+ // liefert den Namen oder den Inhalt
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+
+ SwField * CopyField() const;
+
+ // ResId
+ USHORT Which() const
+#ifndef DBG_UTIL
+ { return pType->Which(); }
+#else
+ ; // in fldbas.cxx implementiert
+#endif
+
+ // TYP_ID
+ USHORT GetTypeId() const;
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT);
+
+ // Sprache an der Feldposition
+ inline USHORT GetLanguage() const;
+ virtual void SetLanguage(USHORT nLng);
+
+ // Parameter fuer Dialog und BASIC erfragen
+ inline sal_uInt32 GetFormat() const;
+ virtual const String& GetPar1() const;
+ virtual String GetPar2() const;
+
+ virtual String GetFormula() const;
+
+ virtual void ChangeFormat(sal_uInt32 n);
+ virtual void SetPar1(const String& rStr);
+ virtual void SetPar2(const String& rStr);
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+ // hat das Feld eine Action auf dem ClickHandler ? (z.B. INetFelder,..)
+ BOOL HasClickHdl() const;
+ // ist es ein Fix-Feld?
+ BOOL IsFixed() const;
+
+ BOOL IsAutomaticLanguage() const { return bIsAutomaticLanguage;}
+ void SetAutomaticLanguage(BOOL bSet){bIsAutomaticLanguage = bSet;}
+
+ virtual String GetDescription() const;
+};
+
+inline SwFieldType* SwField::GetTyp() const
+ { return pType; }
+
+inline sal_uInt32 SwField::GetFormat() const
+ { return nFormat; }
+
+inline USHORT SwField::GetLanguage() const
+ { return nLang; }
+
+/*--------------------------------------------------------------------
+ Beschreibung: Felder mit Values, die ueber der Numberformatter
+ formatiert werden muessen
+ --------------------------------------------------------------------*/
+
+class SwValueFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+ BOOL bUseFormat; // Numberformatter verwenden
+
+protected:
+ SwValueFieldType( SwDoc* pDocPtr, USHORT nWhichId );
+ SwValueFieldType( const SwValueFieldType& rTyp );
+
+public:
+ inline SwDoc* GetDoc() const { return pDoc; }
+ inline void SetDoc(SwDoc* pNewDoc) { pDoc = pNewDoc; }
+
+ inline BOOL UseFormat() const { return bUseFormat; }
+ inline void EnableFormat(BOOL bFormat = TRUE) { bUseFormat = bFormat; }
+
+ String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const;
+ void DoubleToString(String &rValue, const double &rVal, LanguageType eLng) const;
+ void DoubleToString(String &rValue, const double &rVal, sal_uInt32 nFmt) const;
+};
+
+class SW_DLLPUBLIC SwValueField : public SwField
+{
+ double fValue;
+// String sExpand;
+
+protected:
+ SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 );
+ SwValueField( const SwValueField& rFld );
+
+public:
+ virtual ~SwValueField();
+
+ virtual SwFieldType* ChgTyp( SwFieldType* );
+ virtual void SetLanguage(USHORT nLng);
+// os: wozu war das denn da?
+// virtual void ChangeFormat(ULONG n);
+
+ inline SwDoc* GetDoc() const { return ((SwValueFieldType*)GetTyp())->GetDoc(); }
+
+ virtual double GetValue() const;
+ virtual void SetValue( const double& rVal );
+
+ inline String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const
+ { return ((SwValueFieldType*)GetTyp())->ExpandValue(rVal, nFmt, nLng); }
+
+ static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt);
+};
+
+class SW_DLLPUBLIC SwFormulaField : public SwValueField
+{
+ String sFormula;
+
+protected:
+ SwFormulaField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, const double fVal = 0.0 );
+ SwFormulaField( const SwFormulaField& rFld );
+
+public:
+ virtual String GetFormula() const;
+ void SetFormula(const String& rStr);
+
+ void SetExpandedFormula(const String& rStr);
+ String GetExpandedFormula() const;
+};
+
+#endif // FIELDIDS_ONLY
+#endif // _FLDBAS_HXX
diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
new file mode 100644
index 000000000000..d302f45a96bc
--- /dev/null
+++ b/sw/inc/flddat.hxx
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FLDDAT_HXX
+#define _FLDDAT_HXX
+
+#include <tools/string.hxx>
+
+#include "fldbas.hxx"
+
+class DateTime;
+class Date;
+class Time;
+
+/*--------------------------------------------------------------------
+ Beschreibung: Formate
+ --------------------------------------------------------------------*/
+
+enum SwDateFormat
+{
+ DF_BEGIN,
+ //neue Formate:
+ DFF_SSYS = DF_BEGIN,
+ DFF_LSYS ,
+ DFF_DMY ,
+ DFF_DMYY ,
+ DFF_DMMY ,
+ DFF_DMMYY,
+ DFF_DMMMY ,
+ DFF_DMMMYY,
+ DFF_DDMMY ,
+ DFF_DDMMMY ,
+ DFF_DDMMMYY ,
+ DFF_DDDMMMY ,
+ DFF_DDDMMMYY ,
+ DFF_MY ,
+ DFF_MD ,
+ DFF_YMD ,
+ DFF_YYMD ,
+ DF_END ,
+// Kompatibilitaet:
+ DF_SSYS = DFF_SSYS,
+ DF_LSYS = DFF_LSYS,
+ DF_SHORT = DFF_DMY,
+ DF_SCENT = DFF_DMYY,
+ DF_LMON = DFF_DMMYY,
+ DF_LMONTH = DFF_DMMMYY,
+ DF_LDAYMON = DFF_DDMMMYY,
+ DF_LDAYMONTH= DFF_DDDMMMYY
+};
+
+enum SwTimeFormat
+{
+ TF_BEGIN,
+ TF_SYSTEM=TF_BEGIN,
+ TF_SSMM_24,
+ TF_SSMM_12,
+ TF_END
+};
+
+enum SwTimeSubFormat
+{
+ TIME_FIX,
+ TIME_VAR
+};
+
+enum SwDateSubFormat
+{
+ DATE_FIX,
+ DATE_VAR
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datum/Uhrzeitfeld
+ --------------------------------------------------------------------*/
+
+class SwDateTimeFieldType : public SwValueFieldType
+{
+public:
+ SwDateTimeFieldType(SwDoc* pDoc);
+
+ virtual SwFieldType* Copy() const;
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Datum/Uhrzeitfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwDateTimeField : public SwValueField
+{
+ USHORT nSubType;
+ long nOffset; // Offset in Minuten
+
+public:
+ SwDateTimeField(SwDateTimeFieldType* pType, USHORT nSubType = DATEFLD,
+ ULONG nFmt = 0, USHORT nLng = 0);
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nSub);
+
+ virtual double GetValue() const;
+
+ virtual void SetPar2(const String& rStr);
+ virtual String GetPar2() const;
+
+ inline BOOL IsDate() const
+ { return (nSubType & DATEFLD) != 0; }
+
+ inline void SetOffset(long nMinutes) { nOffset = nMinutes; }
+ inline long GetOffset() const { return nOffset; }
+
+ Date GetDate(BOOL bUseOffset = FALSE) const;
+ Time GetTime(BOOL bUseOffset = FALSE) const;
+ void SetDateTime(const DateTime& rDT);
+ static double GetDateTime(SwDoc* pDoc, const DateTime& rDT);
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nMId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nMId );
+};
+
+#endif // _FLDDAT_HXX
diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx
new file mode 100644
index 000000000000..77963bf1510a
--- /dev/null
+++ b/sw/inc/flddropdown.hxx
@@ -0,0 +1,279 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FLDDROPDOWN_HXX
+#define _FLDDROPDOWN_HXX
+
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX
+#include "com/sun/star/uno/Sequence.hxx"
+#endif
+#include "swdllapi.h"
+#include "fldbas.hxx"
+
+#ifndef INCLUDED_VECTOR
+#include <vector>
+#define INCLUDED_VECTOR
+#endif
+
+/**
+ Field type for dropdown boxes.
+*/
+class SwDropDownFieldType : public SwFieldType
+{
+public:
+ /**
+ Constructor
+ */
+ SwDropDownFieldType();
+
+ /**
+ Destructor
+ */
+ virtual ~SwDropDownFieldType();
+
+ /**
+ Create a copy of this field type.
+
+ @return a copy of this type
+ */
+ virtual SwFieldType * Copy () const;
+};
+
+/**
+ Dropdown field.
+
+ The dropdown field contains a list of strings. At most one of them
+ can be selected.
+*/
+class SW_DLLPUBLIC SwDropDownField : public SwField
+{
+ /**
+ the possible values (aka items) of the dropdown box
+ */
+ std::vector<String> aValues;
+
+ /**
+ the selected item
+ */
+ String aSelectedItem;
+
+ /**
+ the name of the field
+ */
+ String aName;
+
+ /**
+ help text
+ */
+ String aHelp;
+
+ /**
+ tool tip string
+ */
+ String aToolTip;
+
+public:
+ /**
+ Constructor
+
+ @param pTyp field type for this field
+ */
+ SwDropDownField(SwFieldType * pTyp);
+
+ /**
+ Copy constructor
+
+ @param rSrc dropdown field to copy
+ */
+ SwDropDownField(const SwDropDownField & rSrc);
+
+ /**
+ Destructor
+ */
+ virtual ~SwDropDownField();
+
+ /**
+ Expands the field.
+
+ The expanded value of the field is the value of the selected
+ item. If no item is selected, an empty string is returned.
+
+ @return the expanded value of the field
+ */
+ virtual String Expand() const;
+
+ /**
+ Creates a copy of this field.
+
+ @return the copy of this field
+ */
+ virtual SwField * Copy() const;
+
+ /**
+ Returns the selected value.
+
+ @see Expand
+
+ @return the selected value
+ */
+ virtual const String & GetPar1() const;
+
+ /**
+ Returns the name of the field.
+
+ @return the name of the field
+ */
+ virtual String GetPar2() const;
+
+ /**
+ Sets the selected value.
+
+ If rStr is an item of the field that item will be
+ selected. Otherwise no item will be selected, i.e. the
+ resulting selection will be empty.
+ */
+ virtual void SetPar1(const String & rStr);
+
+ /**
+ Sets the name of the field.
+
+ @param rStr the new name of the field
+ */
+ virtual void SetPar2(const String & rStr);
+
+ /**
+ Sets the items of the dropdown box.
+
+ After setting the items the selection will be empty.
+
+ @param rItems the new items
+ */
+ void SetItems(const std::vector<String> & rItems);
+
+ /**
+ Sets the items of the dropdown box.
+
+ After setting the items the selection will be empty.
+
+ @param rItems the new items
+ */
+ void SetItems(const com::sun::star::uno::Sequence<rtl::OUString> & rItems);
+
+ /**
+ Returns the items of the dropdown box.
+
+ @return the items of the dropdown box
+ */
+ com::sun::star::uno::Sequence<rtl::OUString> GetItemSequence() const;
+
+ /**
+ Returns the selected item.
+
+ @return the selected item
+ */
+ const String & GetSelectedItem() const;
+
+ /**
+ Returns the name of the field.
+
+ @return the name of the field
+ */
+ const String & GetName() const;
+
+ /**
+ Returns the help text of the field.
+
+ @return the help text of the field
+ */
+ const String & GetHelp() const;
+
+ /**
+ Returns the tool tip of the field.
+
+ @return the tool tip of the field
+ */
+ const String & GetToolTip() const;
+
+ /**
+ Sets the selected item.
+
+ If rItem is found in this dropdown field it is selected. If
+ rItem is not found the selection will be empty.
+
+ @param rItem the item to be set
+
+ @retval TRUE the selected item was successfully set
+ @retval TRUE failure (empty selection)
+ */
+ BOOL SetSelectedItem(const String & rItem);
+
+ /**
+ Sets the name of the field.
+
+ @param rName the new name of the field
+ */
+ void SetName(const String & rName);
+
+ /**
+ Sets the help text of the field.
+
+ @param rHelp the help text
+ */
+ void SetHelp(const String & rHelp);
+
+ /**
+ Sets the tool tip of the field.
+
+ @param rToolTip the tool tip
+ */
+ void SetToolTip(const String & rToolTip);
+
+ /**
+ API: Gets a property value from the dropdown field.
+
+ @param rVal return value
+ @param nMId
+ - FIELD_PROP_PAR1 Get selected item (String)
+ - FIELD_PROP_STRINGS Get all items (Sequence)
+ - FIELD_PROP_PAR3 Get the help text of the field.
+ - FIELD_PROP_PAR4 Get the tool tip of the field.
+ */
+ virtual BOOL QueryValue(com::sun::star::uno::Any &rVal, USHORT nWhichId) const;
+
+ /**
+ API: Sets a property value on the dropdown field.
+
+ @param rVal value to set
+ @param nMId
+ - FIELD_PROP_PAR1 Set selected item (String)
+ - FIELD_PROP_STRINGS Set all items (Sequence)
+ - FIELD_PROP_PAR3 Set the help text of the field.
+ - FIELD_PROP_PAR4 Set the tool tip of the field.
+ */
+ virtual BOOL PutValue(const com::sun::star::uno::Any &rVal, USHORT nWhichId);
+};
+
+#endif
diff --git a/sw/inc/fldinit.hxx b/sw/inc/fldinit.hxx
new file mode 100644
index 000000000000..40fbac692444
--- /dev/null
+++ b/sw/inc/fldinit.hxx
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FLDINIT_HXX
+#define _FLDINIT_HXX
+
+/*--------------------------------------------------------------------
+ Beschreibung: Tabelle aller FeldInfos
+ --------------------------------------------------------------------*/
+
+void InitFieldInfo();
+void FinitFieldInfo();
+
+
+#endif // _FLDINIT_HXX
diff --git a/sw/inc/fldui.hrc b/sw/inc/fldui.hrc
new file mode 100644
index 000000000000..b08972ed4d96
--- /dev/null
+++ b/sw/inc/fldui.hrc
@@ -0,0 +1,292 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FLDUI_HRC
+#define _FLDUI_HRC
+
+#include "rcid.hrc"
+
+
+#define DLG_FLD RC_FLDDLG_BEGIN
+#define DLG_RECORD_MRG (RC_FLDDLG_BEGIN + 1)
+#define DLG_RECORD_INS (RC_FLDDLG_BEGIN + 2)
+#define DLG_FLD_EDIT (RC_FLDDLG_BEGIN + 3)
+#define DLG_POSTIT (RC_FLDDLG_BEGIN + 4)
+#define DLG_FLD_INPUT (RC_FLDDLG_BEGIN + 5)
+#define DLG_BRCFG (RC_FLDDLG_BEGIN + 6)
+#define DLG_BRSEEK (RC_FLDDLG_BEGIN + 7)
+#define DLG_BRSORT (RC_FLDDLG_BEGIN + 8)
+#define DLG_CHANGE_DB (RC_FLDDLG_BEGIN + 9)
+#define DLG_JAVAEDIT (RC_FLDDLG_BEGIN + 10)
+#define DLG_FLD_INSERT (RC_FLDDLG_BEGIN + 11)
+#define DLG_FLD_DROPDOWN (RC_FLDDLG_BEGIN + 12)
+
+/*--------------------------------------------------------------------
+ Beschreibung: TypeId
+ --------------------------------------------------------------------*/
+
+#define STR_TYPE_BEGIN RC_FLDDLG_BEGIN
+#define STR_DATEFLD STR_TYPE_BEGIN
+#define STR_TIMEFLD (STR_TYPE_BEGIN + 1)
+#define STR_FILENAMEFLD (STR_TYPE_BEGIN + 2)
+#define STR_DBNAMEFLD (STR_TYPE_BEGIN + 3)
+#define STR_CHAPTERFLD (STR_TYPE_BEGIN + 4)
+#define STR_PAGENUMBERFLD (STR_TYPE_BEGIN + 5)
+#define STR_DOCSTATFLD (STR_TYPE_BEGIN + 6)
+#define STR_AUTHORFLD (STR_TYPE_BEGIN + 7)
+#define STR_SETFLD (STR_TYPE_BEGIN + 8)
+#define STR_GETFLD (STR_TYPE_BEGIN + 9)
+#define STR_FORMELFLD (STR_TYPE_BEGIN + 10)
+#define STR_CONDTXTFLD (STR_TYPE_BEGIN + 11)
+#define STR_SETREFFLD (STR_TYPE_BEGIN + 12)
+#define STR_GETREFFLD (STR_TYPE_BEGIN + 13)
+#define STR_DDEFLD (STR_TYPE_BEGIN + 14)
+#define STR_MACROFLD (STR_TYPE_BEGIN + 15)
+#define STR_INPUTFLD (STR_TYPE_BEGIN + 16)
+#define STR_DOCINFOFLD (STR_TYPE_BEGIN + 17)
+#define STR_DBFLD (STR_TYPE_BEGIN + 19)
+#define STR_USERFLD (STR_TYPE_BEGIN + 20)
+#define STR_POSTITFLD (STR_TYPE_BEGIN + 21)
+#define STR_HIDDENPARAFLD (STR_TYPE_BEGIN + 22)
+
+#define STR_TEMPLNAMEFLD (STR_TYPE_BEGIN + 24)
+#define STR_SEQFLD (STR_TYPE_BEGIN + 25)
+#define STR_DBNEXTSETFLD (STR_TYPE_BEGIN + 26)
+#define STR_DBNUMSETFLD (STR_TYPE_BEGIN + 27)
+#define STR_DBSETNUMBERFLD (STR_TYPE_BEGIN + 28)
+#define STR_PREVPAGEFLD (STR_TYPE_BEGIN + 29)
+#define STR_NEXTPAGEFLD (STR_TYPE_BEGIN + 30)
+#define STR_HIDDENTXTFLD (STR_TYPE_BEGIN + 31)
+#define STR_EXTUSERFLD (STR_TYPE_BEGIN + 32)
+#define STR_SETINPUTFLD (STR_TYPE_BEGIN + 33)
+#define STR_USRINPUTFLD (STR_TYPE_BEGIN + 34)
+#define STR_SETREFPAGEFLD (STR_TYPE_BEGIN + 35)
+#define STR_GETREFPAGEFLD (STR_TYPE_BEGIN + 36)
+#define STR_INTERNETFLD (STR_TYPE_BEGIN + 37)
+#define STR_JUMPEDITFLD (STR_TYPE_BEGIN + 38)
+#define STR_SCRIPTFLD (STR_TYPE_BEGIN + 39)
+#define STR_AUTHORITY (STR_TYPE_BEGIN + 40)
+#define STR_COMBINED_CHARS (STR_TYPE_BEGIN + 41)
+#define STR_DROPDOWN (STR_TYPE_BEGIN + 42)
+#define STR_CUSTOM (STR_TYPE_BEGIN + 43)
+#define STR_TYPE_END (STR_TYPE_BEGIN + 44)
+
+/*--------------------------------------------------------------------
+ Beschreibung: SubTypes
+ --------------------------------------------------------------------*/
+
+#define FLD_DATE_BEGIN STR_TYPE_END
+#define FLD_DATE_FIX FLD_DATE_BEGIN
+#define FLD_DATE_STD (FLD_DATE_BEGIN + 1)
+#define FLD_DATE_END (FLD_DATE_BEGIN + 2)
+
+#define FLD_TIME_BEGIN FLD_DATE_END
+#define FLD_TIME_FIX FLD_TIME_BEGIN
+#define FLD_TIME_STD (FLD_TIME_BEGIN + 1)
+#define FLD_TIME_END (FLD_TIME_BEGIN + 2)
+
+#define FLD_STAT_BEGIN FLD_TIME_END
+#define FLD_STAT_PAGE FLD_STAT_BEGIN
+#define FLD_STAT_PARA (FLD_STAT_BEGIN + 1)
+#define FLD_STAT_WORD (FLD_STAT_BEGIN + 2)
+#define FLD_STAT_CHAR (FLD_STAT_BEGIN + 3)
+#define FLD_STAT_TABLE (FLD_STAT_BEGIN + 4)
+#define FLD_STAT_GRF (FLD_STAT_BEGIN + 5)
+#define FLD_STAT_OBJ (FLD_STAT_BEGIN + 6)
+#define FLD_STAT_END (FLD_STAT_BEGIN + 7)
+
+#define FLD_INPUT_BEGIN FLD_STAT_END
+#define FLD_INPUT_TEXT FLD_INPUT_BEGIN
+#define FLD_INPUT_END (FLD_INPUT_BEGIN + 1)
+
+#define FLD_EU_BEGIN FLD_INPUT_END
+#define FLD_EU_FIRMA FLD_EU_BEGIN
+#define FLD_EU_VORNAME (FLD_EU_BEGIN + 1)
+#define FLD_EU_NAME (FLD_EU_BEGIN + 2)
+#define FLD_EU_ABK (FLD_EU_BEGIN + 3)
+#define FLD_EU_STRASSE (FLD_EU_BEGIN + 4)
+#define FLD_EU_LAND (FLD_EU_BEGIN + 5)
+#define FLD_EU_PLZ (FLD_EU_BEGIN + 6)
+#define FLD_EU_ORT (FLD_EU_BEGIN + 7)
+#define FLD_EU_TITEL (FLD_EU_BEGIN + 8)
+#define FLD_EU_POS (FLD_EU_BEGIN + 9)
+#define FLD_EU_TELPRIV (FLD_EU_BEGIN + 10)
+#define FLD_EU_TELFIRMA (FLD_EU_BEGIN + 11)
+#define FLD_EU_FAX (FLD_EU_BEGIN + 12)
+#define FLD_EU_EMAIL (FLD_EU_BEGIN + 13)
+#define FLD_EU_STATE (FLD_EU_BEGIN + 14)
+#define FLD_EU_END (FLD_EU_BEGIN + 15)
+
+#define FLD_PAGEREF_BEGIN FLD_EU_END
+#define FLD_PAGEREF_OFF FLD_PAGEREF_BEGIN
+#define FLD_PAGEREF_ON (FLD_PAGEREF_BEGIN+1)
+#define FLD_PAGEREF_END (FLD_PAGEREF_BEGIN+2)
+
+/*----------------------------------------------------------
+ Format-Id's
+ ----------------------------------------------------------*/
+// Text
+#define FMT_TEXT FLD_PAGEREF_END
+
+// Nummern
+#define FMT_NUM_BEGIN (FMT_TEXT + 1)
+#define FMT_NUM_ABC FMT_NUM_BEGIN
+#define FMT_NUM_SABC (FMT_NUM_BEGIN + 1)
+#define FMT_NUM_ABC_N (FMT_NUM_BEGIN + 2)
+#define FMT_NUM_SABC_N (FMT_NUM_BEGIN + 3)
+#define FMT_NUM_ROMAN (FMT_NUM_BEGIN + 4)
+#define FMT_NUM_SROMAN (FMT_NUM_BEGIN + 5)
+#define FMT_NUM_ARABIC (FMT_NUM_BEGIN + 6)
+#define FMT_NUM_PAGEDESC (FMT_NUM_BEGIN + 7)
+#define FMT_NUM_PAGESPECIAL (FMT_NUM_BEGIN + 8)
+#define FMT_NUM_END (FMT_NUM_BEGIN + 9)
+
+// AuthorFormat
+#define FMT_AUTHOR_BEGIN FMT_NUM_END
+#define FMT_AUTHOR_NAME FMT_AUTHOR_BEGIN
+#define FMT_AUTHOR_SCUT (FMT_AUTHOR_BEGIN + 1)
+#define FMT_AUTHOR_END (FMT_AUTHOR_BEGIN + 2)
+
+// Variable setzen
+#define FMT_SETVAR_BEGIN FMT_AUTHOR_END
+#define FMT_SETVAR_SYS (FMT_SETVAR_BEGIN + 0)
+#define FMT_SETVAR_TEXT (FMT_SETVAR_BEGIN + 1)
+#define FMT_SETVAR_END (FMT_SETVAR_BEGIN + 2)
+
+// Variable einfuegen
+#define FMT_GETVAR_BEGIN FMT_SETVAR_END
+#define FMT_GETVAR_TEXT (FMT_GETVAR_BEGIN + 0)
+#define FMT_GETVAR_NAME (FMT_GETVAR_BEGIN + 1)
+#define FMT_GETVAR_END (FMT_GETVAR_BEGIN + 2)
+
+// Userfeld einfuegen
+#define FMT_USERVAR_BEGIN FMT_GETVAR_END
+#define FMT_USERVAR_TEXT (FMT_USERVAR_BEGIN + 0)
+#define FMT_USERVAR_CMD (FMT_USERVAR_BEGIN + 1)
+#define FMT_USERVAR_END (FMT_USERVAR_BEGIN + 2)
+
+// Datenbankfeld einfuegen
+#define FMT_DBFLD_BEGIN FMT_USERVAR_END
+#define FMT_DBFLD_DB (FMT_DBFLD_BEGIN + 0)
+#define FMT_DBFLD_SYS (FMT_DBFLD_BEGIN + 1)
+#define FMT_DBFLD_END (FMT_DBFLD_BEGIN + 2)
+
+//FileNameFormat
+// Achtung die letzten 4 Formate gibt es in RTF nicht (Verlust!)
+#define FMT_FF_BEGIN FMT_DBFLD_END
+#define FMT_FF_NAME FMT_FF_BEGIN
+#define FMT_FF_PATHNAME (FMT_FF_BEGIN + 1)
+#define FMT_FF_PATH (FMT_FF_BEGIN + 2)
+#define FMT_FF_NAME_NOEXT (FMT_FF_BEGIN + 3)
+#define FMT_FF_UI_NAME (FMT_FF_BEGIN + 4)
+#define FMT_FF_UI_RANGE (FMT_FF_BEGIN + 5)
+#define FMT_FF_END (FMT_FF_BEGIN + 6)
+
+// Registry-Format
+#define FMT_REG_BEGIN FMT_FF_END
+#define FMT_REG_AUTHOR FMT_REG_BEGIN
+#define FMT_REG_TIME (FMT_REG_BEGIN + 1)
+#define FMT_REG_DATE (FMT_REG_BEGIN + 2)
+#define FMT_REG_END (FMT_REG_BEGIN + 3)
+
+// Kapitel
+#define FMT_CHAPTER_BEGIN FMT_REG_END
+#define FMT_CHAPTER_NO FMT_CHAPTER_BEGIN
+#define FMT_CHAPTER_NAME (FMT_CHAPTER_BEGIN + 1)
+#define FMT_CHAPTER_NAMENO (FMT_CHAPTER_BEGIN + 2)
+#define FMT_CHAPTER_NO_NOSEPARATOR (FMT_CHAPTER_BEGIN + 3)
+#define FMT_CHAPTER_END (FMT_CHAPTER_BEGIN + 4)
+
+// DDE-Formate
+#define FMT_DDE_BEGIN FMT_CHAPTER_END
+#define FMT_DDE_NORMAL FMT_DDE_BEGIN
+#define FMT_DDE_HOT (FMT_DDE_BEGIN + 1)
+#define FMT_DDE_END (FMT_DDE_BEGIN + 2)
+
+#define FMT_REF_BEGIN FMT_DDE_END
+#define FMT_REF_PAGE FMT_REF_BEGIN
+#define FMT_REF_CHAPTER (FMT_REF_BEGIN + 1)
+#define FMT_REF_TEXT (FMT_REF_BEGIN + 2)
+#define FMT_REF_UPDOWN (FMT_REF_BEGIN + 3)
+#define FMT_REF_PAGE_PGDSC (FMT_REF_BEGIN + 4)
+#define FMT_REF_ONLYNUMBER (FMT_REF_BEGIN + 5)
+#define FMT_REF_ONLYCAPTION (FMT_REF_BEGIN + 6)
+#define FMT_REF_ONLYSEQNO (FMT_REF_BEGIN + 7)
+#define FMT_REF_NUMBER (FMT_REF_BEGIN + 8)
+#define FMT_REF_NUMBER_NO_CONTEXT (FMT_REF_BEGIN + 9)
+#define FMT_REF_NUMBER_FULL_CONTEXT (FMT_REF_BEGIN + 10)
+#define FMT_REF_END (FMT_REF_BEGIN + 11)
+
+// Platzhalter
+#define FMT_MARK_BEGIN FMT_REF_END
+#define FMT_MARK_TEXT FMT_MARK_BEGIN
+#define FMT_MARK_TABLE (FMT_MARK_BEGIN + 1)
+#define FMT_MARK_FRAME (FMT_MARK_BEGIN + 2)
+#define FMT_MARK_GRAFIC (FMT_MARK_BEGIN + 3)
+#define FMT_MARK_OLE (FMT_MARK_BEGIN + 4)
+#define FMT_MARK_END (FMT_MARK_BEGIN + 5)
+
+/*--------------------------------------------------------------------
+ Beschreibung: globale String-Ressourcen
+ --------------------------------------------------------------------*/
+
+#define STR_FLDUI FMT_MARK_END
+#define STR_INSERT STR_FLDUI
+#define STR_ALL (STR_FLDUI + 1)
+#define STR_EXTRA (STR_FLDUI + 2)
+
+/*--------------------------------------------------------------------
+ Beschreibung: Buttons fuer Field-Edit-Dlg
+ --------------------------------------------------------------------*/
+
+#define BTN_FLDEDT_PREV STR_EXTRA
+#define BTN_FLDEDT_NEXT (STR_EXTRA + 1)
+#define PB_FLDEDT_ADDRESS (STR_EXTRA + 2)
+
+/*--------------------------------------------------------------------
+ Beschreibung: Zusaetzliche Strings
+ --------------------------------------------------------------------*/
+
+#define STR_COND STR_EXTRA
+#define STR_TEXT (STR_EXTRA + 1)
+#define STR_DDE_CMD (STR_EXTRA + 2)
+#define STR_INSTEXT (STR_EXTRA + 3)
+#define STR_COMBCHRS_FT (STR_EXTRA + 4)
+#define STR_PROMPT (STR_EXTRA + 5)
+#define STR_MACNAME (STR_EXTRA + 6)
+#define STR_SETNO (STR_EXTRA + 7)
+#define STR_OFFSET (STR_EXTRA + 8)
+#define STR_VALUE (STR_EXTRA + 9)
+
+#define STR_URLPROMPT (STR_EXTRA + 11)
+#define STR_FORMULA (STR_EXTRA + 12)
+#define STR_ALL_DATABASE (STR_EXTRA + 13)
+#define STR_FLD_EDIT_DLG (STR_EXTRA + 14)
+
+#define FLDDLG_ACT_END (STR_FLD_EDIT_DLG)
+
+
+#endif
diff --git a/sw/inc/fldupde.hxx b/sw/inc/fldupde.hxx
new file mode 100644
index 000000000000..79443e092d61
--- /dev/null
+++ b/sw/inc/fldupde.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FLDUPDE_HXX
+#define _FLDUPDE_HXX
+
+enum SwFldUpdateFlags
+{
+ AUTOUPD_OFF,
+ AUTOUPD_FIELD_ONLY,
+ AUTOUPD_FIELD_AND_CHARTS,
+ AUTOUPD_GLOBALSETTING
+};
+
+
+#endif
diff --git a/sw/inc/flyenum.hxx b/sw/inc/flyenum.hxx
new file mode 100644
index 000000000000..765a23cda0b1
--- /dev/null
+++ b/sw/inc/flyenum.hxx
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FLYENUM_HXX
+#define _FLYENUM_HXX
+
+enum FlyCntType
+{
+ FLYCNTTYPE_ALL = 0,
+ FLYCNTTYPE_FRM,
+ FLYCNTTYPE_GRF,
+ FLYCNTTYPE_OLE
+
+};
+
+//Returnwerte fuer Chainable und Chain
+#define SW_CHAIN_OK 0
+#define SW_CHAIN_NOT_EMPTY 1 //Nur leere Frames duerfen connected werden
+#define SW_CHAIN_IS_IN_CHAIN 2 //Destination ist bereits in einer chain
+#define SW_CHAIN_WRONG_AREA 3 //Destination steht in einer nicht erlaubten
+ //Section (Kopf-/Fusszeile)
+#define SW_CHAIN_NOT_FOUND 4 //Destination und/oder Source nicht gefunden
+#define SW_CHAIN_SOURCE_CHAINED 5 //Source hat bereits einen Follow
+#define SW_CHAIN_SELF 6 //Sich selbst zu verketten ist
+ //natuerlich nicht erleubt.
+
+
+
+#endif
+
+
diff --git a/sw/inc/flypos.hxx b/sw/inc/flypos.hxx
new file mode 100644
index 000000000000..c2ebb0d81950
--- /dev/null
+++ b/sw/inc/flypos.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FLYPOS_HXX
+#define _FLYPOS_HXX
+
+
+#include <svl/svarray.hxx>
+#include <swdllapi.h>
+
+class SwFrmFmt;
+class SwNodeIndex;
+
+// Struktur zum Erfragen der akt. freifliegenden Rahmen am Dokument.
+class SW_DLLPUBLIC SwPosFlyFrm
+{
+ const SwFrmFmt* pFrmFmt; // das FlyFrmFmt
+// SwPosition* pPos; // Position in den ContentNode
+ SwNodeIndex* pNdIdx; // es reicht ein Index auf den Node
+ UINT32 nOrdNum;
+public:
+ SwPosFlyFrm( const SwNodeIndex& , const SwFrmFmt*, USHORT nArrPos );
+ virtual ~SwPosFlyFrm(); // virtual fuer die Writer (DLL !!)
+
+ // operatoren fuer das Sort-Array
+ BOOL operator==( const SwPosFlyFrm& );
+ BOOL operator<( const SwPosFlyFrm& );
+
+ const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
+ const SwNodeIndex& GetNdIndex() const { return *pNdIdx; }
+ UINT32 GetOrdNum() const { return nOrdNum; }
+};
+
+typedef SwPosFlyFrm* SwPosFlyFrmPtr;
+SV_DECL_PTRARR_SORT_VISIBILITY( SwPosFlyFrms, SwPosFlyFrmPtr, 0, 40, SW_DLLPUBLIC )
+
+#endif // _FLYPOS_HXX
diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx
new file mode 100644
index 000000000000..3b505952e4d9
--- /dev/null
+++ b/sw/inc/fmtanchr.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTANCHR_HXX
+#define _FMTANCHR_HXX
+
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <swtypes.hxx>
+#include <format.hxx>
+#include <svl/poolitem.hxx>
+
+struct SwPosition;
+class IntlWrapper;
+#define IVER_FMTANCHOR_LONGIDX ((USHORT)1)
+
+//FlyAnchor, Anker des Freifliegenden Rahmen ----
+
+class SW_DLLPUBLIC SwFmtAnchor: public SfxPoolItem
+{
+ SwPosition *pCntntAnchor; //0 Fuer Seitengebundene Rahmen.
+ //Index fuer Absatzgebundene Rahmen.
+ //Position fuer Zeichengebundene Rahmen
+ RndStdIds nAnchorId;
+ USHORT nPageNum; //Seitennummer bei Seitengeb. Rahmen.
+
+ // OD 2004-05-05 #i28701# - getting anchor positions ordered
+ sal_uInt32 mnOrder;
+ static sal_uInt32 mnOrderCounter;
+
+public:
+ SwFmtAnchor( RndStdIds eRnd = FLY_AT_PAGE, USHORT nPageNum = 0 );
+ SwFmtAnchor( const SwFmtAnchor &rCpy );
+ ~SwFmtAnchor();
+
+ // Zuweisungsoperator
+ SwFmtAnchor &operator=( const SwFmtAnchor& );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ 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 );
+
+ RndStdIds GetAnchorId() const { return nAnchorId; }
+ USHORT GetPageNum() const { return nPageNum; }
+ const SwPosition *GetCntntAnchor() const { return pCntntAnchor; }
+ // OD 2004-05-05 #i28701#
+ sal_uInt32 GetOrder() const;
+
+ void SetType( RndStdIds nRndId ) { nAnchorId = nRndId; }
+ void SetPageNum( USHORT nNew ) { nPageNum = nNew; }
+ void SetAnchor( const SwPosition *pPos );
+};
+
+inline const SwFmtAnchor &SwAttrSet::GetAnchor(BOOL bInP) const
+ { return static_cast<const SwFmtAnchor&>(Get(RES_ANCHOR, bInP)); }
+
+ inline const SwFmtAnchor &SwFmt::GetAnchor(BOOL bInP) const
+ { return aSet.GetAnchor(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx
new file mode 100644
index 000000000000..a230943f2ab0
--- /dev/null
+++ b/sw/inc/fmtautofmt.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTAUTOFMT_HXX
+#define _FMTAUTOFMT_HXX
+
+
+#include <svl/poolitem.hxx>
+#include <format.hxx>
+#include <boost/shared_ptr.hpp>
+
+// ATT_AUTOFMT *********************************************
+
+
+class SwFmtAutoFmt: public SfxPoolItem
+{
+ boost::shared_ptr<SfxItemSet> mpHandle;
+
+public:
+ SwFmtAutoFmt( USHORT nWhich = RES_TXTATR_AUTOFMT );
+
+ // single argument ctors shall be explicit.
+ virtual ~SwFmtAutoFmt();
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtAutoFmt( const SwFmtAutoFmt& rAttr );
+private:
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtAutoFmt & operator= (const SwFmtAutoFmt &);
+public:
+
+ TYPEINFO();
+
+ // "pure virtual methods" of SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ 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 );
+
+ void SetStyleHandle( boost::shared_ptr<SfxItemSet> pHandle ) { mpHandle = pHandle; }
+ const boost::shared_ptr<SfxItemSet> GetStyleHandle() const { return mpHandle; }
+ boost::shared_ptr<SfxItemSet> GetStyleHandle() { return mpHandle; }
+};
+
+#endif
+
diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx
new file mode 100644
index 000000000000..63dbe1f57dc6
--- /dev/null
+++ b/sw/inc/fmtclbl.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTCLBL_HXX
+#define _FMTCLBL_HXX
+
+
+#include <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class SW_DLLPUBLIC SwFmtNoBalancedColumns : public SfxBoolItem
+{
+public:
+ SwFmtNoBalancedColumns( BOOL bFlag = FALSE )
+ : SfxBoolItem( RES_COLUMNBALANCE, bFlag ) {}
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+
+inline const SwFmtNoBalancedColumns &SwAttrSet::GetBalancedColumns(BOOL bInP) const
+ { return (const SwFmtNoBalancedColumns&)Get( RES_COLUMNBALANCE, bInP ); }
+
+inline const SwFmtNoBalancedColumns &SwFmt::GetBalancedColumns(BOOL bInP) const
+ { return aSet.GetBalancedColumns( bInP ); }
+
+#endif
+
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
new file mode 100644
index 000000000000..1efcd900f358
--- /dev/null
+++ b/sw/inc/fmtclds.hxx
@@ -0,0 +1,179 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTCLDS_HXX
+#define _FMTCLDS_HXX
+
+#include <tools/color.hxx>
+#include <svl/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+
+//Der ColumnDescriptor --------------------------
+
+class SwColumn
+{
+ USHORT nWish; //Wunschbreite incl. Raender.
+ //Verhaelt sich proportional zum Verhaeltniss:
+ //Wunschbreite der Umgebung / aktuelle Breite der Spalte
+ USHORT nUpper; //Oberer Rand
+ USHORT nLower; //Unterer Rand
+ USHORT nLeft; //Linker Rand
+ USHORT nRight; //Rechter Rand
+
+public:
+ SwColumn();
+
+ BOOL operator==( const SwColumn & );
+
+
+ void SetWishWidth( USHORT nNew ) { nWish = nNew; }
+ void SetUpper( USHORT nNew ) { nUpper = nNew; }
+ void SetLower( USHORT nNew ) { nLower = nNew; }
+ void SetLeft ( USHORT nNew ) { nLeft = nNew; }
+ void SetRight( USHORT nNew ) { nRight = nNew; }
+
+ USHORT GetWishWidth() const { return nWish; }
+ USHORT GetUpper() const { return nUpper; }
+ USHORT GetLower() const { return nLower; }
+ USHORT GetLeft () const { return nLeft; }
+ USHORT GetRight() const { return nRight; }
+};
+
+typedef SwColumn* SwColumnPtr;
+SV_DECL_PTRARR_DEL( SwColumns, SwColumnPtr, 0, 2 )
+
+enum SwColLineAdj
+{
+ COLADJ_NONE,
+ COLADJ_TOP,
+ COLADJ_CENTER,
+ COLADJ_BOTTOM
+};
+
+class SW_DLLPUBLIC SwFmtCol : public SfxPoolItem
+{
+// Pen aPen; //Pen fuer die Linine zwischen den Spalten
+ ULONG nLineWidth; //width of the separator line
+ Color aLineColor; //color of the separator line
+
+ BYTE nLineHeight; //Prozentuale Hoehe der Linien
+ //(Relativ zu der Hoehe der Spalten incl. UL).
+ SwColLineAdj eAdj; //Linie wird oben, mittig oder unten ausgerichtet.
+
+ SwColumns aColumns; //Informationen fuer die einzelnen Spalten.
+ USHORT nWidth; //Gesamtwunschbreite aller Spalten.
+
+ BOOL bOrtho; //Nur wenn dieses Flag gesetzt ist wird beim setzen
+ //der GutterWidth eine 'optische Verteilung'
+ //vorgenommen.
+ //Es muss zurueckgesetzt werden wenn an den
+ //Spaltenbreiten bzw. den Raendern gedreht wird.
+ //Wenn es wieder gesetzt wird wird automatisch neu
+ //gemischt (optisch verteilt).
+ //Das Flag ist initial gesetzt.
+
+ SW_DLLPRIVATE void Calc( USHORT nGutterWidth, USHORT nAct );
+
+public:
+ SwFmtCol();
+ SwFmtCol( const SwFmtCol& );
+ ~SwFmtCol();
+
+ SwFmtCol& operator=( const SwFmtCol& );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ 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 );
+
+ const SwColumns &GetColumns() const { return aColumns; }
+ SwColumns &GetColumns() { return aColumns; }
+ USHORT GetNumCols() const { return aColumns.Count(); }
+// const Pen& GetLinePen() const { return aPen; }
+ ULONG GetLineWidth() const { return nLineWidth;}
+ const Color& GetLineColor() const { return aLineColor;}
+
+
+ SwColLineAdj GetLineAdj() const { return eAdj; }
+ BOOL IsOrtho() const { return bOrtho; }
+ USHORT GetWishWidth() const { return nWidth; }
+ BYTE GetLineHeight()const { return nLineHeight; }
+
+ //Return USHRT_MAX wenn uneindeutig.
+ //Return die kleinste Breite wenn bMin True ist.
+ USHORT GetGutterWidth( BOOL bMin = FALSE ) const;
+
+// void SetLinePen( const Pen& rNew ) { aPen = rNew; }
+ void SetLineWidth(ULONG nLWidth) { nLineWidth = nLWidth;}
+ void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
+ void SetLineHeight( BYTE nNew ) { nLineHeight = nNew; }
+ void SetLineAdj( SwColLineAdj eNew ){ eAdj = eNew; }
+ void SetWishWidth( USHORT nNew ) { nWidth = nNew; }
+
+ //Mit dieser Funktion koennen die Spalten (immer wieder) initialisert
+ //werden. Das Ortho Flag wird automatisch gesetzt.
+ void Init( USHORT nNumCols, USHORT nGutterWidth, USHORT nAct );
+
+ //Stellt die Raender fuer die Spalten in aColumns ein.
+ //Wenn das Flag bOrtho gesetzt ist, werden die Spalten neu optisch
+ //verteilt. Ist das Flag nicht gesetzt werden die Spaltenbreiten nicht
+ //veraendert und die Raender werden einfach eingestellt.
+ void SetGutterWidth( USHORT nNew, USHORT nAct );
+
+ //Verteilt ebenfalls automatisch neu wenn das Flag gesetzt wird;
+ //nur dann wird auch der zweite Param. benoetigt und beachtet.
+ void SetOrtho( BOOL bNew, USHORT nGutterWidth, USHORT nAct );
+
+ //Fuer den Reader
+ void _SetOrtho( BOOL bNew ) { bOrtho = bNew; }
+
+ //Berechnet die aktuelle Breite der Spalte nCol.
+ //Das Verhaeltniss von Wunschbreite der Spalte zum Returnwert ist
+ //proportional zum Verhaeltniss des Gesamtwunschwertes zu nAct.
+ USHORT CalcColWidth( USHORT nCol, USHORT nAct ) const;
+
+ //Wie oben, aber es wir die Breite der PrtArea - also das was fuer
+ //den Anwender die Spalte ist - geliefert.
+ USHORT CalcPrtColWidth( USHORT nCol, USHORT nAct ) const;
+};
+
+inline const SwFmtCol &SwAttrSet::GetCol(BOOL bInP) const
+ { return (const SwFmtCol&)Get( RES_COL,bInP); }
+
+inline const SwFmtCol &SwFmt::GetCol(BOOL bInP) const
+ { return aSet.GetCol(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtcnct.hxx b/sw/inc/fmtcnct.hxx
new file mode 100644
index 000000000000..55e2212985c0
--- /dev/null
+++ b/sw/inc/fmtcnct.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTCNCT_HXX
+#define _FMTCNCT_HXX
+
+#include <hintids.hxx>
+#include <svl/poolitem.hxx>
+#include <format.hxx>
+#include <calbck.hxx>
+
+
+class SwFlyFrmFmt;
+class IntlWrapper;
+
+//Verbindung (Textfluss) zwischen zwei FlyFrms
+
+class SW_DLLPUBLIC SwFmtChain: public SfxPoolItem
+{
+ SwClient aPrev, //Vorgaenger (SwFlyFrmFmt), wenn es diesen gibt.
+ aNext; //Nachfolger (SwFlyFrmFmt), wenn es diesen gibt.
+
+
+public:
+ SwFmtChain() : SfxPoolItem( RES_CHAIN ) {}
+ SwFmtChain( const SwFmtChain &rCpy );
+
+ inline SwFmtChain &operator=( const SwFmtChain& );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+
+ SwFlyFrmFmt* GetPrev() const { return (SwFlyFrmFmt*)aPrev.GetRegisteredIn(); }
+ SwFlyFrmFmt* GetNext() const { return (SwFlyFrmFmt*)aNext.GetRegisteredIn(); }
+
+
+ void SetPrev( SwFlyFrmFmt *pFmt );
+ void SetNext( SwFlyFrmFmt *pFmt );
+};
+
+SwFmtChain &SwFmtChain::operator=( const SwFmtChain &rCpy )
+{
+ SetPrev( rCpy.GetPrev() );
+ SetNext( rCpy.GetNext() );
+ return *this;
+}
+
+
+inline const SwFmtChain &SwAttrSet::GetChain(BOOL bInP) const
+ { return (const SwFmtChain&)Get( RES_CHAIN,bInP); }
+
+inline const SwFmtChain &SwFmt::GetChain(BOOL bInP) const
+ { return aSet.GetChain(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtcntnt.hxx b/sw/inc/fmtcntnt.hxx
new file mode 100644
index 000000000000..0f8449cac766
--- /dev/null
+++ b/sw/inc/fmtcntnt.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTCNTNT_HXX
+#define _FMTCNTNT_HXX
+
+#include <svl/poolitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+
+class SwNodeIndex;
+class SwStartNode;
+
+//Cntnt, Inhalt des Frame (Header, Footer, Fly) ----
+
+class SW_DLLPUBLIC SwFmtCntnt: public SfxPoolItem
+{
+ SwNodeIndex *pStartNode;
+
+ SwFmtCntnt &operator=( const SwFmtCntnt & ); //Kopieren verboten
+
+public:
+// SwFmtCntnt( const SwNodeIndex *pStartNodeIdx = 0 );
+ SwFmtCntnt( const SwStartNode* pStartNode = 0 );
+ SwFmtCntnt( const SwFmtCntnt &rCpy );
+ ~SwFmtCntnt();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ const SwNodeIndex *GetCntntIdx() const { return pStartNode; }
+ void SetNewCntntIdx( const SwNodeIndex *pIdx );
+};
+
+inline const SwFmtCntnt &SwAttrSet::GetCntnt(BOOL bInP) const
+ { return (const SwFmtCntnt&)Get( RES_CNTNT,bInP); }
+
+inline const SwFmtCntnt &SwFmt::GetCntnt(BOOL bInP) const
+ { return aSet.GetCntnt(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx
new file mode 100644
index 000000000000..aba9b8533c0a
--- /dev/null
+++ b/sw/inc/fmtcol.hxx
@@ -0,0 +1,304 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTCOL_HXX
+#define _FMTCOL_HXX
+
+#include <svl/svarray.hxx>
+#include "swdllapi.h"
+#include <format.hxx>
+#include <swtypes.hxx> // fuer MAXLEVEL
+
+class SwDoc; // fuer friend
+
+class SwFmtColl : public SwFmt
+{
+protected:
+ SwFmtColl( SwAttrPool& rPool, const sal_Char* pFmtName,
+ const USHORT* pWhichRanges, SwFmtColl* pDerFrom,
+ USHORT nFmtWhich )
+ : SwFmt( rPool, pFmtName, pWhichRanges, pDerFrom, nFmtWhich )
+ { SetAuto( FALSE ); }
+
+ SwFmtColl( SwAttrPool& rPool, const String &rFmtName,
+ const USHORT* pWhichRanges, SwFmtColl* pDerFrom,
+ USHORT nFmtWhich )
+ : SwFmt( rPool, rFmtName, pWhichRanges, pDerFrom, nFmtWhich )
+ { SetAuto( FALSE ); }
+
+
+private:
+ // erstmal wird nicht kopiert und nicht zugewiesen
+ SwFmtColl(const SwFmtColl & );
+ const SwFmtColl &operator=(const SwFmtColl &);
+};
+
+
+class SW_DLLPUBLIC SwTxtFmtColl: public SwFmtColl
+{
+ friend class SwDoc;
+
+ SwTxtFmtColl(const SwTxtFmtColl & rRef);
+
+ // --> OD 2007-01-24 #i73790#
+ bool mbStayAssignedToListLevelOfOutlineStyle;
+ // <--
+
+protected:
+ //BYTE nOutlineLevel; //<-#outline level, removed by zhaojianwei
+ bool mbAssignedToOutlineStyle;//<-#outline level added by zhaojianwei
+
+ SwTxtFmtColl *pNextTxtFmtColl;
+
+ SwTxtFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName,
+ SwTxtFmtColl* pDerFrom = 0,
+ USHORT nFmtWh = RES_TXTFMTCOLL )
+ : SwFmtColl( rPool, pFmtCollName, aTxtFmtCollSetRange,
+ pDerFrom, nFmtWh ),
+ // --> OD 2007-01-24 #i73790#
+ mbStayAssignedToListLevelOfOutlineStyle( false ),
+ // <--
+ //nOutlineLevel( NO_NUMBERING ) //<-#outline level,removed by zhaojianwei
+ mbAssignedToOutlineStyle(false) //<-#outline level,added by zhaojianwei
+ { pNextTxtFmtColl = this; }
+
+ SwTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
+ SwTxtFmtColl* pDerFrom = 0,
+ USHORT nFmtWh = RES_TXTFMTCOLL )
+ : SwFmtColl( rPool, rFmtCollName, aTxtFmtCollSetRange,
+ pDerFrom, nFmtWh ),
+ // --> OD 2007-01-24 #i73790#
+ mbStayAssignedToListLevelOfOutlineStyle( false ),
+ // <--
+ //nOutlineLevel( NO_NUMBERING ) //<-#outline level,removed by zhaojianwei
+ mbAssignedToOutlineStyle(false) //<-#outline level,added by zhaojianwei
+ { pNextTxtFmtColl = this; }
+public:
+
+ // zum "abfischen" von UL-/LR-/FontHeight Aenderungen
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ inline void SetNextTxtFmtColl(SwTxtFmtColl& rNext);
+ SwTxtFmtColl& GetNextTxtFmtColl() const { return *pNextTxtFmtColl; }
+
+ BOOL IsAtDocNodeSet() const;
+
+ // --> OD 2006-11-22 #i71574#
+ //<-#outline level,zhaojianwei
+ void SetAttrOutlineLevel( int );
+ int GetAttrOutlineLevel() const;
+ int GetAssignedOutlineStyleLevel() const;
+ inline bool IsAssignedToListLevelOfOutlineStyle() const
+ {
+ return mbAssignedToOutlineStyle;
+ }
+ void AssignToListLevelOfOutlineStyle(const int nAssignedListLevel);
+ void DeleteAssignmentToListLevelOfOutlineStyle();
+ //<-end
+ // <--
+
+ // --> OD 2008-03-04 #refactorlists#
+ // override to recognize changes on the <SwNumRuleItem> and register/unregister
+ // the paragragh style at the corresponding <SwNumRule> instance
+ virtual BOOL SetFmtAttr( const SfxPoolItem& rAttr );
+ virtual BOOL SetFmtAttr( const SfxItemSet& rSet );
+ virtual BOOL ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ // <--
+
+ // --> OD 2007-01-24 #i73790#
+ // override <ResetAllFmtAttr()> to stay assigned to list level of outline style
+ virtual USHORT ResetAllFmtAttr();
+
+ inline bool StayAssignedToListLevelOfOutlineStyle() const
+ {
+ return mbStayAssignedToListLevelOfOutlineStyle;
+ }
+ // <--
+
+ // --> OD 2008-02-13 #newlistleveattrs#
+ bool AreListLevelIndentsApplicable() const;
+ // <--
+
+/*----------------- JP 09.08.94 17:36 -------------------
+ wird die Funktionalitaet von Zeichenvorlagen an Absatzvorlagen
+ ueberhaupt benoetigt ??
+
+ Wenn, ja dann muessen im TextNode und hier in der TxtCollection ein 2.
+ Attset fuer die Char-Attribute angelegt werden; damit die Vererbung
+ und der Zugriff auf die gesetzen Attribute richtig funktioniert!!
+
+ virtual BOOL SetDerivedFrom( SwFmtColl* pDerFrom = 0 );
+
+ inline SwCharFmt* GetCharFmt() const;
+ inline BOOL IsCharFmtSet() const;
+ void SetCharFmt(SwCharFmt *);
+ void ResetCharFmt();
+inline BOOL SwTxtFmtColl::IsCharFmtSet() const
+{
+ return aCharDepend.GetRegisteredIn() ? TRUE : FALSE;
+}
+inline SwCharFmt* SwTxtFmtColl::GetCharFmt() const
+{
+ return (SwCharFmt*)aCharDepend.GetRegisteredIn();
+}
+--------------------------------------------------*/
+};
+
+typedef SwTxtFmtColl* SwTxtFmtCollPtr;
+SV_DECL_PTRARR(SwTxtFmtColls,SwTxtFmtCollPtr,2,4)
+
+
+class SwGrfFmtColl: public SwFmtColl
+{
+ friend class SwDoc;
+protected:
+ SwGrfFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName,
+ SwGrfFmtColl* pDerFrom = 0 )
+ : SwFmtColl( rPool, pFmtCollName, aGrfFmtCollSetRange,
+ pDerFrom, RES_GRFFMTCOLL )
+ {}
+
+ SwGrfFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
+ SwGrfFmtColl* pDerFrom = 0 )
+ : SwFmtColl( rPool, rFmtCollName, aGrfFmtCollSetRange,
+ pDerFrom, RES_GRFFMTCOLL )
+ {}
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+};
+
+typedef SwGrfFmtColl* SwGrfFmtCollPtr;
+SV_DECL_PTRARR(SwGrfFmtColls,SwGrfFmtCollPtr,2,4)
+
+
+
+//FEATURE::CONDCOLL
+// --------- Bedingte Vorlagen -------------------------------
+
+enum Master_CollConditions
+{
+ PARA_IN_LIST = 0x0001,
+ PARA_IN_OUTLINE = 0x0002,
+ PARA_IN_FRAME = 0x0004,
+ PARA_IN_TABLEHEAD = 0x0008,
+ PARA_IN_TABLEBODY = 0x0010,
+ PARA_IN_SECTION = 0x0020,
+ PARA_IN_FOOTENOTE = 0x0040,
+ PARA_IN_FOOTER = 0x0080,
+ PARA_IN_HEADER = 0x0100,
+ PARA_IN_ENDNOTE = 0x0200,
+ // ...
+ USRFLD_EXPRESSION = (int)0x8000
+};
+
+
+class SW_DLLPUBLIC SwCollCondition : public SwClient
+{
+ ULONG nCondition;
+ union
+ {
+ ULONG nSubCondition;
+ String* pFldExpression;
+ } aSubCondition;
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+
+ SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
+ ULONG nSubCond = 0 );
+ SwCollCondition( SwTxtFmtColl* pColl, ULONG nMasterCond,
+ const String& rSubExp );
+ virtual ~SwCollCondition();
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwCollCondition( const SwCollCondition& rCpy );
+private:
+ // @@@ public copy ctor, but no copy assignment?
+ SwCollCondition & operator= (const SwCollCondition &);
+public:
+
+ int operator==( const SwCollCondition& rCmp ) const;
+ int operator!=( const SwCollCondition& rCmp ) const
+ { return ! (*this == rCmp); }
+
+ ULONG GetCondition() const { return nCondition; }
+ ULONG GetSubCondition() const { return aSubCondition.nSubCondition; }
+ const String* GetFldExpression() const
+ { return aSubCondition.pFldExpression; }
+
+ void SetCondition( ULONG nCond, ULONG nSubCond );
+ SwTxtFmtColl* GetTxtFmtColl() const { return (SwTxtFmtColl*)GetRegisteredIn(); }
+};
+
+
+typedef SwCollCondition* SwCollConditionPtr;
+SV_DECL_PTRARR_DEL( SwFmtCollConditions, SwCollConditionPtr, 0, 5 )
+
+class SW_DLLPUBLIC SwConditionTxtFmtColl : public SwTxtFmtColl
+{
+ friend class SwDoc;
+protected:
+ SwFmtCollConditions aCondColls;
+
+ SwConditionTxtFmtColl( SwAttrPool& rPool, const sal_Char* pFmtCollName,
+ SwTxtFmtColl* pDerFrom = 0 )
+ : SwTxtFmtColl( rPool, pFmtCollName, pDerFrom, RES_CONDTXTFMTCOLL )
+ {}
+ SwConditionTxtFmtColl( SwAttrPool& rPool, const String &rFmtCollName,
+ SwTxtFmtColl* pDerFrom = 0 )
+ : SwTxtFmtColl( rPool, rFmtCollName, pDerFrom, RES_CONDTXTFMTCOLL )
+ {}
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ virtual ~SwConditionTxtFmtColl();
+
+ // zum "abfischen" von Aenderungen
+// virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+
+ const SwCollCondition* HasCondition( const SwCollCondition& rCond ) const;
+ const SwFmtCollConditions& GetCondColls() const { return aCondColls; }
+ void InsertCondition( const SwCollCondition& rCond );
+ BOOL RemoveCondition( const SwCollCondition& rCond );
+
+ void SetConditions( const SwFmtCollConditions& );
+};
+
+//FEATURE::CONDCOLL
+
+// ------------- Inline Implementierungen --------------------
+
+inline void SwTxtFmtColl::SetNextTxtFmtColl( SwTxtFmtColl& rNext )
+{
+ pNextTxtFmtColl = &rNext;
+}
+#endif
+
diff --git a/sw/inc/fmtcolfunc.hxx b/sw/inc/fmtcolfunc.hxx
new file mode 100644
index 000000000000..4cb10c468fd0
--- /dev/null
+++ b/sw/inc/fmtcolfunc.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTCOLFUNC_HXX
+#define _FMTCOLFUNC_HXX
+
+class SwFmt;
+class SwNumRuleItem;
+
+// namespace <TxtFmtCollFunc> for functions and procedures working on
+// paragraph styles (instances of <SwTxtFmtColl>
+namespace TxtFmtCollFunc
+{
+ /** Checks, if assignment of paragraph style to list level of outline style
+ has to be deleted, and deletes the assignment, if needed.
+
+ OD 2006-11-22 #i71574#
+ The assignment of a paragraph style to a list level of the outline style
+ has to be deleted, if the numbering rule, which is set at the paragraph
+ style isn't the outline style.
+
+ @author OD
+ */
+ void CheckTxtFmtCollForDeletionOfAssignmentToOutlineStyle(
+ SwFmt* pFmt,
+ const SwNumRuleItem* pNewNumRuleItem = 0L );
+
+ /** determines the list style, which directly set at the given paragraph style
+
+ OD 2008-03-04 #refactorlists#
+
+ @author OD
+
+ @param rTxtFmtColl
+ input parameter - paragraph style for which the list style should be retrieved
+
+ @return pointer to <SwNumRule> instance, if the given paragraph style
+ has directly set a list style, 0 otherwise
+ */
+ SwNumRule* GetNumRule( SwTxtFmtColl& rTxtFmtColl );
+
+ /** adds the given paragraph style at the directly set list style
+
+ OD 2008-03-04 #refactorlists#
+ Note: If the given paragraph style has no directly set list style, nothing happens
+
+ @param rTxtFmtColl
+ input parameter - paragraph style which is added to its directly set list style
+
+ @author OD
+ */
+ void AddToNumRule( SwTxtFmtColl& rTxtFmtColl );
+
+ /** removes te given paragraph style from the directly set list style
+
+ OD 2008-03-04 #refactorlists#
+ Note: If the given paragraph style has no directly set list style, nothing happens
+
+ @param rTxtFmtColl
+ input parameter - paragraph style which is removed from its directly set list style
+
+ @author OD
+ */
+ void RemoveFromNumRule( SwTxtFmtColl& rTxtFmtColl );
+}
+#endif
diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx
new file mode 100644
index 000000000000..b3b98373905e
--- /dev/null
+++ b/sw/inc/fmteiro.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTEIRO_HXX
+#define _FMTEIRO_HXX
+
+
+#include <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtEditInReadonly : public SfxBoolItem
+{
+public:
+ SwFmtEditInReadonly( USHORT nId = RES_EDIT_IN_READONLY,
+ BOOL bPrt = FALSE ) : SfxBoolItem( nId, bPrt ) {}
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline const SwFmtEditInReadonly &SwAttrSet::GetEditInReadonly(BOOL bInP) const
+ { return (const SwFmtEditInReadonly&)Get( RES_EDIT_IN_READONLY,bInP); }
+
+inline const SwFmtEditInReadonly &SwFmt::GetEditInReadonly(BOOL bInP) const
+ { return aSet.GetEditInReadonly(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx
new file mode 100644
index 000000000000..a1fbc11feb54
--- /dev/null
+++ b/sw/inc/fmtflcnt.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTFLCNT_HXX
+#define _FMTFLCNT_HXX
+
+
+#include <svl/poolitem.hxx>
+
+class SwFrmFmt;
+class SwTxtFlyCnt;
+// ATT_FLYCNT *******************************************************
+
+class SwFmtFlyCnt : public SfxPoolItem
+{
+ friend class SwTxtFlyCnt;
+ SwTxtFlyCnt* pTxtAttr; // mein TextAttribut
+ SwFrmFmt* pFmt; // mein Fly/DrawFrame-Format
+ // geschuetzter CopyCtor
+ SwFmtFlyCnt& operator=(const SwFmtFlyCnt& rFlyCnt);
+
+public:
+ SwFmtFlyCnt( SwFrmFmt *pFrmFmt );
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ inline SwFrmFmt *GetFrmFmt() const { return pFmt; }
+ // fuer Undo: loesche "logisch" das FlyFrmFormat, wird sich im
+ // Undo-Object gemerkt.
+ inline void SetFlyFmt( SwFrmFmt* pNew = 0 ) { pFmt = pNew; }
+
+ const SwTxtFlyCnt *GetTxtFlyCnt() const { return pTxtAttr; }
+ SwTxtFlyCnt *GetTxtFlyCnt() { return pTxtAttr; }
+
+ // OD 27.06.2003 #108784#
+ bool Sw3ioExportAllowed() const;
+};
+
+#endif
+
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
new file mode 100644
index 000000000000..0e1932f9605b
--- /dev/null
+++ b/sw/inc/fmtfld.hxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTFLD_HXX
+#define _FMTFLD_HXX
+
+#include <svl/poolitem.hxx>
+#include <svl/brdcst.hxx>
+#include <svl/smplhint.hxx>
+
+#include "swdllapi.h"
+#include <calbck.hxx>
+
+class SwField;
+class SwTxtFld;
+class SwView;
+
+// ATT_FLD ***********************************
+class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBroadcaster
+{
+ friend class SwTxtFld;
+ friend void _InitCore();
+
+ SwField *pField;
+ SwTxtFld* pTxtAttr; // mein TextAttribut
+
+ SwFmtFld(); // das default-Attibut
+
+ // geschuetzter CopyCtor
+ // @@@ copy construction allowed, but copy assignment is not? @@@
+ SwFmtFld& operator=(const SwFmtFld& rFld);
+
+public:
+ TYPEINFO();
+
+ // single argument constructors shall be explicit.
+ explicit SwFmtFld( const SwField &rFld );
+
+ // @@@ copy construction allowed, but copy assignment is not? @@@
+ SwFmtFld( const SwFmtFld& rAttr );
+
+ virtual ~SwFmtFld();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ const SwField *GetFld() const { return pField; }
+ SwField *GetFld() { return pField; }
+
+ // #111840#
+ /**
+ Sets current field.
+
+ @param pField new field
+
+ @attention The current field will be destroyed before setting the new field.
+ */
+ void SetFld(SwField * pField);
+
+ const SwTxtFld *GetTxtFld() const { return pTxtAttr; }
+ SwTxtFld *GetTxtFld() { return pTxtAttr; }
+
+ BOOL IsFldInDoc() const;
+ BOOL IsProtect() const;
+};
+
+class SW_DLLPUBLIC SwFmtFldHint : public SfxHint
+{
+#define SWFMTFLD_INSERTED 1
+#define SWFMTFLD_REMOVED 2
+#define SWFMTFLD_FOCUS 3
+#define SWFMTFLD_CHANGED 4
+#define SWFMTFLD_LANGUAGE 5
+
+ const SwFmtFld* pFld;
+ sal_Int16 nWhich;
+ const SwView* pView;
+
+public:
+ SwFmtFldHint( const SwFmtFld* p, sal_Int16 n, const SwView* pV = 0)
+ : pFld(p)
+ , nWhich(n)
+ , pView(pV)
+ {}
+
+ TYPEINFO();
+ const SwFmtFld* GetField() const { return pFld; }
+ sal_Int16 Which() const { return nWhich; }
+ const SwView* GetView() const { return pView; }
+};
+
+#endif
diff --git a/sw/inc/fmtfollowtextflow.hxx b/sw/inc/fmtfollowtextflow.hxx
new file mode 100644
index 000000000000..5a5792978c93
--- /dev/null
+++ b/sw/inc/fmtfollowtextflow.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTFOLLOWTEXTFLOW_HXX
+#define _FMTFOLLOWTEXTFLOW_HXX
+
+
+#include <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtFollowTextFlow : public SfxBoolItem
+{
+public:
+ SwFmtFollowTextFlow( BOOL bFlag = FALSE )
+ : SfxBoolItem( RES_FOLLOW_TEXT_FLOW, bFlag ) {}
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+
+#if !(defined(MACOSX) && ( __GNUC__ < 3 ))
+// GrP moved to gcc_outl.cxx; revisit with gcc3
+inline const SwFmtFollowTextFlow &SwAttrSet::GetFollowTextFlow(BOOL bInP) const
+ { return (const SwFmtFollowTextFlow&)Get( RES_FOLLOW_TEXT_FLOW, bInP ); }
+
+inline const SwFmtFollowTextFlow &SwFmt::GetFollowTextFlow(BOOL bInP) const
+ { return aSet.GetFollowTextFlow( bInP ); }
+#endif
+
+#endif
+
diff --git a/sw/inc/fmtfordr.hxx b/sw/inc/fmtfordr.hxx
new file mode 100644
index 000000000000..a79788555c72
--- /dev/null
+++ b/sw/inc/fmtfordr.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTFORDR_HXX
+#define _FMTFORDR_HXX
+
+#include <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+
+//Die FillOrder ---------------------------------
+
+enum SwFillOrder
+{
+ SW_FILL_ORDER_BEGIN,
+ ATT_TOP_DOWN = SW_FILL_ORDER_BEGIN,
+ ATT_BOTTOM_UP,
+ ATT_LEFT_TO_RIGHT,
+ ATT_RIGHT_TO_LEFT,
+ SW_FILL_ORDER_END
+};
+
+class SwFmtFillOrder: public SfxEnumItem
+{
+public:
+ SwFmtFillOrder( SwFillOrder = ATT_TOP_DOWN );
+ inline SwFmtFillOrder &operator=( const SwFmtFillOrder &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual USHORT GetValueCount() const;
+
+ SwFillOrder GetFillOrder() const { return SwFillOrder(GetValue()); }
+};
+
+inline SwFmtFillOrder &SwFmtFillOrder::operator=( const SwFmtFillOrder &rCpy )
+{
+ SetValue( rCpy.GetValue() );
+ return *this;
+}
+
+inline const SwFmtFillOrder &SwAttrSet::GetFillOrder(BOOL bInP) const
+ { return (const SwFmtFillOrder&)Get( RES_FILL_ORDER,bInP); }
+
+inline const SwFmtFillOrder &SwFmt::GetFillOrder(BOOL bInP) const
+ { return aSet.GetFillOrder(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtfsize.hxx b/sw/inc/fmtfsize.hxx
new file mode 100644
index 000000000000..df6d99910e91
--- /dev/null
+++ b/sw/inc/fmtfsize.hxx
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTFSIZE_HXX
+#define _FMTFSIZE_HXX
+
+#include <tools/gen.hxx>
+#include <svl/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <swtypes.hxx>
+#include <format.hxx>
+
+class IntlWrapper;
+
+//Die Framesize ---------------------------------
+
+enum SwFrmSize
+{
+ ATT_VAR_SIZE, //Frm ist in der Var-Richtung variabel
+ ATT_FIX_SIZE, //Frm ist in der Var-Richtung unbeweglich
+ ATT_MIN_SIZE //Der Wert in der Var-Richtung beschreibt eine
+ //Minimalgroesse, die nicht unter- wohl aber
+ //ueberschritten werden kann.
+};
+
+class SW_DLLPUBLIC SwFmtFrmSize: public SfxPoolItem
+{
+ Size aSize;
+ SwFrmSize eFrmHeightType;
+ SwFrmSize eFrmWidthType;
+ BYTE nWidthPercent; //Fuer Tabellen kann die Breite in Prozent
+ BYTE nHeightPercent; //angegeben sein.
+ //Fuer Rahmen koennen Hoehe und/oder Breite
+ //in Prozent angegeben sein. Wenn nur eine
+ //der Angaben in Prozent angeben ist, kann
+ //durch den ausgezeichneten Wert 0xFF in der
+ //anderen Prozentangabe bestimmt werden, das
+ //sich diese Richtung proportional zur anderen
+ //verhaelt. Basis fuer die Umrechnung sind fuer
+ //diesen Fall die Angaben in der Size.
+ //Die Prozentwerte beziehen sich immer auf die
+ //Umgebung in der das Objekt steht (PrtArea)
+ //Auf die Bildschirmbreite abzueglich Raender
+ //in der BrowseView wenn die Umgebung die Seite
+ //ist.
+public:
+ SwFmtFrmSize( SwFrmSize eSize = ATT_VAR_SIZE,
+ SwTwips nWidth = 0, SwTwips nHeight = 0 );
+ SwFmtFrmSize& operator=( const SwFmtFrmSize& rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ 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 );
+
+ SwFrmSize GetHeightSizeType() const { return eFrmHeightType; }
+ void SetHeightSizeType( SwFrmSize eSize ) { eFrmHeightType = eSize; }
+
+ SwFrmSize GetWidthSizeType() const { return eFrmWidthType; }
+ void SetWidthSizeType( SwFrmSize eSize ) { eFrmWidthType = eSize; }
+
+ const Size& GetSize() const { return aSize; }
+ void SetSize( const Size &rNew ) { aSize = rNew; }
+
+ SwTwips GetHeight() const { return aSize.Height(); }
+ SwTwips GetWidth() const { return aSize.Width(); }
+ void SetHeight( const SwTwips nNew ) { aSize.Height() = nNew; }
+ void SetWidth ( const SwTwips nNew ) { aSize.Width() = nNew; }
+
+ BYTE GetHeightPercent() const{ return nHeightPercent; }
+ BYTE GetWidthPercent() const { return nWidthPercent; }
+ void SetHeightPercent( BYTE n ) { nHeightPercent = n; }
+ void SetWidthPercent ( BYTE n ) { nWidthPercent = n; }
+};
+
+inline const SwFmtFrmSize &SwAttrSet::GetFrmSize(BOOL bInP) const
+ { return (const SwFmtFrmSize&)Get( RES_FRM_SIZE,bInP); }
+
+inline const SwFmtFrmSize &SwFmt::GetFrmSize(BOOL bInP) const
+ { return aSet.GetFrmSize(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx
new file mode 100644
index 000000000000..381703302585
--- /dev/null
+++ b/sw/inc/fmtftn.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTFTN_HXX
+#define _FMTFTN_HXX
+
+#include <tools/string.hxx>
+#include <svl/poolitem.hxx>
+#include "swdllapi.h"
+
+class SwDoc;
+class SwTxtFtn;
+
+// ATT_FTN **********************************************************
+
+class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem
+{
+ friend class SwTxtFtn;
+ SwTxtFtn* pTxtAttr; //mein TextAttribut
+ String aNumber; //Benutzerdefinierte 'Nummer'
+ USHORT nNumber; //Automatische Nummerierung
+ bool m_bEndNote; // is it an End note?
+
+ // geschuetzter CopyCtor
+ SwFmtFtn& operator=(const SwFmtFtn& rFtn);
+ SwFmtFtn( const SwFmtFtn& );
+
+public:
+ SwFmtFtn( bool bEndNote = false );
+ virtual ~SwFmtFtn();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ const String &GetNumStr() const { return aNumber; }
+ const USHORT &GetNumber() const { return nNumber; }
+ bool IsEndNote() const { return m_bEndNote;}
+
+ void SetNumStr( const String& rStr ) { aNumber = rStr; }
+ void SetNumber( USHORT nNo ) { nNumber = nNo; }
+ void SetEndNote( bool b );
+
+ void SetNumber( const SwFmtFtn& rFtn )
+ { nNumber = rFtn.nNumber; aNumber = rFtn.aNumber; }
+
+ const SwTxtFtn *GetTxtFtn() const { return pTxtAttr; }
+ SwTxtFtn *GetTxtFtn() { return pTxtAttr; }
+
+ void GetFtnText( String& rStr ) const;
+
+ // returnt den anzuzeigenden String der Fuss-/Endnote
+ String GetViewNumStr( const SwDoc& rDoc, BOOL bInclStrs = FALSE ) const;
+};
+
+
+#endif
+
diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx
new file mode 100644
index 000000000000..f44cbc0f12c5
--- /dev/null
+++ b/sw/inc/fmtftntx.hxx
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTFTNTX_HXX
+#define _FMTFTNTX_HXX
+
+#include <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include <numrule.hxx>
+#include "swdllapi.h"
+
+enum SwFtnEndPosEnum
+{
+ FTNEND_ATPGORDOCEND, // at page or document end
+ FTNEND_ATTXTEND, // at end of the current text end
+ FTNEND_ATTXTEND_OWNNUMSEQ, // -""- and with own number sequence
+ FTNEND_ATTXTEND_OWNNUMANDFMT, // -""- and with onw numberformat
+ FTNEND_ATTXTEND_END
+};
+
+
+class SW_DLLPUBLIC SwFmtFtnEndAtTxtEnd : public SfxEnumItem
+{
+ String sPrefix;
+ String sSuffix;
+ SvxNumberType aFmt;
+ USHORT nOffset;
+
+protected:
+ SwFmtFtnEndAtTxtEnd( USHORT nWhichL, SwFtnEndPosEnum ePos )
+ : SfxEnumItem( nWhichL, sal::static_int_cast< USHORT >(ePos) ), nOffset( 0 )
+ {}
+ SwFmtFtnEndAtTxtEnd( const SwFmtFtnEndAtTxtEnd& rAttr )
+ : SfxEnumItem( rAttr ), sPrefix( rAttr.sPrefix ),
+ sSuffix( rAttr.sSuffix ), aFmt( rAttr.aFmt ),
+ nOffset( rAttr.nOffset )
+ {}
+
+public:
+ virtual USHORT GetValueCount() const;
+
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ 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 );
+
+// will be used at time??
+// void FillVariable( SbxVariable &rVar,
+// SfxMapUnit eCoreMetric,
+// SfxMapUnit eUserMetric ) const;
+// virtual SfxArgumentError SetVariable( const SbxVariable &rVal,
+// SfxMapUnit eCoreMetric,
+// SfxMapUnit eUserMetric );
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ inline BOOL IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); }
+
+ SwFmtFtnEndAtTxtEnd & operator=( const SwFmtFtnEndAtTxtEnd & rAttr );
+
+ sal_Int16 GetNumType() const { return aFmt.GetNumberingType(); }
+ void SetNumType( sal_Int16 eType ) { aFmt.SetNumberingType(eType); }
+
+ const SvxNumberType& GetSwNumType() const { return aFmt; }
+
+ USHORT GetOffset() const { return nOffset; }
+ void SetOffset( USHORT nOff ) { nOffset = nOff; }
+
+ const String& GetPrefix() const { return sPrefix; }
+ void SetPrefix(const String& rSet) { sPrefix = rSet; }
+
+ const String& GetSuffix() const { return sSuffix; }
+ void SetSuffix(const String& rSet) { sSuffix = rSet; }
+};
+
+class SW_DLLPUBLIC SwFmtFtnAtTxtEnd : public SwFmtFtnEndAtTxtEnd
+{
+public:
+ SwFmtFtnAtTxtEnd( SwFtnEndPosEnum ePos = FTNEND_ATPGORDOCEND )
+ : SwFmtFtnEndAtTxtEnd( RES_FTN_AT_TXTEND, ePos )
+ {}
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+class SW_DLLPUBLIC SwFmtEndAtTxtEnd : public SwFmtFtnEndAtTxtEnd
+{
+public:
+ SwFmtEndAtTxtEnd( SwFtnEndPosEnum ePos = FTNEND_ATPGORDOCEND )
+ : SwFmtFtnEndAtTxtEnd( RES_END_AT_TXTEND, ePos )
+ {
+ SetNumType( SVX_NUM_ROMAN_LOWER );
+ }
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+inline const SwFmtFtnAtTxtEnd &SwAttrSet::GetFtnAtTxtEnd(BOOL bInP) const
+ { return (const SwFmtFtnAtTxtEnd&)Get( RES_FTN_AT_TXTEND, bInP); }
+inline const SwFmtEndAtTxtEnd &SwAttrSet::GetEndAtTxtEnd(BOOL bInP) const
+ { return (const SwFmtEndAtTxtEnd&)Get( RES_END_AT_TXTEND, bInP); }
+
+
+inline const SwFmtFtnAtTxtEnd &SwFmt::GetFtnAtTxtEnd(BOOL bInP) const
+ { return aSet.GetFtnAtTxtEnd(bInP); }
+inline const SwFmtEndAtTxtEnd &SwFmt::GetEndAtTxtEnd(BOOL bInP) const
+ { return aSet.GetEndAtTxtEnd(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
new file mode 100644
index 000000000000..14c71d6a0264
--- /dev/null
+++ b/sw/inc/fmthdft.hxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTHDFT_HXX
+#define _FMTHDFT_HXX
+
+#include <hintids.hxx>
+#include <format.hxx>
+#include <svl/poolitem.hxx>
+#include <calbck.hxx>
+
+class SwFrmFmt;
+class IntlWrapper;
+
+
+//Kopfzeile, fuer Seitenformate
+//Client von FrmFmt das den Header beschreibt.
+
+class SW_DLLPUBLIC SwFmtHeader: public SfxPoolItem, public SwClient
+{
+ BOOL bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
+
+public:
+ SwFmtHeader( BOOL bOn = FALSE );
+ SwFmtHeader( SwFrmFmt *pHeaderFmt );
+ SwFmtHeader( const SwFmtHeader &rCpy );
+ ~SwFmtHeader();
+ SwFmtHeader& operator=( const SwFmtHeader &rCpy );
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ const SwFrmFmt *GetHeaderFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)pRegisteredIn; }
+
+ BOOL IsActive() const { return bActive; }
+ void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
+};
+
+//Fusszeile, fuer Seitenformate
+//Client von FrmFmt das den Footer beschreibt.
+
+class SW_DLLPUBLIC SwFmtFooter: public SfxPoolItem, public SwClient
+{
+ BOOL bActive; //Nur zur Steuerung (Erzeugung des Inhaltes)
+
+public:
+ SwFmtFooter( BOOL bOn = FALSE );
+ SwFmtFooter( SwFrmFmt *pFooterFmt );
+ SwFmtFooter( const SwFmtFooter &rCpy );
+ ~SwFmtFooter();
+ SwFmtFooter& operator=( const SwFmtFooter &rCpy );
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ const SwFrmFmt *GetFooterFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)pRegisteredIn; }
+
+ BOOL IsActive() const { return bActive; }
+ void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
+};
+
+inline const SwFmtHeader &SwAttrSet::GetHeader(BOOL bInP) const
+ { return (const SwFmtHeader&)Get( RES_HEADER,bInP); }
+inline const SwFmtFooter &SwAttrSet::GetFooter(BOOL bInP) const
+ { return (const SwFmtFooter&)Get( RES_FOOTER,bInP); }
+
+inline const SwFmtHeader &SwFmt::GetHeader(BOOL bInP) const
+ { return aSet.GetHeader(bInP); }
+inline const SwFmtFooter &SwFmt::GetFooter(BOOL bInP) const
+ { return aSet.GetFooter(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx
new file mode 100644
index 000000000000..75fc863b147d
--- /dev/null
+++ b/sw/inc/fmtinfmt.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTINFMT_HXX
+#define _FMTINFMT_HXX
+
+#include <tools/string.hxx>
+#include <svl/poolitem.hxx>
+#include "swdllapi.h"
+
+class SvxMacro;
+class SvxMacroTableDtor;
+class SwTxtINetFmt;
+class IntlWrapper;
+
+// ATT_INETFMT *********************************************
+
+class SW_DLLPUBLIC SwFmtINetFmt: public SfxPoolItem
+{
+ friend class SwTxtINetFmt;
+
+ String aURL; // die URL
+ String aTargetFrame; // in diesen Frame soll die URL
+ String aINetFmt;
+ String aVisitedFmt;
+ String aName; // Name des Links
+ SvxMacroTableDtor* pMacroTbl;
+ SwTxtINetFmt* pTxtAttr; // mein TextAttribut
+ USHORT nINetId;
+ USHORT nVisitedId;
+public:
+ SwFmtINetFmt( const String& rURL, const String& rTarget );
+ SwFmtINetFmt( const SwFmtINetFmt& rAttr );
+ SwFmtINetFmt(); // for TypeInfo
+ virtual ~SwFmtINetFmt();
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ 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 );
+
+
+ const SwTxtINetFmt* GetTxtINetFmt() const { return pTxtAttr; }
+ SwTxtINetFmt* GetTxtINetFmt() { return pTxtAttr; }
+
+ const String& GetValue() const { return aURL; }
+
+ const String& GetName() const { return aName; }
+ void SetName( const String& rNm ) { aName = rNm; }
+
+ const String& GetTargetFrame() const { return aTargetFrame; }
+
+ const String& GetINetFmt() const { return aINetFmt; }
+ void SetINetFmt( const String& rNm ) { aINetFmt = rNm; }
+
+ const String& GetVisitedFmt() const { return aVisitedFmt; }
+ void SetVisitedFmt( const String& rNm ) { aVisitedFmt = rNm; }
+
+ USHORT GetINetFmtId() const { return nINetId; }
+ void SetINetFmtId( USHORT nNew ) { nINetId = nNew; }
+
+ USHORT GetVisitedFmtId() const { return nVisitedId; }
+ void SetVisitedFmtId( USHORT nNew ) { nVisitedId = nNew; }
+
+ // setze eine neue oder loesche die akt. MakroTabelle
+ void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
+ const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
+
+ // setze / erfrage ein Makro
+ void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
+ const SvxMacro* GetMacro( USHORT nEvent ) const;
+};
+
+
+#endif
+
diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx
new file mode 100644
index 000000000000..7ae0e80d0350
--- /dev/null
+++ b/sw/inc/fmtline.hxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_FMTLINE_HXX
+#define SW_FMTLINE_HXX
+
+
+#include <svl/poolitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtLineNumber: public SfxPoolItem
+{
+ ULONG nStartValue :24; //Startwert fuer den Absatz, 0 == kein Startwert
+ ULONG bCountLines :1; //Zeilen des Absatzes sollen mitgezaehlt werden.
+
+public:
+ SwFmtLineNumber();
+ ~SwFmtLineNumber();
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ 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 );
+
+ ULONG GetStartValue() const { return nStartValue; }
+ BOOL IsCount() const { return bCountLines != 0; }
+
+ void SetStartValue( ULONG nNew ) { nStartValue = nNew; }
+ void SetCountLines( BOOL b ) { bCountLines = b; }
+};
+
+inline const SwFmtLineNumber &SwAttrSet::GetLineNumber(BOOL bInP) const
+ { return (const SwFmtLineNumber&)Get( RES_LINENUMBER,bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtlsplt.hxx b/sw/inc/fmtlsplt.hxx
new file mode 100644
index 000000000000..cfe9172ea02f
--- /dev/null
+++ b/sw/inc/fmtlsplt.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTTSPLT_HXX
+#define _FMTTSPLT_HXX
+
+#include <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+#include "swdllapi.h"
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtLayoutSplit : public SfxBoolItem
+{
+public:
+ SwFmtLayoutSplit( BOOL bSplit = TRUE ) : SfxBoolItem( RES_LAYOUT_SPLIT, bSplit ) {}
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline const SwFmtLayoutSplit &SwAttrSet::GetLayoutSplit(BOOL bInP) const
+ { return (const SwFmtLayoutSplit&)Get( RES_LAYOUT_SPLIT,bInP); }
+
+inline const SwFmtLayoutSplit &SwFmt::GetLayoutSplit(BOOL bInP) const
+ { return aSet.GetLayoutSplit(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
new file mode 100755
index 000000000000..d09df11bb1aa
--- /dev/null
+++ b/sw/inc/fmtmeta.hxx
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_FMTMETA_HXX
+#define SW_FMTMETA_HXX
+
+#include <cppuhelper/weakref.hxx>
+
+#include <svl/poolitem.hxx>
+#include <sfx2/Metadatable.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+
+#include <vector>
+
+
+namespace com { namespace sun { namespace star {
+ namespace text {
+ class XTextField;
+ }
+}}}
+
+
+/**
+ * The classes that make up a meta entity are:
+ * <dl>
+ * <dt>SwTxtMeta</dt><dd>the text hint</dd>
+ * <dt>SwFmtMeta</dt><dd>the pool item</dd>
+ * <dt>sw::Meta</dt><dd>the metadatable entity itself</dd>
+ * <dt>SwXMeta</dt><dd>the UNO wrapper object</dd>
+ * </dl>
+ *
+ * The text hint contains the pool item (as usual) and has a pointer to the
+ * text node at which it is attached.
+ * The pool item has a shared pointer to the metadatable entity, and a reverse
+ * pointer to the text attribute at which it is attached.
+ * The pool item is non-poolable; it may only be attached to one text
+ * attribute.
+ * Of all the pool items that refer to a metadatable entity, only one may be
+ * in the document content at any time. Others may be in the undo array, or in
+ * undo objects.
+ * The metadatable entity has a reverse pointer to the pool item that is
+ * currently in the document. It also registers as a client at the text node
+ * at which it is attached via this pool item and its text attribute.
+ * The UNO wrapper object registers as a client at the metadatable entity.
+ *
+ * Copying the metadatable entity proceeds in the following way:
+ * <ol>
+ * <li>The pool item is cloned (because it is non-poolable); the clone
+ * points to the same metadatable entity, but the metadatable entity's
+ * reverse pointer is unchanged.</li>
+ * <li>A new text hint is created, taking over the new pool item.
+ * Unfortunately, this also makes the metadatable entity point at the
+ * cloned pool item.</li>
+ * <li>The text hint is inserted into the hints array of some text node.</li>
+ * <li>The DoCopy() method must be called at the new pool item:
+ * it will clone the metadatable entity (using RegisterAsCopyOf),
+ * and fix the reverse pointer of the original to point at the
+ * original pool item.
+ * This is necessary, because first, a metadatable entity may
+ * only be inserted once into a document, and second, the copy may be
+ * inserted into a different document than the source document!</li>
+ * </ol>
+ */
+
+class SwTxtMeta;
+class SwXMeta;
+class SwXMetaField;
+namespace sw {
+ class Meta;
+}
+
+class SwFmtMeta
+ : public SfxPoolItem
+{
+private:
+ friend class SwTxtMeta; // needs SetTxtAttr
+ friend class ::sw::Meta; // needs m_pTxtAttr
+
+ ::boost::shared_ptr< ::sw::Meta > m_pMeta;
+ SwTxtMeta * m_pTxtAttr;
+
+ SwTxtMeta * GetTxtAttr() { return m_pTxtAttr; }
+ void SetTxtAttr(SwTxtMeta * const i_pTxtAttr);
+
+ explicit SwFmtMeta( const USHORT i_nWhich );
+
+public:
+ // takes ownership
+ explicit SwFmtMeta( ::boost::shared_ptr< ::sw::Meta > const & i_pMeta,
+ const USHORT i_nWhich );
+ virtual ~SwFmtMeta();
+
+ // SfxPoolItem
+ virtual int operator==( const SfxPoolItem & ) const;
+ virtual SfxPoolItem * Clone( SfxItemPool *pPool = 0 ) const;
+// TYPEINFO();
+
+ /// notify clients registered at m_pMeta that this meta is being (re-)moved
+ void NotifyChangeTxtNode(SwTxtNode *const pTxtNode);
+ static SwFmtMeta * CreatePoolDefault( const USHORT i_nWhich );
+ ::sw::Meta * GetMeta() { return m_pMeta.get(); }
+ /// this method <em>must</em> be called when the hint is actually copied
+ void DoCopy( SwFmtMeta & rOriginalMeta );
+};
+
+
+namespace sw {
+
+class MetaFieldManager;
+
+class Meta
+ : public ::sfx2::Metadatable
+ , public SwModify
+{
+protected:
+ friend class ::SwFmtMeta; // SetFmtMeta, NotifyChangeTxtNode
+ friend class ::SwXMeta; // GetTxtNode, GetTxtAttr, Get/SetXMeta
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::rdf::XMetadatable> m_wXMeta;
+
+ SwFmtMeta * m_pFmt;
+
+ SwTxtMeta * GetTxtAttr() const;
+ SwTxtNode * GetTxtNode() const; // returns 0 if not in document (undo)
+
+ SwFmtMeta * GetFmtMeta() const { return m_pFmt; }
+ void SetFmtMeta( SwFmtMeta * const i_pFmt ) { m_pFmt = i_pFmt; };
+
+ void NotifyChangeTxtNode();
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::rdf::XMetadatable> const& GetXMeta() const
+ { return m_wXMeta; }
+ void SetXMeta(::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable> const& xMeta)
+ { m_wXMeta = xMeta; }
+
+public:
+ explicit Meta(SwFmtMeta * const i_pFmt = 0);
+ virtual ~Meta();
+
+ // SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ // sfx2::Metadatable
+ virtual ::sfx2::IXmlIdRegistry& GetRegistry();
+ virtual bool IsInClipboard() const;
+ virtual bool IsInUndo() const;
+ virtual bool IsInContent() const;
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > MakeUnoObject();
+};
+
+class MetaField
+ : public Meta
+{
+private:
+ friend class ::SwFmtMeta;
+ friend class ::SwXMetaField;
+ friend class ::sw::MetaFieldManager;
+
+ sal_uInt32 m_nNumberFormat;
+ bool m_bIsFixedLanguage;
+
+ sal_uInt32 GetNumberFormat(::rtl::OUString const & rContent) const;
+ void SetNumberFormat(sal_uInt32 nNumberFormat);
+ bool IsFixedLanguage() const { return m_bIsFixedLanguage; }
+ void SetIsFixedLanguage(bool b) { m_bIsFixedLanguage = b; }
+
+ explicit MetaField(SwFmtMeta * const i_pFmt = 0,
+ const sal_uInt32 nNumberFormat = SAL_MAX_UINT32,
+ const bool bIsFixedLanguage = false );
+
+public:
+ /// get prefix/suffix from the RDF repository. @throws RuntimeException
+ void GetPrefixAndSuffix(
+ ::rtl::OUString *const o_pPrefix, ::rtl::OUString *const o_pSuffix);
+};
+
+/** knows all meta-fields in the document. */
+class MetaFieldManager
+ : private ::boost::noncopyable
+{
+private:
+ typedef ::std::vector< ::boost::weak_ptr<MetaField> > MetaFieldList_t;
+ MetaFieldList_t m_MetaFields;
+
+public:
+ MetaFieldManager();
+ ::boost::shared_ptr<MetaField> makeMetaField(
+ SwFmtMeta * const i_pFmt = 0,
+ const sal_uInt32 nNumberFormat = SAL_MAX_UINT32,
+ const bool bIsFixedLanguage = false );
+ /// get all meta fields
+ ::std::vector< ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextField> > getMetaFields();
+};
+
+} // namespace sw
+
+#endif // SW_FMTMETA_HXX
+
diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx
new file mode 100644
index 000000000000..098177d4bd9b
--- /dev/null
+++ b/sw/inc/fmtornt.hxx
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTORNT_HXX
+#define _FMTORNT_HXX
+
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+#include <com/sun/star/text/RelOrientation.hpp>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <swtypes.hxx>
+#include <format.hxx>
+#include <svl/poolitem.hxx>
+
+
+class IntlWrapper;
+
+#define IVER_VERTORIENT_REL ((USHORT)0x0001)
+
+class SW_DLLPUBLIC SwFmtVertOrient: public SfxPoolItem
+{
+ SwTwips nYPos; //Enthaelt _immer_ die aktuelle RelPos.
+ sal_Int16 eOrient;
+ sal_Int16 eRelation;
+public:
+ TYPEINFO();
+ SwFmtVertOrient( SwTwips nY = 0, sal_Int16 eVert = com::sun::star::text::VertOrientation::NONE,
+ sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA );
+ inline SwFmtVertOrient &operator=( const SwFmtVertOrient &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ 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 );
+
+ sal_Int16 GetVertOrient() const { return eOrient; }
+ sal_Int16 GetRelationOrient() const { return eRelation; }
+ void SetVertOrient( sal_Int16 eNew ) { eOrient = eNew; }
+ void SetRelationOrient( sal_Int16 eNew ) { eRelation = eNew; }
+
+ SwTwips GetPos() const { return nYPos; }
+ void SetPos( SwTwips nNew ) { nYPos = nNew; }
+};
+
+//SwFmtHoriOrient, wie und woran orientiert --
+// sich der FlyFrm in der Hoizontalen ----------
+
+#define IVER_HORIORIENT_TOGGLE ((USHORT)0x0001)
+#define IVER_HORIORIENT_REL ((USHORT)0x0002)
+
+class SW_DLLPUBLIC SwFmtHoriOrient: public SfxPoolItem
+{
+ SwTwips nXPos; //Enthaelt _immer_ die aktuelle RelPos.
+ sal_Int16 eOrient;
+ sal_Int16 eRelation;
+ BOOL bPosToggle : 1; // auf geraden Seiten Position spiegeln
+public:
+ TYPEINFO();
+ SwFmtHoriOrient( SwTwips nX = 0, sal_Int16 eHori = com::sun::star::text::HoriOrientation::NONE,
+ sal_Int16 eRel = com::sun::star::text::RelOrientation::PRINT_AREA, BOOL bPos = FALSE );
+ inline SwFmtHoriOrient &operator=( const SwFmtHoriOrient &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ 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 );
+
+ sal_Int16 GetHoriOrient() const { return eOrient; }
+ sal_Int16 GetRelationOrient() const { return eRelation; }
+ void SetHoriOrient( sal_Int16 eNew ) { eOrient = eNew; }
+ void SetRelationOrient( sal_Int16 eNew ) { eRelation = eNew; }
+
+ SwTwips GetPos() const { return nXPos; }
+ void SetPos( SwTwips nNew ) { nXPos = nNew; }
+
+ BOOL IsPosToggle() const { return bPosToggle; }
+ void SetPosToggle( BOOL bNew ) { bPosToggle = bNew; }
+};
+
+inline SwFmtVertOrient &SwFmtVertOrient::operator=( const SwFmtVertOrient &rCpy )
+{
+ nYPos = rCpy.GetPos();
+ eOrient = rCpy.GetVertOrient();
+ eRelation = rCpy.GetRelationOrient();
+ return *this;
+}
+inline SwFmtHoriOrient &SwFmtHoriOrient::operator=( const SwFmtHoriOrient &rCpy )
+{
+ nXPos = rCpy.GetPos();
+ eOrient = rCpy.GetHoriOrient();
+ eRelation = rCpy.GetRelationOrient();
+ bPosToggle = rCpy.IsPosToggle();
+ return *this;
+}
+
+inline const SwFmtVertOrient &SwAttrSet::GetVertOrient(BOOL bInP) const
+ { return (const SwFmtVertOrient&)Get( RES_VERT_ORIENT,bInP); }
+inline const SwFmtHoriOrient &SwAttrSet::GetHoriOrient(BOOL bInP) const
+ { return (const SwFmtHoriOrient&)Get( RES_HORI_ORIENT,bInP); }
+
+inline const SwFmtVertOrient &SwFmt::GetVertOrient(BOOL bInP) const
+ { return aSet.GetVertOrient(bInP); }
+inline const SwFmtHoriOrient &SwFmt::GetHoriOrient(BOOL bInP) const
+ { return aSet.GetHoriOrient(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
new file mode 100644
index 000000000000..47ad826bc875
--- /dev/null
+++ b/sw/inc/fmtpdsc.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTPDSC_HXX
+#define _FMTPDSC_HXX
+
+
+#include <svl/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+#include <calbck.hxx>
+
+class SwPageDesc;
+class SwHistory;
+class SwPaM;
+class IntlWrapper;
+
+//Pagedescriptor
+//Client vom SwPageDesc der durch das Attribut "beschrieben" wird.
+
+#define IVER_FMTPAGEDESC_NOAUTO ((USHORT)0x0001)
+#define IVER_FMTPAGEDESC_LONGPAGE ((USHORT)0x0002)
+
+class SW_DLLPUBLIC SwFmtPageDesc : public SfxPoolItem, public SwClient
+{
+ // diese "Doc"-Funktion ist friend, um nach dem kopieren das
+ // Auto-Flag setzen zu koennen !!
+ friend BOOL InsAttr( SwDoc*, const SwPaM &, const SfxItemSet&, USHORT,
+ SwHistory* );
+ USHORT nNumOffset; // Seitennummer Offset
+ USHORT nDescNameIdx; // SW3-Reader: Stringpool-Index des Vorlagennamens
+ SwModify* pDefinedIn; // Verweis auf das Objekt, in dem das
+ // Attribut gesetzt wurde (CntntNode/Format)
+
+public:
+ SwFmtPageDesc( const SwPageDesc *pDesc = 0 );
+ SwFmtPageDesc( const SwFmtPageDesc &rCpy );
+ SwFmtPageDesc &operator=( const SwFmtPageDesc &rCpy );
+ ~SwFmtPageDesc();
+
+ TYPEINFO();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ 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 );
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+ SwPageDesc *GetPageDesc() { return (SwPageDesc*)GetRegisteredIn(); }
+ const SwPageDesc *GetPageDesc() const { return (SwPageDesc*)GetRegisteredIn(); }
+
+ USHORT GetNumOffset() const { return nNumOffset; }
+ void SetNumOffset( USHORT nNum ) { nNumOffset = nNum; }
+
+ // erfrage/setze, wo drin das Attribut verankert ist
+ inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
+ void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = (SwModify*)pNew; }
+};
+
+
+inline const SwFmtPageDesc &SwAttrSet::GetPageDesc(BOOL bInP) const
+ { return (const SwFmtPageDesc&)Get( RES_PAGEDESC,bInP); }
+
+inline const SwFmtPageDesc &SwFmt::GetPageDesc(BOOL bInP) const
+ { return aSet.GetPageDesc(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx
new file mode 100644
index 000000000000..9f97282d8e10
--- /dev/null
+++ b/sw/inc/fmtrfmrk.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTRFMRK_HXX
+#define _FMTRFMRK_HXX
+
+
+#include <tools/string.hxx>
+#include <svl/poolitem.hxx>
+
+class SwTxtRefMark;
+
+// ATT_REFMARK *******************************************************
+
+class SwFmtRefMark : public SfxPoolItem
+{
+ friend class SwTxtRefMark;
+ SwTxtRefMark* pTxtAttr; // mein TextAttribut
+
+ // geschuetzter CopyCtor
+ SwFmtRefMark& operator=(const SwFmtRefMark& rRefMark);
+ String aRefName;
+
+public:
+ SwFmtRefMark( const String& rTxt );
+ SwFmtRefMark( const SwFmtRefMark& rRefMark );
+ ~SwFmtRefMark( );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ const SwTxtRefMark *GetTxtRefMark() const { return pTxtAttr; }
+ SwTxtRefMark *GetTxtRefMark() { return pTxtAttr; }
+
+ inline String &GetRefName() { return aRefName; }
+ inline const String &GetRefName() const { return aRefName; }
+};
+
+#endif
+
diff --git a/sw/inc/fmtrowsplt.hxx b/sw/inc/fmtrowsplt.hxx
new file mode 100644
index 000000000000..11efcc20546f
--- /dev/null
+++ b/sw/inc/fmtrowsplt.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTROWSPLT_HXX
+#define _FMTROWSPLT_HXX
+
+#include <svl/eitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwFmtRowSplit : public SfxBoolItem
+{
+public:
+ SwFmtRowSplit( BOOL bSplit = TRUE ) : SfxBoolItem( RES_ROW_SPLIT, bSplit ) {}
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline const SwFmtRowSplit &SwAttrSet::GetRowSplit(BOOL bInP) const
+ { return (const SwFmtRowSplit&)Get( RES_ROW_SPLIT,bInP); }
+
+inline const SwFmtRowSplit &SwFmt::GetRowSplit(BOOL bInP) const
+ { return aSet.GetRowSplit(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx
new file mode 100644
index 000000000000..c60169140870
--- /dev/null
+++ b/sw/inc/fmtruby.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTRUBY_HXX
+#define _FMTRUBY_HXX
+
+
+#include <tools/string.hxx>
+#include <svl/poolitem.hxx>
+
+class SwTxtRuby;
+
+class SW_DLLPUBLIC SwFmtRuby : public SfxPoolItem
+{
+ friend class SwTxtRuby;
+
+ String sRubyTxt; // the ruby txt
+ String sCharFmtName; // name of the charformat
+ SwTxtRuby* pTxtAttr; // the TextAttribut
+ USHORT nCharFmtId; // PoolId of the charformat
+ USHORT nPosition; // Position of the Ruby-Character
+ USHORT nAdjustment; // specific adjustment of the Ruby-Ch.
+
+public:
+ SwFmtRuby( const String& rRubyTxt );
+ SwFmtRuby( const SwFmtRuby& rAttr );
+ virtual ~SwFmtRuby();
+
+ SwFmtRuby& operator=( const SwFmtRuby& rAttr );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ 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 );
+
+
+ const SwTxtRuby* GetTxtRuby() const { return pTxtAttr; }
+ SwTxtRuby* GetTxtRuby() { return pTxtAttr; }
+
+ const String& GetText() const { return sRubyTxt; }
+ void SetText( const String& rTxt ) { sRubyTxt = rTxt; }
+
+ const String& GetCharFmtName() const { return sCharFmtName; }
+ void SetCharFmtName( const String& rNm ) { sCharFmtName = rNm; }
+
+ USHORT GetCharFmtId() const { return nCharFmtId; }
+ void SetCharFmtId( USHORT nNew ) { nCharFmtId = nNew; }
+
+ USHORT GetPosition() const { return nPosition; }
+ void SetPosition( USHORT nNew ) { nPosition = nNew; }
+
+ USHORT GetAdjustment() const { return nAdjustment; }
+ void SetAdjustment( USHORT nNew ) { nAdjustment = nNew; }
+};
+
+
+#endif
+
diff --git a/sw/inc/fmtsrnd.hxx b/sw/inc/fmtsrnd.hxx
new file mode 100644
index 000000000000..889c7adc6b5e
--- /dev/null
+++ b/sw/inc/fmtsrnd.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTSRND_HXX
+#define _FMTSRND_HXX
+
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+#include <svl/eitem.hxx>
+
+// --> OD 2006-08-15 #i68520# - refactoring
+// separate enumeration <SwSurround> in own header file
+#include <fmtsrndenum.hxx>
+// <--
+class IntlWrapper;
+
+//SwFmtSurround, wie soll sich der ---------------
+// Dokumentinhalt unter dem Rahmen verhalten ---
+
+class SW_DLLPUBLIC SwFmtSurround: public SfxEnumItem
+{
+ BOOL bAnchorOnly :1;
+ BOOL bContour :1;
+ BOOL bOutside :1;
+public:
+ SwFmtSurround( SwSurround eNew = SURROUND_PARALLEL );
+ SwFmtSurround( const SwFmtSurround & );
+ inline SwFmtSurround &operator=( const SwFmtSurround &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual USHORT GetValueCount() const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ 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 );
+
+
+ SwSurround GetSurround()const { return SwSurround( GetValue() ); }
+ BOOL IsAnchorOnly() const { return bAnchorOnly; }
+ BOOL IsContour() const { return bContour; }
+ BOOL IsOutside() const { return bOutside; }
+ void SetSurround ( SwSurround eNew ){ SfxEnumItem::SetValue( USHORT( eNew ) ); }
+ void SetAnchorOnly( BOOL bNew ) { bAnchorOnly = bNew; }
+ void SetContour( BOOL bNew ) { bContour = bNew; }
+ void SetOutside( BOOL bNew ) { bOutside = bNew; }
+};
+
+inline SwFmtSurround &SwFmtSurround::operator=( const SwFmtSurround &rCpy )
+{
+ bAnchorOnly = rCpy.IsAnchorOnly();
+ bContour = rCpy.IsContour();
+ bOutside = rCpy.IsOutside();
+ SfxEnumItem::SetValue( rCpy.GetValue() );
+ return *this;
+}
+
+inline const SwFmtSurround &SwAttrSet::GetSurround(BOOL bInP) const
+ { return (const SwFmtSurround&)Get( RES_SURROUND,bInP); }
+
+inline const SwFmtSurround &SwFmt::GetSurround(BOOL bInP) const
+ { return aSet.GetSurround(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtsrndenum.hxx b/sw/inc/fmtsrndenum.hxx
new file mode 100644
index 000000000000..688d89a236ea
--- /dev/null
+++ b/sw/inc/fmtsrndenum.hxx
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTSRNDENUM_HXX
+#define _FMTSRNDENUM_HXX
+
+enum SwSurround {
+ SURROUND_BEGIN,
+ SURROUND_NONE = SURROUND_BEGIN,
+ SURROUND_THROUGHT,
+ SURROUND_PARALLEL,
+ SURROUND_IDEAL,
+ SURROUND_LEFT,
+ SURROUND_RIGHT,
+ SURROUND_END
+};
+
+#endif
diff --git a/sw/inc/fmtui.hrc b/sw/inc/fmtui.hrc
new file mode 100644
index 000000000000..a25aa4425c5e
--- /dev/null
+++ b/sw/inc/fmtui.hrc
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTUI_HRC
+#define _FMTUI_HRC
+
+#include "rcid.hrc"
+
+
+#define DLG_FMTENTRY (RC_FMTUI_BEGIN)
+#define DLG_NEW_FILE (RC_FMTUI_BEGIN + 1)
+#define STR_PAGE_STD (RC_FMTUI_BEGIN + 2)
+#define STR_PAGE_BORDER (RC_FMTUI_BEGIN + 3)
+#define STR_PAGE_HEADER (RC_FMTUI_BEGIN + 4)
+#define STR_PAGE_FOOTER (RC_FMTUI_BEGIN + 5)
+#define STR_PAGE_COLUMN (RC_FMTUI_BEGIN + 6)
+#define STR_PAGE_FOOTNOTE (RC_FMTUI_BEGIN + 7)
+#define STR_PAGE_TEXTGRID (RC_FMTUI_BEGIN + 8)
+
+#define DLG_STD_CHAR (RC_FMTUI_BEGIN + 15)
+
+#define MN_TEXT (RC_FMTUI_BEGIN + 20)
+#define MN_GRAFIC (RC_FMTUI_BEGIN + 21)
+#define MN_TABLE (RC_FMTUI_BEGIN + 22)
+
+#define MN_REGION (RC_FMTUI_BEGIN + 24)
+#define MN_REGION_SUB (RC_FMTUI_BEGIN + 25)
+
+
+#define DLG_DOC_STYLE (RC_FMTUI_BEGIN + 26)
+#define DLG_NEW_COLL (RC_FMTUI_BEGIN + 28)
+
+#define DLG_TEMPLATE_PI (RC_FMTUI_BEGIN + 29)
+#define DLG_HELP_ID (RC_FMTUI_BEGIN + 30)
+
+#define STR_OVERWRITE (RC_FMTUI_BEGIN + 32)
+#define ST_CUSTOMIZE 1
+
+// die Abstaende zur Basis 2 nicht aendern !!!!
+#define DLG_TEMPLATE_BASE (RC_FMTUI_BEGIN + 40)
+#define DLG_TEMPLATE_1 (RC_FMTUI_BEGIN + 41)
+#define DLG_TEMPLATE_2 (RC_FMTUI_BEGIN + 42)
+#define DLG_TEMPLATE_3 (RC_FMTUI_BEGIN + 44)
+#define DLG_TEMPLATE_4 (RC_FMTUI_BEGIN + 48)
+#define DLG_TEMPLATE_5 (RC_FMTUI_BEGIN + 56)
+
+
+#if DLG_TEMPLATE_5 > RC_FMTUI_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#define TEMPLATEPI_IDX_ALL 1
+#define TEMPLATEPI_IDX_USED 2
+#define TEMPLATEPI_IDX_USER 3
+#define TEMPLATEPI_IDX_AUTOMATIC 4
+#define TEMPLATEPI_IDX_TEXT 5
+#define TEMPLATEPI_IDX_CHAPTER 6
+#define TEMPLATEPI_IDX_LIST 7
+#define TEMPLATEPI_IDX_IDX 8
+#define TEMPLATEPI_IDX_EXTRA 9
+
+
+
+#endif
+
diff --git a/sw/inc/fmturl.hxx b/sw/inc/fmturl.hxx
new file mode 100644
index 000000000000..ae2828899f1d
--- /dev/null
+++ b/sw/inc/fmturl.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTURL_HXX
+#define _FMTURL_HXX
+
+#include <svl/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+
+class ImageMap;
+class IntlWrapper;
+
+// URL, ServerMap und ClientMap
+
+class SW_DLLPUBLIC SwFmtURL: public SfxPoolItem
+{
+ String sTargetFrameName; // in diesen Frame soll die URL
+ String sURL; //Einfache URL
+ String sName; // Name des Anchors
+ ImageMap *pMap; //ClientSide Images
+
+ BOOL bIsServerMap; //mit der URL eine ServerSideImageMap
+
+ SwFmtURL& operator=( const SwFmtURL& );
+
+public:
+ SwFmtURL();
+
+ // @@@ copy construction allowed, but assigment is not? @@@
+ SwFmtURL( const SwFmtURL& );
+
+ virtual ~SwFmtURL();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ 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 );
+
+ void SetTargetFrameName( const String& rStr ) { sTargetFrameName = rStr; }
+ void SetURL( const String &rURL, BOOL bServerMap );
+ void SetMap( const ImageMap *pM ); //Pointer wird kopiert!
+
+ const String &GetTargetFrameName()const { return sTargetFrameName; }
+ const String &GetURL() const { return sURL; }
+ BOOL IsServerMap() const { return bIsServerMap; }
+ const ImageMap *GetMap() const { return pMap; }
+ ImageMap *GetMap() { return pMap; }
+
+ const String& GetName() const { return sName; }
+ void SetName( const String& rNm ) { sName = rNm; }
+};
+
+
+inline const SwFmtURL &SwAttrSet::GetURL(BOOL bInP) const
+ { return (const SwFmtURL&)Get( RES_URL,bInP); }
+
+inline const SwFmtURL &SwFmt::GetURL(BOOL bInP) const
+ { return aSet.GetURL(bInP); }
+
+#endif
+
diff --git a/sw/inc/fmtwrapinfluenceonobjpos.hxx b/sw/inc/fmtwrapinfluenceonobjpos.hxx
new file mode 100644
index 000000000000..031292514a47
--- /dev/null
+++ b/sw/inc/fmtwrapinfluenceonobjpos.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FMTWRAPINFLUENCEONOBJPOS_HXX
+#define _FMTWRAPINFLUENCEONOBJPOS_HXX
+
+#include <hintids.hxx>
+#include <format.hxx>
+#include <svl/poolitem.hxx>
+#include <com/sun/star/text/WrapInfluenceOnPosition.hpp>
+
+class SW_DLLPUBLIC SwFmtWrapInfluenceOnObjPos: public SfxPoolItem
+{
+private:
+ sal_Int16 mnWrapInfluenceOnPosition;
+
+public:
+ TYPEINFO();
+
+ // --> OD 2004-10-18 #i35017# - constant name has changed
+ SwFmtWrapInfluenceOnObjPos(
+ sal_Int16 _nWrapInfluenceOnPosition =
+ com::sun::star::text::WrapInfluenceOnPosition::ONCE_CONCURRENT );
+ // <--
+ SwFmtWrapInfluenceOnObjPos(
+ const SwFmtWrapInfluenceOnObjPos& _rCpy );
+ ~SwFmtWrapInfluenceOnObjPos();
+
+ SwFmtWrapInfluenceOnObjPos& operator=(
+ const SwFmtWrapInfluenceOnObjPos& _rSource );
+
+ // pure virtual methods of class <SfxPoolItem>
+ virtual int operator==( const SfxPoolItem& _rAttr ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ 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 );
+
+ // direct accessors to data
+ void SetWrapInfluenceOnObjPos( sal_Int16 _nWrapInfluenceOnPosition );
+ // --> OD 2004-10-18 #i35017# - add parameter <_bIterativeAsOnceConcurrent>
+ // to control, if value <ITERATIVE> has to be treated as <ONCE_CONCURRENT>
+ sal_Int16 GetWrapInfluenceOnObjPos(
+ const bool _bIterativeAsOnceConcurrent = false ) const;
+ // <--
+};
+
+inline const SwFmtWrapInfluenceOnObjPos& SwAttrSet::GetWrapInfluenceOnObjPos(BOOL bInP) const
+ { return (const SwFmtWrapInfluenceOnObjPos&)Get( RES_WRAP_INFLUENCE_ON_OBJPOS,bInP); }
+
+ inline const SwFmtWrapInfluenceOnObjPos& SwFmt::GetWrapInfluenceOnObjPos(BOOL bInP) const
+ { return aSet.GetWrapInfluenceOnObjPos(bInP); }
+
+#endif
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
new file mode 100644
index 000000000000..d1a33db7b246
--- /dev/null
+++ b/sw/inc/format.hxx
@@ -0,0 +1,358 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FORMAT_HXX
+#define _FORMAT_HXX
+
+#include <tools/solar.h>
+#include "swdllapi.h"
+#include <errhdl.hxx> // fuer ASSERT
+#include <swatrset.hxx> // fuer SfxItemPool/-Set, Attr forward decl.
+#include <calbck.hxx> // fuer SwModify
+#include <hintids.hxx>
+
+class IDocumentSettingAccess;
+class IDocumentDrawModelAccess;
+class IDocumentLayoutAccess;
+class IDocumentTimerAccess;
+class IDocumentFieldsAccess;
+class IDocumentChartDataProviderAccess;
+class SwDoc;
+
+class SW_DLLPUBLIC SwFmt : public SwModify
+{
+// friend class SwSwgReader;
+// friend class SwSwgWriter;
+
+ String aFmtName;
+ SwAttrSet aSet;
+
+ USHORT nWhichId;
+ USHORT nFmtId; // Format-ID fuer Lesen/Schreiben
+ USHORT nPoolFmtId; // Id-fuer "automatich" erzeugte Formate
+ // (ist keine harte Attributierung !!)
+ USHORT nPoolHelpId; // HelpId fuer diese Pool-Vorlage
+ BYTE nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
+ BOOL bWritten : 1; // TRUE: bereits geschrieben
+ BOOL bAutoFmt : 1; // FALSE: es handelt sich um eine Vorlage
+ // ist dflt immer auf TRUE !
+ BOOL bFmtInDTOR : 1; // TRUE: das Format wird geloscht. Damit man in
+ // der FmtChg-Message das erkennen kann!!!
+ BOOL bAutoUpdateFmt : 1; // TRUE: am Format werden die Attribute
+ // eines kompletten Absatzes gesetzt (UI-seitig!)
+
+protected:
+ SwFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ const USHORT* pWhichRanges, SwFmt *pDrvdFrm, USHORT nFmtWhich );
+ SwFmt( SwAttrPool& rPool, const String &rFmtNm, const USHORT* pWhichRanges,
+ SwFmt *pDrvdFrm, USHORT nFmtWhich );
+ SwFmt( const SwFmt& rFmt );
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ virtual ~SwFmt();
+ SwFmt &operator=(const SwFmt&);
+
+ // fuer die Abfrage der Writer-Funktionen
+ USHORT Which() const { return nWhichId; }
+
+ virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
+ // erfrage vom Format Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ // kopiere Attribute; auch ueber Dokumentgrenzen hinweg
+ void CopyAttrs( const SwFmt&, BOOL bReplace=TRUE );
+
+ // loesche alle Attribute, die nicht in rFmt stehen
+ void DelDiffs( const SfxItemSet& rSet );
+ void DelDiffs( const SwFmt& rFmt ) { DelDiffs( rFmt.GetAttrSet() ); }
+
+ // Umhaengen des Formats (0 = Default)
+ BOOL SetDerivedFrom(SwFmt *pDerivedFrom = 0);
+
+ // Ist bInParents FALSE,
+ // wird nur in diesem Format nach dem Attribut gesucht.
+ inline const SfxPoolItem& GetFmtAttr( USHORT nWhich,
+ BOOL bInParents = TRUE ) const;
+ inline SfxItemState GetItemState( USHORT nWhich, BOOL bSrchInParent = TRUE,
+ const SfxPoolItem **ppItem = 0 ) const;
+ // --> OD 2008-03-03 #refactorlists#
+ // methods renamed and made virtual
+ virtual BOOL SetFmtAttr( const SfxPoolItem& rAttr );
+ virtual BOOL SetFmtAttr( const SfxItemSet& rSet );
+ virtual BOOL ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ // <--
+
+ // --> OD 2007-01-24 #i73790#
+ // Method renamed and made virtual
+ // Nimmt alle Hints aus dem Delta-Array,
+ // liefert die Anzahl der geloeschten Hints
+ virtual USHORT ResetAllFmtAttr();
+ // <--
+
+ inline SwFmt* DerivedFrom() const { return (SwFmt*)pRegisteredIn; }
+ inline BOOL IsDefault() const { return DerivedFrom() == 0; }
+
+ inline const String& GetName() const { return aFmtName; }
+ void SetName( const String& rNewName, sal_Bool bBroadcast=sal_False );
+ inline void SetName( const sal_Char* pNewName,
+ sal_Bool bBroadcast=sal_False);
+
+ // zur Abfrage des Attribute Arrays
+ inline const SwAttrSet& GetAttrSet() const { return aSet; }
+
+ // Das Doc wird jetzt am SwAttrPool gesetzt. Dadurch hat man es immer
+ // im Zugriff.
+ const SwDoc *GetDoc() const { return aSet.GetDoc(); }
+ SwDoc *GetDoc() { return aSet.GetDoc(); }
+
+ /** Provides access to the document settings interface
+ */
+ const IDocumentSettingAccess* getIDocumentSettingAccess() const;
+
+ /** Provides access to the document draw model interface
+ */
+ const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const;
+ IDocumentDrawModelAccess* getIDocumentDrawModelAccess();
+
+ /** Provides access to the document layout interface
+ */
+ const IDocumentLayoutAccess* getIDocumentLayoutAccess() const;
+ IDocumentLayoutAccess* getIDocumentLayoutAccess();
+
+ /** Provides access to the document idle timer interface
+ */
+ IDocumentTimerAccess* getIDocumentTimerAccess();
+
+ /** Provides access to the document idle timer interface
+ */
+ IDocumentFieldsAccess* getIDocumentFieldsAccess();
+
+ /** gives access to the chart data-provider
+ */
+ IDocumentChartDataProviderAccess* getIDocumentChartDataProviderAccess();
+
+ // erfragen und setzen der Poolvorlagen-Id's
+ USHORT GetPoolFmtId() const { return nPoolFmtId; }
+ void SetPoolFmtId( USHORT nId ) { nPoolFmtId = nId; }
+
+ // erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
+ USHORT GetPoolHelpId() const { return nPoolHelpId; }
+ void SetPoolHelpId( USHORT nId ) { nPoolHelpId = nId; }
+ BYTE GetPoolHlpFileId() const { return nPoolHlpFileId; }
+ void SetPoolHlpFileId( BYTE nId ) { nPoolHlpFileId = nId; }
+ // erfrage die Attribut-Beschreibung, returnt den reingereichten String
+ void GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const
+ { aSet.GetPresentation( ePres, eCoreMetric, ePresMetric, rText ); }
+ // Das Format-ID fuer Lesen/Schreiben:
+ void ResetWritten() { bWritten = FALSE; }
+
+ // Abfragen/Setzen vom AutoFmt-Flag
+ BOOL IsAuto() const { return bAutoFmt; }
+ void SetAuto( BOOL bNew = FALSE ) { bAutoFmt = bNew; }
+
+ // Abfragen/Setzen vom bAutoUpdateFmt-Flag
+ BOOL IsAutoUpdateFmt() const { return bAutoUpdateFmt; }
+ void SetAutoUpdateFmt( BOOL bNew = TRUE ) { bAutoUpdateFmt = bNew; }
+
+ BOOL IsFmtInDTOR() const { return bFmtInDTOR; }
+
+ // GetMethoden: das Bool gibt an, ob nur im Set (FALSE) oder auch in
+ // den Parents gesucht werden soll. Wird nichts gefunden,
+ // wird das deflt. Attribut returnt.
+ // Charakter-Attribute - impl. steht im charatr.hxx
+ // AMA 12.10.94: Umstellung von SwFmt... auf Svx...
+ inline const SvxPostureItem &GetPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetWeight( BOOL = TRUE ) const;
+ inline const SvxShadowedItem &GetShadowed( BOOL = TRUE ) const;
+ inline const SvxAutoKernItem &GetAutoKern( BOOL = TRUE ) const;
+ inline const SvxWordLineModeItem &GetWordLineMode( BOOL = TRUE ) const;
+ inline const SvxContourItem &GetContour( BOOL = TRUE ) const;
+ inline const SvxKerningItem &GetKerning( BOOL = TRUE ) const;
+ inline const SvxUnderlineItem &GetUnderline( BOOL = TRUE ) const;
+ inline const SvxOverlineItem &GetOverline( BOOL = TRUE ) const;
+ inline const SvxCrossedOutItem &GetCrossedOut( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetSize( BOOL = TRUE ) const;
+ inline const SvxPropSizeItem &GetPropSize( BOOL = TRUE ) const;
+ inline const SvxFontItem &GetFont( BOOL = TRUE ) const;
+ inline const SvxColorItem &GetColor( BOOL = TRUE ) const;
+ inline const SvxCharSetColorItem &GetCharSetColor( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetLanguage( BOOL = TRUE ) const;
+ inline const SvxEscapementItem &GetEscapement( BOOL = TRUE ) const;
+ inline const SvxCaseMapItem &GetCaseMap( BOOL = TRUE ) const;
+ inline const SvxNoHyphenItem &GetNoHyphenHere( BOOL = TRUE ) const;
+ inline const SvxBlinkItem &GetBlink( BOOL = TRUE ) const;
+ inline const SvxBrushItem &GetChrBackground( BOOL = TRUE ) const;
+
+ inline const SvxFontItem &GetCJKFont( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetCJKSize( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetCJKLanguage( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetCJKPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetCJKWeight( BOOL = TRUE ) const;
+ inline const SvxFontItem &GetCTLFont( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetCTLSize( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetCTLLanguage( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetCTLPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetCTLWeight( BOOL = TRUE ) const;
+ inline const SfxBoolItem &GetWritingDirection( BOOL = TRUE ) const;
+ inline const SvxEmphasisMarkItem &GetEmphasisMark( BOOL = TRUE ) const;
+ inline const SvxTwoLinesItem &Get2Lines( BOOL = TRUE ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( BOOL = TRUE ) const;
+ inline const SvxCharRotateItem &GetCharRotate( BOOL = TRUE ) const;
+ inline const SvxCharReliefItem &GetCharRelief( BOOL = TRUE ) const;
+ inline const SvxCharHiddenItem &GetCharHidden( BOOL = TRUE ) const;
+
+ // Frame-Attribute - impl. steht im frmatr.hxx,
+ inline const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const;
+ inline const SwFmtFrmSize &GetFrmSize( BOOL = TRUE ) const;
+ inline const SwFmtHeader &GetHeader( BOOL = TRUE ) const;
+ inline const SwFmtFooter &GetFooter( BOOL = TRUE ) const;
+ inline const SwFmtSurround &GetSurround( BOOL = TRUE ) const;
+ inline const SwFmtHoriOrient &GetHoriOrient( BOOL = TRUE ) const;
+ inline const SwFmtAnchor &GetAnchor( BOOL = TRUE ) const;
+ inline const SwFmtCol &GetCol( BOOL = TRUE ) const;
+ inline const SvxPaperBinItem &GetPaperBin( BOOL = TRUE ) const;
+ inline const SvxLRSpaceItem &GetLRSpace( BOOL = TRUE ) const;
+ inline const SvxULSpaceItem &GetULSpace( BOOL = TRUE ) const;
+ inline const SwFmtCntnt &GetCntnt( BOOL = TRUE ) const;
+ inline const SvxPrintItem &GetPrint( BOOL = TRUE ) const;
+ inline const SvxOpaqueItem &GetOpaque( BOOL = TRUE ) const;
+ inline const SvxProtectItem &GetProtect( BOOL = TRUE ) const;
+ inline const SwFmtVertOrient &GetVertOrient( BOOL = TRUE ) const;
+ inline const SvxBoxItem &GetBox( BOOL = TRUE ) const;
+ inline const SvxFmtKeepItem &GetKeep( BOOL = TRUE ) const;
+ inline const SvxBrushItem &GetBackground( BOOL = TRUE ) const;
+ inline const SvxShadowItem &GetShadow( BOOL = TRUE ) const;
+ inline const SwFmtPageDesc &GetPageDesc( BOOL = TRUE ) const;
+ inline const SvxFmtBreakItem &GetBreak( BOOL = TRUE ) const;
+ inline const SvxMacroItem &GetMacro( BOOL = TRUE ) const;
+ inline const SwFmtURL &GetURL( BOOL = TRUE ) const;
+ inline const SwFmtEditInReadonly &GetEditInReadonly( BOOL = TRUE ) const;
+ inline const SwFmtLayoutSplit &GetLayoutSplit( BOOL = TRUE ) const;
+ inline const SwFmtRowSplit &GetRowSplit( BOOL = TRUE ) const;
+ inline const SwFmtChain &GetChain( BOOL = TRUE ) const;
+ inline const SwFmtLineNumber &GetLineNumber( BOOL = TRUE ) const;
+ inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( BOOL = TRUE ) const;
+ inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( BOOL = TRUE ) const;
+ inline const SwFmtNoBalancedColumns &GetBalancedColumns( BOOL = TRUE ) const;
+ inline const SvxFrameDirectionItem &GetFrmDir( BOOL = TRUE ) const;
+ inline const SwTextGridItem &GetTextGrid( BOOL = TRUE ) const;
+ inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( BOOL = TRUE ) const;
+ // OD 18.09.2003 #i18732#
+ inline const SwFmtFollowTextFlow &GetFollowTextFlow(BOOL = TRUE) const;
+ // OD 2004-05-05 #i28701#
+ inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(BOOL = TRUE) const;
+
+ // Grafik-Attribute - impl. steht im grfatr.hxx
+ inline const SwMirrorGrf &GetMirrorGrf( BOOL = TRUE ) const;
+ inline const SwCropGrf &GetCropGrf( BOOL = TRUE ) const;
+ inline const SwRotationGrf &GetRotationGrf(BOOL = TRUE ) const;
+ inline const SwLuminanceGrf &GetLuminanceGrf(BOOL = TRUE ) const;
+ inline const SwContrastGrf &GetContrastGrf(BOOL = TRUE ) const;
+ inline const SwChannelRGrf &GetChannelRGrf(BOOL = TRUE ) const;
+ inline const SwChannelGGrf &GetChannelGGrf(BOOL = TRUE ) const;
+ inline const SwChannelBGrf &GetChannelBGrf(BOOL = TRUE ) const;
+ inline const SwGammaGrf &GetGammaGrf(BOOL = TRUE ) const;
+ inline const SwInvertGrf &GetInvertGrf(BOOL = TRUE ) const;
+ inline const SwTransparencyGrf &GetTransparencyGrf(BOOL = TRUE ) const;
+ inline const SwDrawModeGrf &GetDrawModeGrf(BOOL = TRUE ) const;
+
+ // Paragraph-Attribute - impl. steht im paratr.hxx
+ inline const SvxLineSpacingItem &GetLineSpacing( BOOL = TRUE ) const;
+ inline const SvxAdjustItem &GetAdjust( BOOL = TRUE ) const;
+ inline const SvxFmtSplitItem &GetSplit( BOOL = TRUE ) const;
+ inline const SwRegisterItem &GetRegister( BOOL = TRUE ) const;
+ inline const SwNumRuleItem &GetNumRule( BOOL = TRUE ) const;
+ inline const SvxWidowsItem &GetWidows( BOOL = TRUE ) const;
+ inline const SvxOrphansItem &GetOrphans( BOOL = TRUE ) const;
+ inline const SvxTabStopItem &GetTabStops( BOOL = TRUE ) const;
+ inline const SvxHyphenZoneItem &GetHyphenZone( BOOL = TRUE ) const;
+ inline const SwFmtDrop &GetDrop( BOOL = TRUE ) const;
+ inline const SvxScriptSpaceItem &GetScriptSpace(BOOL = TRUE) const;
+ inline const SvxHangingPunctuationItem &GetHangingPunctuation(BOOL = TRUE) const;
+ inline const SvxForbiddenRuleItem &GetForbiddenRule(BOOL = TRUE) const;
+ inline const SvxParaVertAlignItem &GetParaVertAlign(BOOL = TRUE) const;
+ inline const SvxParaGridItem &GetParaGrid(BOOL = TRUE) const;
+ inline const SwParaConnectBorderItem &GetParaConnectBorder(BOOL = TRUE ) const;
+
+ // TabellenBox-Attribute - impl. steht im cellatr.hxx
+ inline const SwTblBoxNumFormat &GetTblBoxNumFmt( BOOL = TRUE ) const;
+ inline const SwTblBoxFormula &GetTblBoxFormula( BOOL = TRUE ) const;
+ inline const SwTblBoxValue &GetTblBoxValue( BOOL = TRUE ) const;
+
+ /** SwFmt::IsBackgroundTransparent - for feature #99657#
+
+ OD 22.08.2002
+ Virtual method to determine, if background of format is transparent.
+ Default implementation returns false. Thus, subclasses have to overload
+ method, if the specific subclass can have a transparent background.
+
+ @author OD
+
+ @return false, default implementation
+ */
+ virtual sal_Bool IsBackgroundTransparent() const;
+
+ /** SwFmt::IsShadowTransparent - for feature #99657#
+
+ OD 22.08.2002
+ Virtual method to determine, if shadow of format is transparent.
+ Default implementation returns false. Thus, subclasses have to overload
+ method, if the specific subclass can have a transparent shadow.
+
+ @author OD
+
+ @return false, default implementation
+ */
+ virtual sal_Bool IsShadowTransparent() const;
+};
+
+// --------------- inline Implementierungen ------------------------
+
+inline const SfxPoolItem& SwFmt::GetFmtAttr( USHORT nWhich,
+ BOOL bInParents ) const
+{
+ return aSet.Get( nWhich, bInParents );
+}
+
+inline void SwFmt::SetName( const sal_Char* pNewName,
+ sal_Bool bBroadcast )
+{
+ String aTmp( String::CreateFromAscii( pNewName ) );
+ SetName( aTmp, bBroadcast );
+}
+
+inline SfxItemState SwFmt::GetItemState( USHORT nWhich, BOOL bSrchInParent,
+ const SfxPoolItem **ppItem ) const
+{
+ return aSet.GetItemState( nWhich, bSrchInParent, ppItem );
+}
+
+#undef inline
+
+#endif // _FORMAT_HXX
diff --git a/sw/inc/frmatr.hxx b/sw/inc/frmatr.hxx
new file mode 100644
index 000000000000..93f7a60123c5
--- /dev/null
+++ b/sw/inc/frmatr.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FRMATR_HXX
+#define _FRMATR_HXX
+
+#include <hintids.hxx> //die Ids der Attribute, vor frmitems damit die
+#include <format.hxx> //fuer Implementierung der inlines
+
+//------------------------ Inlines ---------------------------------
+
+
+/******************************************************************************
+ * Implementierung der FrameAttribut Methoden vom SwAttrSet
+ ******************************************************************************/
+
+inline const SvxPaperBinItem &SwAttrSet::GetPaperBin(BOOL bInP) const
+ { return (const SvxPaperBinItem&)Get( RES_PAPER_BIN,bInP); }
+inline const SvxLRSpaceItem &SwAttrSet::GetLRSpace(BOOL bInP) const
+ { return (const SvxLRSpaceItem&)Get( RES_LR_SPACE,bInP); }
+inline const SvxULSpaceItem &SwAttrSet::GetULSpace(BOOL bInP) const
+ { return (const SvxULSpaceItem&)Get( RES_UL_SPACE,bInP); }
+inline const SvxPrintItem &SwAttrSet::GetPrint(BOOL bInP) const
+ { return (const SvxPrintItem&)Get( RES_PRINT,bInP); }
+inline const SvxOpaqueItem &SwAttrSet::GetOpaque(BOOL bInP) const
+ { return (const SvxOpaqueItem&)Get( RES_OPAQUE,bInP); }
+inline const SvxProtectItem &SwAttrSet::GetProtect(BOOL bInP) const
+ { return (const SvxProtectItem&)Get( RES_PROTECT,bInP); }
+inline const SvxBoxItem &SwAttrSet::GetBox(BOOL bInP) const
+ { return (const SvxBoxItem&)Get( RES_BOX,bInP); }
+inline const SvxFmtKeepItem &SwAttrSet::GetKeep(BOOL bInP) const
+ { return (const SvxFmtKeepItem&)Get( RES_KEEP,bInP); }
+inline const SvxBrushItem &SwAttrSet::GetBackground(BOOL bInP) const
+ { return (const SvxBrushItem&)Get( RES_BACKGROUND,bInP); }
+inline const SvxShadowItem &SwAttrSet::GetShadow(BOOL bInP) const
+ { return (const SvxShadowItem&)Get( RES_SHADOW,bInP); }
+inline const SvxFmtBreakItem &SwAttrSet::GetBreak(BOOL bInP) const
+ { return (const SvxFmtBreakItem&)Get( RES_BREAK,bInP); }
+inline const SvxMacroItem &SwAttrSet::GetMacro(BOOL bInP) const
+ { return (const SvxMacroItem&)Get( RES_FRMMACRO,bInP); }
+inline const SvxFrameDirectionItem &SwAttrSet::GetFrmDir(BOOL bInP) const
+ { return (const SvxFrameDirectionItem&)Get( RES_FRAMEDIR,bInP); }
+
+
+/******************************************************************************
+ * Implementierung der FrameAttribut Methoden vom SwFmt
+ ******************************************************************************/
+
+inline const SvxPaperBinItem &SwFmt::GetPaperBin(BOOL bInP) const
+ { return aSet.GetPaperBin(bInP); }
+inline const SvxLRSpaceItem &SwFmt::GetLRSpace(BOOL bInP) const
+ { return aSet.GetLRSpace(bInP); }
+inline const SvxULSpaceItem &SwFmt::GetULSpace(BOOL bInP) const
+ { return aSet.GetULSpace(bInP); }
+inline const SvxPrintItem &SwFmt::GetPrint(BOOL bInP) const
+ { return aSet.GetPrint(bInP); }
+inline const SvxOpaqueItem &SwFmt::GetOpaque(BOOL bInP) const
+ { return aSet.GetOpaque(bInP); }
+inline const SvxProtectItem &SwFmt::GetProtect(BOOL bInP) const
+ { return aSet.GetProtect(bInP); }
+inline const SvxBoxItem &SwFmt::GetBox(BOOL bInP) const
+ { return aSet.GetBox(bInP); }
+inline const SvxFmtKeepItem &SwFmt::GetKeep(BOOL bInP) const
+ { return aSet.GetKeep(bInP); }
+inline const SvxBrushItem &SwFmt::GetBackground(BOOL bInP) const
+ { return aSet.GetBackground(bInP); }
+inline const SvxShadowItem &SwFmt::GetShadow(BOOL bInP) const
+ { return aSet.GetShadow(bInP); }
+inline const SvxFmtBreakItem &SwFmt::GetBreak(BOOL bInP) const
+ { return aSet.GetBreak(bInP); }
+inline const SvxMacroItem &SwFmt::GetMacro(BOOL bInP) const
+ { return aSet.GetMacro(bInP); }
+inline const SvxFrameDirectionItem &SwFmt::GetFrmDir(BOOL bInP) const
+ { return aSet.GetFrmDir(bInP); }
+
+#endif //_FRMATR_HXX
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
new file mode 100644
index 000000000000..388607d4f0e0
--- /dev/null
+++ b/sw/inc/frmfmt.hxx
@@ -0,0 +1,323 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FRMFMT_HXX
+#define _FRMFMT_HXX
+
+// --> OD 2004-08-06 #i28749#
+#include <com/sun/star/text/PositionLayoutDir.hpp>
+// <--
+
+#include <cppuhelper/weakref.hxx>
+
+#include <format.hxx>
+
+#include "swdllapi.h"
+
+class SwFlyFrm;
+class SwAnchoredObject;
+class Graphic;
+class Point;
+class ImageMap;
+class IMapObject;
+class SwRect;
+class SwContact;
+class SdrObject;
+
+class SW_DLLPUBLIC SwFrmFmt: public SwFmt
+{
+ friend class SwDoc;
+ friend class SwPageDesc; //darf den protected CTor rufen.
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::uno::XInterface> m_wXObject;
+
+protected:
+ SwFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm, USHORT nFmtWhich = RES_FRMFMT,
+ const USHORT* pWhichRange = 0 )
+ : SwFmt( rPool, pFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
+ pDrvdFrm, nFmtWhich )
+ {}
+
+ SwFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm, USHORT nFmtWhich = RES_FRMFMT,
+ const USHORT* pWhichRange = 0 )
+ : SwFmt( rPool, rFmtNm, (pWhichRange ? pWhichRange : aFrmFmtSetRange),
+ pDrvdFrm, nFmtWhich )
+ {}
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ //Vernichtet alle Frms in aDepend (Frms werden per PTR_CAST erkannt).
+ virtual void DelFrms();
+
+ //Erzeugt die Ansichten
+ virtual void MakeFrms();
+
+ virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
+
+ virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
+
+ // returnt das IMapObject, das an dem Format (Fly), in der ImageMap
+ // an der Point Position definiert ist.
+ // rPoint - teste auf der DocPosition
+ // pFly - optionaler FlyFrame, falls der schon bekannt ist.
+ IMapObject* GetIMapObject( const Point& rPoint,
+ const SwFlyFrm *pFly = 0 ) const;
+
+ // Gibt die tatsaechlche Groesse des Frames zurueck bzw. ein leeres
+ // Rechteck, wenn kein Layout existiert. Wird pPoint angegeben, dann
+ // wird der am dichtesten liegende Frame gesucht.
+ SwRect FindLayoutRect( const BOOL bPrtArea = FALSE,
+ const Point* pPoint = 0,
+ const BOOL bCalcFrm = FALSE ) const;
+
+ // Sucht das SdrObject. Der SdrObjUserCall ist Client vom Format.
+ // Der UserCall kennt sein SdrObject.
+ SwContact *FindContactObj();
+ const SwContact *FindContactObj() const
+ { return ((SwFrmFmt*)this)->FindContactObj(); }
+
+ // returns the SdrObject, that ist connected to the ContactObject.
+ // Only DrawFrmFmts are connected to the "real SdrObject". FlyFrmFmts
+ // are connected to a Master and all FlyFrms has the "real SdrObject".
+ // "Real SdrObject" has position and a Z-order.
+ SdrObject *FindSdrObject();
+ const SdrObject *FindSdrObject() const
+ { return ((SwFrmFmt*)this)->FindSdrObject(); }
+
+ SdrObject *FindRealSdrObject();
+ const SdrObject *FindRealSdrObject() const
+ { return ((SwFrmFmt*)this)->FindRealSdrObject(); }
+
+ BOOL IsLowerOf( const SwFrmFmt& rFmt ) const;
+
+ // --> OD 2004-07-27 #i31698#
+ enum tLayoutDir
+ {
+ HORI_L2R,
+ HORI_R2L,
+ VERT_R2L,
+ VERT_L2R // not supported yet
+ };
+
+ virtual SwFrmFmt::tLayoutDir GetLayoutDir() const;
+ virtual void SetLayoutDir( const SwFrmFmt::tLayoutDir _eLayoutDir );
+ // <--
+
+ // --> OD 2004-08-06 #i28749#
+ virtual sal_Int16 GetPositionLayoutDir() const;
+ virtual void SetPositionLayoutDir( const sal_Int16 _nPositionLayoutDir );
+ // <--
+
+ virtual String GetDescription() const;
+
+ SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::uno::XInterface> const& GetXObject() const
+ { return m_wXObject; }
+ SW_DLLPRIVATE void SetXObject(::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface> const& xObject)
+ { m_wXObject = xObject; }
+
+ DECL_FIXEDMEMPOOL_NEWDEL_DLL(SwFrmFmt)
+};
+
+//Das FlyFrame-Format ------------------------------
+
+class SW_DLLPUBLIC SwFlyFrmFmt: public SwFrmFmt
+{
+ friend class SwDoc;
+
+ //Beide nicht vorhanden.
+ SwFlyFrmFmt( const SwFlyFrmFmt &rCpy );
+ SwFlyFrmFmt &operator=( const SwFlyFrmFmt &rCpy );
+
+protected:
+ SwFlyFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FLYFRMFMT )
+ {}
+ SwFlyFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FLYFRMFMT )
+ {}
+
+public:
+ TYPEINFO();
+ ~SwFlyFrmFmt();
+
+ //Erzeugt die Ansichten
+ virtual void MakeFrms();
+
+ SwFlyFrm* GetFrm( const Point* pDocPos = 0,
+ const BOOL bCalcFrm = FALSE ) const;
+
+ SwAnchoredObject* GetAnchoredObj( const Point* pDocPos = 0,
+ const BOOL bCalcFrm = FALSE ) const;
+
+ virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
+
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ // --> OD 2009-07-14 #i73249#
+ const String GetObjTitle() const;
+ void SetObjTitle( const String& rTitle,
+ bool bBroadcast = false );
+ const String GetObjDescription() const;
+ void SetObjDescription( const String& rDescription,
+ bool bBroadcast = false );
+ // <--
+
+ /** SwFlyFrmFmt::IsBackgroundTransparent - for #99657#
+
+ OD 22.08.2002 - overloading virtual method and its default implementation,
+ because format of fly frame provides transparent backgrounds.
+ Method determines, if background of fly frame is transparent.
+
+ @author OD
+
+ @return true, if background color is transparent, but not "no fill"
+ or a existing background graphic is transparent.
+ */
+ virtual sal_Bool IsBackgroundTransparent() const;
+
+ /** SwFlyFrmFmt::IsBackgroundBrushInherited - for #103898#
+
+ OD 08.10.2002 - method to determine, if the brush for drawing the
+ background is "inherited" from its parent/grandparent.
+ This is the case, if no background graphic is set and the background
+ color is "no fill"/"auto fill"
+
+ @author OD
+
+ @return true, if background brush is "inherited" from parent/grandparent
+ */
+ sal_Bool IsBackgroundBrushInherited() const;
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwFlyFrmFmt)
+};
+
+//Das DrawFrame-Format -----------------------------
+
+class SW_DLLPUBLIC SwDrawFrmFmt: public SwFrmFmt
+{
+ friend class SwDoc;
+
+ mutable const SdrObject * pSdrObjCached;
+ mutable String sSdrObjCachedComment;
+
+ //Beide nicht vorhanden.
+ SwDrawFrmFmt( const SwDrawFrmFmt &rCpy );
+ SwDrawFrmFmt &operator=( const SwDrawFrmFmt &rCpy );
+
+ // --> OD 2004-07-27 #i31698#
+ SwFrmFmt::tLayoutDir meLayoutDir;
+ // <--
+ // --> OD 2004-08-06 #i28749#
+ sal_Int16 mnPositionLayoutDir;
+ // <--
+ // --> OD 2005-03-11 #i44334#, #i44681#
+ bool mbPosAttrSet;
+ // <--
+protected:
+ SwDrawFrmFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_DRAWFRMFMT ),
+ pSdrObjCached(NULL),
+ // --> OD 2004-07-28 #i31698#
+ meLayoutDir( SwFrmFmt::HORI_L2R ),
+ // <--
+ // --> OD 2004-08-06 #i28749#
+ // --> OD 2005-03-10 #i44344#, #i44681# - undo change of issue #i36010#
+ mnPositionLayoutDir( com::sun::star::text::PositionLayoutDir::PositionInLayoutDirOfAnchor ),
+ // <--
+ // --> OD 2005-03-11 #i44334#, #i44681#
+ mbPosAttrSet( false )
+ // <--
+
+ {}
+ SwDrawFrmFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_DRAWFRMFMT ),
+ pSdrObjCached(NULL),
+ // --> OD 2004-07-28 #i31698#
+ meLayoutDir( SwFrmFmt::HORI_L2R ),
+ // <--
+ // --> OD 2004-08-06 #i28749#
+ // --> OD 2005-03-10 #i44344#, #i44681# - undo change of issue #i36010#
+ mnPositionLayoutDir( com::sun::star::text::PositionLayoutDir::PositionInLayoutDirOfAnchor ),
+ // <--
+ // --> OD 2005-03-11 #i44334#, #i44681#
+ mbPosAttrSet( false )
+ // <--
+ {}
+
+public:
+ TYPEINFO();
+ ~SwDrawFrmFmt();
+
+ //DrawObjecte werden aus den Arrays am Layout entfernt. Die DrawObjecte
+ //werden als geloescht gekennzeichnet.
+ virtual void DelFrms();
+
+ //Anmelden der DrawObjecte in den Arrays am Layout. Loeschkennzeichen
+ //werden zurueckgesetzt.
+ virtual void MakeFrms();
+
+ virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
+
+ // --> OD 2004-07-27 #i31698#
+ virtual SwFrmFmt::tLayoutDir GetLayoutDir() const;
+ virtual void SetLayoutDir( const SwFrmFmt::tLayoutDir _eLayoutDir );
+ // <--
+
+ // --> OD 2004-08-06 #i28749#
+ virtual sal_Int16 GetPositionLayoutDir() const;
+ virtual void SetPositionLayoutDir( const sal_Int16 _nPositionLayoutDir );
+ // <--
+
+ // --> OD 2005-03-11 #i44334#, #i44681#
+ inline bool IsPosAttrSet() const { return mbPosAttrSet; }
+ inline void PosAttrSet() { mbPosAttrSet = true; }
+ // <--
+
+ // --> OD 2005-08-16 #i53320#
+ inline void ResetPosAttr()
+ {
+ mbPosAttrSet = false;
+ }
+ // <--
+
+ virtual String GetDescription() const;
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwDrawFrmFmt);
+};
+
+
+#endif
+
diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx
new file mode 100644
index 000000000000..aa5ecc829364
--- /dev/null
+++ b/sw/inc/ftnidx.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FTNIDX_HXX
+#define _FTNIDX_HXX
+
+
+#define _SVSTDARR_USHORTS
+#include <svl/svstdarr.hxx>
+
+class SwTxtFtn;
+class SwNodeIndex;
+class SwSectionNode;
+
+// ueberall, wo der NodeIndex gebraucht wird, werden die hier fehlenden
+// Headerfiles schon includes. Darum hier nur als define und nicht als
+// inline Methode (spart Compile-Zeit)
+#define _SwTxtFtn_GetIndex( pFIdx ) (pFIdx->GetTxtNode().GetIndex())
+
+
+typedef SwTxtFtn* SwTxtFtnPtr;
+SV_DECL_PTRARR_SORT( _SwFtnIdxs, SwTxtFtnPtr, 0, 10 )
+
+class SwFtnIdxs : public _SwFtnIdxs
+{
+public:
+ SwFtnIdxs() {}
+
+ void UpdateFtn( const SwNodeIndex& rStt ); // ab Pos. alle Updaten
+ void UpdateAllFtn(); // alle Fussnoten updaten
+
+ SwTxtFtn* SeekEntry( const SwNodeIndex& rIdx, USHORT* pPos = 0 ) const;
+};
+
+
+class SwUpdFtnEndNtAtEnd
+{
+ SvPtrarr aFtnSects, aEndSects;
+ SvUShorts aFtnNums, aEndNums;
+
+public:
+ SwUpdFtnEndNtAtEnd() : aFtnSects( 0, 4 ), aEndSects( 0, 4 ),
+ aFtnNums( 0, 4 ), aEndNums( 0, 4 )
+ {}
+
+ static const SwSectionNode* FindSectNdWithEndAttr(
+ const SwTxtFtn& rTxtFtn );
+
+ USHORT GetNumber( const SwTxtFtn& rTxtFtn, const SwSectionNode& rNd );
+ USHORT ChkNumber( const SwTxtFtn& rTxtFtn );
+};
+
+
+
+#endif // _FTNIDX_HXX
+
diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
new file mode 100644
index 000000000000..c3b9f7c7dc13
--- /dev/null
+++ b/sw/inc/ftninfo.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _FTNINFO_HXX
+#define _FTNINFO_HXX
+
+#include <tools/string.hxx>
+#include "swdllapi.h"
+//#ifndef _NUMRULE_HXX
+//#include <numrule.hxx>
+//#endif
+#include <calbck.hxx>
+#include <editeng/numitem.hxx>
+
+class SwTxtFmtColl;
+class SwPageDesc;
+class SwCharFmt;
+class SwDoc;
+
+class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
+{
+ SwDepend aPageDescDep;
+ SwDepend aCharFmtDep, aAnchorCharFmtDep;
+ String sPrefix;
+ String sSuffix;
+protected:
+ bool m_bEndNote;
+public:
+ SvxNumberType aFmt;
+ USHORT nFtnOffset;
+
+ void ChgPageDesc( SwPageDesc *pDesc );
+ SwPageDesc *GetPageDesc( SwDoc &rDoc ) const;
+ SwClient *GetPageDescDep() const { return (SwClient*)&aPageDescDep; }
+
+ void SetFtnTxtColl(SwTxtFmtColl& rColl);
+ SwTxtFmtColl* GetFtnTxtColl() const { return (SwTxtFmtColl*) GetRegisteredIn(); } // kann 0 sein
+
+ SwCharFmt* GetCharFmt(SwDoc &rDoc) const;
+ void SetCharFmt( SwCharFmt* );
+ SwClient *GetCharFmtDep() const { return (SwClient*)&aCharFmtDep; }
+
+ SwCharFmt* GetAnchorCharFmt(SwDoc &rDoc) const;
+ void SetAnchorCharFmt( SwCharFmt* );
+ SwClient *GetAnchorCharFmtDep() const { return (SwClient*)&aAnchorCharFmtDep; }
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ SwEndNoteInfo & operator=(const SwEndNoteInfo&);
+ BOOL operator==( const SwEndNoteInfo &rInf ) const;
+
+ SwEndNoteInfo( SwTxtFmtColl *pTxtColl = 0);
+ SwEndNoteInfo(const SwEndNoteInfo&);
+
+ const String& GetPrefix() const { return sPrefix; }
+ const String& GetSuffix() const { return sSuffix; }
+
+ void SetPrefix(const String& rSet) { sPrefix = rSet; }
+ void SetSuffix(const String& rSet) { sSuffix = rSet; }
+};
+
+enum SwFtnPos
+{
+ //Derzeit nur PAGE und CHAPTER. CHAPTER == Dokumentendenoten.
+ FTNPOS_PAGE = 1,
+ FTNPOS_CHAPTER = 8
+};
+
+enum SwFtnNum
+{
+ FTNNUM_PAGE, FTNNUM_CHAPTER, FTNNUM_DOC
+};
+
+class SW_DLLPUBLIC SwFtnInfo: public SwEndNoteInfo
+{
+ using SwEndNoteInfo::operator ==;
+
+public:
+ String aQuoVadis;
+ String aErgoSum;
+ SwFtnPos ePos;
+ SwFtnNum eNum;
+
+
+ SwFtnInfo& operator=(const SwFtnInfo&);
+
+ BOOL operator==( const SwFtnInfo &rInf ) const;
+
+ SwFtnInfo(SwTxtFmtColl* pTxtColl = 0);
+ SwFtnInfo(const SwFtnInfo&);
+};
+
+
+#endif
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
new file mode 100644
index 000000000000..b64494b847ae
--- /dev/null
+++ b/sw/inc/globals.hrc
@@ -0,0 +1,290 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _GLOBALS_HRC
+#define _GLOBALS_HRC
+
+
+// Versions-Definition wie in solar.h und swtypes.hxx
+//#define SW_FILEFORMAT_40 3580
+
+#include "rcid.hrc"
+
+// STRINGS -----------------------------------------------------------
+
+#define STR_DLLNOTFOUND (RC_GLOBALS_BEGIN + 0)
+#define STR_FMT_STD (RC_GLOBALS_BEGIN + 1)
+#define STR_LOAD_GLOBAL_DOC (RC_GLOBALS_BEGIN + 2)
+
+#define STR_SEPARATOR (RC_GLOBALS_BEGIN + 4)
+
+
+#define STR_BASIC_IMPORT (RC_GLOBALS_BEGIN + 5)
+#define STR_BASIC_BEGIN (RC_GLOBALS_BEGIN + 6)
+#define STR_BASIC_END (RC_GLOBALS_BEGIN + 7)
+#define STR_BASIC_REC_LIB (RC_GLOBALS_BEGIN + 8)
+#define STR_TEMPLATE_WILDCARD (RC_GLOBALS_BEGIN + 9)
+#define STR_DOC_STAT (RC_GLOBALS_BEGIN + 10)
+
+#define STR_PAGE (RC_GLOBALS_BEGIN + 14)
+#define STR_PRINTOPTUI (RC_GLOBALS_BEGIN + 15)
+
+//EventStrings
+
+#define STR_EVENT_OBJECT_SELECT ( RC_GLOBALS_BEGIN + 17 )
+#define STR_EVENT_START_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 18 )
+#define STR_EVENT_END_INS_GLOSSARY ( RC_GLOBALS_BEGIN + 19 )
+#define STR_EVENT_MOUSEOVER_OBJECT ( RC_GLOBALS_BEGIN + 20 )
+#define STR_EVENT_MOUSECLICK_OBJECT ( RC_GLOBALS_BEGIN + 21 )
+#define STR_EVENT_MOUSEOUT_OBJECT ( RC_GLOBALS_BEGIN + 22 )
+#define STR_EVENT_IMAGE_LOAD ( RC_GLOBALS_BEGIN + 23 )
+#define STR_EVENT_IMAGE_ABORT ( RC_GLOBALS_BEGIN + 24 )
+#define STR_EVENT_IMAGE_ERROR ( RC_GLOBALS_BEGIN + 25 )
+#define STR_EVENT_FRM_KEYINPUT_A ( RC_GLOBALS_BEGIN + 26 )
+#define STR_EVENT_FRM_KEYINPUT_NOA ( RC_GLOBALS_BEGIN + 27 )
+#define STR_EVENT_FRM_RESIZE ( RC_GLOBALS_BEGIN + 28 )
+#define STR_EVENT_FRM_MOVE ( RC_GLOBALS_BEGIN + 29 )
+
+// Strings fuer Rahmenausrichtungen im Popup
+#define STR_TOP_BASE (RC_GLOBALS_BEGIN + 30)
+#define STR_BOTTOM_BASE (RC_GLOBALS_BEGIN + 31)
+#define STR_CENTER_BASE (RC_GLOBALS_BEGIN + 32)
+#define STR_TOP (RC_GLOBALS_BEGIN + 33)
+#define STR_BOTTOM (RC_GLOBALS_BEGIN + 34)
+#define STR_CENTER_HORI (RC_GLOBALS_BEGIN + 35)
+#define STR_CENTER_VERT (RC_GLOBALS_BEGIN + 36)
+
+#define STR_LOAD_HTML_DOC (RC_GLOBALS_BEGIN + 37)
+
+#define STR_AUTH (RC_GLOBALS_BEGIN + 38)
+#define STR_TBL (RC_GLOBALS_BEGIN + 39)
+#define STR_TOO (RC_GLOBALS_BEGIN + 40)
+#define STR_TOILL (RC_GLOBALS_BEGIN + 41)
+
+// more Strings
+
+// BITMAPS -----------------------------------------------------------
+
+#define RES_TABL (RC_GLOBALS_BEGIN + 1)
+#define RES_TABR (RC_GLOBALS_BEGIN + 2)
+#define RES_TABD (RC_GLOBALS_BEGIN + 3)
+#define RES_TABC (RC_GLOBALS_BEGIN + 4)
+
+// DIALOGE -----------------------------------------------------------
+
+#define DLG_LISTBOX (RC_GLOBALS_BEGIN + 1)
+#define DLG_THESAURUS (RC_GLOBALS_BEGIN + 2)
+#define DLG_SPECIAL (RC_GLOBALS_BEGIN + 3)
+
+// QUERYBOX ---------------------------------------------------------
+
+#define DLG_WRAP (RC_GLOBALS_BEGIN + 4)
+#define DLG_BODY (RC_GLOBALS_BEGIN + 5)
+#define DLG_PRT_FIELDNAME (RC_GLOBALS_BEGIN + 6)
+
+// INFOBOX ------------------------------------------------------------
+
+#define ERR_CLPBRD_READ (RC_GLOBALS_BEGIN + 1)
+#define ERR_CLPBRD_WRITE (RC_GLOBALS_BEGIN + 2)
+#define MSG_ERROR_PASSWD (RC_GLOBALS_BEGIN + 3)
+
+
+// ACC ---------------------------------------------------------------
+
+#define FN_CHAR_LEFT_SEL (RC_GLOBALS_BEGIN + 1) //
+#define FN_CHAR_RIGHT_SEL (RC_GLOBALS_BEGIN + 2) //
+#define FN_LINE_UP_SEL (RC_GLOBALS_BEGIN + 3) //
+#define FN_LINE_DOWN_SEL (RC_GLOBALS_BEGIN + 4) //
+#define FN_START_OF_LINE_SEL (RC_GLOBALS_BEGIN + 5) // StartOfLine
+#define FN_END_OF_LINE_SEL (RC_GLOBALS_BEGIN + 6) // EndOfLine
+#define FN_START_OF_DOCUMENT_SEL (RC_GLOBALS_BEGIN + 7) // StartOfDocument
+#define FN_END_OF_DOCUMENT_SEL (RC_GLOBALS_BEGIN + 8) // EndOfDocument
+#define FN_START_OF_NEXT_PAGE_SEL (RC_GLOBALS_BEGIN + 9) // StartOfNextPage ???
+#define FN_END_OF_NEXT_PAGE_SEL (RC_GLOBALS_BEGIN + 10) // ???
+#define FN_START_OF_PREV_PAGE_SEL (RC_GLOBALS_BEGIN + 11) // StartOfPrevPage ???
+#define FN_END_OF_PREV_PAGE_SEL (RC_GLOBALS_BEGIN + 12) // ???
+#define FN_START_OF_PAGE_SEL (RC_GLOBALS_BEGIN + 13) // StartOfPage
+#define FN_END_OF_PAGE_SEL (RC_GLOBALS_BEGIN + 14) // EndOfPage
+#define FN_START_OF_WINDOW_SEL (RC_GLOBALS_BEGIN + 15) // StartOfWindow
+#define FN_END_OF_WINDOW_SEL (RC_GLOBALS_BEGIN + 16) // EndOfWindow
+#define FN_START_OF_COLUMN_SEL (RC_GLOBALS_BEGIN + 17) // StartOfColumn
+#define FN_END_OF_COLUMN_SEL (RC_GLOBALS_BEGIN + 18) // EndOfColumn
+#define FN_START_OF_PARA_SEL (RC_GLOBALS_BEGIN + 19) // StartOfPara
+#define FN_END_OF_PARA_SEL (RC_GLOBALS_BEGIN + 20) // EndOfPara
+#define FN_NEXT_WORD_SEL (RC_GLOBALS_BEGIN + 21) // NextWord
+#define FN_PREV_WORD_SEL (RC_GLOBALS_BEGIN + 22) // PrevWord
+#define FN_NEXT_SENT_SEL (RC_GLOBALS_BEGIN + 23) // NextSentence
+#define FN_PREV_SENT_SEL (RC_GLOBALS_BEGIN + 24) // PrevSentence
+
+#define FN_START_OF_NEXT_COLUMN_SEL (RC_GLOBALS_BEGIN + 25)
+#define FN_END_OF_NEXT_COLUMN_SEL (RC_GLOBALS_BEGIN + 26)
+#define FN_START_OF_PREV_COLUMN_SEL (RC_GLOBALS_BEGIN + 27)
+#define FN_END_OF_PREV_COLUMN_SEL (RC_GLOBALS_BEGIN + 28)
+#define FN_PAGEUP_SEL (RC_GLOBALS_BEGIN + 29)
+#define FN_PAGEDOWN_SEL (RC_GLOBALS_BEGIN + 30)
+
+// TABPAGES -----------------------------------------------------------
+
+#define TP_PAGE_STD (RC_GLOBALS_BEGIN + 1)
+#define TP_PAGE_EXT (RC_GLOBALS_BEGIN + 2)
+
+#define TP_PARA_STD (RC_GLOBALS_BEGIN + 3)
+#define TP_PARA_EXT (RC_GLOBALS_BEGIN + 4)
+
+#define TP_FRAME_STD (RC_GLOBALS_BEGIN + 5)
+#define TP_FRAME_EXT (RC_GLOBALS_BEGIN + 6)
+
+#define TP_CHAR_STD (RC_GLOBALS_BEGIN + 7)
+#define TP_CHAR_EXT (RC_GLOBALS_BEGIN + 8)
+
+#define TP_TABULATOR (RC_GLOBALS_BEGIN + 9)
+#define TP_DROPCAPS (RC_GLOBALS_BEGIN + 10)
+#define TP_BACKGROUND (RC_GLOBALS_BEGIN + 11)
+#define TP_BORDER (RC_GLOBALS_BEGIN + 12)
+#define TP_COLUMN (RC_GLOBALS_BEGIN + 13)
+
+#define TP_DOC_STAT (RC_GLOBALS_BEGIN + 15)
+
+#define TP_HEADER_PAGE (RC_GLOBALS_BEGIN + 16)
+#define TP_FOOTER_PAGE (RC_GLOBALS_BEGIN + 17)
+#define TP_FOOTNOTE_PAGE (RC_GLOBALS_BEGIN + 18)
+
+#define TP_OPTGENERAL_PAGE (RC_GLOBALS_BEGIN + 19) //Sfx-Seiten
+#define TP_OPTSAVE_PAGE (RC_GLOBALS_BEGIN + 20)
+#define TP_OPTPATH_PAGE (RC_GLOBALS_BEGIN + 21)
+#define TP_OPTSPELL_PAGE (RC_GLOBALS_BEGIN + 22)
+ //Sw-Seiten
+#define SW_EDIT_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 23)
+#define SW_BROWSER_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 24)
+#define TP_OPTTEST_PAGE (RC_GLOBALS_BEGIN + 25)
+#define TP_OPTPRINT_PAGE (RC_GLOBALS_BEGIN + 26)
+#define TP_OPTCOLOR_PAGE (RC_GLOBALS_BEGIN + 27)
+
+#define SW_OPTIONS_TDLG (RC_GLOBALS_BEGIN + 28)
+#define SW_OPTIONS_TDLG_ELEM (RC_GLOBALS_BEGIN + 29)
+#define SW_OPTIONS_TDLG_PRINT (RC_GLOBALS_BEGIN + 30)
+
+#define TP_FRM_STD (RC_GLOBALS_BEGIN + 31)
+
+#define TP_OPTGRID_PAGE (RC_GLOBALS_BEGIN + 33)
+
+#define TP_FORMAT_TABLE (RC_GLOBALS_BEGIN + 34)
+#define TP_GRF_EXT (RC_GLOBALS_BEGIN + 35)
+
+#define DLG_FRM_STD (RC_GLOBALS_BEGIN + 36)
+#define DLG_FRM_GRF (RC_GLOBALS_BEGIN + 37)
+#define DLG_FRM_OLE (RC_GLOBALS_BEGIN + 38)
+
+#define RID_INPUT_TOOLBOX (RC_GLOBALS_BEGIN + 39)
+
+#define TP_MACRO_ASSIGN (RC_GLOBALS_BEGIN + 40)
+#define TP_FRM_URL (RC_GLOBALS_BEGIN + 42)
+#define TP_CHAR_URL (RC_GLOBALS_BEGIN + 43)
+
+#define TP_LAYOUT_OPT (RC_GLOBALS_BEGIN + 44)
+#define TP_CONTENT_OPT (RC_GLOBALS_BEGIN + 45)
+#define TP_HTML_OPT (RC_GLOBALS_BEGIN + 46)
+#define TP_STD_FONT (RC_GLOBALS_BEGIN + 47)
+#define TP_CONDCOLL (RC_GLOBALS_BEGIN + 48)
+
+#define TP_FRM_WRAP (RC_GLOBALS_BEGIN + 49)
+#define TP_FRM_ADD (RC_GLOBALS_BEGIN + 51)
+
+#define TP_TABLE_TEXTFLOW (RC_GLOBALS_BEGIN + 52)
+
+#define TP_AUTOFMT_BY_INPUT (RC_GLOBALS_BEGIN + 53)
+#define TP_AUTOFMT_APPLY (RC_GLOBALS_BEGIN + 54)
+
+#define TP_PARA_ALIGN (RC_GLOBALS_BEGIN + 55)
+#define TP_OPTTABLE_PAGE (RC_GLOBALS_BEGIN + 56)
+
+#define TP_NUMBER (RC_GLOBALS_BEGIN + 57)
+
+#define DLG_NUM_BULLET (RC_GLOBALS_BEGIN + 58)
+#define TP_PICK_SINGLE_NUM (RC_GLOBALS_BEGIN + 59)
+#define TP_PICK_BULLET (RC_GLOBALS_BEGIN + 60)
+#define TP_PICK_NUM (RC_GLOBALS_BEGIN + 61)
+#define TP_PICK_BMP (RC_GLOBALS_BEGIN + 62)
+
+#define TP_FLD_DB (RC_GLOBALS_BEGIN + 64)
+#define TP_FLD_DOKINF (RC_GLOBALS_BEGIN + 65)
+#define TP_FLD_VAR (RC_GLOBALS_BEGIN + 66)
+#define TP_FLD_DOK (RC_GLOBALS_BEGIN + 67)
+#define TP_FLD_FUNC (RC_GLOBALS_BEGIN + 68)
+#define TP_FLD_REF (RC_GLOBALS_BEGIN + 69)
+
+#define TP_OPTSHDWCRSR (RC_GLOBALS_BEGIN + 70)
+#define TP_NUM_OPTIONS (RC_GLOBALS_BEGIN + 71)
+#define TP_NUM_POSITION (RC_GLOBALS_BEGIN + 72)
+#define TP_NUMPARA (RC_GLOBALS_BEGIN + 73)
+
+#define TP_REDLINE_OPT (RC_GLOBALS_BEGIN + 74)
+
+#define TP_LINENUMBERING (RC_GLOBALS_BEGIN + 75)
+#define TP_OUTLINE_NUM (RC_GLOBALS_BEGIN + 76)
+
+#define TP_OPTINSERT_PAGE (RC_GLOBALS_BEGIN + 77)
+#define TP_OPTCAPTION_PAGE (RC_GLOBALS_BEGIN + 78)
+#define DLG_SVXTEST_NUM_BULLET (RC_GLOBALS_BEGIN + 79)
+#define TP_OPTLOAD_PAGE (RC_GLOBALS_BEGIN + 80)
+#define TP_INSERT_TOX (RC_GLOBALS_BEGIN + 81)
+#define TP_TOX_FORM_ENTRY (RC_GLOBALS_BEGIN + 82)
+#define TP_TOX_FORM_STYLES (RC_GLOBALS_BEGIN + 83)
+#define DLG_INSERT_TOX_TABDLG (RC_GLOBALS_BEGIN + 84)
+#define TP_INSERT_SECTION (RC_GLOBALS_BEGIN + 85)
+#define DLG_INSERT_SECTION (RC_GLOBALS_BEGIN + 86)
+#define DLG_SECTION_PROPERTIES (RC_GLOBALS_BEGIN + 87)
+#define DLG_RENAME_XNAMED (RC_GLOBALS_BEGIN + 88)
+#define DLG_MULTI_TOX (RC_GLOBALS_BEGIN + 89)
+#define TP_TOX_SELECT (RC_GLOBALS_BEGIN + 90)
+#define TP_TOX_ENTRY (RC_GLOBALS_BEGIN + 91)
+#define TP_TOX_STYLES (RC_GLOBALS_BEGIN + 92)
+#define TP_VISITING_CARDS (RC_GLOBALS_BEGIN + 93)
+#define DLG_ADD_IDX_STYLES (RC_GLOBALS_BEGIN + 94)
+#define TP_PRIVATE_DATA (RC_GLOBALS_BEGIN + 95)
+#define TP_BUSINESS_DATA (RC_GLOBALS_BEGIN + 96)
+#define TP_SECTION_FTNENDNOTES (RC_GLOBALS_BEGIN + 97)
+#define TP_CHAR_POS (RC_GLOBALS_BEGIN + 98)
+#define TP_CHAR_TWOLN (RC_GLOBALS_BEGIN + 99)
+#define TP_PARA_ASIAN (RC_GLOBALS_BEGIN + 100)
+#define TP_TEXTGRID_PAGE (RC_GLOBALS_BEGIN + 101)
+#define TP_SECTION_INDENTS (RC_GLOBALS_BEGIN + 102)
+#define TP_OPTCOMPATIBILITY_PAGE (RC_GLOBALS_BEGIN + 103)
+#define TP_MAILCONFIG (RC_GLOBALS_BEGIN + 104)
+//maximum: RC_GLOBALS_BEGIN + 119
+
+#if STR_DOC_STAT > RC_GLOBALS_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#define SID_PREVIEWFLAG_TYPE (RC_GLOBALS_BEGIN + 114)
+#define SID_FONTMODE_TYPE (RC_GLOBALS_BEGIN + 115)
+#define SID_FAX_LIST (RC_GLOBALS_BEGIN + 116)
+#define SID_WRT_SHELL (RC_GLOBALS_BEGIN + 117)
+
+#define DLG_LINE_NUMBERING (RC_GLOBALS_BEGIN + 118)
+#endif // _GLOBALS_HRC
diff --git a/sw/inc/globdoc.hxx b/sw/inc/globdoc.hxx
new file mode 100644
index 000000000000..201f999cc2ce
--- /dev/null
+++ b/sw/inc/globdoc.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWGLOBDOCSH_HXX
+#define _SWGLOBDOCSH_HXX
+
+#include <swdll.hxx>
+#include "docsh.hxx"
+
+class SwGlobalDocShell : public SwDocShell
+{
+public:
+
+ SFX_DECL_OBJECTFACTORY();
+ TYPEINFO();
+
+ SwGlobalDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED);
+ ~SwGlobalDocShell();
+
+ virtual void FillClass( SvGlobalName * pClassName,
+ sal_uInt32 * pClipFormat,
+ String * pAppName,
+ String * pLongUserName,
+ String * pUserName,
+ sal_Int32 nFileFormat,
+ sal_Bool bTemplate = sal_False ) const;
+};
+
+#endif
+
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
new file mode 100644
index 000000000000..bee336490450
--- /dev/null
+++ b/sw/inc/grfatr.hxx
@@ -0,0 +1,370 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _GRFATR_HXX
+#define _GRFATR_HXX
+
+#include <hintids.hxx> // fuer die WhichIds @@@ must be included first @@@
+#include <tools/gen.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <svx/grfcrop.hxx>
+#include "swdllapi.h"
+#include <swatrset.hxx> // fuer inlines
+#include <format.hxx> // fuer inlines
+
+/******************************************************************************
+ * class SwMirrorGrf
+ ******************************************************************************/
+
+enum MirrorGraph
+{
+RES_MIRROR_GRAPH_BEGIN,
+ RES_MIRROR_GRAPH_DONT = RES_MIRROR_GRAPH_BEGIN,
+ RES_MIRROR_GRAPH_VERT,
+ RES_MIRROR_GRAPH_HOR,
+ RES_MIRROR_GRAPH_BOTH,
+RES_MIRROR_GRAPH_END
+};
+
+class SW_DLLPUBLIC SwMirrorGrf : public SfxEnumItem
+{
+ BOOL bGrfToggle; // auf geraden Seiten Grafiken spiegeln
+
+public:
+ SwMirrorGrf( MirrorGraph eMiro = RES_MIRROR_GRAPH_DONT )
+ : SfxEnumItem( RES_GRFATR_MIRRORGRF, static_cast< USHORT >(eMiro) ), bGrfToggle( sal_False )
+ {}
+ SwMirrorGrf( const SwMirrorGrf &rMirrorGrf )
+ : SfxEnumItem( RES_GRFATR_MIRRORGRF, rMirrorGrf.GetValue()),
+ bGrfToggle( rMirrorGrf.IsGrfToggle() )
+ {}
+
+ // pure virtual-Methoden von SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ // pure virtual-Methiden von SfxEnumItem
+ virtual USHORT GetValueCount() const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ 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 );
+
+ inline SwMirrorGrf& operator=( const SwMirrorGrf& rMirrorGrf )
+ {
+ SfxEnumItem::SetValue( rMirrorGrf.GetValue() );
+ bGrfToggle = rMirrorGrf.IsGrfToggle();
+ return *this;
+ }
+
+ inline BOOL IsGrfToggle() const { return bGrfToggle; }
+ inline void SetGrfToggle( BOOL bNew ) { bGrfToggle = bNew; }
+};
+
+
+/******************************************************************************
+ * class SwAttrCropGrf
+ ******************************************************************************/
+
+class SW_DLLPUBLIC SwCropGrf : public SvxGrfCrop
+{
+public:
+ TYPEINFO();
+ SwCropGrf();
+ SwCropGrf( sal_Int32 nLeft, sal_Int32 nRight,
+ sal_Int32 nTop, sal_Int32 nBottom );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+class SwRotationGrf : public SfxUInt16Item
+{
+ Size aUnrotatedSize;
+public:
+ SwRotationGrf( sal_Int16 nVal = 0 )
+ : SfxUInt16Item( RES_GRFATR_ROTATION, nVal )
+ {}
+ SwRotationGrf( sal_Int16 nVal, const Size& rSz )
+ : SfxUInt16Item( RES_GRFATR_ROTATION, nVal ), aUnrotatedSize( rSz )
+ {}
+
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ 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 );
+
+ void SetUnrotatedSize( const Size& rSz ) { aUnrotatedSize = rSz; }
+ const Size& GetUnrotatedSize() const { return aUnrotatedSize; }
+};
+
+class SW_DLLPUBLIC SwLuminanceGrf : public SfxInt16Item
+{
+public:
+ SwLuminanceGrf( sal_Int16 nVal = 0 )
+ : SfxInt16Item( RES_GRFATR_LUMINANCE, nVal )
+ {}
+
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+class SW_DLLPUBLIC SwContrastGrf : public SfxInt16Item
+{
+public:
+ SwContrastGrf( sal_Int16 nVal = 0 )
+ : SfxInt16Item( RES_GRFATR_CONTRAST, nVal )
+ {}
+
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+class SwChannelGrf : public SfxInt16Item
+{
+protected:
+ SwChannelGrf( sal_Int16 nVal, USHORT nWhichL )
+ : SfxInt16Item( nWhichL, nVal )
+ {}
+
+public:
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+class SwChannelRGrf : public SwChannelGrf
+{
+public:
+ SwChannelRGrf( sal_Int16 nVal = 0 )
+ : SwChannelGrf( nVal, RES_GRFATR_CHANNELR )
+ {}
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+class SwChannelGGrf : public SwChannelGrf
+{
+public:
+ SwChannelGGrf( sal_Int16 nVal = 0 )
+ : SwChannelGrf( nVal, RES_GRFATR_CHANNELG )
+ {}
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+class SwChannelBGrf : public SwChannelGrf
+{
+public:
+ SwChannelBGrf( sal_Int16 nVal = 0 )
+ : SwChannelGrf( nVal, RES_GRFATR_CHANNELB )
+ {}
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+class SW_DLLPUBLIC SwGammaGrf : public SfxPoolItem
+{
+ double nValue;
+public:
+ TYPEINFO();
+ SwGammaGrf() : SfxPoolItem( RES_GRFATR_GAMMA ), nValue( 1.0 )
+ {}
+
+ SwGammaGrf( const double& rVal )
+ : SfxPoolItem( RES_GRFATR_GAMMA ), nValue( rVal )
+ {}
+
+ inline SwGammaGrf& operator=( const SwGammaGrf& rCopy )
+ {
+ SetValue( rCopy.GetValue() );
+ return *this;
+ }
+
+ // pure virtual-Methiden von SfxEnumItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ 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 );
+
+
+ const double& GetValue() const { return nValue; }
+ void SetValue( const double& rVal ) { nValue = rVal; }
+};
+
+class SwInvertGrf: public SfxBoolItem
+{
+public:
+ SwInvertGrf( sal_Bool bVal = sal_False )
+ : SfxBoolItem( RES_GRFATR_INVERT, bVal )
+ {}
+
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+class SwTransparencyGrf : public SfxByteItem
+{
+public:
+ SwTransparencyGrf( sal_Int8 nVal = 0 )
+ : SfxByteItem( RES_GRFATR_TRANSPARENCY, nVal )
+ {}
+
+ // pure virtual-Methiden from SfxInt16Item
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ 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 );
+};
+
+class SW_DLLPUBLIC SwDrawModeGrf : public SfxEnumItem
+{
+public:
+ SwDrawModeGrf( USHORT nMode = 0 )
+ : SfxEnumItem( RES_GRFATR_DRAWMODE, nMode )
+ {}
+
+ // pure virtual-Methoden von SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ // pure virtual-Methiden von SfxEnumItem
+ virtual USHORT GetValueCount() const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ 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 );
+};
+
+
+
+/******************************************************************************
+ * Implementierung der GrafikAttribut Methoden vom SwAttrSet
+ ******************************************************************************/
+
+inline const SwMirrorGrf &SwAttrSet::GetMirrorGrf(BOOL bInP) const
+ { return (const SwMirrorGrf&)Get( RES_GRFATR_MIRRORGRF,bInP); }
+inline const SwCropGrf &SwAttrSet::GetCropGrf(BOOL bInP) const
+ { return (const SwCropGrf&)Get( RES_GRFATR_CROPGRF,bInP); }
+inline const SwRotationGrf &SwAttrSet::GetRotationGrf(BOOL bInP) const
+ { return (const SwRotationGrf&)Get( RES_GRFATR_ROTATION,bInP); }
+inline const SwLuminanceGrf &SwAttrSet::GetLuminanceGrf(BOOL bInP) const
+ { return (const SwLuminanceGrf&)Get( RES_GRFATR_LUMINANCE,bInP); }
+inline const SwContrastGrf &SwAttrSet::GetContrastGrf(BOOL bInP) const
+ { return (const SwContrastGrf&)Get( RES_GRFATR_CONTRAST,bInP); }
+inline const SwChannelRGrf &SwAttrSet::GetChannelRGrf(BOOL bInP) const
+ { return (const SwChannelRGrf&)Get( RES_GRFATR_CHANNELR,bInP); }
+inline const SwChannelGGrf &SwAttrSet::GetChannelGGrf(BOOL bInP) const
+ { return (const SwChannelGGrf&)Get( RES_GRFATR_CHANNELG,bInP); }
+inline const SwChannelBGrf &SwAttrSet::GetChannelBGrf(BOOL bInP) const
+ { return (const SwChannelBGrf&)Get( RES_GRFATR_CHANNELB,bInP); }
+inline const SwGammaGrf &SwAttrSet::GetGammaGrf(BOOL bInP) const
+ { return (const SwGammaGrf&)Get( RES_GRFATR_GAMMA,bInP); }
+inline const SwInvertGrf &SwAttrSet::GetInvertGrf(BOOL bInP) const
+ { return (const SwInvertGrf&)Get( RES_GRFATR_INVERT,bInP); }
+inline const SwTransparencyGrf &SwAttrSet::GetTransparencyGrf(BOOL bInP) const
+ { return (const SwTransparencyGrf&)Get( RES_GRFATR_TRANSPARENCY,bInP); }
+inline const SwDrawModeGrf &SwAttrSet::GetDrawModeGrf(BOOL bInP) const
+ { return (const SwDrawModeGrf&)Get( RES_GRFATR_DRAWMODE,bInP); }
+
+/******************************************************************************
+ * Implementierung der GrafikAttribut Methoden vom SwFmt
+ ******************************************************************************/
+
+inline const SwMirrorGrf &SwFmt::GetMirrorGrf(BOOL bInP) const
+ { return aSet.GetMirrorGrf(bInP); }
+inline const SwCropGrf &SwFmt::GetCropGrf(BOOL bInP) const
+ { return aSet.GetCropGrf(bInP); }
+inline const SwRotationGrf &SwFmt::GetRotationGrf(BOOL bInP) const
+ { return aSet.GetRotationGrf(bInP); }
+inline const SwLuminanceGrf &SwFmt::GetLuminanceGrf(BOOL bInP) const
+ { return aSet.GetLuminanceGrf( bInP); }
+inline const SwContrastGrf &SwFmt::GetContrastGrf(BOOL bInP) const
+ { return aSet.GetContrastGrf( bInP); }
+inline const SwChannelRGrf &SwFmt::GetChannelRGrf(BOOL bInP) const
+ { return aSet.GetChannelRGrf( bInP); }
+inline const SwChannelGGrf &SwFmt::GetChannelGGrf(BOOL bInP) const
+ { return aSet.GetChannelGGrf( bInP); }
+inline const SwChannelBGrf &SwFmt::GetChannelBGrf(BOOL bInP) const
+ { return aSet.GetChannelBGrf( bInP); }
+inline const SwGammaGrf &SwFmt::GetGammaGrf(BOOL bInP) const
+ { return aSet.GetGammaGrf( bInP); }
+inline const SwInvertGrf &SwFmt::GetInvertGrf(BOOL bInP) const
+ { return aSet.GetInvertGrf( bInP); }
+inline const SwTransparencyGrf &SwFmt::GetTransparencyGrf(BOOL bInP) const
+ { return aSet.GetTransparencyGrf( bInP); }
+inline const SwDrawModeGrf &SwFmt::GetDrawModeGrf(BOOL bInP) const
+ { return aSet.GetDrawModeGrf(bInP); }
+
+
+#endif // _GRFATR_HXX
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
new file mode 100644
index 000000000000..8c43631aaf4e
--- /dev/null
+++ b/sw/inc/helpid.h
@@ -0,0 +1,983 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SOLAR_HRC
+#include <svl/solar.hrc>
+#endif
+
+#define HID_BASE HID_APP_START
+
+#define HID_BIB_BASE (HID_BASE + 1)
+#define HID_DBSEL (HID_BASE + 2)
+#define HID_DBEDIT (HID_BASE + 3)
+#define HID_PRINT_OPTION (HID_BASE + 4)
+#define HID_MERGE_PRINTMONITOR (HID_BASE + 5)
+#define HID_FLD_INPUT (HID_BASE + 6)
+#define HID_CONFIG_MISC (HID_BASE + 7)
+#define HID_CONFIG_PATH (HID_BASE + 8)
+#define HID_CONFIG_TB (HID_BASE + 9)
+#define HID_PG_FOOTNOTE (HID_BASE + 10)
+#define HID_FORMAT_GRAPHIC (HID_BASE + 11)
+#define HID_FILTERSTATUS (HID_BASE + 12)
+#define HID_DOCINFO_EDT (HID_BASE + 13)
+#define HID_DBLOGON (HID_BASE + 14)
+#define HID_MAC_ASSIGN (HID_BASE + 15)
+#define HID_CONFIG_MN (HID_BASE + 16)
+#define HID_PAPERSIZE (HID_BASE + 17)
+#define HID_PASSWD (HID_BASE + 18)
+#define HID_SPELLING_OPTIONS (HID_BASE + 19)
+#define HID_HYPHENATE_OPTIONS (HID_BASE + 20)
+#define HID_FORMAT_COLUMN (HID_BASE + 21)
+#define HID_CONFIG_SAVE (HID_BASE + 22)
+#define HID_NUM_NAMES (HID_BASE + 23)
+#define HID_SYMBOL_SELECT (HID_BASE + 24)
+#define HID_CONFIG_KY (HID_BASE + 25)
+#define HID_LINKEDIT (HID_BASE + 26)
+#define HID_GRAPHIC_PREVIEW (HID_BASE + 28)
+#define HID_DICTIONARY (HID_BASE + 29)
+#define HID_SET_STYLE (HID_BASE + 30)
+#define HID_RIBBONBAR (HID_BASE + 31)
+#define HID_STATUSLINE (HID_BASE + 32)
+#define HID_DOCBAR (HID_BASE + 33)
+#define HID_VRULER (HID_BASE + 34)
+#define HID_MAKRO_WINDOW (HID_BASE + 35)
+#define HID_ENVELOP_FORMAT (HID_BASE + 37)
+#define HID_ENVELOP_PRINTER (HID_BASE + 38)
+
+#define HID_HEADER_FOOTER_DLG (HID_BASE + 39)
+#define HID_GRID_DLG (HID_BASE + 40)
+#define HID_USER_ADDRESS_DLG (HID_BASE + 41)
+#define HID_SELECT_FAX_DLG (HID_BASE + 42)
+
+#define HID_LABEL_FORMAT (HID_BASE + 43)
+#define HID_BRSORT (HID_BASE + 44)
+#define HID_BRSEEK (HID_BASE + 45)
+#define HID_BRCFG (HID_BASE + 46)
+
+#define HID_FORMEDT_CONTENT (HID_BASE + 47)
+#define HID_FORMEDT_USER (HID_BASE + 48)
+#define HID_FORMEDT_INDEX (HID_BASE + 49)
+
+#define HID_SCRL_PAGEUP (HID_BASE + 50)
+#define HID_SCRL_PAGEDOWN (HID_BASE + 51)
+
+#define HID_DRAW_WIN (HID_BASE + 52)
+#define HID_EDIT_WIN (HID_BASE + 53)
+
+#define HID_INSERT_CTRL (HID_BASE + 54) // TbxControl Einfuegen
+#define HID_INSERT_OBJ_CTRL (HID_BASE + 55)
+#define HID_INSERT_FIELD_CTRL (HID_BASE + 56)
+
+#define HID_SOURCEVIEW (HID_BASE + 57)
+#define HID_TBL_OPT_CTRL (HID_BASE + 58)
+#define HID_AUTOFORMAT_CLB (HID_BASE + 59)
+
+#define HID_SCRL_NAVI (HID_BASE + 60)
+#define HID_NAVI_DRAG_HYP (HID_BASE + 61)
+#define HID_NAVI_DRAG_LINK (HID_BASE + 62)
+#define HID_NAVI_DRAG_COPY (HID_BASE + 63)
+#define HID_NAVI_OUTLINES (HID_BASE + 64)
+
+#define HID_AUTOFORMAT_EXEC (HID_BASE + 65)
+#define HID_AUTOFORMAT_CLOSE (HID_BASE + 66)
+
+#define HID_PAGEPREVIEW (HID_BASE + 67)
+#define HID_SOURCE_EDITWIN (HID_BASE + 68)
+
+// Dialog Help-IDs **********************************************************
+
+#define HID_CONVERT_FROM (HID_BASE + 200)
+#define HID_CONVERT_TO (HID_BASE + 201)
+#define HID_EDIT_POSTIT (HID_BASE + 202)
+#define HID_INSERT_CHART (HID_BASE + 203)
+#define HID_PAGE_PREVIEW (HID_BASE + 204)
+#define HID_INSERT_HYPERLINK (HID_BASE + 205)
+#define HID_NAVIGATOR_TREELIST (HID_BASE + 206)
+#define HID_DLG_CAPTION (HID_BASE + 207)
+#define HID_DLG_GLOSS_DECIDE (HID_BASE + 208)
+#define HID_NAVIGATOR_TOOLBOX (HID_BASE + 209)
+#define HID_NAVIGATOR_LISTBOX (HID_BASE + 210)
+#define HID_NUM_BULLET_DLG (HID_BASE + 211)
+#define HID_VS_SINGLENUM (HID_BASE + 212)
+#define HID_VS_NUM (HID_BASE + 213)
+#define HID_VS_BULLET (HID_BASE + 214)
+#define HID_VS_NUMBMP (HID_BASE + 215)
+#define HID_VS_RULER (HID_BASE + 216)
+#define HID_RULER_DIALOG (HID_BASE + 217)
+#define HID_INSERT_ABSTRACT (HID_BASE + 218)
+#define HID_NAVI_TBX1 (HID_BASE + 219)
+#define HID_NAVI_TBX2 (HID_BASE + 220)
+#define HID_NAVI_TBX3 (HID_BASE + 221)
+#define HID_NAVI_TBX4 (HID_BASE + 222)
+#define HID_NAVI_TBX5 (HID_BASE + 223)
+#define HID_NAVI_TBX6 (HID_BASE + 224)
+#define HID_NAVI_TBX7 (HID_BASE + 225)
+#define HID_NAVI_TBX8 (HID_BASE + 226)
+#define HID_NAVI_TBX9 (HID_BASE + 227)
+#define HID_NAVI_TBX10 (HID_BASE + 228)
+#define HID_NAVI_TBX11 (HID_BASE + 229)
+#define HID_NAVI_TBX12 (HID_BASE + 230)
+#define HID_NAVI_TBX13 (HID_BASE + 231)
+#define HID_NAVI_TBX14 (HID_BASE + 232)
+#define HID_NAVI_TBX15 (HID_BASE + 233)
+#define HID_NAVI_VS (HID_BASE + 234)
+#define HID_NUM_FORMAT_BTN (HID_BASE + 235)
+#define HID_PPREV_ZOOM (HID_BASE + 236)
+#define HID_NAVI_TBX16 (HID_BASE + 237)
+#define HID_LTEMPL_TEXT (HID_BASE + 238)
+#define HID_LTEMPL_FRAME (HID_BASE + 239)
+#define HID_LTEMPL_PAGE (HID_BASE + 240)
+#define HID_LTEMPL_OVERRIDE (HID_BASE + 241)
+#define HID_LTEMPL_TEMPLATES (HID_BASE + 242)
+#define HID_NAVI_TBX17 (HID_BASE + 243)
+#define HID_NAVI_TBX18 (HID_BASE + 244)
+#define HID_NAVI_TBX19 (HID_BASE + 245)
+#define HID_NAVI_TBX20 (HID_BASE + 246)
+#define HID_NAVI_TBX21 (HID_BASE + 247)
+#define HID_NAVI_TBX22 (HID_BASE + 248)
+#define HID_NAVI_TBX23 (HID_BASE + 249)
+#define HID_NAVI_TBX24 (HID_BASE + 250)
+#define HID_NAVIGATOR_GLOBAL_TOOLBOX (HID_BASE + 251)
+#define HID_NAVIGATOR_GLOB_TREELIST (HID_BASE + 252)
+#define HID_GLOS_GROUP_TREE (HID_BASE + 253)
+#define HID_GLBLTREE_UPDATE (HID_BASE + 254)
+#define HID_GLBLTREE_INSERT (HID_BASE + 255)
+#define HID_GLBLTREE_EDIT (HID_BASE + 256)
+#define HID_GLBLTREE_DEL (HID_BASE + 257)
+#define HID_GLBLTREE_INS_IDX (HID_BASE + 258)
+#define HID_GLBLTREE_INS_CNTIDX (HID_BASE + 259)
+#define HID_GLBLTREE_INS_USRIDX (HID_BASE + 260)
+#define HID_GLBLTREE_INS_FILE (HID_BASE + 261)
+#define HID_GLBLTREE_INS_NEW_FILE (HID_BASE + 262)
+#define HID_GLBLTREE_INS_TEXT (HID_BASE + 263)
+#define HID_GLBLTREE_UPD_SEL (HID_BASE + 264)
+#define HID_GLBLTREE_UPD_IDX (HID_BASE + 265)
+#define HID_GLBLTREE_UPD_LINK (HID_BASE + 266)
+#define HID_GLBLTREEUPD_ALL (HID_BASE + 267)
+#define HID_NUM_OUTL_NAMED_NUMS (HID_BASE + 268)
+#define HID_NUM_OUTL_NUM_SAVEAS (HID_BASE + 269)
+#define HID_NUM_NAMED_NUMS (HID_BASE + 270)
+#define HID_NUM_NUM_SAVEAS (HID_BASE + 271)
+#define HID_NUM_STD_NUMBER (HID_BASE + 272)
+#define HID_NUM_DEL_NUMBER (HID_BASE + 273)
+#define HID_NUM_STD_BULLET (HID_BASE + 274)
+#define HID_NUM_DEL_BULLET (HID_BASE + 275)
+#define HID_NAVI_CONTENT (HID_BASE + 276)
+#define HID_NAVI_GLOBAL (HID_BASE + 277)
+#define HID_LTEMPL_NUMBERING (HID_BASE + 278)
+#define HID_FLDVAR_APPLY (HID_BASE + 279)
+#define HID_FLDVAR_DELETE (HID_BASE + 280)
+#define HID_FLDEDT_ADDRESS (HID_BASE + 281)
+#define HID_SORT_ACTION (HID_BASE + 282)
+#define HID_SORT_AUTHOR (HID_BASE + 283)
+#define HID_SORT_DATE (HID_BASE + 284)
+#define HID_SORT_COMMENT (HID_BASE + 285)
+#define HID_SW_SORT_POSITION (HID_BASE + 286)
+#define HID_SYNC_BTN (HID_BASE + 287)
+#define HID_EDIT_COMMENT (HID_BASE + 288)
+#define HID_SEL_TEMPLATE (HID_BASE + 289)
+#define HID_DLG_SEQUENCE_OPTION (HID_BASE + 290)
+#define HID_DLG_FLDEDT_NEXT (HID_BASE + 291)
+#define HID_DLG_FLDEDT_PREV (HID_BASE + 292)
+#define HID_DLG_FLDEDT_ADDRESS (HID_BASE + 293)
+#define HID_DLG_PRV_PRT_OPTIONS (HID_BASE + 294)
+
+#define HID_FILEDLG_CHARDLG (HID_BASE + 295)
+#define HID_FILEDLG_LOADTEMPLATE (HID_BASE + 296)
+#define HID_FILEDLG_ROMENU (HID_BASE + 297)
+#define HID_FILEDLG_MAILMRGE1 (HID_BASE + 298)
+#define HID_FILEDLG_MAILMRGE2 (HID_BASE + 299)
+#define HID_FILEDLG_FRMPAGE (HID_BASE + 300)
+#define HID_FILEDLG_SRCVIEW (HID_BASE + 301)
+#define HID_FILEDLG_WIZDOKU (HID_BASE + 302)
+#define HID_PREVIEW_ZOOM (HID_BASE + 303)
+
+#define HID_REDLINE_AUTOFMT_ACCEPT (HID_BASE + 304)
+#define HID_MULTI_TOX_DLG (HID_BASE + 305)
+#define HID_ASCII_FILTER (HID_BASE + 306)
+#define HID_GLBLTREE_EDIT_LINK (HID_BASE + 307)
+#define HID_FORMAT_NAME_OBJECT_NAME (HID_BASE + 308)// #100286#
+#define HID_REFSELECTION_TOOLTIP (HID_BASE + 309) // #i83479#
+
+
+// TabPage Help-IDs *********************************************************
+
+#define HID_DROPCAPS (HID_BASE + 400)
+#define HID_FRM_EXT (HID_BASE + 401)
+#define HID_FRM_STD (HID_BASE + 402)
+#define HID_GRF_EXT (HID_BASE + 403)
+#define HID_COLUMN (HID_BASE + 404)
+#define HID_DOC_STAT (HID_BASE + 405)
+#define HID_MACROASSIGN (HID_BASE + 406)
+#define HID_FOOTNOTE_PAGE (HID_BASE + 407)
+#define HID_OPTDOCDISP_PAGE (HID_BASE + 408)
+#define HID_OPTGRID_PAGE (HID_BASE + 409)
+#define HID_OPTTEST_PAGE (HID_BASE + 410)
+#define HID_OPTPRINT_PAGE (HID_BASE + 411)
+#define HID_FORMAT_TABLE (HID_BASE + 412)
+#define HID_TABLE_COLUMN (HID_BASE + 413)
+#define HID_LAB_LAB (HID_BASE + 414)
+#define HID_LAB_PRT (HID_BASE + 415)
+#define HID_ENV_PRT (HID_BASE + 416)
+#define HID_LAB_FMT (HID_BASE + 417)
+#define HID_ENV_ENV (HID_BASE + 418)
+#define HID_ENV_FMT (HID_BASE + 419)
+#define HID_FRM_URL (HID_BASE + 421)
+#define HID_CHAR_URL (HID_BASE + 422)
+#define HID_CONTENT_OPT (HID_BASE + 423)
+#define HID_LAYOUT_OPT (HID_BASE + 424)
+#define HID_STD_FONT (HID_BASE + 425)
+#define HID_COND_COLL (HID_BASE + 426)
+#define HID_FRM_ADD (HID_BASE + 427)
+#define HID_TABLE_TEXTFLOW (HID_BASE + 428)
+#define HID_AUTOFMT_BY_INPUT (HID_BASE + 429)
+#define HID_AUTOFMT_APPLY (HID_BASE + 430)
+#define HID_OPTTABLE_PAGE (HID_BASE + 431)
+#define HID_PICK_SINGLE_NUM (HID_BASE + 432)
+#define HID_PICK_BULLET (HID_BASE + 433)
+#define HID_PICK_NUM (HID_BASE + 434)
+#define HID_PICK_BMP (HID_BASE + 435)
+
+#define HID_FLD_DB (HID_BASE + 437)
+#define HID_FLD_DOKINF (HID_BASE + 438)
+#define HID_FLD_VAR (HID_BASE + 439)
+#define HID_FLD_DOK (HID_BASE + 440)
+#define HID_FLD_FUNC (HID_BASE + 441)
+#define HID_FLD_REF (HID_BASE + 442)
+#define HID_OPTSHDWCRSR (HID_BASE + 443)
+#define HID_NUM_OPTIONS (HID_BASE + 444)
+#define HID_NUM_POSITION (HID_BASE + 445)
+#define HID_NUMPARA (HID_BASE + 446)
+#define HID_FOOTNOTE_OPTIONS (HID_BASE + 447)
+#define HID_ENDNOTE_OPTIONS (HID_BASE + 448)
+#define HID_REDLINE_OPT (HID_BASE + 449)
+#define HID_LINENUMBERING (HID_BASE + 450)
+#define HID_REDLINE_ACCEPT (HID_BASE + 451)
+#define HID_EDIT_FLD_DB (HID_BASE + 452)
+#define HID_EDIT_FLD_DOKINF (HID_BASE + 453)
+#define HID_EDIT_FLD_VAR (HID_BASE + 454)
+#define HID_EDIT_FLD_DOK (HID_BASE + 455)
+#define HID_EDIT_FLD_FUNC (HID_BASE + 456)
+#define HID_EDIT_FLD_REF (HID_BASE + 457)
+#define HID_REDLINE_CTRL (HID_BASE + 458)
+#define HID_TP_OUTLINE_NUM (HID_BASE + 459)
+#define HID_OPTINSERT_PAGE (HID_BASE + 460)
+#define HID_OPTCAPTION_PAGE (HID_BASE + 461)
+#define HID_OPTLOAD_PAGE (HID_BASE + 462)
+#define HID_INSERT_TOX_PAGE (HID_BASE + 463)
+#define HID_TOX_FORM_ENTRY_PAGE (HID_BASE + 464)
+#define HID_TOX_FORM_STYLES_PAGE (HID_BASE + 465)
+#define HID_INSERT_TOX_TABDLG (HID_BASE + 466)
+#define HID_INSERT_SECTION_PAGE (HID_BASE + 467)
+#define HID_INSERT_SECTION_DLG (HID_BASE + 468)
+#define HID_SECTION_PROPERTIES_DLG (HID_BASE + 469)
+#define HID_RENAME_XNAMED (HID_BASE + 470)
+#define HID_TP_TOX_SELECT (HID_BASE + 471)
+#define HID_TP_TOX_ENTRY (HID_BASE + 472)
+#define HID_TOX_STYLES_PAGE (HID_BASE + 473)
+#define HID_TP_VISITING_CARDS (HID_BASE + 474)
+#define HID_DLG_ADD_IDX_STYLES (HID_BASE + 475)
+#define HID_ADD_STYLES_TLB (HID_BASE + 476)
+#define HID_OLE_CHECKLB (HID_BASE + 477)
+#define HID_DLG_CREATE_AUTH_ENTRY (HID_BASE + 478)
+#define HID_TP_PRIVATE_DATA (HID_BASE + 479)
+
+#define HID_TP_BUSINESS_DATA (HID_BASE + 480)
+#define HID_SECTION_FTNENDNOTES_PAGE (HID_BASE + 481)
+#define HID_TEXTGRID_PAGE (HID_BASE + 482)
+#define HID_OPTCOMPATIBILITY_PAGE (HID_BASE + 483)
+#define HID_COMPATIBILITY_OPTIONS_BOX (HID_BASE + 484)
+
+// AutoPilot Help-IDs *********************************************************
+
+#define HID_LETTER_PAGE1 (HID_BASE + 501)
+#define HID_LETTER_PAGE2 (HID_BASE + 502)
+#define HID_LETTER_PAGE3 (HID_BASE + 503)
+#define HID_LETTER_PAGE4 (HID_BASE + 504)
+#define HID_LETTER_PAGE5 (HID_BASE + 505)
+#define HID_LETTER_PAGE6 (HID_BASE + 506)
+#define HID_LETTER_PAGE7 (HID_BASE + 507)
+#define HID_LETTER_PAGE8 (HID_BASE + 508)
+#define HID_LETTER_PAGE9 (HID_BASE + 509)
+
+#define HID_FAX_PAGE1 (HID_BASE + 511)
+#define HID_FAX_PAGE2 (HID_BASE + 512)
+#define HID_FAX_PAGE3 (HID_BASE + 513)
+#define HID_FAX_PAGE4 (HID_BASE + 514)
+#define HID_FAX_PAGE5 (HID_BASE + 515)
+#define HID_FAX_PAGE6 (HID_BASE + 516)
+#define HID_FAX_PAGE7 (HID_BASE + 517)
+#define HID_FAX_PAGE8 (HID_BASE + 518)
+
+#define HID_MEMO_PAGE1 (HID_BASE + 521)
+#define HID_MEMO_PAGE2 (HID_BASE + 522)
+#define HID_MEMO_PAGE3 (HID_BASE + 523)
+#define HID_MEMO_PAGE4 (HID_BASE + 524)
+#define HID_MEMO_PAGE5 (HID_BASE + 525)
+
+#define HID_AGENDA_PAGE1 (HID_BASE + 531)
+#define HID_AGENDA_PAGE2 (HID_BASE + 532)
+#define HID_AGENDA_PAGE3 (HID_BASE + 533)
+#define HID_AGENDA_PAGE4 (HID_BASE + 534)
+#define HID_AGENDA_PAGE5 (HID_BASE + 535)
+#define HID_AGENDA_PAGE6 (HID_BASE + 536)
+
+#define HID_AUTOPILOT_NEXT (HID_BASE + 537)
+#define HID_AUTOPILOT_PREV (HID_BASE + 538)
+#define HID_AUTOPILOT_OK (HID_BASE + 539)
+
+// HelpIds fuers Menue *****************************************************
+
+#define HID_MN_SUB_TBLROW (HID_BASE + 600)
+#define HID_MN_SUB_TBLCOL (HID_BASE + 601)
+#define HID_MN_SUB_AUTOFORMAT (HID_BASE + 602)
+#define HID_MN_SUB_TOOLBAR (HID_BASE + 603)
+#define HID_MN_SUB_FIELD (HID_BASE + 604)
+#define HID_MN_SUB_GRAPHIC (HID_BASE + 605)
+#define HID_MN_SUB_TEMPLATES (HID_BASE + 606)
+#define HID_MN_SUB_ARRANGE (HID_BASE + 607)
+#define HID_MN_SUB_SPELLING (HID_BASE + 608)
+#define HID_MN_SUB_UPDATE (HID_BASE + 609)
+#define HID_MN_SUB_MIRROR (HID_BASE + 610)
+#define HID_MN_SUB_ALIGN (HID_BASE + 611)
+#define HID_MN_SUB_OPTIONS (HID_BASE + 612)
+
+#define HID_MN_CALC_PHD (HID_BASE + 613)
+#define HID_MN_CALC_SQRT (HID_BASE + 614)
+#define HID_MN_CALC_OR (HID_BASE + 615)
+#define HID_MN_CALC_XOR (HID_BASE + 616)
+#define HID_MN_CALC_AND (HID_BASE + 617)
+#define HID_MN_CALC_NOT (HID_BASE + 618)
+#define HID_MN_CALC_EQ (HID_BASE + 619)
+#define HID_MN_CALC_NEQ (HID_BASE + 620)
+#define HID_MN_CALC_LEQ (HID_BASE + 621)
+#define HID_MN_CALC_GEQ (HID_BASE + 622)
+#define HID_MN_CALC_LES (HID_BASE + 623)
+#define HID_MN_CALC_GRE (HID_BASE + 624)
+#define HID_MN_CALC_SUM (HID_BASE + 625)
+#define HID_MN_CALC_MEAN (HID_BASE + 626)
+#define HID_MN_CALC_MIN (HID_BASE + 627)
+#define HID_MN_CALC_MAX (HID_BASE + 628)
+#define HID_MN_CALC_SIN (HID_BASE + 629)
+#define HID_MN_CALC_COS (HID_BASE + 630)
+#define HID_MN_CALC_TAN (HID_BASE + 631)
+#define HID_MN_CALC_ASIN (HID_BASE + 632)
+#define HID_MN_CALC_ACOS (HID_BASE + 633)
+#define HID_MN_CALC_ATAN (HID_BASE + 634)
+#define HID_MN_CALC_POW (HID_BASE + 635)
+#define HID_MN_CALC_LISTSEP (HID_BASE + 636)
+#define HID_MN_POP_OPS (HID_BASE + 637)
+#define HID_MN_POP_STATISTICS (HID_BASE + 638)
+#define HID_MN_POP_FUNC (HID_BASE + 639)
+#define HID_MN_RSC_END (HID_BASE + 640)
+#define HID_MN_CALC_ROUND (HID_BASE + 641)
+#define HID_MN_SUB_MACRO (HID_BASE + 642)
+
+#define HID_MN_READONLY_SAVEGRAPHIC (HID_BASE + 645)
+#define HID_MN_READONLY_GRAPHICTOGALLERY (HID_BASE + 646)
+#define HID_MN_READONLY_TOGALLERYLINK (HID_BASE + 647)
+#define HID_MN_READONLY_TOGALLERYCOPY (HID_BASE + 648)
+#define HID_MN_READONLY_SAVEBACKGROUND (HID_BASE + 649)
+#define HID_MN_READONLY_BACKGROUNDTOGALLERY (HID_BASE + 650)
+#define HID_MN_READONLY_COPYLINK (HID_BASE + 651)
+#define HID_MN_READONLY_COPYGRAPHIC (HID_BASE + 652)
+#define HID_MN_READONLY_LOADGRAPHIC (HID_BASE + 653)
+#define HID_MN_READONLY_GRAPHICOFF (HID_BASE + 654)
+#define HID_MN_READONLY_PLUGINOFF (HID_BASE + 655)
+
+#define HID_MD_GLOS_DEFINE (HID_BASE + 656)
+#define HID_MD_GLOS_REPLACE (HID_BASE + 657)
+#define HID_MD_GLOS_RENAME (HID_BASE + 658)
+#define HID_MD_GLOS_DELETE (HID_BASE + 659)
+#define HID_MD_GLOS_EDIT (HID_BASE + 660)
+#define HID_MD_GLOS_MACRO (HID_BASE + 661)
+#define HID_LINGU_ADD_WORD (HID_BASE + 662)
+#define HID_LINGU_IGNORE_WORD (HID_BASE + 663)
+#define HID_LINGU_SPELLING_DLG (HID_BASE + 664)
+#define HID_LINGU_AUTOCORR (HID_BASE + 665)
+#define HID_LINGU_REPLACE (HID_BASE + 666)
+#define HID_MD_GLOS_CATEGORY (HID_BASE + 667)
+#define HID_REGION_TREE (HID_BASE + 668)
+#define HID_LINGU_WORD_LANGUAGE (HID_BASE + 669)
+#define HID_LINGU_PARA_LANGUAGE (HID_BASE + 670)
+#define HID_MD_GLOS_DEFINE_TEXT (HID_BASE + 671)
+#define HID_DLG_PASSWD_SECTION (HID_BASE + 672)
+#define HID_MD_COPY_TO_CLIPBOARD (HID_BASE + 673)
+#define HID_MD_GLOS_IMPORT (HID_BASE + 674)
+#define HID_SMARTTAG_MAIN (HID_BASE + 675) // SMARTTAGS
+#define HID_LINGU_IGNORE_SELECTION (HID_BASE + 676) // grammar check context menu
+
+// Weiter Help-IDs **********************************************************
+
+#define HID_CLOSE_FILE (HID_BASE + 1001)
+#define HID_LAUNCH_REGISTRY (HID_BASE + 1002)
+#define HID_MERGE_FILE (HID_BASE + 1003)
+#define HID_MERGE_FILE_DLG (HID_BASE + 1004)
+#define HID_NEW_FILE (HID_BASE + 1005)
+#define HID_OPEN_FILE (HID_BASE + 1007)
+#define HID_OPEN_LASTVERSION (HID_BASE + 1009)
+#define HID_PRINT_FILE (HID_BASE + 1010)
+#define HID_PRINT_FILE_OPTIONS (HID_BASE + 1011)
+#define HID_SAVE_FILE_AS (HID_BASE + 1012)
+#define HID_SAVE_FILE (HID_BASE + 1013)
+#define HID_SETUP_PRINTER_DLG (HID_BASE + 1015)
+#define HID_EXIT (HID_BASE + 1017)
+#define HID_CREATE_DOCUMENT (HID_BASE + 1019)
+#define HID_DOCSTAT_DLG (HID_BASE + 1020)
+#define HID_LOAD_TEMPLATE_DLG (HID_BASE + 1021)
+#define HID_SAVE_ALL (HID_BASE + 1023)
+#define HID_NEW_FILE_DEFAULT (HID_BASE + 1024)
+#define HID_PRINT_FILE_DEFAULT (HID_BASE + 1025)
+#define HID_FAX (HID_BASE + 1028)
+#define HID_SELECT_DATABASE (HID_BASE + 1030)
+#define HID_DOC_INFO_DLG (HID_BASE + 1031)
+#define HID_DOC_MGR_DLG (HID_BASE + 1032)
+#define HID_OPTCAPTION_CLB (HID_BASE + 1033)
+
+#define HID_COPY (HID_BASE + 1102)
+#define HID_CUT (HID_BASE + 1103)
+#define HID_EDIT_FIELD (HID_BASE + 1104)
+#define HID_EDIT_FILE_INFO_DLG (HID_BASE + 1107)
+#define HID_EDIT_LINK_DLG (HID_BASE + 1109)
+#define HID_EDIT_OBJECT (HID_BASE + 1110)
+#define HID_GOTO (HID_BASE + 1111)
+#define HID_SET_FIELD_VALUE (HID_BASE + 1112)
+#define HID_PASTE (HID_BASE + 1113)
+#define HID_REDO (HID_BASE + 1116)
+#define HID_SEARCH (HID_BASE + 1117)
+#define HID_REPLACE (HID_BASE + 1118)
+#define HID_SELECT_ALL (HID_BASE + 1119)
+#define HID_UNDO (HID_BASE + 1120)
+#define HID_REPEAT (HID_BASE + 1122)
+#define HID_BUFFER_UPDATE (HID_BASE + 1124)
+#define HID_UPDATE_FIELDS (HID_BASE + 1126)
+#define HID_EXECUTE_MACROFIELD (HID_BASE + 1127)
+#define HID_EDIT_FORMULA (HID_BASE + 1128)
+#define HID_CALC_TABLE (HID_BASE + 1129)
+#define HID_NUM_BULLET_DOWN (HID_BASE + 1130)
+#define HID_NUM_BULLET_UP (HID_BASE + 1131)
+#define HID_NUM_BULLET_PREV (HID_BASE + 1132)
+#define HID_NUM_BULLET_NEXT (HID_BASE + 1133)
+#define HID_NUM_BULLET_MOVEUP (HID_BASE + 1134)
+#define HID_NUM_BULLET_MOVEDOWN (HID_BASE + 1135)
+#define HID_NUM_BULLET_NONUM (HID_BASE + 1136)
+#define HID_NUM_BULLET_OFF (HID_BASE + 1137)
+#define HID_NUM_BULLET_ON (HID_BASE + 1138)
+#define HID_NUM_BULLET_OUTLINE_DOWN (HID_BASE + 1139)
+#define HID_NUM_BULLET_OUTLINE_UP (HID_BASE + 1140)
+#define HID_NUM_BULLET_OUTLINE_MOVEUP (HID_BASE + 1141)
+#define HID_NUM_BULLET_OUTLINE_MOVEDOWN (HID_BASE + 1142)
+#define HID_UPDATE_INPUTFIELDS (HID_BASE + 1143)
+#define HID_NUM_NUMBERING_ON (HID_BASE + 1144)
+#define HID_REPEAT_SEARCH (HID_BASE + 1150)
+#define HID_REPAGINATE (HID_BASE + 1161)
+
+#define HID_REFRESH_VIEW (HID_BASE + 1201)
+#define HID_RIBBON (HID_BASE + 1210)
+#define HID_RULER (HID_BASE + 1211)
+#define HID_STATUSBAR (HID_BASE + 1212)
+#define HID_TOOLBOX (HID_BASE + 1213)
+#define HID_VIEW_BOUNDS (HID_BASE + 1214)
+#define HID_VIEW_FIELDS (HID_BASE + 1215)
+#define HID_VLINEAL (HID_BASE + 1216)
+#define HID_VSCROLLBAR (HID_BASE + 1217)
+#define HID_HSCROLLBAR (HID_BASE + 1218)
+#define HID_VIEW_META_CHARS (HID_BASE + 1224)
+#define HID_VIEW_MARKS (HID_BASE + 1225)
+#define HID_VIEW_FIELDNAME (HID_BASE + 1226)
+#define HID_VIEW_TABLEGRID (HID_BASE + 1227)
+#define HID_ZOOM (HID_BASE + 1231)
+
+#define HID_DELETE_BOOKMARK (HID_BASE + 1301)
+#define HID_INSERT_BREAK (HID_BASE + 1303)
+#define HID_INSERT_COLUMN_BREAK (HID_BASE + 1305)
+#define HID_INSERT_FILE (HID_BASE + 1309)
+#define HID_INSERT_FOOTNOTE (HID_BASE + 1311)
+#define HID_INSERT_GRAFIC (HID_BASE + 1315)
+#define HID_INSERT_LINEBREAK (HID_BASE + 1318)
+#define HID_INSERT_MERGEFIELD_DLG (HID_BASE + 1320)
+#define HID_INSERT_OBJECT_DLG (HID_BASE + 1322)
+#define HID_INSERT_PAGEBREAK (HID_BASE + 1323)
+#define HID_INSERT_RECORD (HID_BASE + 1326)
+#define HID_MERGE_RECORD (HID_BASE + 1327)
+#define HID_INSERT_SYMBOL (HID_BASE + 1328)
+#define HID_INSERT_STRING (HID_BASE + 1331)
+#define HID_INSERT_COLS (HID_BASE + 1332)
+#define HID_INSERT_FRAME_INTERACT (HID_BASE + 1333)
+#define HID_INSERT_FRAME (HID_BASE + 1334)
+#define HID_INSERT_IDX_ENTRY (HID_BASE + 1340)
+#define HID_INSERT_USERIDX_ENTRY (HID_BASE + 1341)
+#define HID_INSERT_CNTNTIDX_ENTRY (HID_BASE + 1342)
+#define HID_INSERT_SOFT_HYPHEN (HID_BASE + 1350)
+#define HID_INSERT_HARD_SPACE (HID_BASE + 1351)
+
+#define HID_SET_FONT (HID_BASE + 1401)
+#define HID_SET_FONT_SIZE (HID_BASE + 1402)
+#define HID_GROW_FONT_SIZE (HID_BASE + 1403)
+#define HID_SHRINK_FONT_SIZE (HID_BASE + 1404)
+#define HID_SET_BOLD (HID_BASE + 1405)
+#define HID_SET_ITALIC (HID_BASE + 1406)
+#define HID_SET_SHADOW (HID_BASE + 1407)
+#define HID_SET_OUTLINE (HID_BASE + 1408)
+#define HID_SET_UNDERLINE (HID_BASE + 1409)
+#define HID_SET_STRIKEOUT (HID_BASE + 1410)
+#define HID_SET_SUPER_SCRIPT (HID_BASE + 1411)
+#define HID_SET_SUB_SCRIPT (HID_BASE + 1412)
+#define HID_SET_COLOR (HID_BASE + 1413)
+#define HID_SET_CASEMAP (HID_BASE + 1414)
+#define HID_SET_LANGUAGE (HID_BASE + 1415)
+#define HID_SET_KERNING (HID_BASE + 1416)
+#define HID_INDENT_TO_TABSTOP (HID_BASE + 1417)
+#define HID_SET_LEFT_PARA (HID_BASE + 1418)
+#define HID_SET_RIGHT_PARA (HID_BASE + 1419)
+#define HID_SET_CENTER_PARA (HID_BASE + 1420)
+#define HID_SET_JUSTIFY_PARA (HID_BASE + 1421)
+#define HID_SET_LINE_SPACE_1 (HID_BASE + 1422)
+#define HID_SET_LINE_SPACE_15 (HID_BASE + 1423)
+#define HID_SET_LINE_SPACE_2 (HID_BASE + 1424)
+#define HID_FLIP_HORZ_GRAFIC (HID_BASE + 1425)
+#define HID_FLIP_VERT_GRAFIC (HID_BASE + 1426)
+#define HID_SET_ADJUST (HID_BASE + 1428)
+#define HID_SET_LRMARGIN (HID_BASE + 1429)
+#define HID_SET_ULMARGIN (HID_BASE + 1430)
+#define HID_UNINDENT_TO_TABSTOP (HID_BASE + 1431)
+#define HID_SET_HYPHEN_ZONE (HID_BASE + 1432)
+#define HID_SET_PAGE_BREAK (HID_BASE + 1433)
+#define HID_SET_KEEP_TOGETHER (HID_BASE + 1434)
+#define HID_SET_WIDOW (HID_BASE + 1436)
+#define HID_SET_ORPHAN (HID_BASE + 1437)
+#define HID_FORMAT_SHADOW (HID_BASE + 1438)
+#define HID_FORMAT_BORDER (HID_BASE + 1439)
+#define HID_FORMAT_CHAR_DLG (HID_BASE + 1441)
+#define HID_FORMAT_PARA_DLG (HID_BASE + 1443)
+#define HID_FORMAT_TAB (HID_BASE + 1444)
+#define HID_FORMAT_TAB_DLG (HID_BASE + 1445)
+#define HID_FORMAT_BORDER_DLG (HID_BASE + 1447)
+#define HID_FORMAT_BACKGROUND (HID_BASE + 1448)
+#define HID_FORMAT_BACKGROUND_DLG (HID_BASE + 1450)
+#define HID_FORMAT_PAGE (HID_BASE + 1451)
+#define HID_FORMAT_PAGE_DLG (HID_BASE + 1452)
+#define HID_FORMAT_DROPCAPS (HID_BASE + 1454)
+#define HID_FORMAT_FRAME_DLG (HID_BASE + 1456)
+#define HID_FORMAT_GRAFIC_DLG (HID_BASE + 1458)
+#define HID_FORMAT_TABLE_DLG (HID_BASE + 1460)
+#define HID_NEW_STYLE_BY_EXAMPLE (HID_BASE + 1462)
+#define HID_UPDATE_STYLE_BY_EXAMPLE (HID_BASE + 1463)
+#define HID_STYLE_SHEET_FRAME_DLG (HID_BASE + 1464)
+#define HID_STYLE_SHEET_DOC_DLG (HID_BASE + 1465)
+#define HID_FORMAT_RESET (HID_BASE + 1469)
+#define HID_FRAME_TO_TOP (HID_BASE + 1470)
+#define HID_FRAME_TO_BOTTOM (HID_BASE + 1471)
+#define HID_FRAME_NOWRAP (HID_BASE + 1472)
+#define HID_FRAME_WRAP (HID_BASE + 1473)
+#define HID_FRAME_WRAPTHRU (HID_BASE + 1474)
+#define HID_FRAME_ALIGN_HORZ_LEFT (HID_BASE + 1475)
+#define HID_FRAME_ALIGN_HORZ_RIGHT (HID_BASE + 1476)
+#define HID_FRAME_ALIGN_HORZ_CENTER (HID_BASE + 1477)
+#define HID_FRAME_ALIGN_VERT_TOP (HID_BASE + 1478)
+#define HID_FRAME_ALIGN_VERT_BOTTOM (HID_BASE + 1479)
+#define HID_FRAME_ALIGN_VERT_CENTER (HID_BASE + 1480)
+#define HID_SET_FRM_SIZE (HID_BASE + 1481)
+#define HID_SET_FRM_POSITION (HID_BASE + 1482)
+#define HID_SET_FRM_ANCHOR (HID_BASE + 1483)
+#define HID_SET_FRM_WRAP (HID_BASE + 1484)
+#define HID_SET_FRM_DIST (HID_BASE + 1485)
+#define HID_SET_FRM_OPTIONS (HID_BASE + 1486)
+#define HID_SET_GRF_MIRROR (HID_BASE + 1488)
+#define HID_SET_TABLE_WIDTH (HID_BASE + 1489)
+#define HID_SET_TABLE_ALIGN (HID_BASE + 1490)
+#define HID_SET_CHAR_STYLE (HID_BASE + 1491)
+#define HID_SET_PARA_STYLE (HID_BASE + 1492)
+#define HID_SET_PAGE_STYLE (HID_BASE + 1493)
+#define HID_SET_FRM_MACRO (HID_BASE + 1494)
+#define HID_SET_FRM_COLUMNS (HID_BASE + 1495)
+#define HID_SET_FRM_COLUMN_WIDTH (HID_BASE + 1496)
+#define HID_UPDATE_STYLES_DIRECT (HID_BASE + 1497)
+
+#define HID_TABLE_INSERT_ROW (HID_BASE + 1501)
+#define HID_TABLE_DELETE_ROW (HID_BASE + 1503)
+#define HID_TABLE_DELETE_COL (HID_BASE + 1504)
+#define HID_TABLE_MERGE_CELLS (HID_BASE + 1506)
+#define HID_AUTOFMT_TABLE (HID_BASE + 1507)
+#define HID_SWDLG_STRINPUT (HID_BASE + 1508)
+#define HID_TABLE_SET_ULSPACE (HID_BASE + 1509)
+#define HID_TABLE_SET_GRID (HID_BASE + 1510)
+#define HID_TABLE_SET_SHADOW (HID_BASE + 1511)
+#define HID_TABLE_SELECT_ROW (HID_BASE + 1513)
+#define HID_TABLE_SELECT_COL (HID_BASE + 1514)
+#define HID_TABLE_SELECT_ALL (HID_BASE + 1515)
+#define HID_TABLE_SET_READ_ONLY_CELLS (HID_BASE + 1517)
+#define HID_TABLE_UNSET_READ_ONLY_CELLS (HID_BASE + 1519)
+#define HID_PAGE_STYLE_SET_COLS (HID_BASE + 1538)
+#define HID_SET_PROP_LINE_SPACE (HID_BASE + 1540)
+#define HID_SET_ABS_LINE_SPACE (HID_BASE + 1541)
+
+#define HID_SPELLING_DLG (HID_BASE + 1601)
+#define HID_THESAURUS_DLG (HID_BASE + 1604)
+#define HID_HYPHENATE_OPT_DLG (HID_BASE + 1607)
+#define HID_SORTING (HID_BASE + 1613)
+#define HID_SORTING_DLG (HID_BASE + 1614)
+#define HID_CALCULATE (HID_BASE + 1615)
+#define HID_RECORD_MACRO_DLG (HID_BASE + 1622)
+#define HID_PLAY_MACRO_DLG (HID_BASE + 1624)
+#define HID_CONFIG_DLG (HID_BASE + 1627)
+#define HID_EXPAND_GLOSSARY (HID_BASE + 1628)
+#define HID_RENAME_GLOSSARY (HID_BASE + 1629)
+#define HID_CONFIG_MENU (HID_BASE + 1630)
+#define HID_CONFIG_KEY (HID_BASE + 1631)
+#define HID_ASSIGN_LOCAL_MACRO_DLG (HID_BASE + 1632)
+#define HID_COMPILE_MACRO (HID_BASE + 1633)
+#define HID_CONFIG_VIEWOPTIONS (HID_BASE + 1635)
+#define HID_CONFIG_COLORS (HID_BASE + 1636)
+#define HID_INSERT_GLOSSARY (HID_BASE + 1640)
+#define HID_AUTO_CORRECT (HID_BASE + 1649)
+#define HID_AUTO_CORRECT_DLG (HID_BASE + 1650)
+#define HID_HELP_PI (HID_BASE + 1655)
+#define HID_NAVIGATION_PI (HID_BASE + 1656)
+#define HID_TEMPLATE_PI (HID_BASE + 1657)
+#define HID_ADDR_PI (HID_BASE + 1658)
+#define HID_NAVIGATION_PI_GOTO_PAGE (HID_BASE + 1659)
+#define HID_LETTER_WIZZARD (HID_BASE + 1660)
+#define HID_FAX_WIZZARD (HID_BASE + 1661)
+#define HID_MEMO_WIZZARD (HID_BASE + 1662)
+#define HID_AGENDA_WIZZARD (HID_BASE + 1663)
+
+#define HID_NEW_WINDOW (HID_BASE + 1701)
+#define HID_ARRANGE_ALL_WIN (HID_BASE + 1702)
+#define HID_ARRANGE_CASCADE_WIN (HID_BASE + 1703)
+#define HID_ARRANGE_HORZ_WIN (HID_BASE + 1704)
+#define HID_ARRANGE_VERT_WIN (HID_BASE + 1705)
+
+#define HID_SHOW_HELP_INDEX (HID_BASE + 1802)
+#define HID_SHOW_KEYBOARD_HELP (HID_BASE + 1803)
+#define HID_SHOW_HELP_MANUAL (HID_BASE + 1804)
+#define HID_SHOW_UPDATE_HELP (HID_BASE + 1805)
+
+#define HID_CHAR_LEFT (HID_BASE + 1901)
+#define HID_CHAR_RIGHT (HID_BASE + 1902)
+#define HID_LINE_UP (HID_BASE + 1903)
+#define HID_LINE_DOWN (HID_BASE + 1904)
+#define HID_START_OF_LINE (HID_BASE + 1905)
+#define HID_END_OF_LINE (HID_BASE + 1906)
+#define HID_START_OF_DOCUMENT (HID_BASE + 1907)
+#define HID_END_OF_DOCUMENT (HID_BASE + 1908)
+#define HID_START_OF_NEXT_PAGE (HID_BASE + 1909)
+#define HID_END_OF_NEXT_PAGE (HID_BASE + 1910)
+#define HID_START_OF_PREV_PAGE (HID_BASE + 1911)
+#define HID_END_OF_PREV_PAGE (HID_BASE + 1912)
+#define HID_START_OF_PAGE (HID_BASE + 1913)
+#define HID_END_OF_PAGE (HID_BASE + 1914)
+#define HID_START_OF_COLUMN (HID_BASE + 1917)
+#define HID_END_OF_COLUMN (HID_BASE + 1918)
+#define HID_START_OF_PARA (HID_BASE + 1919)
+#define HID_END_OF_PARA (HID_BASE + 1920)
+#define HID_NEXT_WORD (HID_BASE + 1921)
+#define HID_PREV_WORD (HID_BASE + 1922)
+#define HID_NEXT_SENT (HID_BASE + 1923)
+#define HID_PREV_SENT (HID_BASE + 1924)
+#define HID_DELETE (HID_BASE + 1925)
+#define HID_BACKSPACE (HID_BASE + 1926)
+#define HID_DELETE_SENT (HID_BASE + 1927)
+#define HID_DELETE_BACK_SENT (HID_BASE + 1928)
+#define HID_DELETE_WORD (HID_BASE + 1929)
+#define HID_DELETE_BACK_WORD (HID_BASE + 1930)
+#define HID_DELETE_LINE (HID_BASE + 1931)
+#define HID_DELETE_BACK_LINE (HID_BASE + 1932)
+#define HID_DELETE_PARA (HID_BASE + 1933)
+#define HID_DELETE_BACK_PARA (HID_BASE + 1934)
+#define HID_DELETE_WHOLE_LINE (HID_BASE + 1935)
+#define HID_SET_INS_MODE (HID_BASE + 1936)
+#define HID_PAGEUP (HID_BASE + 1937)
+#define HID_PAGEDOWN (HID_BASE + 1938)
+#define HID_SET_ADD_MODE (HID_BASE + 1939)
+#define HID_SET_EXT_MODE (HID_BASE + 1940)
+#define HID_ESCAPE (HID_BASE + 1941)
+#define HID_SELECT_WORD (HID_BASE + 1943)
+#define HID_START_TABLE (HID_BASE + 1947)
+#define HID_END_TABLE (HID_BASE + 1948)
+#define HID_NEXT_TABLE (HID_BASE + 1949)
+#define HID_PREV_TABLE (HID_BASE + 1950)
+#define HID_START_OF_NEXT_COLUMN (HID_BASE + 1951)
+#define HID_END_OF_NEXT_COLUMN (HID_BASE + 1952)
+#define HID_START_OF_PREV_COLUMN (HID_BASE + 1953)
+#define HID_END_OF_PREV_COLUMN (HID_BASE + 1954)
+#define HID_FOOTNOTE_TO_ANCHOR (HID_BASE + 1955)
+#define HID_NEXT_FOOTNOTE (HID_BASE + 1956)
+#define HID_PREV_FOOTNOTE (HID_BASE + 1957)
+#define HID_CNTNT_TO_NEXT_FRAME (HID_BASE + 1958)
+#define HID_FRAME_TO_ANCHOR (HID_BASE + 1959)
+#define HID_TO_HEADER (HID_BASE + 1960)
+#define HID_TO_FOOTER (HID_BASE + 1961)
+#define HID_IDX_MARK_TO_IDX (HID_BASE + 1962)
+
+#define HID_ENVELOP (HID_BASE + 2050)
+#define HID_LABEL (HID_BASE + 2051)
+#define HID_ENVELOP_PRINT (HID_BASE + 2052)
+
+#define HID_NAVIGATION_IMGBTN (HID_BASE + 2054)
+#define HID_ENVELOP_INSERT (HID_BASE + 2055)
+
+#define HID_WEBTOOLS_TOOLBOX (HID_BASE + 2056)
+#define HID_WEBTEXT_TOOLBOX (HID_BASE + 2057)
+#define HID_WEBFRAME_TOOLBOX (HID_BASE + 2058)
+#define HID_TEXT_TOOLBOX (HID_BASE + 2059)
+#define HID_TABLE_TOOLBOX (HID_BASE + 2060)
+#define HID_FRAME_TOOLBOX (HID_BASE + 2061)
+#define HID_GRAFIK_TOOLBOX (HID_BASE + 2062)
+#define HID_OLE_TOOLBOX (HID_BASE + 2063)
+#define HID_DRAW_TOOLBOX (HID_BASE + 2064)
+#define HID_BEZIER_TOOLBOX (HID_BASE + 2066)
+#define HID_DRAW_TEXT_TOOLBOX (HID_BASE + 2067)
+#define HID_NUM_TOOLBOX (HID_BASE + 2068)
+#define HID_TOOLS_TOOLBOX (HID_BASE + 2069)
+#define HID_SRCVIEW_TOOLBOX (HID_BASE + 2070)
+
+#define HID_LABEL_INSERT (HID_BASE + 2071)
+#define HID_CALC_TOOLBOX (HID_BASE + 2072)
+#define HID_PVIEW_TOOLBOX (HID_BASE + 2073)
+
+#define HID_FIELD_INSERT (HID_BASE + 2074)
+#define HID_FIELD_CLOSE (HID_BASE + 2075)
+
+#define HID_COND_COLL_TABLIST (HID_BASE + 2076)
+
+#define HID_DB_SELECTION_TLB (HID_BASE + 2077)
+#define HID_FIELD_DINF_TYPE (HID_BASE + 2078)
+
+#define HID_DRAWFORM_TOOLBOX (HID_BASE + 2079)
+#define HID_SELECT_TEMPLATE (HID_BASE + 2080)
+
+#define HID_AP_INSERT_DB_SEL (HID_BASE + 2081)
+#define HID_WEBGRAPHIC_TOOLBOX (HID_BASE + 2082)
+#define HID_OUTLINE_FORM (HID_BASE + 2083)
+#define HID_NUM_RESET (HID_BASE + 2084)
+
+#define HID_AUTOFORMAT_REJECT (HID_BASE + 2085)
+#define HID_AUTOFORMAT_ACCEPT (HID_BASE + 2086)
+#define HID_AUTOFORMAT_EDIT_CHG (HID_BASE + 2087)
+
+//insert index/entries/Pattern buttons and edits
+#define HID_TOX_ENTRY_BUTTON (HID_BASE + 2088)
+#define HID_TOX_ENTRY_EDIT (HID_BASE + 2089)
+
+#define HID_DLG_NEW_USER_IDX (HID_BASE + 2090)
+#define HID_INSERT_IDX_MRK_OK (HID_BASE + 2091)
+#define HID_INSERT_IDX_MRK_CLOSE (HID_BASE + 2092)
+#define HID_INSERT_AUTH_MRK_OK (HID_BASE + 2093)
+#define HID_INSERT_AUTH_MRK_CLOSE (HID_BASE + 2094)
+#define HID_INSERT_IDX_MRK_DELETE (HID_BASE + 2095)
+#define HID_INSERT_IDX_MRK_NEW (HID_BASE + 2096)
+#define HID_INSERT_IDX_MRK_PREV (HID_BASE + 2097)
+#define HID_INSERT_IDX_MRK_PREV_SAME (HID_BASE + 2098)
+#define HID_INSERT_IDX_MRK_NEXT (HID_BASE + 2099)
+#define HID_INSERT_IDX_MRK_NEXT_SAME (HID_BASE + 2100)
+#define HID_INSERT_IDX_MRK_TYPE (HID_BASE + 2101)
+#define HID_INSERT_IDX_MRK_ENTRY (HID_BASE + 2102)
+#define HID_INSERT_IDX_MRK_PRIM_KEY (HID_BASE + 2103)
+#define HID_INSERT_IDX_MRK_SEC_KEY (HID_BASE + 2104)
+#define HID_INSERT_IDX_MRK_LEVEL (HID_BASE + 2105)
+#define HID_INSERT_IDX_MRK_MAIN_ENTRY (HID_BASE + 2106)
+#define HID_INSERT_IDX_MRK_APPLY_ALL (HID_BASE + 2107)
+#define HID_INSERT_AUTH_MRK_ENTRY (HID_BASE + 2108)
+#define HID_INSERT_AUTH_MRK_CREATE_ENTRY (HID_BASE + 2109)
+#define HID_INSERT_AUTH_MRK_EDIT_ENTRY (HID_BASE + 2110)
+#define HID_TOKEN_WINDOW (HID_BASE + 2111)
+
+#define HID_AUTH_FIELD_IDENTIFIER (HID_BASE + 2112 )
+#define HID_AUTH_FIELD_AUTHORITY_TYPE (HID_BASE + 2113 )
+#define HID_AUTH_FIELD_ADDRESS (HID_BASE + 2114 )
+#define HID_AUTH_FIELD_ANNOTE (HID_BASE + 2115 )
+#define HID_AUTH_FIELD_AUTHOR (HID_BASE + 2116 )
+#define HID_AUTH_FIELD_BOOKTITLE (HID_BASE + 2117 )
+#define HID_AUTH_FIELD_CHAPTER (HID_BASE + 2118 )
+#define HID_AUTH_FIELD_EDITION (HID_BASE + 2119 )
+#define HID_AUTH_FIELD_EDITOR (HID_BASE + 2120 )
+#define HID_AUTH_FIELD_HOWPUBLISHED (HID_BASE + 2121 )
+#define HID_AUTH_FIELD_INSTITUTION (HID_BASE + 2122 )
+#define HID_AUTH_FIELD_JOURNAL (HID_BASE + 2123 )
+#define HID_AUTH_FIELD_MONTH (HID_BASE + 2124 )
+#define HID_AUTH_FIELD_NOTE (HID_BASE + 2125 )
+#define HID_AUTH_FIELD_NUMBER (HID_BASE + 2126 )
+#define HID_AUTH_FIELD_ORGANIZATIONS (HID_BASE + 2127 )
+#define HID_AUTH_FIELD_PAGES (HID_BASE + 2128 )
+#define HID_AUTH_FIELD_PUBLISHER (HID_BASE + 2129 )
+#define HID_AUTH_FIELD_SCHOOL (HID_BASE + 2130 )
+#define HID_AUTH_FIELD_SERIES (HID_BASE + 2131 )
+#define HID_AUTH_FIELD_TITLE (HID_BASE + 2132 )
+#define HID_AUTH_FIELD_REPORT_TYPE (HID_BASE + 2133 )
+#define HID_AUTH_FIELD_VOLUME (HID_BASE + 2134 )
+#define HID_AUTH_FIELD_YEAR (HID_BASE + 2135 )
+#define HID_AUTH_FIELD_URL (HID_BASE + 2136 )
+#define HID_AUTH_FIELD_CUSTOM1 (HID_BASE + 2137 )
+#define HID_AUTH_FIELD_CUSTOM2 (HID_BASE + 2138 )
+#define HID_AUTH_FIELD_CUSTOM3 (HID_BASE + 2139 )
+#define HID_AUTH_FIELD_CUSTOM4 (HID_BASE + 2140 )
+#define HID_AUTH_FIELD_CUSTOM5 (HID_BASE + 2141 )
+#define HID_AUTH_FIELD_ISBN (HID_BASE + 2142 )
+
+#define HID_AUTH_MARK_DLG_FROM_COMP_RB (HID_BASE + 2143 )
+#define HID_AUTH_MARK_DLG_FROM_DOC_RB (HID_BASE + 2144 )
+#define HID_AUTH_MARK_DLG_ID_LISTBOX (HID_BASE + 2145 )
+
+#define HID_INSERT_INDEX_ENTRY_LEVEL_LB (HID_BASE + 2146 )
+#define HID_INSERT_IDX_MRK_SRCH_CASESENSITIVE (HID_BASE + 2147 )
+#define HID_INSERT_IDX_MRK_SRCH_WORDONLY (HID_BASE + 2148 )
+#define HID_DLG_CREATE_AUTOMARK (HID_BASE + 2149 )
+#define HID_BUSINESS_CARD_CONTENT (HID_BASE + 2150 )
+#define HID_SAVE_LABEL_DLG (HID_BASE + 2151 )
+#define HID_BUSINESS_FMT_PAGE (HID_BASE + 2152 )
+#define HID_BUSINESS_FMT_PAGE_CONT (HID_BASE + 2153 )
+#define HID_BUSINESS_FMT_PAGE_SHEET (HID_BASE + 2154 )
+#define HID_BUSINESS_FMT_PAGE_BRAND (HID_BASE + 2155 )
+#define HID_BUSINESS_FMT_PAGE_TYPE (HID_BASE + 2156 )
+#define HID_SEND_MASTER_DIALOG (HID_BASE + 2157 )
+#define HID_SEND_MASTER_CTRL_PUSHBUTTON_OK (HID_BASE + 2158 )
+#define HID_SEND_MASTER_CTRL_PUSHBUTTON_CANCEL (HID_BASE + 2159 )
+#define HID_SEND_MASTER_CTRL_LISTBOX_FILTER (HID_BASE + 2160 )
+#define HID_SEND_MASTER_CTRL_CONTROL_FILEVIEW (HID_BASE + 2161 )
+#define HID_SEND_MASTER_CTRL_EDIT_FILEURL (HID_BASE + 2162 )
+#define HID_SEND_MASTER_CTRL_CHECKBOX_AUTOEXTENSION (HID_BASE + 2163 )
+#define HID_SEND_MASTER_CTRL_LISTBOX_TEMPLATE (HID_BASE + 2164 )
+#define HID_SEND_MASTER_CTRL_DUMMY (HID_BASE + 2165 )
+
+#define HID_SEND_HTML_DIALOG (HID_BASE + 2166 )
+#define HID_SEND_HTML_CTRL_PUSHBUTTON_OK (HID_BASE + 2167 )
+#define HID_SEND_HTML_CTRL_PUSHBUTTON_CANCEL (HID_BASE + 2168 )
+#define HID_SEND_HTML_CTRL_LISTBOX_FILTER (HID_BASE + 2169 )
+#define HID_SEND_HTML_CTRL_CONTROL_FILEVIEW (HID_BASE + 2170 )
+#define HID_SEND_HTML_CTRL_EDIT_FILEURL (HID_BASE + 2171 )
+#define HID_SEND_HTML_CTRL_CHECKBOX_AUTOEXTENSION (HID_BASE + 2172 )
+#define HID_SEND_HTML_CTRL_LISTBOX_TEMPLATE (HID_BASE + 2173 )
+#define HID_SEND_HTML_CTRL_DUMMY (HID_BASE + 2174 )
+
+#define HID_INSERT_IDX_MRK_PHONETIC_READING (HID_BASE + 2175 )
+#define HID_COLUMN_VALUESET (HID_BASE + 2176 )
+#define HID_PVIEW_ZOOM_LB (HID_BASE + 2177 )
+#define HID_MAIL_MERGE_SELECT (HID_BASE + 2178 )
+#define HID_MAIL_MERGE_CREATE_FROM (HID_BASE + 2179 )
+#define HID_MAIL_MERGE_INSERT_FIELDS (HID_BASE + 2180 )
+#define HID_PRINT_AS_MERGE (HID_BASE + 2181 )
+#define HID_MERGE_SOURCE_UNAVAILABLE (HID_BASE + 2182 )
+#define HID_DATA_SOURCES_UNAVAILABLE (HID_BASE + 2183 )
+#define HID_MODULE_TOOLBOX (HID_BASE + 2184 )
+#define HID_SECTION_INDENTS_PAGE (HID_BASE + 2185 )
+
+#define HID_FLD_DROPDOWN (HID_BASE + 2186 )
+#define HID_MM_DOCSELECTPAGE (HID_BASE + 2187 )
+#define HID_MM_OUTPUTTYPEPAGE (HID_BASE + 2188 )
+#define HID_MM_ADDRESSBLOCKPAGE (HID_BASE + 2189 )
+#define HID_MM_GREETINGSPAGE (HID_BASE + 2190 )
+#define HID_MM_PREPAREMERGEPAGE (HID_BASE + 2191 )
+#define HID_MM_MERGEPAGE (HID_BASE + 2192 )
+#define HID_MM_OUTPUTPAGE (HID_BASE + 2193 )
+#define HID_MM_ADDRESSLISTDIALOG (HID_BASE + 2194 )
+#define HID_MM_SELECTDBTABLEDDIALOG (HID_BASE + 2195 )
+#define HID_MM_SELECTDBTABLEDDIALOG_LISTBOX (HID_BASE + 2196 )
+#define HID_MM_DBTABLEPREVIEWDIALOG (HID_BASE + 2197 )
+#define HID_MM_CREATEADDRESSLIST (HID_BASE + 2198 )
+#define HID_MM_FIND_ENTRY (HID_BASE + 2199 )
+#define HID_MM_ADD_RENAME_ENTRY (HID_BASE + 2200 )
+#define HID_MM_CUSTOMIZE_ADDRESS_LIST (HID_BASE + 2201 )
+#define HID_MM_CUSTOMIZEADDRESSBLOCK (HID_BASE + 2202 )
+#define HID_MM_SELECTADDRESSBLOCK (HID_BASE + 2203 )
+#define HID_MM_ASSIGNFIELDS (HID_BASE + 2204 )
+#define HID_MM_MAILNOTINSTALLED (HID_BASE + 2205 )
+#define HID_MM_LAYOUT_PAGE (HID_BASE + 2206 )
+#define HID_MM_COPYTO (HID_BASE + 2207 )
+#define HID_MM_ADDRESSLIST_HB (HID_BASE + 2208 )
+#define HID_MM_ADDRESSLIST_TLB (HID_BASE + 2209 )
+#define HID_TP_MAILCONFIG (HID_BASE + 2210 )
+#define HID_MM_TESTACCOUNTSETTINGS (HID_BASE + 2211 )
+#define HID_MM_TESTACCOUNTSETTINGS_TLB (HID_BASE + 2212 )
+#define HID_MM_TESTACCOUNTSETTINGS_HB (HID_BASE + 2213 )
+#define HID_MM_MAILBODY (HID_BASE + 2214 )
+#define HID_MM_SENDMAILS (HID_BASE + 2215 )
+#define HID_MM_SENDMAILS_STATUSLB (HID_BASE + 2216 )
+#define HID_MAILMERGECHILD (HID_BASE + 2217 )
+#define HID_MM_CUSTOMFIELDS (HID_BASE + 2218 )
+#define HID_DLG_WORDCOUNT (HID_BASE + 2219 )
+#define HID_MM_MAILSTATUS_TLB (HID_BASE + 2220 )
+#define HID_RETURN_TO_MAILMERGE (HID_BASE + 2221 )
+#define HID_MM_SAVEWARNING (HID_BASE + 2222 )
+#define HID_MM_QUERY (HID_BASE + 2223 )
+#define HID_MM_SENDWARNING (HID_BASE + 2224 )
+#define HID_MM_SERVERAUTHENTICATION (HID_BASE + 2225 )
+
+#define HID_MEDIA_TOOLBOX (HID_BASE + 2227)
+#define HID_NID_TBL (HID_BASE + 2228)
+#define HID_NID_FRM (HID_BASE + 2229)
+#define HID_NID_GRF (HID_BASE + 2230)
+#define HID_NID_OLE (HID_BASE + 2231)
+#define HID_NID_PGE (HID_BASE + 2232)
+#define HID_NID_OUTL (HID_BASE + 2233)
+#define HID_NID_MARK (HID_BASE + 2234)
+#define HID_NID_DRW (HID_BASE + 2235)
+#define HID_NID_CTRL (HID_BASE + 2236)
+#define HID_NID_PREV (HID_BASE + 2237)
+#define HID_NID_REG (HID_BASE + 2238)
+#define HID_NID_BKM (HID_BASE + 2239)
+#define HID_NID_SEL (HID_BASE + 2240)
+#define HID_NID_FTN (HID_BASE + 2241)
+#define HID_NID_POSTIT (HID_BASE + 2242)
+#define HID_NID_SRCH_REP (HID_BASE + 2243)
+#define HID_NID_INDEX_ENTRY (HID_BASE + 2244)
+#define HID_NID_TABLE_FORMULA (HID_BASE + 2245)
+#define HID_NID_TABLE_FORMULA_ERROR (HID_BASE + 2246)
+#define HID_NID_NEXT (HID_BASE + 2247)
+#define HID_MM_NEXT_PAGE (HID_BASE + 2248)
+#define HID_MM_PREV_PAGE (HID_BASE + 2249)
+#define HID_MM_GREETINGS_CB_PERSONALIZED (HID_BASE + 2250)
+#define HID_MM_GREETINGS_LB_FEMALE (HID_BASE + 2251)
+#define HID_MM_GREETINGS_PB_FEMALE (HID_BASE + 2252)
+#define HID_MM_GREETINGS_LB_MALE (HID_BASE + 2253)
+#define HID_MM_GREETINGS_PB_MALE (HID_BASE + 2254)
+#define HID_MM_GREETINGS_LB_FEMALECOLUMN (HID_BASE + 2255)
+#define HID_MM_GREETINGS_CB_FEMALEFIELD (HID_BASE + 2256)
+#define HID_MM_GREETINGS_CB_NEUTRAL (HID_BASE + 2257)
+#define HID_MM_BODY_CB_PERSONALIZED (HID_BASE + 2258)
+#define HID_MM_BODY_LB_FEMALE (HID_BASE + 2259)
+#define HID_MM_BODY_PB_FEMALE (HID_BASE + 2260)
+#define HID_MM_BODY_LB_MALE (HID_BASE + 2261)
+#define HID_MM_BODY_PB_MALE (HID_BASE + 2262)
+#define HID_MM_BODY_LB_FEMALECOLUMN (HID_BASE + 2263)
+#define HID_MM_BODY_CB_FEMALEFIELD (HID_BASE + 2264)
+#define HID_MM_BODY_CB_NEUTRAL (HID_BASE + 2265)
+#define HID_MM_ASSIGN_FIELDS (HID_BASE + 2266)
+#define HID_MM_HEADER_0 (HID_BASE + 2267)
+#define HID_MM_HEADER_1 (HID_BASE + 2268)
+#define HID_MM_HEADER_2 (HID_BASE + 2269)
+#define HID_MM_HEADER_3 (HID_BASE + 2270)
+#define HID_MM_HEADER_4 (HID_BASE + 2271)
+#define HID_MM_HEADER_5 (HID_BASE + 2272)
+#define HID_MM_HEADER_6 (HID_BASE + 2273)
+#define HID_MM_HEADER_7 (HID_BASE + 2274)
+#define HID_MM_HEADER_8 (HID_BASE + 2275)
+#define HID_MM_HEADER_9 (HID_BASE + 2276)
+#define HID_MM_HEADER_10 (HID_BASE + 2277)
+#define HID_MM_HEADER_11 (HID_BASE + 2278)
+#define HID_MM_HEADER_12 (HID_BASE + 2279)
+#define HID_MM_HEADER_13 (HID_BASE + 2280)
+
diff --git a/sw/inc/hfspacingitem.hxx b/sw/inc/hfspacingitem.hxx
new file mode 100644
index 000000000000..3d5ed332455e
--- /dev/null
+++ b/sw/inc/hfspacingitem.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_HF_EAT_SPACINGITEM_HXX
+#define _SW_HF_EAT_SPACINGITEM_HXX
+
+
+#include <svl/eitem.hxx>
+#include <hintids.hxx>
+#include <format.hxx>
+
+class IntlWrapper;
+
+class SW_DLLPUBLIC SwHeaderAndFooterEatSpacingItem : public SfxBoolItem
+{
+public:
+ SwHeaderAndFooterEatSpacingItem( USHORT nId = RES_HEADER_FOOTER_EAT_SPACING,
+ BOOL bPrt = FALSE ) : SfxBoolItem( nId, bPrt ) {}
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline const SwHeaderAndFooterEatSpacingItem &SwAttrSet::GetHeaderAndFooterEatSpacing(BOOL bInP) const
+ { return (const SwHeaderAndFooterEatSpacingItem&)Get( RES_HEADER_FOOTER_EAT_SPACING,bInP); }
+
+inline const SwHeaderAndFooterEatSpacingItem &SwFmt::GetHeaderAndFooterEatSpacing(BOOL bInP) const
+ { return aSet.GetHeaderAndFooterEatSpacing(bInP); }
+
+#endif
+
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
new file mode 100644
index 000000000000..7f794757aa26
--- /dev/null
+++ b/sw/inc/hhcwrp.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _HHCWRP_HXX
+#define _HHCWRP_HXX
+
+#include <editeng/hangulhanja.hxx>
+#include <pam.hxx>
+
+class SwView;
+class Window;
+class SwWrtShell;
+struct SwConversionArgs;
+
+//////////////////////////////////////////////////////////////////////
+
+class SwHHCWrapper : public editeng::HangulHanjaConversion
+{
+ SwView * pView;
+ Window* pWin;
+ SwWrtShell &rWrtShell;
+
+ SwConversionArgs *pConvArgs; // object for arguments (and results) needed
+ // to find of next convertible text portion
+
+ xub_StrLen nLastPos; // starting position of the last found text part
+ // (needs to be sth that gets not moved like
+ // SwPaM or SwPosition by replace operations!)
+ sal_Int32 nUnitOffset;
+
+ USHORT nPageCount; // page count for progress bar
+ USHORT nPageStart; // first checked page
+
+ sal_Bool bIsDrawObj;
+ sal_Bool bIsStart;
+ sal_Bool bIsOtherCntnt;
+ sal_Bool bStartChk;
+ sal_Bool bIsSelection; // true if only the selected text should be converted
+ sal_Bool bInfoBox; // true if message should be displayed at the end
+ sal_Bool bIsConvSpecial; // true if special regions: header, footer, ... should be converted
+ sal_Bool bStartDone;
+ sal_Bool bEndDone;
+// sal_Bool bLastRet;
+
+ // from SvxSpellWrapper copied and modified
+ sal_Bool ConvNext_impl(); // former SpellNext
+ sal_Bool FindConvText_impl(); // former FindSpellError
+
+ // from SwSpellWrapper copied and modified
+ sal_Bool HasOtherCnt_impl();
+ void ConvStart_impl( SwConversionArgs *pConvArgs, SvxSpellArea eSpell ); // former SpellStart
+ void ConvEnd_impl( SwConversionArgs *pConvArgs ); // former SpellEnd
+ sal_Bool ConvContinue_impl( SwConversionArgs *pConvArgs ); // former SpellContinue
+
+ void SelectNewUnit_impl( const sal_Int32 nUnitStart,
+ const sal_Int32 nUnitEnd );
+ void ChangeText( const String &rNewText,
+ const ::rtl::OUString& rOrigText,
+ const ::com::sun::star::uno::Sequence< sal_Int32 > *pOffsets,
+ SwPaM *pCrsr );
+ void ChangeText_impl( const String &rNewText, sal_Bool bKeepAttributes );
+
+ inline BOOL IsDrawObj() { return bIsDrawObj; }
+ inline void SetDrawObj( BOOL bNew ) { bIsDrawObj = bNew; }
+
+protected:
+ virtual void GetNextPortion( ::rtl::OUString& rNextPortion,
+ LanguageType& rLangOfPortion,
+ sal_Bool bAllowImplicitChangesForNotConvertibleText );
+ virtual void HandleNewUnit( const sal_Int32 nUnitStart,
+ const sal_Int32 nUnitEnd );
+ 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 );
+
+ virtual sal_Bool HasRubySupport() const;
+
+public:
+ SwHHCWrapper(
+ SwView* pView,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMSF,
+ LanguageType nSourceLanguage, LanguageType nTargetLanguage,
+ const Font *pTargetFont,
+ sal_Int32 nConvOptions, sal_Bool bIsInteractive,
+ sal_Bool bStart, sal_Bool bOther, sal_Bool bSelection );
+
+ virtual ~SwHHCWrapper();
+
+ void Convert();
+};
+
+
+#endif
+
diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
new file mode 100644
index 000000000000..8a6f536ad46b
--- /dev/null
+++ b/sw/inc/hintids.hxx
@@ -0,0 +1,486 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _HINTIDS_HXX
+#define _HINTIDS_HXX
+
+#include <tools/solar.h> // fuer __FAR_DATA
+#include <sal/types.h> // for sal_Unicode
+#include "swdllapi.h"
+
+// fuer SwTxtHints ohne Endindex wird folgendes Zeichen eingefuegt:
+//JP 24.05.00: for the new UniCode Version:
+#define CH_TXTATR_BREAKWORD ((sal_Unicode)0x01)
+#define CH_TXTATR_INWORD ((sal_Unicode)0x02)
+#define CH_TXTATR_TAB ((sal_Unicode)'\t')
+#define CH_TXTATR_NEWLINE ((sal_Unicode)'\n')
+#define CH_TXT_ATR_FIELDSTART ((sal_Unicode)0x04)
+#define CH_TXT_ATR_FIELDEND ((sal_Unicode)0x05)
+#define CH_TXT_ATR_SUBST_FIELDSTART ("[")
+#define CH_TXT_ATR_SUBST_FIELDEND ("]")
+#define CH_TXT_ATR_FORMELEMENT ((sal_Unicode)0x06)
+
+/*
+ * Hier kommen erst mal die enums fuer die Hints
+ */
+
+#define HINT_BEGIN 1
+
+#define POOLATTR_BEGIN HINT_BEGIN
+#define POOLATTR_END RES_UNKNOWNATR_END
+
+// Bereiche fuer die Id's der einzelnen Format-Attribute
+// die Which-Werte fuer die Charakter-Format Attribute
+enum RES_CHRATR
+{
+RES_CHRATR_BEGIN = HINT_BEGIN,
+ RES_CHRATR_CASEMAP = RES_CHRATR_BEGIN, // 1
+ RES_CHRATR_CHARSETCOLOR, // 2
+ RES_CHRATR_COLOR, // 3
+ RES_CHRATR_CONTOUR, // 4
+ RES_CHRATR_CROSSEDOUT, // 5
+ RES_CHRATR_ESCAPEMENT, // 6
+ RES_CHRATR_FONT, // 7
+ RES_CHRATR_FONTSIZE, // 8
+ RES_CHRATR_KERNING, // 9
+ RES_CHRATR_LANGUAGE, // 10
+ RES_CHRATR_POSTURE, // 11
+ RES_CHRATR_PROPORTIONALFONTSIZE, // 12
+ RES_CHRATR_SHADOWED, // 13
+ RES_CHRATR_UNDERLINE, // 14
+ RES_CHRATR_WEIGHT, // 15
+ RES_CHRATR_WORDLINEMODE, // 16
+ RES_CHRATR_AUTOKERN, // 17
+ RES_CHRATR_BLINK, // 18
+ RES_CHRATR_NOHYPHEN, // 19
+ RES_CHRATR_NOLINEBREAK, // 20
+ RES_CHRATR_BACKGROUND, // 21
+ RES_CHRATR_CJK_FONT, // 22
+ RES_CHRATR_CJK_FONTSIZE, // 23
+ RES_CHRATR_CJK_LANGUAGE, // 24
+ RES_CHRATR_CJK_POSTURE, // 25
+ RES_CHRATR_CJK_WEIGHT, // 26
+ RES_CHRATR_CTL_FONT, // 27
+ RES_CHRATR_CTL_FONTSIZE, // 28
+ RES_CHRATR_CTL_LANGUAGE, // 29
+ RES_CHRATR_CTL_POSTURE, // 30
+ RES_CHRATR_CTL_WEIGHT, // 31
+ RES_CHRATR_ROTATE, // 32
+ RES_CHRATR_EMPHASIS_MARK, // 33
+ RES_CHRATR_TWO_LINES, // 34
+ RES_CHRATR_SCALEW, // 35
+ RES_CHRATR_RELIEF, // 36
+ RES_CHRATR_HIDDEN, // 37
+ RES_CHRATR_OVERLINE, // 38
+ RES_CHRATR_DUMMY1, // 39
+ RES_CHRATR_DUMMY2, // 40
+RES_CHRATR_END
+};
+
+// diese Attribute stehen nur im SwpAttr-Array vom TextNode
+enum RES_TXTATR
+{
+RES_TXTATR_BEGIN = RES_CHRATR_END,
+
+/** text attributes with start and end.
+ #i105453#:
+ Hints (SwTxtAttr) with the same start and end position are sorted by
+ WhichId, i.e., the TXTATR constants defined here.
+ The text formatting (SwAttrIter) poses some requirements on TXTATR order:
+ - AUTOFMT must precede CHARFMT, so that auto style can overwrite char style.
+ - INETFMT must precede CHARFMT, so that link style can overwrite char style.
+ (this is actually surprising: CHARFMT hints are not split at INETFMT
+ hints on insertion, but on exporting to ODF. if CHARFMT would precede
+ INETFMT, then exporting and importing will effectively change precedence)
+
+ Nesting hints (SwTxtAttrNesting) also have requirements on TXTATR order,
+ to ensure proper nesting (because CJK_RUBY and INETFMT have no CH_TXTATR):
+ - INETFMT should precede CJK_RUBY (for UNO API it does not matter...)
+ - META and METAFIELD must precede CJK_RUBY and INETFMT
+ */
+RES_TXTATR_WITHEND_BEGIN = RES_TXTATR_BEGIN ,
+ RES_TXTATR_REFMARK = RES_TXTATR_WITHEND_BEGIN, // 41
+ RES_TXTATR_TOXMARK, // 42
+ RES_TXTATR_META, // 43
+ RES_TXTATR_METAFIELD, // 44
+ RES_TXTATR_AUTOFMT, // 45
+ RES_TXTATR_INETFMT, // 46
+ RES_TXTATR_CHARFMT, // 47
+ RES_TXTATR_CJK_RUBY, // 48
+ RES_TXTATR_UNKNOWN_CONTAINER, // 49
+ RES_TXTATR_DUMMY5, // 50
+RES_TXTATR_WITHEND_END,
+
+// alle TextAttribute ohne ein Ende
+RES_TXTATR_NOEND_BEGIN = RES_TXTATR_WITHEND_END,
+ RES_TXTATR_FIELD = RES_TXTATR_NOEND_BEGIN, // 51
+ RES_TXTATR_FLYCNT, // 52
+ RES_TXTATR_FTN, // 53
+ RES_TXTATR_DUMMY4, // 54
+ RES_TXTATR_DUMMY3, // 55
+ RES_TXTATR_DUMMY1, // 56
+ RES_TXTATR_DUMMY2, // 57
+RES_TXTATR_NOEND_END,
+RES_TXTATR_END = RES_TXTATR_NOEND_END
+};
+
+enum RES_PARATR
+{
+RES_PARATR_BEGIN = RES_TXTATR_END,
+ RES_PARATR_LINESPACING = RES_PARATR_BEGIN, // 58
+ RES_PARATR_ADJUST, // 59
+ RES_PARATR_SPLIT, // 60
+ RES_PARATR_ORPHANS, // 61
+ RES_PARATR_WIDOWS, // 62
+ RES_PARATR_TABSTOP, // 63
+ RES_PARATR_HYPHENZONE, // 64
+ RES_PARATR_DROP, // 65
+ RES_PARATR_REGISTER, // 66
+ RES_PARATR_NUMRULE, // 67
+ RES_PARATR_SCRIPTSPACE, // 68
+ RES_PARATR_HANGINGPUNCTUATION, // 69
+ RES_PARATR_FORBIDDEN_RULES, // 70
+ RES_PARATR_VERTALIGN, // 71
+ RES_PARATR_SNAPTOGRID, // 72
+ RES_PARATR_CONNECT_BORDER, // 73
+ RES_PARATR_OUTLINELEVEL, // 74
+RES_PARATR_END
+};
+
+// --> OD 2008-02-25 #refactorlists#
+// list attributes for paragraphs.
+// intentionally these list attributes are not contained in paragraph styles
+enum RES_PARATR_LIST
+{
+RES_PARATR_LIST_BEGIN = RES_PARATR_END,
+ RES_PARATR_LIST_ID = RES_PARATR_LIST_BEGIN, // 75
+ RES_PARATR_LIST_LEVEL, // 76
+ RES_PARATR_LIST_ISRESTART, // 77
+ RES_PARATR_LIST_RESTARTVALUE, // 78
+ RES_PARATR_LIST_ISCOUNTED, // 79
+RES_PARATR_LIST_END
+};
+// <--
+
+enum RES_FRMATR
+{
+RES_FRMATR_BEGIN = RES_PARATR_LIST_END,
+ RES_FILL_ORDER = RES_FRMATR_BEGIN, // 80
+ RES_FRM_SIZE, // 81
+ RES_PAPER_BIN, // 82
+ RES_LR_SPACE, // 83
+ RES_UL_SPACE, // 84
+ RES_PAGEDESC, // 85
+ RES_BREAK, // 86
+ RES_CNTNT, // 87
+ RES_HEADER, // 88
+ RES_FOOTER, // 89
+ RES_PRINT, // 90
+ RES_OPAQUE, // 91
+ RES_PROTECT, // 92
+ RES_SURROUND, // 93
+ RES_VERT_ORIENT, // 94
+ RES_HORI_ORIENT, // 95
+ RES_ANCHOR, // 96
+ RES_BACKGROUND, // 97
+ RES_BOX, // 98
+ RES_SHADOW, // 99
+ RES_FRMMACRO, // 100
+ RES_COL, // 101
+ RES_KEEP, // 102
+ RES_URL, // 103
+ RES_EDIT_IN_READONLY, // 104
+ RES_LAYOUT_SPLIT, // 105
+ RES_CHAIN, // 106
+ RES_TEXTGRID, // 107
+ RES_LINENUMBER , // 108
+ RES_FTN_AT_TXTEND, // 109
+ RES_END_AT_TXTEND, // 110
+ RES_COLUMNBALANCE, // 111
+ RES_FRAMEDIR, // 112
+ RES_HEADER_FOOTER_EAT_SPACING, // 113
+ RES_ROW_SPLIT, // 114
+ // OD 18.09.2003 #i18732# - insert new item and 5 dummies
+ RES_FOLLOW_TEXT_FLOW, // 115
+// --> collapsing borders FME 2005-05-27 #i29550#
+ RES_COLLAPSING_BORDERS, // 116
+// <-- collapsing
+ // OD 2004-05-04 #i28701# - use dummy1 for new item
+ RES_WRAP_INFLUENCE_ON_OBJPOS, // 117
+ RES_AUTO_STYLE, // 118
+ RES_FRMATR_STYLE_NAME, // 119
+ RES_FRMATR_CONDITIONAL_STYLE_NAME, // 120
+RES_FRMATR_END
+};
+
+enum RES_GRFATR
+{
+RES_GRFATR_BEGIN = RES_FRMATR_END,
+ RES_GRFATR_MIRRORGRF = RES_GRFATR_BEGIN, // 121
+ RES_GRFATR_CROPGRF, // 122
+
+ RES_GRFATR_ROTATION, // 123
+ RES_GRFATR_LUMINANCE, // 124
+ RES_GRFATR_CONTRAST, // 125
+ RES_GRFATR_CHANNELR, // 126
+ RES_GRFATR_CHANNELG, // 127
+ RES_GRFATR_CHANNELB, // 128
+ RES_GRFATR_GAMMA, // 129
+ RES_GRFATR_INVERT, // 130
+ RES_GRFATR_TRANSPARENCY, // 131
+ RES_GRFATR_DRAWMODE, // 132
+
+ RES_GRFATR_DUMMY1, // 133
+ RES_GRFATR_DUMMY2, // 134
+ RES_GRFATR_DUMMY3, // 135
+ RES_GRFATR_DUMMY4, // 136
+ RES_GRFATR_DUMMY5, // 137
+RES_GRFATR_END
+};
+
+enum RES_BOXATR
+{
+RES_BOXATR_BEGIN = RES_GRFATR_END,
+ RES_BOXATR_FORMAT = RES_BOXATR_BEGIN, // 138
+ RES_BOXATR_FORMULA, // 139
+ RES_BOXATR_VALUE, // 140
+RES_BOXATR_END
+};
+
+enum RES_UNKNOWNATR
+{
+RES_UNKNOWNATR_BEGIN = RES_BOXATR_END,
+ RES_UNKNOWNATR_CONTAINER = RES_UNKNOWNATR_BEGIN,// 141
+RES_UNKNOWNATR_END
+};
+
+
+
+// ID-s fuer die Formate
+enum RES_FMT
+{
+RES_FMT_BEGIN = RES_UNKNOWNATR_END,
+ RES_CHRFMT = RES_FMT_BEGIN,
+ RES_FRMFMT,
+ RES_FLYFRMFMT,
+ RES_TXTFMTCOLL,
+ RES_GRFFMTCOLL,
+ RES_DRAWFRMFMT,
+ RES_CONDTXTFMTCOLL,
+RES_FMT_END
+};
+
+// die ID's fuer Messages in den Formaten
+enum RES_MSG
+{
+RES_MSG_BEGIN = RES_FMT_END,
+ RES_OBJECTDYING = RES_MSG_BEGIN,
+ RES_FMT_CHG,
+ RES_ATTRSET_CHG,
+ RES_FRM_SIZECHG,
+ RES_TXTATR_FLDCHG,
+ RES_TXTATR_EMPTYCHG,
+ RES_INS_CHR,
+ RES_INS_TXT,
+ RES_DEL_CHR,
+ RES_DEL_TXT,
+ RES_UPDATE_ATTR,
+ RES_PAGEDESC_FTNINFO,
+ RES_REFMARKFLD_UPDATE,
+ RES_DOCPOS_UPDATE,
+ RES_TABLEFML_UPDATE,
+ RES_UPDATEDDETBL,
+ RES_TBLHEADLINECHG,
+ RES_AUTOFMT_DOCNODE,
+ RES_REPAINT,
+ RES_DOC_DTOR,
+ RES_SECTION_HIDDEN,
+ RES_SECTION_NOT_HIDDEN,
+ RES_GRAPHIC_ARRIVED,
+ RES_GRAPHIC_PIECE_ARRIVED,
+ RES_HIDDENPARA_PRINT,
+ RES_CONDCOLL_CONDCHG,
+ RES_VIRTPAGENUM_INFO,
+ // --> OD 2008-02-25 #refactorlists#
+// RES_GETNUMNODES,
+ // <--
+ RES_GETLOWERNUMLEVEL,
+ RES_RESET_FMTWRITTEN,
+ RES_REMOVE_UNO_OBJECT,
+ RES_GRF_REREAD_AND_INCACHE,
+ RES_SECTION_RESETHIDDENFLAG,
+ RES_FINDNEARESTNODE,
+ RES_CONTENT_VISIBLE,
+ RES_FOOTNOTE_DELETED,
+ RES_REFMARK_DELETED,
+ RES_TOXMARK_DELETED,
+ RES_GRAPHIC_SWAPIN,
+ RES_FIELD_DELETED,
+ RES_NAME_CHANGED,
+ RES_TITLE_CHANGED,
+ RES_DESCRIPTION_CHANGED,
+ RES_UNOCURSOR_LEAVES_SECTION,
+ RES_LINKED_GRAPHIC_STREAM_ARRIVED,
+RES_MSG_END
+};
+
+
+// eine ID fuer den RTF-Reader. Die Stylesheets werden wie
+// Attribute behandelt, d.H. es gibt ein StyleSheet Attribut. Um
+// nicht mit anderen Which()-Werten zu kollidieren, ist der Wert
+// hier mit aufgefuehrt. (Auch das Hilfesystem definiert neue
+// Attribute !!)
+enum RES_FLTRATTR
+{
+RES_FLTRATTR_BEGIN = RES_MSG_END,
+ RES_FLTR_STYLESHEET = RES_FLTRATTR_BEGIN,
+ RES_FLTR_BOOKMARK,
+ RES_FLTR_ANCHOR,
+ RES_FLTR_BORDER,
+ RES_FLTR_NUMRULE,
+ RES_FLTR_NUMRULE_NUM,
+ RES_FLTR_SDR_ANCHOR,
+ RES_FLTR_TOX,
+ RES_FLTR_SECTION,
+ RES_FLTR_REDLINE,
+ RES_FLTR_SCRIPTTYPE,
+RES_FLTRATTR_END
+};
+
+#define RES_TBX_DUMMY RES_FLTRATTR_END + 1
+
+#define HINT_END RES_TBX_DUMMY
+
+// Fehler-Erkennung !!
+#define INVALID_HINT HINT_END
+#define RES_WHICHHINT_END HINT_END
+
+
+inline bool isATR(const USHORT nWhich)
+{
+ return (RES_CHRATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
+}
+inline bool isCHRATR(const USHORT nWhich)
+{
+ return (RES_CHRATR_BEGIN <= nWhich) && (RES_CHRATR_END > nWhich);
+}
+inline bool isTXTATR_WITHEND(const USHORT nWhich)
+{
+ return (RES_TXTATR_WITHEND_BEGIN <= nWhich)
+ && (RES_TXTATR_WITHEND_END > nWhich);
+}
+inline bool isTXTATR_NOEND(const USHORT nWhich)
+{
+ return (RES_TXTATR_NOEND_BEGIN <= nWhich)
+ && (RES_TXTATR_NOEND_END > nWhich);
+}
+inline bool isTXTATR(const USHORT nWhich)
+{
+ return (RES_TXTATR_BEGIN <= nWhich) && (RES_TXTATR_END > nWhich);
+}
+inline bool isPARATR(const USHORT nWhich)
+{
+ return (RES_PARATR_BEGIN <= nWhich) && (RES_PARATR_END > nWhich);
+}
+inline bool isPARATR_LIST(const USHORT nWhich)
+{
+ return (RES_PARATR_LIST_BEGIN <= nWhich) && (RES_PARATR_LIST_END > nWhich); }
+inline bool isFRMATR(const USHORT nWhich)
+{
+ return (RES_FRMATR_BEGIN <= nWhich) && (RES_FRMATR_END > nWhich);
+}
+inline bool isGRFATR(const USHORT nWhich)
+{
+ return (RES_GRFATR_BEGIN <= nWhich) && (RES_GRFATR_END > nWhich);
+}
+inline bool isBOXATR(const USHORT nWhich)
+{
+ return (RES_BOXATR_BEGIN <= nWhich) && (RES_BOXATR_END > nWhich);
+}
+inline bool isUNKNOWNATR(const USHORT nWhich)
+{
+ return (RES_UNKNOWNATR_BEGIN <= nWhich) && (RES_UNKNOWNATR_END > nWhich);
+}
+
+
+/*
+ * hole aus der statischen Default-Attribut Tabelle ueber den Which-Wert
+ * das entsprechende default Attribut.
+ * Ist keines vorhanden, returnt ein 0-Pointer !!!
+ *
+ * Diese Funktion ist im Init.CXX implementiert. Damit die Formate darauf
+ * zugreifen koennen, ist sie hier als extern deklariert.
+ * Im PRODUCT ist das Teil inline.
+ */
+class SfxPoolItem;
+struct SfxItemInfo;
+typedef SfxPoolItem* SwDfltAttrTab[ POOLATTR_END - POOLATTR_BEGIN ];
+
+extern SwDfltAttrTab __FAR_DATA aAttrTab;
+extern SfxItemInfo __FAR_DATA aSlotTab[];
+
+SW_DLLPUBLIC const SfxPoolItem* GetDfltAttr( USHORT nWhich );
+
+SW_DLLPUBLIC USHORT GetWhichOfScript( USHORT nWhich, USHORT nScript );
+
+// return for the given TextAttribut without an end the correct character.
+// This function returns
+// CH_TXTATR_BREAKWORD for Textattribut which breaks a word (default)
+// CH_TXTATR_INWORD for Textattribut which dont breaks a word
+class SwTxtAttr;
+sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr );
+
+// alle Sets stehen im init.cxx
+
+// AttrSet-Range fuer die 3 Break-Attribute
+extern USHORT __FAR_DATA aBreakSetRange[];
+// AttrSet-Range fuer die TxtFmtColl
+extern USHORT __FAR_DATA aTxtFmtCollSetRange[];
+// AttrSet-Range fuer die GrfFmtColl
+extern USHORT __FAR_DATA aGrfFmtCollSetRange[];
+// AttrSet-Range fuer die TextNode
+SW_DLLPUBLIC extern USHORT __FAR_DATA aTxtNodeSetRange[];
+// AttrSet-Range fuer die NoTxtNode
+extern USHORT __FAR_DATA aNoTxtNodeSetRange[];
+// AttrSet-Range fuer die SwTable
+extern USHORT __FAR_DATA aTableSetRange[];
+// AttrSet-Range fuer die SwTableLine
+extern USHORT __FAR_DATA aTableLineSetRange[];
+// AttrSet-Range fuer die SwTableBox
+extern USHORT __FAR_DATA aTableBoxSetRange[];
+// AttrSet-Range fuer die SwFrmFmt
+SW_DLLPUBLIC extern USHORT __FAR_DATA aFrmFmtSetRange[];
+// AttrSet-Range fuer die SwCharFmt
+extern USHORT __FAR_DATA aCharFmtSetRange[];
+// AttrSet-Range fuer die character autostyles
+extern USHORT __FAR_DATA aCharAutoFmtSetRange[];
+// AttrSet-Range fuer die SwPageDescFmt
+extern USHORT __FAR_DATA aPgFrmFmtSetRange[];
+
+// check if ID is InRange of AttrSet-Ids
+BOOL IsInRange( const USHORT* pRange, const USHORT nId );
+
+#endif
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
new file mode 100644
index 000000000000..b706dbdeab21
--- /dev/null
+++ b/sw/inc/hints.hxx
@@ -0,0 +1,284 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _HINTS_HXX
+#define _HINTS_HXX
+
+#ifndef _TABLE_HXX //autogen
+#include <tools/table.hxx>
+#endif
+#include <swatrset.hxx>
+
+class SwFmt;
+class OutputDevice;
+class SwTable;
+class SwNode;
+class SwNodes;
+class SwCntntNode;
+class SwPageFrm;
+class SwFrm;
+class SwTxtNode;
+class SwHistory;
+
+// Basis-Klasse fuer alle Message-Hints:
+// "Overhead" vom SfxPoolItem wird hier behandelt
+class SwMsgPoolItem : public SfxPoolItem
+{
+public:
+ SwMsgPoolItem( USHORT nWhich );
+
+ // "Overhead" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+};
+
+
+// ---------------------------------------
+// SwPtrMsgPoolItem (altes SwObjectDying!)
+// ---------------------------------------
+
+class SwPtrMsgPoolItem : public SwMsgPoolItem
+{
+public:
+ void * pObject;
+
+ SwPtrMsgPoolItem( USHORT nId, void * pObj )
+ : SwMsgPoolItem( nId ), pObject( pObj )
+ {}
+};
+
+
+
+/*
+ * SwFmtChg wird verschickt, wenn ein Format gegen ein anderes
+ * Format ausgewechselt worden ist. Es werden immer 2. Hints verschickt,
+ * das alte und neue Format.
+ */
+class SwFmtChg: public SwMsgPoolItem
+{
+public:
+ SwFmt *pChangedFmt;
+ SwFmtChg( SwFmt *pFmt );
+};
+
+
+class SwInsTxt: public SwMsgPoolItem
+{
+public:
+ xub_StrLen nPos;
+ xub_StrLen nLen;
+
+ SwInsTxt( xub_StrLen nP, xub_StrLen nL );
+};
+
+class SwDelChr: public SwMsgPoolItem
+{
+public:
+ xub_StrLen nPos;
+
+ SwDelChr( xub_StrLen nP );
+};
+
+class SwDelTxt: public SwMsgPoolItem
+{
+public:
+ xub_StrLen nStart;
+ xub_StrLen nLen;
+
+ SwDelTxt( xub_StrLen nS, xub_StrLen nL );
+};
+
+class SwUpdateAttr: public SwMsgPoolItem
+{
+public:
+ xub_StrLen nStart;
+ xub_StrLen nEnd;
+ USHORT nWhichAttr;
+ SwUpdateAttr( xub_StrLen nS, xub_StrLen nE, USHORT nW );
+};
+
+
+// SwRefMarkFldUpdate wird verschickt, wenn sich die ReferenzMarkierungen
+// Updaten sollen. Um Seiten-/KapitelNummer feststellen zu koennen, muss
+// der akt. Frame befragt werden. Dafuer wird das akt. OutputDevice benoetigt.
+class SwRefMarkFldUpdate : public SwMsgPoolItem
+{
+public:
+ const OutputDevice* pOut; // Pointer auf das aktuelle Output-Device
+ SwRefMarkFldUpdate( const OutputDevice* );
+};
+
+// SwDocPosUpdate wird verschickt, um zu signalisieren, dass nur die
+// Frames ab oder bis zu einer bestimmten dokument-globalen Position
+// geupdated werden brauchen. Zur Zeit wird dies nur beim Updaten
+// von Seitennummernfeldern benoetigt.
+
+class SwDocPosUpdate : public SwMsgPoolItem
+{
+public:
+ const long nDocPos;
+ SwDocPosUpdate( const long nDocPos );
+};
+
+// SwTableFmlUpdate wird verschickt, wenn sich die Tabelle neu berechnen soll
+// JP 16.02.99: oder wenn die Tabelle selbst gemergt oder gesplittet wird
+enum TableFmlUpdtFlags { TBL_CALC = 0,
+ TBL_BOXNAME,
+ TBL_BOXPTR,
+ TBL_RELBOXNAME,
+ TBL_MERGETBL,
+ TBL_SPLITTBL
+ };
+class SwTableFmlUpdate : public SwMsgPoolItem
+{
+public:
+ const SwTable* pTbl; // Pointer auf die zu aktuelle Tabelle
+ union {
+ const SwTable* pDelTbl; // Merge: Ptr auf die zu loeschende Tabelle
+ const String* pNewTblNm; // Split: der Name der neuen Tabelle
+ } DATA;
+ SwHistory* pHistory;
+ USHORT nSplitLine; // Split: ab dieser BaseLine wird gespl.
+ TableFmlUpdtFlags eFlags;
+ BOOL bModified : 1;
+ BOOL bBehindSplitLine : 1;
+
+ SwTableFmlUpdate( const SwTable* );
+};
+
+
+class SwAutoFmtGetDocNode: public SwMsgPoolItem
+{
+public:
+ const SwCntntNode* pCntntNode;
+ const SwNodes* pNodes;
+
+ SwAutoFmtGetDocNode( const SwNodes* pNds );
+};
+
+/*
+ * SwAttrSetChg wird verschicht, wenn sich in dem SwAttrSet rTheChgdSet
+ * etwas veraendert hat. Es werden immer 2. Hints
+ * verschickt, die alten und neuen Items in dem rTheChgdSet.
+ */
+class SwAttrSetChg: public SwMsgPoolItem
+{
+ BOOL bDelSet;
+ SwAttrSet* pChgSet; // was sich veraendert hat
+ const SwAttrSet* pTheChgdSet; // wird nur zum Vergleichen gebraucht !!
+public:
+ SwAttrSetChg( const SwAttrSet& rTheSet, SwAttrSet& rSet );
+ SwAttrSetChg( const SwAttrSetChg& );
+ ~SwAttrSetChg();
+
+ // was sich veraendert hat
+ const SwAttrSet* GetChgSet() const { return pChgSet; }
+ SwAttrSet* GetChgSet() { return pChgSet; }
+
+ // wo es sich geaendert hat
+ const SwAttrSet* GetTheChgdSet() const { return pTheChgdSet; }
+
+ USHORT Count() const { return pChgSet->Count(); }
+ void ClearItem( USHORT nWhichL = 0 )
+#ifndef DBG_UTIL
+ { pChgSet->ClearItem( nWhichL ); }
+#else
+ ;
+#endif
+};
+
+class SwCondCollCondChg: public SwMsgPoolItem
+{
+public:
+ SwFmt *pChangedFmt;
+ SwCondCollCondChg( SwFmt *pFmt );
+};
+
+class SwVirtPageNumInfo: public SwMsgPoolItem
+{
+ const SwPageFrm *pPage;
+ const SwPageFrm *pOrigPage;
+ const SwFrm *pFrm; //An einem Absatz/Tabelle koennen mehrere
+ //Attribute sitzen. Der Frame muss dann
+ //muss dann letztlich bei bestimmen
+ //welches Attribut gilt und um welche physikalische
+ //Seite es sich handelt.
+public:
+ SwVirtPageNumInfo( const SwPageFrm *pPg );
+
+ const SwPageFrm *GetPage() { return pPage; }
+ const SwPageFrm *GetOrigPage() { return pOrigPage;}
+ const SwFrm *GetFrm() { return pFrm; }
+ void SetInfo( const SwPageFrm *pPg,
+ const SwFrm *pF ) { pFrm = pF, pPage = pPg; }
+};
+
+
+// --> OD 2008-02-19 #refactorlists#
+//DECLARE_TABLE( SwTxtNodeTable, SwTxtNode* )
+
+//class SwNumRuleInfo : public SwMsgPoolItem
+//{
+// SwTxtNodeTable aList;
+// const String& rName;
+//public:
+// SwNumRuleInfo( const String& rRuleName );
+
+// const String& GetName() const { return rName; }
+// void AddNode( SwTxtNode& rNd );
+
+// // erzeuge die Liste aller Nodes der NumRule in dem angegebenem Doc
+// // Der Code steht im docnum.cxx
+// // #111955#
+// void MakeList( SwDoc& rDoc, BOOL bOutline = FALSE );
+
+// const SwTxtNodeTable& GetTxtNodeList() const { return aList; }
+//};
+// <--
+
+class SwFindNearestNode : public SwMsgPoolItem
+{
+ const SwNode *pNd, *pFnd;
+public:
+ SwFindNearestNode( const SwNode& rNd );
+ void CheckNode( const SwNode& rNd );
+
+ const SwNode* GetFoundNode() const { return pFnd; }
+};
+
+class SwStringMsgPoolItem : public SwMsgPoolItem
+{
+ String sStr;
+public:
+
+ const String& GetString() const { return sStr; }
+
+ SwStringMsgPoolItem( USHORT nId, const String& rStr )
+ : SwMsgPoolItem( nId ), sStr( rStr )
+ {}
+};
+
+#endif
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
new file mode 100644
index 000000000000..ef16a2a89b86
--- /dev/null
+++ b/sw/inc/htmltbl.hxx
@@ -0,0 +1,491 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _HTMLTBL_HXX
+#define _HTMLTBL_HXX
+
+
+#include <vcl/timer.hxx>
+#include <editeng/svxenum.hxx>
+
+#include "swtypes.hxx"
+#include "node.hxx" // Fuer SwStartNode
+
+
+class SwTableBox;
+class SwTable;
+class SwHTMLTableLayout;
+class SwDoc;
+class SwFrmFmt;
+
+#define HTMLTABLE_RESIZE_NOW (ULONG_MAX)
+
+class SwHTMLTableLayoutCnts
+{
+ SwHTMLTableLayoutCnts *pNext; // der naechste Inhalt
+
+ // von den beiden naechsten Pointern darf nur einer gesetzt sein!
+ SwTableBox *pBox; // ein Box
+ SwHTMLTableLayout *pTable; // eine "Tabelle in der Tabelle"
+
+ // Beim ersten Durchlauf gibt es noch keine Boxen. Es wird dann
+ // pStartNode anstelle von pBox verwendet.
+ const SwStartNode *pStartNode;
+
+ // Die folgenden Zahler geben an, wie oft ein Pass bereits fuer diesen
+ // Inhalt durchgefuehrt wurde. Dazu werden sie mit einer Soll-Vorgabe
+ // verglichen. Wird 255 erreicht laufen sie bei 0 weiter. So wird
+ // eine Reinitialisierung bei jedem Resize vermieden.
+ BYTE nPass1Done; // Wieoft wurde Pass 1 aufgerufen?
+ BYTE nWidthSet; // Wieoft wurde die Breite gesetzt?
+
+ BOOL bNoBreakTag; // <NOBR>-Tag ueber gesamten Inhalt
+
+public:
+
+ SwHTMLTableLayoutCnts( const SwStartNode* pSttNd, SwHTMLTableLayout* pTab,
+ BOOL bNoBreakTag, SwHTMLTableLayoutCnts* pNxt );
+
+ ~SwHTMLTableLayoutCnts();
+
+ void SetTableBox( SwTableBox *pBx ) { pBox = pBx; }
+ SwTableBox *GetTableBox() const { return pBox; }
+
+ SwHTMLTableLayout *GetTable() const { return pTable; }
+
+ const SwStartNode *GetStartNode() const;
+
+ // Ermitteln des naechsten Knotens
+ SwHTMLTableLayoutCnts *GetNext() const { return pNext; }
+
+ void SetWidthSet( BYTE nRef ) { nWidthSet = nRef; }
+ BOOL IsWidthSet( BYTE nRef ) const { return nRef==nWidthSet; }
+
+ void SetPass1Done( BYTE nRef ) { nPass1Done = nRef; }
+ BOOL IsPass1Done( BYTE nRef ) const { return nRef==nPass1Done; }
+
+ BOOL HasNoBreakTag() const { return bNoBreakTag; }
+};
+
+/* */
+
+class SwHTMLTableLayoutCell
+{
+ SwHTMLTableLayoutCnts *pContents; // der Inhalt der Zelle
+
+ USHORT nRowSpan; // ROWSPAN der Zelle
+ USHORT nColSpan; // COLSPAN der Zelle
+ USHORT nWidthOption;// angegebene Breite der Zelle in Twip oder %
+
+ BOOL bPrcWidthOption : 1;// nWidth ist %-Angabe
+ BOOL bNoWrapOption : 1; // NOWRAP-Option
+
+public:
+
+ SwHTMLTableLayoutCell( SwHTMLTableLayoutCnts *pCnts,
+ USHORT nRSpan, USHORT nCSpan,
+ USHORT nWidthOpt, BOOL bPrcWdthOpt,
+ BOOL nNWrapOpt );
+
+ ~SwHTMLTableLayoutCell();
+
+ // Setzen/Ermitteln des Inhalts einer Zelle
+ void SetContents( SwHTMLTableLayoutCnts *pCnts ) { pContents = pCnts; }
+ SwHTMLTableLayoutCnts *GetContents() const { return pContents; }
+
+ inline void SetProtected();
+
+ // ROWSPAN/COLSPAN der Zelle Setzen/Ermitteln
+ void SetRowSpan( USHORT nRSpan ) { nRowSpan = nRSpan; }
+ USHORT GetRowSpan() const { return nRowSpan; }
+ USHORT GetColSpan() const { return nColSpan; }
+
+ USHORT GetWidthOption() const { return nWidthOption; }
+ BOOL IsPrcWidthOption() const { return bPrcWidthOption; }
+
+ BOOL HasNoWrapOption() const { return bNoWrapOption; }
+};
+
+/* */
+
+class SwHTMLTableLayoutColumn
+{
+ // Zwischenwerte von AutoLayoutPass1
+ ULONG nMinNoAlign, nMaxNoAlign, nAbsMinNoAlign;
+
+ // Ergebnisse von AutoLayoutPass1
+ ULONG nMin, nMax;
+
+ // Ergibnisse von Pass 2
+ USHORT nAbsColWidth; // in Twips
+ USHORT nRelColWidth; // in Twips bzw. relativ zu USHRT_MAX
+
+ USHORT nWidthOption; // Optionen von <COL> oder <TD>/<TH>
+
+ BOOL bRelWidthOption : 1;
+ BOOL bLeftBorder : 1;
+
+public:
+
+ SwHTMLTableLayoutColumn( USHORT nColWidthOpt, BOOL bRelColWidthOpt,
+ BOOL bLBorder );
+
+ ~SwHTMLTableLayoutColumn() {}
+
+ inline void MergeCellWidthOption( USHORT nWidth, BOOL bPrc );
+ inline void SetWidthOption( USHORT nWidth, BOOL bRelWidth, BOOL bTest );
+
+ USHORT GetWidthOption() const { return nWidthOption; }
+ BOOL IsRelWidthOption() const { return bRelWidthOption; }
+
+ inline void MergeMinMaxNoAlign( ULONG nMin, ULONG nMax, ULONG nAbsMin );
+ ULONG GetMinNoAlign() const { return nMinNoAlign; }
+ ULONG GetMaxNoAlign() const { return nMaxNoAlign; }
+ ULONG GetAbsMinNoAlign() const { return nAbsMinNoAlign; }
+ inline void ClearPass1Info( BOOL bWidthOpt );
+
+ inline void SetMinMax( ULONG nMin, ULONG nMax );
+ void SetMax( ULONG nVal ) { nMax = nVal; }
+ void AddToMin( ULONG nVal ) { nMin += nVal; }
+ void AddToMax( ULONG nVal ) { nMax += nVal; }
+ ULONG GetMin() const { return nMin; }
+ ULONG GetMax() const { return nMax; }
+
+ void SetAbsColWidth( USHORT nWidth ) { nAbsColWidth = nWidth; }
+ USHORT GetAbsColWidth() const { return nAbsColWidth; }
+
+ void SetRelColWidth( USHORT nWidth ) { nRelColWidth = nWidth; }
+ USHORT GetRelColWidth() const { return nRelColWidth; }
+
+ BOOL HasLeftBorder() const { return bLeftBorder; }
+};
+
+/* */
+
+class SwHTMLTableLayout
+{
+ Timer aResizeTimer; // Timer fuer DelayedResize
+
+ SwHTMLTableLayoutColumn **aColumns;
+ SwHTMLTableLayoutCell **aCells;
+
+ const SwTable *pSwTable; // die SwTable (nur Top-Table)
+ SwTableBox *pLeftFillerBox; // linke Filler-Zelle (nur Tab in Tab)
+ SwTableBox *pRightFillerBox; // rechte Filler-Zelle (nur Tab-in Tab)
+
+ ULONG nMin; // minimale Breite der Tabelle (Twips)
+ ULONG nMax; // maximale Breite der Tabelle (Twips)
+
+ USHORT nRows; // Anzahl Zeilen
+ USHORT nCols; // Anzahl Spalten
+
+ USHORT nLeftMargin; // Abstand zum linken Rand (aus Absatz)
+ USHORT nRightMargin; // Abstand zum rechten Rand (aus Absatz)
+
+ USHORT nInhAbsLeftSpace; // von umgebender Zelle geerbter Abstand,
+ USHORT nInhAbsRightSpace; // der Zellen zugeschlagen wurde
+
+ USHORT nRelLeftFill; // relative Breiten der Zellen zur
+ USHORT nRelRightFill; // Ausrichtung von Tabellen in Tabellen
+
+ USHORT nRelTabWidth; // Die relative Breite der Tabelle
+
+ USHORT nWidthOption; // die Breite der Tabelle (in Twip oder %)
+ USHORT nCellPadding; // Abstand zum Inhalt (in Twip)
+ USHORT nCellSpacing; // Absatnd zwischen Zellen (in Twip)
+ USHORT nBorder; // Dicke der ausseren Umrandung bzw.
+ // Platz, den Netscape hierfuer einrechnet.
+
+ USHORT nLeftBorderWidth;
+ USHORT nRightBorderWidth;
+ USHORT nInhLeftBorderWidth;
+ USHORT nInhRightBorderWidth;
+ USHORT nBorderWidth;
+
+ USHORT nDelayedResizeAbsAvail; // Param fuer's verzoegerte Resize
+ USHORT nLastResizeAbsAvail;
+
+ BYTE nPass1Done; // Vorgabe-Werte fuer die einzelen
+ BYTE nWidthSet; // Schleifen-Durchlauefe
+
+ SvxAdjust eTableAdjust; // Die Ausrichtung der Tabelle
+
+ BOOL bColsOption : 1; // Tabelle besitzt eine COLS-Option
+ BOOL bColTags : 1; // Tabelle besitzt COL/COLGRP-Tags
+ BOOL bPrcWidthOption : 1; // Breite ist eine %-Angabe
+ BOOL bUseRelWidth : 1; // SwTable bekommt relative Breite
+
+ BOOL bMustResize : 1; // Tabelle muss in der Breite ang. werden
+ BOOL bExportable : 1; // Layout kann zum Export genutzt werden
+ BOOL bBordersChanged : 1; // Umrandung wurde geaendert
+ BOOL bMayBeInFlyFrame : 1; // Die Tabelle koennte im Rahmen sein
+
+ BOOL bDelayedResizeRecalc : 1; // Param fuer's verzoegerte Resize
+ BOOL bMustNotResize : 1; // Die Tabelle darf nicht reseized werden
+ BOOL bMustNotRecalc : 1; // Tabelle darf nicht an Inhalt angepasst
+ // werden
+
+// USHORT GetLeftBorderWidth( USHORT nCol ) const;
+// USHORT GetRightBorderWidth( USHORT nCol, USHORT nColSpan ) const;
+
+ void AddBorderWidth( ULONG &rMin, ULONG &rMax, ULONG& rAbsMin,
+ USHORT nCol, USHORT nColSpan,
+ BOOL bSwBorders=TRUE ) const;
+ void SetBoxWidth( SwTableBox *pBox, USHORT nCol, USHORT nColSpan ) const;
+
+ const SwStartNode *GetAnyBoxStartNode() const;
+ SwFrmFmt *FindFlyFrmFmt() const;
+ const SwDoc *GetDoc() const { return GetAnyBoxStartNode()->GetDoc(); }
+
+ void ClearPass1Info() { nMin = nMax = 0; }
+
+ void _Resize( USHORT nAbsAvail, BOOL bRecalc=FALSE );
+
+ DECL_STATIC_LINK( SwHTMLTableLayout, DelayedResize_Impl, void* );
+
+ static USHORT GetBrowseWidthByVisArea( const SwDoc& rDoc );
+public:
+
+ SwHTMLTableLayout( const SwTable *pSwTbl,
+ USHORT nRows, USHORT nCols, BOOL bColsOpt, BOOL ColTgs,
+ USHORT nWidth, BOOL bPrcWidth, USHORT nBorderOpt,
+ USHORT nCellPad, USHORT nCellSp, SvxAdjust eAdjust,
+ USHORT nLMargin, USHORT nRMargin, USHORT nBWidth,
+ USHORT nLeftBWidth, USHORT nRightBWidth,
+ USHORT nInhLeftBWidth, USHORT nInhRightBWidth );
+
+ ~SwHTMLTableLayout();
+
+ USHORT GetLeftCellSpace( USHORT nCol, USHORT nColSpan,
+ BOOL bSwBorders=TRUE ) const;
+ USHORT GetRightCellSpace( USHORT nCol, USHORT nColSpan,
+ BOOL bSwBorders=TRUE ) const;
+ inline USHORT GetInhCellSpace( USHORT nCol, USHORT nColSpan ) const;
+
+ inline void SetInhBorderWidths( USHORT nLeft, USHORT nRight );
+
+
+ void GetAvail( USHORT nCol, USHORT nColSpan, USHORT& rAbsAvail,
+ USHORT& rRelAvail ) const;
+
+ void AutoLayoutPass1();
+ void AutoLayoutPass2( USHORT nAbsAvail, USHORT nRelAvail,
+ USHORT nAbsLeftSpace, USHORT nAbsRightSpace,
+ USHORT nParentInhSpace );
+ void SetWidths( BOOL bCallPass2=FALSE, USHORT nAbsAvail=0,
+ USHORT nRelAvail=0, USHORT nAbsLeftSpace=0,
+ USHORT nAbsRightSpace=0,
+ USHORT nParentInhSpace=0 );
+
+ inline SwHTMLTableLayoutColumn *GetColumn( USHORT nCol ) const;
+ inline void SetColumn( SwHTMLTableLayoutColumn *pCol, USHORT nCol );
+
+ inline SwHTMLTableLayoutCell *GetCell( USHORT nRow, USHORT nCol ) const;
+ inline void SetCell( SwHTMLTableLayoutCell *pCell, USHORT nRow, USHORT nCol );
+
+ void SetLeftFillerBox( SwTableBox *pBox ) { pLeftFillerBox = pBox; }
+ void SetRightFillerBox( SwTableBox *pBox ) { pRightFillerBox = pBox; }
+
+ ULONG GetMin() const { return nMin; }
+ ULONG GetMax() const { return nMax; }
+ USHORT GetRelLeftFill() const { return nRelLeftFill; }
+ USHORT GetRelRightFill() const { return nRelRightFill; }
+
+ inline long GetBrowseWidthMin() const;
+
+ BOOL HasColsOption() const { return bColsOption; }
+ BOOL HasColTags() const { return bColTags; }
+
+ BOOL IsTopTable() const { return pSwTable != 0; }
+
+ void SetMustResize( BOOL bSet ) { bMustResize = bSet; }
+ void SetMustNotResize( BOOL bSet ) { bMustNotResize = bSet; }
+ void SetMustNotRecalc( BOOL bSet ) { bMustNotRecalc = bSet; }
+
+ // Neueberechnung der Tabellenbreiten fuer die uebergebene verfuegbare
+ // Breite.
+ // - Wenn bRecalc gesetzt ist, werden auch der Inhalt der Boxen
+ // zur Berechnung herangezogen.
+ // neu berechnet.
+ // - Wenn bForce gesetzt ist, wird die Tabelle auch neu berechnet, wenn
+ // dies mit SetMustNotResize unterdrueckt werden soll.
+ // - Wenn nDelay>0 wird die Berechnung entsprechend verzoegert.
+ // Innerhalb der Verzeoegerung auftretende Resize-Aufrufe werden
+ // ignoriert, die Verzeogerung wird aber ggf. uebernommen.
+ // - Wenn nDelay==HTMLTABLE_RESIZE_NOW ist, wird sofort Resized und
+ // eventuell noch asstehende Resize-Aufrufe werden nicht mehr
+ // ausgefuehrt.
+ // - Der Rueckgabewert gibt an, ob sich die Tabelle geaendert hat.
+ BOOL Resize( USHORT nAbsAvail, BOOL bRecalc=FALSE, BOOL bForce=FALSE,
+ ULONG nDelay=0 );
+
+ void BordersChanged( USHORT nAbsAvail, BOOL bRecalc=FALSE );
+
+ // Ermitteln der verfuegbaren Breite. Das geht nur, wenn ein Layout
+ // oder eine ViewShell vorhanden ist. Sonst wird 0 zurueckgegeben.
+ // (Wird vom HTML-Filter benoetigt, da der nicht an das Layout kommt.)
+ static USHORT GetBrowseWidth( const SwDoc& rDoc );
+
+ // Ermitteln der verfuegbaren Breite uber den Tabellen-Frame
+ USHORT GetBrowseWidthByTabFrm( const SwTabFrm& rTabFrm ) const;
+
+ // Ermitteln der verfuegbaren Breite uber den Tabellen-Frame oder
+ // das statische GetBrowseWidth, wenn kein Layout existiert.
+ USHORT GetBrowseWidthByTable( const SwDoc& rDoc ) const;
+
+ // Fuer Export
+ USHORT GetWidthOption() const { return nWidthOption; }
+ BOOL HasPrcWidthOption() const { return bPrcWidthOption; }
+
+ USHORT GetCellPadding() const { return nCellPadding; }
+ USHORT GetCellSpacing() const { return nCellSpacing; }
+ USHORT GetBorder() const { return nBorder; }
+
+ USHORT GetRowCount() const { return nRows; }
+ USHORT GetColCount() const { return nCols; }
+
+ void SetExportable( BOOL bSet ) { bExportable = bSet; }
+ BOOL IsExportable() const { return bExportable; }
+
+ BOOL HaveBordersChanged() const { return bBordersChanged; }
+
+ void SetMayBeInFlyFrame( BOOL bSet ) { bMayBeInFlyFrame = bSet; }
+ BOOL MayBeInFlyFrame() const { return bMayBeInFlyFrame; }
+};
+
+/* */
+
+inline void SwHTMLTableLayoutCell::SetProtected()
+{
+ nRowSpan = 1;
+ nColSpan = 1;
+
+ pContents = 0;
+}
+
+/* */
+
+inline void SwHTMLTableLayoutColumn::MergeMinMaxNoAlign( ULONG nCMin,
+ ULONG nCMax, ULONG nAbsMin )
+{
+ if( nCMin > nMinNoAlign )
+ nMinNoAlign = nCMin;
+ if( nCMax > nMaxNoAlign )
+ nMaxNoAlign = nCMax;
+ if( nAbsMin > nAbsMinNoAlign )
+ nAbsMinNoAlign = nAbsMin;
+}
+
+inline void SwHTMLTableLayoutColumn::ClearPass1Info( BOOL bWidthOpt )
+{
+ nMinNoAlign = nMaxNoAlign = nAbsMinNoAlign = MINLAY;
+ nMin = nMax = 0;
+ if( bWidthOpt )
+ {
+ nWidthOption = 0;
+ bRelWidthOption = FALSE;
+ }
+}
+
+inline void SwHTMLTableLayoutColumn::MergeCellWidthOption(
+ USHORT nWidth, BOOL bRel )
+{
+ if( !nWidthOption ||
+ (bRel==bRelWidthOption && nWidthOption < nWidth) )
+ {
+ nWidthOption = nWidth;
+ bRelWidthOption = bRel;
+ }
+}
+
+inline void SwHTMLTableLayoutColumn::SetMinMax( ULONG nMn, ULONG nMx )
+{
+ nMin = nMn;
+ nMax = nMx;
+}
+
+/* */
+
+inline USHORT SwHTMLTableLayout::GetInhCellSpace( USHORT nCol,
+ USHORT nColSpan ) const
+{
+ USHORT nSpace = 0;
+ if( nCol==0 )
+ nSpace = nSpace + sal::static_int_cast< USHORT >(nInhAbsLeftSpace);
+ if( nCol+nColSpan==nCols )
+ nSpace = nSpace + sal::static_int_cast< USHORT >(nInhAbsRightSpace);
+
+ return nSpace;
+}
+
+inline SwHTMLTableLayoutColumn *SwHTMLTableLayout::GetColumn( USHORT nCol ) const
+{
+ return aColumns[nCol];
+}
+
+inline void SwHTMLTableLayoutColumn::SetWidthOption(
+ USHORT nWidth, BOOL bRelWidth, BOOL bTest )
+{
+ if( bTest && bRelWidthOption==bRelWidth )
+ {
+ if( nWidth > nWidthOption )
+ nWidthOption = nWidth;
+ }
+ else
+ nWidthOption = nWidth;
+ bRelWidthOption = bRelWidth;
+}
+
+inline void SwHTMLTableLayout::SetColumn( SwHTMLTableLayoutColumn *pCol, USHORT nCol )
+{
+ aColumns[nCol] = pCol;
+}
+
+inline SwHTMLTableLayoutCell *SwHTMLTableLayout::GetCell( USHORT nRow, USHORT nCol ) const
+{
+ return aCells[nRow*nCols+nCol];
+}
+
+inline void SwHTMLTableLayout::SetCell( SwHTMLTableLayoutCell *pCell,
+ USHORT nRow, USHORT nCol )
+{
+ aCells[nRow*nCols+nCol] = pCell;
+}
+
+inline long SwHTMLTableLayout::GetBrowseWidthMin() const
+{
+ return (long)( (!nWidthOption || bPrcWidthOption) ? nMin : nRelTabWidth );
+}
+
+void SwHTMLTableLayout::SetInhBorderWidths( USHORT nLeft, USHORT nRight )
+{
+ nInhLeftBorderWidth = nLeft;
+ nInhRightBorderWidth = nRight;
+}
+
+
+#endif
diff --git a/sw/inc/index.hrc b/sw/inc/index.hrc
new file mode 100644
index 000000000000..badc0278b137
--- /dev/null
+++ b/sw/inc/index.hrc
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+/* fuer den DesignEditor
+#define RC_INDEX_BEGIN 256
+*/
+
+#ifndef _INDEX_HRC
+#define _INDEX_HRC
+
+#include "rcid.hrc"
+
+#define DLG_FORMEDT (RC_INDEX_BEGIN + 0)
+#define DLG_IDX (RC_INDEX_BEGIN + 1)
+#define DLG_USRIDX (RC_INDEX_BEGIN + 2)
+#define DLG_INSIDXMARK (RC_INDEX_BEGIN + 3)
+#define DLG_CNTTABLE (RC_INDEX_BEGIN + 4)
+#define DLG_MULTMRK (RC_INDEX_BEGIN + 5)
+
+#define STR_TITLE (RC_INDEX_BEGIN + 6)
+#define STR_ALPHA (RC_INDEX_BEGIN + 7)
+#define STR_LEVEL (RC_INDEX_BEGIN + 8)
+
+#define DLG_INSAUTHMARK (RC_INDEX_BEGIN + 9)
+#define DLG_CREATE_AUTH_ENTRY (RC_INDEX_BEGIN + 10)
+#define DLG_EDIT_IDXMARK (RC_INDEX_BEGIN + 11)
+#define DLG_EDIT_AUTHMARK (RC_INDEX_BEGIN + 12)
+
+#define STR_IDXMRK_INSERT (RC_INDEX_BEGIN + 13)
+#define STR_IDXMRK_EDIT (RC_INDEX_BEGIN + 14)
+#define STR_AUTHMRK_EDIT (RC_INDEX_BEGIN + 15)
+#define STR_AUTHMRK_INSERT (RC_INDEX_BEGIN + 16)
+
+#define DLG_NEW_USER_IDX (RC_INDEX_BEGIN + 17)
+
+#define STR_FILE_NOT_FOUND (RC_INDEX_BEGIN + 18)
+#define DLG_CHANGE_AUTH_ENTRY (RC_INDEX_BEGIN + 19)
+#define DLG_CREATE_AUTOMARK (RC_INDEX_BEGIN + 20)
+
+#define DLG_EDIT_IDXMARK_CJK (RC_INDEX_BEGIN + 21)
+#define DLG_INSIDXMARK_CJK (RC_INDEX_BEGIN + 22)
+#endif // _INDEX_HRC
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
new file mode 100644
index 000000000000..5b9dd827108e
--- /dev/null
+++ b/sw/inc/index.hxx
@@ -0,0 +1,217 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _INDEX_HXX
+#define _INDEX_HXX
+
+#include <limits.h>
+#include <tools/solar.h>
+#include <tools/rtti.hxx> // for RTTI of SwIndexReg
+#include <tools/string.hxx> // for xub_StrLen
+#include <swdllapi.h>
+
+#define INVALID_INDEX STRING_NOTFOUND
+
+// Maximale Anzahl von Indizies im IndexArray (zum Abtesten auf Ueberlaeufe)
+class SwIndex;
+class SwIndexReg;
+struct SwPosition;
+
+#ifndef DBG_UTIL
+#define INLINE inline
+#else
+#define INLINE
+#endif
+
+class SW_DLLPUBLIC SwIndex
+{
+ friend class SwIndexReg;
+
+#ifdef DBG_UTIL
+ static int nSerial;
+ int MySerial;
+#endif
+
+ xub_StrLen nIndex;
+ SwIndexReg* pArray;
+ SwIndex *pNext, *pPrev;
+
+ SwIndex& ChgValue( const SwIndex& rIdx, xub_StrLen nNewValue );
+ void Remove(); // Ausketten
+
+public:
+ explicit SwIndex(SwIndexReg *const pReg, xub_StrLen const nIdx = 0);
+ SwIndex( const SwIndex & );
+ SwIndex( const SwIndex &, short nDiff );
+ ~SwIndex() { Remove(); }
+
+ INLINE xub_StrLen operator++();
+ INLINE xub_StrLen operator--();
+#ifndef CFRONT
+ INLINE xub_StrLen operator++(int);
+ INLINE xub_StrLen operator--(int);
+#endif
+
+ INLINE xub_StrLen operator+=( xub_StrLen );
+ INLINE xub_StrLen operator-=( xub_StrLen );
+ INLINE xub_StrLen operator+=( const SwIndex& );
+ INLINE xub_StrLen operator-=( const SwIndex& );
+
+ INLINE BOOL operator<( const SwIndex& ) const;
+ INLINE BOOL operator<=( const SwIndex& ) const;
+ INLINE BOOL operator>( const SwIndex& ) const;
+ INLINE BOOL operator>=( const SwIndex& ) const;
+ BOOL operator==( const SwIndex& rSwIndex ) const
+ { return (nIndex == rSwIndex.nIndex) && (pArray == rSwIndex.pArray); }
+
+ BOOL operator!=( const SwIndex& rSwIndex ) const
+ { return (nIndex != rSwIndex.nIndex) || (pArray != rSwIndex.pArray); }
+
+ BOOL operator<( xub_StrLen nWert ) const { return nIndex < nWert; }
+ BOOL operator<=( xub_StrLen nWert ) const { return nIndex <= nWert; }
+ BOOL operator>( xub_StrLen nWert ) const { return nIndex > nWert; }
+ BOOL operator>=( xub_StrLen nWert ) const { return nIndex >= nWert; }
+ BOOL operator==( xub_StrLen nWert ) const { return nIndex == nWert; }
+ BOOL operator!=( xub_StrLen nWert ) const { return nIndex != nWert; }
+
+ INLINE SwIndex& operator=( xub_StrLen );
+ SwIndex& operator=( const SwIndex & );
+
+ // gebe den Wert vom Index als xub_StrLen zurueck
+ xub_StrLen GetIndex() const { return nIndex; }
+
+ // ermoeglicht Zuweisungen ohne Erzeugen eines temporaeren
+ // Objektes
+ SwIndex &Assign(SwIndexReg *,xub_StrLen);
+
+ // Herausgabe des Pointers auf das IndexArray,
+ // (fuers RTTI am SwIndexReg)
+ const SwIndexReg* GetIdxReg() const { return pArray; }
+};
+
+#undef INLINE
+
+class SwIndexReg
+{
+ friend class SwIndex;
+ friend bool lcl_PosOk(const SwPosition & aPos);
+
+ const SwIndex *pFirst, *pLast, *pMiddle;
+
+ // ein globales Array, in das Indizies verschoben werden, die mal
+ // temporaer "ausgelagert" werden muessen; oder die zum Zeitpunkt des
+ // anlegens kein gueltiges Array kennen (SwPaM/SwPosition!)
+ friend void _InitCore();
+ friend void _FinitCore();
+ static SwIndexReg* pEmptyIndexArray;
+
+protected:
+ virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
+ const bool bNegative = false, const bool bDelete = false );
+
+ void ChkArr();
+
+ BOOL HasAnyIndex() const { return 0 != pFirst; }
+
+public:
+ SwIndexReg();
+ virtual ~SwIndexReg();
+
+ // rtti, abgeleitete moegens gleichtun oder nicht. Wenn sie es gleichtun
+ // kann ueber das SwIndexReg typsicher gecastet werden.
+ TYPEINFO();
+
+ void MoveTo( SwIndexReg& rArr );
+};
+
+#ifndef DBG_UTIL
+
+inline xub_StrLen SwIndex::operator++()
+{
+ return ChgValue( *this, nIndex+1 ).nIndex;
+}
+inline xub_StrLen SwIndex::operator--()
+{
+ return ChgValue( *this, nIndex-1 ).nIndex;
+}
+#ifndef CFRONT
+inline xub_StrLen SwIndex::operator++(int)
+{
+ xub_StrLen nOldIndex = nIndex;
+ ChgValue( *this, nIndex+1 );
+ return nOldIndex;
+}
+inline xub_StrLen SwIndex::operator--(int)
+{
+ xub_StrLen nOldIndex = nIndex;
+ ChgValue( *this, nIndex-1 );
+ return nOldIndex;
+}
+#endif
+
+inline xub_StrLen SwIndex::operator+=( xub_StrLen nWert )
+{
+ return ChgValue( *this, nIndex + nWert ).nIndex;
+}
+inline xub_StrLen SwIndex::operator-=( xub_StrLen nWert )
+{
+ return ChgValue( *this, nIndex - nWert ).nIndex;
+}
+inline xub_StrLen SwIndex::operator+=( const SwIndex& rIndex )
+{
+ return ChgValue( *this, nIndex + rIndex.nIndex ).nIndex;
+}
+inline xub_StrLen SwIndex::operator-=( const SwIndex& rIndex )
+{
+ return ChgValue( *this, nIndex - rIndex.nIndex ).nIndex;
+}
+
+inline BOOL SwIndex::operator<( const SwIndex& rIndex ) const
+{
+ return nIndex < rIndex.nIndex;
+}
+inline BOOL SwIndex::operator<=( const SwIndex& rIndex ) const
+{
+ return nIndex <= rIndex.nIndex;
+}
+inline BOOL SwIndex::operator>( const SwIndex& rIndex ) const
+{
+ return nIndex > rIndex.nIndex;
+}
+inline BOOL SwIndex::operator>=( const SwIndex& rIndex ) const
+{
+ return nIndex >= rIndex.nIndex;
+}
+inline SwIndex& SwIndex::operator=( xub_StrLen nWert )
+{
+ if( nIndex != nWert )
+ ChgValue( *this, nWert );
+ return *this;
+}
+
+#endif // PRODUCT
+
+#endif
diff --git a/sw/inc/inetfld.hxx b/sw/inc/inetfld.hxx
new file mode 100644
index 000000000000..2bb3c6f9c880
--- /dev/null
+++ b/sw/inc/inetfld.hxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _INETFLD_HXX
+#define _INETFLD_HXX
+
+
+#include "fldbas.hxx"
+
+class SvxMacro;
+class SvxMacroTableDtor;
+class SwINetField;
+class SwCharFmt;
+class SwDoc;
+
+/*--------------------------------------------------------------------
+ Beschreibung: InterNet-FieldType -> Lade Document mit der URL
+ --------------------------------------------------------------------*/
+
+class SwINetFieldType : public SwFieldType
+{
+ SwDepend aNormalFmt;
+ SwDepend aVisitFmt;
+ SwDoc* pDoc;
+
+public:
+ SwINetFieldType( SwDoc* pDoc );
+
+ virtual SwFieldType* Copy() const;
+
+ SwCharFmt* GetCharFmt( const SwINetField& rFld );
+
+ SwDoc* GetDoc() const { return pDoc; }
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: InterNet-Field -> Lade Document mit der URL
+ --------------------------------------------------------------------*/
+
+class SwINetField : public SwField
+{
+ friend class SwINetFieldType;
+
+ String sTargetFrameName; // in diesen Frame soll die URL
+ String sURL;
+ String sText;
+ SvxMacroTableDtor* pMacroTbl;
+
+public:
+ // Direkte Eingabe alten Wert loeschen
+ SwINetField( SwINetFieldType* pTyp, USHORT nFmt,
+ const String& rURL, const String& rText );
+ virtual ~SwINetField();
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ // URL
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ // HinweisText
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+
+ // das ist das akt. Zeichenformat
+ SwCharFmt* GetCharFmt();
+ const SwCharFmt* GetCharFmt() const
+ { return ((SwINetField*)this)->GetCharFmt(); }
+
+ const String& GetTargetFrameName() const { return sTargetFrameName; }
+ void SetTargetFrameName( const String& rNm ) { sTargetFrameName = rNm; }
+
+ // setze eine neue oder loesche die akt. MakroTabelle
+ void SetMacroTbl( const SvxMacroTableDtor* pTbl = 0 );
+ const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTbl; }
+
+ // setze / erfrage ein Makro
+ void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
+ const SvxMacro* GetMacro( USHORT nEvent ) const;
+};
+
+
+#endif // _INETFLD_HXX
+
diff --git a/sw/inc/init.hxx b/sw/inc/init.hxx
new file mode 100644
index 000000000000..55f6a1860459
--- /dev/null
+++ b/sw/inc/init.hxx
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _INIT_HXX
+#define _INIT_HXX
+
+class ViewShell;
+
+void _InitCore(); // bastyp/init.cxx
+void _FinitCore();
+
+void _InitFilter(); // basflt/fltini.cxx
+void _FinitFilter();
+
+// layout/newfrm.cxx
+void _FrmInit();
+void _FrmFinit();
+void SetShell( ViewShell *pSh );
+
+// text/txtfrm.cxx
+void _TextInit();
+void _TextFinit();
+
+
+#endif
diff --git a/sw/inc/io.hxx b/sw/inc/io.hxx
new file mode 100644
index 000000000000..b0e6f0fce00b
--- /dev/null
+++ b/sw/inc/io.hxx
@@ -0,0 +1,176 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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.
+ *
+ ************************************************************************/
+// eigene Klasse fuer IO, die die systemunabhaengige Darstellung
+// uebernimmt (bytes dreht, Character konvertiert)
+// das Schreiben erfolgt aus Effizienzgruenden binaer
+#ifndef _IO_HXX
+#define _IO_HXX
+
+#ifdef UNX
+#include <unistd.h>
+#else
+#include <io.h>
+#endif
+
+#include <fcntl.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+
+#ifndef _KEYCOD_HXX //autogen
+#include <vcl/keycod.hxx>
+#endif
+#include <tools/stream.hxx>
+
+/*$
+class BinaryFile {
+ int fd;
+public:
+ enum IO_OpenMode {
+ BF_READ = O_RDONLY,
+ BF_WRITE = O_RDWR,
+ BF_CREATE = O_CREAT,
+ BF_TRUNC = O_TRUNC
+ };
+ // ctor oeffnet File im BinearMode, dtor schliesst es
+ BinaryFile(const String &, int eOpenMode);
+ ~BinaryFile();
+ BOOL Ok() const {
+ return -1 != fd;
+ }
+ operator int() const { return fd; }
+};
+*/
+
+class SwIOin {
+private:
+ SvFileStream aStr; //$ ifstream
+public:
+ // Stream wird im entsprechenden Mode erzeugt.
+ SwIOin(const String &rFilename, StreamMode nMode =
+ STREAM_READ | STREAM_NOCREATE );
+
+ SwIOin& operator>>(char& val);
+ SwIOin& operator>>(unsigned char& val);
+ SwIOin& operator>>(char* val);
+ SwIOin& operator>>(unsigned char* val);
+ SwIOin& operator>>(short& val);
+ SwIOin& operator>>(unsigned short& val);
+ SwIOin& operator>>(long& val);
+ SwIOin& operator>>(unsigned long& val);
+ String ReadString();
+ KeyCode ReadKeyCode();
+ // kann erweitert werden fuer weitere Arrays von
+ // Basistypen; nLen ist die Anzahl der Elemente
+ SwIOin& Read(char *buf, unsigned nLen);
+
+ int operator!() { return aStr.GetError() != SVSTREAM_OK; }
+ SvFileStream &operator()() {
+ return aStr;
+ }
+};
+
+class SwIOout {
+private:
+ void _write(const char *buf, unsigned size);
+ SvFileStream aStr; //$ ofstream
+public:
+ // Stream wird im entsprechenden Mode erzeugt.
+ SwIOout( const String &rFilename, StreamMode nMode =
+ STREAM_WRITE | STREAM_NOCREATE );
+ SwIOout& operator<<(char val);
+ SwIOout& operator<<(unsigned char val);
+ SwIOout& operator<<(char* val);
+ SwIOout& operator<<(unsigned char* val);
+ SwIOout& operator<<(short val);
+ SwIOout& operator<<(unsigned short val);
+ SwIOout& operator<<(long val);
+ SwIOout& operator<<(unsigned long val);
+ SwIOout& operator<<(const String &);
+ SwIOout& operator<<(const KeyCode &);
+ // kann erweitert werden fuer weitere Arrays von
+ // Basistypen; nLen ist die Anzahl der Elemente
+ SwIOout& Write(const char *buf, unsigned nLen);
+
+ int operator!() { return aStr.GetError() != SVSTREAM_OK; }
+ SvFileStream &operator()() {
+ return aStr;
+ }
+};
+
+
+class SwIOinout {
+private:
+ SvFileStream aStr; //$ fstream
+
+public:
+ // Stream wird im entsprechenden Mode erzeugt.
+ SwIOinout(const String &rFilename, StreamMode nMode =
+ STREAM_READWRITE | STREAM_NOCREATE );
+
+ SwIOinout& operator>>(char& val);
+ SwIOinout& operator>>(unsigned char& val);
+ SwIOinout& operator>>(char* val);
+ SwIOinout& operator>>(unsigned char* val);
+ SwIOinout& operator>>(short& val);
+ SwIOinout& operator>>(unsigned short& val);
+ SwIOinout& operator>>(long& val);
+ SwIOinout& operator>>(unsigned long& val);
+ String ReadString();
+ KeyCode ReadKeyCode();
+ // kann erweitert werden fuer weitere Arrays von
+ // Basistypen; nLen ist die Anzahl der Elemente
+ SwIOinout& Read(char *buf, unsigned nLen);
+ SwIOinout& Read(unsigned short *buf, unsigned nLen );
+
+ SwIOinout& operator<<(char val);
+ SwIOinout& operator<<(unsigned char val);
+ SwIOinout& operator<<(char* val);
+ SwIOinout& operator<<(unsigned char* val);
+ SwIOinout& operator<<(short val);
+ SwIOinout& operator<<(unsigned short val);
+ SwIOinout& operator<<(long val);
+ SwIOinout& operator<<(unsigned long val);
+ SwIOinout& operator<<(const String &);
+ SwIOinout& operator<<(const KeyCode &);
+ // kann erweitert werden fuer weitere Arrays von
+ // Basistypen; nLen ist die Anzahl der Elemente
+ SwIOinout& Write(const char *buf, unsigned nLen);
+
+ int operator!() { return aStr.GetError() != SVSTREAM_OK; }
+ SvFileStream &operator()() {
+ return aStr;
+ }
+
+ BOOL Ok();
+};
+
+
+
+#endif
+
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
new file mode 100644
index 000000000000..22ecd7bb0a36
--- /dev/null
+++ b/sw/inc/iodetect.hxx
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _IODETECT_HXX_
+#define _IODETECT_HXX_
+
+#include <sfx2/docfilt.hxx>
+#include <sfx2/docfile.hxx>
+#include <sfx2/fcontnr.hxx>
+#include <osl/endian.h>
+#include <errhdl.hxx> // for ASSERT
+#include <tools/string.hxx>
+#include <swdllapi.h>
+
+#define FILTER_RTF "RTF" // RTF-Filter
+#define sRtfWH "WH_RTF"
+#define FILTER_TEXT "TEXT" // Text-Filter mit Default-CodeSet
+#define FILTER_BAS "BAS" // StarBasic (identisch mit ANSI)
+#define FILTER_WW8 "CWW8" // WinWord 97-Filter
+#define FILTER_TEXT_DLG "TEXT_DLG" // text filter with encoding dialog
+#define FILTER_XML "CXML" // XML filter
+#define FILTER_XMLV "CXMLV" // XML filter
+#define FILTER_XMLVW "CXMLVWEB" // XML filter
+#define sHTML "HTML"
+#define sWW1 "WW1"
+#define sWW5 "WW6"
+#define sWW6 "CWW6"
+
+#define sSWRITER "swriter"
+#define sSWRITERWEB "swriter/web"
+
+struct SwIoDetect
+{
+ const sal_Char* pName;
+ USHORT nLen;
+
+ inline SwIoDetect( const sal_Char *pN, USHORT nL )
+ : pName( pN ), nLen( nL )
+ {}
+
+ inline int IsFilter( const String& rNm ) const
+ {
+ return pName && rNm.EqualsAscii( pName, 0, nLen );
+ }
+
+ const sal_Char* IsReader( const sal_Char* pHeader, ULONG nLen_,
+ const String &rFileName, const String& rUserData ) const;
+};
+
+enum ReaderWriterEnum {
+ READER_WRITER_RTF,
+ READER_WRITER_BAS,
+ READER_WRITER_WW6,
+ READER_WRITER_WW8,
+ READER_WRITER_RTF_WH,
+ READER_WRITER_HTML,
+ READER_WRITER_WW1,
+ READER_WRITER_WW5,
+ READER_WRITER_XML,
+ READER_WRITER_TEXT_DLG,
+ READER_WRITER_TEXT,
+ MAXFILTER
+};
+
+extern SwIoDetect aFilterDetect[];
+
+// Die folgende Klasse ist ein Wrappe fuer die Basic-I/O-Funktionen
+// des Writer 3.0. Alles ist statisch. Alle u.a. Filternamen sind die
+// Writer-internen Namen, d.h. die namen, die in INSTALL.INI vor dem
+// Gleichheitszeichen stehen, z.b. SWG oder ASCII.
+
+class SwIoSystem
+{
+public:
+ // suche ueber den internen FormatNamen den Filtereintrag
+ SW_DLLPUBLIC static const SfxFilter* GetFilterOfFormat( const String& rFormat,
+ const SfxFilterContainer* pCnt = 0 );
+
+ // Feststellen des zu verwendenden Filters fuer die uebergebene
+ // Datei. Der Filtername wird zurueckgeliefert. Konnte kein Filter
+ // zurueckgeliefert werden, wird der Name des ASCII-Filters geliefert!
+ static const SfxFilter* GetFileFilter( const String& rFileName,
+ const String& rPrefFltName,
+ SfxMedium* pMedium = 0 );
+
+ // Feststellen ob das File in dem vorgegebenen Format vorliegt.
+ // Z.z werden nur unsere eigene Filter unterstuetzt!!
+ static BOOL IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
+ const SfxFilter** ppFlt = 0 );
+
+ static BOOL IsValidStgFilter( SotStorage& , const SfxFilter& );
+ static BOOL IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter);
+
+ static bool IsDetectableText( const sal_Char* pBuf, ULONG &rLen,
+ CharSet *pCharSet=0, bool *pSwap=0, LineEnd *pLineEnd=0, bool bEncodedFilter = false );
+ // static bool IsDetectableW4W(const String& rFileName, const String& rUserData);
+
+ static const SfxFilter* GetTextFilter( const sal_Char* pBuf, ULONG nLen );
+
+ static const String GetSubStorageName( const SfxFilter& rFltr );
+};
+
+#endif
diff --git a/sw/inc/istyleaccess.hxx b/sw/inc/istyleaccess.hxx
new file mode 100644
index 000000000000..af19caec9252
--- /dev/null
+++ b/sw/inc/istyleaccess.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ISTYLEACCESS_HXX
+#define _ISTYLEACCESS_HXX
+
+#include <vector>
+#include <svl/stylepool.hxx>
+
+/*--------------------------------------------------------------------
+ Management of (automatic) styles
+ --------------------------------------------------------------------*/
+
+class SwStyleHandle;
+
+class IStyleAccess
+{
+public:
+
+ enum SwAutoStyleFamily
+ {
+ AUTO_STYLE_CHAR,
+ AUTO_STYLE_RUBY,
+ AUTO_STYLE_PARA,
+ AUTO_STYLE_NOTXT
+ };
+
+ virtual ~IStyleAccess() {}
+
+ virtual StylePool::SfxItemSet_Pointer_t getAutomaticStyle( const SfxItemSet& rSet,
+ SwAutoStyleFamily eFamily ) = 0;
+ virtual void getAllStyles( std::vector<StylePool::SfxItemSet_Pointer_t> &rStyles,
+ SwAutoStyleFamily eFamily ) = 0;
+ // It's slow to iterate through a stylepool looking for a special name, but if
+ // the style has been inserted via "cacheAutomaticStyle" instead of "getAutomaticStyle",
+ // it's faster
+ virtual StylePool::SfxItemSet_Pointer_t getByName( const rtl::OUString& rName,
+ SwAutoStyleFamily eFamily ) = 0;
+ // insert the style to the pool and the cache (used during import)
+ virtual StylePool::SfxItemSet_Pointer_t cacheAutomaticStyle( const SfxItemSet& rSet,
+ SwAutoStyleFamily eFamily ) = 0;
+ // To release the cached styles (shared_pointer!)
+ virtual void clearCaches() = 0;
+};
+
+#endif // _ISTYLEACCESS_HXX
diff --git a/sw/inc/itabenum.hxx b/sw/inc/itabenum.hxx
new file mode 100644
index 000000000000..0188267c0497
--- /dev/null
+++ b/sw/inc/itabenum.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ITABENUM_HXX
+#define _ITABENUM_HXX
+
+#include <tools/solar.h>
+
+namespace tabopts
+{
+ const USHORT DEFAULT_BORDER = 0x01;
+ const USHORT HEADLINE = 0x02;
+// const USHORT REPEAT = 0x04;
+// const USHORT HEADLINE_REPEAT = 0x06; // Headline + Repeat
+ const USHORT SPLIT_LAYOUT = 0x08;
+ const USHORT HEADLINE_NO_BORDER = HEADLINE | SPLIT_LAYOUT;
+ const USHORT ALL_TBL_INS_ATTR = DEFAULT_BORDER | HEADLINE | SPLIT_LAYOUT;
+}
+
+struct SwInsertTableOptions
+{
+ USHORT mnInsMode;
+ USHORT mnRowsToRepeat;
+
+ SwInsertTableOptions( USHORT nInsMode, USHORT nRowsToRepeat ) :
+ mnInsMode( nInsMode ), mnRowsToRepeat( nRowsToRepeat ) {};
+};
+
+
+#endif
+
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
new file mode 100644
index 000000000000..079fbeee4cf5
--- /dev/null
+++ b/sw/inc/lineinfo.hxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_LINEINFO_HXX
+#define SW_LINEINFO_HXX
+
+#include "calbck.hxx"
+//#ifndef _NUMRULE_HXX
+//#include <numrule.hxx>
+//#endif
+#include <editeng/numitem.hxx>
+#include "swdllapi.h"
+
+class SwCharFmt;
+class IDocumentStylePoolAccess;
+
+enum LineNumberPosition
+{
+ LINENUMBER_POS_LEFT,
+ LINENUMBER_POS_RIGHT,
+ LINENUMBER_POS_INSIDE,
+ LINENUMBER_POS_OUTSIDE
+};
+
+class SW_DLLPUBLIC SwLineNumberInfo : public SwClient //purpose of derivation from SwClient:
+ //character style for displaying the numbers.
+{
+ SvxNumberType aType; //e.g. roman linenumbers
+ String aDivider; //String for aditional interval (vert. lines user defined)
+ USHORT nPosFromLeft; //Position for paint
+ USHORT nCountBy; //Paint only for every n line
+ USHORT nDividerCountBy; //Interval for display of an user defined
+ //string every n lines
+ LineNumberPosition ePos; //Where should the display occur (number and divicer)
+ BOOL bPaintLineNumbers; //Should anything be displayed?
+ BOOL bCountBlankLines; //Count empty lines?
+ BOOL bCountInFlys; //Count also within FlyFrames?
+ BOOL bRestartEachPage; //Restart counting at the first paragraph of each page
+ //(even on follows when paragraphs are splitted)
+
+public:
+ SwLineNumberInfo();
+ SwLineNumberInfo(const SwLineNumberInfo&);
+
+ SwLineNumberInfo& operator=(const SwLineNumberInfo&);
+ BOOL operator==( const SwLineNumberInfo& rInf ) const;
+
+ SwCharFmt *GetCharFmt( IDocumentStylePoolAccess& rIDSPA ) const;
+ void SetCharFmt( SwCharFmt* );
+
+ const SvxNumberType &GetNumType() const { return aType; }
+ void SetNumType( SvxNumberType aNew ){ aType = aNew; }
+
+ const String &GetDivider() const { return aDivider; }
+ void SetDivider( const String &r ) { aDivider = r; }
+ USHORT GetDividerCountBy() const { return nDividerCountBy; }
+ void SetDividerCountBy( USHORT n ) { nDividerCountBy = n; }
+
+ USHORT GetPosFromLeft() const { return nPosFromLeft; }
+ void SetPosFromLeft( USHORT n) { nPosFromLeft = n; }
+
+ USHORT GetCountBy() const { return nCountBy; }
+ void SetCountBy( USHORT n) { nCountBy = n; }
+
+ LineNumberPosition GetPos() const { return ePos; }
+ void SetPos( LineNumberPosition eP ){ ePos = eP; }
+
+ BOOL IsPaintLineNumbers() const { return bPaintLineNumbers; }
+ void SetPaintLineNumbers( BOOL b ){ bPaintLineNumbers = b; }
+
+ BOOL IsCountBlankLines() const { return bCountBlankLines; }
+ void SetCountBlankLines( BOOL b ) { bCountBlankLines = b; }
+
+ BOOL IsCountInFlys() const { return bCountInFlys; }
+ void SetCountInFlys( BOOL b ) { bCountInFlys = b; }
+
+ BOOL IsRestartEachPage() const { return bRestartEachPage; }
+ void SetRestartEachPage( BOOL b ) { bRestartEachPage = b; }
+
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+};
+
+
+
+#endif
+
diff --git a/sw/inc/linkenum.hxx b/sw/inc/linkenum.hxx
new file mode 100644
index 000000000000..08fbb23654b3
--- /dev/null
+++ b/sw/inc/linkenum.hxx
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _LINKENUM_HXX
+#define _LINKENUM_HXX
+
+enum UpdateLinks
+{
+ NEVER,
+ MANUAL,
+ AUTOMATIC,
+ GLOBALSETTING
+};
+
+#endif
+
diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx
new file mode 100644
index 000000000000..2c97c4da1c9c
--- /dev/null
+++ b/sw/inc/list.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 LIST_HXX_INCLUDED
+#define LIST_HXX_INCLUDED
+
+#include <tools/string.hxx>
+
+class SwNumRule;
+class SwNodes;
+class SwNodeNum;
+
+class SwListImpl;
+
+class SwList
+{
+ public:
+ SwList( const String sListId,
+ SwNumRule& rDefaultListStyle,
+ const SwNodes& rNodes );
+ ~SwList();
+
+ const String GetListId() const;
+
+ const String GetDefaultListStyleName() const;
+
+ void InsertListItem( SwNodeNum& rNodeNum,
+ const int nLevel );
+ void RemoveListItem( SwNodeNum& rNodeNum );
+
+ void InvalidateListTree();
+ void ValidateListTree();
+
+ void MarkListLevel( const int nListLevel,
+ const BOOL bValue );
+
+ bool IsListLevelMarked( const int nListLevel ) const;
+
+// void ContinueList( SwList& rList );
+// const SwList* GetContinuedList() const;
+// void ClearContinuation();
+
+ private:
+ // no copy constructor and no assignment operator
+ SwList( const SwList& );
+ SwList& operator=( const SwList& );
+
+ SwListImpl* mpListImpl;
+};
+#endif // LIST_HXX_INCLUDED
diff --git a/sw/inc/listfunc.hxx b/sw/inc/listfunc.hxx
new file mode 100644
index 000000000000..b82ce6424249
--- /dev/null
+++ b/sw/inc/listfunc.hxx
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 LISTFUNC_HXX_INCLUDED
+#define LISTFUNC_HXX_INCLUDED
+
+class SwDoc;
+
+namespace listfunc
+{
+ const String CreateUniqueListId( const SwDoc& rDoc );
+}
+
+#endif // LISTFUNC_HXX_INCLUDED
diff --git a/sw/inc/makefile.mk b/sw/inc/makefile.mk
new file mode 100644
index 000000000000..b5efd14c8164
--- /dev/null
+++ b/sw/inc/makefile.mk
@@ -0,0 +1,49 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..
+
+PRJNAME=sw
+TARGET=inc
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : $(PRJ)$/inc$/swpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/inc$/sw.mk
+
+# --- Files --------------------------------------------------------
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.IF "$(ENABLE_PCH)"!="" # && ( "$(PRJNAME)"!="sw" || "$(BUILD_SPECIAL)"!="TRUE" )
+ALLTAR : \
+ $(SLO)$/precompiled.pch \
+ $(SLO)$/precompiled_ex.pch
+
+.ENDIF # "$(ENABLE_PCH)"!=""
+
diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx
new file mode 100644
index 000000000000..a6ebc3d11761
--- /dev/null
+++ b/sw/inc/mdiexp.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _MDIEXP_HXX
+#define _MDIEXP_HXX
+
+#include <tools/solar.h>
+#include <tblenum.hxx>
+#include <layout/layout.hxx>
+#include <swdllapi.h>
+
+class UniString;
+class SwRect;
+class Size;
+class Dialog;
+class ViewShell;
+class SwDoc;
+class SwDocShell;
+
+extern void ScrollMDI(ViewShell* pVwSh, const SwRect &, USHORT nRangeX, USHORT nRangeY);
+extern BOOL IsScrollMDI(ViewShell* pVwSh, const SwRect &);
+extern void SizeNotify(ViewShell* pVwSh, const Size &);
+
+//Update der Statusleiste, waehrend einer Action.
+extern void PageNumNotify( ViewShell* pVwSh,
+ USHORT nPhyNum,
+ USHORT nVirtNum,
+ const UniString& rPg );
+
+enum FlyMode { FLY_DRAG_START, FLY_DRAG, FLY_DRAG_END };
+extern void FrameNotify( ViewShell* pVwSh, FlyMode eMode = FLY_DRAG );
+
+SW_DLLPUBLIC void StartProgress ( USHORT nMessId, long nStartVal, long nEndVal, SwDocShell *pDocSh = 0 );
+SW_DLLPUBLIC void EndProgress ( SwDocShell *pDocSh = 0 );
+SW_DLLPUBLIC void SetProgressState ( long nPosition, SwDocShell *pDocShell );
+void SetProgressText ( USHORT nMessId, SwDocShell *pDocShell );
+void RescheduleProgress( SwDocShell *pDocShell );
+
+void EnableCmdInterface(BOOL bEnable = TRUE);
+
+LAYOUT_NS Dialog* GetSearchDialog();
+
+void RepaintPagePreview( ViewShell* pVwSh, const SwRect& rRect );
+
+// ndgrf.cxx
+// alle QuickDraw-Bitmaps des speziellen Docs loeschen
+void DelAllGrfCacheEntries( SwDoc* pDoc );
+
+// ChgMode fuer Tabellen aus der Konfiguration lesen
+TblChgMode GetTblChgDefaultMode();
+
+BOOL JumpToSwMark( ViewShell* pVwSh, const UniString& rMark );
+
+
+#endif
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
new file mode 100644
index 000000000000..c5d67217ab2a
--- /dev/null
+++ b/sw/inc/modcfg.hxx
@@ -0,0 +1,343 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _MODOPT_HXX
+#define _MODOPT_HXX
+
+#include <tools/string.hxx>
+#include <vcl/wintypes.hxx>
+#include <vcl/field.hxx>
+#include <svl/svarray.hxx>
+#include <unotools/configitem.hxx>
+#include "swdllapi.h"
+#include "authratr.hxx"
+#include <SwCapObjType.hxx>
+#include "tblenum.hxx"
+#include "itabenum.hxx"
+#include <tools/globname.hxx>
+class SwModuleOptions;
+
+//-----------------------------------------------------------------------------
+class InsCaptionOpt;
+typedef InsCaptionOpt* InsCaptionOptPtr;
+SV_DECL_PTRARR_SORT_DEL(InsCapOptArr, InsCaptionOptPtr, 0, 5)
+
+class InsCaptionOptArr : public InsCapOptArr
+{
+ friend class SwModuleOptions;
+ friend class SwInsertConfig;
+protected:
+ InsCaptionOpt* Find(const SwCapObjType eType, const SvGlobalName *pOleId = 0) const;
+};
+
+/* -----------------------------10.10.00 16:14--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwRevisionConfig : public utl::ConfigItem
+{
+ friend class SwModuleOptions;
+
+ AuthorCharAttr aInsertAttr; //Revision/TextDisplay/Insert/Attribute // Redlining: Author-Zeichenattribute
+ //Revision/TextDisplay/Insert/Color
+ AuthorCharAttr aDeletedAttr; //Revision/TextDisplay/Delete/Attribute
+ //Revision/TextDisplay/Delete/Color
+ AuthorCharAttr aFormatAttr; //Revision/TextDisplay/ChangeAttribute/Attribute
+ //Revision/TextDisplay/ChangeAttribute/Color
+ USHORT nMarkAlign; //Revision/LinesChanged/Mark
+ Color aMarkColor; //Revision/LinesChanged/Color
+
+ const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
+ public:
+ SwRevisionConfig();
+ ~SwRevisionConfig();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+/* -----------------------------11.10.00 09:00--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwInsertConfig : public utl::ConfigItem
+{
+ friend class SwModuleOptions;
+
+ InsCaptionOptArr* pCapOptions;
+ InsCaptionOpt* pOLEMiscOpt;
+
+ SvGlobalName aGlobalNames[5];
+
+ sal_Bool bInsWithCaption; //Insert/Caption/Automatic // Objekte beschriftet einfuegen
+ sal_Bool bCaptionOrderNumberingFirst; //#i61007# caption order starting with numbering
+// sal_uInt16 nInsTblFlags; //Insert/Table/Header // Flags fuer Tabellen einfuegen
+ //Insert/Table/RepeatHeader
+ //Insert/Table/Split
+ //Insert/Table/Border
+ SwInsertTableOptions aInsTblOpts;
+ sal_Bool bIsWeb;
+
+ const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
+ public:
+ SwInsertConfig(sal_Bool bWeb);
+ ~SwInsertConfig();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+/* -----------------------------11.10.00 09:00--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwTableConfig : public utl::ConfigItem
+{
+ friend class SwModuleOptions;
+
+ USHORT nTblHMove; //int Table/Shift/Row
+ USHORT nTblVMove; //int Table/Shift/Column
+ USHORT nTblHInsert; //int Table/Insert/Row
+ USHORT nTblVInsert; //int Table/Insert/Column
+ TblChgMode eTblChgMode; //int Table/Change/Effect
+
+ sal_Bool bInsTblFormatNum; // Table/Input/NumberRecognition // Automatische Zahlenerkennung
+ sal_Bool bInsTblChangeNumFormat; // Table/Input/NumberFormatRecognition // Automatische Zahlenformaterkennung
+ sal_Bool bInsTblAlignNum; // Table/Input/Alignment // Zahlen ausrichten
+
+ const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
+ public:
+ SwTableConfig(sal_Bool bWeb);
+ ~SwTableConfig();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+/* -----------------------------18.01.01 16:57--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwMiscConfig : public utl::ConfigItem
+{
+ friend class SwModuleOptions;
+
+ String sWordDelimiter; // Statistics/WordNumber/Delimiter
+ BOOL bDefaultFontsInCurrDocOnly; // DefaultFont/Document
+ BOOL bShowIndexPreview ; // Index/ShowPreview
+ BOOL bGrfToGalleryAsLnk; // Misc/GraphicToGalleryAsLink
+ BOOL bNumAlignSize; // Numbering/Graphic/KeepRatio
+ BOOL bSinglePrintJob; // FormLetter/PrintOutput/SinglePrintJobs
+ BOOL bIsNameFromColumn; // FormLetter/FileOutput/FileName/Generation
+ BOOL bAskForMailMergeInPrint; // Ask if documents containing fields should be 'mailmerged'
+ sal_Int16 nMailingFormats; // FormLetter/MailingOutput/Formats
+ String sNameFromColumn; // FormLetter/FileOutput/FileName/FromDatabaseField (string!)
+ String sMailingPath; // FormLetter/FileOutput/Path
+ String sMailName; // FormLetter/FileOutput/FileName/FromManualSetting (string!)
+
+ const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
+ public:
+ SwMiscConfig();
+ ~SwMiscConfig();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+
+/* ---------------------------------------------------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwModuleOptions
+{
+ SwRevisionConfig aRevisionConfig;
+ SwInsertConfig aInsertConfig;
+ SwInsertConfig aWebInsertConfig;
+
+ SwTableConfig aTableConfig;
+ SwTableConfig aWebTableConfig;
+
+ SwMiscConfig aMiscConfig;
+
+ //fiscus: don't show tips of text fields - it's not part of the configuration!
+ BOOL bHideFieldTips : 1;
+
+public:
+ SwModuleOptions();
+
+ TblChgMode GetTblMode() const { return aTableConfig.eTblChgMode;}
+ void SetTblMode( TblChgMode eSet ) { aTableConfig.eTblChgMode = eSet;
+ aTableConfig.SetModified();}
+
+ USHORT GetTblHMove() const { return aTableConfig.nTblHMove;}
+ void SetTblHMove( USHORT nSet ) { aTableConfig.nTblHMove = nSet;
+ aTableConfig.SetModified();}
+
+ USHORT GetTblVMove() const { return aTableConfig.nTblVMove;}
+ void SetTblVMove( USHORT nSet ) { aTableConfig.nTblVMove = nSet;
+ aTableConfig.SetModified();}
+
+ USHORT GetTblHInsert() const {return aTableConfig.nTblHInsert;}
+ void SetTblHInsert( USHORT nSet ) { aTableConfig.nTblHInsert = nSet;
+ aTableConfig.SetModified();}
+
+ USHORT GetTblVInsert() const {return aTableConfig.nTblVInsert;}
+ void SetTblVInsert( USHORT nSet ) { aTableConfig.nTblVInsert = nSet;
+ aTableConfig.SetModified();}
+
+ const AuthorCharAttr &GetInsertAuthorAttr() const { return aRevisionConfig.aInsertAttr; }
+ void SetInsertAuthorAttr( AuthorCharAttr &rAttr ) { aRevisionConfig.aInsertAttr = rAttr;
+ aRevisionConfig.SetModified();}
+
+ const AuthorCharAttr &GetDeletedAuthorAttr() const { return aRevisionConfig.aDeletedAttr; }
+ void SetDeletedAuthorAttr( AuthorCharAttr &rAttr ) { aRevisionConfig.aDeletedAttr = rAttr;
+ aRevisionConfig.SetModified();}
+
+ const AuthorCharAttr &GetFormatAuthorAttr() const { return aRevisionConfig.aFormatAttr; }
+ void SetFormatAuthorAttr( AuthorCharAttr &rAttr ) { aRevisionConfig.aFormatAttr = rAttr;
+ aRevisionConfig.SetModified();}
+
+ USHORT GetMarkAlignMode() const { return aRevisionConfig.nMarkAlign; }
+ void SetMarkAlignMode(USHORT nMode) { aRevisionConfig.nMarkAlign = nMode;
+ aRevisionConfig.SetModified();}
+
+ const Color& GetMarkAlignColor() const { return aRevisionConfig.aMarkColor; }
+ void SetMarkAlignColor(const Color &rColor) { aRevisionConfig.aMarkColor = rColor;
+ aRevisionConfig.SetModified();}
+
+ BOOL IsInsWithCaption(BOOL bHTML) const
+ { return bHTML ? FALSE : aInsertConfig.bInsWithCaption; }
+ void SetInsWithCaption( BOOL bHTML, BOOL b )
+ { if(!bHTML)
+ aInsertConfig.bInsWithCaption = b;
+ aInsertConfig.SetModified();}
+
+ sal_Bool IsCaptionOrderNumberingFirst() const { return aInsertConfig.bCaptionOrderNumberingFirst; }
+ void SetCaptionOrderNumberingFirst( sal_Bool bSet )
+ {
+ if(aInsertConfig.bCaptionOrderNumberingFirst != bSet)
+ {
+ aInsertConfig.bCaptionOrderNumberingFirst = bSet;
+ aInsertConfig.SetModified();
+ }
+ }
+
+ BOOL IsInsTblFormatNum(BOOL bHTML) const
+ { return bHTML ? aWebTableConfig.bInsTblFormatNum : aTableConfig.bInsTblFormatNum; }
+ void SetInsTblFormatNum( BOOL bHTML, BOOL b )
+ { bHTML ? (aWebTableConfig.bInsTblFormatNum = b) : (aTableConfig.bInsTblFormatNum = b);
+ bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();}
+
+ BOOL IsInsTblChangeNumFormat(BOOL bHTML) const
+ { return bHTML ? aWebTableConfig.bInsTblChangeNumFormat : aTableConfig.bInsTblChangeNumFormat; }
+ void SetInsTblChangeNumFormat( BOOL bHTML, BOOL b )
+ { bHTML ? (aWebTableConfig.bInsTblChangeNumFormat = b) : (aTableConfig.bInsTblChangeNumFormat = b);
+ bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();}
+
+
+ BOOL IsInsTblAlignNum(BOOL bHTML) const
+ { return bHTML ? aWebTableConfig.bInsTblAlignNum : aTableConfig.bInsTblAlignNum; }
+ void SetInsTblAlignNum( BOOL bHTML, BOOL b )
+ { bHTML ? (aWebTableConfig.bInsTblAlignNum = b) : (aTableConfig.bInsTblAlignNum = b);
+ bHTML ? aWebTableConfig.SetModified() : aTableConfig.SetModified();;}
+
+ SwInsertTableOptions GetInsTblFlags(BOOL bHTML) const
+ { return bHTML ? aWebInsertConfig.aInsTblOpts : aInsertConfig.aInsTblOpts;}
+ void SetInsTblFlags( BOOL bHTML, const SwInsertTableOptions& rOpts ) {
+ bHTML ? (aWebInsertConfig.aInsTblOpts = rOpts) : (aInsertConfig.aInsTblOpts = rOpts);
+ bHTML ? aWebInsertConfig.SetModified() : aInsertConfig.SetModified();}
+
+ const InsCaptionOpt* GetCapOption(BOOL bHTML, const SwCapObjType eType, const SvGlobalName *pOleId);
+ BOOL SetCapOption(BOOL bHTML, const InsCaptionOpt* pOpt);
+
+
+ BOOL IsGrfToGalleryAsLnk() const { return aMiscConfig.bGrfToGalleryAsLnk; }
+ void SetGrfToGalleryAsLnk( BOOL b ) { aMiscConfig.bGrfToGalleryAsLnk = b;
+ aMiscConfig.SetModified();}
+
+ sal_Int16 GetMailingFormats() const { return aMiscConfig.nMailingFormats;}
+ void SetMailingFormats( sal_Int16 nSet ) { aMiscConfig.nMailingFormats = nSet;
+ aMiscConfig.SetModified();}
+
+ BOOL IsSinglePrintJob() const { return aMiscConfig.bSinglePrintJob; }
+ void SetSinglePrintJob( BOOL b ) { aMiscConfig.bSinglePrintJob = b;
+ aMiscConfig.SetModified();}
+
+ BOOL IsNumAlignSize() const { return aMiscConfig.bNumAlignSize; }
+ void SetNumAlignSize( BOOL b ) { aMiscConfig.bNumAlignSize = b;
+ aMiscConfig.SetModified();}
+
+ BOOL IsNameFromColumn() const { return aMiscConfig.bIsNameFromColumn; }
+ void SetIsNameFromColumn( BOOL bSet )
+ {
+ aMiscConfig.SetModified();
+ aMiscConfig.bIsNameFromColumn = bSet;
+ }
+
+ BOOL IsAskForMailMerge() const { return aMiscConfig.bAskForMailMergeInPrint;}
+ void SetAskForMailMerge(BOOL bSet)
+ {
+ aMiscConfig.SetModified();
+ aMiscConfig.bAskForMailMergeInPrint = bSet;
+ }
+
+
+ const String& GetNameFromColumn() const { return aMiscConfig.sNameFromColumn; }
+ void SetNameFromColumn( const String& rSet ) { aMiscConfig.sNameFromColumn = rSet;
+ aMiscConfig.SetModified();}
+
+ String GetMailingPath() const { return aMiscConfig.sMailingPath; }
+ void SetMailingPath(const String& sPath) { aMiscConfig.sMailingPath = sPath;
+ aMiscConfig.SetModified();}
+
+ String GetMailName() const { return aMiscConfig.sMailName; }
+ void SetMailName(const String& sName){ aMiscConfig.sMailName = sName;
+ aMiscConfig.SetModified();}
+
+ const String &GetWordDelimiter() const { return aMiscConfig.sWordDelimiter; }
+ void SetWordDelimiter(const String& sDelim) { aMiscConfig.sWordDelimiter = sDelim;
+ aMiscConfig.SetModified();}
+
+ //convert word delimiter from or to user interface
+ static String ConvertWordDelimiter(const String& rDelim, BOOL bFromUI);
+
+ BOOL IsShowIndexPreview() const {return aMiscConfig.bShowIndexPreview;}
+ void SetShowIndexPreview(BOOL bSet)
+ {aMiscConfig.bShowIndexPreview = bSet;
+ aMiscConfig.SetModified();}
+
+ BOOL IsDefaultFontInCurrDocOnly() const { return aMiscConfig.bDefaultFontsInCurrDocOnly;}
+ void SetDefaultFontInCurrDocOnly(BOOL bSet)
+ {
+ aMiscConfig.bDefaultFontsInCurrDocOnly = bSet;
+ aMiscConfig.SetModified();
+ }
+
+ BOOL IsHideFieldTips() const {return bHideFieldTips;}
+ void SetHideFieldTips(BOOL bSet) {bHideFieldTips = bSet;}
+};
+#endif
+
diff --git a/sw/inc/modeltoviewhelper.hxx b/sw/inc/modeltoviewhelper.hxx
new file mode 100644
index 000000000000..2d97ca9b32fc
--- /dev/null
+++ b/sw/inc/modeltoviewhelper.hxx
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _MODELTOVIEWHELPER_HXX
+#define _MODELTOVIEWHELPER_HXX
+
+#include <sal/types.h>
+
+#include <vector>
+
+/** Some helpers for converting model strings to view strings.
+
+ A paragraph string does not have its fields expanded, i.e., they are
+ represented by a special character inside the string with an additional
+ attribute assigned to it. For some tasks (e.g., SmartTags) it is required
+ to expand the fields to get the string as it appears in the view. Two
+ helper functions are provided to convert model positions to view positions
+ and vice versa.
+*/
+namespace ModelToViewHelper
+{
+ /** For each field in the model string, there is an entry in the conversion
+ map. The first value of the ConversionMapEntry points to the field
+ position in the model string, the second value points to the associated
+ position in the view string. The last entry in the conversion map
+ denotes the lengths of the model resp. view string.
+ */
+ typedef std::pair< sal_uInt32 , sal_uInt32 > ConversionMapEntry;
+ typedef std::vector< ConversionMapEntry > ConversionMap;
+
+ /** This struct defines a position in the model string.
+
+ The 'main' position is given by mnPos. If there's a field located at
+ this position, mbIsField is set and mnSubPos denotes the position inside
+ that field.
+ */
+ struct ModelPosition
+ {
+ sal_uInt32 mnPos;
+ sal_uInt32 mnSubPos;
+ bool mbIsField;
+
+ ModelPosition() : mnPos(0), mnSubPos(0), mbIsField(false) {}
+ };
+
+ /** Converts a model position into a view position
+
+ @param pMap
+ pMap is the conversion map required for the calculation. If pMap is
+ 0, no conversion takes place, i.e., it is assumed that the model
+ string is identical to the view string.
+
+ @param nPos
+ nPos denotes a position in the model string which should be
+ converted. Note that converting model positions inside fields is
+ not supported, therefore nPos is not of type ModelPosition.
+
+ @return
+ the position of nPos in the view string. In case the conversion
+ could not be performed (e.g., because there is not ConversionMap or
+ nPos is behind the last entry in the conversion map) nPos will
+ be returned.
+ */
+ sal_uInt32 ConvertToViewPosition( const ConversionMap* pMap, sal_uInt32 nModelPos );
+
+ /** Converts a view position into a model position
+
+ @param pMap
+ pMap is the conversion map required for the calculation. If pMap is
+ 0, no conversion takes place, i.e., it is assumed that the model
+ string is identical to the view string.
+
+ @param nPos
+ nPos denotes a position in the view string which should be
+ converted.
+
+ @return
+ the position of nPos in the model string. In case the conversion
+ could not be performed (e.g., because there is not ConversionMap or
+ nPos is behind the last entry in the conversion map) a model
+ model position with mnPos = nPos and mnIsField = false will be
+ returned.
+ */
+ ModelPosition ConvertToModelPosition( const ConversionMap* pMap, sal_uInt32 nViewPos );
+}
+
+#endif
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
new file mode 100644
index 000000000000..dd822a11dfdd
--- /dev/null
+++ b/sw/inc/ndarr.hxx
@@ -0,0 +1,352 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_NDARR_HXX
+#define SW_NDARR_HXX
+
+#include <vector>
+
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+
+#include <svl/svarray.hxx>
+#include <svtools/embedhlp.hxx>
+
+#include <bparr.hxx>
+#include <ndtyp.hxx>
+
+
+class Graphic;
+class GraphicObject;
+class String;
+class SwAttrSet;
+class SfxItemSet;
+class SwCntntNode;
+class SwDoc;
+class SwGrfFmtColl;
+class SwGrfNode;
+class SwHistory;
+class SwNode;
+class SwNodeIndex;
+class SwNodeRange;
+class SwOLENode;
+class SwOutlineNodes;
+class SwPaM;
+class SwSectionData;
+class SwSectionFmt;
+class SwTOXBase;
+class SwSectionNode;
+class SwStartNode;
+class SwTableBoxFmt;
+class SwTableFmt;
+class SwTableLine;
+class SwTableLineFmt;
+class SwTableNode;
+class SwTblToTxtSaves;
+class SwTxtFmtColl;
+class SwTxtNode;
+class SwUndoTblToTxt;
+class SwUndoTxtToTbl;
+struct SwPosition;
+
+
+// --------------------
+// class SwNodes
+// --------------------
+
+typedef SwNode * SwNodePtr;
+typedef BOOL (*FnForEach_SwNodes)( const SwNodePtr&, void* pArgs );
+
+SV_DECL_PTRARR_SORT( SwOutlineNodes, SwNodePtr, 0, 10 )
+
+class SW_DLLPUBLIC SwNodes: private BigPtrArray
+{
+ friend class SwDoc;
+ friend class SwNode;
+ friend class SwNodeIndex;
+
+ SwNodeIndex* pRoot; // Liste aller Indizies auf Nodes
+
+ // --> OD 2008-05-14 #refactorlists# - removed <bSyncNumberAndNumRule>
+ void InsertNode( const SwNodePtr pNode,
+ const SwNodeIndex& rPos );
+ void InsertNode( const SwNodePtr pNode,
+ ULONG nPos );
+ // <--
+
+
+ SwDoc* pMyDoc; // in diesem Doc ist das Nodes-Array
+
+ SwNode *pEndOfPostIts, *pEndOfInserts, // das sind die festen Bereiche
+ *pEndOfAutotext, *pEndOfRedlines,
+ *pEndOfContent;
+
+ mutable SwOutlineNodes* pOutlineNds; // Array aller GliederiungsNodes
+
+ BOOL bInNodesDel : 1; // falls rekursiv aufgerufen wird
+ // Num/Outline nicht aktualisierem
+ BOOL bInDelUpdOutl : 1; // Flags fuers aktualisieren von Outl.
+ BOOL bInDelUpdNum : 1; // Flags fuers aktualisieren von Outl.
+
+ // fuer dier Verwaltung der Indizies
+ void RegisterIndex( SwNodeIndex& rIdx );
+ void DeRegisterIndex( SwNodeIndex& rIdx );
+ void RemoveNode( ULONG nDelPos, ULONG nLen, BOOL bDel );
+
+ // Aktionen auf die Nodes
+ void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd );
+ void DelNodes( const SwNodeIndex& rStart, ULONG nCnt = 1 );
+
+ void ChgNode( SwNodeIndex& rDelPos, ULONG nSize,
+ SwNodeIndex& rInsPos, BOOL bNewFrms );
+
+ void UpdtOutlineIdx( const SwNode& ); // Update ab Node alle OutlineNodes
+
+ void _CopyNodes( const SwNodeRange&, const SwNodeIndex&,
+ BOOL bNewFrms = TRUE, BOOL bTblInsDummyNode = FALSE ) const;
+ void _DelDummyNodes( const SwNodeRange& rRg );
+
+protected:
+ SwNodes( SwDoc* pDoc );
+
+public:
+ ~SwNodes();
+
+ typedef ::std::vector<SwNodeRange> NodeRanges_t;
+ typedef ::std::vector<NodeRanges_t> TableRanges_t;
+
+ SwNodePtr operator[]( ULONG n ) const
+ { return (SwNodePtr)BigPtrArray::operator[] ( n ); }
+
+//JP 29.09.97: impl. steht im ndindex.hxx - sollte moeglichst bald auf die
+// neue Schnittstelle angepasst werden
+ inline SwNodePtr operator[]( const SwNodeIndex& rIdx ) const;
+
+ ULONG Count() const { return BigPtrArray::Count(); }
+ void ForEach( FnForEach_SwNodes fnForEach, void* pArgs = 0 )
+ {
+ BigPtrArray::ForEach( 0, BigPtrArray::Count(),
+ (FnForEach) fnForEach, pArgs );
+ }
+ void ForEach( ULONG nStt, ULONG nEnd, FnForEach_SwNodes fnForEach, void* pArgs = 0 )
+ {
+ BigPtrArray::ForEach( nStt, nEnd, (FnForEach) fnForEach, pArgs );
+ }
+ void ForEach( const SwNodeIndex& rStart, const SwNodeIndex& rEnd,
+ FnForEach_SwNodes fnForEach, void* pArgs = 0 );
+
+ // eine noch leere Section
+ SwNode& GetEndOfPostIts() const { return *pEndOfPostIts; }
+ // Section fuer alle Fussnoten
+ SwNode& GetEndOfInserts() const { return *pEndOfInserts; }
+ // Section fuer alle Flys/Header/Footers
+ SwNode& GetEndOfAutotext() const { return *pEndOfAutotext; }
+ // Section fuer alle Redlines
+ SwNode& GetEndOfRedlines() const { return *pEndOfRedlines; }
+ // das ist der letzte EndNode einer SonderSection. Hier nach kommt nur
+ // noch die normale ContentSection (also der BodyText)
+ SwNode& GetEndOfExtras() const { return *pEndOfRedlines; }
+ // die normale ContentSection (also der BodyText)
+ SwNode& GetEndOfContent() const { return *pEndOfContent; }
+
+ // ist das NodesArray das normale vom Doc? (nicht das UndoNds, .. )
+ // Implementierung steht im doc.hxx (weil man dazu Doc kennen muss) !
+ BOOL IsDocNodes() const;
+
+ USHORT GetSectionLevel(const SwNodeIndex &rIndex) const;
+ void Delete(const SwNodeIndex &rPos, ULONG nNodes = 1);
+
+ BOOL _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&,
+ BOOL bNewFrms = TRUE );
+ void MoveRange( SwPaM&, SwPosition&, SwNodes& rNodes );
+
+ void _Copy( const SwNodeRange& rRg, const SwNodeIndex& rInsPos,
+ BOOL bNewFrms = TRUE ) const
+ { _CopyNodes( rRg, rInsPos, bNewFrms ); }
+
+ void SectionUp( SwNodeRange *);
+ void SectionDown( SwNodeRange *pRange, SwStartNodeType = SwNormalStartNode );
+
+ BOOL CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const;
+
+ void GoStartOfSection(SwNodeIndex *) const;
+ void GoEndOfSection(SwNodeIndex *) const;
+
+ SwCntntNode* GoNext(SwNodeIndex *) const;
+ SwCntntNode* GoPrevious(SwNodeIndex *) const;
+
+ //Gehe zum naechsten/vorherigen Cntnt/Tabellennode, fuer den
+ //es LayoutFrames gibt, dabei Kopf-/Fusszeilen/Rahmen etc. nicht verlassen
+ SwNode* GoNextWithFrm(SwNodeIndex *) const;
+ SwNode* GoPreviousWithFrm(SwNodeIndex *) const;
+
+ // zum naechsten Content-Node, der nicht geschuetzt oder versteckt ist
+ // (beides auf FALSE ==> GoNext/GoPrevious!!!)
+ SwCntntNode* GoNextSection( SwNodeIndex *, int bSkipHidden = TRUE,
+ int bSkipProtect = TRUE ) const;
+ SwCntntNode* GoPrevSection( SwNodeIndex *, int bSkipHidden = TRUE,
+ int bSkipProtect = TRUE ) const;
+
+ // erzeuge ein leere Section von Start und EndNode. Darf nur gerufen
+ // werden, wenn eine neue Section mit Inhalt erzeugt werden soll.
+ // Zum Beispiel bei den Filtern/Undo/...
+ SwStartNode* MakeEmptySection( const SwNodeIndex& rIdx,
+ SwStartNodeType = SwNormalStartNode );
+
+ // die Impl. von "Make...Node" stehen in den angegebenen .ccx-Files
+ SwTxtNode *MakeTxtNode( const SwNodeIndex & rWhere,
+ SwTxtFmtColl *pColl,
+ SwAttrSet* pAutoAttr = 0 ); // in ndtxt.cxx
+ SwStartNode* MakeTextSection( const SwNodeIndex & rWhere,
+ SwStartNodeType eSttNdTyp,
+ SwTxtFmtColl *pColl,
+ SwAttrSet* pAutoAttr = 0 );
+
+ SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere,
+ const String& rGrfName,
+ const String& rFltName,
+ const Graphic* pGraphic,
+ SwGrfFmtColl *pColl,
+ SwAttrSet* pAutoAttr = 0,
+ BOOL bDelayed = FALSE ); // in ndgrf.cxx
+
+ SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere,
+ const GraphicObject& rGrfObj,
+ SwGrfFmtColl *pColl,
+ SwAttrSet* pAutoAttr = 0 ); // in ndgrf.cxx
+
+ SwOLENode *MakeOLENode( const SwNodeIndex & rWhere,
+ const svt::EmbeddedObjectRef&,
+ SwGrfFmtColl *pColl,
+ SwAttrSet* pAutoAttr = 0 ); // in ndole.cxx
+ SwOLENode *MakeOLENode( const SwNodeIndex & rWhere,
+ const String &rName,
+ sal_Int64 nAspect,
+ SwGrfFmtColl *pColl,
+ SwAttrSet* pAutoAttr ); // in ndole.cxx
+
+ // Array aller GliederiungsNodes;
+ const SwOutlineNodes& GetOutLineNds() const;
+
+ //void UpdateOutlineNode( const SwNode&, BYTE nOldLevel, BYTE nNewLevel );//#outline level,removed by zhaojianwei
+ // alle Nodes Updaten - Rule/Format-Aenderung
+ void UpdateOutlineNode(SwNode & rNd);
+
+ // fuege die Nodes fuer die Tabelle ein
+ // wenn Lines angegeben, erzeuge die Matrix aus Lines & Boxen
+ // ansonsten nur die Anzahl von Boxen.
+ /* #109161#
+
+ New parameter pAttrSet: If pAttrSet is non-null and contains an
+ adjust item it is propagated to the table cells. If there is an
+ adjust in pCntntTxtColl or pHeadlineTxtColl this adjust item
+ overrides the item in pAttrSet.
+
+ */
+ SwTableNode* InsertTable( const SwNodeIndex& rNdIdx,
+ USHORT nBoxes, SwTxtFmtColl* pCntntTxtColl,
+ USHORT nLines = 0, USHORT nRepeat = 0,
+ SwTxtFmtColl* pHeadlineTxtColl = 0,
+ const SwAttrSet * pAttrSet = 0);
+
+ // erzeuge aus dem makierten Bereich eine ausgeglichene Tabelle
+ SwTableNode* TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
+ SwTableFmt* pTblFmt,
+ SwTableLineFmt* pLineFmt,
+ SwTableBoxFmt* pBoxFmt,
+ SwTxtFmtColl* pTxtColl,
+ SwUndoTxtToTbl* pUndo = 0 );
+
+ SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange);
+
+ //create a table from a vector of NodeRanges - API support
+ SwTableNode* TextToTable( const TableRanges_t& rTableNodes,
+ SwTableFmt* pTblFmt,
+ SwTableLineFmt* pLineFmt,
+ SwTableBoxFmt* pBoxFmt,
+ SwTxtFmtColl* pTxtColl
+ /*, SwUndo... pUndo*/ );
+
+ // erzeuge aus der Tabelle wieder normalen Text
+ BOOL TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
+ SwUndoTblToTxt* = 0 );
+ // steht im untbl.cxx und darf nur vom Undoobject gerufen werden
+ SwTableNode* UndoTableToText( ULONG nStt, ULONG nEnd,
+ const SwTblToTxtSaves& rSavedData );
+
+ // fuege in der Line, vor der InsPos eine neue Box ein. Das Format
+ // wird von der nachfolgenden (vorhergenden;wenn an Ende) genommen
+ // in der Line muss schon eine Box vorhanden sein !
+ BOOL InsBoxen( SwTableNode*, SwTableLine*, SwTableBoxFmt*,
+ // Formate fuer den TextNode der Box
+ SwTxtFmtColl*, const SfxItemSet* pAutoAttr,
+ USHORT nInsPos, USHORT nCnt = 1 );
+ // Splittet eine Tabelle in der Grund-Zeile, in der der Index steht.
+ // Alle GrundZeilen dahinter wandern in eine neue Tabelle/-Node.
+ // Ist das Flag bCalcNewSize auf TRUE, wird fuer beide neuen Tabellen
+ // die neue SSize aus dem Max der Boxen errechnet; vorrausgesetzt,
+ // die SSize ist "absolut" gesetzt (LONG_MAX)
+ // (Wird zur Zeit nur fuer den RTF-Parser benoetigt)
+ SwTableNode* SplitTable( const SwNodeIndex& rPos, BOOL bAfter = TRUE,
+ BOOL bCalcNewSize = FALSE );
+ // fuegt 2 Tabellen, die hintereinander stehen, wieder zusammen
+ BOOL MergeTable( const SwNodeIndex& rPos, BOOL bWithPrev = TRUE,
+ USHORT nMode = 0, SwHistory* pHistory = 0 );
+
+ // fuege eine neue SwSection ein
+ SwSectionNode* InsertTextSection(SwNodeIndex const& rNdIdx,
+ SwSectionFmt& rSectionFmt,
+ SwSectionData const&,
+ SwTOXBase const*const pTOXBase,
+ SwNodeIndex const*const pEnde,
+ bool const bInsAtStart = true,
+ bool const bCreateFrms = true);
+
+ // in welchem Doc steht das Nodes-Array ?
+ SwDoc* GetDoc() { return pMyDoc; }
+ const SwDoc* GetDoc() const { return pMyDoc; }
+
+ // suche den vorhergehenden [/nachfolgenden ] ContentNode oder
+ // TabellenNode mit Frames. Wird kein Ende angeben, dann wird mit
+ // dem FrameIndex begonnen; ansonsten, wird mit dem vor rFrmIdx und
+ // dem hintern pEnd die Suche gestartet. Sollte kein gueltiger Node
+ // gefunden werden, wird 0 returnt. rFrmIdx zeigt auf dem Node mit
+ // Frames
+ SwNode* FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
+ const SwNode* pEnd = 0 ) const;
+
+ //-> #112139#
+ SwNode * DocumentSectionStartNode(SwNode * pNode) const;
+ SwNode * DocumentSectionEndNode(SwNode * pNode) const;
+ //<- #112139#
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwNodes( const SwNodes & rNodes );
+};
+
+
+
+#endif
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
new file mode 100644
index 000000000000..748dceed0c83
--- /dev/null
+++ b/sw/inc/ndgrf.hxx
@@ -0,0 +1,257 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _NDGRF_HXX
+#define _NDGRF_HXX
+#include <sfx2/lnkbase.hxx>
+#include <svtools/grfmgr.hxx>
+#include <ndnotxt.hxx>
+// --> OD, MAV 2005-08-17 #i53025#
+#include <com/sun/star/embed/XStorage.hpp>
+// <--
+// --> OD 2007-03-28 #i73788#
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+class SwAsyncRetrieveInputStreamThreadConsumer;
+// <--
+
+class SwGrfFmtColl;
+class SwDoc;
+class GraphicAttr;
+class SvStorage;
+// --------------------
+// SwGrfNode
+// --------------------
+class SW_DLLPUBLIC SwGrfNode: public SwNoTxtNode
+{
+ friend class SwNodes;
+
+ GraphicObject aGrfObj;
+ ::sfx2::SvBaseLinkRef refLink; // falls Grafik nur als Link, dann Pointer gesetzt
+ Size nGrfSize;
+// String aStrmName; // SW3: Name des Storage-Streams fuer Embedded
+ String aNewStrmName; // SW3/XML: new stream name (either SW3 stream
+ // name or package url)
+ String aLowResGrf; // HTML: LowRes Grafik (Ersatzdarstellung bis
+ // die normale (HighRes) geladen ist.
+ BOOL bTransparentFlagValid :1;
+ BOOL bInSwapIn :1;
+
+ BOOL bGrafikArrived :1;
+ BOOL bChgTwipSize :1;
+ BOOL bChgTwipSizeFromPixel :1;
+ BOOL bLoadLowResGrf :1;
+ BOOL bFrameInPaint :1; //Um Start-/EndActions im Paint (ueber
+ //SwapIn zu verhindern.
+ BOOL bScaleImageMap :1; //Image-Map in SetTwipSize skalieren
+
+ // --> OD 2007-01-19 #i73788#
+ boost::shared_ptr< SwAsyncRetrieveInputStreamThreadConsumer > mpThreadConsumer;
+ bool mbLinkedInputStreamReady;
+ com::sun::star::uno::Reference<com::sun::star::io::XInputStream> mxInputStream;
+ sal_Bool mbIsStreamReadOnly;
+ // <--
+
+ SwGrfNode( const SwNodeIndex& rWhere,
+ const String& rGrfName, const String& rFltName,
+ const Graphic* pGraphic,
+ SwGrfFmtColl* pGrfColl,
+ SwAttrSet* pAutoAttr = 0 );
+ // Ctor fuer Einlesen (SW/G) ohne Grafik
+ SwGrfNode( const SwNodeIndex& rWhere,
+ const String& rGrfName, const String& rFltName,
+ SwGrfFmtColl* pGrfColl,
+ SwAttrSet* pAutoAttr = 0 );
+ SwGrfNode( const SwNodeIndex& rWhere,
+ const GraphicObject& rGrfObj,
+ SwGrfFmtColl* pGrfColl,
+ SwAttrSet* pAutoAttr = 0 );
+
+ void InsertLink( const String& rGrfName, const String& rFltName );
+ BOOL ImportGraphic( SvStream& rStrm );
+ BOOL HasStreamName() const { return aGrfObj.HasUserData(); }
+ // --> OD 2005-05-04 #i48434# - adjust return type and rename method to
+ // indicate that its an private one.
+ // --> OD 2005-08-17 #i53025#
+ // embedded graphic stream couldn't be inside a 3.1 - 5.2 storage any more.
+ // Thus, return value isn't needed any more.
+ void _GetStreamStorageNames( String& rStrmName, String& rStgName ) const;
+ // <--
+ void DelStreamName();
+ DECL_LINK( SwapGraphic, GraphicObject* );
+
+ /** helper method to determine stream for the embedded graphic.
+
+ OD 2005-05-04 #i48434#
+ Important note: caller of this method has to handle the thrown exceptions
+ OD, MAV 2005-08-17 #i53025#
+ Storage, which should contain the stream of the embedded graphic, is
+ provided via parameter. Otherwise the returned stream will be closed
+ after the the method returns, because its parent stream is closed and deleted.
+ Proposed name of embedded graphic stream is also provided by parameter.
+
+ @author OD
+
+ @param _refPics
+ input parameter - reference to storage, which should contain the
+ embedded graphic stream.
+
+ @param _aStrmName
+ input parameter - proposed name of the embedded graphic stream.
+
+ @return SvStream*
+ new created stream of the embedded graphic, which has to be destroyed
+ after its usage. Could be NULL, if the stream isn't found.
+ */
+ SvStream* _GetStreamForEmbedGrf(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _refPics,
+ String& _aStrmName ) const;
+
+ /** helper method to get a substorage of the document storage for readonly access.
+
+ OD, MAV 2005-08-17 #i53025#
+ A substorage with the specified name will be opened readonly. If the provided
+ name is empty the root storage will be returned.
+
+ @param _aStgName
+ input parameter - name of substorage. Can be empty.
+
+ @return XStorage
+ reference to substorage or the root storage
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > _GetDocSubstorageOrRoot(
+ const String& aStgName ) const;
+
+public:
+ virtual ~SwGrfNode();
+ const Graphic& GetGrf() const { return aGrfObj.GetGraphic(); }
+ const GraphicObject& GetGrfObj() const { return aGrfObj; }
+ GraphicObject& GetGrfObj() { return aGrfObj; }
+
+ virtual SwCntntNode *SplitCntntNode( const SwPosition & );
+
+ virtual Size GetTwipSize() const;
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+ void SetTwipSize( const Size& rSz );
+
+ BOOL IsTransparent() const;
+
+ inline BOOL IsAnimated() const { return aGrfObj.IsAnimated(); }
+
+ inline BOOL IsChgTwipSize() const { return bChgTwipSize; }
+ inline BOOL IsChgTwipSizeFromPixel() const { return bChgTwipSizeFromPixel; }
+ inline void SetChgTwipSize( BOOL b, BOOL bFromPx=FALSE ) { bChgTwipSize = b; bChgTwipSizeFromPixel = bFromPx; }
+
+ inline BOOL IsGrafikArrived() const { return bGrafikArrived; }
+ inline void SetGrafikArrived( BOOL b ) { bGrafikArrived = b; }
+
+ inline BOOL IsFrameInPaint() const { return bFrameInPaint; }
+ inline void SetFrameInPaint( BOOL b ) { bFrameInPaint = b; }
+
+ inline BOOL IsScaleImageMap() const { return bScaleImageMap; }
+ inline void SetScaleImageMap( BOOL b ) { bScaleImageMap = b; }
+#endif
+ // steht in ndcopy.cxx
+ virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+
+ // erneutes Einlesen, falls Graphic nicht Ok ist. Die
+ // aktuelle wird durch die neue ersetzt.
+ BOOL ReRead( const String& rGrfName, const String& rFltName,
+ const Graphic* pGraphic = 0,
+ const GraphicObject* pGrfObj = 0,
+ BOOL bModify = TRUE );
+ // Laden der Grafik unmittelbar vor der Anzeige
+ short SwapIn( BOOL bWaitForData = FALSE );
+ // Entfernen der Grafik, um Speicher freizugeben
+ short SwapOut();
+ // Zugriff auf den Storage-Streamnamen
+ void SetStreamName( const String& r ) { aGrfObj.SetUserData( r ); }
+ void SetNewStreamName( const String& r ) { aNewStrmName = r; }
+ // is this node selected by any shell?
+ BOOL IsSelected() const;
+#endif
+
+ // Der Grafik sagen, dass sich der Node im Undobereich befindet
+ virtual BOOL SavePersistentData();
+ virtual BOOL RestorePersistentData();
+
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+ // Abfrage der Link-Daten
+ BOOL IsGrfLink() const { return refLink.Is(); }
+ inline BOOL IsLinkedFile() const;
+ inline BOOL IsLinkedDDE() const;
+ ::sfx2::SvBaseLinkRef GetLink() const { return refLink; }
+ BOOL GetFileFilterNms( String* pFileNm, String* pFilterNm ) const;
+ void ReleaseLink();
+
+ // Skalieren einer Image-Map: Die Image-Map wird um den Faktor
+ // zwischen Grafik-Groesse und Rahmen-Groesse vergroessert/verkleinert
+ void ScaleImageMap();
+
+ // returns the with our graphic attributes filled Graphic-Attr-Structure
+ GraphicAttr& GetGraphicAttr( GraphicAttr&, const SwFrm* pFrm ) const;
+
+#endif
+ // --> OD 2007-01-18 #i73788#
+ boost::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > GetThreadConsumer();
+ bool IsLinkedInputStreamReady() const;
+ void TriggerAsyncRetrieveInputStream();
+ void ApplyInputStream(
+ com::sun::star::uno::Reference<com::sun::star::io::XInputStream> xInputStream,
+ const sal_Bool bIsStreamReadOnly );
+ void UpdateLinkWithInputStream();
+ // <--
+ // --> OD 2008-07-21 #i90395#
+ bool IsAsyncRetrieveInputStreamPossible() const;
+ // <--
+};
+
+
+// ----------------------------------------------------------------------
+// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+inline SwGrfNode *SwNode::GetGrfNode()
+{
+ return ND_GRFNODE == nNodeType ? (SwGrfNode*)this : 0;
+}
+inline const SwGrfNode *SwNode::GetGrfNode() const
+{
+ return ND_GRFNODE == nNodeType ? (const SwGrfNode*)this : 0;
+}
+
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+inline BOOL SwGrfNode::IsLinkedFile() const
+{
+ return refLink.Is() && OBJECT_CLIENT_GRF == refLink->GetObjType();
+}
+inline BOOL SwGrfNode::IsLinkedDDE() const
+{
+ return refLink.Is() && OBJECT_CLIENT_DDE == refLink->GetObjType();
+}
+#endif
+
+
+#endif
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
new file mode 100644
index 000000000000..c1d210464eb3
--- /dev/null
+++ b/sw/inc/ndhints.hxx
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _NDHINTS_HXX
+#define _NDHINTS_HXX
+
+
+#include <svl/svarray.hxx>
+#include <tools/mempool.hxx>
+
+#include "swtypes.hxx"
+
+//#include "numrule.hxx"
+
+class SwTxtNode;
+class SwRegHistory; // steht im RolBck.hxx
+class SwTxtAttr;
+class SwTxtAttrNesting;
+
+class SfxPoolItem;
+class SfxItemSet;
+class SwDoc;
+
+SW_DLLPRIVATE SwTxtAttr *
+MakeTxtAttr( SwDoc & rDoc, SfxPoolItem & rNew,
+ xub_StrLen nStt, xub_StrLen nEnd );
+SW_DLLPRIVATE SwTxtAttr *
+MakeTxtAttr( SwDoc & rDoc, const SfxItemSet & rSet,
+ xub_StrLen nStt, xub_StrLen nEnd );
+
+// create redline dummy text hint that must not be inserted into hints array
+SW_DLLPRIVATE SwTxtAttr*
+MakeRedlineTxtAttr( SwDoc & rDoc, SfxPoolItem& rAttr );
+
+
+/*
+ * Ableitung der Klasse SwpHints ueber den Umweg ueber SwpHts, da
+ * lediglich die Klasse SwTxtNode Attribute einfuegen und
+ * loeschen koennen soll. Anderen Klassen wie den Frames steht
+ * lediglich ein lesender Zugriff ueber den Index-Operator zur
+ * Verfuegung.
+ * Groesse beim Anlegen gleich 1, weil nur dann ein Array erzeug wird, wenn
+ * auch ein Hint eingefuegt wird.
+ */
+
+/*************************************************************************
+ * class SwpHtStart/End
+ *************************************************************************/
+
+SV_DECL_PTRARR_SORT(SwpHtStart,SwTxtAttr*,1,1)
+SV_DECL_PTRARR_SORT(SwpHtEnd,SwTxtAttr*,1,1)
+
+/*************************************************************************
+ * class SwpHintsArr
+ *************************************************************************/
+
+/// the Hints array
+class SwpHintsArray
+{
+
+protected:
+ SwpHtStart m_HintStarts;
+ SwpHtEnd m_HintEnds;
+
+ //FIXME: why are the non-const methods public?
+public:
+ void Insert( const SwTxtAttr *pHt );
+ void DeleteAtPos( const USHORT nPosInStart );
+ bool Resort();
+ SwTxtAttr * Cut( const USHORT nPosInStart );
+
+ inline const SwTxtAttr * GetStart( const USHORT nPos ) const
+ { return m_HintStarts[nPos]; }
+ inline const SwTxtAttr * GetEnd ( const USHORT nPos ) const
+ { return m_HintEnds [nPos]; }
+ inline SwTxtAttr * GetStart( const USHORT nPos )
+ { return m_HintStarts[nPos]; }
+ inline SwTxtAttr * GetEnd ( const USHORT nPos )
+ { return m_HintEnds [nPos]; }
+
+ inline USHORT GetEndCount() const { return m_HintEnds .Count(); }
+ inline USHORT GetStartCount() const { return m_HintStarts.Count(); }
+
+ inline USHORT GetStartOf( const SwTxtAttr *pHt ) const;
+ inline USHORT GetPos( const SwTxtAttr *pHt ) const
+ { return m_HintStarts.GetPos( pHt ); }
+
+ inline SwTxtAttr * GetTextHint( const USHORT nIdx )
+ { return GetStart(nIdx); }
+ inline const SwTxtAttr * operator[]( const USHORT nIdx ) const
+ { return m_HintStarts[nIdx]; }
+ inline USHORT Count() const { return m_HintStarts.Count(); }
+
+#ifdef DBG_UTIL
+ bool Check() const;
+#endif
+};
+
+/*************************************************************************
+ * class SwpHints
+ *************************************************************************/
+
+// public interface
+class SwpHints : public SwpHintsArray
+{
+private:
+ SwRegHistory* m_pHistory; // for Undo
+
+ bool m_bFontChange : 1; // font change
+ // true: the Node is in Split and Frames are moved
+ bool m_bInSplitNode : 1;
+ // m_bHasHiddenParaField is invalid, call CalcHiddenParaField()
+ bool m_bCalcHiddenParaField : 1;
+ bool m_bHasHiddenParaField : 1; // HiddenParaFld
+ bool m_bFootnote : 1; // footnotes
+ bool m_bDDEFields : 1; // the TextNode has DDE fields
+
+ // records a new attibute in m_pHistory.
+ void NoteInHistory( SwTxtAttr *pAttr, const bool bNew = false );
+
+ void CalcFlags( );
+
+ // Delete methods may only be called by the TextNode!
+ // Because the TextNode also guarantees removal of the Character for
+ // attributes without an end.
+ friend class SwTxtNode;
+ void DeleteAtPos( const USHORT nPos );
+ // Delete the given Hint. The Hint must actually be in the array!
+ void Delete( SwTxtAttr* pTxtHt );
+
+ inline void SetInSplitNode(bool bInSplit) { m_bInSplitNode = bInSplit; }
+ inline void SetCalcHiddenParaField() { m_bCalcHiddenParaField = true; }
+ inline void SetHiddenParaField( const bool bNew )
+ { m_bHasHiddenParaField = bNew; }
+ inline bool HasHiddenParaField() const
+ {
+ if ( m_bCalcHiddenParaField )
+ {
+ (const_cast<SwpHints*>(this))->CalcHiddenParaField();
+ }
+ return m_bHasHiddenParaField;
+ }
+
+ void InsertNesting(SwTxtAttrNesting & rNewHint);
+ bool TryInsertNesting(SwTxtNode & rNode, SwTxtAttrNesting & rNewHint);
+ void BuildPortions( SwTxtNode& rNode, SwTxtAttr& rNewHint,
+ const SetAttrMode nMode );
+ bool MergePortions( SwTxtNode& rNode );
+
+public:
+ SwpHints();
+
+ inline bool CanBeDeleted() const { return !Count(); }
+
+ // register a History, which receives all attribute changes (for Undo)
+ void Register( SwRegHistory* pHist ) { m_pHistory = pHist; }
+ // deregister the currently registered History
+ void DeRegister() { Register(0); }
+ SwRegHistory* GetHistory() const { return m_pHistory; }
+
+ /// try to insert the hint
+ /// @return true iff hint successfully inserted
+ bool TryInsertHint( SwTxtAttr * const pHint, SwTxtNode & rNode,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+
+ inline bool HasFtn() const { return m_bFootnote; }
+ inline bool IsInSplitNode() const { return m_bInSplitNode; }
+
+ // calc current value of m_bHasHiddenParaField, returns true iff changed
+ bool CalcHiddenParaField();
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwpHints)
+};
+
+// Ausgabeoperator fuer die Texthints
+SvStream &operator<<(SvStream &aS, const SwpHints &rHints); //$ ostream
+
+/*************************************************************************
+ * Inline Implementations
+ *************************************************************************/
+
+inline USHORT SwpHintsArray::GetStartOf( const SwTxtAttr *pHt ) const
+{
+ USHORT nPos;
+ if ( !m_HintStarts.Seek_Entry( pHt, &nPos ) )
+ {
+ nPos = USHRT_MAX;
+ }
+ return nPos;
+}
+
+inline SwTxtAttr *SwpHintsArray::Cut( const USHORT nPosInStart )
+{
+ SwTxtAttr *pHt = GetTextHint(nPosInStart);
+ DeleteAtPos( nPosInStart );
+ return pHt;
+}
+
+
+#endif
diff --git a/sw/inc/ndindex.hxx b/sw/inc/ndindex.hxx
new file mode 100644
index 000000000000..3c3a71dd8641
--- /dev/null
+++ b/sw/inc/ndindex.hxx
@@ -0,0 +1,252 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _NDINDEX_HXX
+#define _NDINDEX_HXX
+
+#include <limits.h>
+#include <tools/solar.h>
+
+#include "node.hxx"
+#include "ndarr.hxx"
+
+class SwNode;
+class SwNodes;
+
+class SW_DLLPUBLIC SwNodeIndex
+{
+ friend void SwNodes::RegisterIndex( SwNodeIndex& );
+ friend void SwNodes::DeRegisterIndex( SwNodeIndex& );
+ friend void SwNodes::RemoveNode( ULONG, ULONG, BOOL );
+
+#ifdef DBG_UTIL
+ static int nSerial;
+ int MySerial;
+#endif
+
+ SwNode* pNd;
+ SwNodeIndex *pNext, *pPrev;
+
+ void Remove(); // Ausketten
+
+ // diese sind nicht erlaubt!
+ SwNodeIndex( SwNodes& rNds, USHORT nIdx );
+ SwNodeIndex( SwNodes& rNds, int nIdx );
+
+public:
+ SwNodeIndex( SwNodes& rNds, ULONG nIdx = 0 );
+ SwNodeIndex( const SwNodeIndex &, long nDiff = 0 );
+ SwNodeIndex( const SwNode&, long nDiff = 0 );
+ ~SwNodeIndex() { Remove(); }
+
+ inline ULONG operator++();
+ inline ULONG operator--();
+#ifndef CFRONT
+ inline ULONG operator++(int);
+ inline ULONG operator--(int);
+#endif
+
+ inline ULONG operator+=( ULONG );
+ inline ULONG operator-=( ULONG );
+ inline ULONG operator+=( const SwNodeIndex& );
+ inline ULONG operator-=( const SwNodeIndex& );
+
+ inline BOOL operator< ( const SwNodeIndex& ) const;
+ inline BOOL operator<=( const SwNodeIndex& ) const;
+ inline BOOL operator> ( const SwNodeIndex& ) const;
+ inline BOOL operator>=( const SwNodeIndex& ) const;
+ inline BOOL operator==( const SwNodeIndex& ) const;
+ inline BOOL operator!=( const SwNodeIndex& ) const;
+
+ inline BOOL operator< ( ULONG nWert ) const;
+ inline BOOL operator<=( ULONG nWert ) const;
+ inline BOOL operator> ( ULONG nWert ) const;
+ inline BOOL operator>=( ULONG nWert ) const;
+ inline BOOL operator==( ULONG nWert ) const;
+ inline BOOL operator!=( ULONG nWert ) const;
+
+ inline SwNodeIndex& operator=( ULONG );
+ SwNodeIndex& operator=( const SwNodeIndex& );
+ SwNodeIndex& operator=( const SwNode& );
+
+ // gebe den Wert vom Index als ULONG zurueck
+ inline ULONG GetIndex() const;
+
+ // ermoeglicht Zuweisungen ohne Erzeugen eines temporaeren Objektes
+ SwNodeIndex& Assign( SwNodes& rNds, ULONG );
+ SwNodeIndex& Assign( const SwNode& rNd, long nOffset = 0 );
+
+ // Herausgabe des Pointers auf das NodesArray,
+ inline const SwNodes& GetNodes() const;
+ inline SwNodes& GetNodes();
+
+ SwNode& GetNode() const { return *pNd; }
+};
+
+/*
+ * SwRange
+ */
+class SW_DLLPUBLIC SwNodeRange
+{
+public:
+ SwNodeIndex aStart;
+ SwNodeIndex aEnd;
+
+ SwNodeRange( const SwNodeIndex &rS, const SwNodeIndex &rE );
+ SwNodeRange( const SwNodeRange &rRange );
+
+ SwNodeRange( SwNodes& rArr, ULONG nSttIdx = 0, ULONG nEndIdx = 0 );
+ SwNodeRange( const SwNodeIndex& rS, long nSttDiff,
+ const SwNodeIndex& rE, long nEndDiff = 0 );
+ SwNodeRange( const SwNode& rS, long nSttDiff,
+ const SwNode& rE, long nEndDiff = 0 );
+};
+
+
+
+
+// fuer die inlines wird aber der node.hxx benoetigt. Dieses braucht aber
+// auch wieder dieses. Also alle Inlines, die auf pNd zugreifen werden
+// hier implementiert.
+
+inline ULONG SwNodeIndex::GetIndex() const
+{
+ return pNd->GetIndex();
+}
+inline const SwNodes& SwNodeIndex::GetNodes() const
+{
+ return pNd->GetNodes();
+}
+inline SwNodes& SwNodeIndex::GetNodes()
+{
+ return pNd->GetNodes();
+}
+inline BOOL SwNodeIndex::operator< ( ULONG nWert ) const
+{
+ return pNd->GetIndex() < nWert;
+}
+inline BOOL SwNodeIndex::operator<=( ULONG nWert ) const
+{
+ return pNd->GetIndex() <= nWert;
+}
+inline BOOL SwNodeIndex::operator> ( ULONG nWert ) const
+{
+ return pNd->GetIndex() > nWert;
+}
+inline BOOL SwNodeIndex::operator>=( ULONG nWert ) const
+{
+ return pNd->GetIndex() >= nWert;
+}
+inline BOOL SwNodeIndex::operator==( ULONG nWert ) const
+{
+ return pNd->GetIndex() == nWert;
+}
+inline BOOL SwNodeIndex::operator!=( ULONG nWert ) const
+{
+ return pNd->GetIndex() != nWert;
+}
+inline BOOL SwNodeIndex::operator<( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() < rIndex.GetIndex();
+}
+inline BOOL SwNodeIndex::operator<=( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() <= rIndex.GetIndex();
+}
+inline BOOL SwNodeIndex::operator>( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() > rIndex.GetIndex();
+}
+inline BOOL SwNodeIndex::operator>=( const SwNodeIndex& rIndex ) const
+{
+ return pNd->GetIndex() >= rIndex.GetIndex();
+}
+inline BOOL SwNodeIndex::operator==( const SwNodeIndex& rIdx ) const
+{
+ return pNd == rIdx.pNd;
+}
+inline BOOL SwNodeIndex::operator!=( const SwNodeIndex& rIdx ) const
+{
+ return pNd != rIdx.pNd;
+}
+
+inline ULONG SwNodeIndex::operator++()
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex()+1 ] )->GetIndex();
+}
+inline ULONG SwNodeIndex::operator--()
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex()-1 ] )->GetIndex();
+}
+#ifndef CFRONT
+inline ULONG SwNodeIndex::operator++(int)
+{
+ ULONG nOldIndex = pNd->GetIndex();
+ pNd = GetNodes()[ nOldIndex + 1 ];
+ return nOldIndex;
+}
+inline ULONG SwNodeIndex::operator--(int)
+{
+ ULONG nOldIndex = pNd->GetIndex();
+ pNd = GetNodes()[ nOldIndex - 1 ];
+ return nOldIndex;
+}
+#endif
+
+inline ULONG SwNodeIndex::operator+=( ULONG nWert )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() + nWert ] )->GetIndex();
+}
+inline ULONG SwNodeIndex::operator-=( ULONG nWert )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() - nWert ] )->GetIndex();
+}
+inline ULONG SwNodeIndex::operator+=( const SwNodeIndex& rIndex )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() + rIndex.GetIndex() ] )->GetIndex();
+}
+inline ULONG SwNodeIndex::operator-=( const SwNodeIndex& rIndex )
+{
+ return ( pNd = GetNodes()[ pNd->GetIndex() - rIndex.GetIndex() ] )->GetIndex();
+}
+
+inline SwNodeIndex& SwNodeIndex::operator=( ULONG nWert )
+{
+ pNd = GetNodes()[ nWert ];
+ return *this;
+}
+
+
+
+//JP 29.09.97: impl. steht im ndindex.hxx - sollte moeglichst bald auf die
+// neue Schnittstelle angepasst werden
+inline SwNode* SwNodes::operator[]( const SwNodeIndex& rIdx ) const
+{
+ return &rIdx.GetNode();
+}
+
+
+#endif
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
new file mode 100644
index 000000000000..64586f06cd8c
--- /dev/null
+++ b/sw/inc/ndnotxt.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _NDNOTXT_HXX
+#define _NDNOTXT_HXX
+
+#include "node.hxx"
+
+class PolyPolygon;
+
+// --------------------
+// SwNoTxtNode
+// --------------------
+
+class SW_DLLPUBLIC SwNoTxtNode : public SwCntntNode
+{
+ friend class SwNodes;
+ friend class SwNoTxtFrm;
+
+// String aAlternateText; // alternativer Text (HTML)
+
+ PolyPolygon *pContour; // Polygon fuer Konturumlauf
+ BOOL bAutomaticContour : 1; // automatic contour polygon, not manipulated
+ BOOL bContourMapModeValid : 1; // contour map mode is not the graphics's
+ // prefered map mode, but either
+ // MM100 or or pixel
+ BOOL bPixelContour : 1; // contour map mode is invalid and pixel.
+
+ // erzeugt fuer alle Ableitungen einen AttrSet mit Bereichen
+ // fuer Frame- und Grafik-Attributen (wird nur vom SwCntntNode gerufen)
+ virtual void NewAttrSet( SwAttrPool& );
+
+ SwNoTxtNode( const SwNoTxtNode& ); //nicht erlaubt
+ SwNoTxtNode &operator=( const SwNoTxtNode& ); //nicht erlaubt
+
+protected:
+ SwNoTxtNode( const SwNodeIndex &rWhere, const BYTE nNdType,
+ SwGrfFmtColl *pGrColl, SwAttrSet* pAutoAttr = 0 );
+
+public:
+ ~SwNoTxtNode();
+
+ virtual SwCntntFrm *MakeFrm();
+
+ inline SwGrfFmtColl *GetGrfColl() const { return (SwGrfFmtColl*)GetRegisteredIn(); }
+
+ virtual Size GetTwipSize() const = 0;
+
+ virtual BOOL SavePersistentData();
+ virtual BOOL RestorePersistentData();
+
+ const String GetTitle() const;
+ void SetTitle( const String& rTitle,
+ bool bBroadcast = false );
+ const String GetDescription() const;
+ void SetDescription( const String& rDescription,
+ bool bBroadcast = false );
+
+// const String GetAlternateText() const;
+// void SetAlternateText( const String& rTxt,
+// sal_Bool bBroadcast=sal_False );
+
+ void SetContour( const PolyPolygon *pPoly,
+ BOOL bAutomatic = FALSE );
+ const PolyPolygon *HasContour() const;
+ BOOL _HasContour() const { return pContour!=0; };
+ void GetContour( PolyPolygon &rPoly ) const;
+ void CreateContour();
+
+ void SetAutomaticContour( BOOL bSet ) { bAutomaticContour = bSet; }
+ BOOL HasAutomaticContour() const { return bAutomaticContour; }
+
+ // set either a MM100 or pixel contour
+ void SetContourAPI( const PolyPolygon *pPoly );
+
+ // get either a MM100 or pixel contour, return FALSE if no contour is set.
+ BOOL GetContourAPI( PolyPolygon &rPoly ) const;
+
+ void SetPixelContour( BOOL bSet ) { bPixelContour = bSet; }
+ BOOL IsPixelContour() const;
+
+ BOOL IsContourMapModeValid() const { return bContourMapModeValid; }
+
+ //Besorgt die Graphic, mit SwapIn fuer GrfNode, per GetData fuer OLE.
+ Graphic GetGraphic() const;
+};
+
+// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+inline SwNoTxtNode *SwNode::GetNoTxtNode()
+{
+ return ND_NOTXTNODE & nNodeType ? (SwNoTxtNode*)this : 0;
+}
+inline const SwNoTxtNode *SwNode::GetNoTxtNode() const
+{
+ return ND_NOTXTNODE & nNodeType ? (const SwNoTxtNode*)this : 0;
+}
+
+#endif // _NDNOTXT_HXX
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
new file mode 100644
index 000000000000..631dd88f78c5
--- /dev/null
+++ b/sw/inc/ndole.hxx
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _NDOLE_HXX
+#define _NDOLE_HXX
+
+#include <ndnotxt.hxx>
+
+#include <svtools/embedhlp.hxx>
+
+class SwGrfFmtColl;
+class SwDoc;
+class SwOLENode;
+
+class SwOLEListener_Impl;
+class SwEmbedObjectLink;
+class SW_DLLPUBLIC SwOLEObj
+{
+ friend class SwOLENode;
+
+ const SwOLENode* pOLENd;
+ SwOLEListener_Impl* pListener;
+
+ //Entweder Ref oder Name sind bekannt, wenn nur der Name bekannt ist, wird
+ //dir Ref bei Anforderung durch GetOleRef() vom Sfx besorgt.
+ svt::EmbeddedObjectRef xOLERef;
+ String aName;
+
+ SwOLEObj( const SwOLEObj& rObj ); //nicht erlaubt.
+ SwOLEObj();
+
+ void SetNode( SwOLENode* pNode );
+
+public:
+ SwOLEObj( const svt::EmbeddedObjectRef& pObj );
+ SwOLEObj( const String &rName, sal_Int64 nAspect );
+ ~SwOLEObj();
+
+ BOOL UnloadObject();
+ static BOOL UnloadObject( ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > xObj,
+ const SwDoc* pDoc,
+ sal_Int64 nAspect );
+
+ String GetDescription();
+
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef();
+ svt::EmbeddedObjectRef& GetObject();
+ const String& GetCurrentPersistName() const { return aName; }
+ BOOL IsOleRef() const; //Damit das Objekt nicht unnoetig geladen werden muss.
+#endif
+};
+
+
+// --------------------
+// SwOLENode
+// --------------------
+
+class SW_DLLPUBLIC SwOLENode: public SwNoTxtNode
+{
+ friend class SwNodes;
+ mutable SwOLEObj aOLEObj;
+ Graphic* pGraphic;
+ String sChartTblName; // bei Chart Objecten: Name der ref. Tabelle
+ BOOL bOLESizeInvalid; //Soll beim SwDoc::PrtOLENotify beruecksichtig
+ //werden (zum Beispiel kopiert). Ist nicht
+ //Persistent.
+
+ SwEmbedObjectLink* mpObjectLink;
+ String maLinkURL;
+
+ SwOLENode( const SwNodeIndex &rWhere,
+ const svt::EmbeddedObjectRef&,
+ SwGrfFmtColl *pGrfColl,
+ SwAttrSet* pAutoAttr = 0 );
+
+ SwOLENode( const SwNodeIndex &rWhere,
+ const String &rName,
+ sal_Int64 nAspect,
+ SwGrfFmtColl *pGrfColl,
+ SwAttrSet* pAutoAttr = 0 );
+
+ // aOLEObj besitzt einen privaten Copy-CTOR, wir brauchen auch einen:
+ SwOLENode( const SwOLENode & );
+
+ using SwNoTxtNode::GetGraphic;
+
+public:
+ const SwOLEObj& GetOLEObj() const { return aOLEObj; }
+ SwOLEObj& GetOLEObj() { return aOLEObj; }
+ ~SwOLENode();
+
+ virtual SwCntntNode *SplitCntntNode( const SwPosition & );
+ // steht in ndcopy.cxx
+ virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
+
+ virtual Size GetTwipSize() const;
+
+ Graphic* GetGraphic();
+
+ Graphic* GetHCGraphic(); // tries to retrieve HighContrast representation if possible
+ void GetNewReplacement();
+
+ virtual BOOL SavePersistentData();
+ virtual BOOL RestorePersistentData();
+
+ BOOL IsInGlobalDocSection() const;
+ BOOL IsOLEObjectDeleted() const;
+
+ BOOL IsOLESizeInvalid() const { return bOLESizeInvalid; }
+ void SetOLESizeInvalid( BOOL b ){ bOLESizeInvalid = b; }
+
+ sal_Int64 GetAspect() const { return aOLEObj.GetObject().GetViewAspect(); }
+ void SetAspect( sal_Int64 nAspect) { aOLEObj.GetObject().SetViewAspect( nAspect ); }
+
+ // OLE-Object aus dem "Speicher" entfernen
+ // inline void Unload() { aOLEObj.Unload(); }
+ String GetDescription() const { return aOLEObj.GetDescription(); }
+
+ sal_Bool UpdateLinkURL_Impl();
+ void BreakFileLink_Impl();
+ void DisconnectFileLink_Impl();
+
+ void CheckFileLink_Impl();
+
+ // --> OD 2009-03-05 #i99665#
+ bool IsChart() const;
+ // <--
+
+#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
+ const String& GetChartTblName() const { return sChartTblName; }
+ void SetChartTblName( const String& rNm ) { sChartTblName = rNm; }
+#endif
+};
+
+
+// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+inline SwOLENode *SwNode::GetOLENode()
+{
+ return ND_OLENODE == nNodeType ? (SwOLENode*)this : 0;
+}
+inline const SwOLENode *SwNode::GetOLENode() const
+{
+ return ND_OLENODE == nNodeType ? (const SwOLENode*)this : 0;
+}
+
+#endif // _NDOLE_HXX
+
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
new file mode 100644
index 000000000000..53168d5a9cb4
--- /dev/null
+++ b/sw/inc/ndtxt.hxx
@@ -0,0 +1,917 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_NDTXT_HXX
+#define SW_NDTXT_HXX
+
+#include <cppuhelper/weakref.hxx>
+
+#include "swdllapi.h"
+#include <error.h>
+#include <node.hxx>
+#include <hintids.hxx>
+#include <ndhints.hxx>
+#include <errhdl.hxx>
+#include <modeltoviewhelper.hxx>
+#include <SwNumberTreeTypes.hxx>
+#include <IDocumentContentOperations.hxx>
+
+#include <sfx2/Metadatable.hxx>
+
+#include <vector>
+#include <set>
+
+
+class SwNumRule;
+class SwNodeNum;
+// --> OD 2008-05-06 #refactorlists#
+class SwList;
+// <--
+// --> OD 2008-12-02 #i96772#
+class SvxLRSpaceItem;
+// <--
+
+namespace utl {
+ class TransliterationWrapper;
+}
+
+class SwTxtFmtColl;
+class SwCntntFrm;
+class SwTxtFld; // Fuer GetTxtFld()
+class SfxItemSet;
+class SwUndoTransliterate;
+
+
+struct SwSpellArgs; // for Spell(), splargs.hxx
+struct SwConversionArgs; // for Convert(), splargs.hxx
+class SwInterHyphInfo; // for Hyphenate(), splargs.hxx
+class SwWrongList; // fuer OnlineSpelling
+class SwGrammarMarkUp;
+class OutputDevice;
+class SwScriptInfo;
+struct SwDocStat;
+struct SwParaIdleData_Impl;
+
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ template < class > class Sequence;
+ }
+ namespace text { class XTextContent; }
+} } }
+
+typedef std::set< xub_StrLen > SwSoftPageBreakList;
+
+// --------------------
+// SwTxtNode
+// --------------------
+class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
+{
+
+ // fuer das Erzeugen des ersten TextNode
+ friend class SwDoc; // CTOR und AppendTxtNode()
+ friend class SwNodes;
+ friend class SwTxtFrm;
+ friend class SwScriptInfo;
+
+ //Kann 0 sein, nur dann nicht 0 wenn harte Attribute drin stehen.
+ //Also niemals direkt zugreifen!
+ SwpHints *m_pSwpHints;
+
+ // --> OD 2005-11-02 #i51089 - TUNING#
+ mutable SwNodeNum* mpNodeNum; // Numerierung fuer diesen Absatz
+ // <--
+ XubString m_Text;
+
+ SwParaIdleData_Impl* m_pParaIdleData_Impl;
+
+ // Some of the chars this para are hidden. Paragraph has to be reformatted
+ // on changing the view to print preview.
+ mutable bool m_bContainsHiddenChars : 1;
+ // The whole paragraph is hidden because of the hidden text attribute
+ mutable bool m_bHiddenCharsHidePara : 1;
+ // The last two flags have to be recalculated if this flag is set:
+ mutable bool m_bRecalcHiddenCharFlags : 1;
+
+ mutable bool m_bLastOutlineState : 1;
+ bool m_bNotifiable;
+
+ // BYTE nOutlineLevel; //#outline level, removed by zhaojianwei.
+ // --> OD 2008-11-19 #i70748#
+ bool mbEmptyListStyleSetDueToSetOutlineLevelAttr;
+ // <--
+
+ // --> OD 2008-03-27 #refactorlists#
+ // boolean, indicating that a <SetAttr(..)> or <ResetAttr(..)> or
+ // <ResetAllAttr(..)> method is running.
+ // Needed to avoid duplicate handling of attribute change actions.
+ bool mbInSetOrResetAttr;
+ // <--
+ // --> OD 2008-05-06 #refactorlists#
+ // pointer to the list, to whose the text node is added to
+ SwList* mpList;
+ // <--
+ /// #i111677# cached expansion (for clipboard)
+ ::std::auto_ptr< ::rtl::OUString > m_pNumStringCache;
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XTextContent> m_wXParagraph;
+
+ SW_DLLPRIVATE SwTxtNode( const SwNodeIndex &rWhere, SwTxtFmtColl *pTxtColl,
+ const SfxItemSet* pAutoAttr = 0 );
+
+ // Kopiert die Attribute an nStart nach pDest.
+ SW_DLLPRIVATE void CopyAttr( SwTxtNode *pDest, const xub_StrLen nStart, const xub_StrLen nOldPos);
+
+ SW_DLLPRIVATE SwTxtNode* _MakeNewTxtNode( const SwNodeIndex&, BOOL bNext = TRUE,
+ BOOL bChgFollow = TRUE );
+
+ SW_DLLPRIVATE void CutImpl(
+ SwTxtNode * const pDest, const SwIndex & rDestStart,
+ const SwIndex & rStart, /*const*/ xub_StrLen nLen,
+ const bool bUpdate = true );
+
+ // Verlagere alles umfassende harte Attribute in den AttrSet des Absatzes
+ SW_DLLPRIVATE void MoveTxtAttr_To_AttrSet(); // wird von SplitNode gerufen.
+
+ // lege den spz. AttrSet an
+ SW_DLLPRIVATE virtual void NewAttrSet( SwAttrPool& );
+
+ SW_DLLPRIVATE void Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
+ xub_StrLen nEndPos, BOOL bExpandFlds ) const;
+
+ // Optimization: Asking for information about hidden characters at SwScriptInfo
+ // updates these flags.
+ inline bool IsCalcHiddenCharFlags() const
+ { return m_bRecalcHiddenCharFlags; }
+ inline void SetHiddenCharAttribute( bool bNewHiddenCharsHidePara, bool bNewContainsHiddenChars ) const
+ {
+ m_bHiddenCharsHidePara = bNewHiddenCharsHidePara;
+ m_bContainsHiddenChars = bNewContainsHiddenChars;
+ m_bRecalcHiddenCharFlags = false;
+ }
+
+ SW_DLLPRIVATE void CalcHiddenCharFlags() const;
+
+ SW_DLLPRIVATE SwNumRule * _GetNumRule(BOOL bInParent = TRUE) const;
+
+ SW_DLLPRIVATE void SetLanguageAndFont( const SwPaM &rPaM,
+ LanguageType nLang, USHORT nLangWhichId,
+ const Font *pFont, USHORT nFontWhichId );
+
+ //
+ // Start: Data collected during idle time
+ //
+ SW_DLLPRIVATE void SetParaNumberOfWords( ULONG nTmpWords ) const;
+ SW_DLLPRIVATE ULONG GetParaNumberOfWords() const;
+ SW_DLLPRIVATE void SetParaNumberOfChars( ULONG nTmpChars ) const;
+ SW_DLLPRIVATE ULONG GetParaNumberOfChars() const;
+ SW_DLLPRIVATE void InitSwParaStatistics( bool bNew );
+
+ /** create number for this text node, if not already existing
+
+ OD 2005-11-02 #i51089 - TUNING#
+ OD 2007-10-26 #i83479# - made private
+
+ @return number of this node
+ */
+ SwNodeNum* CreateNum() const;
+
+ inline void TryDeleteSwpHints();
+
+ SW_DLLPRIVATE void impl_FmtToTxtAttr(const SfxItemSet& i_rAttrSet);
+
+public:
+ bool IsWordCountDirty() const;
+ bool IsWrongDirty() const;
+ bool IsGrammarCheckDirty() const;
+ bool IsSmartTagDirty() const; // SMARTTAGS
+ bool IsAutoCompleteWordDirty() const;
+ void SetWordCountDirty( bool bNew ) const;
+ void SetWrongDirty( bool bNew ) const;
+ void SetGrammarCheckDirty( bool bNew ) const;
+ void SetSmartTagDirty( bool bNew ) const; // SMARTTAGS
+ void SetAutoCompleteWordDirty( bool bNew ) const;
+ void SetWrong( SwWrongList* pNew, bool bDelete = true );
+ SwWrongList* GetWrong();
+ // --> OD 2008-05-23 #i71360#
+ const SwWrongList* GetWrong() const;
+ // <--
+ void SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete = true );
+ SwGrammarMarkUp* GetGrammarCheck();
+ // SMARTTAGS
+ void SetSmartTags( SwWrongList* pNew, bool bDelete = true );
+ SwWrongList* GetSmartTags();
+
+ //
+ // End: Data collected during idle time
+ //
+
+public:
+ using SwCntntNode::GetAttr;
+
+ const String& GetTxt() const { return m_Text; }
+
+ // getters for SwpHints
+ inline SwpHints &GetSwpHints();
+ inline const SwpHints &GetSwpHints() const;
+ inline SwpHints *GetpSwpHints() { return m_pSwpHints; }
+ inline const SwpHints *GetpSwpHints() const { return m_pSwpHints; }
+ inline bool HasHints() const { return m_pSwpHints ? true : false; }
+ inline SwpHints &GetOrCreateSwpHints();
+
+ virtual ~SwTxtNode();
+
+ virtual xub_StrLen Len() const;
+
+ // steht in itratr
+ void GetMinMaxSize( ULONG nIndex, ULONG& rMin, ULONG &rMax, ULONG &rAbs,
+ OutputDevice* pOut = 0 ) const;
+
+ // --> OD 2008-03-13 #refactorlists#
+ // overriding to handle change of certain paragraph attributes
+ virtual BOOL SetAttr( const SfxPoolItem& );
+ virtual BOOL SetAttr( const SfxItemSet& rSet );
+ virtual BOOL ResetAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ virtual BOOL ResetAttr( const SvUShorts& rWhichArr );
+ virtual USHORT ResetAllAttr();
+ // <--
+
+ /// insert text content
+ void InsertText( const XubString & rStr, const SwIndex & rIdx,
+ const enum IDocumentContentOperations::InsertFlags nMode
+ = IDocumentContentOperations::INS_DEFAULT );
+
+ /** delete text content
+ ATTENTION: must not be called with a range that overlaps the start of
+ an attribute with both extent and dummy char
+ */
+ void EraseText ( const SwIndex &rIdx, const xub_StrLen nCount = STRING_LEN,
+ const enum IDocumentContentOperations::InsertFlags nMode
+ = IDocumentContentOperations::INS_DEFAULT );
+
+ /** delete all attributes.
+ If neither pSet nor nWhich is given, delete all attributes (except
+ refmarks, toxmarks, meta) in range.
+ @param rIdx start position
+ @param nLen range in which attributes will be deleted
+ @param pSet if not 0, delete only attributes contained in pSet
+ @param nWhich if not 0, delete only attributes with matching which
+ @param bInclRefToxMark
+ refmarks, toxmarks, and metas will be ignored unless this is true
+ ATTENTION: setting bInclRefToxMark is only allowed from UNDO!
+ */
+ void RstAttr( const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich = 0,
+ const SfxItemSet* pSet = 0, BOOL bInclRefToxMark = FALSE );
+ void GCAttr();
+
+ // loesche das Text-Attribut (muss beim Pool abgemeldet werden!)
+ void DestroyAttr( SwTxtAttr* pAttr );
+
+ // loesche alle Attribute aus dem SwpHintsArray.
+ void ClearSwpHintsArr( bool bDelFields );
+
+ /// Insert pAttr into hints array. @return true iff inserted successfully
+ bool InsertHint( SwTxtAttr * const pAttr,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+ /// create new text attribute from rAttr and insert it
+ /// @return inserted hint; 0 if not sure the hint is inserted
+ SwTxtAttr* InsertItem( SfxPoolItem& rAttr,
+ const xub_StrLen nStart, const xub_StrLen nEnd,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+
+ // setze diese Attribute am TextNode. Wird der gesamte Bereich umspannt,
+ // dann setze sie nur im AutoAttrSet (SwCntntNode:: SetAttr)
+ BOOL SetAttr( const SfxItemSet& rSet,
+ xub_StrLen nStt, xub_StrLen nEnd,
+ const SetAttrMode nMode = nsSetAttrMode::SETATTR_DEFAULT );
+ // erfrage die Attribute vom TextNode ueber den Bereich
+ // --> OD 2008-01-16 #newlistlevelattrs#
+ // Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>.
+ // If <bMergeIndentValuesOfNumRule> == TRUE, the indent attributes of
+ // the corresponding list level of an applied list style is merged into
+ // the requested item set as a LR-SPACE item, if <bOnlyTxtAttr> == FALSE,
+ // corresponding node has not its own indent attributes and the
+ // position-and-space mode of the list level is SvxNumberFormat::LABEL_ALIGNMENT.
+ BOOL GetAttr( SfxItemSet& rSet, xub_StrLen nStt, xub_StrLen nEnd,
+ BOOL bOnlyTxtAttr = FALSE,
+ BOOL bGetFromChrFmt = TRUE,
+ const bool bMergeIndentValuesOfNumRule = false ) const;
+ // <--
+
+ // uebertrage Attribute eines AttrSets ( AutoFmt ) in das SwpHintsArray
+ void FmtToTxtAttr( SwTxtNode* pNd );
+
+ /// delete all attributes of type nWhich at nStart (opt. end nEnd)
+ void DeleteAttributes( const USHORT nWhich,
+ const xub_StrLen nStart, const xub_StrLen nEnd = 0 );
+ /// delete the attribute pTxtAttr
+ void DeleteAttribute ( SwTxtAttr * const pTxtAttr );
+
+ // Aktionen auf Text und Attributen
+ // --> OD 2008-11-18 #i96213#
+ // introduce optional parameter to control, if all attributes have to be copied.
+ void CopyText( SwTxtNode * const pDest,
+ const SwIndex &rStart,
+ const xub_StrLen nLen,
+ const bool bForceCopyOfAllAttrs = false );
+ void CopyText( SwTxtNode * const pDest,
+ const SwIndex &rDestStart,
+ const SwIndex &rStart,
+ xub_StrLen nLen,
+ const bool bForceCopyOfAllAttrs = false );
+ // <--
+
+ void CutText(SwTxtNode * const pDest,
+ const SwIndex & rStart, const xub_StrLen nLen);
+ inline void CutText(SwTxtNode * const pDest, const SwIndex &rDestStart,
+ const SwIndex & rStart, const xub_StrLen nLen);
+
+ /// replace nDelLen characters at rStart with rText
+ void ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen,
+ const XubString& rText );
+ void ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen, const XubString& rText,
+ const ::com::sun::star::uno::Sequence<sal_Int32>& rOffsets );
+
+ // virtuelle Methoden aus dem CntntNode
+ virtual SwCntntFrm *MakeFrm();
+ virtual SwCntntNode *SplitCntntNode( const SwPosition & );
+ virtual SwCntntNode *JoinNext();
+ virtual SwCntntNode *JoinPrev();
+
+ SwCntntNode *AppendNode( const SwPosition & );
+
+ // setze ggf. das DontExpand-Flag an INet bzw. Zeichenvorlagen
+ BOOL DontExpandFmt( const SwIndex& rIdx, bool bFlag = true,
+ BOOL bFmtToTxtAttributes = TRUE );
+
+ enum GetTxtAttrMode {
+ DEFAULT, /// DEFAULT: (Start < nIndex <= End)
+ EXPAND, /// EXPAND : (Start <= nIndex < End)
+ PARENT, /// PARENT : (Start < nIndex < End)
+ };
+
+ /** get the innermost text attribute covering position nIndex.
+ @param nWhich only attribute with this id is returned.
+ @param eMode the predicate for matching (@see GetTxtAttrMode).
+
+ ATTENTION: this function is not well-defined for those
+ hints of which several may cover a single position, like
+ RES_TXTATR_CHARFMT, RES_TXTATR_REFMARK, RES_TXTATR_TOXMARK
+ */
+ SwTxtAttr *GetTxtAttrAt(xub_StrLen const nIndex, RES_TXTATR const nWhich,
+ enum GetTxtAttrMode const eMode = DEFAULT) const;
+
+ /** get the innermost text attributes covering position nIndex.
+ @param nWhich only attributes with this id are returned.
+ @param eMode the predicate for matching (@see GetTxtAttrMode).
+ */
+ ::std::vector<SwTxtAttr *> GetTxtAttrsAt(xub_StrLen const nIndex,
+ RES_TXTATR const nWhich,
+ enum GetTxtAttrMode const eMode = DEFAULT) const;
+
+ /** get the text attribute at position nIndex which owns
+ the dummy character CH_TXTATR_* at that position, if one exists.
+ @param nIndex the position in the text
+ @param nWhich if different from RES_TXTATR_END, return only
+ attribute with given which id
+ @return the text attribute at nIndex of type nWhich, if it exists
+ */
+ SwTxtAttr *GetTxtAttrForCharAt( const xub_StrLen nIndex,
+ const RES_TXTATR nWhich = RES_TXTATR_END ) const;
+
+ // Aktuelles Wort zurueckliefern
+ XubString GetCurWord(xub_StrLen) const;
+ USHORT Spell(SwSpellArgs*);
+ USHORT Convert( SwConversionArgs & );
+
+ inline SwTxtFmtColl *GetTxtColl() const;
+ virtual SwFmtColl *ChgFmtColl( SwFmtColl* );
+ void _ChgTxtCollUpdateNum( const SwTxtFmtColl* pOld,
+ const SwTxtFmtColl* pNew );
+
+ // kopiere die Collection mit allen Autoformaten zum Dest-Node
+ // dieser kann auch in einem anderen Dokument stehen!
+ // (Methode steht im ndcopy.cxx!!)
+ void CopyCollFmt( SwTxtNode& rDestNd );
+
+ //const SwNodeNum* _GetNodeNum() const { return pNdNum; }
+
+ //
+ // BEGIN OF BULLET/NUMBERING/OUTLINE STUFF:
+ //
+
+ /**
+ Returns numbering rule of this text node.
+
+ @param bInParent serach in parent attributes, too
+
+ @return numbering rule of this text node or NULL if none is set
+ */
+ SwNumRule *GetNumRule(BOOL bInParent = TRUE) const;
+
+ inline const SwNodeNum* GetNum() const
+ {
+ return mpNodeNum;
+ }
+
+ SwNumberTree::tNumberVector GetNumberVector() const;
+
+ /**
+ Returns if this text node is an outline.
+
+ @retval true this text node is an outline
+ @retval false else
+ */
+ bool IsOutline() const;
+
+ bool IsOutlineStateChanged() const;
+
+ void UpdateOutlineState();
+
+ /** -> #i23730#
+
+ Returns if this text node may be numbered.
+
+ A text node may be numbered if
+ - it has no SwNodeNum
+ - it has a SwNodeNum and it has a numbering rule and the according
+ SwNumFmt defines a numbering type that is an enumeration.
+
+ @retval TRUE this text node may be numbered
+ @retval FALSE else
+ */
+ //BOOL MayBeNumbered() const;
+
+ /**
+ Notify this textnode that its numbering rule has changed.
+ */
+ void NumRuleChgd();
+
+ /** Returns outline of numbering string
+
+ OD 2005-11-17 #128041#
+ Introduce parameter <_bInclPrefixAndSuffixStrings> in order to control,
+ if the prefix and the suffix strings have to been included or not.
+
+ @param _bInclPrefixAndSuffixStrings
+ optional input parameter - boolean indicating, if the prefix and the
+ suffix strings have to been included or not. default value = <true>
+
+ @param _nRestrictToThisLevel
+ optional input parameter - unsigned integer indicating the maximum outline
+ level to which the output string must be restricted to. Default value is
+ MAXLEVEL
+ */
+ XubString GetNumString( const bool _bInclPrefixAndSuffixStrings = true, const unsigned int _nRestrictToThisLevel = MAXLEVEL ) const;
+
+ /**
+ Returns the additional indents of this text node and its numbering.
+
+ @param bTxtLeft ???
+
+ @return additional indents
+ */
+ long GetLeftMarginWithNum( BOOL bTxtLeft = FALSE ) const;
+
+ /**
+ Returns the combined first line indent of this text node and
+ its numbering.
+
+ @param the first line indent of this text node taking the
+ numbering into account (return parameter)
+
+ @retval TRUE this node has SwNodeNum and has numbering rule
+ @retval FALSE else
+ */
+ BOOL GetFirstLineOfsWithNum( short& rFirstOffset ) const;
+
+ // --> OD 2010-01-05 #b6884103#
+ SwTwips GetAdditionalIndentForStartingNewList() const;
+ // <--
+
+ // --> OD 2008-12-02 #i96772#
+ void ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const;
+ // <--
+
+ /** return left margin for tab stop position calculation
+
+ OD 2008-06-30 #i91133#
+ Needed for text formatting
+ Method considers new list level attributes, which also can provide a left margin value
+
+ @author OD
+ */
+ long GetLeftMarginForTabCalculation() const;
+
+ /** -> #i29560
+ Returns if this text node has a number.
+
+ This text node has a number if it has a SwNodeNum and a
+ numbering rule and the numbering format specified for the
+ level of the SwNodeNum is of an enumeration type.
+
+ @retval TRUE This text node has a number.
+ @retval FALSE else
+ */
+ BOOL HasNumber() const;
+
+ /** -> #i29560
+ Returns if this text node has a bullet.
+
+ This text node has a bullet if it has a SwNodeNum and a
+ numbering rule and the numbering format specified for the
+ level of the SwNodeNum is of a bullet type.
+
+ @retval TRUE This text node has a bullet.
+ @retval FALSE else
+ */
+ BOOL HasBullet() const;
+
+ /** -> #i27615#
+ Returns is this text node is numbered.
+
+ This node is numbered if it has a SwNodeNum and it has a
+ numbering rule and has not a hidden SwNodeNum.
+
+ ATTENTION: Returns TRUE even if the SwNumFmt has type
+ SVX_NUM_NUMBER_NONE.
+
+ @retval TRUE This node is numbered.
+ @retval FALSE else
+ */
+ BOOL IsNumbered() const;
+
+ /** -> #i27615#
+ Returns if this text node has a marked label.
+
+ @retval true This text node has a marked label.
+ @retval false else
+ */
+ bool HasMarkedLabel() const;
+
+ /** Sets the list level of this text node.
+
+ Side effect, when the text node is a list item:
+ The text node's representation in the list tree (<SwNodeNum> instance)
+ is updated.
+
+ @param nLevel level to set
+ */
+ void SetAttrListLevel(int nLevel);
+
+ bool HasAttrListLevel() const;
+
+ int GetAttrListLevel() const;
+
+ /** Returns the actual list level of this text node, when it is a list item
+
+ @return the actual list level of this text node, if it is a list item,
+ -1 otherwise
+ */
+ int GetActualListLevel() const;
+
+ /**
+ Returns outline level of this text node.
+
+ If a text node has an outline number (i.e. it has an SwNodeNum
+ and a outline numbering rule) the outline level is the level of
+ this SwNodeNum.
+
+ If a text node has no outline number and has a paragraph style
+ attached the outline level is the outline level of the
+ paragraph style.
+
+ Otherwise the text node has no outline level (NO_NUMBERING).
+
+ NOTE: The outline level of text nodes is subject to change. The
+ plan is to have an SwTxtNode::nOutlineLevel member that is
+ updated from a paragraph style upon appliance of that paragraph
+ style.
+
+ @return outline level or NO_NUMBERING if there is no outline level
+ */
+ int GetAttrOutlineLevel() const;//#OutlineLevel,added by zhaojianwei
+
+ /**
+ Sets the out line level *at* a text node.
+
+ @param nLevel the level to be set
+
+ If the text node has an outline number the level is set at the
+ outline number.
+
+ If the text node has no outline number but has a paragraph
+ style applied the outline level is set at the paragraph style.
+
+ NOTE: This is subject to change, see GetOutlineLevel.
+ */
+ //void SetOutlineLevel(int nLevel);
+ void SetAttrOutlineLevel(int nLevel);//#OutlineLevel,added by zhaojianwei
+
+ // --> OD 2008-11-19 #i70748#
+ bool IsEmptyListStyleDueToSetOutlineLevelAttr();
+ void SetEmptyListStyleDueToSetOutlineLevelAttr();
+ void ResetEmptyListStyleDueToResetOutlineLevelAttr();
+ // <--
+
+ /**
+ Returns the width of leading tabs/blanks in this paragraph.
+ This space will be converted into numbering indent if the paragraph
+ is set to be numbered.
+
+ @return the width of the leading whitespace
+ */
+ USHORT GetWidthOfLeadingTabs() const;
+
+
+ /**
+ Returns if the paragraph has a visible numbering or bullet.
+ This includes all kinds of numbering/bullet/outlines.
+ Note: This function returns false, if the numbering format is
+ SVX_NUM_NUMBER_NONE or if the numbering/bullet has been deleted.
+
+ @return TRUE if the paragraph has a visible numbering/bullet/outline
+ */
+ bool HasVisibleNumberingOrBullet() const;
+
+ // --> OD 2008-02-19 #refactorlists#
+ void SetListId( const String sListId );
+ String GetListId() const;
+ // <--
+
+ /** Determines, if the list level indent attributes can be applied to the
+ paragraph.
+
+ OD 2008-01-17 #newlistlevelattrs#
+ The list level indents can be applied to the paragraph under the one
+ of following conditions:
+ - the list style is directly applied to the paragraph and the paragraph
+ has no own indent attributes.
+ - the list style is applied to the paragraph through one of its paragraph
+ styles, the paragraph has no own indent attributes and on the paragraph
+ style hierarchy from the paragraph to the paragraph style with the
+ list style no indent attributes are found.
+
+ @author OD
+
+ @return boolean
+ */
+ bool AreListLevelIndentsApplicable() const;
+
+ /** Retrieves the list tab stop position, if the paragraph's list level defines
+ one and this list tab stop has to merged into the tap stops of the paragraph
+
+ OD 2008-01-17 #newlistlevelattrs#
+
+ @author OD
+
+ @param nListTabStopPosition
+ output parameter - containing the list tab stop position
+
+ @return boolean - indicating, if a list tab stop position is provided
+ */
+ bool GetListTabStopPosition( long& nListTabStopPosition ) const;
+
+ /** Retrieves the character following the list label, if the paragraph's
+ list level defines one.
+
+ OD 2008-01-17 #newlistlevelattrs#
+
+ @author OD
+
+ @return XubString - the list tab stop position
+ */
+ XubString GetLabelFollowedBy() const;
+
+ //
+ // END OF BULLET/NUMBERING/OUTLINE STUFF:
+ //
+
+ void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const;
+
+ USHORT GetLang( const xub_StrLen nBegin, const xub_StrLen nLen = 0,
+ USHORT nScript = 0 ) const;
+
+ // steht in ndcopy.cxx
+ BOOL IsSymbol( const xub_StrLen nBegin ) const; // steht in itratr.cxx
+ virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
+
+ // interaktive Trennung: wir finden den TxtFrm und rufen sein CalcHyph
+ BOOL Hyphenate( SwInterHyphInfo &rHyphInf );
+ void DelSoftHyph( const xub_StrLen nStart, const xub_StrLen nEnd );
+
+ // --> OD 2007-11-15 #i83479#
+ // add 4th optional parameter <bAddSpaceAfterListLabelStr> indicating,
+ // when <bWithNum = true> that a space is inserted after the string for
+ // the list label.
+ // add 5th optional parameter <bWithSpacesForLevel> indicating, if additional
+ // spaces are inserted in front of the expanded text string depending on
+ // the list level.
+ XubString GetExpandTxt( const xub_StrLen nIdx = 0,
+ const xub_StrLen nLen = STRING_LEN,
+ const bool bWithNum = false,
+ const bool bAddSpaceAfterListLabelStr = false,
+ const bool bWithSpacesForLevel = false ) const;
+ // <--
+ BOOL GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx = 0,
+ xub_StrLen nIdx = 0, xub_StrLen nLen = STRING_LEN,
+ BOOL bWithNum = FALSE, BOOL bWithFtn = TRUE,
+ BOOL bReplaceTabsWithSpaces = FALSE ) const;
+
+ /*
+ *
+ */
+ const ModelToViewHelper::ConversionMap*
+ BuildConversionMap( rtl::OUString& rExpandText ) const;
+
+ XubString GetRedlineTxt( xub_StrLen nIdx = 0,
+ xub_StrLen nLen = STRING_LEN,
+ BOOL bExpandFlds = FALSE,
+ BOOL bWithNum = FALSE ) const;
+ //Liefert fuer die Initalfunktion tatsaechliche Anzahl der Initialzeichen
+ //bei nWishLen == 0 die des ersten Wortes
+ USHORT GetDropLen( USHORT nWishLen) const;
+
+ // Passes back info needed on the dropcap dimensions
+ bool GetDropSize(int& rFontHeight, int& rDropHeight, int& rDropDescent) const;
+
+ // Hidden Paragraph Field:
+ inline bool CalcHiddenParaField()
+ { return m_pSwpHints ? m_pSwpHints->CalcHiddenParaField() : false; }
+ // set CalcVisible flags
+ inline void SetCalcHiddenParaField()
+ { if (m_pSwpHints) m_pSwpHints->SetCalcHiddenParaField(); }
+
+ // is the paragraph visible?
+ inline bool HasHiddenParaField() const
+ { return m_pSwpHints ? m_pSwpHints->HasHiddenParaField() : false; }
+
+ //
+ // Hidden Paragraph Field:
+ //
+ inline bool HasHiddenCharAttribute( bool bWholePara ) const
+ {
+ if ( m_bRecalcHiddenCharFlags )
+ CalcHiddenCharFlags();
+ return bWholePara ? m_bHiddenCharsHidePara : m_bContainsHiddenChars;
+ }
+
+ inline void SetCalcHiddenCharFlags() const
+ { m_bRecalcHiddenCharFlags = true; }
+
+// --> FME 2004-06-08 #i12836# enhanced pdf
+ //
+ // Returns if the node is hidden due to
+ // 1. HiddenParaField
+ // 2. HiddenCharAttribute
+ // 3. HiddenSection
+ //
+ bool IsHidden() const;
+// <--
+
+ TYPEINFO(); // fuer rtti
+
+ // fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!)
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+
+ // override SwIndexReg
+ virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
+ const bool bNegative = false, const bool bDelete = false );
+
+ // change text to Upper/Lower/Hiragana/Katagana/...
+ void TransliterateText( utl::TransliterationWrapper& rTrans,
+ xub_StrLen nStart, xub_StrLen nEnd,
+ SwUndoTransliterate* pUndo = 0 );
+
+ // count words in given range
+ void CountWords( SwDocStat& rStat, xub_StrLen nStart, xub_StrLen nEnd ) const;
+
+ // Checks some global conditions like loading or destruction of document
+ // to economize notifications
+ bool IsNotificationEnabled() const;
+
+ // Checks a temporary notification blocker and the global conditons of IsNotificationEnabled()
+ bool IsNotifiable() const;
+
+ void SetListRestart( bool bRestart );
+ // --> OD 2005-11-02 #i51089 - TUNING#
+ bool IsListRestart() const;
+ // <--
+
+ void SetAttrListRestartValue( SwNumberTree::tSwNumTreeNumber nNum );
+ bool HasAttrListRestartValue() const;
+ SwNumberTree::tSwNumTreeNumber GetAttrListRestartValue() const;
+ SwNumberTree::tSwNumTreeNumber GetActualListStartValue() const;
+
+ void SetCountedInList( bool bCounted );
+ bool IsCountedInList() const;
+
+ // --> OD 2008-03-13 #refactorlists#
+// void SyncNumberAndNumRule();
+// void UnregisterNumber();
+ void AddToList();
+ void RemoveFromList();
+ bool IsInList() const;
+ // <--
+
+ bool IsFirstOfNumRule() const;
+
+ USHORT GetScalingOfSelectedText( xub_StrLen nStt, xub_StrLen nEnd ) const;
+
+ SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XTextContent> const& GetXParagraph() const
+ { return m_wXParagraph; }
+ SW_DLLPRIVATE void SetXParagraph(::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent> const& xParagraph)
+ { m_wXParagraph = xParagraph; }
+
+ // sfx2::Metadatable
+ virtual ::sfx2::IXmlIdRegistry& GetRegistry();
+ virtual bool IsInClipboard() const;
+ virtual bool IsInUndo() const;
+ virtual bool IsInContent() const;
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > MakeUnoObject();
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTxtNode)
+};
+
+//-----------------------------------------------------------------------------
+
+inline SwpHints & SwTxtNode::GetSwpHints()
+{
+ ASSERT_ID( m_pSwpHints, ERR_NOHINTS);
+ return *m_pSwpHints;
+}
+inline const SwpHints &SwTxtNode::GetSwpHints() const
+{
+ ASSERT_ID( m_pSwpHints, ERR_NOHINTS);
+ return *m_pSwpHints;
+}
+
+inline SwpHints& SwTxtNode::GetOrCreateSwpHints()
+{
+ if ( !m_pSwpHints )
+ {
+ m_pSwpHints = new SwpHints;
+ }
+ return *m_pSwpHints;
+}
+
+inline void SwTxtNode::TryDeleteSwpHints()
+{
+ if ( m_pSwpHints && m_pSwpHints->CanBeDeleted() )
+ {
+ DELETEZ( m_pSwpHints );
+ }
+}
+
+inline SwTxtFmtColl* SwTxtNode::GetTxtColl() const
+{
+ return static_cast<SwTxtFmtColl*>(const_cast<SwModify*>(GetRegisteredIn()));
+}
+
+// fuer den IBM-Compiler nicht inlinen wg. 42876
+#ifndef ICC
+// Inline Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
+inline SwTxtNode *SwNode::GetTxtNode()
+{
+ return ND_TEXTNODE == nNodeType ? static_cast<SwTxtNode*>(this) : 0;
+}
+inline const SwTxtNode *SwNode::GetTxtNode() const
+{
+ return ND_TEXTNODE == nNodeType ? static_cast<const SwTxtNode*>(this) : 0;
+}
+#endif
+
+inline void
+SwTxtNode::CutText(SwTxtNode * const pDest, const SwIndex & rDestStart,
+ const SwIndex & rStart, const xub_StrLen nLen)
+{
+ CutImpl( pDest, rDestStart, rStart, nLen, true );
+}
+
+#endif
diff --git a/sw/inc/ndtyp.hxx b/sw/inc/ndtyp.hxx
new file mode 100644
index 000000000000..f752348b5df4
--- /dev/null
+++ b/sw/inc/ndtyp.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _NDTYP_HXX
+#define _NDTYP_HXX
+
+#include <tools/solar.h>
+
+// Ids fuer die verschiedenden Nodes; in der Basisklasse steht der Member,
+// der angibt, um was fuer einen es sich handelt
+const BYTE ND_ENDNODE = 0x01;
+const BYTE ND_STARTNODE = 0x02;
+const BYTE ND_TABLENODE = 0x06;
+const BYTE ND_TEXTNODE = 0x08;
+const BYTE ND_GRFNODE = 0x10;
+const BYTE ND_OLENODE = 0x20;
+
+const BYTE ND_CONTENTNODE = 0x38; // ContentNode (eines von den 3 Bits)
+const BYTE ND_NOTXTNODE = 0x30; // NoTxtNode (eines von den 2 Bits)
+
+const BYTE ND_SECTIONNODE = 0x42;
+// nur fuer internen Gebrauch!!
+const BYTE ND_SECTIONDUMMY = 0x40; //(ND_SECTIONNODE & ~ND_STARTNODE);
+
+// spezielle Types der StartNodes, die keine Ableitungen sind, aber
+// "Bereiche" zusammenhalten.
+enum SwStartNodeType
+{
+ SwNormalStartNode = 0,
+ SwTableBoxStartNode,
+ SwFlyStartNode,
+ SwFootnoteStartNode,
+ SwHeaderStartNode,
+ SwFooterStartNode
+};
+
+// is the node the first and/or last node of a section?
+// This information is used for the export filters. Our layout never have a
+// distance before or after if the node is the first or last in a section.
+const BYTE ND_HAS_PREV_LAYNODE = 0x01;
+const BYTE ND_HAS_NEXT_LAYNODE = 0x02;
+
+
+
+#endif
diff --git a/sw/inc/newhdl.hxx b/sw/inc/newhdl.hxx
new file mode 100644
index 000000000000..04d88f2789be
--- /dev/null
+++ b/sw/inc/newhdl.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _NEWHDL_HXX
+#define _NEWHDL_HXX
+
+#include <tools/link.hxx>
+
+#include "errhdl.hxx" // hier kommt auch swtypes rein, was ich brauche
+
+// ----------------------------------------------------------------------------
+
+extern void SW_NEW_HDL();
+
+class SwNewHdl
+{
+ friend void SW_NEW_HDL();
+private:
+ char* pWarnMem;
+ char* pExceptMem;
+ Link aWarnLnk;
+ Link aErrLnk;
+public:
+ void SetWarnLnk( const Link &rLink );
+ void SetErrLnk( const Link &rLink );
+
+ BOOL TryWarnMem();
+
+ BOOL Flush_WarnMem();
+ BOOL Flush_ExceptMem();
+
+ SwNewHdl();
+ ~SwNewHdl();
+};
+
+/******************************************************************************
+ * INLINE
+ ******************************************************************************/
+inline void SwNewHdl::SetWarnLnk( const Link &rLink )
+{
+ aWarnLnk = rLink;
+}
+
+inline void SwNewHdl::SetErrLnk( const Link &rLink )
+{
+ aErrLnk = rLink;
+}
+
+#endif
+
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
new file mode 100644
index 000000000000..6cc14bbbf2c2
--- /dev/null
+++ b/sw/inc/node.hxx
@@ -0,0 +1,761 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_NODE_HXX
+#define SW_NODE_HXX
+
+#include <vector>
+
+#include <boost/utility.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <tools/mempool.hxx>
+#include <tools/gen.hxx>
+
+#include "swdllapi.h"
+#include <ndarr.hxx>
+#include <ndtyp.hxx>
+#include <index.hxx>
+#include <fmtcol.hxx>
+
+// ---------------------
+// forward Deklarationen
+// ---------------------
+
+class SvUShorts;
+class SwCntntFrm;
+class SwCntntNode;
+class SwDoc;
+class SwEndNode;
+class SwFrm;
+class SwFrmFmt;
+class SwGrfNode;
+class SwNoTxtNode;
+class SwNodeIndex;
+class SwOLENode;
+class SwRect;
+class SwSection;
+class SwSectionFmt;
+class SwTOXBase;
+class SwSectionNode;
+class SwStartNode;
+class SwTabFrm;
+class SwTable;
+class SwTableNode;
+class SwTableBox;
+class SwTxtNode;
+class SwPageDesc;
+class ViewShell;
+struct SwPosition;
+class IStyleAccess;
+class IDocumentSettingAccess;
+class IDocumentDeviceAccess;
+class IDocumentMarkAccess;
+class IDocumentRedlineAccess;
+class IDocumentStylePoolAccess;
+class IDocumentLineNumberAccess;
+class IDocumentLinksAdministration;
+class IDocumentFieldsAccess;
+class IDocumentContentOperations;
+// --> OD 2007-10-31 #i83479#
+class IDocumentListItems;
+// <--
+
+// --------------------
+// class SwNode
+// --------------------
+class SW_DLLPUBLIC SwNode : private /* public*/ BigPtrEntry
+{
+ friend class SwNodes;
+
+#ifdef DBG_UTIL
+ static long nSerial;
+ long nMySerial;
+#endif
+
+ BYTE nNodeType;
+
+ // JP 28.03.96
+ // fuer Textnodes: Stufungslevel der Autoformatierung. Ist erstmal hier
+ // gelandet, weil noch Bits frei sind
+ BYTE nAFmtNumLvl : 3;
+ BOOL bSetNumLSpace : 1; // fuer Numerierung: TRUE Einzug setzen
+ BOOL bIgnoreDontExpand : 1; // for Text Attributes - ignore the flag
+
+protected:
+ SwStartNode* pStartOfSection;
+
+ SwNode( const SwNodeIndex &rWhere, const BYTE nNodeId );
+
+ // fuer den initialen StartNode
+ SwNode( SwNodes& rNodes, ULONG nPos, const BYTE nNodeId );
+
+public:
+ virtual ~SwNode();
+
+#ifdef DBG_UTIL
+ long int GetSerial() const { return nMySerial; }
+#endif
+
+ USHORT GetSectionLevel() const;
+
+ inline ULONG StartOfSectionIndex() const;
+ inline const SwStartNode* StartOfSectionNode() const { return pStartOfSection; }
+ inline SwStartNode* StartOfSectionNode() { return pStartOfSection; }
+
+ inline ULONG EndOfSectionIndex() const;
+ inline const SwEndNode* EndOfSectionNode() const;
+ inline SwEndNode* EndOfSectionNode();
+
+ inline BYTE GetAutoFmtLvl() const { return nAFmtNumLvl; }
+ inline void SetAutoFmtLvl( BYTE nVal ) { nAFmtNumLvl = nVal; }
+
+ inline BOOL IsSetNumLSpace() const { return bSetNumLSpace; }
+ inline void SetNumLSpace( BOOL bFlag ) { bSetNumLSpace = bFlag; }
+
+ inline BOOL IsIgnoreDontExpand() const { return bIgnoreDontExpand; }
+ inline void SetIgnoreDontExpand( BOOL bNew ) { bIgnoreDontExpand = bNew; }
+
+ BYTE GetNodeType() const { return nNodeType; }
+
+ inline SwStartNode *GetStartNode();
+ inline const SwStartNode *GetStartNode() const;
+ inline SwCntntNode *GetCntntNode();
+ inline const SwCntntNode *GetCntntNode() const;
+ inline SwEndNode *GetEndNode();
+ inline const SwEndNode *GetEndNode() const;
+#ifndef ICC
+ inline
+#endif
+ SwTxtNode *GetTxtNode();
+
+#ifndef ICC
+ inline
+#endif
+ const SwTxtNode *GetTxtNode() const;
+ inline SwOLENode *GetOLENode();
+ inline const SwOLENode *GetOLENode() const;
+ inline SwNoTxtNode *GetNoTxtNode();
+ inline const SwNoTxtNode *GetNoTxtNode() const;
+ inline SwGrfNode *GetGrfNode();
+ inline const SwGrfNode *GetGrfNode() const;
+ inline SwTableNode *GetTableNode();
+ inline const SwTableNode *GetTableNode() const;
+ inline SwSectionNode *GetSectionNode();
+ inline const SwSectionNode *GetSectionNode() const;
+
+ inline BOOL IsStartNode() const;
+ inline BOOL IsCntntNode() const;
+ inline BOOL IsEndNode() const;
+ inline BOOL IsTxtNode() const;
+ inline BOOL IsTableNode() const;
+ inline BOOL IsSectionNode() const;
+ inline BOOL IsOLENode() const;
+ inline BOOL IsNoTxtNode() const;
+ inline BOOL IsGrfNode() const;
+
+ /**
+ Checks if this node is in redlines.
+
+ @retval TRUE this node is in redlines
+ @retval FALSE else
+ */
+ BOOL IsInRedlines() const;
+
+ // suche den TabellenNode, in dem dieser steht. Wenn in keiner
+ // Tabelle wird 0 returnt.
+ SwTableNode *FindTableNode();
+ inline const SwTableNode *FindTableNode() const;
+
+ // suche den SectionNode, in dem dieser steht. Wenn es in keiner
+ // Section steht wird 0 returnt.
+ SwSectionNode *FindSectionNode();
+ inline const SwSectionNode *FindSectionNode() const;
+
+ SwStartNode* FindSttNodeByType( SwStartNodeType eTyp );
+ inline const SwStartNode* FindSttNodeByType( SwStartNodeType eTyp ) const;
+
+ const SwStartNode* FindTableBoxStartNode() const
+ { return FindSttNodeByType( SwTableBoxStartNode ); }
+ const SwStartNode* FindFlyStartNode() const
+ { return FindSttNodeByType( SwFlyStartNode ); }
+ const SwStartNode* FindFootnoteStartNode() const
+ { return FindSttNodeByType( SwFootnoteStartNode ); }
+ const SwStartNode* FindHeaderStartNode() const
+ { return FindSttNodeByType( SwHeaderStartNode ); }
+ const SwStartNode* FindFooterStartNode() const
+ { return FindSttNodeByType( SwFooterStartNode ); }
+
+ // in welchem Nodes-Array/Doc steht der Node ?
+ inline SwNodes& GetNodes();
+ inline const SwNodes& GetNodes() const;
+ inline SwDoc* GetDoc();
+ inline const SwDoc* GetDoc() const;
+
+ /** Provides access to the document setting interface
+ */
+ const IDocumentSettingAccess* getIDocumentSettingAccess() const;
+
+ /** Provides access to the document device interface
+ */
+ const IDocumentDeviceAccess* getIDocumentDeviceAccess() const;
+
+ /** Provides access to the document bookmark interface
+ */
+ const IDocumentMarkAccess* getIDocumentMarkAccess() const;
+
+ /** Provides access to the document redline interface
+ */
+ const IDocumentRedlineAccess* getIDocumentRedlineAccess() const;
+
+ /** Provides access to the document style pool interface
+ */
+ const IDocumentStylePoolAccess* getIDocumentStylePoolAccess() const;
+
+ /** Provides access to the document line number information interface
+ */
+ const IDocumentLineNumberAccess* getIDocumentLineNumberAccess() const;
+
+ /** Provides access to the document draw model interface
+ */
+ const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const;
+
+ /** Provides access to the document layout interface
+ */
+ const IDocumentLayoutAccess* getIDocumentLayoutAccess() const;
+ IDocumentLayoutAccess* getIDocumentLayoutAccess();
+
+ /** Provides access to the document links administration interface
+ */
+ const IDocumentLinksAdministration* getIDocumentLinksAdministration() const;
+ IDocumentLinksAdministration* getIDocumentLinksAdministration();
+
+ /** Provides access to the document fields administration interface
+ */
+ const IDocumentFieldsAccess* getIDocumentFieldsAccess() const;
+ IDocumentFieldsAccess* getIDocumentFieldsAccess();
+
+ /** Provides access to the document content operations interface
+ */
+ IDocumentContentOperations* getIDocumentContentOperations();
+
+ /** Provides access to the document automatic styles interface
+ */
+ IStyleAccess& getIDocumentStyleAccess();
+
+ /** Provides access to the document's numbered items interface
+
+ OD 2007-10-31 #i83479#
+
+ @author OD
+ */
+ IDocumentListItems& getIDocumentListItems();
+
+ // liegt der Node im Sichtbarenbereich der Shell ?
+ BOOL IsInVisibleArea( ViewShell* pSh = 0 ) const;
+ // befindet sich der Node in einem geschuetzten Bereich?
+ BOOL IsInProtectSect() const;
+ // befindet sich der Node in irgendetwas geschuetzten ?
+ // (Bereich/Rahmen/Tabellenzellen/... incl. des Ankers bei
+ // Rahmen/Fussnoten/..)
+ BOOL IsProtect() const;
+ // suche den PageDesc, mit dem dieser Node formatiert ist. Wenn das
+ // Layout vorhanden ist wird ueber das gesucht, ansonsten gibt es nur
+ // die harte Tour ueber die Nodes nach vorne suchen!!
+ // OD 18.03.2003 #106326#
+ const SwPageDesc* FindPageDesc( BOOL bCalcLay, sal_uInt32* pPgDescNdIdx = 0 ) const;
+
+ // falls der Node in einem Fly steht, dann wird das entsprechende Format
+ // returnt
+ SwFrmFmt* GetFlyFmt() const;
+
+ // falls der Node in einer Tabelle steht, dann wird die entsprechende
+ // TabellenBox returnt
+ SwTableBox* GetTblBox() const;
+
+ inline ULONG GetIndex() const { return GetPos(); }
+
+ const SwTxtNode* FindOutlineNodeOfLevel( BYTE nLvl ) const;
+
+ BYTE HasPrevNextLayNode() const;
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwNode( const SwNode & rNodes );
+ SwNode & operator= ( const SwNode & rNodes );
+};
+
+// --------------------
+// class SwStartNode
+// --------------------
+class SwStartNode: public SwNode
+{
+ friend class SwNode;
+ friend class SwNodes;
+ friend class SwEndNode; // um theEndOfSection zu setzen !!
+
+ SwEndNode* pEndOfSection;
+ SwStartNodeType eSttNdTyp;
+
+ // fuer den initialen StartNode
+ SwStartNode( SwNodes& rNodes, ULONG nPos );
+
+protected:
+ SwStartNode( const SwNodeIndex &rWhere,
+ const BYTE nNodeType = ND_STARTNODE,
+ SwStartNodeType = SwNormalStartNode );
+public:
+ DECL_FIXEDMEMPOOL_NEWDEL(SwStartNode)
+
+ SwStartNodeType GetStartNodeType() const { return eSttNdTyp; }
+
+ // an alle ContentNodes der Section das ChkCondColl rufen
+ void CheckSectionCondColl() const;
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwStartNode( const SwStartNode & rNode );
+ SwStartNode & operator= ( const SwStartNode & rNode );
+};
+
+
+// --------------------
+// class SwEndNode
+// --------------------
+class SwEndNode : public SwNode
+{
+ friend class SwNodes;
+ friend class SwTableNode; // um seinen EndNode anlegen zukoennen
+ friend class SwSectionNode; // um seinen EndNode anlegen zukoennen
+
+ // fuer den initialen StartNode
+ SwEndNode( SwNodes& rNodes, ULONG nPos, SwStartNode& rSttNd );
+
+protected:
+ SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd );
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwEndNode)
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwEndNode( const SwEndNode & rNode );
+ SwEndNode & operator= ( const SwEndNode & rNode );
+};
+
+
+// --------------------
+// SwCntntNode
+// --------------------
+class SW_DLLPUBLIC SwCntntNode: public SwModify, public SwNode, public SwIndexReg
+{
+ // Der Reader darf NewAttrSet() aufrufen!
+// friend class SwSwgReader;
+// friend class Sw3IoImp;
+
+//FEATURE::CONDCOLL
+ SwDepend* pCondColl;
+//FEATURE::CONDCOLL
+ mutable bool mbSetModifyAtAttr;
+
+protected:
+ SwCntntNode( const SwNodeIndex &rWhere, const BYTE nNodeType,
+ SwFmtColl *pFmtColl );
+ virtual ~SwCntntNode();
+
+ // Attribut-Set fuer alle AUTO-Attribute eines CntntNodes
+ // ( z.B: TxtNode oder NoTxtNode
+ boost::shared_ptr<const SfxItemSet> mpAttrSet;
+
+ // lasse von den entsprechenden Nodes die spz. AttrSets anlegen
+ virtual void NewAttrSet( SwAttrPool& ) = 0;
+
+ // There some functions that like to remove items from the internal
+ // SwAttrSet (handle):
+ USHORT ClearItemsFromAttrSet( const std::vector<USHORT>& rWhichIds );
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ virtual SwCntntFrm *MakeFrm() = 0;
+ virtual SwCntntNode *SplitCntntNode(const SwPosition & ) = 0;
+ virtual SwCntntNode *JoinNext();
+ virtual SwCntntNode *JoinPrev();
+ // koennen 2 Nodes zusammengefasst werden ?
+ // in pIdx kann die 2. Position returnt werden.
+ int CanJoinNext( SwNodeIndex* pIdx =0 ) const;
+ int CanJoinPrev( SwNodeIndex* pIdx =0 ) const;
+
+ void MakeStartIndex( SwIndex * pIdx ) { pIdx->Assign( this, 0 ); }
+ void MakeEndIndex( SwIndex * pIdx ) { pIdx->Assign( this, Len() ); }
+
+ BOOL GoNext(SwIndex *, USHORT nMode ) const;
+ BOOL GoPrevious(SwIndex *, USHORT nMode ) const;
+
+ SwCntntFrm *GetFrm( const Point* pDocPos = 0,
+ const SwPosition *pPos = 0,
+ const BOOL bCalcFrm = TRUE ) const;
+ // Gibt die tatsaechlcheGroesse des Frames zurueck bzw. ein leeres
+ // Rechteck, wenn kein Layout existiert.
+ // Wird fuer die Export Filter benoetigt.
+ SwRect FindLayoutRect( const BOOL bPrtArea = FALSE,
+ const Point* pPoint = 0,
+ const BOOL bCalcFrm = FALSE ) const;
+ SwRect FindPageFrmRect( const BOOL bPrtArea = FALSE,
+ const Point* pPoint = 0,
+ const BOOL bCalcFrm = FALSE ) const;
+ /*
+ * Methode erzeugt fuer den angegebenen Node alle Ansichten vom
+ * Dokument. Die erzeugten Contentframes werden in das entsprechende
+ * Layout gehaengt.
+ */
+ void MakeFrms( SwCntntNode& rNode );
+ /*
+ * Methode loescht fuer den Node alle Ansichten vom
+ * Dokument. Die Contentframes werden aus dem entsprechenden
+ * Layout ausgehaengt.
+ */
+ void DelFrms();
+
+ /*
+ * liefert die Anzahl der Elemente des Inhalts des Nodes;
+ * Default ist 1, Unterschiede gibt es beim TextNode und beim
+ * Formelnode.
+ */
+ virtual xub_StrLen Len() const;
+
+ virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const = 0;
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ // SS fuer die PoolItems: (Harte-(Fmt)Attrbutierung)
+
+ // Ist bInParent FALSE, wird nur in diesem Node nach dem Attribut gesucht.
+ const SfxPoolItem& GetAttr( USHORT nWhich, BOOL bInParent=TRUE ) const;
+ BOOL GetAttr( SfxItemSet& rSet, BOOL bInParent=TRUE ) const;
+ // --> OD 2008-03-13 #refactorlists#
+ // made virtual
+ virtual BOOL SetAttr( const SfxPoolItem& );
+ virtual BOOL SetAttr( const SfxItemSet& rSet );
+ virtual BOOL ResetAttr( USHORT nWhich1, USHORT nWhich2 = 0 );
+ virtual BOOL ResetAttr( const SvUShorts& rWhichArr );
+ virtual USHORT ResetAllAttr();
+ // <--
+
+ // liefert das Attribut, das nicht ueber die bedingte Vorlage kommt!
+ const SfxPoolItem* GetNoCondAttr( USHORT nWhich, BOOL bInParents ) const;
+
+ // hat der Node schon eigene Auto-Attribute ?
+ // Zugriff auf SwAttrSet
+ inline const SwAttrSet &GetSwAttrSet() const;
+ inline const SwAttrSet *GetpSwAttrSet() const { return static_cast<const SwAttrSet*>(mpAttrSet.get()); }
+ inline BOOL HasSwAttrSet() const { return mpAttrSet ? TRUE : FALSE; }
+
+ virtual SwFmtColl* ChgFmtColl( SwFmtColl* );
+ SwFmtColl* GetFmtColl() const { return (SwFmtColl*)GetRegisteredIn(); }
+
+//FEATURE::CONDCOLL
+ inline SwFmtColl& GetAnyFmtColl() const;
+ void SetCondFmtColl( SwFmtColl* );
+ inline SwFmtColl* GetCondFmtColl() const;
+
+ BOOL IsAnyCondition( SwCollCondition& rTmp ) const;
+ void ChkCondColl();
+//FEATURE::CONDCOLL
+
+ // invalidiert die am Node gesetzte NumRule. Diese wird
+ // spaetestend in EndAction einer Shell geupdatet
+ BOOL InvalidateNumRule();
+
+ // --> OD 2005-02-21 #i42921# - determines the text direction for a certain
+ // position. Return -1, if text direction could *not* be determined.
+ short GetTextDirection( const SwPosition& rPos,
+ const Point* pPt ) const;
+ // <--
+
+ inline void SetModifyAtAttr( bool bSetModifyAtAttr ) const { mbSetModifyAtAttr = bSetModifyAtAttr; }
+ inline bool GetModifyAtAttr() const { return mbSetModifyAtAttr; }
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwCntntNode( const SwCntntNode & rNode );
+ SwCntntNode & operator= ( const SwCntntNode & rNode );
+
+};
+
+
+
+//---------
+// SwTableNode
+//---------
+class SW_DLLPUBLIC SwTableNode : public SwStartNode, public SwModify
+{
+ friend class SwNodes;
+ SwTable* pTable;
+protected:
+ virtual ~SwTableNode();
+
+public:
+ SwTableNode( const SwNodeIndex & );
+
+ const SwTable& GetTable() const { return *pTable; }
+ SwTable& GetTable() { return *pTable; }
+ SwTabFrm *MakeFrm();
+
+ //Legt die Frms fuer den TableNode (also die TabFrms) an.
+ void MakeFrms( SwNodeIndex* pIdxBehind );
+
+ //Methode loescht fuer den Node alle Ansichten vom
+ //Dokument. Die Contentframes werden aus dem entsprechenden
+ //Layout ausgehaengt.
+ void DelFrms();
+
+ //Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
+ //Dokument. Die erzeugten Contentframes werden in das entsprechende
+ //Layout gehaengt.
+ void MakeFrms( const SwNodeIndex & rIdx );
+
+ SwTableNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
+ void SetNewTable( SwTable* , BOOL bNewFrames=TRUE );
+
+private:
+ // privater Constructor, weil nie kopiert werden darf !!
+ SwTableNode( const SwTableNode & rNode );
+ SwTableNode & operator= ( const SwTableNode & rNode );
+};
+
+
+//---------
+// SwSectionNode
+//---------
+class SwSectionNode
+ : public SwStartNode
+ , private ::boost::noncopyable
+{
+ friend class SwNodes;
+
+private:
+ ::std::auto_ptr<SwSection> const m_pSection;
+
+protected:
+ virtual ~SwSectionNode();
+
+public:
+ SwSectionNode(SwNodeIndex const&,
+ SwSectionFmt & rFmt, SwTOXBase const*const pTOXBase);
+
+ const SwSection& GetSection() const { return *m_pSection; }
+ SwSection& GetSection() { return *m_pSection; }
+
+ SwFrm *MakeFrm();
+
+ //Legt die Frms fuer den SectionNode (also die SectionFrms) an.
+ //Im Defaultfall wird bis die Frames bis zum Ende des Bereichs angelegt,
+ //uebergibt man einen weiteren NodeIndex pEnd, so wird bis zu diesem
+ //ein MakeFrms gerufen, genutzt wird dies von TableToText
+ void MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = NULL );
+
+ //Methode loescht fuer den Node alle Ansichten vom
+ //Dokument. Die Contentframes werden aus dem entsprechenden
+ //Layout ausgehaengt.
+ void DelFrms();
+
+ //Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
+ //Dokument. Die erzeugten Contentframes werden in das entsprechende
+ //Layout gehaengt.
+ void MakeFrms( const SwNodeIndex & rIdx );
+
+ SwSectionNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
+
+ // setze den Verweis im Format der Section auf sich selbst
+ void NodesArrChgd();
+
+ // ueberprueft bei _nicht_ versteckten Bereichen, ob es Inhalt gibt, der
+ // _nicht_ in einem versteckten (Unter-)Bereich liegt
+ BOOL IsCntntHidden() const;
+
+};
+
+
+
+// ---------------------- einige inline Methoden ----------------------
+inline SwEndNode *SwNode::GetEndNode()
+{
+ return ND_ENDNODE == nNodeType ? (SwEndNode*)this : 0;
+}
+inline const SwEndNode *SwNode::GetEndNode() const
+{
+ return ND_ENDNODE == nNodeType ? (const SwEndNode*)this : 0;
+}
+inline SwStartNode *SwNode::GetStartNode()
+{
+ return ND_STARTNODE & nNodeType ? (SwStartNode*)this : 0;
+}
+inline const SwStartNode *SwNode::GetStartNode() const
+{
+ return ND_STARTNODE & nNodeType ? (const SwStartNode*)this : 0;
+}
+inline SwTableNode *SwNode::GetTableNode()
+{
+ return ND_TABLENODE == nNodeType ? (SwTableNode*)this : 0;
+}
+inline const SwTableNode *SwNode::GetTableNode() const
+{
+ return ND_TABLENODE == nNodeType ? (const SwTableNode*)this : 0;
+}
+inline SwSectionNode *SwNode::GetSectionNode()
+{
+ return ND_SECTIONNODE == nNodeType ? (SwSectionNode*)this : 0;
+}
+inline const SwSectionNode *SwNode::GetSectionNode() const
+{
+ return ND_SECTIONNODE == nNodeType ? (const SwSectionNode*)this : 0;
+}
+inline SwCntntNode *SwNode::GetCntntNode()
+{
+ return ND_CONTENTNODE & nNodeType ? (SwCntntNode*)this : 0;
+}
+inline const SwCntntNode *SwNode::GetCntntNode() const
+{
+ return ND_CONTENTNODE & nNodeType ? (const SwCntntNode*)this : 0;
+}
+
+
+inline BOOL SwNode::IsStartNode() const
+{
+ return ND_STARTNODE & nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsCntntNode() const
+{
+ return ND_CONTENTNODE & nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsEndNode() const
+{
+ return ND_ENDNODE == nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsTxtNode() const
+{
+ return ND_TEXTNODE == nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsTableNode() const
+{
+ return ND_TABLENODE == nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsSectionNode() const
+{
+ return ND_SECTIONNODE == nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsNoTxtNode() const
+{
+ return ND_NOTXTNODE & nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsOLENode() const
+{
+ return ND_OLENODE == nNodeType ? TRUE : FALSE;
+}
+inline BOOL SwNode::IsGrfNode() const
+{
+ return ND_GRFNODE == nNodeType ? TRUE : FALSE;
+}
+
+inline const SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp ) const
+{
+ return ((SwNode*)this)->FindSttNodeByType( eTyp );
+}
+inline const SwTableNode* SwNode::FindTableNode() const
+{
+ return ((SwNode*)this)->FindTableNode();
+}
+inline const SwSectionNode* SwNode::FindSectionNode() const
+{
+ return ((SwNode*)this)->FindSectionNode();
+}
+inline ULONG SwNode::StartOfSectionIndex() const
+{
+ return pStartOfSection->GetIndex();
+}
+inline ULONG SwNode::EndOfSectionIndex() const
+{
+ const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
+ return pStNd->pEndOfSection->GetIndex();
+}
+inline const SwEndNode* SwNode::EndOfSectionNode() const
+{
+ const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
+ return pStNd->pEndOfSection;
+}
+inline SwEndNode* SwNode::EndOfSectionNode()
+{
+ SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
+ return pStNd->pEndOfSection;
+}
+
+inline SwNodes& SwNode::GetNodes()
+{
+ return (SwNodes&)GetArray();
+}
+inline const SwNodes& SwNode::GetNodes() const
+{
+ return (SwNodes&)GetArray();
+}
+
+inline SwDoc* SwNode::GetDoc()
+{
+ return GetNodes().GetDoc();
+}
+inline const SwDoc* SwNode::GetDoc() const
+{
+ return GetNodes().GetDoc();
+}
+
+inline SwFmtColl* SwCntntNode::GetCondFmtColl() const
+{
+ return pCondColl ? (SwFmtColl*)pCondColl->GetRegisteredIn() : 0;
+}
+
+
+inline SwFmtColl& SwCntntNode::GetAnyFmtColl() const
+{
+ return pCondColl && pCondColl->GetRegisteredIn()
+ ? *(SwFmtColl*)pCondColl->GetRegisteredIn()
+ : *(SwFmtColl*)GetRegisteredIn();
+}
+
+inline const SwAttrSet& SwCntntNode::GetSwAttrSet() const
+{
+ return mpAttrSet ? *GetpSwAttrSet() : GetAnyFmtColl().GetAttrSet();
+}
+
+//FEATURE::CONDCOLL
+
+inline const SfxPoolItem& SwCntntNode::GetAttr( USHORT nWhich,
+ BOOL bInParents ) const
+{
+ return GetSwAttrSet().Get( nWhich, bInParents );
+}
+#endif
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
new file mode 100644
index 000000000000..11920c2d6f61
--- /dev/null
+++ b/sw/inc/numrule.hxx
@@ -0,0 +1,374 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _NUMRULE_HXX
+#define _NUMRULE_HXX
+
+#include <tools/link.hxx>
+#include <tools/gen.hxx>
+#include <tools/string.hxx>
+#include <editeng/svxenum.hxx>
+#include <editeng/numitem.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx>
+#include <calbck.hxx>
+#include <errhdl.hxx> // Fuer die inline-ASSERTs
+#include <error.h> // Fuer die inline-ASSERTs
+#include <hints.hxx>
+#include <hash_map>
+#include <stringhash.hxx>
+// --> OD 2008-02-21 #refactorlists#
+class SwNodeNum;
+#include <SwNumberTreeTypes.hxx>
+// <--
+// --> OD 2008-02-19 #refactorlists#
+#include <vector>
+class SwTxtFmtColl;
+// <--
+// --> OD 2008-07-08 #i91400#
+class IDocumentListsAccess;
+// <--
+
+class Font;
+class SvxBrushItem;
+class SvxNumRule;
+class SwCharFmt;
+class SwDoc;
+class SwFmtVertOrient;
+class SwTxtNode;
+
+const sal_Unicode cBulletChar = 0x2022; // Charakter fuer Aufzaehlungen
+
+class SW_DLLPUBLIC SwNumFmt : public SvxNumberFormat, public SwClient
+{
+ SwFmtVertOrient* pVertOrient;
+
+ SW_DLLPRIVATE void UpdateNumNodes( SwDoc* pDoc );
+ SW_DLLPRIVATE virtual void NotifyGraphicArrived();
+
+ using SvxNumberFormat::operator ==;
+ using SvxNumberFormat::operator !=;
+
+public:
+ SwNumFmt();
+ SwNumFmt( const SwNumFmt& );
+ SwNumFmt( const SvxNumberFormat&, SwDoc* pDoc);
+
+ virtual ~SwNumFmt();
+
+ SwNumFmt& operator=( const SwNumFmt& );
+
+ BOOL operator==( const SwNumFmt& ) const;
+ BOOL operator!=( const SwNumFmt& r ) const { return !(*this == r); }
+
+ SwCharFmt* GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
+ void SetCharFmt( SwCharFmt* );
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ virtual void SetCharFmtName(const String& rSet);
+ virtual const String& GetCharFmtName()const;
+
+ virtual void SetGraphicBrush( const SvxBrushItem* pBrushItem, const Size* pSize = 0, const sal_Int16* pOrient = 0);
+
+ virtual void SetVertOrient(sal_Int16 eSet);
+ virtual sal_Int16 GetVertOrient() const;
+ const SwFmtVertOrient* GetGraphicOrientation() const;
+
+ BOOL IsEnumeration() const; // #i22362#
+ BOOL IsItemize() const; // #i29560#
+};
+
+class SwPaM;
+enum SwNumRuleType { OUTLINE_RULE = 0, NUM_RULE = 1, RULE_END = 2 };
+class SW_DLLPUBLIC SwNumRule
+{
+// --> OD 2008-02-19 #refactorlists#
+public:
+ typedef std::vector< SwTxtNode* > tTxtNodeList;
+ typedef std::vector< SwTxtFmtColl* > tParagraphStyleList;
+// <--
+private:
+ friend void _FinitCore();
+
+#ifdef DBG_UTIL
+ long int nSerial;
+ static long int nInstances;
+#endif
+
+ static SwNumFmt* aBaseFmts [ RULE_END ][ MAXLEVEL ];
+ static USHORT aDefNumIndents[ MAXLEVEL ];
+ // --> OD 2008-02-11 #newlistlevelattrs#
+ // default list level properties for position-and-space mode LABEL_ALIGNMENT
+ static SwNumFmt* aLabelAlignmentBaseFmts [ RULE_END ][ MAXLEVEL ];
+ // <--
+ static USHORT nRefCount;
+ static char* pDefOutlineName;
+
+ SwNumFmt* aFmts[ MAXLEVEL ];
+
+ /** container for associated text nodes
+
+ */
+ // --> OD 2008-02-19 #refactorlists#
+// SwTxtNodeTable* pTxtNodeList;
+ tTxtNodeList maTxtNodeList;
+ // <--
+
+ /** container for associated paragraph styles
+
+ OD 2008-03-03 #refactorlists#
+ */
+ tParagraphStyleList maParagraphStyleList;
+
+ // #i36749#
+ /**
+ hash_map containing "name->rule" relation
+ */
+ std::hash_map<String, SwNumRule *, StringHash> * pNumRuleMap;
+
+ String sName;
+ SwNumRuleType eRuleType;
+ USHORT nPoolFmtId; // Id-fuer "automatich" erzeugte NumRules
+ USHORT nPoolHelpId; // HelpId fuer diese Pool-Vorlage
+ BYTE nPoolHlpFileId; // FilePos ans Doc auf die Vorlagen-Hilfen
+ BOOL bAutoRuleFlag : 1;
+ BOOL bInvalidRuleFlag : 1;
+ BOOL bContinusNum : 1; // Fortlaufende Numerierung - ohne Ebenen
+ BOOL bAbsSpaces : 1; // die Ebenen repraesentieren absol. Einzuege
+ bool mbCountPhantoms;
+
+ // --> OD 2008-02-11 #newlistlevelattrs#
+ const SvxNumberFormat::SvxNumPositionAndSpaceMode meDefaultNumberFormatPositionAndSpaceMode;
+ // <--
+
+ // --> OD 2008-04-03 #refactorlists#
+ String msDefaultListId;
+ // <--
+
+ // forbidden and not implemented.
+ SwNumRule();
+
+public:
+ // --> OD 2008-02-08 #newlistlevelattrs#
+ // add parameter <eDefaultNumberFormatPositionAndSpaceMode>
+ SwNumRule( const String& rNm,
+ const SvxNumberFormat::SvxNumPositionAndSpaceMode eDefaultNumberFormatPositionAndSpaceMode,
+ SwNumRuleType = NUM_RULE,
+ BOOL bAutoFlg = TRUE );
+
+ SwNumRule( const SwNumRule& );
+ ~SwNumRule();
+
+ SwNumRule& operator=( const SwNumRule& );
+ BOOL operator==( const SwNumRule& ) const;
+ BOOL operator!=( const SwNumRule& r ) const { return !(*this == r); }
+
+ const SwNumFmt* GetNumFmt( USHORT i ) const;
+ const SwNumFmt& Get( USHORT i ) const;
+
+ void Set( USHORT i, const SwNumFmt* );
+ void Set( USHORT i, const SwNumFmt& );
+ String MakeNumString( const SwNodeNum&, BOOL bInclStrings = TRUE,
+ BOOL bOnlyArabic = FALSE ) const;
+ // --> OD 2005-10-17 #126238#
+ // - add optional parameter <_nRestrictToThisLevel> in order to
+ // restrict returned string to this level.
+ String MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
+ const BOOL bInclStrings = TRUE,
+ const BOOL bOnlyArabic = FALSE,
+ const unsigned int _nRestrictToThisLevel = MAXLEVEL ) const;
+ // <--
+ // --> OD 2007-08-24 #i81002#
+ String MakeRefNumString( const SwNodeNum& rNodeNum,
+ const bool bInclSuperiorNumLabels = false,
+ const sal_uInt8 nRestrictInclToThisLevel = 0 ) const;
+ // <--
+
+ /** Returns list of associated text nodes.
+
+ OD 2008-02-19 #refactorlists#
+
+ @return list of associated text nodes
+ */
+// const SwTxtNodeTable * GetTxtNodeList() const { return pTxtNodeList; }
+ void GetTxtNodeList( SwNumRule::tTxtNodeList& rTxtNodeList ) const;
+ SwNumRule::tTxtNodeList::size_type GetTxtNodeListSize() const;
+
+ // --> OD 2008-02-19 #refactorlists#
+ void AddTxtNode( SwTxtNode& rTxtNode );
+ void RemoveTxtNode( SwTxtNode& rTxtNode );
+ // <--
+
+ // --> OD 2008-03-03 #refactorlists#
+ SwNumRule::tParagraphStyleList::size_type GetParagraphStyleListSize() const;
+ void AddParagraphStyle( SwTxtFmtColl& rTxtFmtColl );
+ void RemoveParagraphStyle( SwTxtFmtColl& rTxtFmtColl );
+ // <--
+
+ // --> OD 2008-04-03 #refactorlists#
+ inline void SetDefaultListId( const String sDefaultListId )
+ {
+ msDefaultListId = sDefaultListId;
+ }
+ inline String GetDefaultListId() const
+ {
+ return msDefaultListId;
+ }
+ // <--
+ // #i36749#
+ /**
+ Register this rule in a "name->numrule" map.
+
+ @param pNumRuleMap map to register in
+ */
+ void SetNumRuleMap(
+ std::hash_map<String, SwNumRule *, StringHash>* pNumRuleMap );
+
+ static char* GetOutlineRuleName() { return pDefOutlineName; }
+
+ static USHORT GetNumIndent( BYTE nLvl );
+ static USHORT GetBullIndent( BYTE nLvl );
+
+ SwNumRuleType GetRuleType() const { return eRuleType; }
+ void SetRuleType( SwNumRuleType eNew ) { eRuleType = eNew;
+ bInvalidRuleFlag = TRUE; }
+
+ // eine Art Copy-Constructor, damit die Num-Formate auch an den
+ // richtigen CharFormaten eines Dokumentes haengen !!
+ // (Kopiert die NumFormate und returnt sich selbst)
+ SwNumRule& CopyNumRule( SwDoc*, const SwNumRule& );
+
+ // testet ob die CharFormate aus dem angegeben Doc sind und kopiert
+ // die gegebenfalls
+ void CheckCharFmts( SwDoc* pDoc );
+
+ const String& GetName() const { return sName; }
+ // --> OD 2008-07-08 #i91400#
+ void SetName( const String& rNm,
+ IDocumentListsAccess& rDocListAccess ); // #i36749#
+ // <--
+
+ BOOL IsAutoRule() const { return bAutoRuleFlag; }
+ void SetAutoRule( BOOL bFlag ) { bAutoRuleFlag = bFlag; }
+
+ BOOL IsInvalidRule() const { return bInvalidRuleFlag; }
+ void SetInvalidRule( BOOL bFlag );
+
+ BOOL IsContinusNum() const { return bContinusNum; }
+ void SetContinusNum( BOOL bFlag ) { bContinusNum = bFlag; }
+
+ BOOL IsAbsSpaces() const { return bAbsSpaces; }
+ void SetAbsSpaces( BOOL bFlag ) { bAbsSpaces = bFlag; }
+
+ // #115901#
+ BOOL IsOutlineRule() const { return eRuleType == OUTLINE_RULE; }
+
+ bool IsCountPhantoms() const;
+ void SetCountPhantoms(bool bCountPhantoms);
+
+ // erfragen und setzen der Poolvorlagen-Id's
+ USHORT GetPoolFmtId() const { return nPoolFmtId; }
+ void SetPoolFmtId( USHORT nId ) { nPoolFmtId = nId; }
+
+ // erfragen und setzen der Hilfe-Id's fuer die Document-Vorlagen
+ USHORT GetPoolHelpId() const { return nPoolHelpId; }
+ void SetPoolHelpId( USHORT nId ) { nPoolHelpId = nId; }
+ BYTE GetPoolHlpFileId() const { return nPoolHlpFileId; }
+ void SetPoolHlpFileId( BYTE nId ) { nPoolHlpFileId = nId; }
+
+ void SetSvxRule(const SvxNumRule&, SwDoc* pDoc);
+ SvxNumRule MakeSvxNumRule() const;
+
+ // #i23726#, #i23725#
+ // --> OD 2008-06-09 #i90078#
+ // refactoring: provide certain method for certain purpose
+// void Indent(short aAmount, int nLevel = -1,
+// int nReferenceLevel = -1, BOOL bRelative = TRUE,
+// BOOL bFirstLine = TRUE, BOOL bCheckGtZero = TRUE);
+ // change indent of all list levels by given difference
+ void ChangeIndent( const short nDiff );
+ // set indent of certain list level to given value
+ void SetIndent( const short nNewIndent,
+ const USHORT nListLevel );
+ // set indent of first list level to given value and change other list level's
+ // indents accordingly
+ void SetIndentOfFirstListLevelAndChangeOthers( const short nNewIndent );
+ // <--
+
+ void Validate();
+};
+
+// --> OD 2006-06-27 #b6440955#
+// namespace for static functions and methods for numbering and bullets
+namespace numfunc
+{
+ /** retrieve font family name used for the default bullet list characters
+
+ @author OD
+ */
+ const String& GetDefBulletFontname();
+
+ /** determine if default bullet font is user defined
+
+ OD 2008-06-06 #i63395#
+ The default bullet font is user defined, if it is given in the user configuration
+
+ @author OD
+ */
+ bool IsDefBulletFontUserDefined();
+
+ /** retrieve font used for the default bullet list characters
+
+ @author OD
+ */
+ SW_DLLPUBLIC const Font& GetDefBulletFont();
+
+ /** retrieve unicode of character used for the default bullet list for the given list level
+
+ @author OD
+ */
+ sal_Unicode GetBulletChar( BYTE nLevel );
+
+ /** configuration, if at first position of the first list item the <TAB>-key
+ increased the indent of the complete list or only demotes this list item.
+ The same for <SHIFT-TAB>-key at the same position for decreasing the
+ indent of the complete list or only promotes this list item.
+
+ OD 2007-10-01 #b6600435#
+
+ @author OD
+ */
+ sal_Bool ChangeIndentOnTabAtFirstPosOfFirstListItem();
+
+ /**
+ OD 2008-06-06 #i89178#
+
+ @author OD
+ */
+ SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode();
+}
+
+#endif // _NUMRULE_HXX
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
new file mode 100644
index 000000000000..6df70d20199d
--- /dev/null
+++ b/sw/inc/pagedesc.hxx
@@ -0,0 +1,347 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _PAGEDESC_HXX
+#define _PAGEDESC_HXX
+
+#include <tools/fract.hxx>
+#include <tools/color.hxx>
+#include <tools/string.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx> //fuer SwTwips
+#include <frmfmt.hxx>
+//#ifndef _NUMRULE_HXX
+//#include <numrule.hxx>
+//#endif
+#include <editeng/numitem.hxx>
+
+class SfxPoolItem;
+class SwTxtFmtColl;
+class SwNode;
+
+//Separator line adjustment
+enum SwFtnAdj
+{
+ FTNADJ_LEFT,
+ FTNADJ_CENTER,
+ FTNADJ_RIGHT
+};
+
+//footnote information
+class SW_DLLPUBLIC SwPageFtnInfo
+{
+ SwTwips nMaxHeight; //maximum height of the footnote area.
+ ULONG nLineWidth; //width of separator line
+ Color aLineColor; //color of the separator line
+ Fraction aWidth; //percentage width of the separator line.
+ SwFtnAdj eAdj; //line adjustment.
+ SwTwips nTopDist; //distance between body and separator.
+ SwTwips nBottomDist; //distance between separator and first footnote
+
+public:
+ SwTwips GetHeight() const { return nMaxHeight; }
+ ULONG GetLineWidth() const { return nLineWidth; }
+ const Color& GetLineColor() const { return aLineColor;}
+ const Fraction& GetWidth() const { return aWidth; }
+ SwFtnAdj GetAdj() const { return eAdj; }
+ SwTwips GetTopDist()const { return nTopDist; }
+ SwTwips GetBottomDist() const { return nBottomDist; }
+
+ void SetHeight( SwTwips nNew ) { nMaxHeight = nNew; }
+ void SetLineWidth(ULONG nSet ) { nLineWidth = nSet; }
+ void SetLineColor(const Color& rCol ) { aLineColor = rCol;}
+ void SetWidth( const Fraction &rNew){ aWidth = rNew; }
+ void SetAdj ( SwFtnAdj eNew ) { eAdj = eNew; }
+ void SetTopDist ( SwTwips nNew ) { nTopDist = nNew; }
+ void SetBottomDist( SwTwips nNew ) { nBottomDist = nNew; }
+
+ SwPageFtnInfo();
+ SwPageFtnInfo( const SwPageFtnInfo& );
+ SwPageFtnInfo& operator=( const SwPageFtnInfo& );
+
+ BOOL operator ==( const SwPageFtnInfo& ) const;
+};
+
+/*
+ * Verwendung des UseOnPage (eUse) und der FrmFmt'e
+ *
+ * RIGHT - aMaster nur fuer rechte Seiten, linke Seiten immer leer.
+ * LEFT - aLeft fuer linke Seiten, rechte Seiten immer leer.
+ * aLeft ist eine Kopie des Master.
+ * ALL - aMaster fuer rechte Seiten, aLeft fuer Linke Seiten.
+ * aLeft ist eine Kopie des Master.
+ * MIRROR - aMaster fuer rechte Seiten, aLeft fuer linke Seiten.
+ * aLeft ist eine Kopie des Master, Raender sind gespiegelt.
+ *
+ * UI dreht auschliesslich am Master! aLeft wird beim Chg am Dokument
+ * enstprechend dem eUse eingestellt.
+ *
+ * Damit es die Filter etwas einfacher haben werden weitere Werte im
+ * eUse untergebracht:
+ *
+ * HEADERSHARE - Headerinhalt auf beiden Seiten gleich
+ * FOOTERSHARE - Footerinhalt auf beiden Seiten gleich
+ *
+ * Die Werte werden bei den entsprechenden Get-/Set-Methden ausmaskiert.
+ * Zugriff auf das volle eUse inclusive der Header-Footer information
+ * per ReadUseOn(), WriteUseOn() (fuer Filter und CopyCTor)!
+ *
+ * Die FrmFormate fuer Header/Footer werden anhand der Attribute fuer
+ * Header/Footer vom UI am Master eingestellt (Hoehe, Raender, Hintergrund...);
+ * Header/Footer fuer die Linke Seite werden entsprechen kopiert bzw.
+ * gespielt (Chg am Dokument).
+ * Das jew. Attribut fuer den Inhalt wird automatisch beim Chg am
+ * Dokument versorgt (entsprechen den SHARE-informationen werden Inhalte
+ * erzeugt bzw. entfernt).
+ *
+ */
+
+typedef USHORT UseOnPage;
+namespace nsUseOnPage
+{
+ const UseOnPage PD_NONE = 0x0000; //for internal use only.
+ const UseOnPage PD_LEFT = 0x0001;
+ const UseOnPage PD_RIGHT = 0x0002;
+ const UseOnPage PD_ALL = 0x0003;
+ const UseOnPage PD_MIRROR = 0x0007;
+ const UseOnPage PD_HEADERSHARE = 0x0040;
+ const UseOnPage PD_FOOTERSHARE = 0x0080;
+ const UseOnPage PD_NOHEADERSHARE = 0x00BF; //for internal use only
+ const UseOnPage PD_NOFOOTERSHARE = 0x007F; //for internal use only
+}
+
+class SW_DLLPUBLIC SwPageDesc : public SwModify
+{
+ friend class SwDoc;
+ friend class SwUndoPageDescExt;
+
+ String aDescName;
+ SvxNumberType aNumType;
+ SwFrmFmt aMaster;
+ SwFrmFmt aLeft;
+ SwDepend aDepend; // wg. Registerhaltigkeit
+ SwPageDesc *pFollow;
+ USHORT nRegHeight; // Zeilenabstand und Fontascent der Vorlage
+ USHORT nRegAscent; // fuer die Registerhaltigkeit
+ UseOnPage eUse;
+ BOOL bLandscape;
+
+ //Fussnoteninformationen
+ SwPageFtnInfo aFtnInfo;
+
+ //Wird zum Spiegeln vom Chg (Doc) gerufen.
+ //Kein Abgleich an anderer Stelle.
+ SW_DLLPRIVATE void Mirror();
+
+ SW_DLLPRIVATE void ResetAllAttr( sal_Bool bLeft );
+
+ SW_DLLPRIVATE SwPageDesc(const String&, SwFrmFmt*, SwDoc *pDc );
+
+public:
+ const String &GetName() const { return aDescName; }
+ void SetName( const String& rNewName ) { aDescName = rNewName; }
+
+ BOOL GetLandscape() const { return bLandscape; }
+ void SetLandscape( BOOL bNew ) { bLandscape = bNew; }
+
+ const SvxNumberType &GetNumType() const { return aNumType; }
+ void SetNumType( const SvxNumberType& rNew ) { aNumType = rNew; }
+
+ const SwPageFtnInfo &GetFtnInfo() const { return aFtnInfo; }
+ SwPageFtnInfo &GetFtnInfo() { return aFtnInfo; }
+ void SetFtnInfo( const SwPageFtnInfo &rNew ) { aFtnInfo = rNew; }
+
+ inline BOOL IsHeaderShared() const;
+ inline BOOL IsFooterShared() const;
+ inline void ChgHeaderShare( BOOL bNew );
+ inline void ChgFooterShare( BOOL bNew );
+
+ inline void SetUseOn( UseOnPage eNew );
+ inline UseOnPage GetUseOn() const;
+
+ void WriteUseOn( UseOnPage eNew ) { eUse = eNew; }
+ UseOnPage ReadUseOn () const { return eUse; }
+
+ SwFrmFmt &GetMaster() { return aMaster; }
+ SwFrmFmt &GetLeft() { return aLeft; }
+ const SwFrmFmt &GetMaster() const { return aMaster; }
+ const SwFrmFmt &GetLeft() const { return aLeft; }
+
+ // Reset all attrs of the format but keep the ones a pagedesc
+ // cannot live without.
+ inline void ResetAllMasterAttr();
+ inline void ResetAllLeftAttr();
+
+ //Mit den folgenden Methoden besorgt sich das Layout ein Format
+ //um eine Seite erzeugen zu koennen
+ inline SwFrmFmt *GetRightFmt();
+ inline const SwFrmFmt *GetRightFmt() const;
+ inline SwFrmFmt *GetLeftFmt();
+ inline const SwFrmFmt *GetLeftFmt() const;
+
+ USHORT GetRegHeight() const { return nRegHeight; }
+ USHORT GetRegAscent() const { return nRegAscent; }
+ void SetRegHeight( USHORT nNew ){ nRegHeight = nNew; }
+ void SetRegAscent( USHORT nNew ){ nRegAscent = nNew; }
+
+ inline void SetFollow( const SwPageDesc* pNew );
+ const SwPageDesc* GetFollow() const { return pFollow; }
+ SwPageDesc* GetFollow() { return pFollow; }
+
+ void SetRegisterFmtColl( const SwTxtFmtColl* rFmt );
+ const SwTxtFmtColl* GetRegisterFmtColl() const;
+ virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
+ void RegisterChange();
+
+ // erfragen und setzen der PoolFormat-Id
+ USHORT GetPoolFmtId() const { return aMaster.GetPoolFmtId(); }
+ void SetPoolFmtId( USHORT nId ) { aMaster.SetPoolFmtId( nId ); }
+ USHORT GetPoolHelpId() const { return aMaster.GetPoolHelpId(); }
+ void SetPoolHelpId( USHORT nId ) { aMaster.SetPoolHelpId( nId ); }
+ BYTE GetPoolHlpFileId() const { return aMaster.GetPoolHlpFileId(); }
+ void SetPoolHlpFileId( BYTE nId ) { aMaster.SetPoolHlpFileId( nId ); }
+
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ const SwFrmFmt* GetPageFmtOfNode( const SwNode& rNd,
+ BOOL bCheckForThisPgDc = TRUE ) const;
+ BOOL IsFollowNextPageOfNode( const SwNode& rNd ) const;
+
+ //Given a SwNode return the pagedesc in use at that location.
+ static const SwPageDesc* GetPageDescOfNode(const SwNode& rNd);
+
+ SwPageDesc& operator=( const SwPageDesc& );
+
+ SwPageDesc( const SwPageDesc& );
+ ~SwPageDesc();
+};
+
+inline void SwPageDesc::SetFollow( const SwPageDesc* pNew )
+{
+ pFollow = pNew ? (SwPageDesc*)pNew : this;
+}
+
+inline BOOL SwPageDesc::IsHeaderShared() const
+{
+ return eUse & nsUseOnPage::PD_HEADERSHARE ? TRUE : FALSE;
+}
+inline BOOL SwPageDesc::IsFooterShared() const
+{
+ return eUse & nsUseOnPage::PD_FOOTERSHARE ? TRUE : FALSE;
+}
+inline void SwPageDesc::ChgHeaderShare( BOOL bNew )
+{
+ if ( bNew )
+ eUse = (UseOnPage) (eUse | nsUseOnPage::PD_HEADERSHARE);
+ // (USHORT&)eUse |= (USHORT)nsUseOnPage::PD_HEADERSHARE;
+ else
+ eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOHEADERSHARE);
+ // (USHORT&)eUse &= (USHORT)nsUseOnPage::PD_NOHEADERSHARE;
+}
+inline void SwPageDesc::ChgFooterShare( BOOL bNew )
+{
+ if ( bNew )
+ eUse = (UseOnPage) (eUse | nsUseOnPage::PD_FOOTERSHARE);
+ // (USHORT&)eUse |= (USHORT)nsUseOnPage::PD_FOOTERSHARE;
+ else
+ eUse = (UseOnPage) (eUse & nsUseOnPage::PD_NOFOOTERSHARE);
+ // (USHORT&)eUse &= (USHORT)nsUseOnPage::PD_NOFOOTERSHARE;
+}
+inline void SwPageDesc::SetUseOn( UseOnPage eNew )
+{
+ UseOnPage eTmp = nsUseOnPage::PD_NONE;
+ if ( eUse & nsUseOnPage::PD_HEADERSHARE )
+ eTmp = nsUseOnPage::PD_HEADERSHARE;
+ // (USHORT&)eTmp |= (USHORT)nsUseOnPage::PD_HEADERSHARE;
+ if ( eUse & nsUseOnPage::PD_FOOTERSHARE )
+ eTmp = (UseOnPage) (eTmp | nsUseOnPage::PD_FOOTERSHARE);
+ // (USHORT&)eTmp |= (USHORT)nsUseOnPage::PD_FOOTERSHARE;
+ eUse = (UseOnPage) (eTmp | eNew);
+ // (USHORT&)eUse = eTmp | eNew;
+}
+inline UseOnPage SwPageDesc::GetUseOn() const
+{
+ UseOnPage eRet = eUse;
+ eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOHEADERSHARE);
+ // (USHORT&)eRet &= (USHORT)nsUseOnPage::PD_NOHEADERSHARE;
+ eRet = (UseOnPage) (eRet & nsUseOnPage::PD_NOFOOTERSHARE);
+ // (USHORT&)eRet &= (USHORT)nsUseOnPage::PD_NOFOOTERSHARE;
+ return eRet;
+}
+
+inline void SwPageDesc::ResetAllMasterAttr()
+{
+ ResetAllAttr( sal_False );
+}
+
+inline void SwPageDesc::ResetAllLeftAttr()
+{
+ ResetAllAttr( sal_True );
+}
+
+inline SwFrmFmt *SwPageDesc::GetRightFmt()
+{
+ return nsUseOnPage::PD_RIGHT & eUse ? &aMaster : 0;
+}
+inline const SwFrmFmt *SwPageDesc::GetRightFmt() const
+{
+ return nsUseOnPage::PD_RIGHT & eUse ? &aMaster : 0;
+}
+inline SwFrmFmt *SwPageDesc::GetLeftFmt()
+{
+ return nsUseOnPage::PD_LEFT & eUse ? &aLeft : 0;
+}
+inline const SwFrmFmt *SwPageDesc::GetLeftFmt() const
+{
+ return nsUseOnPage::PD_LEFT & eUse ? &aLeft : 0;
+}
+
+class SwPageDescExt
+{
+ SwPageDesc aPageDesc;
+ SwDoc * pDoc;
+ String sFollow;
+
+ void SetPageDesc(const SwPageDesc & aPageDesc);
+
+public:
+ SwPageDescExt(const SwPageDesc & rPageDesc, SwDoc * pDoc);
+ SwPageDescExt(const SwPageDescExt & rSrc);
+ ~SwPageDescExt();
+
+ SwPageDescExt & operator = (const SwPageDescExt & rSrc);
+ SwPageDescExt & operator = (const SwPageDesc & rSrc);
+
+ const String & GetName() const;
+
+ operator SwPageDesc() const; // #i7983#
+};
+
+
+SwPageDesc* GetPageDescByName_Impl(SwDoc& rDoc, const String& rName);
+
+#endif //_PAGEDESC_HXX
diff --git a/sw/inc/pageiter.hxx b/sw/inc/pageiter.hxx
new file mode 100644
index 000000000000..97e03873ec8d
--- /dev/null
+++ b/sw/inc/pageiter.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _PAGEITER_HXX
+#define _PAGEITER_HXX
+
+#include <tools/solar.h>
+
+class SwDoc;
+class SwPageFrm;
+struct SwPosition;
+class SwPageDesc;
+
+class SwPageIter {
+ const SwDoc &rPDoc;
+ const SwPageFrm *pPage;
+
+public:
+ SwPageIter( const SwDoc &rDoc, const SwPosition &rStartPos );
+
+ BOOL IsEnd() const { return 0 == pPage; }
+ BOOL NextPage();
+ const SwPageDesc* GetPageDesc() const;
+ BOOL Seek( const SwPosition &rPos );
+ BOOL GetPosition( SwPosition &rPos ) const;
+};
+
+
+#endif
+
diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx
new file mode 100644
index 000000000000..589e2850b1ab
--- /dev/null
+++ b/sw/inc/pagepreviewlayout.hxx
@@ -0,0 +1,624 @@
+#ifndef _PAGEPREVIEWLAYOUT_HXX
+#define _PAGEPREVIEWLAYOUT_HXX
+
+// template class <std::vector>
+#include <vector>
+// datatypes sal_xyz
+#include <sal/types.h>
+// classes <Point>, <Size> and <Rectangle>
+#include <tools/gen.hxx>
+// datatype <SwTwips>
+#include <swtypes.hxx>
+
+class ViewShell;
+class SwRootFrm;
+class SwPageFrm;
+class Fraction;
+struct PrevwPage;
+
+// =============================================================================
+/** page preview functionality in the writer
+
+ OD 11.12.2002 #103492# - class <SwPagePreviewLayout>
+
+ @author OD
+*/
+class SwPagePreviewLayout
+{
+private:
+ friend class ViewShell;
+
+ // number of horizontal and vertical twips for spacing between the pages.
+ const SwTwips mnXFree;
+ const SwTwips mnYFree;
+
+ // view shell the print preview is generated for.
+ ViewShell& mrParentViewShell;
+ // top layout frame of the layout for accessing the pages
+ const SwRootFrm& mrLayoutRootFrm;
+
+ // boolean indicating, if the layout information (number of columns and rows)
+ // are valid.
+ bool mbLayoutInfoValid;
+ // boolean indicating, if the the calculated print preview layout sizes
+ // ( windows size in twips, maximal page size, column width, row height,
+ // width and height of a print preview page, size of the print preview
+ // document ) are valid
+ bool mbLayoutSizesValid;
+ // boolean indicating, if the the paint information ( physical number of
+ // start page, start column and row, paint offsets, rectangle visible of
+ // the print preview document.
+ bool mbPaintInfoValid;
+
+ Size maWinSize;
+ sal_uInt16 mnCols;
+ sal_uInt16 mnRows;
+ sal_uInt16 mnPages;
+ // OD 19.02.2003 #107369# - new flag for leaving blank left-top-corner
+ // OD 2004-03-05 #i18143# - the book preview is controlled by this flag
+ bool mbBookPreview;
+ bool mbBookPreviewModeToggled;
+
+ Size maMaxPageSize;
+ Rectangle maPreviewDocRect;
+ SwTwips mnColWidth;
+ SwTwips mnRowHeight;
+ SwTwips mnPrevwLayoutWidth;
+ SwTwips mnPrevwLayoutHeight;
+ bool mbDoesLayoutColsFitIntoWindow;
+ bool mbDoesLayoutRowsFitIntoWindow;
+
+ sal_uInt16 mnPaintPhyStartPageNum;
+ sal_uInt16 mnPaintStartCol;
+ sal_uInt16 mnPaintStartRow;
+ bool mbNoPageVisible;
+ Point maPaintStartPageOffset;
+ Point maPaintPreviewDocOffset;
+ Point maAdditionalPaintOffset;
+ Rectangle maPaintedPrevwDocRect;
+ sal_uInt16 mnSelectedPageNum;
+
+ std::vector<PrevwPage*> maPrevwPages;
+
+ // OD 07.11.2003 #i22014# - internal booleans to indicate, that a new print
+ // preview layout has been created during a paint.
+ mutable bool mbInPaint;
+ mutable bool mbNewLayoutDuringPaint;
+
+ bool mbPrintEmptyPages;
+
+ /** clear internal data about current page preview
+
+ OD 11.12.2002 #103492#
+
+ @author OD
+ */
+ void _Clear();
+
+ /** helper method to clear preview page layout sizes
+
+ OD 18.12.2002 #103492#
+
+ @author OD
+ */
+ void _ClearPrevwLayoutSizes();
+
+ /** helper method to clear data in preview page vectors
+
+ OD 13.12.2002 #103492#
+
+ @author OD
+ */
+ void _ClearPrevwPageData();
+
+ /** calculate page preview layout sizes
+
+ OD 18.12.2002 #103492#
+
+ @author OD
+ */
+ void _CalcPrevwLayoutSizes();
+
+ /** apply new zoom at given view shell
+
+ OD 11.12.2002 #103492#
+
+ @author OD
+
+ @param _aNewZoom
+ input parameter - new zoom percentage
+ */
+ void _ApplyNewZoomAtViewShell( sal_uInt8 _aNewZoom );
+
+ /** calculate additional paint offset
+
+ OD 12.12.2002 #103492#
+ helper method called by <Prepare> in order to calculate an additional
+ paint offset to center output in given window size.
+ The booleans <mbDoesLayoutRowsFitIntoWindow> and <mbDoesLayoutColsFitIntoWindow>
+ are also determined.
+ preconditions:
+ (1) preview layout is given (number of rows and columns).
+ (2) window size is given.
+ (3) height of row and width of column are calculated.
+ (4) paint offset of start page is calculated.
+
+ @author OD
+ */
+ void _CalcAdditionalPaintOffset();
+
+ /** calculate painted preview document rectangle
+
+ OD 12.12.2002 #103492#
+ helper method called by <Prepare> in order to calculate the rectangle,
+ which will be painted for the document arranged by the given preview
+ layout.
+ preconditions:
+ (1) paint offset of document preview is calculated.
+ (2) size of document preview is calculated.
+ (3) additional paint offset is calculated - see <_CalcAdditionalPaintOffset>.
+
+ @author OD
+ */
+ void _CalcDocPrevwPaintRect();
+
+ /** determines preview data for a given page and a given preview offset
+
+ OD 13.12.2002 #103492#
+
+ @author OD
+
+ @param _rPage
+ input parameter - constant reference to page frame, for which the
+ preview data will be calculated.
+
+ @param _rPrevwOffset
+ input parameter - constant reference to the offset the given page has
+ in the current preview window.
+ Note: Offset can be negative.
+
+ @param _opPrevwPage
+ output parameter - calculated preview data.
+
+ @return boolean, indicating, if calculation was successful.
+ */
+ bool _CalcPreviewDataForPage( const SwPageFrm& _rPage,
+ const Point& _rPrevwOffset,
+ PrevwPage* _opPrevwPage );
+
+ /** calculate preview pages
+
+ OD 12.12.2002 #103492#
+ helper method called by <Prepare> in order to determine which pages
+ will be visible in the current preview and calculate the data needed
+ to paint these pages. Also the accessible pages with its needed data
+ are determined.
+
+ @author OD
+ */
+ void _CalcPreviewPages();
+
+ /** get preview page by physical page number
+
+ OD 17.12.2002 #103492#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - physical page number of page, for which the preview
+ page will be returned.
+
+ @return pointer to preview page of current preview pages. If page doesn't
+ belongs to current preview pages, <0> is returned.
+ */
+ const PrevwPage* _GetPrevwPageByPageNum( const sal_uInt16 _nPageNum ) const;
+
+ /** paint selection mark at page
+
+ OD 17.12.2002 #103492#
+
+ @author OD
+ */
+ void _PaintSelectMarkAtPage( const PrevwPage* _aSelectedPrevwPage ) const;
+
+public:
+ /** constructor of <SwPagePreviewLayout>
+
+ OD 11.12.2002 #103492#
+
+ @author OD
+
+ @param _rParentViewShell
+ input parameter - reference to the view shell the page preview
+ layout belongs to. Reference will be hold as member <mrParentViewShell>.
+ Adjustments/Changes at this view shell:
+ (1) Adjustment of the mapping mode at the output device.
+ (2) Change of the zoom at the view options.
+ (3) Preparations for paint of the page preview.
+
+ @param _rLayoutRootFrm
+ input parameter - constant reference to the root frame of the layout.
+ Reference will be hold as member <mrLayoutRootFrm> in order to get
+ access to the page frames.
+ */
+ SwPagePreviewLayout( ViewShell& _rParentViewShell,
+ const SwRootFrm& _rLayoutRootFrm );
+
+ /** destructor of <SwPagePreviewLayout>
+
+ OD 17.12.2002 #103492#
+
+ @author
+ */
+ inline ~SwPagePreviewLayout()
+ {
+ _ClearPrevwPageData();
+ }
+
+ /** init page preview layout
+
+ OD 11.12.2002 #103492#
+ initialize the page preview settings for a given layout.
+ side effects:
+ (1) If parameter <_bCalcScale> is true, mapping mode with calculated
+ scaling is set at the output device and the zoom at the view options of
+ the given view shell is set with the calculated scaling.
+
+ @author OD
+
+ @param _nCols
+ input parameter - initial number of page columns in the preview.
+
+ @param _nRows
+ input parameter - initial number of page rows in the preview.
+
+ @param _rPxWinSize
+ input parameter - window size in which the preview will be displayed and
+ for which the scaling will be calculated.
+
+ @param _bCalcScale
+ input parameter - control, if method should calculate the needed
+ scaling for the proposed preview layout for the given window size
+ and sets the scaling at the output device and the view options.
+
+ @return boolean, indicating, if preview layout is successful initialized.
+ */
+ bool Init( const sal_uInt16 _nCols,
+ const sal_uInt16 _nRows,
+ const Size& _rPxWinSize,
+ const bool _bCalcScale
+ );
+
+ /** method to adjust page preview layout to document changes
+
+ OD 18.12.2002 #103492#
+
+ @author OD
+
+ @return boolean, indicating, if preview layout is successful initialized.
+ */
+ bool ReInit();
+
+ /** prepare paint of page preview
+
+ OD 12.12.2002 #103492#
+ With the valid preview layout settings - calculated and set by method
+ <Init(..)> - the paint of a specific part of the virtual preview
+ document is prepared. The corresponding part is given by either
+ a start page (parameter <_nProposedStartPageNum>) or a absolute position
+ (parameter <_aProposedStartPoint>).
+ The accessibility preview will also be updated via a corresponding
+ method call.
+ OD 21.03.2003 #108282# - delete parameter _onStartPageVirtNum
+
+ @author OD
+
+ @param _nProposedStartPageNum [0..<number of document pages>]
+ input parameter - proposed number of page, which should be painted in
+ the left-top-corner in the current output device. input parameter
+ <_bStartWithPageAtFirstCol> influences, if proposed page is actual
+ painted in the left-top-corner.
+
+ @param _nProposedStartPos [(0,0)..<PreviewDocumentSize>]
+ input parameter - proposed absolute position in the virtual preview
+ document, which should be painted in the left-top-corner in the current
+ output device.
+
+ @param _rPxWinSize
+ input parameter - pixel size of window the preview will be painted in.
+
+ @param _onStartPageNum
+ output parameter - physical number of page, which will be painted in the
+ left-top-corner in the current output device.
+
+ @param _orDocPreviewPaintRect
+ output parameter - rectangle of preview document, which will be painted.
+
+ @param _bStartWithPageAtFirstCol
+ input parameter with default value "true" - controls, if start page
+ is set to page in first column the proposed start page is located.
+
+ @return boolean, indicating, if prepare of preview paint was successful.
+ */
+ bool Prepare( const sal_uInt16 _nProposedStartPageNum,
+ const Point _aProposedStartPos,
+ const Size& _rPxWinSize,
+ sal_uInt16& _onStartPageNum,
+ Rectangle& _orDocPreviewPaintRect,
+ const bool _bStartWithPageAtFirstCol = true
+ );
+
+ /** get selected page number
+
+ OD 13.12.2002 #103492#
+
+ @author OD
+ */
+ inline sal_uInt16 SelectedPage()
+ {
+ return mnSelectedPageNum;
+ }
+
+ /** set selected page number
+
+ OD 14.01.2003 #103492#
+
+ @author OD
+ */
+ inline void SetSelectedPage( sal_uInt16 _nSelectedPageNum )
+ {
+ mnSelectedPageNum = _nSelectedPageNum;
+ }
+
+ /** paint prepared preview
+
+ OD 12.12.2002 #103492#
+
+ @author OD
+
+ @param _aOutRect
+ input parameter - Twip rectangle of window, which should be painted.
+
+ @return boolean, indicating, if paint of preview was performed
+ */
+ bool Paint( const Rectangle _aOutRect ) const;
+
+ /** repaint pages on page preview
+
+ OD 18.12.2002 #103492#
+ method to invalidate visible pages due to changes in a different
+ view shell.
+
+ @author OD
+ */
+ void Repaint( const Rectangle _aInvalidCoreRect ) const;
+
+ /** paint to mark new selected page
+
+ OD 17.12.2002 #103492#
+ Perform paint for current selected page in order to unmark it.
+ Set new selected page and perform paint to mark this page.
+
+ @author OD
+
+ @param _nNewSelectedPage
+ input parameter - physical number of page, which will be marked as selected.
+ */
+ void MarkNewSelectedPage( const sal_uInt16 _nSelectedPage );
+
+ /** calculate start position for new scale
+
+ OD 12.12.2002 #103492#
+ calculate new start position for a new scale. Calculation bases on the
+ current visible part of the document arranged in the given preview layout.
+ preconditions:
+ (1) new scaling is already set at the given output device.
+
+ @author OD
+
+ @return Point, start position for new scale
+ */
+ Point GetPreviewStartPosForNewScale( const Fraction& _aNewScale,
+ const Fraction& _aOldScale,
+ const Size& _aNewWinSize ) const;
+
+ /** determines, if page with given page number is visible in preview
+
+ OD 12.12.2002 #103492#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - physical number of page, for which it will be
+ determined, if it is visible.
+
+ @return boolean, indicating, if page with given page number is visible
+ in preview.
+ */
+ bool IsPageVisible( const sal_uInt16 _nPageNum ) const;
+
+ /** calculate data to bring new selected page into view.
+
+ OD 12.12.2002 #103492#
+
+ @author OD
+
+ @param _nHoriMove
+ input parameter - positive/negative number of columns the current
+ selected page have to be moved.
+
+ @param _nVertMove
+ input parameter - positive/negative number of rows the current
+ selected page have to be moved.
+
+ @param _orNewSelectedPage
+ output parameter - number of new selected page
+
+ @param _orNewStartPage
+ output parameter - number of new start page
+
+ @param _orNewStartPos
+ output parameter - new start position in document preview
+
+ @return boolean - indicating, that move was sucessful.
+ */
+ bool CalcStartValuesForSelectedPageMove( const sal_Int16 _nHoriMove,
+ const sal_Int16 _nVertMove,
+ sal_uInt16& _orNewSelectedPage,
+ sal_uInt16& _orNewStartPage,
+ Point& _orNewStartPos ) const;
+
+ /** checks, if given position is inside a shown document page
+
+ OD 17.12.2002 #103492#
+
+ @author OD
+
+ @param _aPrevwPos
+ input parameter - position inside the visible preview window.
+
+ @param _orDocPos
+ output parameter - corresponding position in the document, if given
+ preview position is inside a shown document page, not an empty page.
+ If not, it's value is <Point( 0, 0 )>.
+
+ @param _obPosInEmptyPage
+ output parameter - indicates, that given preview position lays inside
+ an shown empty page.
+
+ @param _onPageNum
+ output parameter - corresponding physical number of page, if given
+ preview position is inside a shown document page, considers also empty
+ pages. If not, it's value is <0>.
+
+ @return boolean - indicating, that given preview position lays inside
+ a shown document preview page, not an empty page.
+ */
+ bool IsPrevwPosInDocPrevwPage( const Point _aPrevwPos,
+ Point& _orDocPos,
+ bool& _obPosInEmptyPage,
+ sal_uInt16& _onPageNum ) const;
+
+ inline bool DoesPreviewLayoutRowsFitIntoWindow() const
+ {
+ return mbDoesLayoutRowsFitIntoWindow;
+ }
+
+ inline bool DoesPreviewLayoutColsFitIntoWindow() const
+ {
+ return mbDoesLayoutColsFitIntoWindow;
+ }
+
+ inline bool PreviewLayoutValid() const
+ {
+ return mbLayoutInfoValid && mbLayoutSizesValid && mbPaintInfoValid;
+ }
+
+ /** determine preview window page scroll amount
+
+ OD 17.12.2002 #103492#
+
+ @author OD
+
+ @param _nWinPagesToScroll
+ input parameter - number of preview window pages the scroll amount has
+ to be calculated for. Negative values for preview window page up
+ scrolling, positive values for preview window page down scrolling.
+
+ @return scroll amount in SwTwips
+ */
+ SwTwips GetWinPagesScrollAmount( const sal_Int16 _nWinPagesToScroll ) const;
+
+ /** determine row the page with the given number is in
+
+ OD 17.01.2003 #103492#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - physical page number of page, for which the row in
+ preview layout has to be calculated.
+
+ @return number of row the page with the given physical page number is in
+ */
+ sal_uInt16 GetRowOfPage( sal_uInt16 _nPageNum ) const;
+
+ /** determine column the page with the given number is in
+
+ OD 17.01.2003 #103492#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - physical page number of page, for which the column in
+ preview layout has to be calculated.
+
+ @return number of column the page with the given physical page number is in
+ */
+ sal_uInt16 GetColOfPage( sal_uInt16 _nPageNum ) const;
+
+ // OD 18.12.2002 #103492#
+ Size GetMaxPageSize() const;
+
+ // OD 18.12.2002 #103492#
+ Size GetPrevwDocSize() const;
+
+ /** get size of a preview page by its physical page number
+
+ OD 15.01.2003 #103492#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - pysical page number of preview page, for which the
+ page size has to be returned.
+
+ @return an object of class <Size>
+ */
+ Size GetPrevwPageSizeByPageNum( sal_uInt16 _nPageNum ) const;
+
+ /** get virtual page number by its physical page number
+
+ OD 21.03.2003 #108282#
+
+ @author OD
+
+ @param _nPageNum
+ input parameter - pysical page number of preview page, for which the
+ virtual page number has to be determined.
+
+ @return virtual page number of page given by its physical page number,
+ if the page is in the current preview pages vector, otherwise 0.
+ */
+ sal_uInt16 GetVirtPageNumByPageNum( sal_uInt16 _nPageNum ) const;
+
+ /** enable/disable book preview
+
+ OD 2004-03-04 #i18143#
+
+ @author OD
+ */
+ bool SetBookPreviewMode( const bool _bEnableBookPreview,
+ sal_uInt16& _onStartPageNum,
+ Rectangle& _orDocPreviewPaintRect );
+
+ /** Convert relative to absolute page numbers (see PrintEmptyPages)
+
+ @author FME
+ */
+ sal_uInt16 ConvertRelativeToAbsolutePageNum( sal_uInt16 _nRelPageNum ) const;
+
+ /** Convert absolute to relative page numbers (see PrintEmptyPages)
+
+ @author FME
+ */
+ sal_uInt16 ConvertAbsoluteToRelativePageNum( sal_uInt16 _nAbsPageNum ) const;
+
+ /** get the number of preview pages
+
+ @author FME
+ */
+ sal_uInt16 GetNumberOfPreviewPages() { return sal::static_int_cast< sal_uInt16 >(maPrevwPages.size()); }
+};
+
+#endif // _PAGEPREVIEWLAYOUT_HXX
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
new file mode 100644
index 000000000000..62277e6d48b0
--- /dev/null
+++ b/sw/inc/pam.hxx
@@ -0,0 +1,280 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _PAM_HXX
+#define _PAM_HXX
+
+#include <stddef.h> // fuer MemPool
+#include <tools/gen.hxx>
+#include <tools/mempool.hxx>
+#include <cshtyp.hxx> // fuer die Funktions-Definitionen
+#include <ring.hxx> // Superklasse
+#include <index.hxx> // fuer SwIndex
+#include <ndindex.hxx> // fuer SwNodeIndex
+#include "swdllapi.h"
+
+class SwFmt;
+class SfxPoolItem;
+class SfxItemSet;
+class SwDoc;
+class SwNode;
+class SwCntntNode;
+class SwPaM;
+
+namespace com { namespace sun { namespace star { namespace util {
+ struct SearchOptions;
+} } } }
+
+namespace utl {
+ class TextSearch;
+}
+
+struct SW_DLLPUBLIC SwPosition
+{
+ SwNodeIndex nNode;
+ SwIndex nContent;
+
+ SwPosition( const SwNodeIndex &rNode, const SwIndex &rCntnt );
+ explicit SwPosition( const SwNodeIndex &rNode );
+ explicit SwPosition( const SwNode& rNode );
+ explicit SwPosition( SwCntntNode& rNode, const xub_StrLen nOffset = 0 );
+
+ SwPosition( const SwPosition & );
+ SwPosition &operator=(const SwPosition &);
+
+ // #111827#
+ /**
+ Returns the document this position is in.
+
+ @return the document this position is in.
+ */
+ SwDoc * GetDoc() const;
+
+ BOOL operator < (const SwPosition &) const;
+ BOOL operator > (const SwPosition &) const;
+ BOOL operator <=(const SwPosition &) const;
+ BOOL operator >=(const SwPosition &) const;
+ BOOL operator ==(const SwPosition &) const;
+ BOOL operator !=(const SwPosition &) const;
+};
+
+
+// das Ergebnis eines Positions Vergleiches
+enum SwComparePosition {
+ POS_BEFORE, // Pos1 liegt vor Pos2
+ POS_BEHIND, // Pos1 liegt hinter Pos2
+ POS_INSIDE, // Pos1 liegt vollstaendig in Pos2
+ POS_OUTSIDE, // Pos2 liegt vollstaendig in Pos1
+ POS_EQUAL, // Pos1 ist genauso gross wie Pos2
+ POS_OVERLAP_BEFORE, // Pos1 ueberlappt Pos2 am Anfang
+ POS_OVERLAP_BEHIND, // Pos1 ueberlappt Pos2 am Ende
+ POS_COLLIDE_START, // Pos1 Start stoesst an Pos2 Ende
+ POS_COLLIDE_END // Pos1 End stoesst an Pos2 Start
+};
+SwComparePosition ComparePosition(
+ const SwPosition& rStt1, const SwPosition& rEnd1,
+ const SwPosition& rStt2, const SwPosition& rEnd2 );
+
+SwComparePosition ComparePosition(
+ const unsigned long nStt1, const unsigned long nEnd1,
+ const unsigned long nStt2, const unsigned long nEnd2 );
+
+
+// SwPointAndMark / SwPaM
+struct SwMoveFnCollection;
+typedef SwMoveFnCollection* SwMoveFn;
+SW_DLLPUBLIC extern SwMoveFn fnMoveForward; // SwPam::Move()/Find() default argument.
+SW_DLLPUBLIC extern SwMoveFn fnMoveBackward;
+
+typedef BOOL (*SwGoInDoc)( SwPaM& rPam, SwMoveFn fnMove );
+SW_DLLPUBLIC extern SwGoInDoc fnGoDoc;
+extern SwGoInDoc fnGoSection;
+SW_DLLPUBLIC extern SwGoInDoc fnGoNode;
+SW_DLLPUBLIC extern SwGoInDoc fnGoCntnt; // SwPam::Move() default argument.
+extern SwGoInDoc fnGoCntntCells;
+extern SwGoInDoc fnGoCntntSkipHidden;
+extern SwGoInDoc fnGoCntntCellsSkipHidden;
+
+void _InitPam();
+
+class SW_DLLPUBLIC SwPaM : public Ring
+{
+ SwPosition m_Bound1;
+ SwPosition m_Bound2;
+ SwPosition * m_pPoint; // points at either m_Bound1 or m_Bound2
+ SwPosition * m_pMark; // points at either m_Bound1 or m_Bound2
+ bool m_bIsInFrontOfLabel;
+
+ SwPaM* MakeRegion( SwMoveFn fnMove, const SwPaM * pOrigRg = 0 );
+
+public:
+ SwPaM( const SwPosition& rPos, SwPaM* pRing = 0 );
+ SwPaM( const SwPosition& rMk, const SwPosition& rPt, SwPaM* pRing = 0 );
+ SwPaM( const SwNodeIndex& rMk, const SwNodeIndex& rPt,
+ long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = 0 );
+ SwPaM( const SwNode& rMk, const SwNode& rPt,
+ long nMkOffset = 0, long nPtOffset = 0, SwPaM* pRing = 0 );
+ SwPaM( const SwNodeIndex& rMk, xub_StrLen nMkCntnt,
+ const SwNodeIndex& rPt, xub_StrLen nPtCntnt, SwPaM* pRing = 0 );
+ SwPaM( const SwNode& rMk, xub_StrLen nMkCntnt,
+ const SwNode& rPt, xub_StrLen nPtCntnt, SwPaM* pRing = 0 );
+ SwPaM( const SwNode& rNd, xub_StrLen nCntnt = 0, SwPaM* pRing = 0 );
+ SwPaM( const SwNodeIndex& rNd, xub_StrLen nCntnt = 0, SwPaM* pRing = 0 );
+ virtual ~SwPaM();
+
+ // @@@ semantic: no copy ctor.
+ SwPaM( SwPaM & );
+ // @@@ semantic: no copy assignment for super class Ring.
+ SwPaM& operator=( const SwPaM & );
+
+ // Bewegen des Cursors
+ BOOL Move( SwMoveFn fnMove = fnMoveForward,
+ SwGoInDoc fnGo = fnGoCntnt );
+
+ // Suchen
+ BYTE Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ BOOL bSearchInNotes,
+ utl::TextSearch& rSTxt,
+ SwMoveFn fnMove = fnMoveForward,
+ const SwPaM *pPam =0, BOOL bInReadOnly = FALSE);
+ BOOL Find( const SwFmt& rFmt,
+ SwMoveFn fnMove = fnMoveForward,
+ const SwPaM *pPam =0, BOOL bInReadOnly = FALSE);
+ BOOL Find( const SfxPoolItem& rAttr, BOOL bValue = TRUE,
+ SwMoveFn fnMove = fnMoveForward,
+ const SwPaM *pPam =0, BOOL bInReadOnly = FALSE );
+ BOOL Find( const SfxItemSet& rAttr, BOOL bNoColls,
+ SwMoveFn fnMove,
+ const SwPaM *pPam, BOOL bInReadOnly, BOOL bMoveFirst );
+
+ bool DoSearch( const com::sun::star::util::SearchOptions& rSearchOpt, utl::TextSearch& rSTxt,
+ SwMoveFn fnMove, BOOL bSrchForward, BOOL bRegSearch, BOOL bChkEmptyPara, BOOL bChkParaEnd,
+ xub_StrLen &nStart, xub_StrLen &nEnde,xub_StrLen nTxtLen,SwNode* pNode, SwPaM* pPam);
+
+ inline bool IsInFrontOfLabel() const { return m_bIsInFrontOfLabel; }
+ inline void _SetInFrontOfLabel( bool bNew ) { m_bIsInFrontOfLabel = bNew; }
+
+ virtual void SetMark();
+
+ void DeleteMark()
+ {
+ if (m_pMark != m_pPoint)
+ {
+ // clear the mark position; this helps if mark's SwIndex is
+ // registered at some node, and that node is then deleted
+ *m_pMark = SwPosition( SwNodeIndex( GetNode()->GetNodes() ) );
+ m_pMark = m_pPoint;
+ }
+ }
+#ifndef DBG_UTIL
+
+ void Exchange()
+ {
+ if (m_pPoint != m_pMark)
+ {
+ SwPosition *pTmp = m_pPoint;
+ m_pPoint = m_pMark;
+ m_pMark = pTmp;
+ }
+ }
+#else
+ void Exchange();
+#endif
+
+ /** A PaM marks a selection if Point and Mark are distinct positions.
+ @return true iff the PaM spans a selection
+ */
+ bool HasMark() const { return m_pPoint == m_pMark ? false : true; }
+
+ const SwPosition *GetPoint() const { return m_pPoint; }
+ SwPosition *GetPoint() { return m_pPoint; }
+ const SwPosition *GetMark() const { return m_pMark; }
+ SwPosition *GetMark() { return m_pMark; }
+
+ const SwPosition *Start() const
+ { return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; }
+ SwPosition *Start()
+ { return (*m_pPoint) <= (*m_pMark) ? m_pPoint : m_pMark; }
+
+ const SwPosition *End() const
+ { return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; }
+ SwPosition *End()
+ { return (*m_pPoint) > (*m_pMark) ? m_pPoint : m_pMark; }
+
+ /// @return current Node at Point/Mark
+ SwNode * GetNode ( bool bPoint = true ) const
+ {
+ return &( bPoint ? m_pPoint->nNode : m_pMark->nNode ).GetNode();
+ }
+
+ /// @return current ContentNode at Point/Mark
+ SwCntntNode* GetCntntNode( bool bPoint = true ) const
+ {
+ return GetNode(bPoint)->GetCntntNode();
+ }
+
+ /**
+ Normalizes PaM, i.e. sort point and mark.
+
+ @param bPointFirst TRUE: If the point is behind the mark then swap.
+ FALSE: If the mark is behind the point then swap.
+ */
+ SwPaM & Normalize(BOOL bPointFirst = TRUE);
+
+ /// @return the document (SwDoc) at which the PaM is registered
+ SwDoc* GetDoc() const { return m_pPoint->nNode.GetNode().GetDoc(); }
+
+ SwPosition& GetBound( bool bOne = true )
+ { return bOne ? m_Bound1 : m_Bound2; }
+ const SwPosition& GetBound( bool bOne = true ) const
+ { return bOne ? m_Bound1 : m_Bound2; }
+
+ // erfrage die Seitennummer auf der der Cursor steht
+ USHORT GetPageNum( BOOL bAtPoint = TRUE, const Point* pLayPos = 0 );
+
+ // steht in etwas geschuetztem oder in die Selektion umspannt
+ // etwas geschuetztes.
+ BOOL HasReadonlySel( bool bFormView ) const;
+
+ BOOL ContainsPosition(const SwPosition & rPos)
+ { return *Start() <= rPos && rPos <= *End(); }
+
+ static BOOL Overlap(const SwPaM & a, const SwPaM & b);
+
+ static BOOL LessThan(const SwPaM & a, const SwPaM & b);
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwPaM);
+
+ String GetTxt() const;
+ void InvalidatePaM();
+};
+
+
+BOOL CheckNodesRange( const SwNodeIndex&, const SwNodeIndex&, BOOL );
+BOOL GoInCntnt( SwPaM & rPam, SwMoveFn fnMove );
+
+
+#endif // _PAM_HXX
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
new file mode 100644
index 000000000000..68b9ba203ba3
--- /dev/null
+++ b/sw/inc/paratr.hxx
@@ -0,0 +1,278 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _PARATR_HXX
+#define _PARATR_HXX
+#include <svl/eitem.hxx>
+#include <svl/stritem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <calbck.hxx>
+#include <swatrset.hxx>
+#include <format.hxx>
+#include <swtypes.hxx>
+
+class SwCharFmt;
+class IntlWrapper;
+
+/*************************************************************************
+|* class SwFmtDrop
+*************************************************************************/
+
+#define DROP_WHOLEWORD ((USHORT)0x0001)
+
+//Wenn ein SwFmtDrop Client ist, so ist dies das CharFmt welches den Font fuer
+//die DropCaps beschreibt. Ist es kein Client, so wird von der Formatierung
+//das CharFmt des Absatzes benutzt.
+//Wird das CharFmt verandert, so wird diese Aenderung ueber das Modify des
+//SwFmtDrop an die Absatze propagiert.
+class SW_DLLPUBLIC SwFmtDrop: public SfxPoolItem, public SwClient
+{
+ SwModify* pDefinedIn; // Modify-Object, in dem der DropCaps steht
+ // kann nur TxtFmtCollection/TxtNode sein
+ USHORT nDistance; // Abstand zum Textbeginn
+ USHORT nReadFmt; // fuer den Sw3-Reader: CharFormat-Id (Pool laden!)
+ BYTE nLines; // Anzahl der Zeilen
+ BYTE nChars; // Anzahl der Zeichen
+ BOOL bWholeWord; // Erstes Wort als Initialen
+public:
+ TYPEINFO(); //Bereits in der Basisklasse SwClient
+
+ SwFmtDrop();
+ virtual ~SwFmtDrop();
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtDrop( const SwFmtDrop & );
+private:
+ // @@@ public copy ctor, but no copy assignment?
+ SwFmtDrop & operator= (const SwFmtDrop &);
+public:
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0) const;
+ 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 );
+
+ inline BYTE GetLines() const { return nLines; }
+ inline BYTE &GetLines() { return nLines; }
+
+ inline BYTE GetChars() const { return nChars; }
+ inline BYTE &GetChars() { return nChars; }
+
+ inline BOOL GetWholeWord() const { return bWholeWord; }
+ inline BYTE &GetWholeWord() { return bWholeWord; }
+
+ inline USHORT GetDistance() const { return nDistance; }
+ inline USHORT &GetDistance() { return nDistance; }
+
+ inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
+ inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)pRegisteredIn; }
+ void SetCharFmt( SwCharFmt *pNew );
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ // erfrage und setze den Modify-Pointer
+ inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
+ inline void ChgDefinedIn( const SwModify* pNew )
+ { pDefinedIn = (SwModify*)pNew; }
+};
+
+class SwRegisterItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ inline SwRegisterItem( const BOOL bRegister = FALSE );
+
+ // @@@ public copy assignment, but no copy ctor?
+ inline SwRegisterItem& operator=( const SwRegisterItem& rRegister );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline SwRegisterItem::SwRegisterItem( const BOOL bRegister ) :
+ SfxBoolItem( RES_PARATR_REGISTER, bRegister )
+{}
+
+inline SwRegisterItem& SwRegisterItem::operator=(
+ const SwRegisterItem& rRegister )
+{
+ SetValue( rRegister.GetValue() );
+ return *this;
+}
+
+class SW_DLLPUBLIC SwNumRuleItem : public SfxStringItem
+{
+public:
+ TYPEINFO();
+
+ // --> OD 2008-03-04 #refactorlists# - removed <pDefinedIn>
+ SwNumRuleItem()
+ : SfxStringItem( RES_PARATR_NUMRULE, aEmptyStr ) {}
+
+ SwNumRuleItem( const String& rRuleName )
+ : SfxStringItem( RES_PARATR_NUMRULE, rRuleName ) {}
+
+ SwNumRuleItem( const SwNumRuleItem& rCpy )
+ : SfxStringItem( RES_PARATR_NUMRULE, rCpy.GetValue() ) {}
+
+ SwNumRuleItem& operator=( const SwNumRuleItem& rCpy )
+ { SetValue( rCpy.GetValue() ); return *this; }
+ // <--
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId );
+};
+
+class SwParaConnectBorderItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ inline SwParaConnectBorderItem( const BOOL bConnect = TRUE );
+
+ // @@@ public copy assignment, but no copy ctor?
+ inline SwParaConnectBorderItem& operator=( const SwParaConnectBorderItem& rConnect );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+};
+
+inline SwParaConnectBorderItem::SwParaConnectBorderItem( const BOOL bConnect ) :
+ SfxBoolItem( RES_PARATR_CONNECT_BORDER, bConnect )
+{}
+
+inline SwParaConnectBorderItem& SwParaConnectBorderItem::operator=(
+ const SwParaConnectBorderItem& rConnect )
+{
+ SetValue( rConnect.GetValue() );
+ return *this;
+}
+
+
+
+/******************************************************************************
+ * Implementierung der Paragraph-Attribut Methoden vom SwAttrSet
+ ******************************************************************************/
+
+inline const SvxLineSpacingItem &SwAttrSet::GetLineSpacing(BOOL bInP) const
+ { return (const SvxLineSpacingItem&)Get( RES_PARATR_LINESPACING,bInP); }
+inline const SvxAdjustItem &SwAttrSet::GetAdjust(BOOL bInP) const
+ { return (const SvxAdjustItem&)Get( RES_PARATR_ADJUST,bInP); }
+inline const SvxFmtSplitItem &SwAttrSet::GetSplit(BOOL bInP) const
+ { return (const SvxFmtSplitItem&)Get( RES_PARATR_SPLIT,bInP); }
+inline const SwRegisterItem &SwAttrSet::GetRegister(BOOL bInP) const
+ { return (const SwRegisterItem&)Get( RES_PARATR_REGISTER,bInP); }
+inline const SvxWidowsItem &SwAttrSet::GetWidows(BOOL bInP) const
+ { return (const SvxWidowsItem&)Get( RES_PARATR_WIDOWS,bInP); }
+inline const SvxOrphansItem &SwAttrSet::GetOrphans(BOOL bInP) const
+ { return (const SvxOrphansItem&)Get( RES_PARATR_ORPHANS,bInP); }
+inline const SvxTabStopItem &SwAttrSet::GetTabStops(BOOL bInP) const
+ { return (const SvxTabStopItem&)Get( RES_PARATR_TABSTOP,bInP); }
+inline const SvxHyphenZoneItem &SwAttrSet::GetHyphenZone(BOOL bInP) const
+ { return (const SvxHyphenZoneItem&)Get(RES_PARATR_HYPHENZONE,bInP); }
+inline const SwFmtDrop &SwAttrSet::GetDrop(BOOL bInP) const
+ { return (const SwFmtDrop&)Get(RES_PARATR_DROP,bInP); }
+inline const SwNumRuleItem &SwAttrSet::GetNumRule(BOOL bInP) const
+ { return (const SwNumRuleItem&)Get(RES_PARATR_NUMRULE,bInP); }
+inline const SvxScriptSpaceItem& SwAttrSet::GetScriptSpace(BOOL bInP) const
+ { return (const SvxScriptSpaceItem&)Get(RES_PARATR_SCRIPTSPACE,bInP); }
+inline const SvxHangingPunctuationItem &SwAttrSet::GetHangingPunctuation(BOOL bInP) const
+ { return (const SvxHangingPunctuationItem&)Get(RES_PARATR_HANGINGPUNCTUATION,bInP); }
+inline const SvxForbiddenRuleItem &SwAttrSet::GetForbiddenRule(BOOL bInP) const
+ { return (const SvxForbiddenRuleItem&)Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
+inline const SvxParaVertAlignItem &SwAttrSet::GetParaVertAlign(BOOL bInP) const
+ { return (const SvxParaVertAlignItem&)Get( RES_PARATR_VERTALIGN, bInP ); }
+inline const SvxParaGridItem &SwAttrSet::GetParaGrid(BOOL bInP) const
+ { return (const SvxParaGridItem&)Get( RES_PARATR_SNAPTOGRID, bInP ); }
+inline const SwParaConnectBorderItem &SwAttrSet::GetParaConnectBorder(BOOL bInP) const
+ { return (const SwParaConnectBorderItem&)Get( RES_PARATR_CONNECT_BORDER, bInP ); }
+
+/******************************************************************************
+ * Implementierung der Paragraph-Attribut Methoden vom SwFmt
+ ******************************************************************************/
+
+inline const SvxLineSpacingItem &SwFmt::GetLineSpacing(BOOL bInP) const
+ { return aSet.GetLineSpacing(bInP); }
+inline const SvxAdjustItem &SwFmt::GetAdjust(BOOL bInP) const
+ { return aSet.GetAdjust(bInP); }
+inline const SvxFmtSplitItem &SwFmt::GetSplit(BOOL bInP) const
+ { return aSet.GetSplit(bInP); }
+inline const SwRegisterItem &SwFmt::GetRegister(BOOL bInP) const
+ { return aSet.GetRegister(bInP); }
+inline const SvxWidowsItem &SwFmt::GetWidows(BOOL bInP) const
+ { return aSet.GetWidows(bInP); }
+inline const SvxOrphansItem &SwFmt::GetOrphans(BOOL bInP) const
+ { return aSet.GetOrphans(bInP); }
+inline const SvxTabStopItem &SwFmt::GetTabStops(BOOL bInP) const
+ { return aSet.GetTabStops(bInP); }
+inline const SvxHyphenZoneItem &SwFmt::GetHyphenZone(BOOL bInP) const
+ { return aSet.GetHyphenZone(bInP); }
+inline const SwFmtDrop &SwFmt::GetDrop(BOOL bInP) const
+ { return aSet.GetDrop(bInP); }
+inline const SwNumRuleItem &SwFmt::GetNumRule(BOOL bInP) const
+ { return aSet.GetNumRule(bInP); }
+inline const SvxScriptSpaceItem& SwFmt::GetScriptSpace(BOOL bInP) const
+ { return aSet.GetScriptSpace(bInP) ; }
+inline const SvxHangingPunctuationItem &SwFmt::GetHangingPunctuation(BOOL bInP) const
+ { return aSet.GetHangingPunctuation(bInP) ; }
+inline const SvxForbiddenRuleItem &SwFmt::GetForbiddenRule(BOOL bInP) const
+ { return (const SvxForbiddenRuleItem&)aSet.Get(RES_PARATR_FORBIDDEN_RULES, bInP); }
+inline const SvxParaVertAlignItem &SwFmt::GetParaVertAlign(BOOL bInP) const
+ { return (const SvxParaVertAlignItem&)aSet.Get( RES_PARATR_VERTALIGN, bInP ); }
+inline const SvxParaGridItem &SwFmt::GetParaGrid(BOOL bInP) const
+ { return (const SvxParaGridItem&)aSet.Get( RES_PARATR_SNAPTOGRID, bInP ); }
+inline const SwParaConnectBorderItem &SwFmt::GetParaConnectBorder(BOOL bInP) const
+ { return (const SwParaConnectBorderItem&)aSet.Get( RES_PARATR_CONNECT_BORDER, bInP ); }
+
+#endif
diff --git a/sw/inc/pausethreadstarting.hxx b/sw/inc/pausethreadstarting.hxx
new file mode 100644
index 000000000000..14bb9b56b5b1
--- /dev/null
+++ b/sw/inc/pausethreadstarting.hxx
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _PAUSETHREADSTARTING_HXX
+#define _PAUSETHREADSTARTING_HXX
+
+/** Helper class to pause starting of threads during existence of an instance
+ of this class
+
+ OD 2007-03-16 #i73788#
+
+ @author OD
+*/
+class SwPauseThreadStarting
+{
+ public:
+
+ SwPauseThreadStarting();
+ ~SwPauseThreadStarting();
+
+ private:
+
+ bool mbPausedThreadStarting;
+};
+#endif
diff --git a/sw/inc/pch/precompiled_sw.cxx b/sw/inc/pch/precompiled_sw.cxx
new file mode 100644
index 000000000000..04a4242b04f2
--- /dev/null
+++ b/sw/inc/pch/precompiled_sw.cxx
@@ -0,0 +1,29 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "precompiled_sw.hxx"
+
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
new file mode 100644
index 000000000000..620fe0b00b63
--- /dev/null
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -0,0 +1,1004 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): Generated on 2006-09-01 17:50:13.279643
+
+#ifdef PRECOMPILED_HEADERS
+
+//---MARKER---
+
+#include "sal/config.h"
+#include "sal/types.h"
+
+#include "avmedia/mediaitem.hxx"
+#include "avmedia/mediaplayer.hxx"
+#include "avmedia/mediatoolbox.hxx"
+#include "avmedia/mediawindow.hxx"
+
+#include "basegfx/numeric/ftools.hxx"
+
+#include "basic/basmgr.hxx"
+#include "basic/sbmeth.hxx"
+#include "basic/sbmod.hxx"
+#include "basic/sbstar.hxx"
+#include "basic/sbx.hxx"
+#include "basic/sbxobj.hxx"
+#include "basic/sbxvar.hxx"
+
+#include "boost/shared_ptr.hpp"
+
+#include "com/sun/star/accessibility/AccessibleEventId.hpp"
+#include "com/sun/star/accessibility/AccessibleRelation.hpp"
+#include "com/sun/star/accessibility/AccessibleRelationType.hpp"
+#include "com/sun/star/accessibility/AccessibleRole.hpp"
+#include "com/sun/star/accessibility/AccessibleStateType.hpp"
+#include "com/sun/star/accessibility/AccessibleTableModelChange.hpp"
+#include "com/sun/star/accessibility/AccessibleTableModelChangeType.hpp"
+#include "com/sun/star/accessibility/AccessibleTextType.hpp"
+#include "com/sun/star/accessibility/XAccessible.hpp"
+#include "com/sun/star/accessibility/XAccessibleEditableText.hpp"
+#include "com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp"
+#include "com/sun/star/accessibility/XAccessibleHyperlink.hpp"
+#include "com/sun/star/accessibility/XAccessibleHypertext.hpp"
+#include "com/sun/star/accessibility/XAccessibleImage.hpp"
+#include "com/sun/star/accessibility/XAccessibleRelationSet.hpp"
+#include "com/sun/star/accessibility/XAccessibleSelection.hpp"
+#include "com/sun/star/accessibility/XAccessibleStateSet.hpp"
+#include "com/sun/star/accessibility/XAccessibleTable.hpp"
+#include "com/sun/star/accessibility/XAccessibleTextAttributes.hpp"
+#include "com/sun/star/accessibility/XAccessibleValue.hpp"
+#include "com/sun/star/awt/MessageBoxCommand.hpp"
+#include "com/sun/star/awt/PosSize.hpp"
+#include "com/sun/star/awt/ScrollBarOrientation.hpp"
+#include "com/sun/star/awt/Size.hpp"
+#include "com/sun/star/awt/Style.hpp"
+#include "com/sun/star/awt/TextAlign.hpp"
+#include "com/sun/star/awt/VclWindowPeerAttribute.hpp"
+#include "com/sun/star/awt/XBitmap.hpp"
+#include "com/sun/star/awt/XButton.hpp"
+#include "com/sun/star/awt/XCheckBox.hpp"
+#include "com/sun/star/awt/XComboBox.hpp"
+#include "com/sun/star/awt/XControlModel.hpp"
+#include "com/sun/star/awt/XCurrencyField.hpp"
+#include "com/sun/star/awt/XDateField.hpp"
+#include "com/sun/star/awt/XDialog.hpp"
+#include "com/sun/star/awt/XFileDialog.hpp"
+#include "com/sun/star/awt/XFixedText.hpp"
+#include "com/sun/star/awt/XImageButton.hpp"
+#include "com/sun/star/awt/XLayoutConstrains.hpp"
+#include "com/sun/star/awt/XListBox.hpp"
+#include "com/sun/star/awt/XMessageBox.hpp"
+#include "com/sun/star/awt/XNumericField.hpp"
+#include "com/sun/star/awt/XPatternField.hpp"
+#include "com/sun/star/awt/XRadioButton.hpp"
+#include "com/sun/star/awt/XScrollBar.hpp"
+#include "com/sun/star/awt/XSpinField.hpp"
+#include "com/sun/star/awt/XTabControllerModel.hpp"
+#include "com/sun/star/awt/XTextArea.hpp"
+#include "com/sun/star/awt/XTextComponent.hpp"
+#include "com/sun/star/awt/XTextEditField.hpp"
+#include "com/sun/star/awt/XTextLayoutConstrains.hpp"
+#include "com/sun/star/awt/XTimeField.hpp"
+#include "com/sun/star/awt/XVclContainer.hpp"
+#include "com/sun/star/awt/XVclContainerPeer.hpp"
+#include "com/sun/star/beans/NamedValue.hpp"
+#include "com/sun/star/beans/PropertyAttribute.hpp"
+#include "com/sun/star/beans/PropertyChangeEvent.hpp"
+#include "com/sun/star/beans/PropertyState.hpp"
+#include "com/sun/star/beans/PropertyValue.hpp"
+#include "com/sun/star/beans/PropertyValues.hpp"
+#include "com/sun/star/beans/UnknownPropertyException.hpp"
+#include "com/sun/star/beans/XFastPropertySet.hpp"
+#include "com/sun/star/beans/XMultiPropertySet.hpp"
+#include "com/sun/star/beans/XMultiPropertyStates.hpp"
+#include "com/sun/star/beans/XPropertyAccess.hpp"
+#include "com/sun/star/beans/XPropertyChangeListener.hpp"
+#include "com/sun/star/beans/XPropertyContainer.hpp"
+#include "com/sun/star/beans/XPropertySet.hpp"
+#include "com/sun/star/beans/XPropertySetInfo.hpp"
+#include "com/sun/star/beans/XPropertyState.hpp"
+#include "com/sun/star/beans/XPropertyStateChangeListener.hpp"
+#include "com/sun/star/chart/XChartData.hpp"
+#include "com/sun/star/chart/XChartDataArray.hpp"
+#include "com/sun/star/container/XChild.hpp"
+#include "com/sun/star/container/XContainer.hpp"
+#include "com/sun/star/container/XContainerListener.hpp"
+#include "com/sun/star/container/XContentEnumerationAccess.hpp"
+#include "com/sun/star/container/XElementAccess.hpp"
+#include "com/sun/star/container/XEnumeration.hpp"
+#include "com/sun/star/container/XEnumerationAccess.hpp"
+#include "com/sun/star/container/XHierarchicalNameAccess.hpp"
+#include "com/sun/star/container/XIndexAccess.hpp"
+#include "com/sun/star/container/XIndexContainer.hpp"
+#include "com/sun/star/container/XIndexReplace.hpp"
+#include "com/sun/star/container/XNameAccess.hpp"
+#include "com/sun/star/container/XNameContainer.hpp"
+#include "com/sun/star/container/XNamed.hpp"
+#include "com/sun/star/container/XSet.hpp"
+#include "com/sun/star/datatransfer/XTransferable.hpp"
+#include "com/sun/star/datatransfer/XTransferableSupplier.hpp"
+#include "com/sun/star/datatransfer/clipboard/XClipboard.hpp"
+#include "com/sun/star/datatransfer/clipboard/XClipboardListener.hpp"
+#include "com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp"
+#include "com/sun/star/document/PrinterIndependentLayout.hpp"
+#include "com/sun/star/document/RedlineDisplayType.hpp"
+#include "com/sun/star/document/UpdateDocMode.hpp"
+#include "com/sun/star/document/XDocumentInfoSupplier.hpp"
+#include "com/sun/star/document/XDocumentInsertable.hpp"
+#include "com/sun/star/document/XEmbeddedObjectSupplier.hpp"
+#include "com/sun/star/document/XEmbeddedObjectSupplier2.hpp"
+#include "com/sun/star/document/XEventBroadcaster.hpp"
+#include "com/sun/star/document/XEventsSupplier.hpp"
+#include "com/sun/star/document/XExporter.hpp"
+#include "com/sun/star/document/XExtendedFilterDetection.hpp"
+#include "com/sun/star/document/XFilter.hpp"
+#include "com/sun/star/document/XImporter.hpp"
+#include "com/sun/star/document/XLinkTargetSupplier.hpp"
+#include "com/sun/star/document/XRedlinesSupplier.hpp"
+#include "com/sun/star/drawing/ColorMode.hpp"
+#include "com/sun/star/drawing/HomogenMatrix3.hpp"
+#include "com/sun/star/drawing/PointSequence.hpp"
+#include "com/sun/star/drawing/PointSequenceSequence.hpp"
+#include "com/sun/star/drawing/XConnectableShape.hpp"
+#include "com/sun/star/drawing/XConnectorShape.hpp"
+#include "com/sun/star/drawing/XControlShape.hpp"
+#include "com/sun/star/drawing/XDrawPage.hpp"
+#include "com/sun/star/drawing/XDrawPageSupplier.hpp"
+#include "com/sun/star/drawing/XShape.hpp"
+#include "com/sun/star/drawing/XShapeAligner.hpp"
+#include "com/sun/star/drawing/XShapeArranger.hpp"
+#include "com/sun/star/drawing/XShapeGroup.hpp"
+#include "com/sun/star/drawing/XShapeMirror.hpp"
+#include "com/sun/star/drawing/XShapes.hpp"
+#include "com/sun/star/drawing/XUniversalShapeDescriptor.hpp"
+#include "com/sun/star/embed/Aspects.hpp"
+#include "com/sun/star/embed/ElementModes.hpp"
+#include "com/sun/star/embed/EmbedMisc.hpp"
+#include "com/sun/star/embed/EmbedStates.hpp"
+#include "com/sun/star/embed/NoVisualAreaSizeException.hpp"
+#include "com/sun/star/embed/XClassifiedObject.hpp"
+#include "com/sun/star/embed/XComponentSupplier.hpp"
+#include "com/sun/star/embed/XEmbedObjectClipboardCreator.hpp"
+#include "com/sun/star/embed/XEmbedObjectCreator.hpp"
+#include "com/sun/star/embed/XEmbedPersist.hpp"
+#include "com/sun/star/embed/XEmbeddedObject.hpp"
+#include "com/sun/star/embed/XLinkCreator.hpp"
+#include "com/sun/star/embed/XLinkageSupport.hpp"
+#include "com/sun/star/embed/XStorage.hpp"
+#include "com/sun/star/embed/XTransactedObject.hpp"
+#include "com/sun/star/embed/XVisualObject.hpp"
+#include "com/sun/star/form/FormButtonType.hpp"
+#include "com/sun/star/form/FormComponentType.hpp"
+#include "com/sun/star/form/FormSubmitEncoding.hpp"
+#include "com/sun/star/form/FormSubmitMethod.hpp"
+#include "com/sun/star/form/ListSourceType.hpp"
+#include "com/sun/star/form/XForm.hpp"
+#include "com/sun/star/form/XFormComponent.hpp"
+#include "com/sun/star/form/XFormsSupplier.hpp"
+#include "com/sun/star/form/XImageProducerSupplier.hpp"
+#include "com/sun/star/frame/DispatchDescriptor.hpp"
+#include "com/sun/star/frame/DispatchResultState.hpp"
+#include "com/sun/star/frame/FrameSearchFlag.hpp"
+#include "com/sun/star/frame/XComponentLoader.hpp"
+#include "com/sun/star/frame/XController.hpp"
+#include "com/sun/star/frame/XDesktop.hpp"
+#include "com/sun/star/frame/XDispatch.hpp"
+#include "com/sun/star/frame/XDispatchHelper.hpp"
+#include "com/sun/star/frame/XDispatchProvider.hpp"
+#include "com/sun/star/frame/XDispatchProviderInterception.hpp"
+#include "com/sun/star/frame/XDispatchProviderInterceptor.hpp"
+#include "com/sun/star/frame/XFrame.hpp"
+#include "com/sun/star/frame/XLayoutManager.hpp"
+#include "com/sun/star/frame/XModel.hpp"
+#include "com/sun/star/frame/XNotifyingDispatch.hpp"
+#include "com/sun/star/frame/XStorable.hpp"
+#include "com/sun/star/frame/XTerminateListener.hpp"
+#include "com/sun/star/i18n/Boundary.hpp"
+#include "com/sun/star/i18n/BreakType.hpp"
+#include "com/sun/star/i18n/CharacterIteratorMode.hpp"
+#include "com/sun/star/i18n/CollatorOptions.hpp"
+#include "com/sun/star/i18n/ForbiddenCharacters.hpp"
+#include "com/sun/star/i18n/InputSequenceCheckMode.hpp"
+#include "com/sun/star/i18n/ScriptType.hpp"
+#include "com/sun/star/i18n/TextConversionOption.hpp"
+#include "com/sun/star/i18n/TransliterationModules.hpp"
+#include "com/sun/star/i18n/WordType.hpp"
+#include "com/sun/star/i18n/XBreakIterator.hpp"
+#include "com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp"
+#include "com/sun/star/i18n/XExtendedInputSequenceChecker.hpp"
+#include "com/sun/star/i18n/XForbiddenCharacters.hpp"
+#include "com/sun/star/io/XActiveDataControl.hpp"
+#include "com/sun/star/io/XActiveDataSource.hpp"
+#include "com/sun/star/io/XInputStream.hpp"
+#include "com/sun/star/io/XOutputStream.hpp"
+#include "com/sun/star/io/XSeekable.hpp"
+#include "com/sun/star/lang/DisposedException.hpp"
+#include "com/sun/star/lang/EventObject.hpp"
+#include "com/sun/star/lang/Locale.hpp"
+#include "com/sun/star/lang/ServiceNotRegisteredException.hpp"
+#include "com/sun/star/lang/WrappedTargetRuntimeException.hpp"
+#include "com/sun/star/lang/XComponent.hpp"
+#include "com/sun/star/lang/XEventListener.hpp"
+#include "com/sun/star/lang/XInitialization.hpp"
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/lang/XSingleServiceFactory.hpp"
+#include "com/sun/star/lang/XUnoTunnel.hpp"
+#include "com/sun/star/linguistic2/DictionaryListEventFlags.hpp"
+#include "com/sun/star/linguistic2/LinguServiceEventFlags.hpp"
+#include "com/sun/star/linguistic2/XDictionary.hpp"
+#include "com/sun/star/linguistic2/XDictionaryList.hpp"
+#include "com/sun/star/linguistic2/XDictionaryListEventListener.hpp"
+#include "com/sun/star/linguistic2/XHyphenatedWord.hpp"
+#include "com/sun/star/linguistic2/XHyphenator.hpp"
+#include "com/sun/star/linguistic2/XLinguServiceEventListener.hpp"
+#include "com/sun/star/linguistic2/XLinguServiceManager.hpp"
+#include "com/sun/star/linguistic2/XSpellAlternatives.hpp"
+#include "com/sun/star/linguistic2/XSpellChecker1.hpp"
+#include "com/sun/star/linguistic2/XThesaurus.hpp"
+#include "com/sun/star/mail/MailAttachment.hpp"
+#include "com/sun/star/mail/MailServiceType.hpp"
+#include "com/sun/star/mail/XAuthenticator.hpp"
+#include "com/sun/star/mail/XConnectionListener.hpp"
+#include "com/sun/star/mail/XMailMessage.hpp"
+#include "com/sun/star/mail/XMailService.hpp"
+#include "com/sun/star/mail/XSmtpService.hpp"
+#include "com/sun/star/packages/WrongPasswordException.hpp"
+#include "com/sun/star/packages/zip/ZipIOException.hpp"
+#include "com/sun/star/scanner/ScannerContext.hpp"
+#include "com/sun/star/scanner/XScannerManager.hpp"
+#include "com/sun/star/script/XEventAttacher.hpp"
+#include "com/sun/star/script/XEventAttacherManager.hpp"
+#include "com/sun/star/script/XLibraryContainer.hpp"
+#include "com/sun/star/sdb/CommandType.hpp"
+#include "com/sun/star/sdb/SQLContext.hpp"
+#include "com/sun/star/sdb/XColumn.hpp"
+#include "com/sun/star/sdb/XCompletedConnection.hpp"
+#include "com/sun/star/sdb/XCompletedExecution.hpp"
+#include "com/sun/star/sdb/XDatabaseAccess.hpp"
+#include "com/sun/star/sdb/XDocumentDataSource.hpp"
+#include "com/sun/star/sdb/XQueriesSupplier.hpp"
+#include "com/sun/star/sdb/XResultSetAccess.hpp"
+#include "com/sun/star/sdb/XSingleSelectQueryComposer.hpp"
+#include "com/sun/star/sdbc/DataType.hpp"
+#include "com/sun/star/sdbc/ResultSetType.hpp"
+#include "com/sun/star/sdbc/XCloseable.hpp"
+#include "com/sun/star/sdbc/XConnection.hpp"
+#include "com/sun/star/sdbc/XDataSource.hpp"
+#include "com/sun/star/sdbc/XResultSet.hpp"
+#include "com/sun/star/sdbc/XRow.hpp"
+#include "com/sun/star/sdbc/XRowSet.hpp"
+#include "com/sun/star/sdbcx/XColumnsSupplier.hpp"
+#include "com/sun/star/sdbcx/XRowLocate.hpp"
+#include "com/sun/star/sdbcx/XTablesSupplier.hpp"
+#include "com/sun/star/sheet/XCellRangeData.hpp"
+#include "com/sun/star/style/BreakType.hpp"
+#include "com/sun/star/style/DropCapFormat.hpp"
+#include "com/sun/star/style/GraphicLocation.hpp"
+#include "com/sun/star/style/LineNumberPosition.hpp"
+#include "com/sun/star/style/LineSpacing.hpp"
+#include "com/sun/star/style/LineSpacingMode.hpp"
+#include "com/sun/star/style/NumberingType.hpp"
+#include "com/sun/star/style/PageStyleLayout.hpp"
+#include "com/sun/star/style/ParagraphAdjust.hpp"
+#include "com/sun/star/style/ParagraphStyleCategory.hpp"
+#include "com/sun/star/style/VerticalAlignment.hpp"
+#include "com/sun/star/style/XStyle.hpp"
+#include "com/sun/star/style/XStyleFamiliesSupplier.hpp"
+#include "com/sun/star/style/XStyleLoader.hpp"
+#include "com/sun/star/table/CellContentType.hpp"
+#include "com/sun/star/table/TableSortField.hpp"
+#include "com/sun/star/table/XAutoFormattable.hpp"
+#include "com/sun/star/table/XCellRange.hpp"
+#include "com/sun/star/task/XInteractionHandler.hpp"
+#include "com/sun/star/task/XJob.hpp"
+#include "com/sun/star/task/XStatusIndicatorFactory.hpp"
+#include "com/sun/star/text/BibliographyDataField.hpp"
+#include "com/sun/star/text/ChapterFormat.hpp"
+#include "com/sun/star/text/ControlCharacter.hpp"
+#include "com/sun/star/text/DocumentStatistic.hpp"
+#include "com/sun/star/text/FilenameDisplayFormat.hpp"
+#include "com/sun/star/text/FootnoteNumbering.hpp"
+#include "com/sun/star/text/GraphicCrop.hpp"
+#include "com/sun/star/text/HoriOrientation.hpp"
+#include "com/sun/star/text/HoriOrientationFormat.hpp"
+#include "com/sun/star/text/HorizontalAdjust.hpp"
+#include "com/sun/star/text/InvalidTextContentException.hpp"
+#include "com/sun/star/text/MailMergeEvent.hpp"
+#include "com/sun/star/text/MailMergeType.hpp"
+#include "com/sun/star/text/NotePrintMode.hpp"
+#include "com/sun/star/text/PageNumberType.hpp"
+#include "com/sun/star/text/PlaceholderType.hpp"
+#include "com/sun/star/text/PositionLayoutDir.hpp"
+#include "com/sun/star/text/ReferenceFieldPart.hpp"
+#include "com/sun/star/text/ReferenceFieldSource.hpp"
+#include "com/sun/star/text/RelOrientation.hpp"
+#include "com/sun/star/text/RubyAdjust.hpp"
+#include "com/sun/star/text/SectionFileLink.hpp"
+#include "com/sun/star/text/SetVariableType.hpp"
+#include "com/sun/star/text/SizeType.hpp"
+#include "com/sun/star/text/TableColumnSeparator.hpp"
+#include "com/sun/star/text/TemplateDisplayFormat.hpp"
+#include "com/sun/star/text/TextContentAnchorType.hpp"
+#include "com/sun/star/text/TextGridMode.hpp"
+#include "com/sun/star/text/UserDataPart.hpp"
+#include "com/sun/star/text/UserFieldFormat.hpp"
+#include "com/sun/star/text/VertOrientation.hpp"
+#include "com/sun/star/text/VertOrientationFormat.hpp"
+#include "com/sun/star/text/WrapInfluenceOnPosition.hpp"
+#include "com/sun/star/text/WrapTextMode.hpp"
+#include "com/sun/star/text/XAutoTextContainer.hpp"
+#include "com/sun/star/text/XAutoTextEntry.hpp"
+#include "com/sun/star/text/XAutoTextGroup.hpp"
+#include "com/sun/star/text/XBookmarksSupplier.hpp"
+#include "com/sun/star/text/XChapterNumberingSupplier.hpp"
+#include "com/sun/star/text/XDefaultNumberingProvider.hpp"
+#include "com/sun/star/text/XDependentTextField.hpp"
+#include "com/sun/star/text/XDocumentIndex.hpp"
+#include "com/sun/star/text/XDocumentIndexMark.hpp"
+#include "com/sun/star/text/XDocumentIndexesSupplier.hpp"
+#include "com/sun/star/text/XEndnotesSettingsSupplier.hpp"
+#include "com/sun/star/text/XEndnotesSupplier.hpp"
+#include "com/sun/star/text/XFootnote.hpp"
+#include "com/sun/star/text/XFootnotesSettingsSupplier.hpp"
+#include "com/sun/star/text/XFootnotesSupplier.hpp"
+#include "com/sun/star/text/XLineNumberingProperties.hpp"
+#include "com/sun/star/text/XMailMergeBroadcaster.hpp"
+#include "com/sun/star/text/XMailMergeListener.hpp"
+#include "com/sun/star/text/XModule.hpp"
+#include "com/sun/star/text/XNumberingTypeInfo.hpp"
+#include "com/sun/star/text/XPageCursor.hpp"
+#include "com/sun/star/text/XPagePrintable.hpp"
+#include "com/sun/star/text/XParagraphCursor.hpp"
+#include "com/sun/star/text/XReferenceMarksSupplier.hpp"
+#include "com/sun/star/text/XRelativeTextContentInsert.hpp"
+#include "com/sun/star/text/XRelativeTextContentRemove.hpp"
+#include "com/sun/star/text/XRubySelection.hpp"
+#include "com/sun/star/text/XSentenceCursor.hpp"
+#include "com/sun/star/text/XText.hpp"
+#include "com/sun/star/text/XTextColumns.hpp"
+#include "com/sun/star/text/XTextContent.hpp"
+#include "com/sun/star/text/XTextCursor.hpp"
+#include "com/sun/star/text/XTextDocument.hpp"
+#include "com/sun/star/text/XTextEmbeddedObject.hpp"
+#include "com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp"
+#include "com/sun/star/text/XTextField.hpp"
+#include "com/sun/star/text/XTextFieldsSupplier.hpp"
+#include "com/sun/star/text/XTextFrame.hpp"
+#include "com/sun/star/text/XTextFramesSupplier.hpp"
+#include "com/sun/star/text/XTextGraphicObjectsSupplier.hpp"
+#include "com/sun/star/text/XTextRange.hpp"
+#include "com/sun/star/text/XTextRangeCompare.hpp"
+#include "com/sun/star/text/XTextSection.hpp"
+#include "com/sun/star/text/XTextSectionsSupplier.hpp"
+#include "com/sun/star/text/XTextTable.hpp"
+#include "com/sun/star/text/XTextTableCursor.hpp"
+#include "com/sun/star/text/XTextTablesSupplier.hpp"
+#include "com/sun/star/text/XTextViewCursor.hpp"
+#include "com/sun/star/text/XTextViewCursorSupplier.hpp"
+#include "com/sun/star/text/XWordCursor.hpp"
+#include "com/sun/star/ucb/CommandAbortedException.hpp"
+#include "com/sun/star/ucb/InteractiveAppException.hpp"
+#include "com/sun/star/ucb/TransferInfo.hpp"
+#include "com/sun/star/ucb/XCommandEnvironment.hpp"
+#include "com/sun/star/ucb/XContent.hpp"
+#include "com/sun/star/ucb/XContentIdentifier.hpp"
+#include "com/sun/star/ucb/XContentProvider.hpp"
+#include "com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp"
+#include "com/sun/star/ui/dialogs/ExecutableDialogResults.hpp"
+#include "com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp"
+#include "com/sun/star/ui/dialogs/ListboxControlActions.hpp"
+#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
+#include "com/sun/star/ui/dialogs/XExecutableDialog.hpp"
+#include "com/sun/star/ui/dialogs/XFilePicker.hpp"
+#include "com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp"
+#include "com/sun/star/ui/dialogs/XFilterManager.hpp"
+#include "com/sun/star/ui/dialogs/XFolderPicker.hpp"
+#include "com/sun/star/uno/Any.h"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Exception.hpp"
+#include "com/sun/star/uno/Reference.h"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include "com/sun/star/uno/Sequence.h"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/XCurrentContext.hpp"
+#include "com/sun/star/uno/XNamingService.hpp"
+#include "com/sun/star/uri/XUriReferenceFactory.hpp"
+#include "com/sun/star/uri/XVndSunStarScriptUrl.hpp"
+#include "com/sun/star/util/CloseVetoException.hpp"
+#include "com/sun/star/util/Date.hpp"
+#include "com/sun/star/util/DateTime.hpp"
+#include "com/sun/star/util/DateTimeRange.hpp"
+#include "com/sun/star/util/SearchFlags.hpp"
+#include "com/sun/star/util/SearchOptions.hpp"
+#include "com/sun/star/util/Time.hpp"
+#include "com/sun/star/util/XArchiver.hpp"
+#include "com/sun/star/util/XCloseable.hpp"
+#include "com/sun/star/util/XLinkUpdate.hpp"
+#include "com/sun/star/util/XModifiable.hpp"
+#include "com/sun/star/util/XModifyBroadcaster.hpp"
+#include "com/sun/star/util/XModifyListener.hpp"
+#include "com/sun/star/util/XNumberFormatTypes.hpp"
+#include "com/sun/star/util/XNumberFormatsSupplier.hpp"
+#include "com/sun/star/util/XPropertyReplace.hpp"
+#include "com/sun/star/util/XRefreshListener.hpp"
+#include "com/sun/star/util/XRefreshable.hpp"
+#include "com/sun/star/util/XReplaceDescriptor.hpp"
+#include "com/sun/star/util/XReplaceable.hpp"
+#include "com/sun/star/util/XSortable.hpp"
+#include "com/sun/star/util/XURLTransformer.hpp"
+#include "com/sun/star/util/XUpdatable.hpp"
+#include "com/sun/star/view/DocumentZoomType.hpp"
+#include "com/sun/star/view/XLineCursor.hpp"
+#include "com/sun/star/view/XPrintSettingsSupplier.hpp"
+#include "com/sun/star/view/XRenderable.hpp"
+#include "com/sun/star/view/XScreenCursor.hpp"
+#include "com/sun/star/view/XSelectionChangeListener.hpp"
+#include "com/sun/star/view/XSelectionSupplier.hpp"
+#include "com/sun/star/view/XViewCursor.hpp"
+#include "com/sun/star/view/XViewSettingsSupplier.hpp"
+#include "com/sun/star/xforms/XFormsSupplier.hpp"
+#include "com/sun/star/xforms/XFormsUIHelper1.hpp"
+#include "com/sun/star/xforms/XModel.hpp"
+#include "com/sun/star/xml/sax/InputSource.hpp"
+#include "com/sun/star/xml/sax/XAttributeList.hpp"
+#include "com/sun/star/xml/sax/XDocumentHandler.hpp"
+#include "com/sun/star/xml/sax/XParser.hpp"
+
+#include "comphelper/ChainablePropertySet.hxx"
+#include "comphelper/ChainablePropertySetInfo.hxx"
+#include "comphelper/MasterPropertySet.hxx"
+#include "comphelper/MasterPropertySetInfo.hxx"
+#include "comphelper/SettingsHelper.hxx"
+#include "comphelper/TypeGeneration.hxx"
+#include "comphelper/accessibleeventnotifier.hxx"
+#include "comphelper/accessiblekeybindinghelper.hxx"
+#include "comphelper/classids.hxx"
+#include "comphelper/embeddedobjectcontainer.hxx"
+#include "comphelper/mediadescriptor.hxx"
+#include "comphelper/processfactory.hxx"
+#include "comphelper/seqstream.hxx"
+#include "comphelper/storagehelper.hxx"
+#include "comphelper/types.hxx"
+#include "comphelper/uno3.hxx"
+
+
+#include "cppuhelper/bootstrap.hxx"
+#include "cppuhelper/compbase1.hxx"
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase1.hxx"
+#include "cppuhelper/implbase10.hxx"
+#include "cppuhelper/implbase11.hxx"
+#include "cppuhelper/implbase2.hxx"
+#include "cppuhelper/implbase3.hxx"
+#include "cppuhelper/implbase4.hxx"
+#include "cppuhelper/implbase5.hxx"
+#include "cppuhelper/implbase6.hxx"
+#include "cppuhelper/implbase7.hxx"
+#include "cppuhelper/implbase8.hxx"
+#include "cppuhelper/implbase9.hxx"
+#include "cppuhelper/implbase_ex.hxx"
+#include "cppuhelper/implbase_ex_post.hxx"
+#include "cppuhelper/implbase_ex_pre.hxx"
+#include "cppuhelper/interfacecontainer.hxx"
+#include "cppuhelper/weak.hxx"
+#include "cppuhelper/weakref.hxx"
+
+#include "framework/interaction.hxx"
+
+#include "svtools/grfmgr.hxx"
+#include "svl/mailenum.hxx"
+
+#include "i18npool/lang.h"
+#include "i18npool/mslangid.hxx"
+
+#include "linguistic/lngprops.hxx"
+
+#include "osl/conditn.hxx"
+#include "osl/diagnose.h"
+#include "osl/endian.h"
+#include "osl/file.hxx"
+#include "osl/interlck.h"
+#include "osl/module.h"
+#include "osl/module.hxx"
+#include "osl/mutex.hxx"
+#include "osl/thread.hxx"
+
+#include "rsc/rscsfx.hxx"
+
+#include "rtl/logfile.hxx"
+#include "rtl/math.hxx"
+#include "rtl/memory.h"
+#include "rtl/string.h"
+#include "rtl/string.hxx"
+#include "rtl/tencinfo.h"
+#include "rtl/textenc.h"
+#include "rtl/ustrbuf.hxx"
+#include "rtl/ustring.h"
+#include "rtl/ustring.hxx"
+#include "rtl/uuid.h"
+
+#include "salhelper/condition.hxx"
+
+#include "sfx2/app.hxx"
+#include "sfx2/appuno.hxx"
+#include "sfx2/basedlgs.hxx"
+#include "sfx2/bindings.hxx"
+#include "sfx2/childwin.hxx"
+#include "sfx2/ctrlitem.hxx"
+#include "sfx2/dinfdlg.hxx"
+#include "sfx2/dispatch.hxx"
+#include "sfx2/docfilt.hxx"
+#include "sfx2/docinf.hxx"
+#include "sfx2/dockwin.hxx"
+#include "sfx2/doctempl.hxx"
+#include "sfx2/event.hxx"
+#include "sfx2/fcontnr.hxx"
+#include "sfx2/filedlghelper.hxx"
+#include "sfx2/frame.hxx"
+#include "sfx2/frmdescr.hxx"
+#include "sfx2/imagemgr.hxx"
+#include "sfx2/imgmgr.hxx"
+#include "sfx2/linkmgr.hxx"
+#include "sfx2/linksrc.hxx"
+#include "sfx2/lnkbase.hxx"
+#include "sfx2/mieclip.hxx"
+#include "sfx2/mnumgr.hxx"
+#include "sfx2/module.hxx"
+#include "sfx2/msg.hxx"
+#include "sfx2/msgpool.hxx"
+#include "sfx2/new.hxx"
+#include "sfx2/newstyle.hxx"
+#include "sfx2/objface.hxx"
+#include "sfx2/objitem.hxx"
+#include "sfx2/passwd.hxx"
+#include "sfx2/printer.hxx"
+#include "sfx2/prnmon.hxx"
+#include "sfx2/progress.hxx"
+#include "sfx2/request.hxx"
+#include "sfx2/sfx.hrc"
+#include "sfx2/sfxdefs.hxx"
+#include "sfx2/sfxdlg.hxx"
+#include "sfx2/sfxhelp.hxx"
+#include "sfx2/sfxsids.hrc"
+#include "sfx2/sfxuno.hxx"
+#include "sfx2/shell.hxx"
+#include "sfx2/styfitem.hxx"
+#include "sfx2/styledlg.hxx"
+#include "sfx2/tabdlg.hxx"
+#include "sfx2/tbxctrl.hxx"
+#include "sfx2/templdlg.hxx"
+#include "sfx2/tplpitem.hxx"
+#include "sfx2/viewfac.hxx"
+#include "sfx2/viewfrm.hxx"
+#include "sfx2/viewsh.hxx"
+
+#include "sot/clsids.hxx"
+#include "sot/exchange.hxx"
+#include "sot/factory.hxx"
+#include "sot/filelist.hxx"
+#include "sot/formats.hxx"
+#include "sot/stg.hxx"
+#include "sot/storage.hxx"
+#include "sot/storinfo.hxx"
+
+#include "svtools/FilterConfigItem.hxx"
+#include "svl/PasswordHelper.hxx"
+#include "svtools/accessibilityoptions.hxx"
+#include "svl/aeitem.hxx"
+#include "svl/cjkoptions.hxx"
+#include "unotools/cmdoptions.hxx"
+#include "svl/cntnrsrt.hxx"
+#include "svtools/collatorres.hxx"
+#include "svtools/colorcfg.hxx"
+#include "unotools/compatibility.hxx"
+#include "svtools/controldims.hrc"
+#include "svl/ctloptions.hxx"
+#include "svtools/ctrlbox.hxx"
+#include "svtools/ctrltool.hxx"
+#include "svtools/editbrowsebox.hxx"
+#include "svtools/ehdl.hxx"
+#include "svl/eitem.hxx"
+#include "svtools/embedhlp.hxx"
+#include "svtools/embedtransfer.hxx"
+#include "svtools/filter.hxx"
+#include "svl/flagitem.hxx"
+#include "unotools/fltrcfg.hxx"
+#include "svl/fstathelper.hxx"
+#include "svl/globalnameitem.hxx"
+#include "svtools/headbar.hxx"
+#include "svtools/htmlkywd.hxx"
+#include "svtools/htmltokn.h"
+#include "svl/imageitm.hxx"
+#include "svtools/imap.hxx"
+#include "svtools/indexentryres.hxx"
+#include "svl/inethist.hxx"
+#include "svtools/inetimg.hxx"
+#include "svtools/insdlg.hxx"
+#include "svl/intitem.hxx"
+#include "svl/isethint.hxx"
+#include "svl/itemiter.hxx"
+#include "svl/itempool.hxx"
+#include "svl/itemprop.hxx"
+#include "svl/itemset.hxx"
+#include "svl/languageoptions.hxx"
+#include "svl/lckbitem.hxx"
+#include "unotools/lingucfg.hxx"
+#include "unotools/linguprops.hxx"
+#include "svl/lstner.hxx"
+#include "unotools/misccfg.hxx"
+#include "unotools/moduleoptions.hxx"
+#include "svl/numuno.hxx"
+#include "svl/ownlist.hxx"
+#include "svtools/parhtml.hxx"
+#include "unotools/pathoptions.hxx"
+#include "svl/poolitem.hxx"
+#include "svtools/prgsbar.hxx"
+#include "svtools/printdlg.hxx"
+#include "svtools/prnsetup.hxx"
+#include "svl/ptitem.hxx"
+#include "svl/rectitem.hxx"
+#include "svtools/rtfkeywd.hxx"
+#include "svtools/rtfout.hxx"
+#include "svtools/rtftoken.h"
+#include "svtools/ruler.hxx"
+#include "unotools/saveopt.hxx"
+#include "svtools/scriptedtext.hxx"
+#include "svtools/sfxecode.hxx"
+#include "svl/slstitm.hxx"
+#include "svl/smplhint.hxx"
+#include "svtools/soerr.hxx"
+#include "svl/solar.hrc"
+#include "unotools/sourceviewconfig.hxx"
+#include "svtools/stdctrl.hxx"
+#include "svl/stritem.hxx"
+#include "svl/style.hrc"
+#include "svl/style.hxx"
+#include "svl/svarray.hxx"
+#include "svtools/svmedit.hxx"
+#include "svtools/svparser.hxx"
+#include "svl/svstdarr.hxx"
+#include "svtools/svtabbx.hxx"
+#include "svtools/svtreebx.hxx"
+#include "unotools/syslocale.hxx"
+#include "svtools/templdlg.hxx"
+#include "svtools/textview.hxx"
+#include "svtools/transfer.hxx"
+#include "svtools/txtattr.hxx"
+#include "svtools/txtcmp.hxx"
+#include "svl/undo.hxx"
+#include "unotools/undoopt.hxx"
+#include "svtools/unoevent.hxx"
+#include "svtools/unoimap.hxx"
+#include "svl/urihelper.hxx"
+#include "svl/urlbmk.hxx"
+#include "unotools/useroptions.hxx"
+#include "svtools/valueset.hxx"
+#include "svl/visitem.hxx"
+#include "svl/whiter.hxx"
+#include "svtools/xtextedt.hxx"
+
+#include "svx/IAccessibleParent.hxx"
+#include "svx/IAccessibleViewForwarder.hxx"
+#include "svx/SpellDialogChildWindow.hxx"
+#include "editeng/SpellPortions.hxx"
+#include "editeng/UnoForbiddenCharsTable.hxx"
+#include "editeng/acorrcfg.hxx"
+#include "svx/anchorid.hxx"
+#include "svl/asiancfg.hxx"
+#include "svx/checklbx.hxx"
+#include "svx/clipboardctl.hxx"
+#include "svx/clipfmtitem.hxx"
+#include "svx/contdlg.hxx"
+#include "svx/ctredlin.hxx"
+#include "svx/dataaccessdescriptor.hxx"
+#include "svx/dialmgr.hxx"
+#include "svx/dialogs.hrc"
+#include "svx/dlgutil.hxx"
+#include "editeng/editdata.hxx"
+#include "editeng/editeng.hxx"
+#include "editeng/editobj.hxx"
+#include "editeng/editstat.hxx"
+#include "editeng/editview.hxx"
+#include "editeng/eeitem.hxx"
+#include "filter/msfilter/escherex.hxx"
+#include "svx/extrusionbar.hxx"
+#include "svx/extrusioncolorcontrol.hxx"
+#include "svx/fillctrl.hxx"
+#include "svx/flagsdef.hxx"
+#include "editeng/flstitem.hxx"
+#include "svx/fmdmod.hxx"
+#include "svx/fmglob.hxx"
+#include "svx/fmobjfac.hxx"
+#include "svx/fmpage.hxx"
+#include "svx/fntctrl.hxx"
+#include "svx/fontwork.hxx"
+#include "svx/fontworkbar.hxx"
+#include "svx/fontworkgallery.hxx"
+#include "editeng/forbiddencharacterstable.hxx"
+#include "svx/formatpaintbrushctrl.hxx"
+#include "editeng/frmdir.hxx"
+#include "svx/galbrws.hxx"
+#include "svx/gallery.hxx"
+#include "svx/globlmn.hrc"
+#include "svx/grafctrl.hxx"
+#include "editeng/hangulhanja.hxx"
+#include "svx/hdft2.hxx"
+#include "svtools/htmlcfg.hxx"
+#include "svx/htmlmode.hxx"
+#include "svx/hyperdlg.hxx"
+#include "svx/hyprlink.hxx"
+#include "svx/imapdlg.hxx"
+#include "editeng/itemtype.hxx"
+#include "svx/langbox.hxx"
+#include "svx/layctrl.hxx"
+#include "svx/lboxctrl.hxx"
+#include "svx/linectrl.hxx"
+#include "sfx2/linkmgr.hxx"
+#include "filter/msfilter/mscodec.hxx"
+#include "filter/msfilter/msdffimp.hxx"
+#include "filter/msfilter/msfiltertracer.hxx"
+#include "filter/msfilter/msocximex.hxx"
+#include "filter/msfilter/msoleexp.hxx"
+#include "editeng/numitem.hxx"
+#include "svx/numvset.hxx"
+#include "svx/objfac3d.hxx"
+#include "svx/ofaitem.hxx"
+#include "svx/optgenrl.hxx"
+#include "svx/optgrid.hxx"
+#include "editeng/outliner.hxx"
+#include "editeng/outlobj.hxx"
+#include "svx/pagectrl.hxx"
+#include "editeng/paperinf.hxx"
+#include "svx/paraprev.hxx"
+#include "svx/pfiledlg.hxx"
+#include "svx/prtqry.hxx"
+#include "svx/rectenum.hxx"
+#include "svx/rotmodit.hxx"
+#include "svx/rubydialog.hxx"
+#include "svx/ruler.hxx"
+#include "svx/rulritem.hxx"
+#include "editeng/scripttypeitem.hxx"
+#include "svx/sdgcoitm.hxx"
+#include "svx/sdggaitm.hxx"
+#include "svx/sdginitm.hxx"
+#include "svx/sdgluitm.hxx"
+#include "svx/sdgmoitm.hxx"
+#include "svx/sdgtritm.hxx"
+#include "svx/sdr/contact/displayinfo.hxx"
+#include "svx/sdr/contact/objectcontactofobjlistpainter.hxx"
+#include "svx/sdr/contact/viewcontactofsdrmediaobj.hxx"
+#include "svx/sdr/properties/defaultproperties.hxx"
+#include "svx/sdtaaitm.hxx"
+#include "svx/sdtacitm.hxx"
+#include "svx/sdtaditm.hxx"
+#include "svx/sdtagitm.hxx"
+#include "svx/sdtaitm.hxx"
+#include "svx/sdtakitm.hxx"
+#include "svx/simptabl.hxx"
+#include "editeng/splwrap.hxx"
+#include "svx/srchdlg.hxx"
+#include "svx/stddlg.hxx"
+#include "svx/strarray.hxx"
+#include "svx/xflasit.hxx"
+#include "svx/xflclit.hxx"
+#include "svx/xflgrit.hxx"
+#include "svx/xflhtit.hxx"
+#include "svx/xfltrit.hxx"
+#include "svx/xftadit.hxx"
+#include "svx/xftdiit.hxx"
+#include "svx/xftmrit.hxx"
+#include "svx/xftouit.hxx"
+#include "svx/xftsfit.hxx"
+#include "svx/xftshcit.hxx"
+#include "svx/xftshit.hxx"
+#include "svx/xftshxy.hxx"
+#include "svx/xftstit.hxx"
+#include "svx/xgrad.hxx"
+#include "svx/xlineit.hxx"
+#include "svx/xlineit0.hxx"
+#include "svx/xlnclit.hxx"
+#include "svx/xlndsit.hxx"
+#include "svx/xlnedit.hxx"
+#include "svx/xlnstit.hxx"
+#include "svx/xlnwtit.hxx"
+#include "svx/xmleohlp.hxx"
+#include "svx/xmlexchg.hxx"
+#include "svx/xmlgrhlp.hxx"
+#include "svx/xoutbmp.hxx"
+#include "svx/xpoly.hxx"
+#include "svx/xtable.hxx"
+#include "svx/xtextit0.hxx"
+#include "svx/zoomitem.hxx"
+
+#include "sys/stat.h"
+#include "sys/types.h"
+
+#include "toolkit/helper/vclunohelper.hxx"
+#include "toolkit/unohlp.hxx"
+
+#include "tools/bigint.hxx"
+#include "tools/cachestr.hxx"
+#include "tools/color.hxx"
+#include "tools/date.hxx"
+#include "tools/datetime.hxx"
+#include "tools/debug.hxx"
+#include "tools/errcode.hxx"
+#include "tools/errinf.hxx"
+#include "tools/fract.hxx"
+#include "tools/gen.hxx"
+#include "tools/globname.hxx"
+#include "tools/link.hxx"
+#include "tools/list.hxx"
+#include "tools/mempool.hxx"
+#include "tools/multisel.hxx"
+#include "tools/poly.hxx"
+#include "tools/pstm.hxx"
+#include "tools/rc.hxx"
+#include "tools/ref.hxx"
+#include "tools/resary.hxx"
+#include "tools/resid.hxx"
+#include "tools/resmgr.hxx"
+#include "tools/rtti.hxx"
+#include "tools/shl.hxx"
+#include "tools/solar.h"
+#include "tools/stream.hxx"
+#include "tools/string.hxx"
+#include "tools/table.hxx"
+#include "tools/tempfile.hxx"
+#include "tools/time.hxx"
+#include "tools/urlobj.hxx"
+
+#include "ucbhelper/commandenvironment.hxx"
+#include "ucbhelper/content.hxx"
+#include "ucbhelper/contentbroker.hxx"
+#include "ucbhelper/contentidentifier.hxx"
+
+#include "unicode/ubidi.h"
+
+#include "uno/lbnames.h"
+
+#include "unotools/accessiblerelationsethelper.hxx"
+#include "unotools/accessiblestatesethelper.hxx"
+#include "unotools/calendarwrapper.hxx"
+#include "unotools/charclass.hxx"
+#include "unotools/collatorwrapper.hxx"
+#include "unotools/configitem.hxx"
+#include "unotools/configmgr.hxx"
+#include "unotools/confignode.hxx"
+#include "unotools/configpathes.hxx"
+#include "unotools/intlwrapper.hxx"
+#include "unotools/localedatawrapper.hxx"
+#include "unotools/localfilehelper.hxx"
+#include "unotools/processfactory.hxx"
+#include "unotools/streamwrap.hxx"
+#include "unotools/tempfile.hxx"
+#include "unotools/transliterationwrapper.hxx"
+#include "unotools/ucbstreamhelper.hxx"
+
+#include "vcl/bitmap.hxx"
+#include "vcl/button.hxx"
+#include "vcl/cmdevt.h"
+#include "vcl/cmdevt.hxx"
+#include "vcl/combobox.hxx"
+#include "vcl/cursor.hxx"
+#include "vcl/cvtgrf.hxx"
+#include "vcl/dialog.hxx"
+#include "vcl/edit.hxx"
+#include "vcl/event.hxx"
+#include "vcl/field.hxx"
+#include "vcl/fixed.hxx"
+#include "vcl/fldunit.hxx"
+#include "vcl/font.hxx"
+#include "unotools/fontcvt.hxx"
+#include "vcl/graph.hxx"
+#include "vcl/group.hxx"
+#include "vcl/help.hxx"
+#include "vcl/image.hxx"
+#include "vcl/imagebtn.hxx"
+#include "vcl/imgcons.hxx"
+#include "vcl/inputctx.hxx"
+#include "vcl/jobset.hxx"
+#include "vcl/keycod.hxx"
+#include "vcl/keycodes.hxx"
+#include "vcl/lstbox.hxx"
+#include "vcl/mapmod.hxx"
+#include "vcl/menu.hxx"
+#include "vcl/menubtn.hxx"
+#include "vcl/metric.hxx"
+#include "vcl/mnemonic.hxx"
+#include "vcl/morebtn.hxx"
+#include "vcl/msgbox.hxx"
+#include "vcl/outdev.hxx"
+#include "vcl/pdfextoutdevdata.hxx"
+#include "vcl/print.hxx"
+#include "vcl/region.hxx"
+#include "vcl/salbtype.hxx"
+#include "vcl/scrbar.hxx"
+#include "vcl/settings.hxx"
+#include "vcl/sound.hxx"
+#include "vcl/status.hxx"
+#include "vcl/svapp.hxx"
+#include "vcl/syswin.hxx"
+#include "vcl/timer.hxx"
+#include "vcl/toolbox.hxx"
+#include "vcl/vclenum.hxx"
+#include "vcl/virdev.hxx"
+#include "vcl/waitobj.hxx"
+#include "vcl/window.hxx"
+#include "vcl/wintypes.hxx"
+#include "vcl/wrkwin.hxx"
+
+#include "vos/mutex.hxx"
+#include "vos/ref.hxx"
+
+#include "xmloff/DocumentSettingsContext.hxx"
+#include "xmloff/ProgressBarHelper.hxx"
+#include "xmloff/XMLBase64ImportContext.hxx"
+#include "xmloff/XMLFilterServiceNames.h"
+#include "xmloff/XMLFontAutoStylePool.hxx"
+#include "xmloff/XMLFontStylesContext.hxx"
+#include "xmloff/XMLGraphicsDefaultStyle.hxx"
+#include "xmloff/XMLTextListAutoStylePool.hxx"
+#include "xmloff/XMLTextMasterPageExport.hxx"
+#include "xmloff/XMLTextMasterStylesContext.hxx"
+#include "xmloff/XMLTextShapeImportHelper.hxx"
+#include "xmloff/XMLTextShapeStyleContext.hxx"
+#include "xmloff/XMLTextTableContext.hxx"
+#include "xmloff/attrlist.hxx"
+#include "xmloff/families.hxx"
+#include "xmloff/functional.hxx"
+#include "xmloff/i18nmap.hxx"
+#include "xmloff/maptype.hxx"
+#include "xmloff/nmspmap.hxx"
+#include "xmloff/numehelp.hxx"
+#include "xmloff/prhdlfac.hxx"
+#include "xmloff/prstylei.hxx"
+#include "xmloff/txtparae.hxx"
+#include "xmloff/txtprmap.hxx"
+#include "xmloff/txtstyli.hxx"
+#include "xmloff/uniref.hxx"
+#include "xmloff/xformsimport.hxx"
+#include "xmloff/xmlaustp.hxx"
+#include "xmloff/xmlement.hxx"
+#include "xmloff/xmlexp.hxx"
+#include "xmloff/xmlictxt.hxx"
+#include "xmloff/xmlmetae.hxx"
+#include "xmloff/xmlmetai.hxx"
+#include "xmloff/xmlnmspe.hxx"
+#include "xmloff/xmlprmap.hxx"
+#include "xmloff/xmlscripti.hxx"
+#include "xmloff/xmlstyle.hxx"
+#include "xmloff/xmltabe.hxx"
+#include "xmloff/xmltkmap.hxx"
+#include "xmloff/xmltoken.hxx"
+#include "xmloff/xmltypes.hxx"
+#include "xmloff/xmluconv.hxx"
+//---MARKER---
+
+#endif
diff --git a/sw/inc/poolfmt.awk b/sw/inc/poolfmt.awk
new file mode 100644
index 000000000000..810d714dff95
--- /dev/null
+++ b/sw/inc/poolfmt.awk
@@ -0,0 +1,73 @@
+#*************************************************************************
+#*
+#* $Workfile: dbgxtor.awk
+#*
+#* Ersterstellung JP 05.10.95
+#* Letzte Aenderung $Author: hr $ $Date: 2000-09-18 17:14:27 $
+#* $Revision: 1.1.1.1 $
+#*
+#* $Logfile: T:/sw/inc/poolfmt.awv $
+#*
+#* Copyright (c) 1990-1996, STAR DIVISION
+#*
+#*************************************************************************
+
+#
+# Dieses awk-script generiert ein cxx-file, das alle PoolIds der Vorlage dumpt.
+# wird fuer den HelpPI gebraucht.
+# Aufruf: awk -f poolid.awk poolfmt.hxx > poolid.cxx
+# cl poolid.cxx
+# poolid.exe > ???.hrc
+#
+
+function Header() {
+ print "// This is an outputfile of an awk-script: $Workfile: poolfmt.awk $"
+ print "#include <solar.h> "
+ print
+ print "#include <stdio.h>"
+ print "#include <stdlib.h>"
+ print
+ print "#pragma hdrstop"
+ print
+ print "#include <iostream.hxx> "
+ print "#include \"poolfmt.hxx\""
+ print
+}
+
+function Main() {
+ print
+ print "void main( int , char *[] ) {"
+ sStr = "#define"
+ print " int nSize = (sizeof(ppPoolIds) / sizeof(PoolFmtIds)) - 1;"
+ print " for( int n = 0; n < nSize; n++ )"
+ print " printf( \"" sStr " %s\\t%8d\\n\", ppPoolIds[ n ].pStr, ppPoolIds[ n ].nId );"
+ print "}"
+}
+
+function TableHead() {
+ print
+ print "struct PoolFmtIds { int nId; const char* pStr; };"
+ print "static PoolFmtIds ppPoolIds[] = {"
+}
+
+function TableTail() {
+ print " 0, \"\" };"
+ print
+}
+
+BEGIN {
+ Header();
+ TableHead();
+}
+
+/^[ \t]*RES_/ && !index( $1, "_BEGIN" ) && !index( $1, "_END" ) && !index( $1, "_POOL_" ) {
+ sStr = $1;
+ split( $1, sStr, "," );
+ print " " sStr[1] ", \"" sStr[1] "\","
+}
+
+END {
+ TableTail();
+ Main();
+}
+
diff --git a/sw/inc/poolfmt.hrc b/sw/inc/poolfmt.hrc
new file mode 100644
index 000000000000..f191f0fac78c
--- /dev/null
+++ b/sw/inc/poolfmt.hrc
@@ -0,0 +1,281 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _POOLFMT_HRC
+#define _POOLFMT_HRC
+
+#include "rcid.hrc"
+
+// ---------------
+// die Formate
+// ---------------
+
+// Zeichenvorlagen:
+#define STR_POOLCHR_FOOTNOTE (RC_POOLCHRFMT_BEGIN+ 0)
+#define STR_POOLCHR_PAGENO (RC_POOLCHRFMT_BEGIN+ 1)
+#define STR_POOLCHR_LABEL (RC_POOLCHRFMT_BEGIN+ 2)
+#define STR_POOLCHR_DROPCAPS (RC_POOLCHRFMT_BEGIN+ 3)
+#define STR_POOLCHR_NUM_LEVEL (RC_POOLCHRFMT_BEGIN+ 4)
+#define STR_POOLCHR_BUL_LEVEL (RC_POOLCHRFMT_BEGIN+ 5)
+#define STR_POOLCHR_INET_NORMAL (RC_POOLCHRFMT_BEGIN+ 6)
+#define STR_POOLCHR_INET_VISIT (RC_POOLCHRFMT_BEGIN+ 7)
+#define STR_POOLCHR_JUMPEDIT (RC_POOLCHRFMT_BEGIN+ 8)
+#define STR_POOLCHR_TOXJUMP (RC_POOLCHRFMT_BEGIN+ 9)
+#define STR_POOLCHR_ENDNOTE (RC_POOLCHRFMT_BEGIN+ 10)
+#define STR_POOLCHR_LINENUM (RC_POOLCHRFMT_BEGIN+ 11)
+#define STR_POOLCHR_IDX_MAIN_ENTRY (RC_POOLCHRFMT_BEGIN+ 12)
+#define STR_POOLCHR_FOOTNOTE_ANCHOR (RC_POOLCHRFMT_BEGIN+ 13)
+#define STR_POOLCHR_ENDNOTE_ANCHOR (RC_POOLCHRFMT_BEGIN+ 14)
+#define STR_POOLCHR_RUBYTEXT (RC_POOLCHRFMT_BEGIN+ 15)
+#define STR_POOLCHR_VERT_NUM (RC_POOLCHRFMT_BEGIN+ 16)
+
+#define STR_POOLCHR_HTML_EMPHASIS (RC_POOLCHRFMT_HTML_BEGIN+ 0)
+#define STR_POOLCHR_HTML_CITIATION (RC_POOLCHRFMT_HTML_BEGIN+ 1)
+#define STR_POOLCHR_HTML_STRONG (RC_POOLCHRFMT_HTML_BEGIN+ 2)
+#define STR_POOLCHR_HTML_CODE (RC_POOLCHRFMT_HTML_BEGIN+ 3)
+#define STR_POOLCHR_HTML_SAMPLE (RC_POOLCHRFMT_HTML_BEGIN+ 4)
+#define STR_POOLCHR_HTML_KEYBOARD (RC_POOLCHRFMT_HTML_BEGIN+ 5)
+#define STR_POOLCHR_HTML_VARIABLE (RC_POOLCHRFMT_HTML_BEGIN+ 6)
+#define STR_POOLCHR_HTML_DEFINSTANCE (RC_POOLCHRFMT_HTML_BEGIN+ 7)
+#define STR_POOLCHR_HTML_TELETYPE (RC_POOLCHRFMT_HTML_BEGIN+ 8)
+
+// Rahmen-Vorlagen:
+#define STR_POOLFRM_FRAME (RC_POOLFRMFMT_BEGIN+ 0)
+#define STR_POOLFRM_GRAPHIC (RC_POOLFRMFMT_BEGIN+ 1)
+#define STR_POOLFRM_OLE (RC_POOLFRMFMT_BEGIN+ 2)
+#define STR_POOLFRM_FORMEL (RC_POOLFRMFMT_BEGIN+ 3)
+#define STR_POOLFRM_MARGINAL (RC_POOLFRMFMT_BEGIN+ 4)
+#define STR_POOLFRM_WATERSIGN (RC_POOLFRMFMT_BEGIN+ 5)
+#define STR_POOLFRM_LABEL (RC_POOLFRMFMT_BEGIN+ 6)
+
+// ---------------
+// die Vorlagen
+// ---------------
+// Gruppe Text
+#define STR_POOLCOLL_STANDARD (RC_POOLCOLL_TEXT_BEGIN+ 0)
+#define STR_POOLCOLL_TEXT (RC_POOLCOLL_TEXT_BEGIN+ 1)
+#define STR_POOLCOLL_TEXT_IDENT (RC_POOLCOLL_TEXT_BEGIN+ 2)
+#define STR_POOLCOLL_TEXT_NEGIDENT (RC_POOLCOLL_TEXT_BEGIN+ 3)
+#define STR_POOLCOLL_TEXT_MOVE (RC_POOLCOLL_TEXT_BEGIN+ 4)
+#define STR_POOLCOLL_GREETING (RC_POOLCOLL_TEXT_BEGIN+ 5)
+#define STR_POOLCOLL_SIGNATURE (RC_POOLCOLL_TEXT_BEGIN+ 6)
+#define STR_POOLCOLL_CONFRONTATION (RC_POOLCOLL_TEXT_BEGIN+ 7)
+#define STR_POOLCOLL_MARGINAL (RC_POOLCOLL_TEXT_BEGIN+ 8)
+
+ // Untergruppierung Ueberschriften
+#define STR_POOLCOLL_HEADLINE_BASE (RC_POOLCOLL_TEXT_BEGIN+ 9)
+#define STR_POOLCOLL_HEADLINE1 (RC_POOLCOLL_TEXT_BEGIN+ 10)
+#define STR_POOLCOLL_HEADLINE2 (RC_POOLCOLL_TEXT_BEGIN+ 11)
+#define STR_POOLCOLL_HEADLINE3 (RC_POOLCOLL_TEXT_BEGIN+ 12)
+#define STR_POOLCOLL_HEADLINE4 (RC_POOLCOLL_TEXT_BEGIN+ 13)
+#define STR_POOLCOLL_HEADLINE5 (RC_POOLCOLL_TEXT_BEGIN+ 14)
+#define STR_POOLCOLL_HEADLINE6 (RC_POOLCOLL_TEXT_BEGIN+ 15)
+#define STR_POOLCOLL_HEADLINE7 (RC_POOLCOLL_TEXT_BEGIN+ 16)
+#define STR_POOLCOLL_HEADLINE8 (RC_POOLCOLL_TEXT_BEGIN+ 17)
+#define STR_POOLCOLL_HEADLINE9 (RC_POOLCOLL_TEXT_BEGIN+ 18)
+#define STR_POOLCOLL_HEADLINE10 (RC_POOLCOLL_TEXT_BEGIN+ 19)
+
+// Gruppe Listen
+#define STR_POOLCOLL_NUMBUL_BASE (RC_POOLCOLL_LISTS_BEGIN+ 0)
+ // Untergruppe Nummerierung
+#define STR_POOLCOLL_NUM_LEVEL1S (RC_POOLCOLL_LISTS_BEGIN+ 1)
+#define STR_POOLCOLL_NUM_LEVEL1 (RC_POOLCOLL_LISTS_BEGIN+ 2)
+#define STR_POOLCOLL_NUM_LEVEL1E (RC_POOLCOLL_LISTS_BEGIN+ 3)
+#define STR_POOLCOLL_NUM_NONUM1 (RC_POOLCOLL_LISTS_BEGIN+ 4)
+#define STR_POOLCOLL_NUM_LEVEL2S (RC_POOLCOLL_LISTS_BEGIN+ 5)
+#define STR_POOLCOLL_NUM_LEVEL2 (RC_POOLCOLL_LISTS_BEGIN+ 6)
+#define STR_POOLCOLL_NUM_LEVEL2E (RC_POOLCOLL_LISTS_BEGIN+ 7)
+#define STR_POOLCOLL_NUM_NONUM2 (RC_POOLCOLL_LISTS_BEGIN+ 8)
+#define STR_POOLCOLL_NUM_LEVEL3S (RC_POOLCOLL_LISTS_BEGIN+ 9)
+#define STR_POOLCOLL_NUM_LEVEL3 (RC_POOLCOLL_LISTS_BEGIN+ 10)
+#define STR_POOLCOLL_NUM_LEVEL3E (RC_POOLCOLL_LISTS_BEGIN+ 11)
+#define STR_POOLCOLL_NUM_NONUM3 (RC_POOLCOLL_LISTS_BEGIN+ 12)
+#define STR_POOLCOLL_NUM_LEVEL4S (RC_POOLCOLL_LISTS_BEGIN+ 13)
+#define STR_POOLCOLL_NUM_LEVEL4 (RC_POOLCOLL_LISTS_BEGIN+ 14)
+#define STR_POOLCOLL_NUM_LEVEL4E (RC_POOLCOLL_LISTS_BEGIN+ 15)
+#define STR_POOLCOLL_NUM_NONUM4 (RC_POOLCOLL_LISTS_BEGIN+ 16)
+#define STR_POOLCOLL_NUM_LEVEL5S (RC_POOLCOLL_LISTS_BEGIN+ 17)
+#define STR_POOLCOLL_NUM_LEVEL5 (RC_POOLCOLL_LISTS_BEGIN+ 18)
+#define STR_POOLCOLL_NUM_LEVEL5E (RC_POOLCOLL_LISTS_BEGIN+ 19)
+#define STR_POOLCOLL_NUM_NONUM5 (RC_POOLCOLL_LISTS_BEGIN+ 20)
+
+ // Untergruppe Aufzaehlung
+#define STR_POOLCOLL_BUL_LEVEL1S (RC_POOLCOLL_LISTS_BEGIN+ 21)
+#define STR_POOLCOLL_BUL_LEVEL1 (RC_POOLCOLL_LISTS_BEGIN+ 22)
+#define STR_POOLCOLL_BUL_LEVEL1E (RC_POOLCOLL_LISTS_BEGIN+ 23)
+#define STR_POOLCOLL_BUL_NONUM1 (RC_POOLCOLL_LISTS_BEGIN+ 24)
+#define STR_POOLCOLL_BUL_LEVEL2S (RC_POOLCOLL_LISTS_BEGIN+ 25)
+#define STR_POOLCOLL_BUL_LEVEL2 (RC_POOLCOLL_LISTS_BEGIN+ 26)
+#define STR_POOLCOLL_BUL_LEVEL2E (RC_POOLCOLL_LISTS_BEGIN+ 27)
+#define STR_POOLCOLL_BUL_NONUM2 (RC_POOLCOLL_LISTS_BEGIN+ 28)
+#define STR_POOLCOLL_BUL_LEVEL3S (RC_POOLCOLL_LISTS_BEGIN+ 29)
+#define STR_POOLCOLL_BUL_LEVEL3 (RC_POOLCOLL_LISTS_BEGIN+ 30)
+#define STR_POOLCOLL_BUL_LEVEL3E (RC_POOLCOLL_LISTS_BEGIN+ 31)
+#define STR_POOLCOLL_BUL_NONUM3 (RC_POOLCOLL_LISTS_BEGIN+ 32)
+#define STR_POOLCOLL_BUL_LEVEL4S (RC_POOLCOLL_LISTS_BEGIN+ 33)
+#define STR_POOLCOLL_BUL_LEVEL4 (RC_POOLCOLL_LISTS_BEGIN+ 34)
+#define STR_POOLCOLL_BUL_LEVEL4E (RC_POOLCOLL_LISTS_BEGIN+ 35)
+#define STR_POOLCOLL_BUL_NONUM4 (RC_POOLCOLL_LISTS_BEGIN+ 36)
+#define STR_POOLCOLL_BUL_LEVEL5S (RC_POOLCOLL_LISTS_BEGIN+ 37)
+#define STR_POOLCOLL_BUL_LEVEL5 (RC_POOLCOLL_LISTS_BEGIN+ 38)
+#define STR_POOLCOLL_BUL_LEVEL5E (RC_POOLCOLL_LISTS_BEGIN+ 39)
+#define STR_POOLCOLL_BUL_NONUM5 (RC_POOLCOLL_LISTS_BEGIN+ 40)
+
+// Sonderbereiche
+ // Untergruppe Header
+#define STR_POOLCOLL_HEADER (RC_POOLCOLL_EXTRA_BEGIN+ 0)
+#define STR_POOLCOLL_HEADERL (RC_POOLCOLL_EXTRA_BEGIN+ 1)
+#define STR_POOLCOLL_HEADERR (RC_POOLCOLL_EXTRA_BEGIN+ 2)
+
+ // Untergruppe Footer
+#define STR_POOLCOLL_FOOTER (RC_POOLCOLL_EXTRA_BEGIN+ 3)
+#define STR_POOLCOLL_FOOTERL (RC_POOLCOLL_EXTRA_BEGIN+ 4)
+#define STR_POOLCOLL_FOOTERR (RC_POOLCOLL_EXTRA_BEGIN+ 5)
+
+ // Untergruppe Tabelle
+#define STR_POOLCOLL_TABLE (RC_POOLCOLL_EXTRA_BEGIN+ 6)
+#define STR_POOLCOLL_TABLE_HDLN (RC_POOLCOLL_EXTRA_BEGIN+ 7)
+
+ // Untergruppe Labels
+#define STR_POOLCOLL_LABEL (RC_POOLCOLL_EXTRA_BEGIN+ 8)
+#define STR_POOLCOLL_LABEL_ABB (RC_POOLCOLL_EXTRA_BEGIN+ 9)
+#define STR_POOLCOLL_LABEL_TABLE (RC_POOLCOLL_EXTRA_BEGIN+ 10)
+#define STR_POOLCOLL_LABEL_FRAME (RC_POOLCOLL_EXTRA_BEGIN+ 11)
+
+ // sonstiges
+#define STR_POOLCOLL_FRAME (RC_POOLCOLL_EXTRA_BEGIN+ 12)
+#define STR_POOLCOLL_FOOTNOTE (RC_POOLCOLL_EXTRA_BEGIN+ 13)
+#define STR_POOLCOLL_JAKETADRESS (RC_POOLCOLL_EXTRA_BEGIN+ 14)
+#define STR_POOLCOLL_SENDADRESS (RC_POOLCOLL_EXTRA_BEGIN+ 15)
+#define STR_POOLCOLL_ENDNOTE (RC_POOLCOLL_EXTRA_BEGIN+ 16)
+
+#define STR_POOLCOLL_LABEL_DRAWING (RC_POOLCOLL_EXTRA_BEGIN+ 17)
+
+// Gruppe Verzeichnisse
+#define STR_POOLCOLL_REGISTER_BASE (RC_POOLCOLL_REGISTER_BEGIN+ 0)
+ // Untergruppe Index-Verzeichnisse
+#define STR_POOLCOLL_TOX_IDXH (RC_POOLCOLL_REGISTER_BEGIN+ 1)
+#define STR_POOLCOLL_TOX_IDX1 (RC_POOLCOLL_REGISTER_BEGIN+ 2)
+#define STR_POOLCOLL_TOX_IDX2 (RC_POOLCOLL_REGISTER_BEGIN+ 3)
+#define STR_POOLCOLL_TOX_IDX3 (RC_POOLCOLL_REGISTER_BEGIN+ 4)
+#define STR_POOLCOLL_TOX_IDXBREAK (RC_POOLCOLL_REGISTER_BEGIN+ 5)
+
+ // Untergruppe Inhalts-Verzeichnisse
+#define STR_POOLCOLL_TOX_CNTNTH (RC_POOLCOLL_REGISTER_BEGIN+ 6)
+#define STR_POOLCOLL_TOX_CNTNT1 (RC_POOLCOLL_REGISTER_BEGIN+ 7)
+#define STR_POOLCOLL_TOX_CNTNT2 (RC_POOLCOLL_REGISTER_BEGIN+ 8)
+#define STR_POOLCOLL_TOX_CNTNT3 (RC_POOLCOLL_REGISTER_BEGIN+ 9)
+#define STR_POOLCOLL_TOX_CNTNT4 (RC_POOLCOLL_REGISTER_BEGIN+ 10)
+#define STR_POOLCOLL_TOX_CNTNT5 (RC_POOLCOLL_REGISTER_BEGIN+ 11)
+
+ // Untergruppe Benutzer-Verzeichnisse:
+#define STR_POOLCOLL_TOX_USERH (RC_POOLCOLL_REGISTER_BEGIN+ 12)
+#define STR_POOLCOLL_TOX_USER1 (RC_POOLCOLL_REGISTER_BEGIN+ 13)
+#define STR_POOLCOLL_TOX_USER2 (RC_POOLCOLL_REGISTER_BEGIN+ 14)
+#define STR_POOLCOLL_TOX_USER3 (RC_POOLCOLL_REGISTER_BEGIN+ 15)
+#define STR_POOLCOLL_TOX_USER4 (RC_POOLCOLL_REGISTER_BEGIN+ 16)
+#define STR_POOLCOLL_TOX_USER5 (RC_POOLCOLL_REGISTER_BEGIN+ 17)
+
+ // Untergruppe Inhalts-Verzeichnisse mehr Ebenen 5 - 10
+#define STR_POOLCOLL_TOX_CNTNT6 (RC_POOLCOLL_REGISTER_BEGIN+ 18)
+#define STR_POOLCOLL_TOX_CNTNT7 (RC_POOLCOLL_REGISTER_BEGIN+ 19)
+#define STR_POOLCOLL_TOX_CNTNT8 (RC_POOLCOLL_REGISTER_BEGIN+ 20)
+#define STR_POOLCOLL_TOX_CNTNT9 (RC_POOLCOLL_REGISTER_BEGIN+ 21)
+#define STR_POOLCOLL_TOX_CNTNT10 (RC_POOLCOLL_REGISTER_BEGIN+ 22)
+
+// illustrations index
+#define STR_POOLCOLL_TOX_ILLUSH (RC_POOLCOLL_REGISTER_BEGIN+ 23)
+#define STR_POOLCOLL_TOX_ILLUS1 (RC_POOLCOLL_REGISTER_BEGIN+ 24)
+
+// object index
+#define STR_POOLCOLL_TOX_OBJECTH (RC_POOLCOLL_REGISTER_BEGIN+ 25)
+#define STR_POOLCOLL_TOX_OBJECT1 (RC_POOLCOLL_REGISTER_BEGIN+ 26)
+
+// tables index
+#define STR_POOLCOLL_TOX_TABLESH (RC_POOLCOLL_REGISTER_BEGIN+ 27)
+#define STR_POOLCOLL_TOX_TABLES1 (RC_POOLCOLL_REGISTER_BEGIN+ 28)
+
+// index of authorities
+#define STR_POOLCOLL_TOX_AUTHORITIESH (RC_POOLCOLL_REGISTER_BEGIN+ 29)
+#define STR_POOLCOLL_TOX_AUTHORITIES1 (RC_POOLCOLL_REGISTER_BEGIN+ 30)
+
+ // Untergruppe Benutzer-Verzeichnisse mehr Ebenen 5 - 10
+#define STR_POOLCOLL_TOX_USER6 (RC_POOLCOLL_REGISTER_BEGIN+ 31)
+#define STR_POOLCOLL_TOX_USER7 (RC_POOLCOLL_REGISTER_BEGIN+ 32)
+#define STR_POOLCOLL_TOX_USER8 (RC_POOLCOLL_REGISTER_BEGIN+ 33)
+#define STR_POOLCOLL_TOX_USER9 (RC_POOLCOLL_REGISTER_BEGIN+ 34)
+#define STR_POOLCOLL_TOX_USER10 (RC_POOLCOLL_REGISTER_BEGIN+ 35)
+
+
+// Gruppe Kapitel/Dokument
+#define STR_POOLCOLL_DOC_TITEL (RC_POOLCOLL_DOC_BEGIN+ 0)
+#define STR_POOLCOLL_DOC_SUBTITEL (RC_POOLCOLL_DOC_BEGIN+ 1)
+
+// Gruppe HTML-Vorlagen
+#define STR_POOLCOLL_HTML_BLOCKQUOTE (RC_POOLCOLL_HTML_BEGIN+ 0)
+#define STR_POOLCOLL_HTML_PRE (RC_POOLCOLL_HTML_BEGIN+ 1)
+#define STR_POOLCOLL_HTML_HR (RC_POOLCOLL_HTML_BEGIN+ 2)
+#define STR_POOLCOLL_HTML_DD (RC_POOLCOLL_HTML_BEGIN+ 3)
+#define STR_POOLCOLL_HTML_DT (RC_POOLCOLL_HTML_BEGIN+ 4)
+
+//-----------------
+// Page styles
+//-----------------
+#define STR_POOLPAGE_STANDARD (RC_POOLPAGEDESC_BEGIN+ 0)
+#define STR_POOLPAGE_FIRST (RC_POOLPAGEDESC_BEGIN+ 1)
+#define STR_POOLPAGE_LEFT (RC_POOLPAGEDESC_BEGIN+ 2)
+#define STR_POOLPAGE_RIGHT (RC_POOLPAGEDESC_BEGIN+ 3)
+#define STR_POOLPAGE_JAKET (RC_POOLPAGEDESC_BEGIN+ 4)
+#define STR_POOLPAGE_REGISTER (RC_POOLPAGEDESC_BEGIN+ 5)
+#define STR_POOLPAGE_HTML (RC_POOLPAGEDESC_BEGIN+ 6)
+#define STR_POOLPAGE_FOOTNOTE (RC_POOLPAGEDESC_BEGIN+ 7)
+#define STR_POOLPAGE_ENDNOTE (RC_POOLPAGEDESC_BEGIN+ 8)
+#define STR_POOLPAGE_LANDSCAPE (RC_POOLPAGEDESC_BEGIN+ 9)
+
+//-----------------
+// Numbering styles
+//-----------------
+#define STR_POOLNUMRULE_NUM1 (RC_POOLNUMRULE_BEGIN+ 0)
+#define STR_POOLNUMRULE_NUM2 (RC_POOLNUMRULE_BEGIN+ 1)
+#define STR_POOLNUMRULE_NUM3 (RC_POOLNUMRULE_BEGIN+ 2)
+#define STR_POOLNUMRULE_NUM4 (RC_POOLNUMRULE_BEGIN+ 3)
+#define STR_POOLNUMRULE_NUM5 (RC_POOLNUMRULE_BEGIN+ 4)
+#define STR_POOLNUMRULE_BUL1 (RC_POOLNUMRULE_BEGIN+ 5)
+#define STR_POOLNUMRULE_BUL2 (RC_POOLNUMRULE_BEGIN+ 6)
+#define STR_POOLNUMRULE_BUL3 (RC_POOLNUMRULE_BEGIN+ 7)
+#define STR_POOLNUMRULE_BUL4 (RC_POOLNUMRULE_BEGIN+ 8)
+#define STR_POOLNUMRULE_BUL5 (RC_POOLNUMRULE_BEGIN+ 9)
+
+//-----------------
+// Paragraph styles
+//-----------------
+#define STR_POOLPARSTYLE_HEAD1 (STR_POOLPARSTYLE_BEGIN+ 0)
+#define STR_POOLPARSTYLE_HEAD2 (STR_POOLPARSTYLE_BEGIN+ 1)
+#define STR_POOLPARSTYLE_HEAD3 (STR_POOLPARSTYLE_BEGIN+ 2)
+#define STR_POOLPARSTYLE_DEFAULT (STR_POOLPARSTYLE_BEGIN+ 3)
+#define STR_POOLPARSTYLE_TEXTBODY (STR_POOLPARSTYLE_BEGIN+ 4)
+
+#endif
diff --git a/sw/inc/poolfmt.hxx b/sw/inc/poolfmt.hxx
new file mode 100644
index 000000000000..7c4be27c76a7
--- /dev/null
+++ b/sw/inc/poolfmt.hxx
@@ -0,0 +1,443 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _POOLFMT_HXX
+#define _POOLFMT_HXX
+
+#include <limits.h>
+#include <tools/solar.h>
+#include <editeng/frmdir.hxx>
+
+// POOLCOLL-IDs:
+// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+// !User! Bereich ! 0 ! Offset !
+// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+//
+// Bereich: 1 - Text
+// 2 - Listen
+// 3 - Sonderbereiche
+// 4 - Verzeichnisse
+// 5 - Kapitel / Dokument
+// 6 - HTML-Vorlagen
+
+// Andere IDs:
+// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+// !User! Bereich ! 1 ! Offset !
+// +----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+// Bereich: 0 - Zeichenvorlagen
+// 1 - Frame-Vorlagen
+// 2 - Seitenvorlagen
+// 3 - Absatzformate (?)
+// 4 - Grafikformate (?)
+
+// Fr alle IDs gilt:
+// Herkunft: 0 -Pool
+// 1 -Benutzer
+// Offset: innerhalb der Gruppe
+
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+//
+// ACHTUNG: neue ID's koennen nur noch am Ende der jeweiligen Gruppe
+// zugefuegt werden. Diese Id's werden vom Reader/Writer ge-
+// lesen und geschrieben. Diese kennen nur den Offset zum Start
+//
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+// Maske fuer Erkennung von COLLPOOL-Ids:
+
+const USHORT POOLGRP_NOCOLLID = (1 << 10);
+
+// POLLCOLL-Gruppen:
+
+const USHORT USER_FMT = (1 << 15);
+const USHORT POOL_FMT = (0 << 15);
+
+const USHORT COLL_TEXT_BITS = (1 << 11);
+const USHORT COLL_LISTS_BITS = (2 << 11);
+const USHORT COLL_EXTRA_BITS = (3 << 11);
+const USHORT COLL_REGISTER_BITS = (4 << 11);
+const USHORT COLL_DOC_BITS = (5 << 11);
+const USHORT COLL_HTML_BITS = (6 << 11);
+const USHORT COLL_GET_RANGE_BITS = (15 << 11);
+
+// Sonstige Gruppen:
+
+const USHORT POOLGRP_CHARFMT = (0 << 11) + POOLGRP_NOCOLLID;
+const USHORT POOLGRP_FRAMEFMT = (1 << 11) + POOLGRP_NOCOLLID;
+const USHORT POOLGRP_PAGEDESC = (2 << 11) + POOLGRP_NOCOLLID;
+const USHORT POOLGRP_NUMRULE = (3 << 11) + POOLGRP_NOCOLLID;
+//const USHORT POOLGRP_GRFFMT = (4 << 11) + POOLGRP_NOCOLLID; // ?
+
+// fuer Erkennung ob Benutzer-Vorlage oder nicht:
+const USHORT POOL_IDUSER_FMT =
+ USHRT_MAX & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID);
+
+inline BOOL IsPoolUserFmt( USHORT nId )
+{
+ return POOL_IDUSER_FMT ==
+ (nId & ~(COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID))
+ ? TRUE : FALSE;
+}
+
+
+// ID-s fuer die Bereiche
+enum RES_POOLFMT
+{
+RES_POOLFMT_BEGIN = 1, // HIER GEHT'S LOS !!!
+RES_POOL_CHRFMT = RES_POOLFMT_BEGIN,
+RES_POOL_FRMFMT,
+RES_POOL_TXTCOLL,
+RES_POOL_PAGEFMT,
+
+RES_POOL_PARFMT, // ???
+RES_POOL_GRFFMT, // ???
+RES_POOLFMT_END
+};
+
+// Bereiche fuer die Id's der einzelnen Formate
+
+// die Id's fuer die Zeichen-Vorlagen
+enum RES_POOL_CHRFMT_TYPE
+{
+RES_POOLCHR_BEGIN = POOLGRP_CHARFMT,
+RES_POOLCHR_NORMAL_BEGIN = POOLGRP_CHARFMT,
+
+RES_POOLCHR_FOOTNOTE = RES_POOLCHR_NORMAL_BEGIN, // Fussnote
+RES_POOLCHR_PAGENO, // Seiten/Feld
+RES_POOLCHR_LABEL, // Beschriftung
+RES_POOLCHR_DROPCAPS, // Initialienzeichen
+RES_POOLCHR_NUM_LEVEL, // Nummerierungszeichen
+RES_POOLCHR_BUL_LEVEL, // Aufzaehlungszeichen
+
+RES_POOLCHR_INET_NORMAL, // Internet normal
+RES_POOLCHR_INET_VISIT, // Internet besucht
+RES_POOLCHR_JUMPEDIT, // Platzhalter
+RES_POOLCHR_TOXJUMP, // Sprung aus Verzeichnis
+RES_POOLCHR_ENDNOTE, // Endnote
+RES_POOLCHR_LINENUM, // Zeilennummerierung
+RES_POOLCHR_IDX_MAIN_ENTRY, // main entry in indexes
+RES_POOLCHR_FOOTNOTE_ANCHOR, // Fussnotenanker
+RES_POOLCHR_ENDNOTE_ANCHOR, // Endnotenanker
+RES_POOLCHR_RUBYTEXT, // Rubytext
+RES_POOLCHR_VERT_NUM, // Vertical numbering symbols
+
+RES_POOLCHR_NORMAL_END,
+
+RES_POOLCHR_HTML_BEGIN = RES_POOLCHR_BEGIN + 50, // HTML-Vorlagen
+RES_POOLCHR_HTML_EMPHASIS= RES_POOLCHR_HTML_BEGIN,
+RES_POOLCHR_HTML_CITIATION,
+RES_POOLCHR_HTML_STRONG,
+RES_POOLCHR_HTML_CODE,
+RES_POOLCHR_HTML_SAMPLE,
+RES_POOLCHR_HTML_KEYBOARD,
+RES_POOLCHR_HTML_VARIABLE,
+RES_POOLCHR_HTML_DEFINSTANCE,
+RES_POOLCHR_HTML_TELETYPE,
+RES_POOLCHR_HTML_END,
+
+RES_POOLCHR_END = RES_POOLCHR_HTML_END
+};
+
+
+// die Id's fuer die Rahmen-Vorlagen
+enum RES_POOL_FRMFMT_TYPE
+{
+RES_POOLFRM_BEGIN = POOLGRP_FRAMEFMT,
+
+RES_POOLFRM_FRAME = RES_POOLFRM_BEGIN, // Rahmen
+RES_POOLFRM_GRAPHIC, // Graphic
+RES_POOLFRM_OLE, // OLE
+RES_POOLFRM_FORMEL, // Formeln
+RES_POOLFRM_MARGINAL, // Marginalen
+RES_POOLFRM_WATERSIGN, // Wasserzeichen
+RES_POOLFRM_LABEL, // Etikette
+
+RES_POOLFRM_END
+};
+
+// die Id's fuer die Seiten-Vorlagen
+enum RES_POOL_PAGEFMT_TYPE
+{
+RES_POOLPAGE_BEGIN = POOLGRP_PAGEDESC,
+
+RES_POOLPAGE_STANDARD = RES_POOLPAGE_BEGIN, // Standard-Seite
+RES_POOLPAGE_FIRST, // Erste Seite
+RES_POOLPAGE_LEFT, // Linke Seite
+RES_POOLPAGE_RIGHT, // Rechte Seite
+RES_POOLPAGE_JAKET, // Umschlag
+RES_POOLPAGE_REGISTER, // Verzeichnis
+RES_POOLPAGE_HTML, // HTML
+RES_POOLPAGE_FOOTNOTE, // Fussnote bei Dokumentende
+RES_POOLPAGE_ENDNOTE, // Endnotensseite
+RES_POOLPAGE_LANDSCAPE, // Landscape Page Style
+
+RES_POOLPAGE_END
+};
+
+// die Id's fuer die NumRule-Vorlagen
+enum RES_POOL_NUMRULE_TYPE
+{
+RES_POOLNUMRULE_BEGIN = POOLGRP_NUMRULE,
+RES_POOLNUMRULE_NUM1 = RES_POOLNUMRULE_BEGIN, // NumRule Numerierung 1
+RES_POOLNUMRULE_NUM2, // NumRule Numerierung 2
+RES_POOLNUMRULE_NUM3, // NumRule Numerierung 3
+RES_POOLNUMRULE_NUM4, // NumRule Numerierung 4
+RES_POOLNUMRULE_NUM5, // NumRule Numerierung 5
+RES_POOLNUMRULE_BUL1, // NumRule Bullets 1
+RES_POOLNUMRULE_BUL2, // NumRule Bullets 2
+RES_POOLNUMRULE_BUL3, // NumRule Bullets 3
+RES_POOLNUMRULE_BUL4, // NumRule Bullets 4
+RES_POOLNUMRULE_BUL5, // NumRule Bullets 5
+RES_POOLNUMRULE_END
+};
+
+// die Id's fuer die Absatz-Vorlagen
+enum RES_POOL_COLLFMT_TYPE
+{
+// Gruppe Text
+RES_POOLCOLL_TEXT_BEGIN = COLL_TEXT_BITS,
+
+RES_POOLCOLL_STANDARD = RES_POOLCOLL_TEXT_BEGIN, // Standard
+RES_POOLCOLL_TEXT, // Textkoerper
+RES_POOLCOLL_TEXT_IDENT, // Textkoerper Einzug
+RES_POOLCOLL_TEXT_NEGIDENT, // Textkoerper neg. Einzug
+RES_POOLCOLL_TEXT_MOVE, // Textkoerper Einrueckung
+RES_POOLCOLL_GREETING, // Grussformel
+RES_POOLCOLL_SIGNATURE, // Unterschrift
+RES_POOLCOLL_CONFRONTATION, // Gegenueberstellung
+RES_POOLCOLL_MARGINAL, // Marginalie
+
+ // Untergruppierung Ueberschriften
+RES_POOLCOLL_HEADLINE_BASE, // Basis-Ueberschrift
+RES_POOLCOLL_HEADLINE1, // Ueberschrift 1
+RES_POOLCOLL_HEADLINE2, // Ueberschrift 2
+RES_POOLCOLL_HEADLINE3, // Ueberschrift 3
+RES_POOLCOLL_HEADLINE4, // Ueberschrift 4
+RES_POOLCOLL_HEADLINE5, // Ueberschrift 5
+RES_POOLCOLL_HEADLINE6, // Ueberschrift 6
+RES_POOLCOLL_HEADLINE7, // Ueberschrift 7
+RES_POOLCOLL_HEADLINE8, // Ueberschrift 8
+RES_POOLCOLL_HEADLINE9, // Ueberschrift 9
+RES_POOLCOLL_HEADLINE10, // Ueberschrift 10
+
+RES_POOLCOLL_TEXT_END,
+
+
+// Gruppe Listen
+RES_POOLCOLL_LISTS_BEGIN = COLL_LISTS_BITS,
+
+RES_POOLCOLL_NUMBUL_BASE = RES_POOLCOLL_LISTS_BEGIN, // Basis-Liste
+
+ // Untergruppe Nummerierung
+RES_POOLCOLL_NUM_LEVEL1S, // Start Level1
+RES_POOLCOLL_NUM_LEVEL1, // 1. Level
+RES_POOLCOLL_NUM_LEVEL1E, // Ende Level1
+RES_POOLCOLL_NUM_NONUM1, // keine Nummerierung
+RES_POOLCOLL_NUM_LEVEL2S, // Start 2. Level
+RES_POOLCOLL_NUM_LEVEL2, // 2. Level
+RES_POOLCOLL_NUM_LEVEL2E, // Ende 2. Level
+RES_POOLCOLL_NUM_NONUM2, // keine Nummerierung
+RES_POOLCOLL_NUM_LEVEL3S, // Start 3. Level
+RES_POOLCOLL_NUM_LEVEL3, // 3. Level
+RES_POOLCOLL_NUM_LEVEL3E, // Ende 3. Level
+RES_POOLCOLL_NUM_NONUM3, // keine Nummerierung
+RES_POOLCOLL_NUM_LEVEL4S, // Start 4. Level
+RES_POOLCOLL_NUM_LEVEL4, // 4. Level
+RES_POOLCOLL_NUM_LEVEL4E, // Ende 4. Level
+RES_POOLCOLL_NUM_NONUM4, // keine Nummerierung
+RES_POOLCOLL_NUM_LEVEL5S, // Start 5. Level
+RES_POOLCOLL_NUM_LEVEL5, // 5. Level
+RES_POOLCOLL_NUM_LEVEL5E, // Ende 5. Level
+RES_POOLCOLL_NUM_NONUM5, // keine Nummerierung
+
+ // Untergruppe Aufzaehlung
+RES_POOLCOLL_BUL_LEVEL1S, // Start Level1
+RES_POOLCOLL_BUL_LEVEL1, // 1. Level
+RES_POOLCOLL_BUL_LEVEL1E, // Ende Level1
+RES_POOLCOLL_BUL_NONUM1, // keine Nummerierung
+RES_POOLCOLL_BUL_LEVEL2S, // Start 2. Level
+RES_POOLCOLL_BUL_LEVEL2, // 2. Level
+RES_POOLCOLL_BUL_LEVEL2E, // Ende 2. Level
+RES_POOLCOLL_BUL_NONUM2, // keine Nummerierung
+RES_POOLCOLL_BUL_LEVEL3S, // Start 3. Level
+RES_POOLCOLL_BUL_LEVEL3, // 3. Level
+RES_POOLCOLL_BUL_LEVEL3E, // Ende 3. Level
+RES_POOLCOLL_BUL_NONUM3, // keine Nummerierung
+RES_POOLCOLL_BUL_LEVEL4S, // Start 4. Level
+RES_POOLCOLL_BUL_LEVEL4, // 4. Level
+RES_POOLCOLL_BUL_LEVEL4E, // Ende 4. Level
+RES_POOLCOLL_BUL_NONUM4, // keine Nummerierung
+RES_POOLCOLL_BUL_LEVEL5S, // Start 5. Level
+RES_POOLCOLL_BUL_LEVEL5, // 5. Level
+RES_POOLCOLL_BUL_LEVEL5E, // Ende 5. Level
+RES_POOLCOLL_BUL_NONUM5, // keine Nummerierung
+
+RES_POOLCOLL_LISTS_END,
+
+
+// Sonderbereiche
+RES_POOLCOLL_EXTRA_BEGIN = COLL_EXTRA_BITS,
+
+ // Untergruppe Header
+RES_POOLCOLL_HEADER = RES_POOLCOLL_EXTRA_BEGIN, // Header Left&Right
+RES_POOLCOLL_HEADERL, // Header Left
+RES_POOLCOLL_HEADERR, // Header Right
+
+ // Untergruppe Footer
+RES_POOLCOLL_FOOTER, // Footer Left&Right
+RES_POOLCOLL_FOOTERL, // Footer Left
+RES_POOLCOLL_FOOTERR, // Footer Right
+
+ // Untergruppe Tabelle
+RES_POOLCOLL_TABLE, // Tabelle "Inhalt"
+RES_POOLCOLL_TABLE_HDLN, // Tabellen-Headline
+
+
+ // Untergruppe Beschriftung
+RES_POOLCOLL_LABEL, // Beschriftung-Basis
+RES_POOLCOLL_LABEL_ABB, // Beschriftung-Abbildung
+RES_POOLCOLL_LABEL_TABLE, // Beschriftung-Tabelle
+RES_POOLCOLL_LABEL_FRAME, // Beschriftung-Rahmen
+
+ // sonstiges
+RES_POOLCOLL_FRAME, // Rahmen
+RES_POOLCOLL_FOOTNOTE, // Fussnoten
+RES_POOLCOLL_JAKETADRESS, // UmschlagAdresse
+RES_POOLCOLL_SENDADRESS, // AbsenderAdresse
+RES_POOLCOLL_ENDNOTE, // Endnoten
+
+RES_POOLCOLL_LABEL_DRAWING, // Beschriftung-Zeichen-Objekte
+RES_POOLCOLL_EXTRA_END,
+
+
+// Gruppe Verzeichnisse
+RES_POOLCOLL_REGISTER_BEGIN = COLL_REGISTER_BITS,
+
+RES_POOLCOLL_REGISTER_BASE = RES_POOLCOLL_REGISTER_BEGIN, // Basis-Verzeichnis
+
+ // Untergruppe Index-Verzeichnisse
+RES_POOLCOLL_TOX_IDXH, // Header
+RES_POOLCOLL_TOX_IDX1, // 1. Ebene
+RES_POOLCOLL_TOX_IDX2, // 2. Ebene
+RES_POOLCOLL_TOX_IDX3, // 3. Ebene
+RES_POOLCOLL_TOX_IDXBREAK, // Trenner
+
+ // Untergruppe Inhalts-Verzeichnisse
+RES_POOLCOLL_TOX_CNTNTH, // Header
+RES_POOLCOLL_TOX_CNTNT1, // 1. Ebene
+RES_POOLCOLL_TOX_CNTNT2, // 2. Ebene
+RES_POOLCOLL_TOX_CNTNT3, // 3. Ebene
+RES_POOLCOLL_TOX_CNTNT4, // 4. Ebene
+RES_POOLCOLL_TOX_CNTNT5, // 5. Ebene
+
+ // Untergruppe Benutzer-Verzeichnisse:
+RES_POOLCOLL_TOX_USERH, // Header
+RES_POOLCOLL_TOX_USER1, // 1. Ebene
+RES_POOLCOLL_TOX_USER2, // 2. Ebene
+RES_POOLCOLL_TOX_USER3, // 3. Ebene
+RES_POOLCOLL_TOX_USER4, // 4. Ebene
+RES_POOLCOLL_TOX_USER5, // 5. Ebene
+
+
+RES_POOLCOLL_TOX_CNTNT6, // Inhalt 6. Ebene
+RES_POOLCOLL_TOX_CNTNT7, // Inhalt 7. Ebene
+RES_POOLCOLL_TOX_CNTNT8, // Inhalt 8. Ebene
+RES_POOLCOLL_TOX_CNTNT9, // Inhalt 9. Ebene
+RES_POOLCOLL_TOX_CNTNT10, // Inhalt 10. Ebene
+
+// illustrations index
+RES_POOLCOLL_TOX_ILLUSH, // illustrations header
+RES_POOLCOLL_TOX_ILLUS1, // illustrations all levels
+
+// object index
+RES_POOLCOLL_TOX_OBJECTH, // objects header
+RES_POOLCOLL_TOX_OBJECT1, // objects all levels
+
+// tables index
+RES_POOLCOLL_TOX_TABLESH, // tables header
+RES_POOLCOLL_TOX_TABLES1, // tables all levels
+
+// index of authorities
+RES_POOLCOLL_TOX_AUTHORITIESH, // authorities header
+RES_POOLCOLL_TOX_AUTHORITIES1, // authorities all levels
+
+// user index 6..10
+RES_POOLCOLL_TOX_USER6, // level 6
+RES_POOLCOLL_TOX_USER7, // level 7
+RES_POOLCOLL_TOX_USER8, // level 8
+RES_POOLCOLL_TOX_USER9, // level 9
+RES_POOLCOLL_TOX_USER10, // level 10
+
+RES_POOLCOLL_REGISTER_END,
+
+
+// Gruppe Kapitel/Dokument
+RES_POOLCOLL_DOC_BEGIN = COLL_DOC_BITS,
+
+RES_POOLCOLL_DOC_TITEL = RES_POOLCOLL_DOC_BEGIN, // Doc. Titel
+RES_POOLCOLL_DOC_SUBTITEL, // Doc. UnterTitel
+
+RES_POOLCOLL_DOC_END,
+
+// Gruppe HTML-Vorlagen
+RES_POOLCOLL_HTML_BEGIN = COLL_HTML_BITS,
+
+RES_POOLCOLL_HTML_BLOCKQUOTE = RES_POOLCOLL_HTML_BEGIN,
+RES_POOLCOLL_HTML_PRE,
+RES_POOLCOLL_HTML_HR,
+RES_POOLCOLL_HTML_DD,
+RES_POOLCOLL_HTML_DT,
+
+RES_POOLCOLL_HTML_END
+
+// Ende der Textformat-Vorlagen Sammlung
+};
+
+
+
+// erfrage den definierten Parent zu einer POOL-Id
+// returnt: 0 -> Standard
+// USHRT_MAX -> kein Parent
+// sonst -> den Parent
+USHORT GetPoolParent( USHORT nId );
+
+SvxFrameDirection GetDefaultFrameDirection(ULONG nLanguage);
+
+inline BOOL IsConditionalByPoolId(USHORT nId)
+ {
+ return RES_POOLCOLL_TEXT == nId;
+ }
+// die Id's fuer die Grafik-Formate
+/*enum RES_POOL_GRFFMT_TYPE
+{
+RES_POOLGRF_BEGIN = RES_POOLPAR_END,
+RES_POOLGRF_1 = RES_POOLGRF_BEGIN,
+RES_POOLGRF_END
+};
+*/
+
+#endif
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
new file mode 100644
index 000000000000..31df018985c6
--- /dev/null
+++ b/sw/inc/postithelper.hxx
@@ -0,0 +1,159 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _POSTITHELPER_HXX
+#define _POSTITHELPER_HXX
+
+#include <swrect.hxx>
+#include <fmtfld.hxx>
+#include <redline.hxx>
+#include <vector>
+#include <vcl/window.hxx>
+#include <SidebarWindowsTypes.hxx>
+#include <svl/brdcst.hxx>
+
+class SwTxtFld;
+class SwRootFrm;
+class SwPostIt;
+class String;
+class SwPostItMgr;
+class SwEditWin;
+namespace sw { namespace sidebarwindows {
+ class SwSidebarWin;
+} }
+
+struct SwPosition;
+
+typedef sal_Int64 SwPostItBits;
+
+struct SwLayoutInfo
+{
+ const SwFrm* mpAnchorFrm;
+ SwRect mPosition;
+ SwRect mPageFrame;
+ SwRect mPagePrtArea;
+ unsigned long mnPageNumber;
+ sw::sidebarwindows::SidebarPosition meSidebarPosition;
+ USHORT mRedlineAuthor;
+
+ SwLayoutInfo()
+ : mpAnchorFrm(0)
+ , mPosition()
+ , mPageFrame()
+ , mPagePrtArea()
+ , mnPageNumber(1)
+ , meSidebarPosition(sw::sidebarwindows::SIDEBAR_NONE)
+ , mRedlineAuthor(0)
+ {}
+};
+
+namespace SwPostItHelper
+{
+ enum SwLayoutStatus
+ {
+ INVISIBLE, VISIBLE, INSERTED, DELETED, NONE, HIDDEN
+ };
+
+ SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwPosition& );
+ long getLayoutHeight( const SwRootFrm* pRoot );
+ void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode );
+ unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& );
+}
+
+class SwSidebarItem
+{
+public:
+ sw::sidebarwindows::SwSidebarWin* pPostIt;
+ bool bShow;
+ bool bFocus;
+
+ SwPostItHelper::SwLayoutStatus mLayoutStatus;
+ SwLayoutInfo maLayoutInfo;
+
+ SwSidebarItem( const bool aShow,
+ const bool aFocus)
+ : pPostIt(0)
+ , bShow(aShow)
+ , bFocus(aFocus)
+ , mLayoutStatus( SwPostItHelper::INVISIBLE )
+ , maLayoutInfo()
+ {}
+ virtual ~SwSidebarItem(){}
+ virtual SwPosition GetAnchorPosition() const = 0;
+ virtual bool UseElement() = 0;
+ virtual SwFmtFld* GetFmtFld() const = 0;
+ virtual SfxBroadcaster* GetBroadCaster() const = 0;
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits) = 0;
+};
+/*
+class SwRedCommentItem: public SwSidebarItem
+{
+private:
+ SwRedline* pRedline;
+public:
+
+ SwRedCommentItem( SwRedline* pRed, bool aShow, bool aFocus)
+ : SwSidebarItem(aShow,aFocus),
+ pRedline(pRed) {}
+ virtual ~SwRedCommentItem() {}
+ virtual SwPosition GetAnchorPosition() const;
+ virtual bool UseElement();
+ virtual SwFmtFld* GetFmtFld() const {return 0; }
+ virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pRedline); }
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits);
+};
+*/
+
+class SwAnnotationItem: public SwSidebarItem
+{
+ private:
+ SwFmtFld* pFmtFld;
+
+ public:
+ SwAnnotationItem( SwFmtFld* p,
+ const bool aShow,
+ const bool aFocus)
+ : SwSidebarItem( aShow, aFocus )
+ , pFmtFld(p)
+ {}
+ virtual ~SwAnnotationItem() {}
+ virtual SwPosition GetAnchorPosition() const;
+ virtual bool UseElement();
+ virtual SwFmtFld* GetFmtFld() const {return pFmtFld;}
+ virtual SfxBroadcaster* GetBroadCaster() const { return dynamic_cast<SfxBroadcaster *> (pFmtFld); }
+ virtual sw::sidebarwindows::SwSidebarWin* GetSidebarWindow( SwEditWin& rEditWin,
+ WinBits nBits,
+ SwPostItMgr& aMgr,
+ SwPostItBits aBits);
+};
+
+#endif // _POSTITHELPER_HXX
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
new file mode 100755
index 000000000000..f76ac65e747a
--- /dev/null
+++ b/sw/inc/printdata.hxx
@@ -0,0 +1,323 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_PRINTDATA_HXX
+#define _SW_PRINTDATA_HXX
+
+
+#include <sal/types.h>
+#include <rtl/ustring.hxx>
+#include <vcl/print.hxx>
+
+#include <set>
+#include <map>
+#include <vector>
+#include <utility>
+
+class SwPageFrm;
+class SwDoc;
+class SwDocShell;
+class ViewShell;
+class _SetGetExpFlds;
+class SwViewOption;
+class OutputDevice;
+class SwViewOptionAdjust_Impl;
+class SwPrtOptions;
+class SwWrtShell;
+class SfxViewShell;
+
+// forward declarations
+class SwPrintUIOptions;
+class SwRenderData;
+
+////////////////////////////////////////////////////////////
+
+
+class SwPrintData
+{
+ const SwPrintUIOptions * m_pPrintUIOptions; // not owner
+ const SwRenderData * m_pRenderData; // not owner
+
+public:
+
+ sal_Bool bPrintGraphic, bPrintTable, bPrintDraw, bPrintControl, bPrintPageBackground,
+ bPrintBlackFont,
+ //#i81434# - printing of hidden text
+ bPrintHiddenText, bPrintTextPlaceholder,
+ bPrintLeftPages, bPrintRightPages, bPrintReverse, bPrintProspect,
+ bPrintProspectRTL,
+ bPrintSingleJobs, bPaperFromSetup,
+ // --> FME 2005-12-13 #b6354161# Print empty pages
+ bPrintEmptyPages,
+ // <--
+ // #i56195# no field update while printing mail merge documents
+ bUpdateFieldsInPrinting,
+ bModified;
+
+ sal_Int16 nPrintPostIts;
+ rtl::OUString sFaxName;
+
+ SwPrintData()
+ {
+ m_pPrintUIOptions = NULL;
+ m_pRenderData = NULL;
+
+ bPrintGraphic =
+ bPrintTable =
+ bPrintDraw =
+ bPrintControl =
+ bPrintLeftPages =
+ bPrintRightPages =
+ bPrintPageBackground =
+ bPrintEmptyPages =
+ bUpdateFieldsInPrinting = sal_True;
+
+ bPaperFromSetup =
+ bPrintReverse =
+ bPrintProspect =
+ bPrintProspectRTL =
+ bPrintSingleJobs =
+ bModified =
+ bPrintBlackFont =
+ bPrintHiddenText =
+ bPrintTextPlaceholder = sal_False;
+
+ nPrintPostIts = 0;
+ }
+
+ virtual ~SwPrintData() {}
+
+ sal_Bool operator==(const SwPrintData& rData)const
+ {
+ return
+ bPrintGraphic == rData.bPrintGraphic &&
+ bPrintTable == rData.bPrintTable &&
+ bPrintDraw == rData.bPrintDraw &&
+ bPrintControl == rData.bPrintControl &&
+ bPrintPageBackground== rData.bPrintPageBackground &&
+ bPrintBlackFont == rData.bPrintBlackFont &&
+ bPrintLeftPages == rData.bPrintLeftPages &&
+ bPrintRightPages == rData.bPrintRightPages &&
+ bPrintReverse == rData.bPrintReverse &&
+ bPrintProspect == rData.bPrintProspect &&
+ bPrintProspectRTL == rData.bPrintProspectRTL &&
+ bPrintSingleJobs == rData.bPrintSingleJobs &&
+ bPaperFromSetup == rData.bPaperFromSetup &&
+ bPrintEmptyPages == rData.bPrintEmptyPages &&
+ bUpdateFieldsInPrinting == rData.bUpdateFieldsInPrinting &&
+ nPrintPostIts == rData.nPrintPostIts &&
+ sFaxName == rData.sFaxName &&
+ bPrintHiddenText == rData.bPrintHiddenText &&
+ bPrintTextPlaceholder == rData.bPrintTextPlaceholder;
+ }
+
+ // Note: in the context where this class ist used the pointers should always be valid
+ // during the lifetime of this object
+ const SwPrintUIOptions & GetPrintUIOptions() const { return *m_pPrintUIOptions; }
+ const SwRenderData & GetRenderData() const { return *m_pRenderData; }
+ void SetPrintUIOptions( const SwPrintUIOptions *pOpt ) { m_pPrintUIOptions = pOpt; }
+ void SetRenderData( const SwRenderData *pData ) { m_pRenderData = pData; }
+
+ sal_Bool IsPrintGraphic() const { return bPrintGraphic; }
+ sal_Bool IsPrintTable() const { return bPrintTable; }
+ sal_Bool IsPrintDraw() const { return bPrintDraw; }
+ sal_Bool IsPrintControl() const { return bPrintControl; }
+ sal_Bool IsPrintLeftPage() const { return bPrintLeftPages; }
+ sal_Bool IsPrintRightPage() const { return bPrintRightPages; }
+ sal_Bool IsPrintReverse() const { return bPrintReverse; }
+ sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; }
+ sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; }
+ sal_Bool IsPrintProspect() const { return bPrintProspect; }
+ sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; }
+ sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; }
+ sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; }
+ sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; }
+ sal_Int16 GetPrintPostIts() const { return nPrintPostIts; }
+ const rtl::OUString GetFaxName() const { return sFaxName; }
+ sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; }
+ sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; }
+
+ void SetPrintGraphic( sal_Bool b ) { doSetModified(); bPrintGraphic = b; }
+ void SetPrintTable( sal_Bool b ) { doSetModified(); bPrintTable = b; }
+ void SetPrintDraw( sal_Bool b ) { doSetModified(); bPrintDraw = b; }
+ void SetPrintControl( sal_Bool b ) { doSetModified(); bPrintControl = b; }
+ void SetPrintLeftPage( sal_Bool b ) { doSetModified(); bPrintLeftPages = b; }
+ void SetPrintRightPage( sal_Bool b ) { doSetModified(); bPrintRightPages = b; }
+ void SetPrintReverse( sal_Bool b ) { doSetModified(); bPrintReverse = b; }
+ void SetPaperFromSetup( sal_Bool b ) { doSetModified(); bPaperFromSetup = b; }
+ void SetPrintEmptyPages( sal_Bool b ) { doSetModified(); bPrintEmptyPages = b; }
+ void SetPrintPostIts( sal_Int16 n ) { doSetModified(); nPrintPostIts = n; }
+ void SetPrintProspect( sal_Bool b ) { doSetModified(); bPrintProspect = b; }
+ void SetPrintProspect_RTL( sal_Bool b ) { doSetModified(); bPrintProspectRTL = b; }
+ void SetPrintPageBackground( sal_Bool b ) { doSetModified(); bPrintPageBackground = b; }
+ void SetPrintBlackFont( sal_Bool b ) { doSetModified(); bPrintBlackFont = b; }
+ void SetPrintSingleJobs( sal_Bool b ) { doSetModified(); bPrintSingleJobs = b; }
+ void SetFaxName( const rtl::OUString& rSet ) { sFaxName = rSet; }
+ void SetPrintHiddenText( sal_Bool b ) { doSetModified(); bPrintHiddenText = b; }
+ void SetPrintTextPlaceholder( sal_Bool b ) { doSetModified(); bPrintTextPlaceholder = b; }
+
+ virtual void doSetModified () { bModified = sal_True;}
+};
+
+
+////////////////////////////////////////////////////////////
+
+
+class SwPrintUIOptions : public vcl::PrinterOptionsHelper
+{
+ OutputDevice* m_pLast;
+ const SwPrintData & m_rDefaultPrintData;
+
+public:
+ SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData );
+ virtual ~SwPrintUIOptions();
+
+ bool processPropertiesAndCheckFormat( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rNewProp );
+
+ bool IsPrintFormControls() const { return getBoolValue( "PrintControls", m_rDefaultPrintData.bPrintControl ); }
+ bool IsPrintPageBackground() const { return getBoolValue( "PrintPageBackground", m_rDefaultPrintData.bPrintPageBackground ); }
+ bool IsPrintProspect() const { return getBoolValue( "PrintProspect", m_rDefaultPrintData.bPrintProspect ); }
+ bool IsPrintProspectRTL() const { return getIntValue( "PrintProspectRTL", m_rDefaultPrintData.bPrintProspectRTL ) ? true : false; }
+ bool IsPrintTextPlaceholders() const { return getBoolValue( "PrintTextPlaceholder", m_rDefaultPrintData.bPrintTextPlaceholder ); }
+ bool IsPrintHiddenText() const { return getBoolValue( "PrintHiddenText", m_rDefaultPrintData.bPrintHiddenText ); }
+ bool IsPrintWithBlackTextColor() const { return getBoolValue( "PrintBlackFonts", m_rDefaultPrintData.bPrintBlackFont ); }
+ sal_Int16 GetPrintPostItsType() const { return static_cast< sal_Int16 >(getIntValue( "PrintAnnotationMode", m_rDefaultPrintData.nPrintPostIts )); }
+ bool IsPaperFromSetup() const { return getBoolValue( "PrintPaperFromSetup", m_rDefaultPrintData.bPaperFromSetup ); }
+ bool IsPrintReverse() const { return false; /*handled by print dialog now*/ /*getBoolValue( "PrintReversed", m_rDefaultPrintData.bPrintReverse );*/ }
+
+ bool IsPrintLeftPages() const;
+ bool IsPrintRightPages() const;
+ bool IsPrintEmptyPages( bool bIsPDFExport ) const;
+ bool IsPrintTables() const;
+ bool IsPrintGraphics() const;
+ bool IsPrintDrawings() const;
+};
+
+
+////////////////////////////////////////////////////////////
+
+// A class that stores temporary data that is needed for rendering the document.
+// Usually this data is created when 'getRendererCount' is called and
+// and it is used in the 'render' function of that same interface
+class SwRenderData
+{
+ // pages valid for printing (according to the current settings)
+ // and their respective start frames (see getRendererCount in unotxdoc.cxx)
+ // This set of pages does NOT depend on the 'PageRange' that is used as a printing option!
+ std::set< sal_Int32 > m_aValidPages; // the set of possible pages (see StringRangeEnumerator::getRangesFromString )
+ std::map< sal_Int32, const SwPageFrm * > m_aValidStartFrames; // the map of start frames for those pages
+
+ // printer paper tray to use for each of the m_aValidPages above
+ std::map< sal_Int32, sal_Int32 > m_aPrinterPaperTrays;
+
+ // vector of pages and their order to be printed (duplicates and any order allowed!)
+ // (see 'render' in unotxdoc.cxx)
+ std::vector< sal_Int32 > m_aPagesToPrint;
+
+ std::vector< const SwPageFrm * > m_aPostItStartFrames;
+
+ // for prospect printing: the pairs of pages to be printed together on a single prospect page.
+ // -1 indicates a half page to be left empty.
+ std::vector< std::pair< sal_Int32, sal_Int32 > > m_aPagePairs;
+
+ rtl::OUString m_aPageRange;
+
+ // the view options to be applied for printing
+ SwViewOptionAdjust_Impl * m_pViewOptionAdjust;
+
+ SwPrtOptions * m_pPrtOptions;
+
+public:
+
+ // PostIt relevant data
+ _SetGetExpFlds * m_pPostItFields; // an array of "_SetGetExpFld *" sorted by page and line numbers
+ SwDoc * m_pPostItDoc;
+ ViewShell * m_pPostItShell;
+
+public:
+ SwRenderData();
+ ~SwRenderData();
+
+
+ bool HasPostItData() const { return m_pPostItShell != 0 && m_pPostItDoc != 0 && m_pPostItShell != 0; }
+ void CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev );
+ void DeletePostItData();
+
+ bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; }
+ bool NeedNewViewOptionAdjust( const SwWrtShell& ) const;
+ void ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions );
+ void ViewOptionAdjust( const SwPrtOptions *pPrtOptions );
+ void ViewOptionAdjustStop();
+
+ bool HasSwPrtOptions() const { return m_pPrtOptions != 0; }
+ void SetSwPrtOptions( SwPrtOptions * pOpt ) { m_pPrtOptions = pOpt; }
+ const SwPrtOptions * GetSwPrtOptions() const { return m_pPrtOptions; }
+ SwPrtOptions & GetSwPrtOptionsRef() { return *m_pPrtOptions; }
+ void MakeSwPrtOptions( SwPrtOptions &rOptions, const SwDocShell *pDocShell,
+ const SwPrintUIOptions *pOpt, const SwRenderData *pData, bool bIsPDFExport );
+
+
+ typedef std::map< sal_Int32, const SwPageFrm * > ValidStartFramesMap_t;
+ typedef std::vector< std::pair< sal_Int32, sal_Int32 > > PagePairsVec_t;
+
+ std::set< sal_Int32 > & GetValidPagesSet() { return m_aValidPages; }
+ const std::set< sal_Int32 > & GetValidPagesSet() const { return m_aValidPages; }
+ ValidStartFramesMap_t & GetValidStartFrames() { return m_aValidStartFrames; }
+ const ValidStartFramesMap_t & GetValidStartFrames() const { return m_aValidStartFrames; }
+
+ // a map for printer paper tray numbers to use for each document page
+ // a value of -1 for the tray means that there is no specific tray defined
+ std::map< sal_Int32, sal_Int32 >& GetPrinterPaperTrays() { return m_aPrinterPaperTrays; }
+ const std::map< sal_Int32, sal_Int32 >& GetPrinterPaperTrays() const { return m_aPrinterPaperTrays; }
+
+ // used for 'normal' printing
+ // A page value of 0 as entry indicates that this page is not from the document but
+ // from the post-it document. (See also GetPostItStartFrame below)
+ std::vector< sal_Int32 > & GetPagesToPrint() { return m_aPagesToPrint; }
+ const std::vector< sal_Int32 > & GetPagesToPrint() const { return m_aPagesToPrint; }
+
+ // used for 'normal' printing with post-its
+ // - if the map entry will be NULL then the respective page to be printed is from
+ // the document. In that case use the value from GetPagesToPrint at the same index to
+ // get the phys. page number to be printed, and then retrieve the start frame to use
+ // from GetValidStartFrms.
+ // - If the entry is not NULL it is the start frame of the page from the post-it document
+ // that is to be printed
+ std::vector< const SwPageFrm * > & GetPostItStartFrames() { return m_aPostItStartFrames; }
+ const std::vector< const SwPageFrm * > & GetPostItStartFrames() const { return m_aPostItStartFrames; }
+
+ // used for prospect printing only
+ PagePairsVec_t & GetPagePairsForProspectPrinting() { return m_aPagePairs; }
+ const PagePairsVec_t & GetPagePairsForProspectPrinting() const { return m_aPagePairs; }
+
+ rtl::OUString GetPageRange() const { return m_aPageRange; }
+ void SetPageRange( const rtl::OUString &rRange ) { m_aPageRange = rRange; }
+};
+
+
+////////////////////////////////////////////////////////////
+
+#endif //_SW_PRINTDATA_HXX
diff --git a/sw/inc/pvprtdat.hxx b/sw/inc/pvprtdat.hxx
new file mode 100644
index 000000000000..7b23800cb206
--- /dev/null
+++ b/sw/inc/pvprtdat.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _PVPRTDAT_HXX
+#define _PVPRTDAT_HXX
+
+
+#include <tools/solar.h>
+
+class SwPagePreViewPrtData
+{
+ ULONG nLeftSpace, nRightSpace, nTopSpace, nBottomSpace,
+ nHorzSpace, nVertSpace;
+ BYTE nRow, nCol;
+ BOOL bLandscape : 1;
+ BOOL bStretch : 1;
+public:
+ SwPagePreViewPrtData()
+ : nLeftSpace(0), nRightSpace(0), nTopSpace(0), nBottomSpace(0),
+ nHorzSpace(0), nVertSpace(0), nRow(1), nCol(1),
+ bLandscape(0),bStretch(0)
+ {}
+
+ ULONG GetLeftSpace() const { return nLeftSpace; }
+ void SetLeftSpace( ULONG n ) { nLeftSpace = n; }
+
+ ULONG GetRightSpace() const { return nRightSpace; }
+ void SetRightSpace( ULONG n ) { nRightSpace = n; }
+
+ ULONG GetTopSpace() const { return nTopSpace; }
+ void SetTopSpace( ULONG n ) { nTopSpace = n; }
+
+ ULONG GetBottomSpace() const { return nBottomSpace; }
+ void SetBottomSpace( ULONG n ) { nBottomSpace = n; }
+
+ ULONG GetHorzSpace() const { return nHorzSpace; }
+ void SetHorzSpace( ULONG n ) { nHorzSpace = n; }
+
+ ULONG GetVertSpace() const { return nVertSpace; }
+ void SetVertSpace( ULONG n ) { nVertSpace = n; }
+
+ BYTE GetRow() const { return nRow; }
+ void SetRow(BYTE n ) { nRow = n; }
+
+ BYTE GetCol() const { return nCol; }
+ void SetCol( BYTE n ) { nCol = n; }
+
+ BOOL GetLandscape() const { return bLandscape; }
+ void SetLandscape( BOOL b ) { bLandscape = b; }
+};
+
+
+#endif
+
+
diff --git a/sw/inc/rcid.hrc b/sw/inc/rcid.hrc
new file mode 100644
index 000000000000..8a788933dc4e
--- /dev/null
+++ b/sw/inc/rcid.hrc
@@ -0,0 +1,271 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _RDIC_HRC
+#define _RDIC_HRC
+
+#ifndef _SFXSIDS_HRC //autogen
+#include <sfx2/sfxsids.hrc>
+#endif
+
+#define IMAGE_MASK_COLOR Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; }
+// ----------------------------------------------------------------
+// Bereiche fuer die UI-Verzeichnisse
+// ----------------------------------------------------------------
+
+#define RC_BASE RID_SW_START // aus solar.hrc
+
+#define RC_APP RC_BASE
+#define RC_DIALOG (RC_BASE + 200)
+#define RC_DOCVW (RC_BASE + 300)
+#define RC_WEB (RC_BASE + 400)
+#define RC_GLOBDOC (RC_BASE + 500)
+#define RC_VIEW (RC_BASE + 600)
+#define RC_CHRDLG (RC_BASE + 700)
+#define RC_RIBBAR (RC_BASE + 720)
+#define RC_GLOBALS (RC_BASE + 800)
+#define RC_FMTUI (RC_BASE + 920)
+#define RC_FRMDLG (RC_BASE + 1000)
+#define RC_FLDDLG (RC_BASE + 1100)
+#define RC_UTLUI (RC_BASE + 1250)
+#define RC_ATTR (RC_BASE + 1350)
+#define RC_TABLE (RC_BASE + 1450)
+#define RC_CONFIG (RC_BASE + 1550)
+#define RC_MISC (RC_BASE + 1650)
+#define RC_WRTSH (RC_BASE + 1750)
+#define RC_INDEX (RC_BASE + 1950)
+#define RC_DBUI (RC_BASE + 2050)
+#define RC_DOCHDL (RC_BASE + 2150)
+#define RC_POOLCHRFMT (RC_BASE + 2250)
+#define RC_POOLHTMLCHRFMT (RC_BASE + 2290)
+#define RC_POOLFRMFMT (RC_BASE + 2330)
+#define RC_POOLTXTCOLL (RC_BASE + 2360)
+#define RC_POOLPAGEDESC (RC_BASE + 2550)
+#define RC_POOLNUMRULE (RC_BASE + 2650)
+#define RC_ENVELP (RC_BASE + 2750)
+#define RC_STATLIN_STR (RC_BASE + 2850)
+#define RC_COMMON_CORE (RC_BASE + 2950)
+#define RC_WIZARD (RC_BASE + 3050)
+#define RC_POPUPS (RC_BASE + 3150)
+#define RC_SHELLS (RC_BASE + 3250)
+#define RC_CFGITEMS (RC_BASE + 3350)
+#define RC_LINGU (RC_BASE + 3450)
+#define RC_ACCESS (RC_BASE + 3550)
+#define STR_POOLPARSTYLE (RC_BASE + 3650)
+#define RC_UNDO (RC_BASE + 3750)
+#define RC_SMARTTAG (RC_BASE + 3950) // SMARTTAGS
+#define RC_UNOCORE (RC_BASE + 4050)
+#define RC_ANNOTATION (RC_BASE + 4150)
+
+/*--------------------------------------------------------------------
+ Beschreibung: Bereiche ausspannen
+ --------------------------------------------------------------------*/
+
+// App-Verzeichnis
+#define RC_APP_BEGIN RC_APP
+#define RC_APP_END (RC_APP_BEGIN + 199)
+
+// Dialog-Verzeichnis
+#define RC_DIALOG_BEGIN RC_DIALOG
+#define RC_DIALOG_END (RC_DIALOG_BEGIN + 99)
+
+// Editwin & Co
+#define RC_DOCVW_BEGIN RC_DOCVW
+#define RC_DOCVW_END (RC_DOCVW_BEGIN + 99)
+
+// Annotation
+#define RC_ANNOTATION_BEGIN RC_ANNOTATION
+#define RC_ANNOTATION_END (RC_ANNOTATION_BEGIN + 99)
+
+// SW/Web
+#define RC_WEB_BEGIN RC_WEB
+#define RC_WEB_END (RC_WEB_BEGIN + 199)
+
+//Globaldocument
+#define RC_GLOBDOC_BEGIN RC_GLOBDOC
+#define RC_GLOBDOC_END (RC_GLOBDOC_BEGIN + 99)
+
+// UI-View
+#define RC_VIEW_BEGIN RC_VIEW
+#define RC_VIEW_END (RC_VIEW_BEGIN + 99)
+
+// Zeichen Absatz Tab-Dialog
+#define RC_CHRDLG_BEGIN RC_CHRDLG
+#define RC_CHRDLG_END (RC_CHRDLG_BEGIN + 19)
+
+// Unsere Shell
+#define RC_WRTSH_BEGIN RC_WRTSH
+#define RC_WRTSH_END (RC_WRTSH_BEGIN + 49)
+
+// Verzeichnisse
+#define RC_INDEX_BEGIN RC_INDEX
+#define RC_INDEX_END (RC_INDEX + 99)
+
+//
+#define RC_RIBBAR_BEGIN RC_RIBBAR
+#define RC_RIBBAR_END (RC_RIBBAR_BEGIN + 79)
+
+// globale Ressourcen
+#define RC_GLOBALS_BEGIN RC_GLOBALS
+#define RC_GLOBALS_END (RC_GLOBALS_BEGIN + 119)
+
+// Format-Vorlagen
+#define RC_FMTUI_BEGIN RC_FMTUI
+#define RC_FMTUI_END (RC_FMTUI_BEGIN + 69)
+
+
+// Grafik Dialoge
+#define RC_GRFDLG_BEGIN RC_GRFDLG
+#define RC_GRFDLG_END (RC_GRFDLG_BEGIN + 99)
+
+// ????
+#define RC_FSTDLG_BEGIN RC_FSTDLG
+#define RC_FSTDLG_END (RC_FSTDLG_BEGIN + 99)
+
+// Rahmen Dialoge
+#define RC_FRMDLG_BEGIN RC_FRMDLG
+#define RC_FRMDLG_END (RC_FRMDLG_BEGIN + 99)
+
+// Feld Dialoge
+#define RC_FLDDLG_BEGIN RC_FLDDLG
+#define RC_FLDDLG_END (RC_FLDDLG_BEGIN + 149)
+
+// Utilities UI
+#define RC_UTLUI_BEGIN RC_UTLUI
+#define RC_UTLUI_END (RC_UTLUI + 99)
+
+// Utilities UI-Attribute
+#define RC_ATTR_BEGIN RC_ATTR
+#define RC_ATTR_END (RC_ATTR + 99)
+
+// Tabellen
+#define RC_TABLE_BEGIN RC_TABLE
+#define RC_TABLE_END (RC_TABLE + 99)
+
+// Konfiguration
+#define RC_CONFIG_BEGIN RC_CONFIG
+#define RC_CONFIG_END (RC_CONFIG + 99)
+
+
+// Verschiedenes
+#define RC_MISC_BEGIN RC_MISC
+#define RC_MISC_END (RC_MISC + 99)
+
+// DBMgr
+#define RC_DBUI_BEGIN RC_DBUI
+#define RC_DBUI_END (RC_DBUI + 99)
+
+// Der Rest der Imp-Klassen
+#define RC_DOCHDL_BEGIN RC_DOCHDL
+#define RC_DOCHDL_END (RC_DOCHDL + 99)
+
+// Zeichenvorlagen
+#define RC_POOLCHRFMT_BEGIN RC_POOLCHRFMT
+#define RC_POOLCHRFMT_END (RC_POOLCHRFMT + 29)
+#define RC_POOLCHRFMT_HTML_BEGIN RC_POOLHTMLCHRFMT
+#define RC_POOLCHRFMT_HTML_END (RC_POOLHTMLCHRFMT+ 30)
+
+
+// Rahmenvorlagen
+#define RC_POOLFRMFMT_BEGIN RC_POOLFRMFMT
+#define RC_POOLFRMFMT_END (RC_POOLFRMFMT + 20)
+
+// Collections
+#define RC_POOLTXTCOLL_BEGIN RC_POOLTXTCOLL
+
+#define RC_POOLCOLL_TEXT_BEGIN RC_POOLTXTCOLL
+#define RC_POOLCOLL_TEXT_END (RC_POOLTXTCOLL + 19)
+#define RC_POOLCOLL_LISTS_BEGIN (RC_POOLTXTCOLL + 20)
+#define RC_POOLCOLL_LISTS_END (RC_POOLTXTCOLL + 69)
+#define RC_POOLCOLL_EXTRA_BEGIN (RC_POOLTXTCOLL + 70)
+#define RC_POOLCOLL_EXTRA_END (RC_POOLTXTCOLL + 89)
+#define RC_POOLCOLL_REGISTER_BEGIN (RC_POOLTXTCOLL + 90)
+#define RC_POOLCOLL_REGISTER_END (RC_POOLTXTCOLL + 119)
+#define RC_POOLCOLL_DOC_BEGIN (RC_POOLTXTCOLL + 130)
+#define RC_POOLCOLL_DOC_END (RC_POOLTXTCOLL + 139)
+#define RC_POOLCOLL_HTML_BEGIN (RC_POOLTXTCOLL + 140)
+#define RC_POOLCOLL_HTML_END (RC_POOLTXTCOLL + 169)
+
+#define RC_POOLTXTCOLL_END RC_POOLCOLL_HTML_END
+
+// Poolvorlagen Seite
+#define RC_POOLPAGEDESC_BEGIN RC_POOLPAGEDESC
+#define RC_POOLPAGEDESC_END (RC_POOLPAGEDESC + 10)
+
+// Poolvorlagen Numerierung
+#define RC_POOLNUMRULE_BEGIN RC_POOLNUMRULE
+#define RC_POOLNUMRULE_END (RC_POOLNUMRULE + 10)
+
+// Pooltemplate Paragraph
+#define STR_POOLPARSTYLE_BEGIN STR_POOLPARSTYLE
+#define STR_POOLPARSTYLE_END (STR_POOLPARSTYLE + 9)
+
+// Envelp-Verzeichnis
+#define RC_ENVELP_BEGIN (RC_ENVELP )
+#define RC_ENVELP_END (RC_ENVELP + 99)
+
+// Statuszeile mit Laufbalken
+#define RC_STATLIN_STR_BEGIN (RC_STATLIN_STR)
+#define RC_STATLIN_STR_END (RC_STATLIN_STR + 49)
+
+// Gemeinsame Core-Strings
+#define RC_COMCORE_BEGIN (RC_COMMON_CORE)
+#define RC_COMCORE_END (RC_COMMON_CORE + 59)
+
+// Shell-Verzeichnis
+#define RC_SHELLS_BEGIN RC_SHELLS
+#define RC_SHELLS_END (RC_SHELLS + 99)
+
+// PopUpMenu's
+#define RC_POPUPS_BEGIN RC_POPUPS
+#define RC_POPUPS_END (RC_POPUPS + 99)
+
+// Strings fuer ConfigItems in div. Verzeichnissen
+#define RC_CFGITEMS_BEGIN RC_CFGITEMS
+#define RC_CFGITEMS_END (RC_CFGITEMS + 99)
+
+// Lingu
+#define RC_LINGU_BEGIN RC_LINGU
+#define RC_LINGU_END (RC_LINGU + 99)
+
+// Accessibility
+#define RC_ACCESS_BEGIN RC_ACCESS
+#define RC_ACCESS_END (RC_ACCESS + 99)
+
+// Undos
+#define RC_UNDO_BEGIN RC_UNDO
+#define RC_UNDO_END (RC_UNDO + 199)
+
+// SMARTTAGS
+// Smarttags
+#define RC_SMARTTAG_BEGIN RC_SMARTTAG
+#define RC_SMARTTAG_END (RC_SMARTTAG + 99)
+
+// unocore
+#define RC_UNOCORE_BEGIN RC_UNOCORE
+#define RC_UNOCORE_END (RC_UNOCORE + 10)
+
+#endif
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
new file mode 100644
index 000000000000..5d3dce538793
--- /dev/null
+++ b/sw/inc/redline.hxx
@@ -0,0 +1,314 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _REDLINE_HXX
+#define _REDLINE_HXX
+
+#include <tools/datetime.hxx>
+#include <tools/string.hxx>
+
+#define _SVSTDARR_USHORTS
+#include <svl/svstdarr.hxx>
+#include <pam.hxx>
+
+#include <IDocumentRedlineAccess.hxx>
+
+#include <svl/smplhint.hxx>
+
+class SfxItemSet;
+class SwView;
+
+class SwRedlineExtraData
+{
+ SwRedlineExtraData( const SwRedlineExtraData& );
+ SwRedlineExtraData& operator=( const SwRedlineExtraData& );
+
+protected:
+ SwRedlineExtraData() {}
+
+public:
+ virtual ~SwRedlineExtraData();
+ virtual SwRedlineExtraData* CreateNew() const = 0;
+
+ virtual void Accept( SwPaM& rPam ) const;
+ virtual void Reject( SwPaM& rPam ) const;
+ virtual int operator == ( const SwRedlineExtraData& ) const;
+};
+
+class SwRedlineExtraData_FmtColl : public SwRedlineExtraData
+{
+ String sFmtNm;
+ SfxItemSet* pSet;
+ USHORT nPoolId;
+public:
+ SwRedlineExtraData_FmtColl( const String& rColl, USHORT nPoolFmtId,
+ const SfxItemSet* pSet = 0 );
+ virtual ~SwRedlineExtraData_FmtColl();
+ virtual SwRedlineExtraData* CreateNew() const;
+ virtual void Reject( SwPaM& rPam ) const;
+ virtual int operator == ( const SwRedlineExtraData& ) const;
+
+ void SetItemSet( const SfxItemSet& rSet );
+};
+
+class SwRedlineExtraData_Format : public SwRedlineExtraData
+{
+ SvUShorts aWhichIds;
+
+ SwRedlineExtraData_Format( const SwRedlineExtraData_Format& rCpy );
+
+public:
+ SwRedlineExtraData_Format( const SfxItemSet& rSet );
+ virtual ~SwRedlineExtraData_Format();
+ virtual SwRedlineExtraData* CreateNew() const;
+ virtual void Reject( SwPaM& rPam ) const;
+ virtual int operator == ( const SwRedlineExtraData& ) const;
+};
+
+
+class SW_DLLPUBLIC SwRedlineData
+{
+ friend class SwRedline;
+ SwRedlineData* pNext; // Verweis auf weitere Daten
+ SwRedlineExtraData* pExtraData;
+
+ String sComment;
+ DateTime aStamp;
+ RedlineType_t eType;
+ USHORT nAuthor, nSeqNo;
+
+public:
+ SwRedlineData( RedlineType_t eT, USHORT nAut );
+ SwRedlineData( const SwRedlineData& rCpy, BOOL bCpyNext = TRUE );
+
+ // fuer sw3io: pNext/pExtraData gehen in eigenen Besitz ueber!
+ SwRedlineData( RedlineType_t eT, USHORT nAut, const DateTime& rDT,
+ const String& rCmnt, SwRedlineData* pNxt,
+ SwRedlineExtraData* pExtraData = 0 );
+
+ ~SwRedlineData();
+
+ int operator==( const SwRedlineData& rCmp ) const
+ {
+ return nAuthor == rCmp.nAuthor &&
+ eType == rCmp.eType &&
+ sComment == rCmp.sComment &&
+ (( !pNext && !rCmp.pNext ) ||
+ ( pNext && rCmp.pNext && *pNext == *rCmp.pNext )) &&
+ (( !pExtraData && !rCmp.pExtraData ) ||
+ ( pExtraData && rCmp.pExtraData &&
+ *pExtraData == *rCmp.pExtraData ));
+ }
+ int operator!=( const SwRedlineData& rCmp ) const
+ { return !operator==( rCmp ); }
+
+ RedlineType_t GetType() const
+ { return ((RedlineType_t)(eType & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); }
+ RedlineType_t GetRealType() const { return eType; }
+ USHORT GetAuthor() const { return nAuthor; }
+ const String& GetComment() const { return sComment; }
+ const DateTime& GetTimeStamp() const { return aStamp; }
+ inline const SwRedlineData* Next() const{ return pNext; }
+
+ void SetComment( const String& rS ) { sComment = rS; }
+ void SetTimeStamp( const DateTime& rDT ) { aStamp = rDT; }
+
+ void SetAutoFmtFlag()
+ { eType = (RedlineType_t)(eType | nsRedlineType_t::REDLINE_FORM_AUTOFMT); }
+ int CanCombine( const SwRedlineData& rCmp ) const
+ {
+ return nAuthor == rCmp.nAuthor &&
+ eType == rCmp.eType &&
+ sComment == rCmp.sComment &&
+ GetTimeStamp() == rCmp.GetTimeStamp() &&
+ (( !pNext && !rCmp.pNext ) ||
+ ( pNext && rCmp.pNext &&
+ pNext->CanCombine( *rCmp.pNext ))) &&
+ (( !pExtraData && !rCmp.pExtraData ) ||
+ ( pExtraData && rCmp.pExtraData &&
+ *pExtraData == *rCmp.pExtraData ));
+ }
+
+ // ExtraData wird kopiert, der Pointer geht also NICHT in den Besitz
+ // des RedlineObjectes!
+ void SetExtraData( const SwRedlineExtraData* pData );
+ const SwRedlineExtraData* GetExtraData() const { return pExtraData; }
+
+ // fuers UI-seitige zusammenfassen von Redline-Actionen. Wird z.Z. nur
+ // fuers Autoformat mit Redline benoetigt. Der Wert != 0 bedeutet dabei,
+ // das es noch weitere geben kann!
+ USHORT GetSeqNo() const { return nSeqNo; }
+ void SetSeqNo( USHORT nNo ) { nSeqNo = nNo; }
+
+ String GetDescr() const;
+};
+
+
+class SW_DLLPUBLIC SwRedline : public SwPaM
+{
+ SwRedlineData* pRedlineData;
+ SwNodeIndex* pCntntSect;
+ BOOL bDelLastPara : 1;
+ BOOL bIsLastParaDelete : 1;
+ BOOL bIsVisible : 1;
+
+ void MoveToSection();
+ void CopyToSection();
+ void DelCopyOfSection();
+ void MoveFromSection();
+
+public:
+ SwRedline( RedlineType_t eType, const SwPaM& rPam );
+ SwRedline( const SwRedlineData& rData, const SwPaM& rPam );
+ SwRedline( const SwRedlineData& rData, const SwPosition& rPos );
+ // fuer sw3io: pData geht in eigenen Besitz ueber!
+ SwRedline(SwRedlineData* pData, const SwPosition& rPos, BOOL bVsbl,
+ BOOL bDelLP, BOOL bIsPD) :
+ SwPaM( rPos ), pRedlineData( pData ), pCntntSect( 0 ),
+ bDelLastPara( bDelLP ), bIsLastParaDelete( bIsPD ), bIsVisible( bVsbl )
+ {}
+ SwRedline( const SwRedline& );
+ virtual ~SwRedline();
+
+ SwNodeIndex* GetContentIdx() const { return pCntntSect; }
+ // fuers Undo
+ void SetContentIdx( const SwNodeIndex* );
+
+ BOOL IsVisible() const { return bIsVisible; }
+ BOOL IsDelLastPara() const { return bDelLastPara; }
+
+ // das BOOL besagt, ob nach dem setzen der Pos kein Bereich mehr
+ // aufgespannt ist. -> TRUE, ansonten Bereich und FALSE
+ void SetStart( const SwPosition& rPos, SwPosition* pSttPtr = 0 )
+ {
+ if( !pSttPtr ) pSttPtr = Start();
+ *pSttPtr = rPos;
+ }
+ void SetEnd( const SwPosition& rPos, SwPosition* pEndPtr = 0 )
+ {
+ if( !pEndPtr ) pEndPtr = End();
+ *pEndPtr = rPos;
+ }
+ // liegt eine gueltige Selektion vor?
+ BOOL HasValidRange() const;
+
+ const SwRedlineData& GetRedlineData(USHORT nPos = 0) const;
+ int operator==( const SwRedlineData& rCmp ) const
+ { return *pRedlineData == rCmp; }
+ int operator!=( const SwRedlineData& rCmp ) const
+ { return *pRedlineData != rCmp; }
+ void SetAutoFmtFlag() { pRedlineData->SetAutoFmtFlag(); }
+
+ USHORT GetStackCount() const;
+ USHORT GetAuthor( USHORT nPos = 0) const;
+ const String& GetAuthorString( USHORT nPos = 0 ) const;
+ const DateTime& GetTimeStamp( USHORT nPos = 0) const;
+ RedlineType_t GetRealType( USHORT nPos = 0 ) const;
+ RedlineType_t GetType( USHORT nPos = 0) const
+ { return ( (RedlineType_t)(GetRealType( nPos ) & nsRedlineType_t::REDLINE_NO_FLAG_MASK)); }
+ const String& GetComment( USHORT nPos = 0 ) const;
+
+ void SetComment( const String& rS ) { pRedlineData->SetComment( rS ); }
+
+ // ExtraData wird kopiert, der Pointer geht also NICHT in den Besitz
+ // des RedlineObjectes!
+ void SetExtraData( const SwRedlineExtraData* pData )
+ { pRedlineData->SetExtraData( pData ); }
+ const SwRedlineExtraData* GetExtraData() const
+ { return pRedlineData->GetExtraData(); }
+
+ // fuers UI-seitige zusammenfassen von Redline-Actionen. Wird z.Z. nur
+ // fuers Autoformat mit Redline benoetigt. Der Wert != 0 bedeutet dabei,
+ // das es noch weitere geben kann!
+ USHORT GetSeqNo() const { return pRedlineData->GetSeqNo(); }
+ void SetSeqNo( USHORT nNo ) { pRedlineData->SetSeqNo( nNo ); }
+
+ // Beim Hide/ShowOriginal wird 2 mal ueber die Liste gelaufen, damit
+ // die Del-Redlines per Copy und Delete versteckt werden. Beim Move
+ // wird sonst die Attributierung falsch behandelt.
+ // Alle anderen Aufrufer muessen immer 0 angeben.
+ void CallDisplayFunc( USHORT nLoop = 0 );
+ void Show( USHORT nLoop = 0 );
+ void Hide( USHORT nLoop = 0 );
+ void ShowOriginal( USHORT nLoop = 0 );
+
+ // calculates the intersection with text node number nNdIdx
+ void CalcStartEnd( ULONG nNdIdx, USHORT& nStart, USHORT& nEnd ) const;
+
+ void InvalidateRange(); // das Layout anstossen
+
+ BOOL IsOwnRedline( const SwRedline& rRedl ) const
+ { return GetAuthor() == rRedl.GetAuthor(); }
+ BOOL CanCombine( const SwRedline& rRedl ) const;
+
+ void PushData( const SwRedline& rRedl, BOOL bOwnAsNext = TRUE );
+ BOOL PopData();
+
+ // #111827#
+ /**
+ Returns textual description of this a redline data element of
+ this redline.
+
+ @param nPos index of the redline data element to describe
+
+ The textual description of the selected element contains the
+ kind of redline and the possibly shortened text of the redline.
+
+ @return textual description of the selected redline data element
+ */
+ String GetDescr(USHORT nPos = 0);
+
+ int operator==( const SwRedline& ) const;
+ int operator<( const SwRedline& ) const;
+};
+
+class SW_DLLPUBLIC SwRedlineHint : public SfxHint
+{
+#define SWREDLINE_INSERTED 1
+#define SWREDLINE_REMOVED 2
+#define SWREDLINE_FOCUS 3
+#define SWREDLINE_CHANGED 4
+#define SWREDLINE_LANGUAGE 5
+
+ const SwRedline* pRedline;
+ sal_Int16 nWhich;
+ const SwView* pView;
+
+public:
+ SwRedlineHint( const SwRedline* p, sal_Int16 n, const SwView* pV = 0)
+ : pRedline(p)
+ , nWhich(n)
+ , pView(pV)
+ {}
+
+ TYPEINFO();
+ const SwRedline* GetRedline() const { return pRedline; }
+ sal_Int16 Which() const { return nWhich; }
+ const SwView* GetView() const { return pView; }
+};
+
+
+#endif
diff --git a/sw/inc/redlnaut.hxx b/sw/inc/redlnaut.hxx
new file mode 100644
index 000000000000..4290b3ec709c
--- /dev/null
+++ b/sw/inc/redlnaut.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _REDLNAUT_HXX
+#define _REDLNAUT_HXX
+
+#include <tools/string.hxx>
+#include <tools/color.hxx>
+
+#include "swtypes.hxx"
+
+class SfxItemSet;
+class SwAttrPool;
+
+class SwRedlineAuthor
+{
+ String sAuthor;
+ Color aChgLineColor;
+ SfxItemSet *pInsAttrSet, *pDelAttrSet, *pFmtAttrSet;
+ short eChgLineOrient;
+ BYTE cDelChar;
+public:
+ SwRedlineAuthor( SwAttrPool& rPool, const String& );
+ SwRedlineAuthor( const SwRedlineAuthor& );
+ ~SwRedlineAuthor();
+
+ SwRedlineAuthor& operator=( const SwRedlineAuthor& );
+};
+
+
+#endif
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
new file mode 100644
index 000000000000..b2b61dff6434
--- /dev/null
+++ b/sw/inc/reffld.hxx
@@ -0,0 +1,162 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _REFFLD_HXX
+#define _REFFLD_HXX
+
+#include <fldbas.hxx>
+
+class SfxPoolItem;
+class SwDoc;
+class SwTxtNode;
+class SwTxtFld;
+
+enum REFERENCESUBTYPE
+{
+ REF_SETREFATTR = 0,
+ REF_SEQUENCEFLD,
+ REF_BOOKMARK,
+ REF_OUTLINE,
+ REF_FOOTNOTE,
+ REF_ENDNOTE
+};
+
+enum REFERENCEMARK
+{
+ REF_BEGIN,
+ REF_PAGE = REF_BEGIN,
+ REF_CHAPTER,
+ REF_CONTENT,
+ REF_UPDOWN,
+ REF_PAGE_PGDESC,
+ REF_ONLYNUMBER,
+ REF_ONLYCAPTION,
+ REF_ONLYSEQNO,
+ // --> OD 2007-08-24 #i81002#
+ // new reference format types for referencing bookmarks and set references
+ REF_NUMBER,
+ REF_NUMBER_NO_CONTEXT,
+ REF_NUMBER_FULL_CONTEXT,
+ // <--
+ REF_END
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Referenz holen
+ --------------------------------------------------------------------*/
+
+class SwGetRefFieldType : public SwFieldType
+{
+ SwDoc* pDoc;
+public:
+ SwGetRefFieldType(SwDoc* pDoc );
+ virtual SwFieldType* Copy() const;
+
+ SwDoc* GetDoc() const { return pDoc; }
+ // ueberlagert, um alle Ref-Felder zu updaten
+ virtual void Modify( SfxPoolItem *, SfxPoolItem * );
+
+ void MergeWithOtherDoc( SwDoc& rDestDoc );
+
+ static SwTxtNode* FindAnchor( SwDoc* pDoc, const String& rRefMark,
+ USHORT nSubType, USHORT nSeqNo,
+ USHORT* pStt, USHORT* pEnd = 0 );
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung: Referenzfeld
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwGetRefField : public SwField
+{
+private:
+ String sSetRefName;
+ String sTxt;
+ USHORT nSubType;
+ USHORT nSeqNo;
+
+ // --> OD 2007-08-24 #i81002#
+ String MakeRefNumStr( const SwTxtNode& rTxtNodeOfField,
+ const SwTxtNode& rTxtNodeOfReferencedItem,
+ const sal_uInt32 nRefNumFormat ) const;
+ // <--
+public:
+ SwGetRefField( SwGetRefFieldType*, const String& rSetRef,
+ USHORT nSubType, USHORT nSeqNo, ULONG nFmt );
+
+ virtual ~SwGetRefField();
+
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+
+ const String& GetSetRefName() const { return sSetRefName; }
+
+ // --> OD 2007-09-06 #i81002#
+ // The <SwTxtFld> instance, which represents the text attribute for the
+ // <SwGetRefField> instance, has to be passed to the method.
+ // This <SwTxtFld> instance is needed for the reference format type REF_UPDOWN
+ // and REF_NUMBER.
+ // Note: This instance may be NULL (field in Undo/Redo). This will cause
+ // no update for these reference format types.
+ void UpdateField( const SwTxtFld* pFldTxtAttr );
+ // <--
+ void SetExpand( const String& rStr ) { sTxt = rStr; }
+
+ // SubType erfragen/setzen
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType( USHORT n );
+
+ // --> OD 2007-11-09 #i81002#
+ bool IsRefToHeadingCrossRefBookmark() const;
+ bool IsRefToNumItemCrossRefBookmark() const;
+ const SwTxtNode* GetReferencedTxtNode() const;
+ // <--
+ // --> OD 2008-01-09 #i85090#
+ String GetExpandedTxtOfReferencedTxtNode() const;
+ // <--
+
+ // SequenceNo erfragen/setzen (nur fuer REF_SEQUENCEFLD interressant)
+ USHORT GetSeqNo() const { return nSeqNo; }
+ void SetSeqNo( USHORT n ) { nSeqNo = n; }
+
+ // Name der Referenz
+ virtual const String& GetPar1() const;
+ virtual void SetPar1(const String& rStr);
+
+ virtual String GetPar2() const;
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+
+ void ConvertProgrammaticToUIName();
+
+ virtual String GetDescription() const;
+};
+
+
+#endif // _REFFLD_HXX
+
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx
new file mode 100644
index 000000000000..9bb171f7c256
--- /dev/null
+++ b/sw/inc/ring.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _RING_HXX
+#define _RING_HXX
+
+#include <swtypes.hxx>
+
+class Ring
+{
+ Ring *pNext;
+ Ring* pPrev; // zur Optimierung, damit das ein/ausketten schneller geht!
+
+protected:
+ Ring() { pNext = this; pPrev = this; }
+ Ring( Ring * );
+public:
+ virtual ~Ring();
+ void MoveTo( Ring *pDestRing );
+ void MoveRingTo( Ring *pDestRing );
+
+ Ring* GetNext() const { return pNext; }
+ Ring* GetPrev() const { return pPrev; }
+
+ sal_uInt32 numberOf() const;
+};
+
+
+#endif
diff --git a/sw/inc/rolbck.hxx b/sw/inc/rolbck.hxx
new file mode 100644
index 000000000000..e2aa129f65e1
--- /dev/null
+++ b/sw/inc/rolbck.hxx
@@ -0,0 +1,452 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _ROLBCK_HXX
+#define _ROLBCK_HXX
+
+#include <tools/solar.h>
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_USHORTS
+#define _SVSTDARR_USHORTSSORT
+#include <svl/svstdarr.hxx>
+#endif
+#include <svl/itemset.hxx>
+
+//Nur die History anziehen, um das docnew.cxx gegen die CLOOK's zu behaupten.
+
+namespace sfx2 {
+ class MetadatableUndo;
+}
+
+class SwDoc;
+class SwFmt;
+class SwFmtColl;
+class SwHistoryHint;
+class SwTxtAttr;
+class SfxPoolItem;
+class SwTxtNode;
+class SwUndoSaveSection;
+class SwTxtFtn;
+class SwTxtFlyCnt;
+class SwUndoDelLayFmt;
+class SwFlyFrmFmt;
+class SwFmtFld;
+class SwTxtFld;
+class SwFieldType;
+class SwTxtTOXMark;
+class SwTxtRefMark;
+class SwFrmFmt;
+class SwpHints;
+class SwFmtChain;
+class SwNode;
+class SwCharFmt;
+
+#ifndef ROLBCK_HISTORY_ONLY
+
+#include <tox.hxx>
+
+#include <SwNumberTreeTypes.hxx>
+// --> OD 2007-10-17 #i81002#
+#include <IDocumentMarkAccess.hxx>
+// <--
+
+#include <memory>
+
+
+enum HISTORY_HINT {
+ HSTRY_SETFMTHNT,
+ HSTRY_RESETFMTHNT,
+ HSTRY_SETTXTHNT,
+ HSTRY_SETTXTFLDHNT,
+ HSTRY_SETREFMARKHNT,
+ HSTRY_SETTOXMARKHNT,
+ HSTRY_RESETTXTHNT,
+ HSTRY_SETFTNHNT,
+ HSTRY_CHGFMTCOLL,
+ HSTRY_FLYCNT,
+ HSTRY_BOOKMARK,
+ HSTRY_SETATTRSET,
+ HSTRY_RESETATTRSET,
+ HSTRY_CHGFLYANCHOR,
+ HSTRY_CHGFLYCHAIN,
+ HSTRY_CHGCHARFMT, // #i27615#
+ HSTRY_END
+};
+
+class SwHistoryHint
+{
+ const HISTORY_HINT m_eWhichId;
+
+public:
+ SwHistoryHint( HISTORY_HINT eWhich ) : m_eWhichId( eWhich ) {}
+ virtual ~SwHistoryHint() {}
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) = 0;
+ HISTORY_HINT Which() const { return m_eWhichId; }
+ virtual String GetDescription() const;
+};
+
+class SwHistorySetFmt : public SwHistoryHint
+{
+ ::std::auto_ptr<SfxPoolItem> m_pAttr;
+ const ULONG m_nNodeIndex;
+
+public:
+ SwHistorySetFmt( const SfxPoolItem* pFmtHt, ULONG nNode );
+ virtual ~SwHistorySetFmt();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+ virtual String GetDescription() const;
+
+};
+
+class SwHistoryResetFmt : public SwHistoryHint
+{
+ const ULONG m_nNodeIndex;
+ const USHORT m_nWhich;
+
+public:
+ // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
+ SwHistoryResetFmt( const SfxPoolItem* pFmtHt, ULONG nNodeIdx );
+ // <--
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+};
+
+class SwHistorySetTxt : public SwHistoryHint
+{
+ ::std::auto_ptr<SfxPoolItem> m_pAttr;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+
+public:
+ SwHistorySetTxt( SwTxtAttr* pTxtHt, ULONG nNode );
+ virtual ~SwHistorySetTxt();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+};
+
+class SwHistorySetTxtFld : public SwHistoryHint
+{
+ //!! beware of the order for the declation of the auto_ptrs.
+ //!! If they get destroyed in the wrong order sw may crash (namely mail-merge as well)
+ ::std::auto_ptr<SwFieldType> m_pFldType;
+ const ::std::auto_ptr<SwFmtFld> m_pFld;
+
+ ULONG m_nNodeIndex;
+ xub_StrLen m_nPos;
+ USHORT m_nFldWhich;
+
+public:
+ SwHistorySetTxtFld( SwTxtFld* pTxtFld, ULONG nNode );
+ virtual ~SwHistorySetTxtFld();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ virtual String GetDescription() const;
+
+};
+
+class SwHistorySetRefMark : public SwHistoryHint
+{
+ const String m_RefName;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+
+public:
+ SwHistorySetRefMark( SwTxtRefMark* pTxtHt, ULONG nNode );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+};
+
+class SwHistorySetTOXMark : public SwHistoryHint
+{
+ SwTOXMark m_TOXMark;
+ const String m_TOXName;
+ const TOXTypes m_eTOXTypes;
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+
+public:
+ SwHistorySetTOXMark( SwTxtTOXMark* pTxtHt, ULONG nNode );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+ int IsEqual( const SwTOXMark& rCmp ) const;
+
+};
+
+class SwHistoryResetTxt : public SwHistoryHint
+{
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+ const USHORT m_nAttr;
+
+public:
+ SwHistoryResetTxt( USHORT nWhich, xub_StrLen nStt, xub_StrLen nEnd,
+ ULONG nNode );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ USHORT GetWhich() const { return m_nAttr; }
+ ULONG GetNode() const { return m_nNodeIndex; }
+ xub_StrLen GetCntnt() const { return m_nStart; }
+
+};
+
+class SwHistorySetFootnote : public SwHistoryHint
+{
+ const ::std::auto_ptr<SwUndoSaveSection> m_pUndo;
+ const String m_FootnoteNumber;
+ ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const bool m_bEndNote;
+
+public:
+ SwHistorySetFootnote( SwTxtFtn* pTxtFtn, ULONG nNode );
+ SwHistorySetFootnote( const SwTxtFtn& );
+ virtual ~SwHistorySetFootnote();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ virtual String GetDescription() const;
+
+};
+
+class SwHistoryChangeFmtColl : public SwHistoryHint
+{
+ SwFmtColl * const m_pColl;
+ const ULONG m_nNodeIndex;
+ const BYTE m_nNodeType;
+
+public:
+ SwHistoryChangeFmtColl( SwFmtColl* pColl, ULONG nNode, BYTE nNodeWhich );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+};
+
+class SwHistoryTxtFlyCnt : public SwHistoryHint
+{
+ ::std::auto_ptr<SwUndoDelLayFmt> m_pUndo;
+
+public:
+ SwHistoryTxtFlyCnt( SwFrmFmt* const pFlyFmt );
+ virtual ~SwHistoryTxtFlyCnt();
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+ SwUndoDelLayFmt* GetUDelLFmt() { return m_pUndo.get(); }
+
+};
+
+class SwHistoryBookmark : public SwHistoryHint
+{
+ public:
+ SwHistoryBookmark(const ::sw::mark::IMark& rBkmk,
+ bool bSavePos, bool bSaveOtherPos);
+ virtual void SetInDoc(SwDoc * pDoc, bool);
+
+ bool IsEqualBookmark(const ::sw::mark::IMark& rBkmk);
+ const ::rtl::OUString& GetName() const;
+
+
+ private:
+ const ::rtl::OUString m_aName;
+ ::rtl::OUString m_aShortName;
+ KeyCode m_aKeycode;
+ const ULONG m_nNode;
+ const ULONG m_nOtherNode;
+ const xub_StrLen m_nCntnt;
+ const xub_StrLen m_nOtherCntnt;
+ const bool m_bSavePos;
+ const bool m_bSaveOtherPos;
+ const bool m_bHadOtherPos;
+ const IDocumentMarkAccess::MarkType m_eBkmkType;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndo;
+};
+
+class SwHistorySetAttrSet : public SwHistoryHint
+{
+ SfxItemSet m_OldSet;
+ SvUShorts m_ResetArray;
+ const ULONG m_nNodeIndex;
+
+public:
+ SwHistorySetAttrSet( const SfxItemSet& rSet, ULONG nNode,
+ const SvUShortsSort& rSetArr );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+};
+
+
+class SwHistoryResetAttrSet : public SwHistoryHint
+{
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nStart;
+ const xub_StrLen m_nEnd;
+ SvUShorts m_Array;
+
+public:
+ SwHistoryResetAttrSet( const SfxItemSet& rSet, ULONG nNode,
+ xub_StrLen nStt = STRING_MAXLEN,
+ xub_StrLen nEnd = STRING_MAXLEN );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+ const SvUShorts& GetArr() const { return m_Array; }
+ ULONG GetNode() const { return m_nNodeIndex; }
+ xub_StrLen GetCntnt() const { return m_nStart; }
+
+};
+
+class SwHistoryChangeFlyAnchor : public SwHistoryHint
+{
+ SwFrmFmt & m_rFmt;
+ const ULONG m_nOldNodeIndex;
+ const xub_StrLen m_nOldContentIndex;
+
+public:
+ SwHistoryChangeFlyAnchor( SwFrmFmt& rFmt );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+};
+
+class SwHistoryChangeFlyChain : public SwHistoryHint
+{
+ SwFlyFrmFmt * const m_pPrevFmt;
+ SwFlyFrmFmt * const m_pNextFmt;
+ SwFlyFrmFmt * const m_pFlyFmt;
+
+public:
+ SwHistoryChangeFlyChain( SwFlyFrmFmt& rFmt, const SwFmtChain& rAttr );
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+};
+
+// #i27615#
+class SwHistoryChangeCharFmt : public SwHistoryHint
+{
+ const SfxItemSet m_OldSet;
+ const String m_Fmt;
+
+public:
+ SwHistoryChangeCharFmt( const SfxItemSet& rSet, const String & sFmt);
+ virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet );
+
+};
+
+
+#endif
+
+typedef SwHistoryHint* SwHistoryHintPtr;
+SV_DECL_PTRARR_DEL( SwpHstry, SwHistoryHintPtr, 0, 2 )
+
+class SwHistory
+{
+ friend class SwDoc; // actually only SwDoc::DelUndoObj may access
+ friend class SwUndoWriter; // for Undo/Redo Writer
+ friend class SwRegHistory; // for inserting History attributes
+
+ SwpHstry m_SwpHstry;
+ USHORT m_nEndDiff;
+
+public:
+ SwHistory( USHORT nInitSz = 0, USHORT nGrowSz = 2 );
+ ~SwHistory();
+
+ // delete History from nStart to array end
+ void Delete( USHORT nStart = 0 );
+ // call and delete all objects between nStart and array end
+ bool Rollback( SwDoc* pDoc, USHORT nStart = 0 );
+ // call all objects between nStart and TmpEnd; store nStart as TmpEnd
+ bool TmpRollback( SwDoc* pDoc, USHORT nStart, bool ToFirst = true );
+
+ // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
+ void Add( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue,
+ ULONG nNodeIdx );
+ // <--
+ void Add( SwTxtAttr* pTxtHt, ULONG nNodeIdx, bool bNewAttr = true );
+ void Add( SwFmtColl*, ULONG nNodeIdx, BYTE nWhichNd );
+ void Add( const ::sw::mark::IMark&, bool bSavePos, bool bSaveOtherPos );
+ void Add( SwFrmFmt& rFmt );
+ void Add( SwFlyFrmFmt&, USHORT& rSetPos );
+ void Add( const SwTxtFtn& );
+ void Add( const SfxItemSet & rSet, const SwCharFmt & rCharFmt); // #i27615#
+
+ USHORT Count() const { return m_SwpHstry.Count(); }
+ USHORT GetTmpEnd() const { return m_SwpHstry.Count() - m_nEndDiff; }
+ USHORT SetTmpEnd( USHORT nTmpEnd ); // return previous value
+ SwHistoryHint * operator[]( USHORT nPos ) { return m_SwpHstry[nPos]; }
+ SwHistoryHint const* operator[]( USHORT nPos ) const
+ { return m_SwpHstry[nPos]; }
+
+ // for SwUndoDelete::Undo/Redo
+ void Move( USHORT nPos, SwHistory *pIns,
+ USHORT nStart = 0, USHORT nEnd = USHRT_MAX )
+ {
+ m_SwpHstry.Insert( &pIns->m_SwpHstry, nPos, nStart, nEnd );
+ pIns->m_SwpHstry.Remove( nStart, (nEnd == USHRT_MAX)
+ ? pIns->Count() - nStart
+ : nEnd );
+ }
+
+ // helper methods for recording attribute in History
+ // used by Undo classes (Delete/Overwrite/Inserts)
+ void CopyAttr( SwpHints* pHts, ULONG nNodeIdx, xub_StrLen nStart,
+ xub_StrLen nEnd, bool bFields );
+ // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
+ void CopyFmtAttr( const SfxItemSet& rSet, ULONG nNodeIdx );
+ // <--
+};
+
+#ifndef ROLBCK_HISTORY_ONLY
+
+class SwRegHistory : public SwClient
+{
+private:
+ SvUShortsSort m_WhichIdSet;
+ SwHistory * const m_pHistory;
+ ULONG m_nNodeIndex;
+
+ void _MakeSetWhichIds();
+
+public:
+ // --> OD 2008-02-27 #refactorlists# - removed <rDoc>
+ SwRegHistory( SwHistory* pHst );
+ // <--
+ SwRegHistory( const SwNode& rNd, SwHistory* pHst );
+ SwRegHistory( SwModify* pRegIn, const SwNode& rNd, SwHistory* pHst );
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ /// @return true iff at least 1 item was inserted
+ bool InsertItems( const SfxItemSet& rSet,
+ xub_StrLen const nStart, xub_StrLen const nEnd,
+ SetAttrMode const nFlags );
+
+ void AddHint( SwTxtAttr* pHt, const bool bNew = false );
+
+ void RegisterInModify( SwModify* pRegIn, const SwNode& rNd );
+ void ChangeNodeIndex( ULONG nNew ) { m_nNodeIndex = nNew; }
+};
+
+#endif
+
+
+#endif // _ROLBCK_HXX
+
diff --git a/sw/inc/rubylist.hxx b/sw/inc/rubylist.hxx
new file mode 100644
index 000000000000..7ade01996237
--- /dev/null
+++ b/sw/inc/rubylist.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _RUBYLIST_HXX
+#define _RUBYLIST_HXX
+
+#include <svl/svarray.hxx>
+#include <swtypes.hxx>
+#include <fmtruby.hxx>
+
+class SwRubyListEntry
+{
+ String sText;
+ SwFmtRuby aRubyAttr;
+public:
+ SwRubyListEntry() : aRubyAttr( aEmptyStr ) {}
+ ~SwRubyListEntry();
+
+ const String& GetText() const { return sText; }
+ void SetText( const String& rStr ) { sText = rStr; }
+
+ const SwFmtRuby& GetRubyAttr() const { return aRubyAttr; }
+ SwFmtRuby& GetRubyAttr() { return aRubyAttr; }
+ void SetRubyAttr( const SwFmtRuby& rAttr ) { aRubyAttr = rAttr; }
+};
+
+typedef SwRubyListEntry* SwRubyListEntryPtr;
+SV_DECL_PTRARR_DEL( SwRubyList, SwRubyListEntryPtr, 0, 32 )
+
+
+#endif //_RUBYLIST_HXX
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
new file mode 100644
index 000000000000..db99cfdf4d52
--- /dev/null
+++ b/sw/inc/section.hxx
@@ -0,0 +1,389 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SECTION_HXX
+#define _SECTION_HXX
+
+#include <boost/utility.hpp>
+
+#include <com/sun/star/uno/Sequence.h>
+
+#include <tools/rtti.hxx>
+#include <tools/ref.hxx>
+#include <svl/svarray.hxx>
+#include <sfx2/lnkbase.hxx>
+#include <sfx2/Metadatable.hxx>
+
+#include <frmfmt.hxx>
+
+
+namespace com { namespace sun { namespace star {
+ namespace text { class XTextSection; }
+} } }
+
+// Forward Deklaration
+class SwSectionFmt;
+class SwDoc;
+class SwSection;
+class SwSectionNode;
+class SwTOXBase;
+
+#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
+#define SW_DECL_SWSERVEROBJECT_DEFINED
+SV_DECL_REF( SwServerObject )
+#endif
+
+SV_DECL_PTRARR( SwSections, SwSection*, 0, 4 )
+
+enum SectionType { CONTENT_SECTION,
+ TOX_HEADER_SECTION,
+ TOX_CONTENT_SECTION,
+ DDE_LINK_SECTION = OBJECT_CLIENT_DDE,
+ FILE_LINK_SECTION = OBJECT_CLIENT_FILE
+/*
+// verbleiben noch:
+ OBJECT_CLIENT_SO = 0x80,
+ OBJECT_CLIENT_OLE = 0x82,
+ OBJECT_CLIENT_OLE_CACHE = 0x83,
+*/
+ };
+
+enum LinkCreateType
+{
+ CREATE_NONE, // nichts weiter tun
+ CREATE_CONNECT, // Link gleich connecten
+ CREATE_UPDATE // Link connecten und updaten
+};
+
+class SW_DLLPUBLIC SwSectionData
+{
+private:
+ SectionType m_eType;
+
+ String m_sSectionName;
+ String m_sCondition;
+ String m_sLinkFileName;
+ String m_sLinkFilePassword; // JP 27.02.2001: must be changed to Sequence
+ ::com::sun::star::uno::Sequence <sal_Int8> m_Password;
+
+ /// it seems this flag caches the current final "hidden" state
+ bool m_bHiddenFlag : 1;
+ /// flags that correspond to attributes in the format:
+ /// may have different value than format attribute:
+ /// format attr has value for this section, while flag is
+ /// effectively ORed with parent sections!
+ bool m_bProtectFlag : 1;
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ bool m_bEditInReadonlyFlag : 1;
+ // <--
+ bool m_bHidden : 1; // all paragraphs hidden?
+ bool m_bCondHiddenFlag : 1; // Hiddenflag for condition
+ bool m_bConnectFlag : 1; // connected to server?
+
+public:
+
+ SwSectionData(SectionType const eType, String const& rName);
+ explicit SwSectionData(SwSection const&);
+ SwSectionData(SwSectionData const&);
+ SwSectionData & operator=(SwSectionData const&);
+ bool operator==(SwSectionData const&) const;
+
+ String const& GetSectionName() const { return m_sSectionName; }
+ void SetSectionName(String const& rName){ m_sSectionName = rName; }
+ SectionType GetType() const { return m_eType; }
+ void SetType(SectionType const eNew) { m_eType = eNew; }
+
+ bool IsHidden() const { return m_bHidden; }
+ void SetHidden(bool const bFlag = true) { m_bHidden = bFlag; }
+
+ bool IsHiddenFlag() const { return m_bHiddenFlag; }
+ SW_DLLPRIVATE void
+ SetHiddenFlag(bool const bFlag) { m_bHiddenFlag = bFlag; }
+ bool IsProtectFlag() const { return m_bProtectFlag; }
+ SW_DLLPRIVATE void
+ SetProtectFlag(bool const bFlag) { m_bProtectFlag = bFlag; }
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ bool IsEditInReadonlyFlag() const { return m_bEditInReadonlyFlag; }
+ void SetEditInReadonlyFlag(bool const bFlag)
+ { m_bEditInReadonlyFlag = bFlag; }
+ // <--
+
+ void SetCondHidden(bool const bFlag = true) { m_bCondHiddenFlag = bFlag; };
+ bool IsCondHidden() const { return m_bCondHiddenFlag; }
+
+ String const& GetCondition() const { return m_sCondition; }
+ void SetCondition(String const& rNew) { m_sCondition = rNew; }
+
+ String const& GetLinkFileName() const { return m_sLinkFileName; };
+ void SetLinkFileName(String const& rNew, String const* pPassWd = 0)
+ {
+ m_sLinkFileName = rNew;
+ if (pPassWd) { SetLinkFilePassword(*pPassWd); }
+ }
+
+ String const& GetLinkFilePassword() const { return m_sLinkFilePassword; }
+ void SetLinkFilePassword(String const& rS) { m_sLinkFilePassword = rS; }
+
+ ::com::sun::star::uno::Sequence<sal_Int8> const& GetPassword() const
+ { return m_Password; }
+ void SetPassword(::com::sun::star::uno::Sequence<sal_Int8> const& rNew)
+ { m_Password = rNew; }
+ bool IsLinkType() const
+ { return (DDE_LINK_SECTION == m_eType) || (FILE_LINK_SECTION == m_eType); }
+
+ bool IsConnectFlag() const { return m_bConnectFlag; }
+ void SetConnectFlag(bool const bFlag = true){ m_bConnectFlag = bFlag; }
+};
+
+class SW_DLLPUBLIC SwSection
+ : public SwClient
+ , private ::boost::noncopyable
+{
+ // damit beim Anlegen/Loeschen von Frames das Flag richtig gepflegt wird!
+ friend class SwSectionNode;
+ // the "read CTOR" of SwSectionFrm have to change the Hiddenflag
+ friend class SwSectionFrm;
+
+private:
+ SwSectionData m_Data;
+
+ SwServerObjectRef m_RefObj; // set if DataServer
+ ::sfx2::SvBaseLinkRef m_RefLink;
+
+ SW_DLLPRIVATE void ImplSetHiddenFlag(
+ bool const bHidden, bool const bCondition);
+
+public:
+ TYPEINFO(); // rtti
+
+ SwSection(SectionType const eType, String const& rName,
+ SwSectionFmt & rFormat);
+ virtual ~SwSection();
+
+ bool DataEquals(SwSectionData const& rCmp) const;
+
+ void SetSectionData(SwSectionData const& rData);
+
+ String const& GetSectionName() const { return m_Data.GetSectionName(); }
+ void SetSectionName(String const& rName){ m_Data.SetSectionName(rName); }
+ SectionType GetType() const { return m_Data.GetType(); }
+ void SetType(SectionType const eType) { return m_Data.SetType(eType); }
+
+ SwSectionFmt* GetFmt() { return (SwSectionFmt*)pRegisteredIn; }
+ SwSectionFmt* GetFmt() const { return (SwSectionFmt*)pRegisteredIn; }
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ // setze die Hidden/Protected -> gesamten Baum updaten !
+ // (Attribute/Flags werden gesetzt/erfragt)
+ bool IsHidden() const { return m_Data.IsHidden(); }
+ void SetHidden (bool const bFlag = true);
+ bool IsProtect() const;
+ void SetProtect(bool const bFlag = true);
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ bool IsEditInReadonly() const;
+ void SetEditInReadonly(bool const bFlag = true);
+ // <--
+
+ // erfrage die internen Flags (Zustand inklusive Parents nicht, was
+ // aktuell an der Section gesetzt ist!!)
+ bool IsHiddenFlag() const { return m_Data.IsHiddenFlag(); }
+ bool IsProtectFlag() const { return m_Data.IsProtectFlag(); }
+ // --> FME 2004-06-22 #114856# edit in readonly sections
+ bool IsEditInReadonlyFlag() const { return m_Data.IsEditInReadonlyFlag(); }
+ // <--
+
+ void SetCondHidden(bool const bFlag = true);
+ bool IsCondHidden() const { return m_Data.IsCondHidden(); }
+ // erfrage (auch ueber die Parents), ob diese Section versteckt sein soll.
+ BOOL CalcHiddenFlag() const;
+
+
+ inline SwSection* GetParent() const;
+
+ String const& GetCondition() const { return m_Data.GetCondition(); }
+ void SetCondition(String const& rNew) { m_Data.SetCondition(rNew); }
+
+ const String& GetLinkFileName() const;
+ void SetLinkFileName(String const& rNew, String const*const pPassWd = 0);
+ // password of linked file (only valid during runtime!)
+ String const& GetLinkFilePassword() const
+ { return m_Data.GetLinkFilePassword(); }
+ void SetLinkFilePassword(String const& rS)
+ { m_Data.SetLinkFilePassword(rS); }
+
+ // get / set password of this section
+ ::com::sun::star::uno::Sequence<sal_Int8> const& GetPassword() const
+ { return m_Data.GetPassword(); }
+ void SetPassword(::com::sun::star::uno::Sequence <sal_Int8> const& rNew)
+ { m_Data.SetPassword(rNew); }
+
+ // Daten Server-Methoden
+ void SetRefObject( SwServerObject* pObj );
+ const SwServerObject* GetObject() const { return & m_RefObj; }
+ SwServerObject* GetObject() { return & m_RefObj; }
+ bool IsServer() const { return m_RefObj.Is(); }
+
+ // Methoden fuer gelinkte Bereiche
+ USHORT GetUpdateType() const { return m_RefLink->GetUpdateMode(); }
+ void SetUpdateType(USHORT const nType )
+ { m_RefLink->SetUpdateMode(nType); }
+
+ bool IsConnected() const { return m_RefLink.Is(); }
+ void UpdateNow() { m_RefLink->Update(); }
+ void Disconnect() { m_RefLink->Disconnect(); }
+
+ const ::sfx2::SvBaseLink& GetBaseLink() const { return *m_RefLink; }
+ ::sfx2::SvBaseLink& GetBaseLink() { return *m_RefLink; }
+
+ void CreateLink( LinkCreateType eType );
+
+ void MakeChildLinksVisible( const SwSectionNode& rSectNd );
+
+ bool IsLinkType() const { return m_Data.IsLinkType(); }
+
+ // Flags fuer UI - Verbindung geklappt?
+ bool IsConnectFlag() const { return m_Data.IsConnectFlag(); }
+ void SetConnectFlag(bool const bFlag = true)
+ { m_Data.SetConnectFlag(bFlag); }
+
+ // return the TOX base class if the section is a TOX section
+ const SwTOXBase* GetTOXBase() const;
+
+ // --> OD 2007-02-14 #b6521322#
+ void BreakLink();
+ // <--
+
+};
+
+
+enum SectionSort { SORTSECT_NOT, SORTSECT_NAME, SORTSECT_POS };
+
+class SW_DLLPUBLIC SwSectionFmt
+ : public SwFrmFmt
+ , public ::sfx2::Metadatable
+{
+ friend class SwDoc;
+
+ /** why does this exist in addition to the m_wXObject in SwFrmFmt?
+ in case of an index, both a SwXDocumentIndex and a SwXTextSection
+ register at this SwSectionFmt, so we need to have two refs.
+ */
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XTextSection> m_wXTextSection;
+
+ SW_DLLPRIVATE void UpdateParent(); // Parent wurde veraendert
+
+protected:
+ SwSectionFmt( SwSectionFmt* pDrvdFrm, SwDoc *pDoc );
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+ ~SwSectionFmt();
+
+ //Vernichtet alle Frms in aDepend (Frms werden per PTR_CAST erkannt).
+ virtual void DelFrms();
+
+ //Erzeugt die Ansichten
+ virtual void MakeFrms();
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+ // erfrage vom Format Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ SwSection* GetSection() const;
+ inline SwSectionFmt* GetParent() const;
+ inline SwSection* GetParentSection() const;
+
+ // alle Sections, die von dieser abgeleitet sind
+ // - sortiert nach : Name oder Position oder unsortiert
+ // - alle oder nur die, die sich im normalten Nodes-Array befinden
+ USHORT GetChildSections( SwSections& rArr,
+ SectionSort eSort = SORTSECT_NOT,
+ BOOL bAllSections = TRUE ) const;
+
+ // erfrage, ob sich die Section im Nodes-Array oder UndoNodes-Array
+ // befindet.
+ BOOL IsInNodesArr() const;
+
+ SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false);
+ const SwSectionNode* GetSectionNode(bool const bEvenIfInUndo = false) const
+ { return const_cast<SwSectionFmt *>(this)
+ ->GetSectionNode(bEvenIfInUndo); }
+
+ // ist die Section eine gueltige fuers GlobalDocument?
+ const SwSection* GetGlobalDocSection() const;
+
+ SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XTextSection> const& GetXTextSection() const
+ { return m_wXTextSection; }
+ SW_DLLPRIVATE void SetXTextSection(::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextSection> const& xTextSection)
+ { m_wXTextSection = xTextSection; }
+
+ // sfx2::Metadatable
+ virtual ::sfx2::IXmlIdRegistry& GetRegistry();
+ virtual bool IsInClipboard() const;
+ virtual bool IsInUndo() const;
+ virtual bool IsInContent() const;
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable > MakeUnoObject();
+
+};
+
+// -------------- inlines ---------------------------------
+
+inline SwSection* SwSection::GetParent() const
+{
+ SwSectionFmt* pFmt = GetFmt();
+ SwSection* pRet = 0;
+ if( pFmt )
+ pRet = pFmt->GetParentSection();
+ return pRet;
+}
+
+inline SwSectionFmt* SwSectionFmt::GetParent() const
+{
+ SwSectionFmt* pRet = 0;
+ if( GetRegisteredIn() )
+ pRet = PTR_CAST( SwSectionFmt, GetRegisteredIn() );
+ return pRet;
+}
+
+inline SwSection* SwSectionFmt::GetParentSection() const
+{
+ SwSectionFmt* pParent = GetParent();
+ SwSection* pRet = 0;
+ if( pParent )
+ {
+ pRet = pParent->GetSection();
+ }
+ return pRet;
+}
+
+
+#endif /* _SECTION_HXX */
diff --git a/sw/inc/shellid.hxx b/sw/inc/shellid.hxx
new file mode 100644
index 000000000000..7ca50ff1e183
--- /dev/null
+++ b/sw/inc/shellid.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SHELLID_HXX
+#define _SHELLID_HXX
+
+#include <sfx2/shell.hxx>
+
+/*--------------------------------------------------------------------
+ Beschreibung: Mapping fuer UI-Parameter
+ --------------------------------------------------------------------*/
+
+#define SW_BASESHELL (SFX_INTERFACE_SW_START + 1)
+#define SW_TEXTSHELL (SFX_INTERFACE_SW_START + 2)
+#define SW_LISTSHELL (SFX_INTERFACE_SW_START + 3)
+#define SW_TABSHELL (SFX_INTERFACE_SW_START + 4)
+#define SW_FRAMESHELL (SFX_INTERFACE_SW_START + 5)
+#define SW_GRFSHELL (SFX_INTERFACE_SW_START + 6)
+#define SW_OLESHELL (SFX_INTERFACE_SW_START + 7)
+#define SW_DRAWSHELL (SFX_INTERFACE_SW_START + 8)
+#define SW_DRWTXTSHELL (SFX_INTERFACE_SW_START + 9)
+
+#define SW_INTERFACE_MODULE (SFX_INTERFACE_SW_START + 10)
+#define SW_DOCSHELL (SFX_INTERFACE_SW_START + 11)
+#define SW_VIEWSHELL (SFX_INTERFACE_SW_START + 12)
+#define SW_PAGEPREVIEW (SFX_INTERFACE_SW_START + 13)
+#define SW_GLOSDOCSHELL (SFX_INTERFACE_SW_START + 14)
+#define SW_SRC_VIEWSHELL (SFX_INTERFACE_SW_START + 15)
+
+#define SW_BEZIERSHELL (SFX_INTERFACE_SW_START + 16)
+#define SW_DRAWBASESHELL (SFX_INTERFACE_SW_START + 17)
+#define SW_DRAWFORMSHELL (SFX_INTERFACE_SW_START + 18)
+
+#define SW_WEBDOCSHELL (SFX_INTERFACE_SW_START + 19)
+#define SW_WEBVIEWSHELL (SFX_INTERFACE_SW_START + 20)
+#define SW_WEBBASESHELL (SFX_INTERFACE_SW_START + 21)
+#define SW_WEBTEXTSHELL (SFX_INTERFACE_SW_START + 22)
+#define SW_WEBFRAMESHELL (SFX_INTERFACE_SW_START + 23)
+#define SW_WEBGLOSDOCSHELL (SFX_INTERFACE_SW_START + 24)
+#define SW_WEBLISTSHELL (SFX_INTERFACE_SW_START + 25)
+#define SW_WEBTABSHELL (SFX_INTERFACE_SW_START + 26)
+#define SW_WEBGRFSHELL (SFX_INTERFACE_SW_START + 27)
+#define SW_WEBOLESHELL (SFX_INTERFACE_SW_START + 28)
+#define SW_WEBDRAWBASESHELL (SFX_INTERFACE_SW_START + 29)
+#define SW_WEBDRAWFORMSHELL (SFX_INTERFACE_SW_START + 30)
+
+#define SW_MEDIASHELL (SFX_INTERFACE_SW_START + 31)
+#define SW_ANNOTATIONSHELL (SFX_INTERFACE_SW_START + 32)
+
+#endif // _UIPARAM_HXX
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
new file mode 100644
index 000000000000..0e52ce256754
--- /dev/null
+++ b/sw/inc/shellio.hxx
@@ -0,0 +1,678 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_SHELLIO_HXX
+#define SW_SHELLIO_HXX
+
+#include <memory>
+#include <boost/utility.hpp>
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <sfx2/docfile.hxx>
+#include <sfx2/fcontnr.hxx>
+#include <sot/formats.hxx>
+#include <sot/storage.hxx>
+#include <svtools/parhtml.hxx>
+#include <tools/string.hxx>
+#include <tools/date.hxx>
+#include <tools/time.hxx>
+#include <tools/datetime.hxx>
+#include <tools/ref.hxx>
+#include <tools/urlobj.hxx>
+#include <swdllapi.h>
+#include <swtypes.hxx>
+#include <docfac.hxx> // SwDocFac
+#include <errhdl.hxx>
+#include <iodetect.hxx>
+
+// einige Forward - Deklarationen
+class SfxFilterContainer;
+class SfxFilter;
+class SfxItemPool;
+class SfxItemSet;
+class SfxMedium;
+class SvPtrarr;
+class SvStream;
+class SvStrings;
+class SvxFontItem;
+class SvxMacroTableDtor;
+//class Sw3Io;
+class SwCntntNode;
+class SwCrsrShell;
+class SwDoc;
+class SwPaM;
+class SwTextBlocks;
+struct SwPosition;
+struct Writer_Impl;
+
+// ab so vielen chars wird ein mit einem ASCII/W4W-Reader eingelesener
+// Absatz zwangsweise umgebrochen. Muss immer groesser als 200 sein !!!
+#define MAX_ASCII_PARA 10000
+
+
+class SW_DLLPUBLIC SwAsciiOptions
+{
+ String sFont;
+ rtl_TextEncoding eCharSet;
+ USHORT nLanguage;
+ LineEnd eCRLF_Flag;
+
+public:
+
+ const String& GetFontName() const { return sFont; }
+ void SetFontName( const String& rFont ) { sFont = rFont; }
+
+ rtl_TextEncoding GetCharSet() const { return eCharSet; }
+ void SetCharSet( rtl_TextEncoding nVal ) { eCharSet = nVal; }
+
+ USHORT GetLanguage() const { return nLanguage; }
+ void SetLanguage( USHORT nVal ) { nLanguage = nVal; }
+
+ LineEnd GetParaFlags() const { return eCRLF_Flag; }
+ void SetParaFlags( LineEnd eVal ) { eCRLF_Flag = eVal; }
+
+ void Reset()
+ {
+ sFont.Erase();
+ eCRLF_Flag = GetSystemLineEnd();
+ eCharSet = ::gsl_getSystemTextEncoding();
+ nLanguage = 0;
+ }
+ // for the automatic conversion (mail/news/...)
+ void ReadUserData( const String& );
+ void WriteUserData( String& );
+
+ SwAsciiOptions() { Reset(); }
+};
+
+/**************** SwReader/Reader ************************/
+// Basisklasse der moeglichen Optionen fuer einen speziellen Reader
+class Reader;
+// Ruft den Reader mit seinen Optionen, Dokument, Cursor etc.
+class SwReader;
+// SwRead ist der Pointer auf die Read-Optionen-Basisklasse
+typedef Reader *SwRead;
+
+class SwgReaderOption
+{
+ SwAsciiOptions aASCIIOpts;
+ union
+ {
+ BOOL bFmtsOnly;
+ struct
+ {
+ BOOL bFrmFmts: 1;
+ BOOL bPageDescs: 1;
+ BOOL bTxtFmts: 1;
+ BOOL bNumRules: 1;
+ BOOL bMerge:1;
+ } Fmts;
+ } What;
+
+public:
+ void ResetAllFmtsOnly() { What.bFmtsOnly = 0; }
+ BOOL IsFmtsOnly() const { return What.bFmtsOnly; }
+
+ BOOL IsFrmFmts() const { return What.Fmts.bFrmFmts; }
+ void SetFrmFmts( const BOOL bNew) { What.Fmts.bFrmFmts = bNew; }
+
+ BOOL IsPageDescs() const { return What.Fmts.bPageDescs; }
+ void SetPageDescs( const BOOL bNew) { What.Fmts.bPageDescs = bNew; }
+
+ BOOL IsTxtFmts() const { return What.Fmts.bTxtFmts; }
+ void SetTxtFmts( const BOOL bNew) { What.Fmts.bTxtFmts = bNew; }
+
+ BOOL IsNumRules() const { return What.Fmts.bNumRules; }
+ void SetNumRules( const BOOL bNew) { What.Fmts.bNumRules = bNew; }
+
+ BOOL IsMerge() const { return What.Fmts.bMerge; }
+ void SetMerge( const BOOL bNew ) { What.Fmts.bMerge = bNew; }
+
+ const SwAsciiOptions& GetASCIIOpts() const { return aASCIIOpts; }
+ void SetASCIIOpts( const SwAsciiOptions& rOpts ) { aASCIIOpts = rOpts; }
+ void ResetASCIIOpts() { aASCIIOpts.Reset(); }
+
+ SwgReaderOption()
+ { ResetAllFmtsOnly(); aASCIIOpts.Reset(); }
+};
+
+class SwReader: public SwDocFac
+{
+ SvStream* pStrm;
+ SotStorageRef pStg;
+ com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
+ SfxMedium* pMedium; // wer ein Medium haben will (W4W)
+
+ SwPaM* pCrsr;
+ String aFileName;
+ String sBaseURL;
+
+public:
+ /*
+ * Initiales Einlesen. Dokument wird erst beim Read(..) angelegt.
+ * JP 25.04.95: oder falls es mitgegeben wird, in dieses.
+ * Sonderfall fuer Load mit Sw3Reader
+ */
+ //SwReader( SotStorage&, const String& rFilename, SwDoc *pDoc = 0 );
+ //SwReader( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFilename, SwDoc *pDoc = 0 );
+ SwReader( SfxMedium&, const String& rFilename, SwDoc *pDoc = 0 );
+ /*
+ * In ein existierendes Dokument einlesen, Dokument und
+ * Position im Dokument werden aus dem SwPaM uebernommen.
+ */
+ SwReader( SvStream&, const String& rFilename, const String& rBaseURL, SwPaM& );
+ //SwReader( SotStorage&, const String& rFilename, SwPaM& );
+ SwReader( SfxMedium&, const String& rFilename, SwPaM& );
+ SwReader( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFilename, SwPaM& );
+
+ /*
+ * Nur SwReader::Read(...) ist die Export-Schnittstelle!!!
+ */
+ BOOL NeedsPasswd( const Reader& );
+ BOOL CheckPasswd( const String&, const Reader& );
+ ULONG Read( const Reader& );
+
+ // ask for glossaries
+ BOOL HasGlossaries( const Reader& );
+ BOOL ReadGlossaries( const Reader&, SwTextBlocks&, BOOL bSaveRelFiles );
+
+ const String& GetBaseURL() const { return sBaseURL;}
+
+protected:
+ void SetBaseURL( const String& rURL ) { sBaseURL = rURL; }
+};
+
+
+
+/* */
+/**************** SPEZIELLE Reader ************************/
+
+// spezielle - Reader koennen beides sein !! (Excel, W4W, .. )
+#define SW_STREAM_READER 1
+#define SW_STORAGE_READER 2
+
+class SW_DLLPUBLIC Reader
+{
+ friend class SwReader;
+ SwDoc* pTemplate;
+ String aTemplateNm;
+ //String sBaseURL;
+
+ Date aDStamp;
+ Time aTStamp;
+ DateTime aChkDateTime;
+
+protected:
+ SvStream* pStrm;
+ SotStorageRef pStg;
+ com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
+ SfxMedium* pMedium; // wer ein Medium haben will (W4W)
+
+ SwgReaderOption aOpt;
+ BOOL bInsertMode : 1;
+ BOOL bTmplBrowseMode : 1;
+ BOOL bReadUTF8: 1; // Stream als UTF-8 interpretieren
+ BOOL bBlockMode: 1;
+ BOOL bOrganizerMode : 1;
+ BOOL bHasAskTemplateName : 1;
+ BOOL bIgnoreHTMLComments : 1;
+
+ virtual String GetTemplateName() const;
+
+public:
+ Reader();
+ virtual ~Reader();
+
+ virtual int GetReaderType();
+ SwgReaderOption& GetReaderOpt() { return aOpt; }
+
+ virtual void SetFltName( const String& rFltNm );
+ static void SetNoOutlineNum( SwDoc& rDoc );
+
+ // den Item-Set eines Frm-Formats an das alte Format anpassen
+ static void ResetFrmFmtAttrs( SfxItemSet &rFrmSet );
+
+ // die Rahmen-/Grafik-/OLE-Vorlagen an das alte Format (ohne
+ // Umrandung etc.) anpassen
+ static void ResetFrmFmts( SwDoc& rDoc );
+
+ // Die Filter-Vorlage laden, setzen und wieder freigeben
+ SwDoc* GetTemplateDoc();
+ BOOL SetTemplate( SwDoc& rDoc );
+ void ClearTemplate();
+ void SetTemplateName( const String& rDir );
+ void MakeHTMLDummyTemplateDoc();
+
+ BOOL IsReadUTF8() const { return bReadUTF8; }
+ void SetReadUTF8( BOOL bSet ) { bReadUTF8 = bSet; }
+
+ BOOL IsBlockMode() const { return bBlockMode; }
+ void SetBlockMode( BOOL bSet ) { bBlockMode = bSet; }
+
+ BOOL IsOrganizerMode() const { return bOrganizerMode; }
+ void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; }
+
+ void SetIgnoreHTMLComments( BOOL bSet ) { bIgnoreHTMLComments = bSet; }
+
+ virtual BOOL HasGlossaries() const;
+ virtual BOOL ReadGlossaries( SwTextBlocks&, BOOL bSaveRelFiles ) const;
+
+ // read the sections of the document, which is equal to the medium.
+ // returns the count of it
+ virtual USHORT GetSectionList( SfxMedium& rMedium,
+ SvStrings& rStrings ) const;
+
+ SotStorageRef getSotStorageRef() { return pStg; };
+ void setSotStorageRef(SotStorageRef pStgRef) { pStg = pStgRef; };
+
+private:
+ virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &)=0;
+
+ // alle die die Streams / Storages nicht geoeffnet brauchen,
+ // muessen die Methode ueberladen (W4W!!)
+ virtual int SetStrmStgPtr();
+};
+
+class AsciiReader: public Reader
+{
+ friend class SwReader;
+ virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+public:
+ AsciiReader(): Reader() {}
+};
+
+/*class SwgReader: public Reader
+{
+ virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+};
+*/
+class SW_DLLPUBLIC StgReader : public Reader
+{
+ String aFltName;
+
+protected:
+ ULONG OpenMainStream( SotStorageStreamRef& rRef, USHORT& rBuffSize );
+
+public:
+ virtual int GetReaderType();
+ const String& GetFltName() { return aFltName; }
+ virtual void SetFltName( const String& r );
+};
+
+
+/*class Sw3Reader : public StgReader
+{
+ Sw3Io* pIO;
+ virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+public:
+ Sw3Reader() : pIO( 0 ) {}
+
+ void SetSw3Io( Sw3Io* pIo ) { pIO = pIo; }
+
+ // read the sections of the document, which is equal to the medium.
+ // returns the count of it
+ virtual USHORT GetSectionList( SfxMedium& rMedium,
+ SvStrings& rStrings ) const;
+};*/
+
+/* */
+////////////////////////////////////////////////////////////////////////////
+
+// Der uebergebene Stream muss dynamisch angelegt werden und
+// vor dem Loeschen der Instanz per Stream() angefordert
+// und geloescht werden!
+
+class SwImpBlocks;
+
+class SW_DLLPUBLIC SwTextBlocks
+{
+// friend class Sw2TextBlocks;
+// friend class Sw3IoImp;
+ SwImpBlocks* pImp;
+ ULONG nErr;
+
+public:
+ SwTextBlocks( const String& );
+ ~SwTextBlocks();
+
+ void Flush(){}
+
+ SwDoc* GetDoc();
+ void ClearDoc(); // Doc-Inhalt loeschen
+ const String& GetName();
+ void SetName( const String& );
+ ULONG GetError() const { return nErr; }
+
+ String GetBaseURL() const;
+ void SetBaseURL( const String& rURL );
+
+ BOOL IsOld() const;
+ ULONG ConvertToNew(); // Textbausteine konvertieren
+
+ USHORT GetCount() const; // Anzahl Textbausteine ermitteln
+ USHORT GetIndex( const String& ) const; // Index fuer Kurznamen ermitteln
+ USHORT GetLongIndex( const String& ) const; //Index fuer Langnamen ermitteln
+ const String& GetShortName( USHORT ) const; // Kurzname fuer Index zurueck
+ const String& GetLongName( USHORT ) const; // Langname fuer Index zurueck
+
+ BOOL Delete( USHORT ); // Loeschen
+ USHORT Rename( USHORT, const String*, const String* ); // Umbenennen
+ ULONG CopyBlock( SwTextBlocks& rSource, String& rSrcShort,
+ const String& rLong ); // Block kopieren
+
+ BOOL BeginGetDoc( USHORT ); // Textbaustein einlesen
+ void EndGetDoc(); // Textbaustein wieder loslassen
+
+ BOOL BeginPutDoc( const String&, const String& ); // Speichern Beginn
+ USHORT PutDoc(); // Speichern Ende
+
+ USHORT PutText( const String&, const String&, const String& ); // Speichern( Kurzn., Text)
+
+ BOOL IsOnlyTextBlock( USHORT ) const;
+ BOOL IsOnlyTextBlock( const String& rShort ) const;
+
+ const String& GetFileName() const; // Dateiname von pImp
+ BOOL IsReadOnly() const; // ReadOnly-Flag von pImp
+
+ BOOL GetMacroTable( USHORT nIdx, SvxMacroTableDtor& rMacroTbl );
+ BOOL SetMacroTable( USHORT nIdx, const SvxMacroTableDtor& rMacroTbl );
+
+ BOOL StartPutMuchBlockEntries();
+ void EndPutMuchBlockEntries();
+};
+
+// BEGIN source/filter/basflt/fltini.cxx
+
+extern void _InitFilter();
+extern void _FinitFilter();
+
+extern SwRead ReadAscii, /*ReadSwg, ReadSw3, */ReadHTML, ReadXML;
+
+//SW_DLLPUBLIC SwRead SwGetReaderSw3();
+SW_DLLPUBLIC SwRead SwGetReaderXML();
+
+// END source/filter/basflt/fltini.cxx
+
+
+extern BOOL SetHTMLTemplate( SwDoc &rDoc ); //Fuer Vorlagen aus HTML.vor laden shellio.cxx
+
+
+/* */
+/////////////////////////////////////////////////////////////////////////////
+
+/*
+ * Schreiben, Writer
+ */
+
+
+/* Basis-Klasse aller Writer */
+
+class IDocumentSettingAccess;
+class IDocumentStylePoolAccess;
+
+class SW_DLLPUBLIC Writer
+ : public SvRefBase
+ , private ::boost::noncopyable
+{
+ SwAsciiOptions aAscOpts;
+ String sBaseURL;
+
+ void _AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont );
+ void _AddFontItems( SfxItemPool& rPool, USHORT nWhichId );
+
+ ::std::auto_ptr<Writer_Impl> m_pImpl;
+
+protected:
+
+ SwPaM* pOrigPam; // der letze zu bearbeitende Pam
+ const String* pOrigFileName;
+
+ void ResetWriter();
+ BOOL CopyNextPam( SwPaM ** );
+
+ void PutNumFmtFontsInAttrPool();
+ void PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL = TRUE );
+ void PutCJKandCTLFontsInAttrPool();
+
+ virtual ULONG WriteStream() = 0;
+ void SetBaseURL( const String& rURL ) { sBaseURL = rURL; }
+
+ IDocumentSettingAccess* getIDocumentSettingAccess();
+ const IDocumentSettingAccess* getIDocumentSettingAccess() const;
+
+ IDocumentStylePoolAccess* getIDocumentStylePoolAccess();
+ const IDocumentStylePoolAccess* getIDocumentStylePoolAccess() const;
+
+public:
+ SwDoc* pDoc;
+ SwPaM* pCurPam;
+ BOOL bWriteAll : 1;
+ BOOL bShowProgress : 1;
+ BOOL bWriteClipboardDoc : 1;
+ BOOL bWriteOnlyFirstTable : 1;
+ BOOL bASCII_ParaAsCR : 1;
+ BOOL bASCII_ParaAsBlanc : 1;
+ BOOL bASCII_NoLastLineEnd : 1;
+ BOOL bUCS2_WithStartChar : 1;
+ BOOL bExportPargraphNumbering : 1;
+
+ BOOL bBlock : 1;
+ BOOL bOrganizerMode : 1;
+
+ Writer();
+ virtual ~Writer();
+
+ virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
+ ULONG Write( SwPaM&, SvStream&, const String* = 0 );
+ virtual ULONG Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
+ virtual ULONG Write( SwPaM&, SotStorage&, const String* = 0 );
+
+ virtual void SetPasswd( const String& );
+ virtual void SetVersion( const String&, long );
+ virtual BOOL IsStgWriter() const;
+// virtual BOOL IsSw3Writer() const;
+
+ void SetShowProgress( BOOL bFlag = FALSE ) { bShowProgress = bFlag; }
+
+ const String* GetOrigFileName() const { return pOrigFileName; }
+
+ const SwAsciiOptions& GetAsciiOptions() const { return aAscOpts; }
+ void SetAsciiOptions( const SwAsciiOptions& rOpt ) { aAscOpts = rOpt; }
+
+ const String& GetBaseURL() const { return sBaseURL;}
+
+ // suche die naechste Bookmark-Position aus der Bookmark-Tabelle
+ sal_Int32 FindPos_Bkmk( const SwPosition& rPos ) const;
+ // build a bookmark table, which is sort by the node position. The
+ // OtherPos of the bookmarks also inserted.
+ void CreateBookmarkTbl();
+ // search alle Bookmarks in the range and return it in the Array
+ USHORT GetBookmarks( const SwCntntNode& rNd,
+ xub_StrLen nStt, xub_StrLen nEnd,
+ SvPtrarr& rArr );
+
+ // lege einen neuen PaM an der Position an
+ static SwPaM* NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx,
+ BOOL bNodesArray = TRUE );
+
+ // kopiere ggfs. eine lokale Datei ins Internet
+ BOOL CopyLocalFileToINet( String& rFileNm );
+
+ // Stream-spezifische Routinen, im Storage-Writer NICHT VERWENDEN!
+
+ // Optimierung der Ausgabe auf den Stream.
+ SvStream& OutLong( SvStream& rStrm, long nVal );
+ SvStream& OutULong( SvStream& rStrm, ULONG nVal );
+
+ // Hex-Zahl ausgeben, default ist 2.stellige Zahl
+ SvStream& OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen = 2 );
+ // 4-st. Hex-Zahl ausgeben
+ inline SvStream& OutHex4( SvStream& rStrm, USHORT nHex )
+ { return OutHex( rStrm, nHex, 4 ); }
+
+ inline SvStream& OutHex( USHORT nHex, BYTE nLen = 2 ) { return OutHex( Strm(), nHex, nLen ); }
+ inline SvStream& OutHex4( USHORT nHex ) { return OutHex( Strm(), nHex, 4 ); }
+ inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); }
+ inline SvStream& OutULong( ULONG nVal ) { return OutULong( Strm(), nVal ); }
+
+ void SetStream(SvStream *const pStream);
+ SvStream& Strm();
+
+ void SetOrganizerMode( BOOL bSet ) { bOrganizerMode = bSet; }
+};
+
+#ifndef SW_DECL_WRITER_DEFINED
+#define SW_DECL_WRITER_DEFINED
+SV_DECL_REF(Writer)
+#endif
+SV_IMPL_REF(Writer)
+
+// Basisklasse fuer alle Storage-Writer
+class SW_DLLPUBLIC StgWriter : public Writer
+{
+protected:
+ String aFltName;
+ SotStorageRef pStg;
+ com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
+
+ // Fehler beim Aufruf erzeugen
+ virtual ULONG WriteStream();
+ virtual ULONG WriteStorage() = 0;
+ virtual ULONG WriteMedium( SfxMedium& ) = 0;
+
+ using Writer::Write;
+
+public:
+ StgWriter() : Writer() {}
+
+ virtual BOOL IsStgWriter() const;
+
+ virtual ULONG Write( SwPaM&, const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String* = 0, SfxMedium* = 0 );
+ virtual ULONG Write( SwPaM&, SotStorage&, const String* = 0 );
+
+ SotStorage& GetStorage() const { return *pStg; }
+};
+
+/*class Sw3Writer : public StgWriter
+{
+ Sw3Io* pIO;
+ BOOL bSaveAs : 1;
+
+ virtual ULONG WriteStorage();
+ virtual ULONG WriteMedium( SfxMedium& );
+
+public:
+ Sw3Writer() : pIO( 0 ), bSaveAs( FALSE ) {}
+
+ virtual BOOL IsSw3Writer() const;
+};
+
+*/
+
+// Schnittstellenklasse fuer den allgemeinen Zugriff auf die
+// speziellen Writer
+
+class SwWriter
+{
+ SvStream* pStrm;
+ SotStorageRef pStg;
+ com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStg;
+ SfxMedium* pMedium;
+
+ SwPaM* pOutPam;
+ SwCrsrShell *pShell;
+ SwDoc &rDoc;
+
+ //String sBaseURL;
+
+ BOOL bWriteAll;
+
+public:
+ ULONG Write( WriterRef& rxWriter, const String* = 0);
+
+ SwWriter( SvStream&, SwCrsrShell &,BOOL bWriteAll = FALSE );
+ SwWriter( SvStream&, SwDoc & );
+ SwWriter( SvStream&, SwPaM &, BOOL bWriteAll = FALSE );
+
+// SwWriter( SotStorage&, SwCrsrShell &,BOOL bWriteAll = FALSE );
+ SwWriter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, SwDoc& );
+// SwWriter( SotStorage&, SwPaM&, BOOL bWriteAll = FALSE );
+
+ SwWriter( SfxMedium&, SwCrsrShell &,BOOL bWriteAll = FALSE );
+ SwWriter( SfxMedium&, SwDoc & );
+// SwWriter( SfxMedium&, SwPaM&, BOOL bWriteAll = FALSE );
+
+ //const String& GetBaseURL() const { return sBaseURL;}
+};
+
+
+/* */
+/////////////////////////////////////////////////////////////////////////////
+
+typedef Reader* (*FnGetReader)();
+typedef void (*FnGetWriter)(const String&, const String& rBaseURL, WriterRef&);
+ULONG SaveOrDelMSVBAStorage( SfxObjectShell&, SotStorage&, BOOL, const String& );
+ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS );
+
+struct SwReaderWriterEntry
+{
+ Reader* pReader;
+ FnGetReader fnGetReader;
+ FnGetWriter fnGetWriter;
+ BOOL bDelReader;
+
+ SwReaderWriterEntry( const FnGetReader fnReader, const FnGetWriter fnWriter, BOOL bDel )
+ : pReader( NULL ), fnGetReader( fnReader ), fnGetWriter( fnWriter ), bDelReader( bDel )
+ {}
+
+ /// Get access to the reader
+ Reader* GetReader();
+
+ /// Get access to the writer
+ void GetWriter( const String& rNm, const String& rBaseURL, WriterRef& xWrt ) const;
+};
+
+namespace SwReaderWriter
+{
+ /// Return reader based on ReaderWriterEnum
+ Reader* GetReader( ReaderWriterEnum eReader );
+
+ /// Return reader based on the name
+ Reader* GetReader( const String& rFltName );
+
+ /// Return writer based on the name
+ void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xWrt );
+}
+
+void GetRTFWriter( const String&, const String&, WriterRef& );
+void GetASCWriter( const String&, const String&, WriterRef& );
+//void GetSw3Writer( const String&, const String&, WriterRef& );
+void GetHTMLWriter( const String&, const String&, WriterRef& );
+void GetXMLWriter( const String&, const String&, WriterRef& );
+void GetWW8Writer( const String&, const String&, WriterRef& );
+
+#endif
diff --git a/sw/inc/shellres.hxx b/sw/inc/shellres.hxx
new file mode 100644
index 000000000000..3875c5b1c15e
--- /dev/null
+++ b/sw/inc/shellres.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SHELLRES_HXX
+#define _SHELLRES_HXX
+
+
+#include <tools/string.hxx>
+
+#ifndef _BITMAP_HXX //autogen
+#include <vcl/bitmap.hxx>
+#endif
+
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_STRINGSDTOR
+#include <svl/svstdarr.hxx>
+#endif
+
+struct SW_DLLPUBLIC ShellResource : public Resource
+{
+ String aPostItAuthor;
+ String aPostItPage;
+ String aPostItLine;
+
+ // Calc Fehlerstrings
+ String aCalc_Syntax;
+ String aCalc_ZeroDiv;
+ String aCalc_Brack;
+ String aCalc_Pow;
+ String aCalc_VarNFnd;
+ String aCalc_Overflow;
+ String aCalc_WrongTime;
+ String aCalc_Default;
+ String aCalc_Error;
+
+ // fuers GetRefFeld - oben/unten
+ String aGetRefFld_Up;
+ String aGetRefFld_Down;
+ // --> OD 2007-09-13 #i81002#
+ // for GetRefField - referenced item not found
+ String aGetRefFld_RefItemNotFound;
+ // <--
+ // fuer dynamisches Menu - String "alle"
+ String aStrAllPageHeadFoot;
+ // fuer einige Listboxen - String "keine"
+ String aStrNone;
+ // fuer Felder, die Fixiert sind
+ String aFixedStr;
+ // custom fields of type css::util::Duration
+ String sDurationFormat;
+
+ //names of TOXs
+ String aTOXIndexName;
+ String aTOXUserName;
+ String aTOXContentName;
+ String aTOXIllustrationsName;
+ String aTOXObjectsName;
+ String aTOXTablesName;
+ String aTOXAuthoritiesName;
+
+ String aHyperlinkClick;
+
+ SvStringsDtor aDocInfoLst;
+
+ // Fly-Anker Bmps
+// Bitmap aAnchorBmp;
+// Bitmap aDragAnchorBmp;
+
+ // die AutoFormat-Redline-Kommentare
+ inline const SvStringsDtor& GetAutoFmtNameLst() const;
+
+ // returns for the specific filter the new names of pagedescs
+ // This method is for the old code of the specific filters with
+ // now localized names
+ String GetPageDescName( USHORT nNo, BOOL bFirst = FALSE,
+ BOOL bFollow = FALSE );
+
+ ShellResource();
+ ~ShellResource();
+
+private:
+ void _GetAutoFmtNameLst() const;
+ SvStringsDtor *pAutoFmtNameLst;
+ String sPageDescFirstName;
+ String sPageDescFollowName;
+ String sPageDescName;
+};
+
+inline const SvStringsDtor& ShellResource::GetAutoFmtNameLst() const
+{
+ if( !pAutoFmtNameLst )
+ _GetAutoFmtNameLst();
+ return *pAutoFmtNameLst;
+}
+
+
+#endif //_SHELLRES_HXX
diff --git a/sw/inc/sortopt.hxx b/sw/inc/sortopt.hxx
new file mode 100644
index 000000000000..0e15f3758dd6
--- /dev/null
+++ b/sw/inc/sortopt.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SORTOPT_HXX
+#define _SORTOPT_HXX
+
+
+#include <svl/svarray.hxx>
+#include <tools/string.hxx>
+#include "swdllapi.h"
+
+enum SwSortOrder { SRT_ASCENDING, SRT_DESCENDING };
+enum SwSortDirection { SRT_COLUMNS, SRT_ROWS };
+
+/*--------------------------------------------------------------------
+ Beschreibung: SortierSchluessel
+ --------------------------------------------------------------------*/
+struct SW_DLLPUBLIC SwSortKey
+{
+ SwSortKey();
+ SwSortKey( USHORT nId, const String& rSrtType, SwSortOrder eOrder );
+ SwSortKey( const SwSortKey& rOld );
+
+ String sSortType;
+ SwSortOrder eSortOrder;
+ USHORT nColumnId;
+ BOOL bIsNumeric;
+};
+
+SV_DECL_PTRARR(SwSortKeys, SwSortKey*, 3, 1)
+
+struct SW_DLLPUBLIC SwSortOptions
+{
+ SwSortOptions();
+ ~SwSortOptions();
+ SwSortOptions(const SwSortOptions& rOpt);
+
+ SwSortKeys aKeys;
+ SwSortDirection eDirection;
+ sal_Unicode cDeli;
+ USHORT nLanguage;
+ BOOL bTable;
+ BOOL bIgnoreCase;
+};
+
+#endif // _SORTOPT_HXX
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
new file mode 100644
index 000000000000..6de36a6ee245
--- /dev/null
+++ b/sw/inc/splargs.hxx
@@ -0,0 +1,180 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SPLARGS_HXX
+#define _SPLARGS_HXX
+
+#include <i18npool/lang.h>
+#include <tools/solar.h>
+#include <tools/gen.hxx>
+#include <limits.h> // USHRT_MAX
+#include <tools/string.hxx>
+
+class SwTxtNode;
+class SwIndex;
+class SpellCheck;
+class Font;
+#include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
+#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
+#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
+
+/*************************************************************************
+ * struct SwArgsBase
+ *************************************************************************/
+
+
+struct SwArgsBase // used for text conversion (Hangul/Hanja, ...)
+{
+ SwTxtNode *pStartNode;
+ SwIndex *pStartIdx;
+ SwTxtNode *pEndNode;
+ SwIndex *pEndIdx;
+
+ SwArgsBase(
+ SwTxtNode* pStart, SwIndex& rStart,
+ SwTxtNode* pEnd, SwIndex& rEnd )
+ : pStartNode( pStart ), pStartIdx( &rStart ),
+ pEndNode( pEnd ), pEndIdx( &rEnd )
+ {}
+
+ void SetStart(SwTxtNode* pStart, SwIndex& rStart )
+ {
+ pStartNode = pStart; pStartIdx = &rStart ;
+ }
+
+ void SetEnd( SwTxtNode* pEnd, SwIndex& rEnd )
+ {
+ pEndNode = pEnd; pEndIdx = &rEnd ;
+ }
+};
+
+/*************************************************************************
+ * struct SwConversionArgs
+ * used for text conversion (Hangul/Hanja, Simplified/Traditional Chinese, ...)
+ *************************************************************************/
+
+struct SwConversionArgs : SwArgsBase
+{
+ rtl::OUString aConvText; // convertible text found
+ LanguageType nConvSrcLang; // (source) language to look for
+ LanguageType nConvTextLang; // language of aConvText (if the latter one was found)
+
+ // used for chinese translation
+ LanguageType nConvTargetLang; // target language of text to be changed
+ const Font *pTargetFont; // target font of text to be changed
+ // explicitly enables or disables application of the above two
+ sal_Bool bAllowImplicitChangesForNotConvertibleText;
+
+ SwConversionArgs( LanguageType nLang,
+ SwTxtNode* pStart, SwIndex& rStart,
+ SwTxtNode* pEnd, SwIndex& rEnd )
+ : SwArgsBase( pStart, rStart, pEnd, rEnd ),
+ nConvSrcLang( nLang ),
+ nConvTextLang( LANGUAGE_NONE ),
+ nConvTargetLang( LANGUAGE_NONE ),
+ pTargetFont( NULL ),
+ bAllowImplicitChangesForNotConvertibleText( sal_False )
+ {}
+};
+
+/*************************************************************************
+ * struct SwSpellArgs
+ *************************************************************************/
+
+struct SwSpellArgs : SwArgsBase
+{
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > xSpeller;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellAlternatives > xSpellAlt;
+
+ bool bIsGrammarCheck;
+
+ SwSpellArgs(::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > &rxSplChk,
+ SwTxtNode* pStart, SwIndex& rStart,
+ SwTxtNode* pEnd, SwIndex& rEnd,
+ bool bGrammar )
+ : SwArgsBase( pStart, rStart, pEnd, rEnd ),
+ xSpeller( rxSplChk ),
+ bIsGrammarCheck( bGrammar )
+ {}
+};
+
+/*************************************************************************
+ * class SwInterHyphInfo
+ *************************************************************************/
+
+// Parameter-Klasse fuer Hyphenate
+// docedt.cxx: SwDoc::Hyphenate()
+// txtedt.cxx: SwTxtNode::Hyphenate()
+// txthyph.cxx: SwTxtFrm::Hyphenate()
+
+class SwInterHyphInfo
+{
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenatedWord > xHyphWord;
+ const Point aCrsrPos;
+ sal_Bool bAuto : 1;
+ sal_Bool bNoLang : 1;
+ sal_Bool bCheck : 1;
+public:
+ xub_StrLen nStart;
+ xub_StrLen nLen;
+ xub_StrLen nWordStart;
+ xub_StrLen nWordLen;
+ xub_StrLen nHyphPos;
+ sal_uInt16 nMinTrail;
+
+ inline SwInterHyphInfo( const Point &rCrsrPos,
+ const sal_uInt16 nStartPos = 0,
+ const sal_uInt16 nLength = USHRT_MAX )
+ : aCrsrPos( rCrsrPos ),
+ bAuto(sal_False), bNoLang(sal_False), bCheck(sal_False),
+ nStart(nStartPos), nLen(nLength),
+ nWordStart(0), nWordLen(0),
+ nHyphPos(0), nMinTrail(0)
+ { }
+ inline xub_StrLen GetEnd() const
+ { return STRING_LEN == nLen ? nLen : nStart + nLen; }
+ inline const Point *GetCrsrPos() const
+ { return aCrsrPos.X() || aCrsrPos.Y() ? &aCrsrPos : 0; }
+ inline sal_Bool IsCheck() const { return bCheck; }
+ inline void SetCheck( const sal_Bool bNew ) { bCheck = bNew; }
+ inline void SetNoLang( const sal_Bool bNew ) { bNoLang = bNew; }
+
+ inline void
+ SetHyphWord(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenatedWord > &rxHW)
+ { xHyphWord = rxHW; }
+ inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenatedWord >
+ GetHyphWord() { return xHyphWord; }
+};
+
+
+#endif
diff --git a/sw/inc/statstr.hrc b/sw/inc/statstr.hrc
new file mode 100644
index 000000000000..0c611051ba01
--- /dev/null
+++ b/sw/inc/statstr.hrc
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _STATSTR_HRC
+#define _STATSTR_HRC
+
+#include "rcid.hrc"
+
+#define STR_STATSTR_W4WREAD (RC_STATLIN_STR + 0)
+#define STR_STATSTR_W4WWRITE (RC_STATLIN_STR + 1)
+#define STR_STATSTR_SWGREAD (RC_STATLIN_STR + 2)
+#define STR_STATSTR_SWGWRITE (RC_STATLIN_STR + 3)
+#define STR_STATSTR_REFORMAT (RC_STATLIN_STR + 4)
+#define STR_STATSTR_AUTOFORMAT (RC_STATLIN_STR + 5)
+#define STR_STATSTR_IMPGRF (RC_STATLIN_STR + 6)
+#define STR_STATSTR_SEARCH (RC_STATLIN_STR + 7)
+#define STR_STATSTR_FORMAT (RC_STATLIN_STR + 8)
+#define STR_STATSTR_PRINT (RC_STATLIN_STR + 9)
+#define STR_STATSTR_LAYOUTINIT (RC_STATLIN_STR + 10)
+#define STR_STATSTR_LETTER (RC_STATLIN_STR + 11)
+#define STR_STATSTR_SPELL (RC_STATLIN_STR + 12)
+#define STR_STATSTR_HYPHEN (RC_STATLIN_STR + 13)
+#define STR_STATSTR_TOX_INSERT (RC_STATLIN_STR + 14)
+#define STR_STATSTR_TOX_UPDATE (RC_STATLIN_STR + 15)
+#define STR_STATSTR_SUMMARY (RC_STATLIN_STR + 16)
+#define STR_STATSTR_SWGPRTOLENOTIFY (RC_STATLIN_STR + 17)
+
+#endif
+
+
+
diff --git a/sw/inc/stringhash.hxx b/sw/inc/stringhash.hxx
new file mode 100644
index 000000000000..12c7dc28b857
--- /dev/null
+++ b/sw/inc/stringhash.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _STRINGHASH_HXX
+#define _STRINGHASH_HXX
+
+#include <tools/string.hxx>
+
+struct StringEq
+{
+ sal_Bool operator() ( const String *r1,
+ const String *r2) const
+ {
+ return r1->Equals(*r2);
+ }
+};
+
+struct StringEqRef
+{
+ sal_Bool operator() (const String &r1, const String &r2) const
+ {
+ return r1.Equals(r2);
+ }
+};
+
+struct StringHash
+{
+ size_t operator() ( const String *rString) const
+ {
+ sal_Int32 h, nLen;
+ h = nLen = rString->Len();
+ const sal_Unicode *pStr = rString->GetBuffer();
+
+ if ( nLen < 16 )
+ while ( nLen-- > 0 )
+ h = (h*37) + *(pStr++);
+ else
+ {
+ sal_Int32 nSkip;
+ const sal_Unicode* pEndStr = pStr+nLen-5;
+
+ /* only sample some characters */
+ /* the first 3, some characters between, and the last 5 */
+ h = (h*39) + *(pStr++);
+ h = (h*39) + *(pStr++);
+ h = (h*39) + *(pStr++);
+
+ nSkip = nLen / nLen < 32 ? 4 : 8;
+ nLen -= 8;
+ while ( nLen > 0 )
+ {
+ h = (h*39) + ( *pStr );
+ pStr += nSkip;
+ nLen -= nSkip;
+ }
+
+ h = (h*39) + *(pEndStr++);
+ h = (h*39) + *(pEndStr++);
+ h = (h*39) + *(pEndStr++);
+ h = (h*39) + *(pEndStr++);
+ h = (h*39) + *(pEndStr++);
+ }
+ return h;
+ }
+
+ size_t operator() (const String & rStr) const
+ {
+ return (*this)(&rStr);
+ }
+};
+
+struct StringHashRef
+{
+ size_t operator () (const String &rStr) const
+ {
+ StringHash aStrHash;
+
+ return aStrHash(&rStr);
+ }
+};
+#endif // _STRINGHASH_HXX
diff --git a/sw/inc/sw.mk b/sw/inc/sw.mk
new file mode 100644
index 000000000000..c14f5abc8383
--- /dev/null
+++ b/sw/inc/sw.mk
@@ -0,0 +1,40 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# 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.
+#
+#*************************************************************************
+
+# CDEFS=$(CDEFS) -DXXX
+
+# Bereiche aktivieren
+
+#CDEFS+=-DXML_CORE_API
+CDEFS+=-DACCESSIBLE_LAYOUT
+
+# define SW_DLLIMPLEMENTATION (see @ swdllapi.h)
+.IF "$(MAKING_LIBMSWORD)" != "TRUE"
+CDEFS += -DSW_DLLIMPLEMENTATION
+.ENDIF
+
+VISIBILITY_HIDDEN=TRUE
diff --git a/sw/inc/sw_primitivetypes2d.hxx b/sw/inc/sw_primitivetypes2d.hxx
new file mode 100644
index 000000000000..12e245791f4c
--- /dev/null
+++ b/sw/inc/sw_primitivetypes2d.hxx
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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_SW_PRIMITIVETYPES2D_HXX
+#define INCLUDED_SW_PRIMITIVETYPES2D_HXX
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_PRIMITIVETYPES2D_HXX
+#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+#define PRIMITIVE2D_ID_SWVIRTFLYDRAWOBJPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SW| 0)
+#define PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 1)
+#define PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE (PRIMITIVE2D_ID_RANGE_SW| 2)
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // INCLUDED_SW_PRIMITIVETYPES2D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
new file mode 100644
index 000000000000..d189f3c31349
--- /dev/null
+++ b/sw/inc/swabstdlg.hxx
@@ -0,0 +1,498 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SW_ABSTDLG_HXX
+#define _SW_ABSTDLG_HXX
+
+// include ---------------------------------------------------------------
+
+#include <tools/solar.h>
+#include <tools/string.hxx>
+#include <sfx2/sfxdlg.hxx>
+#include <svx/svxdlg.hxx>
+#include <vcl/syswin.hxx>
+#ifndef _GLOBALS_HRC
+#include <globals.hrc>
+#endif
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include "swunodef.hxx"
+#include "itabenum.hxx"
+
+class SfxViewFrame;
+class SfxBindings;
+class SfxItemSet;
+class ResId;
+class Window;
+class String;
+class SfxItemPool;
+class SfxStyleSheetBase;
+class SwGlossaryHdl;
+class SwField;
+
+class SwLabFmtPage;
+class SwLabRec;
+class SwAsciiOptions;
+class SwDocShell;
+class SvStream;
+class SwWrtShell;
+class SfxRequest;
+class SwView;
+class SwTableAutoFmt;
+class SwTOXMgr;
+class SwForm;
+struct CurTOXType;
+class SwTOXDescription;
+class SwTOXBase;
+class SwSectionData;
+struct SwDBData;
+class SwField;
+class Printer;
+class SwLabItem;
+class SwNewDBMgr;
+class SwTableFUNC;
+class SwChildWinWrapper;
+struct SfxChildWinInfo;
+class SwTOXMark;
+struct SwDocStat;
+#include <cnttab.hxx> //add for struct CurTOXType
+
+namespace com{namespace sun{namespace star{
+ namespace frame{
+ class XFrame;
+ }
+ namespace sdbcx{
+ class XColumnsSupplier;
+ }
+ namespace sdbc{
+ class XDataSource;
+ class XConnection;
+ class XResultSet;
+ }
+}}}
+
+typedef void (*SwLabDlgMethod) (::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& xModel, const SwLabItem& rItem);
+
+typedef String (*GlossaryGetCurrGroup)();
+typedef void (*GlossarySetActGroup)(const String& rNewGroup);
+
+class AbstractGlossaryDlg : public VclAbstractDialog //add for SwGlossaryDlg
+{
+public:
+ virtual String GetCurrGrpName() const = 0;
+ virtual String GetCurrShortName() const = 0;
+};
+
+class AbstractFldInputDlg : public VclAbstractDialog //add for SwFldInputDlg
+{
+public:
+ //from class SalFrame
+ virtual void SetWindowState( const ByteString& rStr ) = 0;
+ virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const = 0;
+};
+
+class AbstractInsFootNoteDlg : public VclAbstractDialog //add for SwInsFootNoteDlg
+{
+public:
+ virtual String GetFontName() = 0;
+ virtual BOOL IsEndNote() = 0;
+ virtual String GetStr() = 0;
+ //from class Window
+ virtual void SetHelpId( ULONG nHelpId ) = 0;
+ virtual void SetText( const XubString& rStr ) = 0;
+};
+
+class AbstractInsertGrfRulerDlg : public VclAbstractDialog //add for SwInsertGrfRulerDlg
+{
+public:
+ virtual String GetGraphicName() = 0;
+ virtual BOOL IsSimpleLine() = 0;
+ virtual BOOL HasImages() const = 0;
+};
+
+class AbstractInsTableDlg : public VclAbstractDialog //add for SwInsTableDlg
+{
+public:
+ virtual void GetValues( String& rName, USHORT& rRow, USHORT& rCol,
+ SwInsertTableOptions& rInsTblFlags, String& rTableAutoFmtName,
+ SwTableAutoFmt *& prTAFmt ) = 0;
+};
+
+class AbstractJavaEditDialog : public VclAbstractDialog //add for SwJavaEditDialog
+{
+public:
+ virtual String GetText() = 0;
+ virtual String GetType() = 0;
+ virtual BOOL IsUrl() = 0;
+ virtual BOOL IsNew() = 0;
+ virtual BOOL IsUpdate() = 0;
+};
+
+class AbstractMailMergeDlg : public VclAbstractDialog //add for SwMailMergeDlg
+{
+public:
+ virtual USHORT GetMergeType() = 0;
+ virtual const ::rtl::OUString& GetSaveFilter() const = 0;
+ virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const = 0;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const = 0;
+};
+class AbstractMailMergeCreateFromDlg : public VclAbstractDialog //add for SwMailMergeCreateFromDlg
+{
+public:
+ virtual BOOL IsThisDocument() const = 0;
+};
+class AbstractMailMergeFieldConnectionsDlg : public VclAbstractDialog //add for SwMailMergeFieldConnectionsDlg
+{
+public:
+ virtual BOOL IsUseExistingConnections() const = 0;
+};
+
+class AbstractMultiTOXTabDialog : public VclAbstractDialog //add for SwMultiTOXTabDialog
+{
+public:
+ virtual SwForm* GetForm(CurTOXType eType) = 0;
+ virtual CurTOXType GetCurrentTOXType() const = 0;
+ virtual SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes) = 0;
+ //from SfxTabDialog
+ virtual const SfxItemSet* GetOutputItemSet() const = 0;
+};
+
+class AbstractEditRegionDlg : public VclAbstractDialog //add for SwEditRegionDlg
+{
+public:
+ virtual void SelectSection(const String& rSectionName) = 0;
+};
+class AbstractInsertSectionTabDialog : public VclAbstractDialog //add for SwInsertSectionTabDialog
+{
+public:
+ virtual void SetSectionData(SwSectionData const& rSect) = 0;
+};
+
+class AbstractSwWordCountDialog : public VclAbstractDialog
+{
+public:
+ virtual void SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc) = 0;
+};
+
+class AbstractSwInsertAbstractDlg : public VclAbstractDialog // add for SwInsertAbstractDlg
+{
+public:
+ virtual BYTE GetLevel() const = 0;
+ virtual BYTE GetPara() const = 0;
+};
+
+class AbstractSwAsciiFilterDlg : public VclAbstractDialog // add for SwAsciiFilterDlg
+{
+public:
+ virtual void FillOptions( SwAsciiOptions& rOptions ) = 0;
+
+};
+
+class AbstractSwBreakDlg : public VclAbstractDialog // add for SwBreakDlg
+{
+public:
+ virtual String GetTemplateName() = 0;
+ virtual USHORT GetKind() = 0;
+ virtual USHORT GetPageNumber() = 0;
+
+};
+
+class AbstractSplitTableDialog : public VclAbstractDialog // add for
+{
+public:
+ virtual sal_uInt16 GetSplitMode() = 0;
+};
+
+class AbstractSwConvertTableDlg : public VclAbstractDialog // add for SwConvertTableDlg
+{
+public:
+ virtual void GetValues( sal_Unicode& rDelim,
+ SwInsertTableOptions& rInsTblFlags,
+ SwTableAutoFmt *& prTAFmt ) = 0;
+};
+
+class AbstractSwInsertDBColAutoPilot : public VclAbstractDialog // add for SwInsertDBColAutoPilot
+{
+public:
+
+ virtual void DataToDoc( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rSelection,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> rxSource,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xResultSet) = 0;
+};
+
+class AbstractDropDownFieldDialog : public VclAbstractDialog //add for DropDownFieldDialog
+{
+public:
+ virtual ByteString GetWindowState( ULONG nMask = WINDOWSTATE_MASK_ALL ) const = 0; //this method inherit from SystemWindow
+ virtual void SetWindowState( const ByteString& rStr ) =0;//this method inherit from SystemWindow
+};
+
+class AbstarctSwLabDlg : public SfxAbstractTabDialog //add for SwLabDlg
+{
+public:
+ virtual const String& GetBusinessCardStr() const = 0;
+ virtual Printer *GetPrt() =0;
+};
+
+class AbstarctSwSelGlossaryDlg : public VclAbstractDialog //add for SwSelGlossaryDlg
+{
+public:
+ virtual void InsertGlos(const String &rRegion, const String &rGlosName) = 0; // inline
+ virtual USHORT GetSelectedIdx() const = 0; // inline
+ virtual void SelectEntryPos(USHORT nIdx) = 0; // inline
+};
+
+class AbstractSwSplitTableDlg :public VclAbstractDialog //add for SwSplitTableDlg
+{
+public:
+ virtual BOOL IsHorizontal() const = 0;
+ virtual BOOL IsProportional() const = 0;
+ virtual long GetCount() const = 0;
+};
+
+class AbstractSwAutoFormatDlg : public VclAbstractDialog //add for SwAutoFormatDlg
+{
+public:
+ virtual void FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const = 0;
+};
+
+class AbstractSwFldDlg : public SfxAbstractTabDialog //add for SwFldDlg
+{
+public:
+ virtual void Start( BOOL bShow = TRUE ) = 0; //this method from sfxtabdialog
+ virtual void Initialize(SfxChildWinInfo *pInfo) = 0;
+ virtual void ReInitDlg() = 0;
+ virtual void ActivateDatabasePage() = 0;
+ virtual void ShowPage( USHORT nId ) = 0;// this method from SfxTabDialog
+ virtual Window * GetWindow() = 0; //this method is added for return a Window type pointer
+};
+
+class AbstractSwRenameXNamedDlg : public VclAbstractDialog //add for SwRenameXNamedDlg
+{
+public:
+ virtual void SetForbiddenChars( const String& rSet ) = 0;
+ virtual void SetAlternativeAccess(
+ STAR_REFERENCE( container::XNameAccess ) & xSecond,
+ STAR_REFERENCE( container::XNameAccess ) & xThird ) = 0;
+};
+
+class AbstractSwModalRedlineAcceptDlg : public VclAbstractDialog //add for SwModalRedlineAcceptDlg
+{
+public:
+ virtual void AcceptAll( BOOL bAccept ) = 0;
+};
+
+class AbstractMarkFloatDlg : public VclAbstractDialog //add for SwIndexMarkFloatDlg & SwAuthMarkFloatDlg
+{
+public:
+ virtual void ReInitDlg(SwWrtShell& rWrtShell) = 0;
+ virtual Window * GetWindow() = 0; //this method is added for return a Window type pointer
+};
+
+#define RET_LOAD_DOC 100
+#define RET_EDIT_DOC 101
+#define RET_EDIT_RESULT_DOC 102
+#define RET_TARGET_CREATED 103
+#define RET_REMOVE_TARGET 104
+
+class SwView;
+class SwMailMergeConfigItem;
+
+class AbstractMailMergeWizard : public VclAbstractDialog2
+{
+public:
+ virtual void SetReloadDocument(const String& rURL) = 0;
+ virtual const String& GetReloadDocument() const = 0;
+ virtual BOOL ShowPage( USHORT nLevel ) = 0;
+ virtual sal_uInt16 GetRestartPage() const = 0;
+};
+
+
+//-------Swabstract fractory
+class SwAbstractDialogFactory
+{
+public:
+ static SwAbstractDialogFactory* Create();
+
+ virtual SfxAbstractDialog* CreateSfxDialog( Window* pParent, //add for SvxMeasureDialog & SvxConnectionDialog
+ const SfxItemSet& rAttr,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame,
+ sal_uInt32 nResId
+ ) = 0;
+ virtual AbstractSwWordCountDialog* CreateSwWordCountDialog( Window* pWindow ) = 0;
+ virtual AbstractSwInsertAbstractDlg * CreateSwInsertAbstractDlg ( Window* pParent, int nResId) = 0; // add for SwInsertAbstractDlg
+ virtual AbstractSwAsciiFilterDlg* CreateSwAsciiFilterDlg ( Window* pParent, SwDocShell& rDocSh,
+ SvStream* pStream, int nResId ) = 0;// add for SwAsciiFilterDlg
+ virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, int nResId ) = 0;// add for SwInsertBookmarkDlg
+
+ virtual AbstractSwBreakDlg * CreateSwBreakDlg( Window *pParent, SwWrtShell &rSh,int nResId ) = 0; // add for SwBreakDlg
+ virtual VclAbstractDialog * CreateSwChangeDBDlg( SwView& rVw, int nResId ) = 0; //add for SwChangeDBDlg
+ virtual SfxAbstractTabDialog * CreateSwCharDlg( Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, int nResId, // add for SwCharDlg
+ const String* pFmtStr = 0, BOOL bIsDrwTxtDlg = FALSE) = 0;
+ virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg ( SwView& rView , int nResId, bool bToTable) = 0; //add for SwConvertTableDlg
+ virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId) = 0; //add for SwCaptionDialog
+
+ virtual AbstractSwInsertDBColAutoPilot* CreateSwInsertDBColAutoPilot( SwView& rView, // add for SwInsertDBColAutoPilot
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> rxSource,
+ com::sun::star::uno::Reference<com::sun::star::sdbcx::XColumnsSupplier> xColSupp,
+ const SwDBData& rData, int nResId) = 0;
+ virtual SfxAbstractTabDialog * CreateSwFootNoteOptionDlg( Window *pParent, SwWrtShell &rSh,int nResId) = 0;//add for SwFootNoteOptionDlg
+
+ virtual AbstractDropDownFieldDialog * CreateDropDownFieldDialog ( Window *pParent, SwWrtShell &rSh, //add for DropDownFieldDialog
+ SwField* pField,int nResId, BOOL bNextButton = FALSE ) = 0;
+ virtual SfxAbstractTabDialog* CreateSwEnvDlg ( Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, BOOL bInsert,int nResId ) = 0; //add for SwEnvDlg
+
+
+ virtual AbstarctSwLabDlg* CreateSwLabDlg ( Window* pParent, const SfxItemSet& rSet, //add for SwLabDlg
+ SwNewDBMgr* pNewDBMgr, BOOL bLabel,int nResId ) = 0;
+
+ virtual SwLabDlgMethod GetSwLabDlgStaticMethod () =0;//add for SwLabDlg
+
+ virtual SfxAbstractTabDialog* CreateSwParaDlg ( Window *pParent, //add for SwParaDlg
+ SwView& rVw,
+ const SfxItemSet& rCoreSet,
+ BYTE nDialogMode,
+ int nResId,
+ const String *pCollName = 0,
+ BOOL bDraw = FALSE,
+ UINT16 nDefPage = 0) = 0;
+
+ virtual AbstarctSwSelGlossaryDlg * CreateSwSelGlossaryDlg ( Window * pParent, const String &rShortName, int nResId ) = 0; //add for SwSelGlossaryDlg
+
+ virtual VclAbstractDialog * CreateVclAbstractDialog ( Window * pParent, SwWrtShell &rSh, int nResId ) = 0; //add for SwTableHeightDlg SwSortDlg
+ virtual AbstractSplitTableDialog * CreateSplitTblDialog ( Window * pParent, SwWrtShell &rSh ) = 0; //add for SwSplitTblDlg
+
+ virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( Window* pParent, SwWrtShell* pShell, //add for SwAutoFormatDlg
+ int nResId,
+ BOOL bSetAutoFmt = TRUE,
+ const SwTableAutoFmt* pSelFmt = 0 ) = 0;
+ virtual SfxAbstractDialog * CreateSwBorderDlg ( Window* pParent, SfxItemSet& rSet, USHORT nType, int nResId ) = 0;//add for SwBorderDlg
+ virtual SfxAbstractDialog * CreateSwWrapDlg ( Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, BOOL bDrawMode, int nResId ) = 0; //add for SwWrapDlg
+
+ virtual VclAbstractDialog * CreateSwTableWidthDlg ( Window *pParent, SwTableFUNC &rFnc , int nResId ) = 0; //add for SwTableWidthDlg
+ virtual SfxAbstractTabDialog* CreateSwTableTabDlg( Window* pParent, SfxItemPool& Pool,
+ const SfxItemSet* pItemSet, SwWrtShell* pSh,int nResId ) = 0; //add for SwTableTabDlg
+
+ virtual AbstractSwFldDlg * CreateSwFldDlg ( SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent, int nResId ) = 0; //add for SwFldDlg
+ virtual SfxAbstractDialog* CreateSwFldEditDlg ( SwView& rVw, int nResId ) = 0; //add for SwFldEditDlg
+ virtual AbstractSwRenameXNamedDlg * CreateSwRenameXNamedDlg( Window* pParent, //add for SwRenameXNamedDlg
+ STAR_REFERENCE( container::XNamed ) & xNamed,
+ STAR_REFERENCE( container::XNameAccess ) & xNameAccess, int nResId ) = 0;
+ virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg ( Window *pParent, int nResId ) = 0; //add for SwModalRedlineAcceptDlg
+
+ virtual VclAbstractDialog* CreateSwVclDialog( int nResId, Window* pParent, BOOL& rWithPrev ) = 0; //add for SwMergeTblDlg
+ virtual SfxAbstractTabDialog* CreateFrmTabDialog( int nResId,
+ SfxViewFrame *pFrame, Window *pParent,
+ const SfxItemSet& rCoreSet,
+ BOOL bNewFrm = TRUE,
+ USHORT nResType = DLG_FRM_STD,
+ BOOL bFmt = FALSE,
+ UINT16 nDefPage = 0,
+ const String* pFmtStr = 0) = 0; //add for SwFrmDlg
+ virtual SfxAbstractTabDialog* CreateTemplateDialog( int nResId,
+ Window* pParent,
+ SfxStyleSheetBase& rBase,
+ USHORT nRegion,
+ BOOL bColumn = FALSE,
+ SwWrtShell* pActShell = 0,
+ BOOL bNew = FALSE ) = 0; //add for SwTemplateDlg
+ virtual AbstractGlossaryDlg* CreateGlossaryDlg( int nResId,
+ SfxViewFrame* pViewFrame,
+ SwGlossaryHdl* pGlosHdl,
+ SwWrtShell *pWrtShell) = 0; //add for SwGlossaryDlg
+ virtual AbstractFldInputDlg* CreateFldInputDlg( int nResId,
+ Window *pParent, SwWrtShell &rSh,
+ SwField* pField, BOOL bNextButton = FALSE ) = 0; //add for SwFldInputDlg
+ virtual AbstractInsFootNoteDlg* CreateInsFootNoteDlg( int nResId,
+ Window * pParent, SwWrtShell &rSh, BOOL bEd = FALSE) = 0; //add for SwInsFootNoteDlg
+ virtual VclAbstractDialog * CreateVclSwViewDialog( int nResId,
+ SwView& rView, BOOL bCol = FALSE ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
+ virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
+ Window * pParent ) = 0; //add for SwInsertGrfRulerDlg
+ virtual AbstractInsTableDlg* CreateInsTableDlg( int nResId,
+ SwView& rView ) = 0; //add for SwInsTableDlg
+ virtual AbstractJavaEditDialog* CreateJavaEditDialog( int nResId,
+ Window* pParent, SwWrtShell* pWrtSh ) = 0; //add for SwJavaEditDialog
+ virtual AbstractMailMergeDlg* CreateMailMergeDlg( int nResId,
+ Window* pParent, SwWrtShell& rSh,
+ const String& rSourceName,
+ const String& rTblName,
+ sal_Int32 nCommandType,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& xConnection,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* pSelection = 0 ) = 0; //add for SwMailMergeDlg
+ virtual AbstractMailMergeCreateFromDlg* CreateMailMergeCreateFromDlg( int nResId,
+ Window* pParent ) = 0; //add for SwMailMergeCreateFromDlg
+ virtual AbstractMailMergeFieldConnectionsDlg* CreateMailMergeFieldConnectionsDlg( int nResId,
+ Window* pParent ) = 0; //add for SwMailMergeFieldConnectionsDlg
+ virtual VclAbstractDialog* CreateMultiTOXMarkDlg( int nResId,
+ Window* pParent, SwTOXMgr &rTOXMgr ) = 0; //add for SwMultiTOXMarkDlg
+ virtual SfxAbstractTabDialog* CreateSwTabDialog( int nResId,
+ Window* pParent,
+ const SfxItemSet* pSwItemSet,
+ SwWrtShell &) = 0; //add for SwSvxNumBulletTabDialog, SwOutlineTabDialog
+ virtual AbstractMultiTOXTabDialog* CreateMultiTOXTabDialog( int nResId,
+ Window* pParent, const SfxItemSet& rSet,
+ SwWrtShell &rShell,
+ SwTOXBase* pCurTOX, USHORT nToxType = USHRT_MAX,
+ BOOL bGlobal = FALSE) = 0; //add for SwMultiTOXTabDialog
+ virtual AbstractEditRegionDlg* CreateEditRegionDlg( int nResId,
+ Window* pParent, SwWrtShell& rWrtSh ) = 0; //add for SwEditRegionDlg
+ virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( int nResId,
+ Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh ) = 0; //add for SwInsertSectionTabDialog
+ virtual AbstractMarkFloatDlg* CreateIndexMarkFloatDlg( int nResId,
+ SfxBindings* pBindings,
+ SfxChildWindow* pChild,
+ Window *pParent,
+ SfxChildWinInfo* pInfo,
+ sal_Bool bNew=sal_True) = 0; //add for SwIndexMarkFloatDlg
+ virtual AbstractMarkFloatDlg* CreateAuthMarkFloatDlg( int nResId,
+ SfxBindings* pBindings,
+ SfxChildWindow* pChild,
+ Window *pParent,
+ SfxChildWinInfo* pInfo,
+ sal_Bool bNew=sal_True) = 0; //add for SwAuthMarkFloatDlg
+ virtual VclAbstractDialog * CreateIndexMarkModalDlg( int nResId,
+ Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark ) = 0; //add for SwIndexMarkModalDlg
+
+ virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem) = 0;
+
+ //add for static func in SwGlossaryDlg
+ virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( USHORT nId ) = 0;
+ virtual GlossarySetActGroup SetGlossaryActGroupFunc( USHORT nId ) = 0;
+
+ // for tabpage
+ virtual CreateTabPage GetTabPageCreatorFunc( USHORT nId ) = 0;
+ virtual GetTabPageRanges GetTabPageRangesFunc( USHORT nId ) = 0;
+};
+#endif
+
diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx
new file mode 100644
index 000000000000..aed3597b2478
--- /dev/null
+++ b/sw/inc/swacorr.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWACORR_HXX
+#define _SWACORR_HXX
+
+#include <editeng/svxacorr.hxx>
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/embed/XStorage.hpp>
+
+class SwAutoCorrect : public SvxAutoCorrect
+{
+ using SvxAutoCorrect::PutText;
+
+protected:
+ // - return den Ersetzungstext (nur fuer SWG-Format, alle anderen
+ // koennen aus der Wortliste herausgeholt werden!)
+ // rShort ist der Stream-Name - gecryptet!
+ virtual BOOL GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& , const String& rFileName, const String& rShort, String& rLong );
+
+ // - Text mit Attributierung (kann nur der SWG - SWG-Format!)
+ // rShort ist der Stream-Name - gecryptet!
+ virtual BOOL PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String& rFileName, const String& rShort, SfxObjectShell& ,
+ String& );
+
+public:
+ TYPEINFO();
+
+ SwAutoCorrect( const SvxAutoCorrect& rACorr );
+ virtual ~SwAutoCorrect();
+};
+
+
+#endif
+
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
new file mode 100644
index 000000000000..c64307845d6f
--- /dev/null
+++ b/sw/inc/swatrset.hxx
@@ -0,0 +1,353 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWATRSET_HXX
+#define _SWATRSET_HXX
+#include <tools/solar.h>
+#include <tools/mempool.hxx>
+#include <svl/itemset.hxx>
+#include <svl/itempool.hxx>
+#include <swdllapi.h>
+
+class SwModify;
+class SwDoc;
+class OutputDevice;
+class IDocumentSettingAccess;
+class SfxBoolItem;
+class SvxPostureItem;
+class SvxWeightItem;
+class SvxShadowedItem;
+class SvxAutoKernItem;
+class SvxWordLineModeItem;
+class SvxContourItem;
+class SvxKerningItem;
+class SvxUnderlineItem;
+class SvxOverlineItem;
+class SvxCrossedOutItem;
+class SvxFontHeightItem;
+class SvxPropSizeItem;
+class SvxFontItem;
+class SvxColorItem;
+class SvxCharSetColorItem;
+class SvxLanguageItem;
+class SvxEscapementItem;
+class SvxCaseMapItem;
+class SvxNoHyphenItem;
+class SvxBlinkItem;
+class SvxEmphasisMarkItem;
+class SvxTwoLinesItem;
+class SvxCharScaleWidthItem;
+class SvxCharRotateItem;
+class SvxCharReliefItem;
+class SvxCharHiddenItem;
+
+// Frame-Attribute
+class SwFmtFillOrder;
+class SwFmtFrmSize;
+class SvxPaperBinItem;
+class SvxLRSpaceItem;
+class SvxULSpaceItem;
+class SwFmtCntnt;
+class SwFmtHeader;
+class SwFmtFooter;
+class SvxPrintItem;
+class SvxOpaqueItem;
+class SvxProtectItem;
+class SwFmtSurround;
+class SwFmtVertOrient;
+class SwFmtHoriOrient;
+class SwFmtAnchor;
+class SvxBoxItem;
+class SvxBrushItem;
+class SvxShadowItem;
+class SwFmtPageDesc;
+class SvxFmtBreakItem;
+class SwFmtCol;
+class SvxMacroItem;
+class SvxFmtKeepItem;
+class SwFmtURL;
+class SwFmtLineNumber;
+class SwFmtEditInReadonly;
+class SwFmtLayoutSplit;
+class SwFmtRowSplit;
+class SwFmtChain;
+class SwFmtFtnAtTxtEnd;
+class SwFmtEndAtTxtEnd;
+class SwFmtNoBalancedColumns;
+class SvxFrameDirectionItem;
+class SwTextGridItem;
+class SwHeaderAndFooterEatSpacingItem;
+// OD 18.09.2003 #i18732#
+class SwFmtFollowTextFlow;
+// OD 2004-05-05 #i28701#
+class SwFmtWrapInfluenceOnObjPos;
+
+// Grafik-Attribute
+class SwMirrorGrf;
+class SwCropGrf;
+class SwRotationGrf;
+class SwLuminanceGrf;
+class SwContrastGrf;
+class SwChannelRGrf;
+class SwChannelGGrf;
+class SwChannelBGrf;
+class SwGammaGrf;
+class SwInvertGrf;
+class SwTransparencyGrf;
+class SwDrawModeGrf;
+
+// Paragraph-Attribute
+class SvxLineSpacingItem;
+class SvxAdjustItem;
+class SvxFmtSplitItem;
+class SwRegisterItem;
+class SwNumRuleItem;
+class SvxWidowsItem;
+class SvxOrphansItem;
+class SvxTabStopItem;
+class SvxHyphenZoneItem;
+class SwFmtDrop;
+class SvxScriptSpaceItem;
+class SvxHangingPunctuationItem;
+class SvxForbiddenRuleItem;
+class SvxParaVertAlignItem;
+class SvxParaGridItem;
+class SwParaConnectBorderItem;
+
+// TabellenBox-Attribute
+class SwTblBoxNumFormat;
+class SwTblBoxFormula;
+class SwTblBoxValue;
+
+class SwAttrPool : public SfxItemPool
+{
+ friend void _InitCore(); // fuers anlegen/zerstoeren der
+ friend void _FinitCore(); // Versionsmaps
+ static USHORT* pVersionMap1;
+ static USHORT* pVersionMap2;
+ static USHORT* pVersionMap3;
+ static USHORT* pVersionMap4;
+ // OD 2004-01-21 #i18732# - due to extension of attribute set a new version
+ // map for binary filter is necessary (version map 5).
+ static USHORT* pVersionMap5;
+ static USHORT* pVersionMap6;
+
+ SwDoc* pDoc;
+
+public:
+ SwAttrPool( SwDoc* pDoc );
+protected:
+ virtual ~SwAttrPool();
+public:
+
+ SwDoc* GetDoc() { return pDoc; }
+ const SwDoc* GetDoc() const { return pDoc; }
+
+ static USHORT* GetVersionMap1() { return pVersionMap1; }
+ static USHORT* GetVersionMap2() { return pVersionMap2; }
+ static USHORT* GetVersionMap3() { return pVersionMap3; }
+ static USHORT* GetVersionMap6() { return pVersionMap4; }
+};
+
+
+class SW_DLLPUBLIC SwAttrSet : public SfxItemSet
+{
+ // Pointer fuers Modify-System
+ SwAttrSet *pOldSet, *pNewSet;
+
+ // Notification-Callback
+ virtual void Changed( const SfxPoolItem& rOld, const SfxPoolItem& rNew );
+
+ void PutChgd( const SfxPoolItem& rI ) { SfxItemSet::PutDirect( rI ); }
+public:
+ SwAttrSet( SwAttrPool&, USHORT nWhich1, USHORT nWhich2 );
+ SwAttrSet( SwAttrPool&, const USHORT* nWhichPairTable );
+ SwAttrSet( const SwAttrSet& );
+
+ virtual SfxItemSet* Clone(BOOL bItems = TRUE, SfxItemPool *pToPool = 0) const;
+
+ int Put_BC( const SfxPoolItem& rAttr, SwAttrSet* pOld, SwAttrSet* pNew );
+ int Put_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew );
+
+ // ein Item oder einen Bereich loeschen
+ USHORT ClearItem_BC( USHORT nWhich, SwAttrSet* pOld, SwAttrSet* pNew );
+ USHORT ClearItem_BC( USHORT nWhich1, USHORT nWhich2,
+ SwAttrSet* pOld = 0, SwAttrSet* pNew = 0 );
+
+ int Intersect_BC( const SfxItemSet& rSet, SwAttrSet* pOld, SwAttrSet* pNew );
+
+ void GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText ) const;
+
+ SwAttrPool* GetPool() const { return (SwAttrPool*)SfxItemSet::GetPool(); }
+
+ // kopiere die Attribute ggfs. ueber Dokumentgrenzen
+ void CopyToModify( SwModify& rMod ) const;
+
+ // ----------------------------------------------------------------
+ // Sonderbehandlung fuer einige Attribute
+ // Setze den Modify-Pointer (alten pDefinedIn) bei folgenden Attributen:
+ // - SwFmtDropCaps
+ // - SwFmtPageDesc
+ // (Wird beim Einfuegen in Formate/Nodes gerufen)
+ // Second version is for the SwAttrSet handles of SwCntntNode.
+ bool SetModifyAtAttr( const SwModify* pModify );
+
+ // Das Doc wird jetzt am SwAttrPool gesetzt. Dadurch hat man es immer
+ // im Zugriff.
+ const SwDoc *GetDoc() const { return GetPool()->GetDoc(); }
+ SwDoc *GetDoc() { return GetPool()->GetDoc(); }
+
+ // GetMethoden: das Bool gibt an, ob nur im Set (FALSE) oder auch in
+ // den Parents gesucht werden soll. Wird nichts gefunden,
+ // wird das deflt. Attribut returnt.
+ // Charakter-Attribute - impl. steht im charatr.hxx
+ // AMA 12.10.94: Umstellung von SwFmt... auf Svx...
+ inline const SvxPostureItem &GetPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetWeight( BOOL = TRUE ) const;
+ inline const SvxShadowedItem &GetShadowed( BOOL = TRUE ) const;
+ inline const SvxAutoKernItem &GetAutoKern( BOOL = TRUE ) const;
+ inline const SvxWordLineModeItem &GetWordLineMode( BOOL = TRUE ) const;
+ inline const SvxContourItem &GetContour( BOOL = TRUE ) const;
+ inline const SvxKerningItem &GetKerning( BOOL = TRUE ) const;
+ inline const SvxUnderlineItem &GetUnderline( BOOL = TRUE ) const;
+ inline const SvxOverlineItem &GetOverline( BOOL = TRUE ) const;
+ inline const SvxCrossedOutItem &GetCrossedOut( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetSize( BOOL = TRUE ) const;
+ inline const SvxPropSizeItem &GetPropSize( BOOL = TRUE ) const;
+ inline const SvxFontItem &GetFont( BOOL = TRUE ) const;
+ inline const SvxColorItem &GetColor( BOOL = TRUE ) const;
+ inline const SvxCharSetColorItem &GetCharSetColor( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetLanguage( BOOL = TRUE ) const;
+ inline const SvxEscapementItem &GetEscapement( BOOL = TRUE ) const;
+ inline const SvxCaseMapItem &GetCaseMap( BOOL = TRUE ) const;
+ inline const SvxNoHyphenItem &GetNoHyphenHere( BOOL = TRUE ) const;
+ inline const SvxBlinkItem &GetBlink( BOOL = TRUE ) const;
+ inline const SvxBrushItem &GetChrBackground( BOOL = TRUE ) const;
+ inline const SvxFontItem &GetCJKFont( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetCJKSize( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetCJKLanguage( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetCJKPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetCJKWeight( BOOL = TRUE ) const;
+ inline const SvxFontItem &GetCTLFont( BOOL = TRUE ) const;
+ inline const SvxFontHeightItem &GetCTLSize( BOOL = TRUE ) const;
+ inline const SvxLanguageItem &GetCTLLanguage( BOOL = TRUE ) const;
+ inline const SvxPostureItem &GetCTLPosture( BOOL = TRUE ) const;
+ inline const SvxWeightItem &GetCTLWeight( BOOL = TRUE ) const;
+ inline const SfxBoolItem &GetWritingDirection( BOOL = TRUE ) const;
+ inline const SvxEmphasisMarkItem &GetEmphasisMark( BOOL = TRUE ) const;
+ inline const SvxTwoLinesItem &Get2Lines( BOOL = TRUE ) const;
+ inline const SvxCharScaleWidthItem &GetCharScaleW( BOOL = TRUE ) const;
+ inline const SvxCharRotateItem &GetCharRotate( BOOL = TRUE ) const;
+ inline const SvxCharReliefItem &GetCharRelief( BOOL = TRUE ) const;
+ inline const SvxCharHiddenItem &GetCharHidden( BOOL = TRUE ) const;
+
+ // Frame-Attribute - impl. steht im frmatr.hxx
+ inline const SwFmtFillOrder &GetFillOrder( BOOL = TRUE ) const;
+ inline const SwFmtFrmSize &GetFrmSize( BOOL = TRUE ) const;
+ inline const SvxPaperBinItem &GetPaperBin( BOOL = TRUE ) const;
+ inline const SvxLRSpaceItem &GetLRSpace( BOOL = TRUE ) const;
+ inline const SvxULSpaceItem &GetULSpace( BOOL = TRUE ) const;
+ inline const SwFmtCntnt &GetCntnt( BOOL = TRUE ) const;
+ inline const SwFmtHeader &GetHeader( BOOL = TRUE ) const;
+ inline const SwFmtFooter &GetFooter( BOOL = TRUE ) const;
+ inline const SvxPrintItem &GetPrint( BOOL = TRUE ) const;
+ inline const SvxOpaqueItem &GetOpaque( BOOL = TRUE ) const;
+ inline const SvxProtectItem &GetProtect( BOOL = TRUE ) const;
+ inline const SwFmtSurround &GetSurround( BOOL = TRUE ) const;
+ inline const SwFmtVertOrient &GetVertOrient( BOOL = TRUE ) const;
+ inline const SwFmtHoriOrient &GetHoriOrient( BOOL = TRUE ) const;
+ inline const SwFmtAnchor &GetAnchor( BOOL = TRUE ) const;
+ inline const SvxBoxItem &GetBox( BOOL = TRUE ) const;
+ inline const SvxFmtKeepItem &GetKeep( BOOL = TRUE ) const;
+ inline const SvxBrushItem &GetBackground( BOOL = TRUE ) const;
+ inline const SvxShadowItem &GetShadow( BOOL = TRUE ) const;
+ inline const SwFmtPageDesc &GetPageDesc( BOOL = TRUE ) const;
+ inline const SvxFmtBreakItem &GetBreak( BOOL = TRUE ) const;
+ inline const SwFmtCol &GetCol( BOOL = TRUE ) const;
+ inline const SvxMacroItem &GetMacro( BOOL = TRUE ) const;
+ inline const SwFmtURL &GetURL( BOOL = TRUE ) const;
+ inline const SwFmtEditInReadonly &GetEditInReadonly( BOOL = TRUE ) const;
+ inline const SwFmtLayoutSplit &GetLayoutSplit( BOOL = TRUE ) const;
+ inline const SwFmtRowSplit &GetRowSplit( BOOL = TRUE ) const;
+ inline const SwFmtChain &GetChain( BOOL = TRUE ) const;
+ inline const SwFmtLineNumber &GetLineNumber( BOOL = TRUE ) const;
+ inline const SwFmtFtnAtTxtEnd &GetFtnAtTxtEnd( BOOL = TRUE ) const;
+ inline const SwFmtEndAtTxtEnd &GetEndAtTxtEnd( BOOL = TRUE ) const;
+ inline const SwFmtNoBalancedColumns &GetBalancedColumns( BOOL = TRUE ) const;
+ inline const SvxFrameDirectionItem &GetFrmDir( BOOL = TRUE ) const;
+ inline const SwTextGridItem &GetTextGrid( BOOL = TRUE ) const;
+ inline const SwHeaderAndFooterEatSpacingItem &GetHeaderAndFooterEatSpacing( BOOL = TRUE ) const;
+ // OD 18.09.2003 #i18732#
+ inline const SwFmtFollowTextFlow &GetFollowTextFlow(BOOL = TRUE) const;
+ // OD 2004-05-05 #i28701#
+ inline const SwFmtWrapInfluenceOnObjPos& GetWrapInfluenceOnObjPos(BOOL = TRUE) const;
+
+ // Grafik-Attribute - impl. steht im grfatr.hxx
+ inline const SwMirrorGrf &GetMirrorGrf( BOOL = TRUE ) const;
+ inline const SwCropGrf &GetCropGrf( BOOL = TRUE ) const;
+ inline const SwRotationGrf &GetRotationGrf(BOOL = TRUE ) const;
+ inline const SwLuminanceGrf &GetLuminanceGrf(BOOL = TRUE ) const;
+ inline const SwContrastGrf &GetContrastGrf(BOOL = TRUE ) const;
+ inline const SwChannelRGrf &GetChannelRGrf(BOOL = TRUE ) const;
+ inline const SwChannelGGrf &GetChannelGGrf(BOOL = TRUE ) const;
+ inline const SwChannelBGrf &GetChannelBGrf(BOOL = TRUE ) const;
+ inline const SwGammaGrf &GetGammaGrf(BOOL = TRUE ) const;
+ inline const SwInvertGrf &GetInvertGrf(BOOL = TRUE ) const;
+ inline const SwTransparencyGrf &GetTransparencyGrf(BOOL = TRUE ) const;
+ inline const SwDrawModeGrf &GetDrawModeGrf(BOOL = TRUE ) const;
+
+ // Paragraph-Attribute - impl. steht im paratr.hxx
+ inline const SvxLineSpacingItem &GetLineSpacing( BOOL = TRUE ) const;
+ inline const SvxAdjustItem &GetAdjust( BOOL = TRUE ) const;
+ inline const SvxFmtSplitItem &GetSplit( BOOL = TRUE ) const;
+ inline const SwRegisterItem &GetRegister( BOOL = TRUE ) const;
+ inline const SwNumRuleItem &GetNumRule( BOOL = TRUE ) const;
+ inline const SvxWidowsItem &GetWidows( BOOL = TRUE ) const;
+ inline const SvxOrphansItem &GetOrphans( BOOL = TRUE ) const;
+ inline const SvxTabStopItem &GetTabStops( BOOL = TRUE ) const;
+ inline const SvxHyphenZoneItem &GetHyphenZone( BOOL = TRUE ) const;
+ inline const SwFmtDrop &GetDrop( BOOL = TRUE ) const;
+ inline const SvxScriptSpaceItem &GetScriptSpace(BOOL = TRUE) const;
+ inline const SvxHangingPunctuationItem &GetHangingPunctuation(BOOL = TRUE) const;
+ inline const SvxForbiddenRuleItem &GetForbiddenRule(BOOL = TRUE) const;
+ inline const SvxParaVertAlignItem &GetParaVertAlign(BOOL = TRUE) const;
+ inline const SvxParaGridItem &GetParaGrid(BOOL = TRUE) const;
+ inline const SwParaConnectBorderItem &GetParaConnectBorder(BOOL = TRUE ) const;
+
+ // TabellenBox-Attribute - impl. steht im cellatr.hxx
+ inline const SwTblBoxNumFormat &GetTblBoxNumFmt( BOOL = TRUE ) const;
+ inline const SwTblBoxFormula &GetTblBoxFormula( BOOL = TRUE ) const;
+ inline const SwTblBoxValue &GetTblBoxValue( BOOL = TRUE ) const;
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwAttrSet)
+};
+
+//Helper for filters to find true lineheight of a font
+SW_DLLPUBLIC long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess,
+ const SwAttrSet &rSet,
+ const OutputDevice &rOut, sal_Int16 nScript);
+#endif
diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx
new file mode 100644
index 000000000000..de70c0a250f0
--- /dev/null
+++ b/sw/inc/swbaslnk.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWBASLNK_HXX
+#define _SWBASLNK_HXX
+
+#include <sfx2/lnkbase.hxx>
+
+class SwNode;
+class SwCntntNode;
+class ReReadThread;
+long GrfNodeChanged( void* pLink, void* pCaller );
+
+class SwBaseLink : public ::sfx2::SvBaseLink
+{
+ friend long GrfNodeChanged( void* pLink, void* pCaller );
+
+ SwCntntNode* pCntntNode;
+ BOOL bSwapIn : 1;
+ BOOL bNoDataFlag : 1;
+ BOOL bIgnoreDataChanged : 1;
+ ReReadThread* m_pReReadThread;
+
+protected:
+ SwBaseLink(): m_pReReadThread(0) {}
+
+ SwBaseLink( const String& rNm, USHORT nObjectType, ::sfx2::SvLinkSource* pObj,
+ SwCntntNode* pNode = 0 )
+ : ::sfx2::SvBaseLink( rNm, nObjectType, pObj ), pCntntNode( pNode ),
+ bSwapIn( FALSE ), bNoDataFlag( FALSE ), bIgnoreDataChanged( FALSE ),
+ m_pReReadThread(0)
+ {}
+
+public:
+ TYPEINFO();
+
+ SwBaseLink( USHORT nMode, USHORT nFormat, SwCntntNode* pNode = 0 )
+ : ::sfx2::SvBaseLink( nMode, nFormat ), pCntntNode( pNode ),
+ bSwapIn( FALSE ), bNoDataFlag( FALSE ), bIgnoreDataChanged( FALSE ),
+ m_pReReadThread(0)
+ {}
+ virtual ~SwBaseLink();
+
+ virtual void DataChanged( const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue );
+
+ virtual void Closed();
+
+ virtual const SwNode* GetAnchor() const;
+
+ SwCntntNode *GetCntntNode() { return pCntntNode; }
+
+ // nur fuer Grafiken
+ BOOL SwapIn( BOOL bWaitForData = FALSE, BOOL bNativFormat = FALSE );
+
+ BOOL Connect() { return 0 != SvBaseLink::GetRealObject(); }
+
+ // nur fuer Grafik-Links ( zum Umschalten zwischen DDE / Grf-Link)
+ void SetObjType( USHORT nType ) { SvBaseLink::SetObjType( nType ); }
+
+ BOOL IsRecursion( const SwBaseLink* pChkLnk ) const;
+ virtual BOOL IsInRange( ULONG nSttNd, ULONG nEndNd, xub_StrLen nStt = 0,
+ xub_StrLen nEnd = STRING_NOTFOUND ) const;
+
+ void SetNoDataFlag() { bNoDataFlag = TRUE; }
+ BOOL ChkNoDataFlag() { BOOL bRet = bNoDataFlag; bNoDataFlag = FALSE; return bRet; }
+ BOOL IsNoDataFlag() const { return bNoDataFlag; }
+};
+
+
+#endif
+
diff --git a/sw/inc/swcalwrp.hxx b/sw/inc/swcalwrp.hxx
new file mode 100644
index 000000000000..1f0e9c7a8348
--- /dev/null
+++ b/sw/inc/swcalwrp.hxx
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWCALWRP_HXX
+#define _SWCALWRP_HXX
+
+#include <i18npool/lang.h>
+#include <tools/string.hxx>
+#include <unotools/calendarwrapper.hxx>
+#include <salhelper/singletonref.hxx>
+
+class SwCalendarWrapper : public CalendarWrapper
+{
+ String sUniqueId;
+ USHORT nLang;
+
+public:
+ SwCalendarWrapper( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xMSF = ::comphelper::getProcessServiceFactory() )
+ : CalendarWrapper( xMSF ), nLang( LANGUAGE_SYSTEM )
+ {}
+
+ void LoadDefaultCalendar( USHORT nLang );
+};
+
+
+salhelper::SingletonRef<SwCalendarWrapper>* s_getCalendarWrapper();
+
+
+#endif
+
diff --git a/sw/inc/swcli.hxx b/sw/inc/swcli.hxx
new file mode 100644
index 000000000000..518d7885422c
--- /dev/null
+++ b/sw/inc/swcli.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWCLI_HXX
+#define _SWCLI_HXX
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+
+#include <svtools/embedhlp.hxx>
+
+#ifndef _SFX_CLIENTSH_HXX //autogen
+#include <sfx2/ipclient.hxx>
+#endif
+
+class SwView;
+class SwEditWin;
+
+class SwOleClient : public SfxInPlaceClient
+{
+ BOOL bInDoVerb;
+ BOOL bOldCheckForOLEInCaption;
+
+ virtual void ObjectAreaChanged();
+ virtual void RequestNewObjectArea( Rectangle& );
+ virtual void ViewChanged();
+ virtual void MakeVisible();
+
+public:
+ SwOleClient( SwView *pView, SwEditWin *pWin, const svt::EmbeddedObjectRef& );
+
+ void SetInDoVerb( BOOL bFlag ) { bInDoVerb = bFlag; }
+
+ BOOL IsCheckForOLEInCaption() const { return bOldCheckForOLEInCaption; }
+};
+
+#endif
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
new file mode 100644
index 000000000000..49a95e9b7c41
--- /dev/null
+++ b/sw/inc/swcrsr.hxx
@@ -0,0 +1,312 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWCRSR_HXX
+#define _SWCRSR_HXX
+
+#include <com/sun/star/i18n/WordType.hpp>
+
+#include <pam.hxx>
+#include <tblsel.hxx>
+#include <cshtyp.hxx>
+
+
+struct _SwCursor_SavePos;
+
+namespace com { namespace sun { namespace star { namespace util {
+ struct SearchOptions;
+} } } }
+
+
+// ein Basis-Struktur fuer die Parameter der Find-Methoden
+// return - Werte vom Found-Aufruf.
+const int FIND_NOT_FOUND = 0;
+const int FIND_FOUND = 1;
+const int FIND_NO_RING = 2;
+
+struct SwFindParas
+{
+ virtual int Find( SwPaM*, SwMoveFn, const SwPaM*, BOOL ) = 0;
+ virtual int IsReplaceMode() const = 0;
+};
+
+typedef USHORT SwCursorSelOverFlags;
+namespace nsSwCursorSelOverFlags
+{
+ const SwCursorSelOverFlags SELOVER_NONE = 0x00;
+ const SwCursorSelOverFlags SELOVER_CHECKNODESSECTION = 0x01;
+ const SwCursorSelOverFlags SELOVER_TOGGLE = 0x02;
+ const SwCursorSelOverFlags SELOVER_ENABLEREVDIREKTION = 0x04;
+ const SwCursorSelOverFlags SELOVER_CHANGEPOS = 0x08;
+}
+
+class SwCursor : public SwPaM
+{
+ friend class SwCrsrSaveState;
+
+ _SwCursor_SavePos* pSavePos;
+ long mnRowSpanOffset; // required for travelling in tabs with rowspans
+ BYTE nCursorBidiLevel; // bidi level of the cursor
+ bool mbColumnSelection; // true: cursor is aprt of a column selection
+
+ ULONG FindAll( SwFindParas& , SwDocPositions, SwDocPositions, FindRanges, BOOL& bCancel );
+
+ using SwPaM::Find;
+
+protected:
+ virtual _SwCursor_SavePos* CreateNewSavePos() const;
+ void SaveState();
+ void RestoreState();
+
+ const _SwCursor_SavePos* GetSavePos() const { return pSavePos; }
+
+ virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
+ BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
+ virtual void DoSetBidiLevelUpDown();
+ virtual bool IsSelOvrCheck(int eFlags);
+
+public:
+ // single argument ctors shall be explicit.
+ SwCursor( const SwPosition &rPos, SwPaM* pRing, bool bColumnSel );
+ virtual ~SwCursor();
+
+ // @@@ semantic: no copy ctor.
+ SwCursor( SwCursor& rCpy);
+private:
+ // forbidden and not implemented.
+ //SwCursor( const SwCursor& );
+ // @@@ used e.g. in core/frmedt/fetab.cxx @@@
+ // SwCursor & operator= ( const SwCursor& );
+public:
+
+ virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
+
+ virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
+ virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
+
+ void FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const;
+ SwMoveFnCollection* MakeFindRange( SwDocPositions, SwDocPositions,
+ SwPaM* ) const;
+
+
+ ULONG Find( const com::sun::star::util::SearchOptions& rSearchOpt,
+ BOOL bSearchInNotes,
+ SwDocPositions nStart, SwDocPositions nEnde,
+ BOOL& bCancel,
+ FindRanges = FND_IN_BODY,
+ int bReplace = FALSE );
+ ULONG Find( const SwTxtFmtColl& rFmtColl,
+ SwDocPositions nStart, SwDocPositions nEnde,
+ BOOL& bCancel,
+ FindRanges = FND_IN_BODY,
+ const SwTxtFmtColl* pReplFmt = 0 );
+ ULONG Find( const SfxItemSet& rSet, BOOL bNoCollections,
+ SwDocPositions nStart, SwDocPositions nEnde,
+ BOOL& bCancel,
+ FindRanges = FND_IN_BODY,
+ const com::sun::star::util::SearchOptions* pSearchOpt = 0,
+ const SfxItemSet* rReplSet = 0 );
+
+ // UI versions
+ BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ BOOL IsEndWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ BOOL IsInWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES ) const;
+ BOOL IsStartEndSentence( bool bEnd ) const;
+ BOOL GoStartWord();
+ BOOL GoEndWord();
+ BOOL GoNextWord();
+ BOOL GoPrevWord();
+ BOOL SelectWord( const Point* pPt = 0 );
+
+ // API versions of above functions (will be used with a different
+ // WordType for the break iterator)
+ BOOL IsStartWordWT( sal_Int16 nWordType ) const;
+ BOOL IsEndWordWT( sal_Int16 nWordType ) const;
+ BOOL IsInWordWT( sal_Int16 nWordType ) const;
+ BOOL GoStartWordWT( sal_Int16 nWordType );
+ BOOL GoEndWordWT( sal_Int16 nWordType );
+ BOOL GoNextWordWT( sal_Int16 nWordType );
+ BOOL GoPrevWordWT( sal_Int16 nWordType );
+ BOOL SelectWordWT( sal_Int16 nWordType, const Point* pPt = 0 );
+
+ enum SentenceMoveType
+ {
+ NEXT_SENT,
+ PREV_SENT,
+ START_SENT,
+ END_SENT
+ };
+ BOOL GoSentence(SentenceMoveType eMoveType);
+ BOOL GoNextSentence(){return GoSentence(NEXT_SENT);}
+ BOOL GoEndSentence(){return GoSentence(END_SENT);}
+ BOOL GoPrevSentence(){return GoSentence(PREV_SENT);}
+ BOOL GoStartSentence(){return GoSentence(START_SENT);}
+ BOOL ExpandToSentenceBorders();
+
+ virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
+ BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
+ BOOL UpDown( BOOL bUp, USHORT nCnt, Point* pPt, long nUpDownX );
+ BOOL LeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE );
+ BOOL IsAtLeftRightMargin( BOOL bLeftMargin, BOOL bAPI = FALSE ) const;
+ BOOL SttEndDoc( BOOL bSttDoc );
+ BOOL GoPrevNextCell( BOOL bNext, USHORT nCnt );
+
+ BOOL Left( USHORT nCnt, USHORT nMode, BOOL bAllowVisual, BOOL bSkipHidden )
+ { return LeftRight( TRUE, nCnt, nMode, bAllowVisual, bSkipHidden, FALSE ); }
+ BOOL Right( USHORT nCnt, USHORT nMode, BOOL bAllowVisual, BOOL bSkipHidden )
+ { return LeftRight( FALSE, nCnt, nMode, bAllowVisual, bSkipHidden, FALSE ); }
+ BOOL GoNextCell( USHORT nCnt = 1 ) { return GoPrevNextCell( TRUE, nCnt ); }
+ BOOL GoPrevCell( USHORT nCnt = 1 ) { return GoPrevNextCell( FALSE, nCnt ); }
+ virtual BOOL GotoTable( const String& rName );
+ BOOL GotoTblBox( const String& rName );
+ BOOL GotoRegion( const String& rName );
+ BOOL GotoFtnAnchor();
+ BOOL GotoFtnTxt();
+ BOOL GotoNextFtnAnchor();
+ BOOL GotoPrevFtnAnchor();
+ BOOL GotoNextFtnCntnt();
+ BOOL GotoPrevFtnCntnt();
+
+ BOOL MovePara( SwWhichPara, SwPosPara );
+ BOOL MoveSection( SwWhichSection, SwPosSection );
+ BOOL MoveTable( SwWhichTable, SwPosTable );
+ BOOL MoveRegion( SwWhichRegion, SwPosRegion );
+
+
+ // gibt es eine Selection vom Content in die Tabelle
+ // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
+ virtual BOOL IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+ virtual BOOL IsInProtectTable( BOOL bMove = FALSE,
+ BOOL bChgCrsr = TRUE );
+ BOOL IsNoCntnt() const;
+
+ void RestoreSavePos(); // Point auf die SavePos setzen
+
+ // TRUE: an die Position kann der Cursor gesetzt werden
+ virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+
+ // darf der Cursor in ReadOnlyBereiche?
+ virtual bool IsReadOnlyAvailable() const;
+
+ virtual BOOL IsSkipOverProtectSections() const;
+ virtual BOOL IsSkipOverHiddenSections() const;
+
+ BYTE GetCrsrBidiLevel() const { return nCursorBidiLevel; }
+ void SetCrsrBidiLevel( BYTE nNewLevel ) { nCursorBidiLevel = nNewLevel; }
+
+ bool IsColumnSelection() const { return mbColumnSelection; }
+ void SetColumnSelection( bool bNew ) { mbColumnSelection = bNew; }
+
+ long GetCrsrRowSpanOffset() const { return mnRowSpanOffset; }
+ void SetCrsrRowSpanOffset( long nNew ) { mnRowSpanOffset = nNew; }
+
+ DECL_FIXEDMEMPOOL_NEWDEL( SwCursor )
+};
+
+
+class SwCrsrSaveState
+{
+ SwCursor& rCrsr;
+public:
+ SwCrsrSaveState( SwCursor& rC ) : rCrsr( rC ) { rC.SaveState(); }
+ ~SwCrsrSaveState() { rCrsr.RestoreState(); }
+};
+
+struct _SwCursor_SavePos
+{
+ ULONG nNode;
+ xub_StrLen nCntnt;
+ _SwCursor_SavePos* pNext;
+
+ _SwCursor_SavePos( const SwCursor& rCrsr )
+ : nNode( rCrsr.GetPoint()->nNode.GetIndex() ),
+ nCntnt( rCrsr.GetPoint()->nContent.GetIndex() ),
+ pNext( 0 )
+ {}
+ virtual ~_SwCursor_SavePos() {}
+
+ DECL_FIXEDMEMPOOL_NEWDEL( _SwCursor_SavePos )
+};
+
+
+
+class SwTableCursor : public virtual SwCursor
+{
+
+protected:
+ ULONG nTblPtNd, nTblMkNd;
+ xub_StrLen nTblPtCnt, nTblMkCnt;
+ SwSelBoxes aSelBoxes;
+ BOOL bChg : 1;
+ BOOL bParked : 1; // Tabellen-Cursor wurde geparkt
+
+ virtual bool IsSelOvrCheck(int eFlags);
+
+public:
+ SwTableCursor( const SwPosition &rPos, SwPaM* pRing = 0 );
+ SwTableCursor( SwTableCursor& );
+ virtual ~SwTableCursor();
+
+ virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
+ BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
+ virtual BOOL GotoTable( const String& rName );
+
+ void InsertBox( const SwTableBox& rTblBox );
+ void DeleteBox( USHORT nPos ) { aSelBoxes.Remove( nPos ); bChg = TRUE; }
+ USHORT GetBoxesCount() const { return aSelBoxes.Count(); }
+ const SwSelBoxes& GetBoxes() const { return aSelBoxes; }
+
+ // Baut fuer alle Boxen die Cursor auf
+ SwCursor* MakeBoxSels( SwCursor* pAktCrsr );
+ // sind irgendwelche Boxen mit einem Schutz versehen?
+ BOOL HasReadOnlyBoxSel() const;
+
+ // wurde der TabelleCursor veraendert ? Wenn ja speicher gleich
+ // die neuen Werte.
+ BOOL IsCrsrMovedUpdt();
+ // wurde der TabelleCursor veraendert ?
+ BOOL IsCrsrMoved() const
+ {
+ return nTblMkNd != GetMark()->nNode.GetIndex() ||
+ nTblPtNd != GetPoint()->nNode.GetIndex() ||
+ nTblMkCnt != GetMark()->nContent.GetIndex() ||
+ nTblPtCnt != GetPoint()->nContent.GetIndex();
+ }
+
+ BOOL IsChgd() const { return bChg; }
+
+ // Parke den Tabellen-Cursor auf dem StartNode der Boxen.
+ void ParkCrsr();
+
+ bool NewTableSelection();
+ void ActualizeSelection( const SwSelBoxes &rBoxes );
+};
+
+#endif
+
diff --git a/sw/inc/swdbdata.hxx b/sw/inc/swdbdata.hxx
new file mode 100644
index 000000000000..d5c50f30dda7
--- /dev/null
+++ b/sw/inc/swdbdata.hxx
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWDBDATA_HXX
+#define _SWDBDATA_HXX
+
+#include <tools/solar.h>
+#include <rtl/ustring.hxx>
+
+// contains the description of a data source
+struct SwDBData
+{
+ ::rtl::OUString sDataSource;
+ ::rtl::OUString sCommand; //table, query or statement
+ sal_Int32 nCommandType; //com::sun::star::sdb::CommandType
+ SwDBData() :
+ nCommandType(0){}
+
+ BOOL operator !=(const SwDBData& rCmp) const
+ {return rCmp.sDataSource != sDataSource || rCmp.sCommand != sCommand || rCmp.nCommandType != nCommandType;}
+ BOOL operator ==(const SwDBData& rCmp) const
+ {return rCmp.sDataSource == sDataSource && rCmp.sCommand == sCommand && rCmp.nCommandType == nCommandType;}
+};
+
+#endif
+
diff --git a/sw/inc/swdbtoolsclient.hxx b/sw/inc/swdbtoolsclient.hxx
new file mode 100644
index 000000000000..324075d0aeb7
--- /dev/null
+++ b/sw/inc/swdbtoolsclient.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWDBTOOLSCLIENT_HXX
+#define _SWDBTOOLSCLIENT_HXX
+
+#include <connectivity/virtualdbtools.hxx>
+#include <osl/mutex.hxx>
+#include <osl/module.h>
+#include "swdllapi.h"
+
+/* -----------------------------30.08.2001 11:01------------------------------
+ Client to use the dbtools library as load-on-call
+ ---------------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwDbtoolsClient
+{
+private:
+ ::rtl::Reference< ::connectivity::simple::IDataAccessTools > m_xDataAccessTools;
+ ::rtl::Reference< ::connectivity::simple::IDataAccessTypeConversion > m_xAccessTypeConversion;
+ ::rtl::Reference< ::connectivity::simple::IDataAccessToolsFactory > m_xDataAccessFactory;
+
+ SW_DLLPRIVATE static void registerClient();
+ SW_DLLPRIVATE static void revokeClient();
+ SW_DLLPRIVATE void getFactory();
+
+ SW_DLLPRIVATE ::rtl::Reference< ::connectivity::simple::IDataAccessTools > getDataAccessTools();
+ SW_DLLPRIVATE ::rtl::Reference< ::connectivity::simple::IDataAccessTypeConversion > getAccessTypeConversion();
+
+public:
+ SwDbtoolsClient();
+ ~SwDbtoolsClient();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > getDataSource(
+ const ::rtl::OUString& _rsRegisteredName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory
+ );
+
+ sal_Int32 getDefaultNumberFormat(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatTypes >& _rxTypes,
+ const ::com::sun::star::lang::Locale& _rLocale
+ );
+
+ ::rtl::OUString getValue(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxColumn,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter>& _rxFormatter,
+ const ::com::sun::star::lang::Locale& _rLocale,
+ const ::com::sun::star::util::Date& _rNullDate
+ );
+};
+
+#endif
+
diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx
new file mode 100644
index 000000000000..042654389174
--- /dev/null
+++ b/sw/inc/swddetbl.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWDDETBL_HXX
+#define _SWDDETBL_HXX
+
+#include "swtable.hxx"
+
+class SwDDEFieldType;
+
+class SwDDETable : public SwTable
+{
+ SwDepend aDepend;
+public:
+ TYPEINFO();
+ // Constructor movet alle Lines/Boxen aus der SwTable zu sich.
+ // Die SwTable ist danach Leer und muss geloescht werden.
+ SwDDETable( SwTable& rTable, SwDDEFieldType* pDDEType,
+ BOOL bUpdate = TRUE );
+ ~SwDDETable();
+
+ void Modify( SfxPoolItem*, SfxPoolItem* );
+ void ChangeContent();
+ BOOL NoDDETable();
+
+ SwDDEFieldType* GetDDEFldType();
+ inline const SwDDEFieldType* GetDDEFldType() const;
+};
+
+
+// ----------- Inlines -----------------------------
+
+inline const SwDDEFieldType* SwDDETable::GetDDEFldType() const
+{
+ return ((SwDDETable*)this)->GetDDEFldType();
+}
+
+#endif
diff --git a/sw/inc/swdll.hxx b/sw/inc/swdll.hxx
new file mode 100644
index 000000000000..dd033fdea760
--- /dev/null
+++ b/sw/inc/swdll.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_SWDLL_HXX
+#define SW_SWDLL_HXX
+
+class StatusBar;
+
+#include <sfx2/sfxdefs.hxx>
+#include <sfx2/module.hxx>
+
+#include <tools/shl.hxx>
+
+//-------------------------------------------------------------------------
+
+class SwDLL
+
+/* [Description]
+
+ This class is a wrapper for a Load-On-Demand-DLL. One instance
+ per SfxApplication will be created for the runtime of
+ SfxApplication-subclass::Main().
+
+ Remember: Do export this class! It is used by the application.
+*/
+
+{
+
+ static void RegisterFactories();
+ static void RegisterInterfaces();
+ static void RegisterControls();
+public:
+ // Ctor/Dtor must be linked to the application
+ SwDLL();
+ ~SwDLL();
+
+ static void Init(); // called directly after loading the DLL
+ static void Exit(); // called directly befor unloading the DLL
+};
+
+//-------------------------------------------------------------------------
+
+#define SW_DLL() ( *(SwModule**) GetAppData(SHL_WRITER) )
+
+#endif
+
diff --git a/sw/inc/swdllapi.h b/sw/inc/swdllapi.h
new file mode 100644
index 000000000000..f4c9e30020e6
--- /dev/null
+++ b/sw/inc/swdllapi.h
@@ -0,0 +1,13 @@
+#ifndef INCLUDED_SWDLLAPI_H
+#define INCLUDED_SWDLLAPI_H
+
+#include "sal/types.h"
+
+#if defined(SW_DLLIMPLEMENTATION)
+#define SW_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define SW_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define SW_DLLPRIVATE SAL_DLLPRIVATE
+
+#endif /* INCLUDED_SWDLLAPI_H */
diff --git a/sw/inc/swerror.h b/sw/inc/swerror.h
new file mode 100644
index 000000000000..fa7e03f3a381
--- /dev/null
+++ b/sw/inc/swerror.h
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWSWERROR_H
+#define _SWSWERROR_H
+
+#include <tools/errcode.hxx>
+
+#define ERROR_SW_BASE (ERRCODE_AREA_SW)
+#define ERROR_SW_READ_BASE (ERROR_SW_BASE | ERRCODE_CLASS_READ)
+#define ERROR_SW_WRITE_BASE (ERROR_SW_BASE | ERRCODE_CLASS_WRITE)
+
+#define WARN_SW_BASE (ERRCODE_AREA_SW | ERRCODE_WARNING_MASK)
+#define WARN_SW_READ_BASE (WARN_SW_BASE | ERRCODE_CLASS_READ )
+#define WARN_SW_WRITE_BASE (WARN_SW_BASE | ERRCODE_CLASS_WRITE )
+
+
+// Import Fehler
+#define ERR_SWG_FILE_FORMAT_ERROR (ERROR_SW_READ_BASE | 1 )
+#define ERR_SWG_READ_ERROR (ERROR_SW_READ_BASE | 2 )
+
+#define ERR_SW6_INPUT_FILE (ERROR_SW_READ_BASE | 4 )
+#define ERR_SW6_NOWRITER_FILE (ERROR_SW_READ_BASE | 5 )
+#define ERR_SW6_UNEXPECTED_EOF (ERROR_SW_READ_BASE | 6 )
+#define ERR_SW6_PASSWD (ERROR_SW_READ_BASE | 7 )
+
+#define ERR_WW6_NO_WW6_FILE_ERR (ERROR_SW_READ_BASE | 8 )
+#define ERR_WW6_FASTSAVE_ERR (ERROR_SW_READ_BASE | 9 )
+
+#define ERR_FORMAT_ROWCOL (ERROR_SW_READ_BASE | 12)
+
+#define ERR_SWG_NEW_VERSION (ERROR_SW_READ_BASE | 13)
+#define ERR_WW8_NO_WW8_FILE_ERR (ERROR_SW_READ_BASE | 14)
+
+#define ERR_FORMAT_FILE_ROWCOL (ERROR_SW_READ_BASE | 15)
+
+// Export Fehler
+#define ERR_SWG_WRITE_ERROR (ERROR_SW_WRITE_BASE | 30 )
+#define ERR_SWG_OLD_GLOSSARY (ERROR_SW_WRITE_BASE | 31 )
+#define ERR_WRITE_ERROR_FILE (ERROR_SW_WRITE_BASE | 35 )
+
+// Import/Export Fehler
+#define ERR_SWG_INTERNAL_ERROR (ERROR_SW_BASE | 50 )
+
+#define ERR_TXTBLOCK_NEWFILE_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_LOCKING | 55 )
+
+// weitere Fehler und Fehlerklassen
+#define ERR_AUTOPATH_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_PATH | 55 )
+#define ERR_TBLSPLIT_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 56 )
+#define ERR_TBLINSCOL_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 57 )
+#define ERR_TBLDDECHG_ERROR (ERROR_SW_BASE|ERRCODE_CLASS_NONE| 58 )
+
+// ----- Warnings ---------------------------
+
+// Import - Warnings
+#define WARN_SWG_NO_DRAWINGS (WARN_SW_READ_BASE | 70 )
+#define WARN_WW6_FASTSAVE_ERR (WARN_SW_READ_BASE | 71 )
+// continued below
+
+// Import & Export - Warnings
+#define WARN_SWG_FEATURES_LOST (WARN_SW_BASE | 72 )
+#define WARN_SWG_OLE (WARN_SW_BASE | 73 )
+#define WARN_SWG_POOR_LOAD (WARN_SW_BASE | 74 )
+
+// Export warnings
+#define WARN_SWG_HTML_NO_MACROS (WARN_SW_WRITE_BASE |75)
+#define WARN_WRITE_ERROR_FILE (WARN_SW_WRITE_BASE |76)
+
+// More Import & Export - Warnings
+#define WARN_FORMAT_FILE_ROWCOL (WARN_SW_READ_BASE | 77)
+
+#ifndef __RSC
+
+inline FASTBOOL IsWarning( ULONG nErr )
+{
+ return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr );
+}
+
+inline FASTBOOL IsError( ULONG nErr )
+{
+ return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr );
+}
+
+#endif
+
+
+#endif
+
diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
new file mode 100644
index 000000000000..81e599c7464f
--- /dev/null
+++ b/sw/inc/swevent.hxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWEVENT_HXX
+#define _SWEVENT_HXX
+
+// #include *****************************************************************
+
+#include <tools/solar.h>
+#include <sfx2/sfx.hrc>
+
+#define SW_EVENT_OBJECT_SELECT ( EVENT_APP_START + 0 )
+#define SW_EVENT_START_INS_GLOSSARY ( EVENT_APP_START + 1 )
+#define SW_EVENT_END_INS_GLOSSARY ( EVENT_APP_START + 2 )
+#define SW_EVENT_MAIL_MERGE ( EVENT_APP_START + 3 )
+#define SW_EVENT_FRM_KEYINPUT_ALPHA ( EVENT_APP_START + 4 )
+#define SW_EVENT_FRM_KEYINPUT_NOALPHA ( EVENT_APP_START + 5 )
+#define SW_EVENT_FRM_RESIZE ( EVENT_APP_START + 6 )
+#define SW_EVENT_FRM_MOVE ( EVENT_APP_START + 7 )
+#define SW_EVENT_PAGE_COUNT ( EVENT_APP_START + 8 )
+#define SW_EVENT_MAIL_MERGE_END ( EVENT_APP_START + 9 )
+#define SW_EVENT_FIELD_MERGE ( EVENT_APP_START + 10 )
+#define SW_EVENT_FIELD_MERGE_FINISHED ( EVENT_APP_START + 11 )
+#define SW_EVENT_LAYOUT_FINISHED ( EVENT_APP_START + 12 )
+
+#define STR_SW_EVENT_PAGE_COUNT 0
+#define STR_SW_EVENT_MAIL_MERGE 1
+#define STR_SW_EVENT_MAIL_MERGE_END 2
+#define STR_SW_EVENT_FIELD_MERGE 3
+#define STR_SW_EVENT_FIELD_MERGE_FINISHED 4
+#define STR_SW_EVENT_LAYOUT_FINISHED 5
+#define STR_SW_EVENT_OBJECT_SELECT 6
+#define STR_SW_EVENT_START_INS_GLOSSARY 7
+#define STR_SW_EVENT_END_INS_GLOSSARY 8
+#define STR_SW_EVENT_FRM_KEYINPUT_ALPHA 9
+#define STR_SW_EVENT_FRM_KEYINPUT_NOALPHA 10
+#define STR_SW_EVENT_FRM_RESIZE 11
+#define STR_SW_EVENT_FRM_MOVE 12
+
+class SwFrmFmt;
+class SwFmtINetFmt;
+class IMapObject;
+
+// enum fuer Objecte die Events ins Basic oder in JavaScript Callen
+enum SwCallEventObjectType
+{
+ EVENT_OBJECT_NONE = 0, // Null ist garnichts
+ EVENT_OBJECT_IMAGE,
+ EVENT_OBJECT_INETATTR,
+ EVENT_OBJECT_URLITEM,
+ EVENT_OBJECT_IMAGEMAP
+};
+
+// structur fuer den Austausch zwischen UI/CORE
+
+struct SwCallMouseEvent
+{
+ SwCallEventObjectType eType;
+ union
+ {
+ // EVENT_OBJECT_IMAGE/EVENT_OBJECT_URLITEM
+ const SwFrmFmt* pFmt;
+
+ // EVENT_OBJECT_INETATTR
+ const SwFmtINetFmt* pINetAttr;
+
+ // EVENT_OBJECT_IMAGEMAP
+ struct
+ {
+ const SwFrmFmt* pFmt;
+ const IMapObject* pIMapObj;
+ } IMAP;
+ } PTR;
+
+ SwCallMouseEvent()
+ : eType( EVENT_OBJECT_NONE )
+ { PTR.pFmt = 0; PTR.IMAP.pIMapObj = 0; }
+
+ void Set( SwCallEventObjectType eTyp, const SwFrmFmt* pFmt )
+ { eType = eTyp; PTR.pFmt = pFmt; PTR.IMAP.pIMapObj = 0; }
+
+ void Set( const SwFrmFmt* pFmt, const IMapObject* pIMapObj )
+ { eType = EVENT_OBJECT_IMAGEMAP; PTR.pFmt = pFmt; PTR.IMAP.pIMapObj = pIMapObj; }
+
+ void Set( const SwFmtINetFmt* pINetAttr )
+ { eType = EVENT_OBJECT_INETATTR; PTR.pINetAttr = pINetAttr; PTR.IMAP.pIMapObj = 0; }
+
+ int operator==( const SwCallMouseEvent& rEvent ) const
+ {
+ return eType == rEvent.eType &&
+ PTR.pFmt == rEvent.PTR.pFmt &&
+ PTR.IMAP.pIMapObj == rEvent.PTR.IMAP.pIMapObj;
+ }
+ int operator!=( const SwCallMouseEvent& rEvent ) const
+ { return !( *this == rEvent ); }
+
+ void Clear()
+ { eType = EVENT_OBJECT_NONE; PTR.pFmt = 0; PTR.IMAP.pIMapObj = 0; }
+
+ BOOL HasEvent() const { return EVENT_OBJECT_NONE != eType; }
+};
+
+
+#endif
+
diff --git a/sw/inc/swfltopt.hxx b/sw/inc/swfltopt.hxx
new file mode 100644
index 000000000000..50f645db8cfb
--- /dev/null
+++ b/sw/inc/swfltopt.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWFTLOPT_HXX
+#define _SWFTLOPT_HXX
+
+#include <unotools/configitem.hxx>
+
+class SW_DLLPUBLIC SwFilterOptions : public utl::ConfigItem
+{
+public:
+ SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames,
+ sal_uInt32* pValues );
+
+ void GetValues( sal_uInt16 nCnt, const sal_Char** ppNames,
+ sal_uInt32* pValues );
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+};
+
+#endif
diff --git a/sw/inc/swgstr.hxx b/sw/inc/swgstr.hxx
new file mode 100644
index 000000000000..50600cf945de
--- /dev/null
+++ b/sw/inc/swgstr.hxx
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWGSTR_HXX
+#define _SWGSTR_HXX
+
+#include <tools/stream.hxx>
+
+typedef long long3; // Zur Dokumentation: 3-byte-Longs
+
+#define MAX_BEGIN 64 // Maximale Blockschachtelung
+#define PASSWDLEN 16 // Maximale Passwortlaenge
+
+// Neue Version mit SvStreams
+
+// Passwort- und Codierungs-Funktionalitaet
+
+class swcrypter {
+protected:
+ sal_Char cPasswd[ PASSWDLEN ]; // Passwort-Puffer
+ BOOL bPasswd; // TRUE wenn mit Passwort
+ void encode( sal_Char*, USHORT ); // Puffer codieren/decodieren
+public:
+ swcrypter();
+ BOOL setpasswd( const String& ); // Passwort setzen
+ void copypasswd( const sal_Char* ); // Passwort direkt setzen
+ const sal_Char* getpasswd() { return cPasswd; }
+};
+
+// Reader/Writer-Stream-Basisklasse mit Pufferverwaltung fuer Texte
+// und Spezial-I/O fuer 3-Byte-Longs
+
+class swstreambase : public swcrypter {
+protected:
+ SvStream* pStrm; // eigentlicher Stream
+ sal_Char* pBuf; // Zwischenpuffer
+ USHORT nBuflen; // Laenge des Zwischenpuffers
+ short nLong; // Long-Laenge (3 oder 4)
+ BOOL bTempStrm; // TRUE: Stream loeschen
+ void checkbuf( USHORT ); // Testen der Pufferlaenge
+
+ swstreambase( SvStream& );
+
+ swstreambase( const swstreambase& );
+ int operator=( const swstreambase& );
+public:
+ ~swstreambase();
+ SvStream& Strm() { return *pStrm; }
+ void clear(); // Puffer loeschen
+
+ // Zusatzfunktionen zur I/O von LONGs als 3-Byte-Zahlen
+
+ void long3() { nLong = 3; }
+ void long4() { nLong = 4; }
+
+ // Alias- und Hilfsfunktionen
+
+ void seek( long nPos ) { pStrm->Seek( nPos ); }
+ long tell() { return pStrm->Tell(); }
+ long filesize(); // Dateigroesse
+
+ void setbad();
+ int good() { return ( pStrm->GetError() == SVSTREAM_OK ); }
+ int operator!() { return ( pStrm->GetError() != SVSTREAM_OK ); }
+ int eof() { return pStrm->IsEof(); }
+
+ BYTE get();
+ void get( void* p, USHORT n ) { pStrm->Read( (sal_Char*) p, n ); }
+
+ inline swstreambase& operator>>( sal_Char& );
+ inline swstreambase& operator>>( BYTE& );
+ inline swstreambase& operator>>( short& );
+ inline swstreambase& operator>>( USHORT& );
+ swstreambase& operator>>( long& );
+ inline swstreambase& operator>>( ULONG& );
+};
+
+inline swstreambase& swstreambase::operator>>( sal_Char& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( BYTE& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( short& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( USHORT& c )
+{
+ *pStrm >> c; return *this;
+}
+
+inline swstreambase& swstreambase::operator>>( ULONG& c )
+{
+ return *this >> (long&) c;
+}
+
+class swistream : public swstreambase {
+ BYTE cType; // Record-Typ
+ ULONG nOffset; // Record-Offset-Portion
+public:
+ swistream( SvStream& );
+
+ BYTE peek(); // 1 Byte testen
+ BYTE next(); // Blockstart
+ BYTE cur() { return cType; } // aktueller Block
+ BYTE skipnext(); // Record ueberspringen
+ void undonext(); // next() rueckgaengig machen
+ long getskip() { return nOffset; }
+ void skip( long = -1L ); // Block ueberspringen
+ sal_Char* text(); // Textstring lesen (nach BEGIN)
+ long size(); // aktuelle Record-Laenge
+
+private:
+ swistream( const swistream& );
+ int operator=( const swistream& );
+};
+
+
+#endif
diff --git a/sw/inc/swhints.hxx b/sw/inc/swhints.hxx
new file mode 100644
index 000000000000..c4a29135abcb
--- /dev/null
+++ b/sw/inc/swhints.hxx
@@ -0,0 +1,36 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_HINTS_HXX
+#define SW_HINTS_HXX
+
+#include <svl/smplhint.hxx>
+
+#define SW_BROADCASTID_START SFX_HINT_USER00
+#define SW_BROADCAST_DRAWVIEWS_CREATED SW_BROADCASTID_START
+
+
+#endif
diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
new file mode 100644
index 000000000000..c8e601143877
--- /dev/null
+++ b/sw/inc/swmodule.hxx
@@ -0,0 +1,278 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWMODULE_HXX
+#define _SWMODULE_HXX
+#include <tools/link.hxx>
+#include <tools/string.hxx>
+#include <vcl/fldunit.hxx>
+#include <svl/lstner.hxx>
+#include <unotools/options.hxx>
+#include <sfx2/module.hxx>
+
+#include <tools/shl.hxx>
+#include <svl/lstner.hxx>
+#include "swdllapi.h"
+#include "shellid.hxx"
+#include <fldupde.hxx>
+#include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp>
+#include <com/sun/star/linguistic2/XLanguageGuessing.hpp>
+
+class SvStringsDtor;
+class Color;
+class SfxItemSet;
+class SfxRequest;
+class SfxErrorHandler;
+class SwDBConfig;
+class SwModuleOptions;
+class SwMasterUsrPref;
+class SwViewOption;
+class SwView;
+class SwWrtShell;
+class SwPrintOptions;
+class SwChapterNumRules;
+class SwStdFontConfig;
+class SwNavigationConfig;
+class SwTransferable;
+class SwToolbarConfigItem;
+class SwAttrPool;
+namespace svtools{ class ColorConfig;}
+class SvtAccessibilityOptions;
+class SvtCTLOptions;
+class SvtUserOptions;
+class SvtUndoOptions;
+
+struct SwDBData;
+#define VIEWOPT_DEST_VIEW 0
+#define VIEWOPT_DEST_TEXT 1
+#define VIEWOPT_DEST_WEB 2
+#define VIEWOPT_DEST_VIEW_ONLY 3 //ViewOptions werden nur an der ::com::sun::star::sdbcx::View, nicht an der Appl. gesetzt
+
+namespace com{ namespace sun{ namespace star{ namespace scanner{
+ class XScannerManager;
+}}}}
+
+class SW_DLLPUBLIC SwModule: public SfxModule, public SfxListener, public utl::ConfigurationListener
+{
+ String sActAuthor;
+
+ // ConfigItems
+ SwModuleOptions* pModuleConfig;
+ SwMasterUsrPref* pUsrPref;
+ SwMasterUsrPref* pWebUsrPref;
+ SwPrintOptions* pPrtOpt;
+ SwPrintOptions* pWebPrtOpt;
+ SwChapterNumRules* pChapterNumRules;
+ SwStdFontConfig* pStdFontConfig;
+ SwNavigationConfig* pNavigationConfig;
+ SwToolbarConfigItem*pToolbarConfig; //fuer gestackte Toolbars, welche
+ SwToolbarConfigItem*pWebToolbarConfig; //war sichtbar?
+ SwDBConfig* pDBConfig;
+ svtools::ColorConfig* pColorConfig;
+ SvtAccessibilityOptions* pAccessibilityOptions;
+ SvtCTLOptions* pCTLOptions;
+ SvtUserOptions* pUserOptions;
+ SvtUndoOptions* pUndoOptions;
+
+ SfxErrorHandler* pErrorHdl;
+
+ SwAttrPool *pAttrPool;
+
+ // Die aktuelle View wird hier gehalten um nicht ueber
+ // GetActiveView arbeiten zu muessen
+ // Die View ist solange gueltig bis Sie im Activate
+ // zerstoert oder ausgetauscht wird
+ SwView* pView;
+
+ // Liste aller Redline-Autoren
+ SvStringsDtor* pAuthorNames;
+
+ // DictionaryList listener to trigger spellchecking or hyphenation
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener > xLngSvcEvtListener;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::scanner::XScannerManager > m_xScannerManager;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLanguageGuessing > m_xLanguageGuesser;
+
+ sal_Bool bAuthorInitialised : 1;
+ sal_Bool bEmbeddedLoadSave : 1;
+
+ // Hint abfangen fuer DocInfo
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
+
+protected:
+ // Briefumschlaege, Etiketten
+ void InsertEnv(SfxRequest&);
+ void InsertLab(SfxRequest&, sal_Bool bLabel);
+
+public:
+ // public Data - used for internal Clipboard / Drag & Drop / XSelection
+ SwTransferable *pDragDrop, *pXSelection;
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SW_INTERFACE_MODULE)
+
+ // dieser Ctor nur fuer SW-Dll
+ SwModule( SfxObjectFactory* pFact,
+ SfxObjectFactory* pWebFact,
+ SfxObjectFactory* pGlobalFact );
+
+ ~SwModule();
+
+ // View setzen nur fuer internen Gebrauch,
+ // aus techn. Gruenden public
+ //
+ inline void SetView(SwView* pVw) { pView = pVw; }
+ inline SwView* GetView() { return pView; }
+
+ //Die Handler fuer die Slots
+ void StateOther(SfxItemSet &); // andere
+
+ void ExecOther(SfxRequest &); // Felder, Formel ..
+
+ // Benutzereinstellungen modifizieren
+ const SwMasterUsrPref *GetUsrPref(sal_Bool bWeb) const;
+ const SwViewOption* GetViewOption(sal_Bool bWeb);
+ void ApplyUsrPref(const SwViewOption &, SwView*,
+ sal_uInt16 nDest = VIEWOPT_DEST_VIEW );
+ void ApplyUserMetric( FieldUnit eMetric, BOOL bWeb );
+ void ApplyRulerMetric( FieldUnit eMetric, BOOL bHorizontal, BOOL bWeb );
+ void ApplyFldUpdateFlags(SwFldUpdateFlags eFldFlags);
+ void ApplyLinkMode(sal_Int32 nNewLinkMode);
+
+ //default page mode for text grid
+ void ApplyDefaultPageMode(sal_Bool bIsSquaredPageMode);
+
+ // ConfigItems erzeugen
+ SwModuleOptions* GetModuleConfig() { return pModuleConfig;}
+ SwPrintOptions* GetPrtOptions(sal_Bool bWeb);
+ SwChapterNumRules* GetChapterNumRules();
+ SwStdFontConfig* GetStdFontConfig() { return pStdFontConfig; }
+ SwNavigationConfig* GetNavigationConfig();
+ SwToolbarConfigItem*GetToolbarConfig() { return pToolbarConfig; }
+ SwToolbarConfigItem*GetWebToolbarConfig() { return pWebToolbarConfig; }
+ SwDBConfig* GetDBConfig();
+ svtools::ColorConfig& GetColorConfig();
+ SvtAccessibilityOptions& GetAccessibilityOptions();
+ SvtCTLOptions& GetCTLOptions();
+ SvtUserOptions& GetUserOptions();
+ SvtUndoOptions& GetUndoOptions();
+
+ // Ueber Sichten iterieren
+ static SwView* GetFirstView();
+ static SwView* GetNextView(SwView*);
+
+ sal_Bool IsEmbeddedLoadSave() const { return bEmbeddedLoadSave; }
+ void SetEmbeddedLoadSave( sal_Bool bFlag ) { bEmbeddedLoadSave = bFlag; }
+
+ void ShowDBObj( SwView& rView, const SwDBData& rData, BOOL bOnlyIfAvailable = FALSE);
+
+ // Tabellenmodi
+ sal_Bool IsInsTblFormatNum(sal_Bool bHTML) const;
+ sal_Bool IsInsTblChangeNumFormat(sal_Bool bHTML) const;
+ sal_Bool IsInsTblAlignNum(sal_Bool bHTML) const;
+
+ // Redlining
+ sal_uInt16 GetRedlineAuthor();
+ const String& GetRedlineAuthor(sal_uInt16 nPos);
+ sal_uInt16 InsertRedlineAuthor(const String& rAuthor);
+
+ void GetInsertAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
+ void GetDeletedAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
+ void GetFormatAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
+
+ sal_uInt16 GetRedlineMarkPos();
+ const Color& GetRedlineMarkColor();
+
+ // returne den definierten DocStat - WordDelimiter
+ const String& GetDocStatWordDelim() const;
+
+ // Durchreichen der Metric von der ModuleConfig (fuer HTML-Export)
+ sal_uInt16 GetMetric( sal_Bool bWeb ) const;
+
+ // Update-Stati durchreichen
+ sal_uInt16 GetLinkUpdMode( sal_Bool bWeb ) const;
+ SwFldUpdateFlags GetFldUpdateFlags( sal_Bool bWeb ) const;
+
+ //virtuelle Methoden fuer den Optionendialog
+ virtual SfxItemSet* CreateItemSet( sal_uInt16 nId );
+ virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
+ virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet );
+
+ //hier wird der Pool angelegt und an der SfxShell gesetzt
+ void InitAttrPool();
+ //Pool loeschen bevor es zu spaet ist
+ void RemoveAttrPool();
+
+ // Invalidiert ggf. OnlineSpell-WrongListen
+ void CheckSpellChanges( sal_Bool bOnlineSpelling,
+ sal_Bool bIsSpellWrongAgain, sal_Bool bIsSpellAllAgain, sal_Bool bSmartTags );
+
+ inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >
+ GetLngSvcEvtListener();
+ inline void SetLngSvcEvtListener( ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener > & xLstnr);
+ void CreateLngSvcEvtListener();
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::scanner::XScannerManager >
+ GetScannerManager();
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLanguageGuessing >
+ GetLanguageGuesser();
+};
+
+
+inline ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >
+ SwModule::GetLngSvcEvtListener()
+{
+ return xLngSvcEvtListener;
+}
+
+inline void SwModule::SetLngSvcEvtListener(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener > & xLstnr)
+{
+ xLngSvcEvtListener = xLstnr;
+}
+
+
+/*-----------------08.07.97 10.33-------------------
+ Zugriff auf das SwModule, die ::com::sun::star::sdbcx::View und die Shell
+--------------------------------------------------*/
+
+#define SW_MOD() ( *(SwModule**) GetAppData(SHL_WRITER))
+
+SW_DLLPUBLIC SwView* GetActiveView();
+SW_DLLPUBLIC SwWrtShell* GetActiveWrtShell();
+
+#endif
diff --git a/sw/inc/swpre.mk b/sw/inc/swpre.mk
new file mode 100644
index 000000000000..b19440a01a55
--- /dev/null
+++ b/sw/inc/swpre.mk
@@ -0,0 +1,46 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# 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.
+#
+#*************************************************************************
+
+
+#======================================================================
+# standardmaessig mit Optimierung, muss explizit mit nopt=t ausgeschaltet
+# werden, wenn nicht gewuenscht
+#----------------------------------------------------------------------
+
+.IF "$(nopt)"!="" || "$(NOPT)"!=""
+nopt=true
+NOPT=TRUE
+optimize=
+OPTIMIZE=
+.ELSE
+.IF "$(debug)$(DEBUG)"==""
+optimize=true
+OPTIMIZE=TRUE
+.ENDIF
+.ENDIF
+
+
diff --git a/sw/inc/swprtopt.hxx b/sw/inc/swprtopt.hxx
new file mode 100644
index 000000000000..626c74d88feb
--- /dev/null
+++ b/sw/inc/swprtopt.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWPRTOPT_HXX
+#define _SWPRTOPT_HXX
+
+#include <tools/multisel.hxx>
+#include <printdata.hxx>
+
+#include <set>
+#include <map>
+#include <vector>
+#include <utility>
+
+#define POSTITS_NONE 0
+#define POSTITS_ONLY 1
+#define POSTITS_ENDDOC 2
+#define POSTITS_ENDPAGE 3
+
+
+class PrintDialog;
+class SfxPrinter;
+
+
+////////////////////////////////////////////////////////////
+
+
+class SwPrtOptions : public SwPrintData
+{
+ USHORT nJobNo;
+ String sJobName;
+
+public:
+ MultiSelection aMulti;
+ Point aOffset;
+ ULONG nMergeCnt; // Anzahl der Serienbriefe
+ ULONG nMergeAct; // Aktueller Serienbriefnr.
+ USHORT nCopyCount;
+
+ BOOL bCollate,
+ bPrintSelection, // Markierung drucken
+ bJobStartet;
+
+ SwPrtOptions( const String& rJobName ) :
+ nJobNo( 1 ),
+ sJobName( rJobName ),
+ aOffset( Point(0,0) ),
+ nMergeCnt( 0 ),
+ nMergeAct( 0 ),
+ bCollate(FALSE),
+ bPrintSelection (FALSE),
+ bJobStartet(FALSE)
+ {}
+
+ const String& MakeNextJobName(); // steht in vprint.cxx
+ const String& GetJobName() const { return sJobName; }
+
+#if defined(TCPP)
+ // seit neuestem (SV 223) kann der keinen mehr generieren
+ inline SwPrtOptions(const SwPrtOptions& rNew) {*this = rNew;}
+#endif
+
+
+ SwPrtOptions& operator=(const SwPrintData& rData)
+ {
+ SwPrintData::operator=(rData);
+ return *this;
+ }
+
+ // get print options
+ void MakeOptions( BOOL bWeb );
+};
+
+
+////////////////////////////////////////////////////////////
+
+#endif //_SWPRTOPT_HXX
+
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
new file mode 100644
index 000000000000..f90bebcbbc7e
--- /dev/null
+++ b/sw/inc/swrect.hxx
@@ -0,0 +1,364 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWRECT_HXX
+#define _SWRECT_HXX
+#include "errhdl.hxx"
+#include <tools/gen.hxx>
+class SvStream;
+
+class SwRect
+{
+ Point m_Point;
+ Size m_Size;
+
+
+public:
+ inline SwRect();
+ inline SwRect( const SwRect &rRect );
+ inline SwRect( const Point& rLT, const Size& rSize );
+ inline SwRect( const Point& rLT, const Point& rRB );
+ inline SwRect( long X, long Y, long Width, long Height );
+
+ //SV-SS z.B. SwRect( pWin->GetClipRect() );
+ SwRect( const Rectangle &rRect );
+
+ //Set-Methoden
+ inline void Chg( const Point& rNP, const Size &rNS );
+ inline void Pos( const Point& rNew );
+ inline void Pos( const long nNewX, const long nNewY );
+ inline void SSize( const Size& rNew );
+ inline void SSize( const long nHeight, const long nWidth );
+ inline void Width( long nNew );
+ inline void Height( long nNew );
+ inline void Left( const long nLeft );
+ inline void Right( const long nRight );
+ inline void Top( const long nTop );
+ inline void Bottom( const long nBottom );
+
+ //Get-Methoden
+ inline const Point &Pos() const;
+ inline const Size &SSize() const;
+ inline long Width() const;
+ inline long Height() const;
+ inline long Left() const;
+ inline long Right() const;
+ inline long Top() const;
+ inline long Bottom() const;
+
+ //Damit Layoutseitig per Memberpointer auf die Member von Pos und SSize
+ //zugegriffen werden kann.
+ inline Point &Pos();
+ inline Size &SSize();
+
+ Point Center() const;
+
+ void Justify();
+
+ SwRect &Union( const SwRect& rRect );
+ SwRect &Intersection( const SwRect& rRect );
+ //Wie Intersection nur wird davon ausgegangen, dass die Rects ueberlappen!
+ SwRect &_Intersection( const SwRect &rRect );
+ inline SwRect GetIntersection( const SwRect& rRect ) const;
+
+ BOOL IsInside( const Point& rPOINT ) const;
+ BOOL IsNear(const Point& rPoint, long nTolerance ) const;
+ BOOL IsInside( const SwRect& rRect ) const;
+ BOOL IsOver( const SwRect& rRect ) const;
+ inline BOOL HasArea() const;
+ inline BOOL IsEmpty() const;
+ inline void Clear();
+
+ inline SwRect &operator = ( const SwRect &rRect );
+
+ inline BOOL operator == ( const SwRect& rRect ) const;
+ inline BOOL operator != ( const SwRect& rRect ) const;
+
+ inline SwRect &operator+=( const Point &rPt );
+ inline SwRect &operator-=( const Point &rPt );
+
+ inline SwRect &operator+=( const Size &rSz );
+ inline SwRect &operator-=( const Size &rSz );
+
+ //SV-SS z.B. pWin->DrawRect( aSwRect.SVRect() );
+ inline Rectangle SVRect() const;
+
+ //Zortech wuerde hier fehlerhaften Code erzeugen.
+// inline operator SRectangle() const;
+// inline operator Rectangle() const { return Rectangle( aPos, aSize ); }
+
+ // Ausgabeoperator fuer die Debugging-Gemeinde
+ friend SvStream &operator<<( SvStream &rStream, const SwRect &rRect );
+
+
+ void _Top( const long nTop );
+ void _Bottom( const long nBottom );
+ void _Left( const long nLeft );
+ void _Right( const long nRight );
+ void _Width( const long nNew );
+ void _Height( const long nNew );
+ long _Top() const;
+ long _Bottom() const;
+ long _Left() const;
+ long _Right() const;
+ long _Width() const;
+ long _Height() const;
+ void SubTop( const long nSub );
+ void AddBottom( const long nAdd );
+ void SubLeft( const long nSub );
+ void AddRight( const long nAdd );
+ void AddWidth( const long nAdd );
+ void AddHeight( const long nAdd );
+ void SetPosX( const long nNew );
+ void SetPosY( const long nNew );
+ void SetLeftAndWidth( long nLeft, long nNew );
+ void SetTopAndHeight( long nTop, long nNew );
+ void SetRightAndWidth( long nRight, long nNew );
+ void SetBottomAndHeight( long nBottom, long nNew );
+ void SetUpperLeftCorner( const Point& rNew );
+ void SetUpperRightCorner( const Point& rNew );
+ void SetLowerLeftCorner( const Point& rNew );
+ const Size _Size() const;
+ const Point TopLeft() const;
+ const Point TopRight() const;
+ const Point BottomLeft() const;
+ const Point BottomRight() const;
+ const Size SwappedSize() const;
+ long GetLeftDistance( long ) const;
+ long GetBottomDistance( long ) const;
+ long GetRightDistance( long ) const;
+ long GetTopDistance( long ) const;
+ BOOL OverStepLeft( long ) const;
+ BOOL OverStepBottom( long ) const;
+ BOOL OverStepTop( long ) const;
+ BOOL OverStepRight( long ) const;
+};
+
+// Implementation in in swrect.cxx
+extern SvStream &operator<<( SvStream &rStream, const SwRect &rRect );
+
+typedef void (SwRect:: *SwRectSet)( const long nNew );
+typedef long (SwRect:: *SwRectGet)() const;
+typedef const Point (SwRect:: *SwRectPoint)() const;
+typedef const Size (SwRect:: *SwRectSize)() const;
+typedef BOOL (SwRect:: *SwRectMax)( long ) const;
+typedef long (SwRect:: *SwRectDist)( long ) const;
+typedef void (SwRect:: *SwRectSetTwice)( long, long );
+typedef void (SwRect:: *SwRectSetPos)( const Point& );
+
+//---------------------------------- Set-Methoden
+inline void SwRect::Chg( const Point& rNP, const Size &rNS )
+{
+ m_Point = rNP;
+ m_Size = rNS;
+}
+inline void SwRect::Pos( const Point& rNew )
+{
+ m_Point = rNew;
+}
+inline void SwRect::Pos( const long nNewX, const long nNewY )
+{
+ m_Point.setX(nNewX);
+ m_Point.setY(nNewY);
+}
+inline void SwRect::SSize( const Size& rNew )
+{
+ m_Size = rNew;
+}
+inline void SwRect::SSize( const long nNewHeight, const long nNewWidth )
+{
+ m_Size.setWidth(nNewWidth);
+ m_Size.setHeight(nNewHeight);
+}
+inline void SwRect::Width( long nNew )
+{
+ m_Size.setWidth(nNew);
+}
+inline void SwRect::Height( long nNew )
+{
+ m_Size.setHeight(nNew);
+}
+inline void SwRect::Left( const long nLeft )
+{
+ m_Size.Width() += m_Point.getX() - nLeft;
+ m_Point.setX(nLeft);
+}
+inline void SwRect::Right( const long nRight )
+{
+ m_Size.setWidth(nRight - m_Point.getX() + 1);
+}
+inline void SwRect::Top( const long nTop )
+{
+ m_Size.Height() += m_Point.getY() - nTop;
+ m_Point.setY(nTop);
+}
+inline void SwRect::Bottom( const long nBottom )
+{
+ m_Size.setHeight(nBottom - m_Point.getY() + 1);
+}
+
+//----------------------------------- Get-Methoden
+inline const Point &SwRect::Pos() const
+{
+ return m_Point;
+}
+inline Point &SwRect::Pos()
+{
+ return m_Point;
+}
+inline const Size &SwRect::SSize() const
+{
+ return m_Size;
+}
+inline Size &SwRect::SSize()
+{
+ return m_Size;
+}
+inline long SwRect::Width() const
+{
+ return m_Size.Width();
+}
+inline long SwRect::Height() const
+{
+ return m_Size.Height();
+}
+inline long SwRect::Left() const
+{
+ return m_Point.X();
+}
+inline long SwRect::Right() const
+{
+ return m_Size.getWidth() ? m_Point.getX() + m_Size.getWidth() - 1 : m_Point.getX();
+}
+inline long SwRect::Top() const
+{
+ return m_Point.Y();
+}
+inline long SwRect::Bottom() const
+{
+ return m_Size.getHeight() ? m_Point.getY() + m_Size.getHeight() - 1 : m_Point.getY();
+}
+
+//----------------------------------- operatoren
+inline SwRect &SwRect::operator = ( const SwRect &rRect )
+{
+ m_Point = rRect.m_Point;
+ m_Size = rRect.m_Size;
+ return *this;
+}
+inline BOOL SwRect::operator == ( const SwRect& rRect ) const
+{
+ return (m_Point == rRect.m_Point && m_Size == rRect.m_Size);
+}
+inline BOOL SwRect::operator != ( const SwRect& rRect ) const
+{
+ return (m_Point != rRect.m_Point || m_Size != rRect.m_Size);
+}
+
+inline SwRect &SwRect::operator+=( const Point &rPt )
+{
+ m_Point += rPt;
+ return *this;
+}
+inline SwRect &SwRect::operator-=( const Point &rPt )
+{
+ m_Point -= rPt;
+ return *this;
+}
+
+inline SwRect &SwRect::operator+=( const Size &rSz )
+{
+ m_Size.Width() += rSz.Width();
+ m_Size.Height() += rSz.Height();
+ return *this;
+}
+inline SwRect &SwRect::operator-=( const Size &rSz )
+{
+ m_Size.Width() -= rSz.Width();
+ m_Size.Height() -= rSz.Height();
+ return *this;
+}
+
+
+//--------------------------- Sonstiges
+inline Rectangle SwRect::SVRect() const
+{
+ ASSERT( !IsEmpty(), "SVRect() without Width or Height" );
+ return Rectangle( m_Point.getX(), m_Point.getY(),
+ m_Point.getX() + m_Size.getWidth() - 1, //Right()
+ m_Point.getY() + m_Size.getHeight() - 1 ); //Bottom()
+}
+
+inline SwRect SwRect::GetIntersection( const SwRect& rRect ) const
+{
+ return SwRect( *this ).Intersection( rRect );
+}
+
+inline BOOL SwRect::HasArea() const
+{
+ return !IsEmpty();
+}
+inline BOOL SwRect::IsEmpty() const
+{
+ return !(m_Size.getHeight() && m_Size.getWidth());
+}
+inline void SwRect::Clear()
+{
+ m_Point.setX(0);
+ m_Point.setY(0);
+ m_Size.setWidth(0);
+ m_Size.setHeight(0);
+}
+
+//-------------------------- CToren
+inline SwRect::SwRect() :
+ m_Point( 0, 0 ),
+ m_Size( 0, 0 )
+{
+}
+inline SwRect::SwRect( const SwRect &rRect ) :
+ m_Point( rRect.m_Point ),
+ m_Size( rRect.m_Size )
+{
+}
+inline SwRect::SwRect( const Point& rLT, const Size& rSize ) :
+ m_Point( rLT ),
+ m_Size( rSize )
+{
+}
+inline SwRect::SwRect( const Point& rLT, const Point& rRB ) :
+ m_Point( rLT ),
+ m_Size( rRB.X() - rLT.X() + 1, rRB.Y() - rLT.Y() + 1 )
+{
+}
+inline SwRect::SwRect( long X, long Y, long W, long H ) :
+ m_Point( X, Y ),
+ m_Size( W, H )
+{
+}
+
+
+#endif //_SWRECT_HXX
diff --git a/sw/inc/swregion.hxx b/sw/inc/swregion.hxx
new file mode 100644
index 000000000000..e3c7dadf4732
--- /dev/null
+++ b/sw/inc/swregion.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWREGION_HXX
+#define _SWREGION_HXX
+
+#include <svl/svarray.hxx>
+
+#include "swrect.hxx"
+
+SV_DECL_VARARR( SwRects, SwRect, 20, 8 )
+
+class SwRegionRects : public SwRects
+{
+ SwRect aOrigin; // die Kopie des StartRects
+
+ inline void InsertRect( const SwRect &rRect, const USHORT nPos, BOOL &rDel);
+
+public:
+ SwRegionRects( const SwRect& rStartRect, USHORT nInit = 20,
+ USHORT nGrow = 8 );
+ // Zum Ausstanzen aus aOrigin.
+ void operator-=( const SwRect& rRect );
+
+ // Aus Loechern werden Flaechen, aus Flaechen werden Loecher.
+ void Invert();
+ // Benachbarte Rechtecke zusammenfassen.
+ void Compress( BOOL bFuzzy = TRUE );
+
+ inline const SwRect &GetOrigin() const { return aOrigin; }
+ inline void ChangeOrigin( const SwRect &rRect ) { aOrigin = rRect; }
+};
+
+#endif //_SWREGION_HXX
diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx
new file mode 100644
index 000000000000..f5f790ddf9b8
--- /dev/null
+++ b/sw/inc/swserv.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWSERV_HXX
+#define _SWSERV_HXX
+
+#include <sfx2/linksrc.hxx>
+#include <IMark.hxx>
+
+class SwSectionNode;
+class SwBaseLink;
+class SwTableNode;
+struct SwPosition;
+class SwPaM;
+
+class SwServerObject : public ::sfx2::SvLinkSource
+{
+ using sfx2::SvLinkSource::SendDataChanged;
+
+protected:
+ enum ServerModes { BOOKMARK_SERVER, TABLE_SERVER, SECTION_SERVER, NONE_SERVER } eType;
+ union {
+ ::sw::mark::IMark* pBkmk;
+ SwTableNode* pTblNd;
+ SwSectionNode* pSectNd;
+ } CNTNT_TYPE;
+
+ SwServerObject();
+
+public:
+ SwServerObject( ::sw::mark::IMark& rBookmark )
+ : eType( BOOKMARK_SERVER )
+ {
+ CNTNT_TYPE.pBkmk = &rBookmark;
+ }
+ SwServerObject( SwTableNode& rTableNd )
+ : eType( TABLE_SERVER )
+ {
+ CNTNT_TYPE.pTblNd = &rTableNd;
+ }
+ SwServerObject( SwSectionNode& rSectNd )
+ : eType( SECTION_SERVER )
+ {
+ CNTNT_TYPE.pSectNd = &rSectNd;
+ }
+ virtual ~SwServerObject();
+
+ virtual BOOL GetData( ::com::sun::star::uno::Any & rData,
+ const String & rMimeType,
+ BOOL bSynchron = FALSE );
+
+ BOOL SetData( const String & rMimeType,
+ const ::com::sun::star::uno::Any& rData );
+
+ virtual void SendDataChanged( const SwPosition& rPos );
+ virtual void SendDataChanged( const SwPaM& rRange );
+
+ BOOL IsLinkInServer( const SwBaseLink* ) const;
+
+ void SetNoServer();
+ void SetDdeBookmark( ::sw::mark::IMark& rBookmark);
+};
+
+#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
+#define SW_DECL_SWSERVEROBJECT_DEFINED
+SV_DECL_REF( SwServerObject )
+#endif
+
+#endif // _SWSERV_HXX
+
diff --git a/sw/inc/swstyle.h b/sw/inc/swstyle.h
new file mode 100644
index 000000000000..cd266fb3d68d
--- /dev/null
+++ b/sw/inc/swstyle.h
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWSTYLE_H
+#define _SWSTYLE_H
+
+
+#define SWSTYLEBIT_TEXT 0x0001
+#define SWSTYLEBIT_CHAPTER 0x0002
+#define SWSTYLEBIT_LIST 0x0004
+#define SWSTYLEBIT_IDX 0x0008
+#define SWSTYLEBIT_EXTRA 0x0010
+#define SWSTYLEBIT_HTML 0x0020
+#define SWSTYLEBIT_CONDCOLL 0x0040
+
+
+#endif
+
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
new file mode 100644
index 000000000000..1b1316ce37d1
--- /dev/null
+++ b/sw/inc/swtable.hxx
@@ -0,0 +1,490 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWTABLE_HXX
+#define _SWTABLE_HXX
+#include <tools/mempool.hxx>
+#ifndef _TOOLS_REF_HXX
+#include <tools/ref.hxx>
+#endif
+#include <svl/svarray.hxx>
+#include <tblenum.hxx>
+#include <swtypes.hxx>
+#include <calbck.hxx>
+#include <swrect.hxx>
+#ifndef DBG_UTIL
+#include <node.hxx> // fuer StartNode->GetMyIndex
+#else
+class SwStartNode;
+#include <memory>
+#include <boost/noncopyable.hpp>
+#endif
+
+class Color;
+class SwFrmFmt;
+class SwTableFmt;
+class SwTableLineFmt;
+class SwTableBoxFmt;
+class SwHTMLTableLayout;
+class SwTableLine;
+class SwTableBox;
+class SwTableNode;
+class SwTabCols;
+class SwDoc;
+class SwSelBoxes;
+class SwTblCalcPara;
+class SwChartLines;
+struct SwPosition;
+class SwNodeIndex;
+class SwNode;
+class SfxPoolItem;
+class SwUndoTblMerge;
+class SwUndo;
+class SwPaM;
+class SwTableBox_Impl;
+class SwUndoTblCpyTbl;
+class SwBoxSelection;
+struct SwSaveRowSpan;
+struct Parm;
+
+#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
+#define SW_DECL_SWSERVEROBJECT_DEFINED
+SV_DECL_REF( SwServerObject )
+#endif
+
+SV_DECL_PTRARR_DEL(SwTableLines, SwTableLine*, 10, 20)
+SV_DECL_PTRARR_DEL(SwTableBoxes, SwTableBox*, 25, 50)
+
+// speicher die Inhaltstragenden Box-Pointer zusaetzlich in einem
+// sortierten Array (fuers rechnen in der Tabelle)
+typedef SwTableBox* SwTableBoxPtr;
+SV_DECL_PTRARR_SORT( SwTableSortBoxes, SwTableBoxPtr, 25, 50 )
+typedef SwTableLine* SwTableLinePtr;
+
+class SW_DLLPUBLIC SwTable: public SwClient //Client vom FrmFmt
+{
+ using SwClient::IsModifyLocked;
+
+protected:
+ SwTableLines aLines;
+ SwTableSortBoxes aSortCntBoxes;
+ SwServerObjectRef refObj; // falls DataServer -> Pointer gesetzt
+
+ SwHTMLTableLayout *pHTMLLayout;
+
+ // Usually, the table node of a SwTable can be accessed by getting a box
+ // out of aSortCntBoxes, which know their SwStartNode. But in some rare
+ // cases, we need to know the table node of a SwTable, before the table
+ // boxes have been build (SwTableNode::MakeCopy with tables in tables).
+ SwTableNode* pTableNode;
+
+//SOLL das fuer jede Tabelle einstellbar sein?
+ TblChgMode eTblChgMode;
+
+ USHORT nGrfsThatResize; // Anzahl der Grfs, die beim HTML-Import
+ // noch ein Resize der Tbl. anstossen
+ USHORT nRowsToRepeat; // number of rows to repeat on every page
+
+ BOOL bModifyLocked :1;
+ BOOL bNewModel :1; // FALSE: old SubTableModel; TRUE: new RowSpanModel
+#ifdef DBG_UTIL
+ bool bDontChangeModel; // This is set by functions (like Merge()) to forbid a laet model change
+#endif
+
+ BOOL IsModifyLocked(){ return bModifyLocked;}
+
+public:
+ enum SearchType
+ {
+ SEARCH_NONE, // Default: expand to rectangle
+ SEARCH_ROW, // row selection
+ SEARCH_COL // column selection
+ };
+
+ TYPEINFO();
+
+ // single argument ctors shall be explicit.
+ explicit SwTable( SwTableFmt* );
+ virtual ~SwTable();
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwTable( const SwTable& rTable ); // kein Copy der Lines !!
+private:
+ // @@@ public copy ctor, but no copy assignment?
+ SwTable & operator= (const SwTable &);
+ // no default ctor.
+ SwTable();
+ BOOL OldMerge( SwDoc*, const SwSelBoxes&, SwTableBox*, SwUndoTblMerge* );
+ BOOL OldSplitRow( SwDoc*, const SwSelBoxes&, USHORT, BOOL );
+ BOOL NewMerge( SwDoc*, const SwSelBoxes&, const SwSelBoxes& rMerged,
+ SwTableBox*, SwUndoTblMerge* );
+ BOOL NewSplitRow( SwDoc*, const SwSelBoxes&, USHORT, BOOL );
+ SwBoxSelection* CollectBoxSelection( const SwPaM& rPam ) const;
+ void InsertSpannedRow( SwDoc* pDoc, USHORT nIdx, USHORT nCnt );
+ BOOL _InsertRow( SwDoc*, const SwSelBoxes&, USHORT nCnt, BOOL bBehind );
+ BOOL NewInsertCol( SwDoc*, const SwSelBoxes& rBoxes, USHORT nCnt, BOOL );
+ void _FindSuperfluousRows( SwSelBoxes& rBoxes, SwTableLine*, SwTableLine* );
+ void AdjustWidths( const long nOld, const long nNew );
+ void NewSetTabCols( Parm &rP, const SwTabCols &rNew, const SwTabCols &rOld,
+ const SwTableBox *pStart, BOOL bCurRowOnly );
+
+public:
+
+ SwHTMLTableLayout *GetHTMLTableLayout() { return pHTMLLayout; }
+ const SwHTMLTableLayout *GetHTMLTableLayout() const { return pHTMLLayout; }
+ void SetHTMLTableLayout( SwHTMLTableLayout *p ); //Eigentumsuebergang!
+
+ USHORT IncGrfsThatResize() { return ++nGrfsThatResize; }
+ USHORT DecGrfsThatResize() { return nGrfsThatResize ? --nGrfsThatResize : 0; }
+
+ void LockModify() { bModifyLocked = TRUE; } //Muessen _immer_ paarig
+ void UnlockModify() { bModifyLocked = FALSE;} //benutzt werden!
+
+ void SetTableModel( BOOL bNew ){ bNewModel = bNew; }
+ BOOL IsNewModel() const { return bNewModel; }
+
+ USHORT GetRowsToRepeat() const { return Min( GetTabLines().Count(), nRowsToRepeat ); }
+ USHORT _GetRowsToRepeat() const { return nRowsToRepeat; }
+ void SetRowsToRepeat( USHORT nNumOfRows ) { nRowsToRepeat = nNumOfRows; }
+
+ bool IsHeadline( const SwTableLine& rLine ) const;
+
+ SwTableLines &GetTabLines() { return aLines; }
+ const SwTableLines &GetTabLines() const { return aLines; }
+
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ void GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
+ BOOL bHidden = FALSE, BOOL bCurRowOnly = FALSE ) const;
+ void SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
+ const SwTableBox *pStart, BOOL bCurRowOnly );
+
+// The following functions are for new table model only...
+ void CreateSelection( const SwPaM& rPam, SwSelBoxes& rBoxes,
+ const SearchType eSearchType, bool bProtect ) const;
+ void CreateSelection( const SwNode* pStart, const SwNode* pEnd,
+ SwSelBoxes& rBoxes, const SearchType eSearchType, bool bProtect ) const;
+ void ExpandSelection( SwSelBoxes& rBoxes ) const;
+ // When a table is splitted into two tables, the row spans which overlaps
+ // the split have to be corrected and stored for undo
+ // SwSavRowSpan is the structure needed by Undo to undo the split operation
+ // CleanUpRowSpan corrects the (top of the) second table and delviers the structure
+ // for Undo
+ SwSaveRowSpan* CleanUpTopRowSpan( USHORT nSplitLine );
+ // RestoreRowSpan is called by Undo to restore the old row span values
+ void RestoreRowSpan( const SwSaveRowSpan& );
+ // CleanUpBottomRowSpan corrects the overhanging row spans at the end of the first table
+ void CleanUpBottomRowSpan( USHORT nDelLines );
+
+
+// The following functions are "pseudo-virtual", i.e. they are different for old and new table model
+// It's not allowed to change the table model after the first call of one of these functions.
+
+ BOOL Merge( SwDoc* pDoc, const SwSelBoxes& rBoxes, const SwSelBoxes& rMerged,
+ SwTableBox* pMergeBox, SwUndoTblMerge* pUndo = 0 )
+ {
+#ifdef DBG_UTIL
+ bDontChangeModel = true;
+#endif
+ return bNewModel ? NewMerge( pDoc, rBoxes, rMerged, pMergeBox, pUndo ) :
+ OldMerge( pDoc, rBoxes, pMergeBox, pUndo );
+ }
+ BOOL SplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1,
+ BOOL bSameHeight = FALSE )
+ {
+#ifdef DBG_UTIL
+ bDontChangeModel = true;
+#endif
+ return bNewModel ? NewSplitRow( pDoc, rBoxes, nCnt, bSameHeight ) :
+ OldSplitRow( pDoc, rBoxes, nCnt, bSameHeight );
+ }
+ bool PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
+ SwSelBoxes& rMerged, SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo );
+ void ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax ) const;
+ void PrepareDeleteCol( long nMin, long nMax );
+
+ BOOL InsertCol( SwDoc*, const SwSelBoxes& rBoxes,
+ USHORT nCnt = 1, BOOL bBehind = TRUE );
+ BOOL InsertRow( SwDoc*, const SwSelBoxes& rBoxes,
+ USHORT nCnt = 1, BOOL bBehind = TRUE );
+ BOOL AppendRow( SwDoc* pDoc, USHORT nCnt = 1 );
+ void PrepareDelBoxes( const SwSelBoxes& rBoxes );
+ BOOL DeleteSel( SwDoc*, const SwSelBoxes& rBoxes, const SwSelBoxes* pMerged,
+ SwUndo* pUndo, const BOOL bDelMakeFrms, const BOOL bCorrBorder );
+ BOOL SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, USHORT nCnt=1 );
+ BOOL Merge( const SwSelBoxes& rBoxes,
+ SwTableBox* pMergeBox, SwUndoTblMerge* = 0 );
+
+ void FindSuperfluousRows( SwSelBoxes& rBoxes )
+ { _FindSuperfluousRows( rBoxes, 0, 0 ); }
+ void CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const;
+
+ SwTableSortBoxes& GetTabSortBoxes() { return aSortCntBoxes; }
+ const SwTableSortBoxes& GetTabSortBoxes() const { return aSortCntBoxes; }
+
+ // lese die 1. Nummer und loesche sie aus dem String
+ // (wird von GetTblBox und SwTblFld benutzt)
+ // --> OD 2007-08-03 #i80314#
+ // add 3rd parameter in order to control validation check on <rStr>
+ static USHORT _GetBoxNum( String& rStr,
+ BOOL bFirst = FALSE,
+ const bool bPerformValidCheck = false );
+ // <--
+ // suche die Inhaltstragende Box mit dem Namen
+ // --> OD 2007-08-03 #i80314#
+ // add 2nd parameter in order to control validation check in called method
+ // <_GetBoxNum(..)>
+ const SwTableBox* GetTblBox( const String& rName,
+ const bool bPerformValidCheck = false ) const;
+ // <--
+ // kopiere die selektierten Boxen in ein anderes Dokument.
+ BOOL MakeCopy( SwDoc*, const SwPosition&, const SwSelBoxes&,
+ BOOL bCpyNds = TRUE, BOOL bCpyName = FALSE ) const;
+ // kopiere die Tabelle in diese. (die Logik steht im TBLRWCL.CXX)
+ BOOL InsTable( const SwTable& rCpyTbl, const SwNodeIndex&,
+ SwUndoTblCpyTbl* pUndo = 0 );
+ BOOL InsTable( const SwTable& rCpyTbl, const SwSelBoxes&,
+ SwUndoTblCpyTbl* pUndo = 0 );
+ BOOL InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes&,
+ SwUndoTblCpyTbl* pUndo );
+ // kopiere die Headline (mit Inhalt!) der Tabelle in eine andere
+ BOOL CopyHeadlineIntoTable( SwTableNode& rTblNd );
+
+ // erfrage die Box, dessen Start-Index auf nBoxStt steht
+ SwTableBox* GetTblBox( ULONG nSttIdx );
+ const SwTableBox* GetTblBox( ULONG nSttIdx ) const
+ { return ((SwTable*)this)->GetTblBox( nSttIdx ); }
+
+ // returnt TRUE wenn sich in der Tabelle Verschachtelungen befinden
+ BOOL IsTblComplex() const;
+
+ //returnt TRUE wenn die Tabelle oder Selektion ausgeglichen ist
+ BOOL IsTblComplexForChart( const String& rSel,
+ SwChartLines* pGetCLines = 0 ) const;
+
+ // suche alle Inhaltstragenden-Boxen der Grundline in der diese Box
+ // steht. rBoxes auch als Return-Wert, um es gleich weiter zu benutzen
+ //JP 31.01.97: bToTop = TRUE -> hoch bis zur Grundline,
+ // FALSE-> sonst nur die Line der Box
+ SwSelBoxes& SelLineFromBox( const SwTableBox* pBox,
+ SwSelBoxes& rBoxes, BOOL bToTop = TRUE ) const;
+ // erfrage vom Client Informationen
+ virtual BOOL GetInfo( SfxPoolItem& ) const;
+
+ // suche im Format nach der angemeldeten Tabelle
+ static SwTable * FindTable( SwFrmFmt const*const pFmt );
+
+ // Struktur ein wenig aufraeumen
+ void GCLines();
+
+ // returns the table node via aSortCntBoxes or pTableNode
+ SwTableNode* GetTableNode() const;
+ void SetTableNode( SwTableNode* pNode ) { pTableNode = pNode; }
+
+ // Daten Server-Methoden
+ void SetRefObject( SwServerObject* );
+ const SwServerObject* GetObject() const { return &refObj; }
+ SwServerObject* GetObject() { return &refObj; }
+
+ //Daten fuer das Chart fuellen.
+ void UpdateCharts() const;
+
+ TblChgMode GetTblChgMode() const { return eTblChgMode; }
+ void SetTblChgMode( TblChgMode eMode ) { eTblChgMode = eMode; }
+
+ BOOL SetColWidth( SwTableBox& rAktBox, USHORT eType,
+ SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
+ BOOL SetRowHeight( SwTableBox& rAktBox, USHORT eType,
+ SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
+#ifdef DBG_UTIL
+ void CheckConsistency() const;
+#endif
+};
+
+class SW_DLLPUBLIC SwTableLine: public SwClient // Client vom FrmFmt
+{
+ SwTableBoxes aBoxes;
+ SwTableBox *pUpper;
+
+public:
+ TYPEINFO();
+
+ SwTableLine() : pUpper(0) {}
+
+ SwTableLine( SwTableLineFmt*, USHORT nBoxes, SwTableBox *pUp );
+ virtual ~SwTableLine();
+
+ SwTableBoxes &GetTabBoxes() { return aBoxes; }
+ const SwTableBoxes &GetTabBoxes() const { return aBoxes; }
+
+ SwTableBox *GetUpper() { return pUpper; }
+ const SwTableBox *GetUpper() const { return pUpper; }
+ void SetUpper( SwTableBox *pNew ) { pUpper = pNew; }
+
+
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+
+ //Macht ein eingenes FrmFmt wenn noch mehr Lines von ihm abhaengen.
+ SwFrmFmt* ClaimFrmFmt();
+ void ChgFrmFmt( SwTableLineFmt* pNewFmt );
+
+ // suche nach der naechsten/vorherigen Box mit Inhalt
+ SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
+ BOOL bOvrTblLns=TRUE ) const;
+ SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
+ BOOL bOvrTblLns=TRUE ) const;
+
+ SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const;
+
+ bool hasSoftPageBreak() const;
+};
+
+class SW_DLLPUBLIC SwTableBox: public SwClient //Client vom FrmFmt
+{
+ friend class SwNodes; // um den Index umzusetzen !
+ friend void DelBoxNode(SwTableSortBoxes&); // um den StartNode* zu loeschen !
+ friend class SwXMLTableContext;
+
+ //nicht (mehr) implementiert.
+ SwTableBox( const SwTableBox & );
+ SwTableBox &operator=( const SwTableBox &); //gibts nicht.
+
+ SwTableLines aLines;
+ const SwStartNode * pSttNd;
+ SwTableLine *pUpper;
+ SwTableBox_Impl* pImpl;
+
+ // falls das Format schon Formeln/Values enthaelt, muss ein neues
+ // fuer die neue Box erzeugt werden.
+ SwTableBoxFmt* CheckBoxFmt( SwTableBoxFmt* );
+
+public:
+ TYPEINFO();
+
+ SwTableBox() : pSttNd(0), pUpper(0), pImpl(0) {}
+
+ SwTableBox( SwTableBoxFmt*, USHORT nLines, SwTableLine *pUp = 0 );
+ SwTableBox( SwTableBoxFmt*, const SwStartNode&, SwTableLine *pUp = 0 );
+ SwTableBox( SwTableBoxFmt*, const SwNodeIndex&, SwTableLine *pUp = 0 );
+ virtual ~SwTableBox();
+
+ SwTableLines &GetTabLines() { return aLines; }
+ const SwTableLines &GetTabLines() const { return aLines; }
+
+ SwTableLine *GetUpper() { return pUpper; }
+ const SwTableLine *GetUpper() const { return pUpper; }
+ void SetUpper( SwTableLine *pNew ) { pUpper = pNew; }
+
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+
+ //Macht ein eingenes FrmFmt wenn noch mehr Boxen von ihm abhaengen.
+ SwFrmFmt* ClaimFrmFmt();
+ void ChgFrmFmt( SwTableBoxFmt *pNewFmt );
+
+ const SwStartNode *GetSttNd() const { return pSttNd; }
+ ULONG GetSttIdx() const
+#ifndef DBG_UTIL
+ { return pSttNd ? pSttNd->GetIndex() : 0; }
+#else
+ ;
+#endif
+
+ // suche nach der naechsten/vorherigen Box mit Inhalt
+ SwTableBox* FindNextBox( const SwTable&, const SwTableBox* =0,
+ BOOL bOvrTblLns=TRUE ) const;
+ SwTableBox* FindPreviousBox( const SwTable&, const SwTableBox* =0,
+ BOOL bOvrTblLns=TRUE ) const;
+ // gebe den Namen dieser Box zurueck. Dieser wird dynamisch bestimmt
+ // und ergibt sich aus der Position in den Lines/Boxen/Tabelle
+ String GetName() const;
+ // gebe den "Wert" der Box zurueck (fuers rechnen in der Tabelle)
+ double GetValue( SwTblCalcPara& rPara ) const;
+
+ BOOL IsInHeadline( const SwTable* pTbl = 0 ) const;
+
+ // enthaelt die Box Inhalt, der als Nummer formatiert werden kann?
+ BOOL HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
+ BOOL& rIsEmptyTxtNd ) const;
+ ULONG IsValidNumTxtNd( BOOL bCheckAttr = TRUE ) const;
+ // teste ob der BoxInhalt mit der Nummer uebereinstimmt, wenn eine
+ // Tabellenformel gesetzt ist. (fuers Redo des Change vom NumFormat!)
+ BOOL IsNumberChanged() const;
+
+ // ist das eine FormelBox oder eine Box mit numerischen Inhalt (AutoSum)
+ // Was es ist, besagt der ReturnWert - die WhichId des Attributes
+ // Leere Boxen haben den ReturnWert USHRT_MAX !!
+ USHORT IsFormulaOrValueBox() const;
+
+ // Loading of a document requires an actualisation of cells with values
+ void ActualiseValueBox();
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTableBox)
+
+ // zugriff auf interne Daten - z.Z. benutzt fuer den NumFormatter
+ inline const Color* GetSaveUserColor() const;
+ inline const Color* GetSaveNumFmtColor() const;
+ inline void SetSaveUserColor(const Color* p );
+ inline void SetSaveNumFmtColor( const Color* p );
+
+ long getRowSpan() const;
+ void setRowSpan( long nNewRowSpan );
+ bool getDummyFlag() const;
+ void setDummyFlag( bool bDummy );
+
+ SwTableBox& FindStartOfRowSpan( const SwTable&, USHORT nMaxStep = USHRT_MAX );
+ const SwTableBox& FindStartOfRowSpan( const SwTable& rTable,
+ USHORT nMaxStep = USHRT_MAX ) const
+ { return const_cast<SwTableBox*>(this)->FindStartOfRowSpan( rTable, nMaxStep ); }
+
+ SwTableBox& FindEndOfRowSpan( const SwTable&, USHORT nMaxStep = USHRT_MAX );
+ const SwTableBox& FindEndOfRowSpan( const SwTable& rTable,
+ USHORT nMaxStep = USHRT_MAX ) const
+ { return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); }
+};
+
+class SwCellFrm;
+class SW_DLLPUBLIC SwTableCellInfo : public ::boost::noncopyable
+{
+ struct Impl;
+ ::std::auto_ptr<Impl> m_pImpl;
+
+ const SwCellFrm * getCellFrm() const ;
+
+public:
+ SwTableCellInfo(const SwTable * pTable);
+ ~SwTableCellInfo();
+
+ bool getNext();
+ SwRect getRect() const;
+ const SwTableBox * getTableBox() const;
+};
+
+#endif //_SWTABLE_HXX
diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx
new file mode 100644
index 000000000000..96479197cde6
--- /dev/null
+++ b/sw/inc/swtblfmt.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWTBLFMT_HXX
+#define _SWTBLFMT_HXX
+
+#include <frmfmt.hxx>
+
+class SwDoc;
+
+class SW_DLLPUBLIC SwTableFmt : public SwFrmFmt
+{
+ friend class SwDoc;
+
+protected:
+ SwTableFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange )
+ {}
+ SwTableFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableSetRange )
+ {}
+
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTableFmt)
+};
+
+class SwTableLineFmt : public SwFrmFmt
+{
+ friend class SwDoc;
+
+protected:
+ SwTableLineFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange )
+ {}
+ SwTableLineFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableLineSetRange )
+ {}
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTableLineFmt)
+};
+
+class SW_DLLPUBLIC SwTableBoxFmt : public SwFrmFmt
+{
+ friend class SwDoc;
+
+protected:
+ SwTableBoxFmt( SwAttrPool& rPool, const sal_Char* pFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, pFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange )
+ {}
+ SwTableBoxFmt( SwAttrPool& rPool, const String &rFmtNm,
+ SwFrmFmt *pDrvdFrm )
+ : SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange )
+ {}
+
+public:
+ TYPEINFO(); //Bereits in Basisklasse Client drin.
+
+ // zum Erkennen von Veraenderungen (haupts. TableBoxAttribute)
+ virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwTableBoxFmt)
+};
+
+
+#endif
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
new file mode 100644
index 000000000000..0d37e63c367d
--- /dev/null
+++ b/sw/inc/swtypes.hxx
@@ -0,0 +1,338 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWTYPES_HXX
+#define _SWTYPES_HXX
+#include <tools/solar.h>
+#include <SwGetPoolIdFromName.hxx>
+
+#ifndef INCLUDED_LIMITS_H
+#include <limits.h> //fuer LONG_MAX
+#define INCLUDED_LIMITS_H
+#endif
+
+#ifdef PM20
+#include <stdlib.h>
+#endif
+#include <com/sun/star/uno/Reference.h>
+#include "swdllapi.h"
+#include <i18npool/lang.h>
+// wenn das hier geaendert wird, dann auch im globals.hrc aendern!!!
+//#define SW_FILEFORMAT_40 SOFFICE_FILEFORMAT_40
+
+namespace com { namespace sun { namespace star {
+ namespace linguistic2{
+ class XDictionaryList;
+ class XSpellChecker1;
+ class XHyphenator;
+ class XThesaurus;
+ }
+ namespace beans{
+ class XPropertySet;
+ }
+}}}
+namespace utl{
+ class TransliterationWrapper;
+}
+
+class Size;
+class ResMgr;
+class UniString;
+class ByteString;
+class SwPathFinder;
+class Graphic;
+class OutputDevice;
+class CharClass;
+class LocaleDataWrapper;
+class CollatorWrapper;
+
+typedef long SwTwips;
+#define INVALID_TWIPS LONG_MAX
+#define TWIPS_MAX (LONG_MAX - 1)
+
+#define MM50 283 // 1/2 cm in TWIPS
+// --> OD 2004-06-18 #i19922# - constant for minimal page header/footer height of 1mm
+const SwTwips cMinHdFtHeight = 56;
+
+#define MINFLY 23 //Minimalgroesse fuer FlyFrms
+#define MINLAY 23 //Minimalgroesse anderer Frms
+
+// Default-Spaltenabstand zweier Textspalten entspricht 0.3 cm
+#define DEF_GUTTER_WIDTH (MM50 / 5 * 3)
+
+//Minimale Distance (Abstand zum Text) fuer das BorderAttribut, damit
+//die aligned'en Linien nicht geplaettet werden.
+//28 Twips == 0,4mm
+#define MIN_BORDER_DIST 28
+
+ /* minimaler Dokmentrand */
+const SwTwips lMinBorder = 1134;
+
+//Die Wiesenbreite links neben und ueber dem Dokument.
+//Die halbe Wiesenbreite ist der Abstand zwischen den Seiten.
+#define DOCUMENTBORDER 568L
+#define GAPBETWEENPAGES 284L
+
+//initiale UndoActionCount
+#define UNDO_ACTION_COUNT 20
+
+// Konstante Strings
+SW_DLLPUBLIC extern UniString aEmptyStr; // ""
+extern ByteString aEmptyByteStr; // ""
+SW_DLLPUBLIC extern UniString aDotStr; // '.'
+
+//Zum Einfuegen von Beschriftungen (wie bzw. wo soll eingefuegt werden).
+//Hier weil ein eigenes hxx nicht lohnt und es sonst nirgendwo so recht
+//hinpasst.
+enum SwLabelType
+{
+ LTYPE_TABLE, //Beschriftung einer Tabelle
+ LTYPE_OBJECT, //Beschriftung von Grafik oder OLE
+ LTYPE_FLY, //Beschriftung eines (Text-)Rahmens
+ LTYPE_DRAW //Beschriftung eines Zeichen-Objektes
+};
+
+
+const BYTE OLD_MAXLEVEL = 5;
+const BYTE MAXLEVEL = 10; //Ehemals numrule.hxx
+const BYTE NO_NUM = 200; //Ehemals numrule.hxx
+//const BYTE NO_NUMBERING = 201; //Ehemals numrule.hxx //#outline level,removed by zhaojianwei
+//const BYTE NO_INIT = 202; //Ehemals numrule.hxx
+
+// fuer Absaetze mit NO_NUM aber auf unterschiedlichen Leveln
+// DAMIT entfaellt das NO_NUM !!!!
+const BYTE NO_NUMLEVEL = 0x20; // wird mit den Levels verodert
+
+
+/*
+ * Nette Funktionen als MACRO oder inline
+ */
+
+/* ein KiloByte sind 1024 Byte */
+#define KB 1024
+
+#define SET_CURR_SHELL( shell ) CurrShell aCurr( shell )
+
+// pPathFinder wird von der UI initialisiert. Die Klasse liefert alle
+// benoetigten Pfade.
+extern SwPathFinder *pPathFinder;
+
+// Werte fuer die Einzuege an der Nummerierung und BulletListe
+// (fuer die weiteren Ebenen sind die Werte mit den Ebenen+1 zu
+// multiplizieren; Ebenen 0..4 !!!)
+
+// -> #i30312#
+const USHORT lBullIndent = 1440/4;
+const short lBullFirstLineOffset = -lBullIndent;
+const USHORT lNumIndent = 1440/4;
+const short lNumFirstLineOffset = -lNumIndent;
+const short lOutlineMinTextDistance = 216; // 0.15 inch = 0.38 cm
+// <- #i30312#
+
+// Anzahl der SystemField-Types vom SwDoc
+#define INIT_FLDTYPES 32
+// Anzahl der vordefinierten Seq-Feldtypen. Es handelt sich dabei
+// immer um die letzen Felder vor INIT_FLDTYPES
+#define INIT_SEQ_FLDTYPES 4
+
+//Die ehemaligen Rendevouz-Ids leben weiter:
+//Es gibt Ids fuer die Anker (SwFmtAnchor) und ein paar weitere die nur fuer
+//Schnittstellen Bedeutung haben (SwDoc).
+enum RndStdIds
+{
+ FLY_AT_PARA, // anchored at paragraph
+ FLY_AS_CHAR, // anchored as character
+ FLY_AT_PAGE, // anchored at page
+ FLY_AT_FLY, // anchored at frame
+ FLY_AT_CHAR, // anchored at character
+ //Der Rest wird nur fuer SS benutzt.
+ RND_STD_HEADER,
+ RND_STD_FOOTER,
+ RND_STD_HEADERL,
+ RND_STD_HEADERR,
+ RND_STD_FOOTERL,
+ RND_STD_FOOTERR,
+
+ RND_DRAW_OBJECT // ein Draw-Object !! nur fuer die SwDoc-Schnittstelle!
+};
+
+
+extern ResMgr* pSwResMgr; // steht in swapp0.cxx
+#define SW_RES(i) ResId(i,*pSwResMgr)
+#define SW_RESSTR(i) UniString(ResId(i,*pSwResMgr))
+
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellChecker1 > GetSpellChecker();
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenator > GetHyphenator();
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XThesaurus > GetThesaurus();
+::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > GetLinguPropertySet();
+
+// reutns the twip size of this graphic
+SW_DLLPUBLIC Size GetGraphicSizeTwip( const Graphic&, OutputDevice* pOutDev );
+
+
+// Seperator fuer Sprunge im Dokument auf verschiedene Inhalttype
+const sal_Unicode cMarkSeperator = '|';
+extern const sal_Char* __FAR_DATA pMarkToTable; // Strings stehen
+extern const sal_Char* __FAR_DATA pMarkToFrame; // im Init.cxx
+extern const sal_Char* __FAR_DATA pMarkToRegion;
+SW_DLLPUBLIC extern const sal_Char* __FAR_DATA pMarkToOutline;
+extern const sal_Char* __FAR_DATA pMarkToText;
+extern const sal_Char* __FAR_DATA pMarkToGraphic;
+extern const sal_Char* __FAR_DATA pMarkToOLE;
+
+#ifndef DB_DELIM // Ist in OFA definiert!!!
+#define DB_DELIM ((sal_Unicode)0xff) // Datenbank <-> Tabellen-Trenner
+#endif
+
+
+typedef USHORT SetAttrMode;
+
+namespace nsSetAttrMode
+{
+ const SetAttrMode SETATTR_DEFAULT = 0x0000; // default
+ const SetAttrMode SETATTR_DONTEXPAND = 0x0001; // TextAttribute nicht weiter expand.
+ const SetAttrMode SETATTR_DONTREPLACE = 0x0002; // kein anderes TextAttrib verdraengen
+
+ const SetAttrMode SETATTR_NOTXTATRCHR = 0x0004; // bei Attr ohne Ende kein 0xFF einfuegen
+ const SetAttrMode SETATTR_NOHINTADJUST = 0x0008; // keine Zusammenfassung von Bereichen.
+ const SetAttrMode SETATTR_NOFORMATATTR = 0x0010; // nicht zum FormatAttribut umwandeln
+ const SetAttrMode SETATTR_DONTCHGNUMRULE = 0x0020; // nicht die NumRule veraendern
+ const SetAttrMode SETATTR_APICALL = 0x0040; // called from API (all UI related
+ // functionality will be disabled)
+ /// force hint expand (only matters for hints with CH_TXTATR)
+ const SetAttrMode SETATTR_FORCEHINTEXPAND= 0x0080;
+}
+
+//Umrechnung Twip<-> 1/100 mm fuer UNO
+
+#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
+#define MM100_TO_TWIP(MM100) ((MM100) >= 0 ? (((MM100)*72L+63L)/127L) : (((MM100)*72L-63L)/127L))
+#define TWIP_TO_MM100_UNSIGNED(TWIP) ((((TWIP)*127L+36L)/72L))
+#define MM100_TO_TWIP_UNSIGNED(MM100) ((((MM100)*72L+63L)/127L))
+
+#define SW_ISPRINTABLE( c ) ( c >= ' ' && 127 != c )
+
+#ifndef SW_CONSTASCII_DECL
+#define SW_CONSTASCII_DECL( n, s ) n[sizeof(s)]
+#endif
+#ifndef SW_CONSTASCII_DEF
+#define SW_CONSTASCII_DEF( n, s ) n[sizeof(s)] = s
+#endif
+
+
+#define CHAR_HARDBLANK ((sal_Unicode)0x00A0)
+#define CHAR_HARDHYPHEN ((sal_Unicode)0x2011)
+#define CHAR_SOFTHYPHEN ((sal_Unicode)0x00AD)
+#define CHAR_RLM ((sal_Unicode)0x200F)
+#define CHAR_LRM ((sal_Unicode)0x200E)
+#define CHAR_ZWSP ((sal_Unicode)0x200B)
+#define CHAR_ZWNBSP ((sal_Unicode)0x2060)
+
+
+// returns the APP - CharClass instance - used for all ToUpper/ToLower/...
+SW_DLLPUBLIC CharClass& GetAppCharClass();
+SW_DLLPUBLIC LanguageType GetAppLanguage();
+
+
+#if 0
+// I18N doesn't get this right, can't specify more than one to ignore
+#define SW_COLLATOR_IGNORES ( \
+ ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE | \
+ ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_KANA | \
+ ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_WIDTH )
+#else
+#define SW_COLLATOR_IGNORES ( \
+ ::com::sun::star::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE )
+#endif
+
+SW_DLLPUBLIC CollatorWrapper& GetAppCollator();
+SW_DLLPUBLIC CollatorWrapper& GetAppCaseCollator();
+
+SW_DLLPUBLIC const ::utl::TransliterationWrapper& GetAppCmpStrIgnore();
+
+// --> OD 2004-06-30 #i28701# - moved from <frame.hxx>
+//fuer Prepare() zur Benachrichtigung des Inhaltes durch das Layout auf
+//dem kurzen Dienstweg.
+//Der Inhalt sorgt dafuer, dass beim naechsten Aufruf von ::Format() das
+//minimal notwendige berechnet wird.
+enum PrepareHint
+{
+ PREP_BEGIN, //BEGIN
+ PREP_CLEAR = PREP_BEGIN,//Komplett neuformatieren.
+ PREP_WIDOWS_ORPHANS, //Nur Witwen- und Waisen-Regelung pruefen und ggf.
+ //Aufspalten.
+ PREP_FIXSIZE_CHG, //Die FixSize hat sich veraendert.
+ PREP_FOLLOW_FOLLOWS, //Follow ist jetzt moeglicherweise direkter
+ //Nachbar.
+ PREP_ADJUST_FRM, //Groesse per Grow/Shrink Ausrichten ohne zu
+ //Formatieren.
+ PREP_FLY_CHGD, //Ein FlyFrm hat sich (Groesse) veraendert.
+ PREP_FLY_ATTR_CHG, //Ein FlyFrm hat seine Attribute veraendert
+ //(z.B. Umlauf)
+ PREP_FLY_ARRIVE, //Ein FlyFrm ueberlappt den Bereich jetzt neu.
+ PREP_FLY_LEAVE, //Ein FlyFrm hat den Bereich verlassen.
+ PREP_FTN, //Fussnoten-Invalidierung
+ PREP_POS_CHGD, //Position des Frm hat sich verandert
+ //(Zum Fly-Umbruch pruefen). Im void* des Prepare()
+ //wird ein BOOL& uebergeben, dieser zeigt mit TRUE,
+ //dass ein Format ausgefuehrt wurde.
+ PREP_UL_SPACE, //UL-Space hat sich veraendert, TxtFrms muessen
+ //den Zeilenabstand neu kalkulieren.
+ PREP_MUST_FIT, //Frm passen machen (aufspalten) auch wenn die
+ //Attribute es nicht erlauben (z.B. zusammenhalten).
+ PREP_WIDOWS, // Ein Follow stellt fest, dass in ihm die Orphans-
+ // regel zuschlaegt und verschickt an seinen
+ // Vorgaenger (Master/Follow) ein PREP_WIDOWS
+ PREP_QUOVADIS, // Wenn eine Fussnote _zwischen_ zwei Absaetzen
+ // aufgespalten werden muss, dann muss der
+ // letzte auf der Seite noch ein QUOVADIS bekommen
+ // damit er den Text hineinformatiert.
+ PREP_BOSS_CHGD, // Wenn ein Frm die Spalte/Seite wechselt, wird dieses
+ // Zusatzprepare zum POS_CHGD im MoveFwd/Bwd
+ // verschickt (Ftn-Nummern joinen etc.)
+ // Die Richtung wird ueber pVoid mitgeteilt:
+ // MoveFwd: pVoid == 0
+ // MoveBwd: pVoid == pOldPage
+ PREP_SWAP, //Grafiken Swappen, fuer Grafiken im sichtbaren
+ //Bereich.
+ PREP_REGISTER, //Registerhaltige Frames invalidieren
+ PREP_FTN_GONE, //Ein Follow verliert eine Fussnote, ggf. kann seine erste
+ //Zeile hochrutschen
+ PREP_MOVEFTN, //eine Fussnote wechselt die Seite, der Inhalt bekommt
+ //zunaechst eine Hoehe von Null, damit nicht zuviel
+ //Unruhe entsteht. Beim Formatieren prueft er, ob er
+ //ueberhaupt passt und wechselt ggf. unbemerkt wieder
+ //die Seite.
+ PREP_ERGOSUM, //wg. Bewegung in FtnFrms QuoVadis/ErgoSum pruefen
+ PREP_END //END
+};
+// <--
+
+#endif
diff --git a/sw/inc/swundo.hxx b/sw/inc/swundo.hxx
new file mode 100644
index 000000000000..02212401d990
--- /dev/null
+++ b/sw/inc/swundo.hxx
@@ -0,0 +1,200 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWUNDO_HXX
+#define _SWUNDO_HXX
+
+#include <svl/svarray.hxx>
+
+// die Ids fuer StdAktionen
+enum SwUndoId
+{
+ UNDO_EMPTY = 0,
+ UNDO_STD_BEGIN = 1,
+ UNDO_START = UNDO_STD_BEGIN, // 1
+ UNDO_END, // 2
+ REPEAT_START, // alle UndoIds zwischen REPEAT_START und
+ // REPEAT_END sind Repeat-Faehig !!
+ UNDO_DELETE = REPEAT_START, // 3
+ UNDO_INSERT, // 4
+ UNDO_OVERWRITE, // 5
+ UNDO_SPLITNODE, // 6
+ UNDO_INSATTR, // 7
+ UNDO_SETFMTCOLL, // 8
+ UNDO_RESETATTR, // 9
+ UNDO_INSFMTATTR, // 10
+ UNDO_INSDOKUMENT, // 11
+ UNDO_COPY, // 12
+ UNDO_INSTABLE, // 13
+ UNDO_TABLETOTEXT, // 14
+ UNDO_TEXTTOTABLE, // 15
+ UNDO_SORT_TXT, // 16
+ UNDO_INSLAYFMT, // 17
+ UNDO_TABLEHEADLINE, // 18
+ UNDO_INSSECTION, // 19
+ UNDO_OUTLINE_LR, // 20
+ UNDO_OUTLINE_UD, // 21
+ UNDO_INSNUM, // 22
+ UNDO_NUMUP, // 23
+ UNDO_MOVENUM, // 24
+ UNDO_INSDRAWFMT, // 25
+ UNDO_NUMORNONUM, // 26
+ UNDO_INC_LEFTMARGIN, // 27
+ UNDO_DEC_LEFTMARGIN, // 28
+ UNDO_INSERTLABEL, // 29
+ UNDO_SETNUMRULESTART, // 30
+ UNDO_CHGFTN, // 31
+ UNDO_REDLINE, // 32
+ UNDO_ACCEPT_REDLINE, // 33
+ UNDO_REJECT_REDLINE, // 34
+ UNDO_SPLIT_TABLE, // 35
+ UNDO_DONTEXPAND, // 36
+ UNDO_AUTOCORRECT, // 37
+ UNDO_MERGE_TABLE, // 38
+ UNDO_TRANSLITERATE, // 39
+
+ // -> #111827#
+ UNDO_PASTE_CLIPBOARD, // 40
+ UNDO_TYPING, // 41
+ // <- #111827#
+ UNDO_REPEAT_DUMMY_6, // 42
+ UNDO_REPEAT_DUMMY_7, // 43
+ UNDO_REPEAT_DUMMY_8, // 44
+ UNDO_REPEAT_DUMMY_9, // 45
+ REPEAT_END,
+
+ UNDO_MOVE = REPEAT_END, // 46
+ UNDO_INSGLOSSARY, // 47
+ UNDO_DELBOOKMARK, // 48
+ UNDO_INSBOOKMARK, // 49
+ UNDO_SORT_TBL, // 50
+ UNDO_DELLAYFMT, // 51
+ UNDO_AUTOFORMAT, // 52
+ UNDO_REPLACE, // 53
+ UNDO_DELSECTION, // 54
+ UNDO_CHGSECTION, // 55
+ UNDO_CHGSECTIONPASSWD, // 56
+ UNDO_SETDEFTATTR, // 57
+ UNDO_DELNUM, // 58
+ UNDO_DRAWUNDO, // 59
+ UNDO_DRAWGROUP, // 60
+ UNDO_DRAWUNGROUP, // 61
+ UNDO_DRAWDELETE, // 62
+ UNDO_REREAD, // 63
+ UNDO_DELGRF, // 64
+ UNDO_DELOLE, // 65
+ UNDO_TABLE_ATTR, // 66
+ UNDO_TABLE_AUTOFMT, // 67
+ UNDO_TABLE_INSCOL, // 68
+ UNDO_TABLE_INSROW, // 69
+ UNDO_TABLE_DELBOX, // 70
+ UNDO_TABLE_SPLIT, // 71
+ UNDO_TABLE_MERGE, // 72
+ UNDO_TBLNUMFMT, // 73
+ UNDO_INSTOX, // 74
+ UNDO_CLEARTOXRANGE, // 75
+ UNDO_TBLCPYTBL, // 76
+ UNDO_CPYTBL, // 77
+ UNDO_INS_FROM_SHADOWCRSR, // 78
+ UNDO_CHAINE, // 79
+ UNDO_UNCHAIN, // 80
+ UNDO_FTNINFO, // 81
+ UNDO_ENDNOTEINFO, // 82
+ UNDO_COMPAREDOC, // 83
+ UNDO_SETFLYFRMFMT, // 84
+ UNDO_SETRUBYATTR, // 85
+
+ UNDO_TMPAUTOCORR, // 86 #102505#
+ UNDO_TOXCHANGE, // 87
+ UNDO_CREATE_PAGEDESC, // 88
+ UNDO_CHANGE_PAGEDESC, // 89
+ UNDO_DELETE_PAGEDESC, // 90
+ UNDO_HEADER_FOOTER, // 91 #i7983#
+ UNDO_FIELD, // 92 #111840#
+ UNDO_TXTFMTCOL_CREATE, // 93
+ UNDO_TXTFMTCOL_DELETE, // 94
+ UNDO_TXTFMTCOL_RENAME, // 95
+ UNDO_CHARFMT_CREATE, // 96
+ UNDO_CHARFMT_DELETE, // 97
+ UNDO_CHARFMT_RENAME, // 98
+ UNDO_FRMFMT_CREATE, // 99
+ UNDO_FRMFMT_DELETE, // 100
+ UNDO_FRMFMT_RENAME, // 101
+ UNDO_NUMRULE_CREATE,// 102
+ UNDO_NUMRULE_DELETE,// 103
+ UNDO_NUMRULE_RENAME,// 104
+ UNDO_BOOKMARK_RENAME, // 105
+ UNDO_INDEX_ENTRY_INSERT, // 106
+ UNDO_INDEX_ENTRY_DELETE, // 107
+ UNDO_COL_DELETE, // 108
+ UNDO_ROW_DELETE, // 109
+ UNDO_RENAME_PAGEDESC, // 110
+ UNDO_NUMDOWN, // 111
+ // --> OD 2009-07-16 #i73249#
+ UNDO_FLYFRMFMT_TITLE, // 112
+ UNDO_FLYFRMFMT_DESCRIPTION, // 113
+ // <--
+ UNDO_STD_END= UNDO_FLYFRMFMT_DESCRIPTION,
+
+ // UI undo ID's...
+ UNDO_UI_REPLACE = UNDO_STD_END + 1,
+ UNDO_UI_INSERT_PAGE_BREAK,
+ UNDO_UI_INSERT_COLUMN_BREAK,
+ UNDO_UI_PLAY_MACRO,
+ UNDO_UI_INSERT_ENVELOPE,
+ UNDO_UI_DRAG_AND_COPY,
+ UNDO_UI_DRAG_AND_MOVE,
+ UNDO_UI_INSERT_RULER,
+ UNDO_UI_INSERT_CHART,
+ UNDO_UI_INSERT_FOOTNOTE,
+ UNDO_UI_INSERT_URLBTN,
+ UNDO_UI_INSERT_URLTXT,
+ UNDO_UI_DELETE_INVISIBLECNTNT,
+ UNDO_UI_REPLACE_STYLE
+};
+
+
+#define INIT_UNDOIDS 20
+#define GROW_UNDOIDS 32
+// Das Array der verwendeten Undo-Ids
+class String;
+class SwUndoIdAndName
+{
+ SwUndoId eUndoId;
+ String* pUndoStr;
+
+public:
+ SwUndoIdAndName() : eUndoId( UNDO_EMPTY ), pUndoStr( 0 ) {}
+ SwUndoIdAndName( SwUndoId nId, const String* pStr = 0 );
+ ~SwUndoIdAndName();
+
+ SwUndoId GetUndoId() const { return eUndoId; }
+ const String* GetUndoStr() const { return pUndoStr; }
+};
+typedef SwUndoIdAndName* SwUndoIdAndNamePtr;
+SV_DECL_PTRARR_DEL( SwUndoIds, SwUndoIdAndNamePtr, INIT_UNDOIDS, GROW_UNDOIDS )
+
+#endif
diff --git a/sw/inc/swunodef.hxx b/sw/inc/swunodef.hxx
new file mode 100644
index 000000000000..e63514e11f1a
--- /dev/null
+++ b/sw/inc/swunodef.hxx
@@ -0,0 +1,36 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWUNODEF_HXX
+#define _SWUNODEF_HXX
+
+#define STAR_NMSPC ::com::sun::star
+#define UNO_NMSPC STAR_NMSPC::uno
+#define CLIP_NMSPC STAR_NMSPC::datatransfer::clipboard
+
+#define STAR_REFERENCE(aType) UNO_NMSPC::Reference< STAR_NMSPC::aType >
+
+#endif
diff --git a/sw/inc/swunohelper.hxx b/sw/inc/swunohelper.hxx
new file mode 100644
index 000000000000..96ea90f5ce1d
--- /dev/null
+++ b/sw/inc/swunohelper.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWUNOHELPER_HXX
+#define _SWUNOHELPER_HXX
+
+#include <tools/solar.h>
+#include <sal/types.h>
+#include "swdllapi.h"
+
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ class Any;
+ }
+}}}
+
+class String;
+class SvStrings;
+class SvPtrarr;
+
+namespace SWUnoHelper {
+
+// calls over the compherl the getEnumAsInt32 function and handle the
+// exceptions.
+sal_Int32 GetEnumAsInt32( const com::sun::star::uno::Any& rVal );
+
+
+// methods for UCB actions:
+ // delete the file under this URL
+SW_DLLPUBLIC BOOL UCB_DeleteFile( const String& rURL );
+
+ // copy/move the file to a new location
+BOOL UCB_CopyFile( const String& rURL, const String& rNewURL,
+ BOOL bCopyIsMove = FALSE );
+
+ // is the URL on the current system case sentive?
+SW_DLLPUBLIC BOOL UCB_IsCaseSensitiveFileName( const String& rURL );
+
+ // is the URL readonly?
+SW_DLLPUBLIC BOOL UCB_IsReadOnlyFileName( const String& rURL );
+
+ // get a list of files from the folder of the URL
+ // options: pExtension = 0 -> all, else this specific extension
+ // pDateTime != 0 -> returns also the modified date/time of
+ // the files in a SvPtrarr -->
+ // !! objects must be deleted from the caller!!
+BOOL UCB_GetFileListOfFolder( const String& rURL, SvStrings& rList,
+ const String* pExtension = 0,
+ SvPtrarr* pDateTimeList = 0 );
+
+ // is the URL an existing file?
+SW_DLLPUBLIC BOOL UCB_IsFile( const String& rURL );
+
+ // is the URL a existing directory?
+BOOL UCB_IsDirectory( const String& rURL );
+}
+
+#endif
diff --git a/sw/inc/swurl.hxx b/sw/inc/swurl.hxx
new file mode 100644
index 000000000000..f8b9af4d6097
--- /dev/null
+++ b/sw/inc/swurl.hxx
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWURL_HXX
+#define _SWURL_HXX
+
+#include <tools/solar.h>
+
+
+class UniString;
+class ViewShell;
+
+#define URLLOAD_NOFILTER 0x0000
+#define URLLOAD_NEWVIEW 0x8000
+
+
+void LoadURL( const UniString& rName, ViewShell* pSh,
+ USHORT nFilter = URLLOAD_NOFILTER,
+ const UniString *pTargetFrameName = 0 );
+
+
+
+#endif
diff --git a/sw/inc/swwait.hxx b/sw/inc/swwait.hxx
new file mode 100644
index 000000000000..19fb3045359c
--- /dev/null
+++ b/sw/inc/swwait.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWWAIT_HXX
+#define _SWWAIT_HXX
+
+#include <tools/solar.h>
+#include "swdllapi.h"
+
+class SwDocShell;
+
+class SW_DLLPUBLIC SwWait
+{
+ SwDocShell &rDoc;
+ BOOL bLock;
+public:
+ SwWait( SwDocShell &rDocShell, BOOL bLockDispatcher );
+ ~SwWait();
+};
+
+#endif
diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx
new file mode 100644
index 000000000000..fed5ab748b6f
--- /dev/null
+++ b/sw/inc/tabcol.hxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TABCOL_HXX
+#define _TABCOL_HXX
+
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_LONGS
+#define _SVSTDARR_BOOLS
+#include <svl/svstdarr.hxx>
+#endif
+
+#ifndef INCLUDED_VECTOR
+#include <vector>
+#define INCLUDED_VECTOR
+#endif
+#include "swdllapi.h"
+
+struct SwTabColsEntry
+{
+ long nPos;
+ long nMin;
+ long nMax;
+ BOOL bHidden; //Fuer jeden Eintrag ein Flag, Hidden oder nicht.
+ //Wenn das Flag Hidden TRUE ist liegt der Spalten-
+ //trenner nicht in der aktuellen Zeile; er muss
+ //mit gepflegt werden, darf aber nicht angezeigt
+ //werden.
+};
+
+typedef std::vector< SwTabColsEntry > SwTabColsEntries;
+
+class SW_DLLPUBLIC SwTabCols
+{
+ long nLeftMin, //Linker aeusserer Rand (Bezugspunkt) in
+ //Dokumentkordinaten.
+ //Alle anderen Werte relativ zu diesem Punkt!
+ nLeft, //Linker Rand der Tabelle.
+ nRight, //Rechter Rand der Tabelle.
+ nRightMax; //Maximaler rechter Rand der Tabelle.
+
+ bool bLastRowAllowedToChange; // if the last row of the table frame
+ // is split across pages, it may not
+ // change its size
+
+ SwTabColsEntries aData;
+
+ //fuer den CopyCTor
+ const SwTabColsEntries& GetData() const { return aData; }
+
+public:
+ SwTabCols( USHORT nSize = 0 );
+ SwTabCols( const SwTabCols& );
+ SwTabCols &operator=( const SwTabCols& );
+ BOOL operator==( const SwTabCols& rCmp ) const;
+ long& operator[]( USHORT nPos ) { return aData[nPos].nPos; }
+ long operator[]( USHORT nPos ) const { return aData[nPos].nPos; }
+ USHORT Count() const { return sal::static_int_cast< USHORT >(aData.size()); }
+
+ BOOL IsHidden( USHORT nPos ) const { return aData[nPos].bHidden; }
+ void SetHidden( USHORT nPos, BOOL bValue ) { aData[nPos].bHidden = bValue; }
+
+ void Insert( long nValue, BOOL bValue, USHORT nPos );
+ void Insert( long nValue, long nMin, long nMax, BOOL bValue, USHORT nPos );
+ void Remove( USHORT nPos, USHORT nAnz = 1 );
+
+ const SwTabColsEntry& GetEntry( USHORT nPos ) const { return aData[nPos]; }
+ SwTabColsEntry& GetEntry( USHORT nPos ) { return aData[nPos]; }
+
+ long GetLeftMin() const { return nLeftMin; }
+ long GetLeft() const { return nLeft; }
+ long GetRight() const { return nRight; }
+ long GetRightMax()const { return nRightMax;}
+
+ void SetLeftMin ( long nNew ) { nLeftMin = nNew; }
+ void SetLeft ( long nNew ) { nLeft = nNew; }
+ void SetRight ( long nNew ) { nRight = nNew; }
+ void SetRightMax( long nNew ) { nRightMax = nNew;}
+
+ bool IsLastRowAllowedToChange() const { return bLastRowAllowedToChange; }
+ void SetLastRowAllowedToChange( bool bNew ) { bLastRowAllowedToChange = bNew; }
+};
+
+#endif //_TABCOL_HXX
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
new file mode 100644
index 000000000000..fe2dd58b477d
--- /dev/null
+++ b/sw/inc/tblafmt.hxx
@@ -0,0 +1,270 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TBLAFMT_HXX
+#define _TBLAFMT_HXX
+/*************************************************************************
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+JP 20.07.95:
+
+ Die akt. Struktur der Autoformatierung darf nicht mehr veraendert werden.
+ Diese wird durch unterschiedlichen Code vom StartWriter und vom StarCalc
+ eingelesen/geschrieben.
+ Sollte sich doch mal eine Aenderung nicht vermeiden lassen, dann auf
+ jedenfall in beiden Applikationen aendern.
+
+ The structure of table auto formatting should not changed. It is used
+ by different code of Writer and Calc. If a change is necessary, the
+ source code of both applications must be changed!
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+**************************************************************************/
+
+#include <svl/svarray.hxx>
+#include "hintids.hxx" //_immmer_ vor den solar-items!
+#include <svx/algitem.hxx>
+#include <editeng/fontitem.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/crsditem.hxx>
+#ifndef _SVX_CNTRTITEM_HXX //autogen
+#include <editeng/cntritem.hxx>
+#endif
+#include <editeng/shdditem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/boxitem.hxx>
+#include <editeng/brshitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <svx/rotmodit.hxx>
+#include <svl/intitem.hxx>
+#include <editeng/bolnitem.hxx>
+#include "swdllapi.h"
+
+struct SwAfVersions;
+
+class SvNumberFormatter;
+
+class SwBoxAutoFmt
+{
+ // common attributes of Calc and Writer
+ // --- from 641 on: CJK and CTL font settings
+ SvxFontItem aFont;
+ SvxFontHeightItem aHeight;
+ SvxWeightItem aWeight;
+ SvxPostureItem aPosture;
+
+ SvxFontItem aCJKFont;
+ SvxFontHeightItem aCJKHeight;
+ SvxWeightItem aCJKWeight;
+ SvxPostureItem aCJKPosture;
+
+ SvxFontItem aCTLFont;
+ SvxFontHeightItem aCTLHeight;
+ SvxWeightItem aCTLWeight;
+ SvxPostureItem aCTLPosture;
+
+ SvxUnderlineItem aUnderline;
+ SvxOverlineItem aOverline;
+ SvxCrossedOutItem aCrossedOut;
+ SvxContourItem aContour;
+ SvxShadowedItem aShadowed;
+ SvxColorItem aColor;
+ SvxBoxItem aBox;
+ SvxLineItem aTLBR;
+ SvxLineItem aBLTR;
+ SvxBrushItem aBackground;
+
+ // Writer specific
+ SvxAdjustItem aAdjust;
+
+ // Calc specific
+ SvxHorJustifyItem aHorJustify;
+ SvxVerJustifyItem aVerJustify;
+ SfxBoolItem aStacked;
+ SvxMarginItem aMargin;
+ SfxBoolItem aLinebreak;
+ SfxInt32Item aRotateAngle;
+ SvxRotateModeItem aRotateMode;
+
+ // number format
+ String sNumFmtString;
+ LanguageType eSysLanguage, eNumFmtLanguage;
+
+public:
+ SwBoxAutoFmt();
+ SwBoxAutoFmt( const SwBoxAutoFmt& rNew );
+ ~SwBoxAutoFmt();
+
+ int operator==( const SwBoxAutoFmt& rCmp ) const;
+ SwBoxAutoFmt& operator=( const SwBoxAutoFmt& rNew );
+
+ // die Get-Methoden
+ const SvxFontItem &GetFont() const { return aFont; }
+ const SvxFontHeightItem &GetHeight() const { return aHeight; }
+ const SvxWeightItem &GetWeight() const { return aWeight; }
+ const SvxPostureItem &GetPosture() const { return aPosture; }
+ const SvxFontItem &GetCJKFont() const { return aCJKFont; }
+ const SvxFontHeightItem &GetCJKHeight() const { return aCJKHeight; }
+ const SvxWeightItem &GetCJKWeight() const { return aCJKWeight; }
+ const SvxPostureItem &GetCJKPosture() const { return aCJKPosture; }
+ const SvxFontItem &GetCTLFont() const { return aCTLFont; }
+ const SvxFontHeightItem &GetCTLHeight() const { return aCTLHeight; }
+ const SvxWeightItem &GetCTLWeight() const { return aCTLWeight; }
+ const SvxPostureItem &GetCTLPosture() const { return aCTLPosture; }
+ const SvxUnderlineItem &GetUnderline() const { return aUnderline; }
+ const SvxOverlineItem &GetOverline() const { return aOverline; }
+ const SvxCrossedOutItem &GetCrossedOut() const { return aCrossedOut; }
+ const SvxContourItem &GetContour() const { return aContour; }
+ const SvxShadowedItem &GetShadowed() const { return aShadowed; }
+ const SvxColorItem &GetColor() const { return aColor; }
+ const SvxAdjustItem &GetAdjust() const { return aAdjust; }
+ const SvxBoxItem &GetBox() const { return aBox; }
+ const SvxLineItem &GetTLBR() const { return aTLBR; }
+ const SvxLineItem &GetBLTR() const { return aBLTR; }
+ const SvxBrushItem &GetBackground() const { return aBackground; }
+ void GetValueFormat( String& rFmt, LanguageType& rLng, LanguageType& rSys ) const
+ { rFmt = sNumFmtString; rLng = eNumFmtLanguage; rSys = eSysLanguage; }
+
+ // die SetMethoden
+ void SetFont( const SvxFontItem& rNew ) { aFont = rNew; }
+ void SetHeight( const SvxFontHeightItem& rNew ) { aHeight = rNew; }
+ void SetWeight( const SvxWeightItem& rNew ) { aWeight = rNew; }
+ void SetPosture( const SvxPostureItem& rNew ) { aPosture = rNew; }
+ void SetCJKFont( const SvxFontItem& rNew ) { aCJKFont = rNew; }
+ void SetCJKHeight( const SvxFontHeightItem& rNew ) { aCJKHeight = rNew; }
+ void SetCJKWeight( const SvxWeightItem& rNew ) { aCJKWeight = rNew; }
+ void SetCJKPosture( const SvxPostureItem& rNew ) { aCJKPosture = rNew; }
+ void SetCTLFont( const SvxFontItem& rNew ) { aCTLFont = rNew; }
+ void SetCTLHeight( const SvxFontHeightItem& rNew ) { aCTLHeight = rNew; }
+ void SetCTLWeight( const SvxWeightItem& rNew ) { aCTLWeight = rNew; }
+ void SetCTLPosture( const SvxPostureItem& rNew ) { aCTLPosture = rNew; }
+ void SetUnderline( const SvxUnderlineItem& rNew ) { aUnderline = rNew; }
+ void SetOverline( const SvxOverlineItem& rNew ) { aOverline = rNew; }
+ void SetCrossedOut( const SvxCrossedOutItem& rNew ) { aCrossedOut = rNew; }
+ void SetContour( const SvxContourItem& rNew ) { aContour = rNew; }
+ void SetShadowed( const SvxShadowedItem& rNew ) { aShadowed = rNew; }
+ void SetColor( const SvxColorItem& rNew ) { aColor = rNew; }
+ void SetAdjust( const SvxAdjustItem& rNew )
+ {
+ aAdjust.SetAdjust( rNew.GetAdjust() );
+ aAdjust.SetOneWord( rNew.GetOneWord() );
+ aAdjust.SetLastBlock( rNew.GetLastBlock() );
+ }
+ void SetBox( const SvxBoxItem& rNew ) { aBox = rNew; }
+ void SetBackground( const SvxBrushItem& rNew ) { aBackground = rNew; }
+ void SetValueFormat( const String& rFmt, LanguageType eLng, LanguageType eSys )
+ { sNumFmtString = rFmt; eNumFmtLanguage = eLng; eSysLanguage = eSys; }
+
+ BOOL Load( SvStream& rStream, const SwAfVersions& rVersions, USHORT nVer );
+ BOOL Save( SvStream& rStream ) const;
+ BOOL SaveVerionNo( SvStream& rStream ) const;
+
+#ifdef READ_OLDVERS
+ // lade alte Version
+ BOOL LoadOld( SvStream& rStream, USHORT aLoadVer[] );
+#endif
+};
+
+class SW_DLLPUBLIC SwTableAutoFmt
+{
+ friend void _FinitCore(); // zum Zerstoeren des dflt. Pointers
+ static SwBoxAutoFmt* pDfltBoxAutoFmt;
+
+ String aName;
+ USHORT nStrResId;
+
+ // common flags of Calc and Writer
+ BOOL bInclFont : 1;
+ BOOL bInclJustify : 1;
+ BOOL bInclFrame : 1;
+ BOOL bInclBackground : 1;
+ BOOL bInclValueFormat : 1;
+
+ // Calc specific flags
+ BOOL bInclWidthHeight : 1;
+
+ SwBoxAutoFmt* aBoxAutoFmt[ 16 ];
+
+public:
+ SwTableAutoFmt( const String& rName );
+ SwTableAutoFmt( const SwTableAutoFmt& rNew );
+ ~SwTableAutoFmt();
+
+ SwTableAutoFmt& operator=( const SwTableAutoFmt& rNew );
+
+ void SetBoxFmt( const SwBoxAutoFmt& rNew, BYTE nPos );
+ const SwBoxAutoFmt& GetBoxFmt( BYTE nPos ) const;
+
+ void SetName( const String& rNew ) { aName = rNew; nStrResId = USHRT_MAX; }
+ const String& GetName() const { return aName; }
+
+ enum UpdateFlags { UPDATE_CHAR = 1, UPDATE_BOX = 2, UPDATE_ALL = 3 };
+ SwBoxAutoFmt& UpdateFromSet( BYTE nPos, const SfxItemSet& rSet,
+ UpdateFlags eFlags, SvNumberFormatter* );
+ void UpdateToSet( BYTE nPos, SfxItemSet& rSet, UpdateFlags eFlags,
+ SvNumberFormatter* ) const ;
+
+ BOOL IsFont() const { return bInclFont; }
+ BOOL IsJustify() const { return bInclJustify; }
+ BOOL IsFrame() const { return bInclFrame; }
+ BOOL IsBackground() const { return bInclBackground; }
+ BOOL IsValueFormat() const { return bInclValueFormat; }
+
+ void SetFont( const BOOL bNew ) { bInclFont = bNew; }
+ void SetJustify( const BOOL bNew ) { bInclJustify = bNew; }
+ void SetFrame( const BOOL bNew ) { bInclFrame = bNew; }
+ void SetBackground( const BOOL bNew ) { bInclBackground = bNew; }
+ void SetValueFormat( const BOOL bNew ) { bInclValueFormat = bNew; }
+ void SetWidthHeight( const BOOL bNew ) { bInclWidthHeight = bNew; }
+
+ BOOL Load( SvStream& rStream, const SwAfVersions& );
+ BOOL Save( SvStream& rStream ) const;
+
+#ifdef READ_OLDVERS
+ // lade alte Version
+ BOOL LoadOld( SvStream& rStream, USHORT aLoadVer[] );
+#endif
+};
+
+typedef SwTableAutoFmt* SwTableAutoFmtPtr ;
+SV_DECL_PTRARR_DEL( _SwTableAutoFmtTbl, SwTableAutoFmtPtr, 1, 5 )
+
+class SW_DLLPUBLIC SwTableAutoFmtTbl : public _SwTableAutoFmtTbl
+{
+ SW_DLLPRIVATE BOOL Load( SvStream& rStream );
+ SW_DLLPRIVATE BOOL Save( SvStream& rStream ) const;
+
+public:
+ SwTableAutoFmtTbl();
+
+ BOOL Load();
+ BOOL Save() const;
+};
+
+#endif
diff --git a/sw/inc/tblenum.hxx b/sw/inc/tblenum.hxx
new file mode 100644
index 000000000000..66fc5756407e
--- /dev/null
+++ b/sw/inc/tblenum.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TBLENUM_HXX
+#define _TBLENUM_HXX
+
+//fuers aendern der Tabellen/Spalten/Zeilen Breiten/Hoehen
+typedef USHORT TblChgWidthHeightType;
+
+namespace nsTblChgWidthHeightType
+{
+ const TblChgWidthHeightType WH_COL_LEFT = 0;
+ const TblChgWidthHeightType WH_COL_RIGHT = 1;
+ const TblChgWidthHeightType WH_ROW_TOP = 2;
+ const TblChgWidthHeightType WH_ROW_BOTTOM = 3;
+ const TblChgWidthHeightType WH_CELL_LEFT = 4;
+ const TblChgWidthHeightType WH_CELL_RIGHT = 5;
+ const TblChgWidthHeightType WH_CELL_TOP = 6;
+ const TblChgWidthHeightType WH_CELL_BOTTOM = 7;
+
+
+ // folgende koennen hinein verodert werden
+ const TblChgWidthHeightType WH_FLAG_INSDEL = 0x4000; // Insert/Del-Modus: das Bigger-Flag
+ // besagt was passiert:
+ // bBigger -> Box wird entfernt
+ // !bBigger-> Box wird eingefuegt
+ const TblChgWidthHeightType WH_FLAG_BIGGER = 0x8000; // Box wird groesser -> sonst kleiner
+}
+
+enum TblChgMode
+{
+ TBLFIX_CHGABS, // Tabelle feste Breite, den Nachbar andern
+ TBLFIX_CHGPROP, // Tabelle feste Breite, alle Nachbarn aendern
+ TBLVAR_CHGABS // Tabelle variable, alle Nachbarn aendern
+};
+
+
+enum SplitTbl_HeadlineOption
+{
+ HEADLINE_NONE = 0, // lasse alles wie es ist
+ HEADLINE_BORDERCOPY, // von der davor obere Line der vorhergehen Line
+ HEADLINE_CNTNTCOPY, // kopiere die 1. Line komplett mit Inhalt
+ HEADLINE_BOXATTRCOPY, // kopiere von der 1. Line die Box Attribute
+ HEADLINE_BOXATRCOLLCOPY // kopiere von der 1. Line die Box Attribute
+ // und die Absatzvorlagen
+};
+
+enum TableMergeErr
+{
+ TBLMERGE_OK,
+ TBLMERGE_NOSELECTION,
+ TBLMERGE_TOOCOMPLEX
+};
+
+
+#endif
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
new file mode 100644
index 000000000000..c56068d28ed7
--- /dev/null
+++ b/sw/inc/tblsel.hxx
@@ -0,0 +1,230 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TBLSEL_HXX
+#define _TBLSEL_HXX
+
+#include <svl/svarray.hxx>
+#include <swtable.hxx>
+#include <swrect.hxx>
+#include "swdllapi.h"
+
+class SwCrsrShell;
+class SwCursor;
+class SwTableCursor;
+class SwFrm;
+class SwTabFrm;
+class SwTableBox;
+class SwTableLine;
+class SwLayoutFrm;
+class SwPaM;
+class SwNode;
+class SwTable;
+class SwUndoTblMerge;
+class SwCellFrm;
+
+SV_DECL_PTRARR( SwCellFrms, SwCellFrm*, 16, 16 )
+SV_DECL_PTRARR_SORT( SwSelBoxes, SwTableBoxPtr, 10, 20 )
+
+
+//Sucht alle Boxen zusammen, die in der Tabelle selektiert sind.
+//Je nach enum-Parameter wird die Selektion in der angegebenen Richtung
+//erweitert.
+//Die Boxen werden ueber das Layout zusammengsucht, es wird auch bei
+//aufgespaltenen Tabellen korrekt gearbeitet (siehe: MakeSelUnions()).
+typedef USHORT SwTblSearchType;
+namespace nsSwTblSearchType
+{
+ const SwTblSearchType TBLSEARCH_NONE = 0x1; // keine Erweiterung
+ const SwTblSearchType TBLSEARCH_ROW = 0x2; // erweiter auf Zeilen
+ const SwTblSearchType TBLSEARCH_COL = 0x3; // erweiter auf Spalten
+
+ // als Flag zu den anderen Werten!!
+ const SwTblSearchType TBLSEARCH_PROTECT = 0x8; // auch geschuetzte Boxen einsammeln
+ const SwTblSearchType TBLSEARCH_NO_UNION_CORRECT = 0x10; // die zusammenges. Union nicht korrigieren
+}
+
+SW_DLLPUBLIC void GetTblSel( const SwCrsrShell& rShell, SwSelBoxes& rBoxes,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+
+void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+
+//wie vor, jedoch wird nicht von der Selektion sondern von den
+//Start- EndFrms ausgegangen.
+void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
+ SwSelBoxes& rBoxes, SwCellFrms* pCells,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+
+// Desgleichen nocheinmal direkt per PaM's
+void GetTblSelCrs( const SwCrsrShell& rShell, SwSelBoxes& rBoxes );
+void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes );
+
+// suche fuer eine AutoSumme die beteiligten Boxen zusammen
+BOOL GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
+
+// check if the SelBoxes contains protected Boxes
+BOOL HasProtectedCells( const SwSelBoxes& rBoxes );
+
+// teste, ob die Selektion ausgeglichen ist
+SV_DECL_PTRARR( SwChartBoxes, SwTableBoxPtr, 16, 16)
+SV_DECL_PTRARR_DEL( SwChartLines, SwChartBoxes*, 25, 50)
+
+BOOL ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
+ SwChartLines* pGetCLines = 0 );
+
+// teste ob die Celle in die SSelection gehoert
+// (wurde eine Funktion, damit GetTblSel() und MakeTblCrsr() immer
+// das "gleiche Verstaendnis" fuer die Selektion haben)
+BOOL IsFrmInTblSel( const SwRect& rUnion, const SwFrm* pCell );
+
+// bestimme die Boxen, die zusammen gefasst werden sollen.
+// Dabei wird auf Layout Basis das Rechteck "angepasst". D.H. es
+// werden Boxen zugefuegt wenn welche an den Seiten ueberlappen
+// Zusaetzlich wird die neue Box erzeugt und mit dem entsprechenden
+// Inhalt gefuellt.
+void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
+ SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo = 0 );
+
+// teste ob die selektierten Boxen ein gueltiges Merge erlauben
+USHORT CheckMergeSel( const SwPaM& rPam );
+USHORT CheckMergeSel( const SwSelBoxes& rBoxes );
+
+BOOL IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam );
+
+// teste ob ein Split oder InsertCol dazu fuehrt, das eine Box
+// kleiner als MINLAY wird.
+BOOL CheckSplitCells( const SwCrsrShell& rShell, USHORT nDiv,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+BOOL CheckSplitCells( const SwCursor& rCrsr, USHORT nDiv,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+
+//Fuer das Arbeiten auf TabSelektion auch fuer aufgespaltene Tabellen.
+class SwSelUnion
+{
+ SwRect aUnion; //Das die Sel umschliessende Rechteck.
+ SwTabFrm *pTable; //Die (Follow-)Table zu der Union.
+
+public:
+ SwSelUnion( const SwRect &rRect, SwTabFrm *pTab ) :
+ aUnion( rRect ), pTable( pTab ) {}
+
+ const SwRect& GetUnion() const { return aUnion; }
+ SwRect& GetUnion() { return aUnion; }
+ const SwTabFrm *GetTable() const { return pTable; }
+ SwTabFrm *GetTable() { return pTable; }
+};
+
+SV_DECL_PTRARR_DEL( SwSelUnions, SwSelUnion*, 10, 20 )
+
+//Ermittelt die von einer Tabellenselektion betroffenen Tabellen und die
+//Union-Rechteckte der Selektionen - auch fuer aufgespaltene Tabellen.
+//Wenn ein Parameter != nsSwTblSearchType::TBLSEARCH_NONE uebergeben wird, so wird die
+//Selektion in der angegebenen Richtung erweitert.
+void MakeSelUnions( SwSelUnions&, const SwLayoutFrm *pStart,
+ const SwLayoutFrm *pEnd,
+ const SwTblSearchType = nsSwTblSearchType::TBLSEARCH_NONE );
+
+
+// -------------------------------------------------------------------
+// Diese Klassen kopieren die aktuelle Tabellen-Selektion (rBoxes)
+// unter Beibehaltung der Tabellen-Strubktur in eine eigene Struktur
+
+class _FndBox;
+class _FndLine;
+
+SV_DECL_PTRARR_DEL( _FndBoxes, _FndBox*, 10, 20 )
+SV_DECL_PTRARR_DEL( _FndLines, _FndLine*,10, 20 )
+
+class _FndBox
+{
+ SwTableBox* pBox;
+ _FndLines aLines;
+ _FndLine* pUpper;
+
+ SwTableLine *pLineBefore; //Zum Loeschen/Restaurieren des Layouts.
+ SwTableLine *pLineBehind;
+
+public:
+ _FndBox( SwTableBox* pB, _FndLine* pFL ) :
+ pBox(pB), pUpper(pFL), pLineBefore( 0 ), pLineBehind( 0 ) {}
+
+ const _FndLines& GetLines() const { return aLines; }
+ _FndLines& GetLines() { return aLines; }
+ const SwTableBox* GetBox() const { return pBox; }
+ SwTableBox* GetBox() { return pBox; }
+ const _FndLine* GetUpper() const { return pUpper; }
+ _FndLine* GetUpper() { return pUpper; }
+
+ void SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable );
+ void SetTableLines( const SwTable &rTable );
+ void DelFrms ( SwTable &rTable );
+ void MakeFrms( SwTable &rTable );
+ void MakeNewFrms( SwTable &rTable, const USHORT nNumber,
+ const BOOL bBehind );
+ BOOL AreLinesToRestore( const SwTable &rTable ) const;
+
+ void ClearLineBehind() { pLineBehind = 0; }
+};
+
+
+class _FndLine
+{
+ SwTableLine* pLine;
+ _FndBoxes aBoxes;
+ _FndBox* pUpper;
+public:
+ _FndLine(SwTableLine* pL, _FndBox* pFB=0) : pLine(pL), pUpper(pFB) {}
+ const _FndBoxes& GetBoxes() const { return aBoxes; }
+ _FndBoxes& GetBoxes() { return aBoxes; }
+ const SwTableLine* GetLine() const { return pLine; }
+ SwTableLine* GetLine() { return pLine; }
+ const _FndBox* GetUpper() const { return pUpper; }
+ _FndBox* GetUpper() { return pUpper; }
+
+ void SetUpper( _FndBox* pUp ) { pUpper = pUp; }
+};
+
+
+struct _FndPara
+{
+ const SwSelBoxes& rBoxes;
+ _FndLine* pFndLine;
+ _FndBox* pFndBox;
+
+ _FndPara( const SwSelBoxes& rBxs, _FndBox* pFB )
+ : rBoxes(rBxs), pFndLine(0), pFndBox(pFB) {}
+ _FndPara( const _FndPara& rPara, _FndBox* pFB )
+ : rBoxes(rPara.rBoxes), pFndLine(rPara.pFndLine), pFndBox(pFB) {}
+ _FndPara( const _FndPara& rPara, _FndLine* pFL )
+ : rBoxes(rPara.rBoxes), pFndLine(pFL), pFndBox(rPara.pFndBox) {}
+};
+
+BOOL _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara );
+SW_DLLPUBLIC BOOL _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara );
+
+
+#endif // _TBLSEL_HXX
diff --git a/sw/inc/tgrditem.hxx b/sw/inc/tgrditem.hxx
new file mode 100644
index 000000000000..ca9ba7fd6db9
--- /dev/null
+++ b/sw/inc/tgrditem.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_TGRDITEM_HXX
+#define SW_TGRDITEM_HXX
+
+#include <tools/color.hxx>
+#include <svl/poolitem.hxx>
+#include "swdllapi.h"
+#include <hintids.hxx>
+#include <format.hxx>
+
+class IntlWrapper;
+
+enum SwTextGrid { GRID_NONE, GRID_LINES_ONLY, GRID_LINES_CHARS };
+
+class SW_DLLPUBLIC SwTextGridItem : public SfxPoolItem
+{
+ Color aColor;
+ sal_uInt16 nLines;
+ sal_uInt16 nBaseHeight, nRubyHeight;
+ SwTextGrid eGridType;
+ BOOL bRubyTextBelow;
+ BOOL bPrintGrid;
+ BOOL bDisplayGrid;
+
+ //for textgrid enhancement
+ sal_uInt16 nBaseWidth;
+ BOOL bSnapToChars;
+ BOOL bSquaredMode;
+public:
+ SwTextGridItem();
+ virtual ~SwTextGridItem();
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+ 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 );
+
+ SwTextGridItem& operator=( const SwTextGridItem& );
+
+ const Color& GetColor() const { return aColor; }
+ void SetColor( const Color& rCol ) { aColor = rCol; }
+
+ sal_uInt16 GetLines() const { return nLines; }
+ void SetLines( sal_uInt16 nNew ) { nLines = nNew; }
+
+ sal_uInt16 GetBaseHeight() const { return nBaseHeight; }
+ void SetBaseHeight( sal_uInt16 nNew ) { nBaseHeight = nNew; }
+
+ sal_uInt16 GetRubyHeight() const { return nRubyHeight; }
+ void SetRubyHeight( sal_uInt16 nNew ) { nRubyHeight = nNew; }
+
+ SwTextGrid GetGridType() const { return eGridType; }
+ void SetGridType( SwTextGrid eNew ) { eGridType = eNew; }
+
+ BOOL IsRubyTextBelow() const { return bRubyTextBelow; }
+ BOOL GetRubyTextBelow() const { return bRubyTextBelow; }
+ void SetRubyTextBelow( BOOL bNew ) { bRubyTextBelow = bNew; }
+
+ BOOL IsPrintGrid() const { return bPrintGrid; }
+ BOOL GetPrintGrid() const { return bPrintGrid; }
+ void SetPrintGrid( BOOL bNew ) { bPrintGrid = bNew; }
+
+ BOOL IsDisplayGrid() const { return bDisplayGrid; }
+ BOOL GetDisplayGrid() const { return bDisplayGrid; }
+ void SetDisplayGrid( BOOL bNew ) { bDisplayGrid = bNew; }
+
+ //for textgrid enhancement
+ sal_uInt16 GetBaseWidth() const { return nBaseWidth;}
+ void SetBaseWidth( sal_uInt16 nNew ) { nBaseWidth = nNew; }
+
+ BOOL IsSnapToChars() const { return bSnapToChars; }
+ BOOL GetSnapToChars() const { return bSnapToChars; }
+ void SetSnapToChars( BOOL bNew ) { bSnapToChars = bNew; }
+
+ BOOL IsSquaredMode() const { return bSquaredMode; }
+ BOOL GetSquaredMode() const { return bSquaredMode; }
+ void SetSquaredMode( BOOL bNew ) { bSquaredMode = bNew; }
+ void SwitchPaperMode(BOOL bNew );
+
+ void Init();
+};
+
+inline const SwTextGridItem &SwAttrSet::GetTextGrid(BOOL bInP) const
+ { return (const SwTextGridItem&)Get( RES_TEXTGRID, bInP ); }
+inline const SwTextGridItem &SwFmt::GetTextGrid(BOOL bInP) const
+ { return (const SwTextGridItem&)aSet.Get( RES_TEXTGRID, bInP ); }
+
+#endif
+
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
new file mode 100644
index 000000000000..fea15cfafb82
--- /dev/null
+++ b/sw/inc/tox.hxx
@@ -0,0 +1,793 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_TOX_HXX
+#define SW_TOX_HXX
+
+#include <cppuhelper/weakref.hxx>
+
+#include <i18npool/lang.h>
+#include <tools/string.hxx>
+
+#include <editeng/svxenum.hxx>
+#include <svl/svarray.hxx>
+#include <svl/poolitem.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx>
+#include <toxe.hxx>
+#include <calbck.hxx>
+#include <errhdl.hxx>
+
+#ifndef INCLUDED_VECTOR
+#include <vector> // #i21237#
+#define INCLUDED_VECTOR
+#endif
+
+
+namespace com { namespace sun { namespace star {
+ namespace text { class XDocumentIndexMark; }
+} } }
+
+class SwTOXType;
+class SwTOXMark;
+class SwTxtTOXMark;
+class SwDoc;
+
+SV_DECL_PTRARR(SwTOXMarks, SwTOXMark*, 0, 10)
+
+/*--------------------------------------------------------------------
+ Description: Entry of content index, alphabetical index or user defined index
+ --------------------------------------------------------------------*/
+
+#define IVER_TOXMARK_STRPOOL ((USHORT)1)
+#define IVER_TOXMARK_NEWTOX ((USHORT)2)
+
+class SW_DLLPUBLIC SwTOXMark
+ : public SfxPoolItem
+ , public SwModify
+{
+ friend void _InitCore();
+ friend class SwTxtTOXMark;
+
+ String aAltText; // Der Text des Eintrages ist unterschiedlich
+ String aPrimaryKey, aSecondaryKey;
+
+ // three more strings for phonetic sorting
+ String aTextReading;
+ String aPrimaryKeyReading;
+ String aSecondaryKeyReading;
+
+ SwTxtTOXMark* pTxtAttr;
+
+ USHORT nLevel;
+ BOOL bAutoGenerated : 1; // generated using a concordance file
+ BOOL bMainEntry : 1; // main entry emphasized by character style
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XDocumentIndexMark> m_wXDocumentIndexMark;
+
+ SwTOXMark(); // to create the dflt. atr. in _InitCore
+
+public:
+ TYPEINFO(); // rtti
+
+ // single argument ctors shall be explicit.
+ explicit SwTOXMark( const SwTOXType* pTyp );
+ virtual ~SwTOXMark();
+
+ SwTOXMark( const SwTOXMark& rCopy );
+ SwTOXMark& operator=( const SwTOXMark& rCopy );
+
+ // "pure virtual methods" of SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+
+ // SwClient
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ void InvalidateTOXMark();
+
+ String GetText() const;
+
+ inline BOOL IsAlternativeText() const;
+ inline const String& GetAlternativeText() const;
+
+ inline void SetAlternativeText( const String& rAlt );
+
+ // content or user defined index
+ inline void SetLevel(USHORT nLevel);
+ inline USHORT GetLevel() const;
+
+ // for alphabetical index only
+ inline void SetPrimaryKey(const String& rStr );
+ inline void SetSecondaryKey(const String& rStr);
+ inline void SetTextReading(const String& rStr);
+ inline void SetPrimaryKeyReading(const String& rStr );
+ inline void SetSecondaryKeyReading(const String& rStr);
+
+ inline const String& GetPrimaryKey() const;
+ inline const String& GetSecondaryKey() const;
+ inline const String& GetTextReading() const;
+ inline const String& GetPrimaryKeyReading() const;
+ inline const String& GetSecondaryKeyReading() const;
+
+ BOOL IsAutoGenerated() const {return bAutoGenerated;}
+ void SetAutoGenerated(BOOL bSet) {bAutoGenerated = bSet;}
+
+ BOOL IsMainEntry() const {return bMainEntry;}
+ void SetMainEntry(BOOL bSet) { bMainEntry = bSet;}
+
+ inline const SwTOXType* GetTOXType() const;
+
+ const SwTxtTOXMark* GetTxtTOXMark() const { return pTxtAttr; }
+ SwTxtTOXMark* GetTxtTOXMark() { return pTxtAttr; }
+
+ SW_DLLPRIVATE ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::text::XDocumentIndexMark> const& GetXTOXMark() const
+ { return m_wXDocumentIndexMark; }
+ SW_DLLPRIVATE void SetXTOXMark(::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XDocumentIndexMark> const& xMark)
+ { m_wXDocumentIndexMark = xMark; }
+
+};
+
+/*--------------------------------------------------------------------
+ Description: index types
+ --------------------------------------------------------------------*/
+
+class SwTOXType : public SwModify
+{
+public:
+ SwTOXType(TOXTypes eTyp, const String& aName);
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwTOXType(const SwTOXType& rCopy);
+
+ inline const String& GetTypeName() const;
+ inline TOXTypes GetType() const;
+
+private:
+ String aName;
+ TOXTypes eType;
+
+ // @@@ public copy ctor, but no copy assignment?
+ SwTOXType & operator= (const SwTOXType &);
+};
+
+/*--------------------------------------------------------------------
+ Description: Structure of the index lines
+ --------------------------------------------------------------------*/
+
+#define FORM_TITLE 0
+#define FORM_ALPHA_DELIMITTER 1
+#define FORM_PRIMARY_KEY 2
+#define FORM_SECONDARY_KEY 3
+#define FORM_ENTRY 4
+
+/*
+ Pattern structure
+
+ <E#> - entry number <E# CharStyleName,PoolId>
+ <ET> - entry text <ET CharStyleName,PoolId>
+ <E> - entry text and number <E CharStyleName,PoolId>
+ <T> - tab stop <T,,Position,Adjust>
+ <C> - chapter info n = {0, 1, 2, 3, 4 } values of SwChapterFormat <C CharStyleName,PoolId>
+ <TX> - text token <X CharStyleName,PoolId, TOX_STYLE_DELIMITERTextContentTOX_STYLE_DELIMITER>
+ <#> - Page number <# CharStyleName,PoolId>
+ <LS> - Link start <LS>
+ <LE> - Link end <LE>
+ <A00> - Authority entry field <A02 CharStyleName, PoolId>
+ */
+
+// These enum values are stored and must not be changed!
+enum FormTokenType
+{
+ TOKEN_ENTRY_NO,
+ TOKEN_ENTRY_TEXT,
+ TOKEN_ENTRY,
+ TOKEN_TAB_STOP,
+ TOKEN_TEXT,
+ TOKEN_PAGE_NUMS,
+ TOKEN_CHAPTER_INFO,
+ TOKEN_LINK_START,
+ TOKEN_LINK_END,
+ TOKEN_AUTHORITY,
+ TOKEN_END
+};
+
+struct SW_DLLPUBLIC SwFormToken
+{
+ String sText;
+ String sCharStyleName;
+ SwTwips nTabStopPosition;
+ FormTokenType eTokenType;
+ USHORT nPoolId;
+ SvxTabAdjust eTabAlign;
+ USHORT nChapterFormat; //SwChapterFormat;
+ USHORT nOutlineLevel;//the maximum permitted outline level in numbering
+ USHORT nAuthorityField; //enum ToxAuthorityField
+ sal_Unicode cTabFillChar;
+ sal_Bool bWithTab; // TRUE: do generate tab
+ // character only the tab stop
+ // #i21237#
+
+ SwFormToken(FormTokenType eType ) :
+ nTabStopPosition(0),
+ eTokenType(eType),
+ nPoolId(USHRT_MAX),
+ eTabAlign( SVX_TAB_ADJUST_LEFT ),
+ nChapterFormat(0 /*CF_NUMBER*/),
+ nOutlineLevel(MAXLEVEL), //default to maximum outline level
+ nAuthorityField(0 /*AUTH_FIELD_IDENTIFIER*/),
+ cTabFillChar(' '),
+ bWithTab(sal_True) // #i21237#
+ {}
+
+ String GetString() const;
+};
+
+// -> #i21237#
+/**
+ Functor that is true when a given token has a certain token type.
+
+ @param _eType the type to check for
+ @param rToken the token to check
+
+ @retval TRUE the token has the given type
+ @retval FALSE else
+*/
+struct SwFormTokenEqualToFormTokenType
+{
+ FormTokenType eType;
+
+ SwFormTokenEqualToFormTokenType(FormTokenType _eType) : eType(_eType) {}
+ bool operator()(const SwFormToken & rToken)
+ {
+ return rToken.eTokenType == eType;
+ }
+};
+
+/**
+ Functor that appends the string representation of a given token to a string.
+
+ @param _rText string to append the string representation to
+ @param rToken token whose string representation is appended
+*/
+struct SwFormTokenToString
+{
+ String & rText;
+ SwFormTokenToString(String & _rText) : rText(_rText) {}
+ void operator()(const SwFormToken & rToken) { rText += rToken.GetString(); }
+};
+
+/// Vector of tokens.
+typedef std::vector<SwFormToken> SwFormTokens;
+
+/**
+ Helper class that converts vectors of tokens to strings and vice
+ versa.
+ */
+class SW_DLLPUBLIC SwFormTokensHelper
+{
+ /// the tokens
+ SwFormTokens aTokens;
+
+ /**
+ Builds a token from its string representation.
+
+ @sPattern the whole pattern
+ @nCurPatternPos starting position of the token
+
+ @return the token
+ */
+ SW_DLLPRIVATE SwFormToken BuildToken( const String & sPattern,
+ xub_StrLen & nCurPatternPos ) const;
+
+ /**
+ Returns the string of a token.
+
+ @param sPattern the whole pattern
+ @param nStt starting position of the token
+
+ @return the string representation of the token
+ */
+ SW_DLLPRIVATE String SearchNextToken( const String & sPattern,
+ xub_StrLen nStt ) const;
+
+ /**
+ Returns the type of a token.
+
+ @param sToken the string representation of the token
+ @param pTokenLen return parameter the length of the head of the token
+
+ If pTokenLen is non-NULL the length of the token's head is
+ written to *pTokenLen
+
+ @return the type of the token
+ */
+ SW_DLLPRIVATE FormTokenType GetTokenType(const String & sToken,
+ xub_StrLen * pTokenLen) const;
+
+public:
+ /**
+ contructor
+
+ @param rTokens vector of tokens
+ */
+ SwFormTokensHelper(const SwFormTokens & rTokens) : aTokens(rTokens) {}
+
+ /**
+ constructor
+
+ @param rStr string representation of the tokens
+ */
+ SwFormTokensHelper(const String & rStr);
+
+ /**
+ Returns vector of tokens.
+
+ @return vector of tokens
+ */
+ const SwFormTokens & GetTokens() const { return aTokens; }
+};
+// <- #i21237#
+
+class SW_DLLPUBLIC SwForm
+{
+ SwFormTokens aPattern[ AUTH_TYPE_END + 1 ]; // #i21237#
+ String aTemplate[ AUTH_TYPE_END + 1 ];
+
+ TOXTypes eType;
+ USHORT nFormMaxLevel;
+
+ //USHORT nFirstTabPos; -> Value in tab token
+// BOOL bHasFirstTabPos : 1;
+ BOOL bGenerateTabPos : 1;
+ BOOL bIsRelTabPos : 1;
+ BOOL bCommaSeparated : 1;
+
+public:
+ SwForm( TOXTypes eTOXType = TOX_CONTENT );
+ SwForm( const SwForm& rForm );
+
+ SwForm& operator=( const SwForm& rForm );
+
+ inline void SetTemplate(USHORT nLevel, const String& rName);
+ inline const String& GetTemplate(USHORT nLevel) const;
+
+ // #i21237#
+ void SetPattern(USHORT nLevel, const SwFormTokens& rName);
+ void SetPattern(USHORT nLevel, const String& rStr);
+ const SwFormTokens& GetPattern(USHORT nLevel) const;
+
+ // fill tab stop positions from template to pattern
+ // #i21237#
+ void AdjustTabStops(SwDoc& rDoc,
+ BOOL bInsertNewTabStops = FALSE);
+
+ inline TOXTypes GetTOXType() const;
+ inline USHORT GetFormMax() const;
+
+ BOOL IsRelTabPos() const { return bIsRelTabPos; }
+ void SetRelTabPos( BOOL b ) { bIsRelTabPos = b; }
+
+ BOOL IsCommaSeparated() const { return bCommaSeparated;}
+ void SetCommaSeparated( BOOL b) { bCommaSeparated = b;}
+
+ static USHORT GetFormMaxLevel( TOXTypes eType );
+
+ static const sal_Char* aFormEntry; // <E>
+ static BYTE nFormEntryLen; // 3 characters
+ static const sal_Char* aFormTab; // <T>
+ static BYTE nFormTabLen; // 3 characters
+ static const sal_Char* aFormPageNums; // <P>
+ static BYTE nFormPageNumsLen; // 3 characters
+ static const sal_Char* aFormLinkStt; // <LS>
+ static BYTE nFormLinkSttLen; // 4 characters
+ static const sal_Char* aFormLinkEnd; // <LE>
+ static BYTE nFormLinkEndLen; // 4 characters
+ static const sal_Char* aFormEntryNum; // <E#>
+ static BYTE nFormEntryNumLen; // 4 characters
+ static const sal_Char* aFormEntryTxt; // <ET>
+ static BYTE nFormEntryTxtLen; // 4 characters
+ static const sal_Char* aFormChapterMark; // <C>
+ static BYTE nFormChapterMarkLen; // 3 characters
+ static const sal_Char* aFormText; // <TX>
+ static BYTE nFormTextLen; // 4 characters
+ static const sal_Char* aFormAuth; // <Axx> xx - decimal enum value
+ static BYTE nFormAuthLen; // 3 characters
+};
+
+/*--------------------------------------------------------------------
+ Description: Content to create indexes of
+ --------------------------------------------------------------------*/
+
+typedef USHORT SwTOXElement;
+namespace nsSwTOXElement
+{
+ const SwTOXElement TOX_MARK = 1;
+ const SwTOXElement TOX_OUTLINELEVEL = 2;
+ const SwTOXElement TOX_TEMPLATE = 4;
+ const SwTOXElement TOX_OLE = 8;
+ const SwTOXElement TOX_TABLE = 16;
+ const SwTOXElement TOX_GRAPHIC = 32;
+ const SwTOXElement TOX_FRAME = 64;
+ const SwTOXElement TOX_SEQUENCE = 128;
+}
+
+typedef USHORT SwTOIOptions;
+namespace nsSwTOIOptions
+{
+ const SwTOIOptions TOI_SAME_ENTRY = 1;
+ const SwTOIOptions TOI_FF = 2;
+ const SwTOIOptions TOI_CASE_SENSITIVE = 4;
+ const SwTOIOptions TOI_KEY_AS_ENTRY = 8;
+ const SwTOIOptions TOI_ALPHA_DELIMITTER = 16;
+ const SwTOIOptions TOI_DASH = 32;
+ const SwTOIOptions TOI_INITIAL_CAPS = 64;
+}
+
+//which part of the caption is to be displayed
+enum SwCaptionDisplay
+{
+ CAPTION_COMPLETE,
+ CAPTION_NUMBER,
+ CAPTION_TEXT
+};
+
+typedef USHORT SwTOOElements;
+namespace nsSwTOOElements
+{
+ const SwTOOElements TOO_MATH = 0x01;
+ const SwTOOElements TOO_CHART = 0x02;
+ const SwTOOElements TOO_CALC = 0x08;
+ const SwTOOElements TOO_DRAW_IMPRESS = 0x10;
+// const SwTOOElements TOO_IMPRESS = 0x20;
+ const SwTOOElements TOO_OTHER = 0x80;
+}
+
+#define TOX_STYLE_DELIMITER ((sal_Unicode)0x01) //JP 19.07.00: use a control char
+
+/*--------------------------------------------------------------------
+ Description: Class for all indexes
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwTOXBase : public SwClient
+{
+ SwForm aForm; // description of the lines
+ String aName; // unique name
+ String aTitle; // title
+
+ String sMainEntryCharStyle; // name of the character style applied to main index entries
+
+ String aStyleNames[MAXLEVEL]; // (additional) style names TOX_CONTENT, TOX_USER
+ String sSequenceName; // FieldTypeName of a caption sequence
+
+ LanguageType eLanguage;
+ String sSortAlgorithm;
+
+ union {
+ USHORT nLevel; // consider outline levels
+ USHORT nOptions; // options of alphabetical index
+ } aData;
+
+ USHORT nCreateType; // sources to create the index from
+ USHORT nOLEOptions; // OLE sources
+ SwCaptionDisplay eCaptionDisplay; //
+ BOOL bProtected : 1; // index protected ?
+ BOOL bFromChapter : 1; // create from chapter or document
+ BOOL bFromObjectNames : 1; // create a table or object index
+ // from the names rather than the caption
+ BOOL bLevelFromChapter : 1; // User index: get the level from the source chapter
+public:
+ SwTOXBase( const SwTOXType* pTyp, const SwForm& rForm,
+ USHORT nCreaType, const String& rTitle );
+ SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = 0 );
+ virtual ~SwTOXBase();
+
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ // a kind of CopyCtor - check if the TOXBase is at TOXType of the doc.
+ // If not, so create it an copy all other used things. The return is this
+ SwTOXBase& CopyTOXBase( SwDoc*, const SwTOXBase& );
+
+ const SwTOXType* GetTOXType() const; //
+
+ USHORT GetCreateType() const; // creation types
+
+ const String& GetTOXName() const {return aName;}
+ void SetTOXName(const String& rSet) {aName = rSet;}
+
+ const String& GetTitle() const; // Title
+ const String& GetTypeName() const; // Name
+ const SwForm& GetTOXForm() const; // description of the lines
+
+ void SetCreate(USHORT);
+ void SetTitle(const String& rTitle);
+ void SetTOXForm(const SwForm& rForm);
+
+ TOXTypes GetType() const;
+
+ const String& GetMainEntryCharStyle() const {return sMainEntryCharStyle;}
+ void SetMainEntryCharStyle(const String& rSet) {sMainEntryCharStyle = rSet;}
+
+ // content index only
+ inline void SetLevel(USHORT); // consider outline level
+ inline USHORT GetLevel() const;
+
+ // alphabetical index only
+ inline USHORT GetOptions() const; // alphabetical index options
+ inline void SetOptions(USHORT nOpt);
+
+ // index of objects
+ USHORT GetOLEOptions() const {return nOLEOptions;}
+ void SetOLEOptions(USHORT nOpt) {nOLEOptions = nOpt;}
+
+ // index of objects
+
+ // user defined index only
+ inline void SetTemplateName(const String& rName); // Absatzlayout beachten
+
+ const String& GetStyleNames(USHORT nLevel) const
+ {
+ DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
+ return aStyleNames[nLevel];
+ }
+ void SetStyleNames(const String& rSet, USHORT nLevel)
+ {
+ DBG_ASSERT( nLevel < MAXLEVEL, "Which level?");
+ aStyleNames[nLevel] = rSet;
+ }
+ BOOL IsFromChapter() const { return bFromChapter;}
+ void SetFromChapter(BOOL bSet) { bFromChapter = bSet;}
+
+ BOOL IsFromObjectNames() const {return bFromObjectNames;}
+ void SetFromObjectNames(BOOL bSet) {bFromObjectNames = bSet;}
+
+ BOOL IsLevelFromChapter() const {return bLevelFromChapter;}
+ void SetLevelFromChapter(BOOL bSet) {bLevelFromChapter = bSet;}
+
+ BOOL IsProtected() const { return bProtected; }
+ void SetProtected(BOOL bSet) { bProtected = bSet; }
+
+ const String& GetSequenceName() const {return sSequenceName;}
+ void SetSequenceName(const String& rSet) {sSequenceName = rSet;}
+
+ SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;}
+ void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;}
+
+ BOOL IsTOXBaseInReadonly() const;
+
+ const SfxItemSet* GetAttrSet() const;
+ void SetAttrSet( const SfxItemSet& );
+
+ LanguageType GetLanguage() const {return eLanguage;}
+ void SetLanguage(LanguageType nLang) {eLanguage = nLang;}
+
+ const String& GetSortAlgorithm()const {return sSortAlgorithm;}
+ void SetSortAlgorithm(const String& rSet) {sSortAlgorithm = rSet;}
+ // #i21237#
+ void AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop);
+ SwTOXBase& operator=(const SwTOXBase& rSource);
+};
+
+
+/*--------------------------------------------------------------------
+ Description: Inlines
+ --------------------------------------------------------------------*/
+
+//
+//SwTOXMark
+//
+inline const String& SwTOXMark::GetAlternativeText() const
+ { return aAltText; }
+
+inline const SwTOXType* SwTOXMark::GetTOXType() const
+ { return (SwTOXType*)GetRegisteredIn(); }
+
+inline BOOL SwTOXMark::IsAlternativeText() const
+ { return aAltText.Len() > 0; }
+
+inline void SwTOXMark::SetAlternativeText(const String& rAlt)
+{
+ aAltText = rAlt;
+}
+
+inline void SwTOXMark::SetLevel( USHORT nLvl )
+{
+ ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ nLevel = nLvl;
+}
+
+inline void SwTOXMark::SetPrimaryKey( const String& rKey )
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aPrimaryKey = rKey;
+}
+
+inline void SwTOXMark::SetSecondaryKey( const String& rKey )
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aSecondaryKey = rKey;
+}
+
+inline void SwTOXMark::SetTextReading( const String& rTxt )
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aTextReading = rTxt;
+}
+
+inline void SwTOXMark::SetPrimaryKeyReading( const String& rKey )
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aPrimaryKeyReading = rKey;
+}
+
+inline void SwTOXMark::SetSecondaryKeyReading( const String& rKey )
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aSecondaryKeyReading = rKey;
+}
+
+inline USHORT SwTOXMark::GetLevel() const
+{
+ ASSERT( !GetTOXType() || GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ return nLevel;
+}
+
+inline const String& SwTOXMark::GetPrimaryKey() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aPrimaryKey;
+}
+
+inline const String& SwTOXMark::GetSecondaryKey() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aSecondaryKey;
+}
+
+inline const String& SwTOXMark::GetTextReading() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aTextReading;
+}
+
+inline const String& SwTOXMark::GetPrimaryKeyReading() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aPrimaryKeyReading;
+}
+
+inline const String& SwTOXMark::GetSecondaryKeyReading() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aSecondaryKeyReading;
+}
+
+//
+//SwForm
+//
+inline void SwForm::SetTemplate(USHORT nLevel, const String& rTemplate)
+{
+ ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
+ aTemplate[nLevel] = rTemplate;
+}
+
+inline const String& SwForm::GetTemplate(USHORT nLevel) const
+{
+ ASSERT(nLevel < GetFormMax(), "Index >= FORM_MAX");
+ return aTemplate[nLevel];
+}
+
+inline TOXTypes SwForm::GetTOXType() const
+{
+ return eType;
+}
+
+inline USHORT SwForm::GetFormMax() const
+{
+ return nFormMaxLevel;
+}
+
+
+//
+//SwTOXType
+//
+inline const String& SwTOXType::GetTypeName() const
+ { return aName; }
+
+inline TOXTypes SwTOXType::GetType() const
+ { return eType; }
+
+//
+// SwTOXBase
+//
+inline const SwTOXType* SwTOXBase::GetTOXType() const
+ { return (SwTOXType*)GetRegisteredIn(); }
+
+inline USHORT SwTOXBase::GetCreateType() const
+ { return nCreateType; }
+
+inline const String& SwTOXBase::GetTitle() const
+ { return aTitle; }
+
+inline const String& SwTOXBase::GetTypeName() const
+ { return GetTOXType()->GetTypeName(); }
+
+inline const SwForm& SwTOXBase::GetTOXForm() const
+ { return aForm; }
+
+inline void SwTOXBase::AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop)
+{
+ aForm.AdjustTabStops(rDoc, bDefaultRightTabStop);
+}
+
+inline void SwTOXBase::SetCreate(USHORT nCreate)
+ { nCreateType = nCreate; }
+
+inline void SwTOXBase::SetTOXForm(const SwForm& rForm)
+ { aForm = rForm; }
+
+inline TOXTypes SwTOXBase::GetType() const
+ { return GetTOXType()->GetType(); }
+
+inline void SwTOXBase::SetLevel(USHORT nLev)
+{
+ ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ aData.nLevel = nLev;
+}
+
+inline USHORT SwTOXBase::GetLevel() const
+{
+ ASSERT(GetTOXType()->GetType() != TOX_INDEX, "Falscher Feldtyp");
+ return aData.nLevel;
+}
+
+inline void SwTOXBase::SetTemplateName(const String& rName)
+{
+// ASSERT(GetTOXType()->GetType() == TOX_USER, "Falscher Feldtyp");
+// ASSERT(aData.pTemplateName, "pTemplateName == 0");
+// (*aData.pTemplateName) = rName;
+ DBG_WARNING("SwTOXBase::SetTemplateName obsolete");
+ aStyleNames[0] = rName;
+
+}
+
+inline USHORT SwTOXBase::GetOptions() const
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ return aData.nOptions;
+}
+
+inline void SwTOXBase::SetOptions(USHORT nOpt)
+{
+ ASSERT(GetTOXType()->GetType() == TOX_INDEX, "Falscher Feldtyp");
+ aData.nOptions = nOpt;
+}
+
+
+#endif // SW_TOX_HXX
diff --git a/sw/inc/toxe.hxx b/sw/inc/toxe.hxx
new file mode 100644
index 000000000000..064c2e0aac9f
--- /dev/null
+++ b/sw/inc/toxe.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TOXE_HXX
+#define _TOXE_HXX
+
+enum SwTOXSearch
+{
+ TOX_NXT,
+ TOX_PRV,
+ TOX_SAME_NXT,
+ TOX_SAME_PRV
+};
+
+enum SwTOIKeyType
+{
+ TOI_PRIMARY,
+ TOI_SECONDARY
+};
+
+enum TOXTypes
+{
+ TOX_INDEX,
+ TOX_USER,
+ TOX_CONTENT,
+ TOX_ILLUSTRATIONS,
+ TOX_OBJECTS,
+ TOX_TABLES,
+ TOX_AUTHORITIES
+};
+// this enum contains all types of sources
+enum ToxAuthorityType
+{
+ //BiBTeX - fields
+ AUTH_TYPE_ARTICLE,
+ AUTH_TYPE_BOOK,
+ AUTH_TYPE_BOOKLET,
+ AUTH_TYPE_CONFERENCE,
+ AUTH_TYPE_INBOOK,
+ AUTH_TYPE_INCOLLECTION,
+ AUTH_TYPE_INPROCEEDINGS,
+ AUTH_TYPE_JOURNAL,
+ AUTH_TYPE_MANUAL,
+ AUTH_TYPE_MASTERSTHESIS,
+ AUTH_TYPE_MISC,
+ AUTH_TYPE_PHDTHESIS,
+ AUTH_TYPE_PROCEEDINGS,
+ AUTH_TYPE_TECHREPORT,
+ AUTH_TYPE_UNPUBLISHED,
+ //additional types
+ AUTH_TYPE_EMAIL,
+ AUTH_TYPE_WWW,
+ AUTH_TYPE_CUSTOM1,
+ AUTH_TYPE_CUSTOM2,
+ AUTH_TYPE_CUSTOM3,
+ AUTH_TYPE_CUSTOM4,
+ AUTH_TYPE_CUSTOM5,
+ AUTH_TYPE_END
+};
+
+//this enum contains the fields of an authority entry
+enum ToxAuthorityField
+{
+ AUTH_FIELD_IDENTIFIER,
+ AUTH_FIELD_AUTHORITY_TYPE, //ToxAuthorityType
+ //BibTex types
+ AUTH_FIELD_ADDRESS,
+ AUTH_FIELD_ANNOTE,
+ AUTH_FIELD_AUTHOR,
+ AUTH_FIELD_BOOKTITLE,
+ AUTH_FIELD_CHAPTER,
+ AUTH_FIELD_EDITION,
+ AUTH_FIELD_EDITOR,
+ AUTH_FIELD_HOWPUBLISHED,
+ AUTH_FIELD_INSTITUTION,
+ AUTH_FIELD_JOURNAL,
+// AUTH_FIELD_KEY, // BiBTeX - Field
+ AUTH_FIELD_MONTH,
+ AUTH_FIELD_NOTE,
+ AUTH_FIELD_NUMBER,
+ AUTH_FIELD_ORGANIZATIONS,
+ AUTH_FIELD_PAGES,
+ AUTH_FIELD_PUBLISHER,
+ AUTH_FIELD_SCHOOL,
+ AUTH_FIELD_SERIES,
+ AUTH_FIELD_TITLE,
+ AUTH_FIELD_REPORT_TYPE,
+ AUTH_FIELD_VOLUME,
+ AUTH_FIELD_YEAR,
+ //additional types
+ AUTH_FIELD_URL,
+ AUTH_FIELD_CUSTOM1,
+ AUTH_FIELD_CUSTOM2,
+ AUTH_FIELD_CUSTOM3,
+ AUTH_FIELD_CUSTOM4,
+ AUTH_FIELD_CUSTOM5,
+ AUTH_FIELD_ISBN,
+ AUTH_FIELD_END
+};
+
+
+#endif
diff --git a/sw/inc/toxinit.hxx b/sw/inc/toxinit.hxx
new file mode 100644
index 000000000000..8546f04b830c
--- /dev/null
+++ b/sw/inc/toxinit.hxx
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TOXINIT_HXX
+#define _TOXINIT_HXX
+
+class UniString;
+
+void SetTOUTableStr(const UniString& rStr);
+void SetTOUGraphicStr(const UniString& rStr);
+void SetTOUOLEStr(const UniString& rStr);
+
+
+#endif // _TOXINIT_HXX
diff --git a/sw/inc/toxwrap.hxx b/sw/inc/toxwrap.hxx
new file mode 100644
index 000000000000..2d14cb0fad29
--- /dev/null
+++ b/sw/inc/toxwrap.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TOXWRAP_HXX
+#define _TOXWRAP_HXX
+
+#include <tools/solar.h>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <swunodef.hxx>
+#include "swdllapi.h"
+
+namespace com { namespace sun { namespace star {
+namespace i18n {
+ class XExtendedIndexEntrySupplier;
+}
+namespace lang {
+ class XMultiServiceFactory;
+}
+}}}
+
+
+class String;
+
+class SW_DLLPUBLIC IndexEntrySupplierWrapper
+{
+ STAR_NMSPC::lang::Locale aLcl;
+ STAR_NMSPC::uno::Reference < com::sun::star::i18n::XExtendedIndexEntrySupplier > xIES;
+
+public:
+ IndexEntrySupplierWrapper();
+ ~IndexEntrySupplierWrapper();
+
+ void SetLocale( const STAR_NMSPC::lang::Locale& rLocale ) { aLcl = rLocale; }
+
+ String GetIndexKey( const String& rTxt, const String& rTxtReading,
+ const STAR_NMSPC::lang::Locale& rLocale ) const;
+
+ String GetFollowingText( BOOL bMorePages ) const;
+
+ STAR_NMSPC::uno::Sequence< ::rtl::OUString >
+ GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLcl ) const;
+
+ sal_Bool LoadAlgorithm( const STAR_NMSPC::lang::Locale& rLcl,
+ const String& sSortAlgorithm, long nOptions ) const;
+
+ sal_Int16 CompareIndexEntry( const String& rTxt1, const String& rTxtReading1,
+ const STAR_NMSPC::lang::Locale& rLcl1,
+ const String& rTxt2, const String& rTxtReading2,
+ const STAR_NMSPC::lang::Locale& rLcl2 ) const;
+};
+
+#endif
diff --git a/sw/inc/txatbase.hxx b/sw/inc/txatbase.hxx
new file mode 100644
index 000000000000..8bdf77ad34fd
--- /dev/null
+++ b/sw/inc/txatbase.hxx
@@ -0,0 +1,244 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TXATBASE_HXX
+#define _TXATBASE_HXX
+
+#include <tools/solar.h>
+#include <svl/poolitem.hxx>
+#include <hintids.hxx>
+#include <errhdl.hxx>
+
+#include <boost/utility.hpp>
+
+
+class SfxItemPool;
+class SvXMLAttrContainerItem;
+class SwFmtRuby;
+class SwFmtCharFmt;
+class SwFmtAutoFmt;
+class SwFmtINetFmt;
+class SwFmtFld;
+class SwFmtFtn;
+class SwFmtFlyCnt;
+class SwTOXMark;
+class SwFmtRefMark;
+class SwFmtMeta;
+
+
+class SwTxtAttr : private boost::noncopyable
+{
+private:
+ SfxPoolItem * const m_pAttr;
+ xub_StrLen m_nStart;
+ bool m_bDontExpand : 1;
+ bool m_bLockExpandFlag : 1;
+
+ bool m_bDontMoveAttr : 1; // refmarks, toxmarks
+ bool m_bCharFmtAttr : 1; // charfmt, inet
+ bool m_bOverlapAllowedAttr : 1; // refmarks, toxmarks
+ bool m_bPriorityAttr : 1; // attribute has priority (redlining)
+ bool m_bDontExpandStart : 1; // don't expand start at paragraph start (ruby)
+ bool m_bNesting : 1; // SwTxtAttrNesting
+ bool m_bHasDummyChar : 1; // without end + meta
+
+protected:
+ SwTxtAttr( SfxPoolItem& rAttr, xub_StrLen nStart );
+ virtual ~SwTxtAttr();
+
+ void SetLockExpandFlag( bool bFlag ) { m_bLockExpandFlag = bFlag; }
+ void SetDontMoveAttr( bool bFlag ) { m_bDontMoveAttr = bFlag; }
+ void SetCharFmtAttr( bool bFlag ) { m_bCharFmtAttr = bFlag; }
+ void SetOverlapAllowedAttr( bool bFlag ){ m_bOverlapAllowedAttr = bFlag; }
+ void SetDontExpandStartAttr(bool bFlag) { m_bDontExpandStart = bFlag; }
+ void SetNesting(const bool bFlag) { m_bNesting = bFlag; }
+ void SetHasDummyChar(const bool bFlag) { m_bHasDummyChar = bFlag; }
+
+public:
+
+ /// destroy instance
+ static void Destroy( SwTxtAttr * pToDestroy, SfxItemPool& rPool );
+
+ /// start position
+ xub_StrLen* GetStart() { return & m_nStart; }
+ const xub_StrLen* GetStart() const { return & m_nStart; }
+
+ /// end position
+ virtual xub_StrLen* GetEnd();
+ inline const xub_StrLen* GetEnd() const;
+ /// end (if available), else start
+ inline const xub_StrLen* GetAnyEnd() const;
+
+ inline void SetDontExpand( bool bDontExpand );
+ bool DontExpand() const { return m_bDontExpand; }
+ bool IsLockExpandFlag() const { return m_bLockExpandFlag; }
+ bool IsDontMoveAttr() const { return m_bDontMoveAttr; }
+ bool IsCharFmtAttr() const { return m_bCharFmtAttr; }
+ bool IsOverlapAllowedAttr() const { return m_bOverlapAllowedAttr; }
+ bool IsPriorityAttr() const { return m_bPriorityAttr; }
+ void SetPriorityAttr( bool bFlag ) { m_bPriorityAttr = bFlag; }
+ bool IsDontExpandStartAttr() const { return m_bDontExpandStart; }
+ bool IsNesting() const { return m_bNesting; }
+ bool HasDummyChar() const { return m_bHasDummyChar; }
+
+ inline const SfxPoolItem& GetAttr() const;
+ inline SfxPoolItem& GetAttr();
+ inline USHORT Which() const { return GetAttr().Which(); }
+
+ virtual int operator==( const SwTxtAttr& ) const;
+
+ inline const SwFmtCharFmt &GetCharFmt() const;
+ inline const SwFmtAutoFmt &GetAutoFmt() const;
+ inline const SwFmtFld &GetFld() const;
+ inline const SwFmtFtn &GetFtn() const;
+ inline const SwFmtFlyCnt &GetFlyCnt() const;
+ inline const SwTOXMark &GetTOXMark() const;
+ inline const SwFmtRefMark &GetRefMark() const;
+ inline const SwFmtINetFmt &GetINetFmt() const;
+ inline const SwFmtRuby &GetRuby() const;
+ inline const SwFmtMeta &GetMeta() const;
+
+};
+
+class SwTxtAttrEnd : public SwTxtAttr
+{
+protected:
+ xub_StrLen m_nEnd;
+
+public:
+ SwTxtAttrEnd( SfxPoolItem& rAttr, USHORT nStart, USHORT nEnd );
+
+ using SwTxtAttr::GetEnd;
+ virtual xub_StrLen* GetEnd();
+};
+
+
+// --------------- Inline Implementierungen ------------------------
+
+inline const xub_StrLen* SwTxtAttr::GetEnd() const
+{
+ return const_cast<SwTxtAttr * >(this)->GetEnd();
+}
+
+inline const xub_StrLen* SwTxtAttr::GetAnyEnd() const
+{
+ const xub_StrLen* pEnd = GetEnd();
+ return pEnd ? pEnd : GetStart();
+}
+
+inline const SfxPoolItem& SwTxtAttr::GetAttr() const
+{
+ ASSERT( m_pAttr, "SwTxtAttr: where is my attribute?" );
+ return *m_pAttr;
+}
+
+inline SfxPoolItem& SwTxtAttr::GetAttr()
+{
+ return const_cast<SfxPoolItem&>(
+ const_cast<const SwTxtAttr*>(this)->GetAttr());
+}
+
+inline void SwTxtAttr::SetDontExpand( bool bDontExpand )
+{
+ if ( !m_bLockExpandFlag )
+ {
+ m_bDontExpand = bDontExpand;
+ }
+}
+
+//------------------------------------------------------------------------
+
+inline const SwFmtCharFmt& SwTxtAttr::GetCharFmt() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_CHARFMT,
+ "Wrong attribute" );
+ return (const SwFmtCharFmt&)(*m_pAttr);
+}
+
+inline const SwFmtAutoFmt& SwTxtAttr::GetAutoFmt() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_AUTOFMT,
+ "Wrong attribute" );
+ return (const SwFmtAutoFmt&)(*m_pAttr);
+}
+
+inline const SwFmtFld& SwTxtAttr::GetFld() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FIELD,
+ "Wrong attribute" );
+ return (const SwFmtFld&)(*m_pAttr);
+}
+
+inline const SwFmtFtn& SwTxtAttr::GetFtn() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FTN, "Wrong attribute" );
+ return (const SwFmtFtn&)(*m_pAttr);
+}
+
+inline const SwFmtFlyCnt& SwTxtAttr::GetFlyCnt() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_FLYCNT,
+ "Wrong attribute" );
+ return (const SwFmtFlyCnt&)(*m_pAttr);
+}
+
+inline const SwTOXMark& SwTxtAttr::GetTOXMark() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_TOXMARK,
+ "Wrong attribute" );
+ return (const SwTOXMark&)(*m_pAttr);
+}
+
+inline const SwFmtRefMark& SwTxtAttr::GetRefMark() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_REFMARK,
+ "Wrong attribute" );
+ return (const SwFmtRefMark&)(*m_pAttr);
+}
+
+inline const SwFmtINetFmt& SwTxtAttr::GetINetFmt() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_INETFMT,
+ "Wrong attribute" );
+ return (const SwFmtINetFmt&)(*m_pAttr);
+}
+
+inline const SwFmtRuby& SwTxtAttr::GetRuby() const
+{
+ ASSERT( m_pAttr && m_pAttr->Which() == RES_TXTATR_CJK_RUBY,
+ "Wrong attribute" );
+ return (const SwFmtRuby&)(*m_pAttr);
+}
+
+inline const SwFmtMeta& SwTxtAttr::GetMeta() const
+{
+ ASSERT( m_pAttr && (m_pAttr->Which() == RES_TXTATR_META ||
+ m_pAttr->Which() == RES_TXTATR_METAFIELD),
+ "Wrong attribute" );
+ return (const SwFmtMeta&)(*m_pAttr);
+}
+
+#endif
diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx
new file mode 100644
index 000000000000..da63c0c64b5a
--- /dev/null
+++ b/sw/inc/txatritr.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TXATRITR_HXX
+#define _TXATRITR_HXX
+
+#include <tools/solar.h>
+#include <sal/types.h>
+#include <svl/svarray.hxx>
+#include <editeng/langitem.hxx>
+#include <hintids.hxx>
+
+class String;
+class SwTxtNode;
+class SwTxtAttr;
+class SfxPoolItem;
+
+
+class SwScriptIterator
+{
+ const String& rText;
+ xub_StrLen nChgPos;
+ sal_uInt16 nCurScript;
+ sal_Bool bForward;
+
+public:
+ SwScriptIterator( const String& rStr, xub_StrLen nStart = 0,
+ sal_Bool bFrwrd = sal_True );
+
+ sal_Bool Next();
+
+ sal_uInt16 GetCurrScript() const { return nCurScript; }
+ xub_StrLen GetScriptChgPos() const { return nChgPos; }
+ const String& GetText() const { return rText; }
+};
+
+
+class SwTxtAttrIterator
+{
+ SwScriptIterator aSIter;
+ SvPtrarr aStack;
+ const SwTxtNode& rTxtNd;
+ const SfxPoolItem *pParaItem, *pCurItem;
+ xub_StrLen nChgPos;
+ sal_uInt16 nAttrPos, nWhichId;
+ sal_Bool bIsUseGetWhichOfScript;
+
+ void AddToStack( const SwTxtAttr& rAttr );
+ void SearchNextChg();
+
+public:
+ SwTxtAttrIterator( const SwTxtNode& rTxtNd, USHORT nWhichId,
+ xub_StrLen nStart = 0, sal_Bool bUseGetWhichOfScript = sal_True );
+
+ sal_Bool Next();
+
+ const SfxPoolItem& GetAttr() const { return *pCurItem; }
+ xub_StrLen GetChgPos() const { return nChgPos; }
+};
+
+
+class SwLanguageIterator : public SwTxtAttrIterator
+{
+public:
+ SwLanguageIterator( const SwTxtNode& rTxtNode, xub_StrLen nStart = 0,
+ USHORT nWhich = RES_CHRATR_LANGUAGE,
+ sal_Bool bUseGetWhichOfScript = sal_True )
+ : SwTxtAttrIterator( rTxtNode, nWhich, nStart, bUseGetWhichOfScript )
+ {}
+
+ sal_uInt16 GetLanguage() const
+ { return ((SvxLanguageItem&)GetAttr()).GetValue(); }
+};
+
+
+#endif
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
new file mode 100644
index 000000000000..65ecd951868c
--- /dev/null
+++ b/sw/inc/txtatr.hxx
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TXTATR_HXX
+#define _TXTATR_HXX
+
+#include <txatbase.hxx> // SwTxtAttr/SwTxtAttrEnd
+#include <calbck.hxx>
+
+
+class SwTxtNode; // fuer SwTxtFld
+class SwCharFmt;
+
+// ATT_CHARFMT *********************************************
+
+class SwTxtCharFmt : public SwTxtAttrEnd
+{
+ SwTxtNode * m_pTxtNode;
+ USHORT m_nSortNumber;
+
+public:
+ SwTxtCharFmt( SwFmtCharFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ virtual ~SwTxtCharFmt( );
+
+ // werden vom SwFmtCharFmt hierher weitergeleitet
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* ); // SwClient
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ // get and set TxtNode pointer
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+
+ void SetSortNumber( USHORT nSortNumber ) { m_nSortNumber = nSortNumber; }
+ USHORT GetSortNumber() const { return m_nSortNumber; }
+};
+
+
+// ******************************
+
+class SwTxtAttrNesting : public SwTxtAttrEnd
+{
+public:
+ SwTxtAttrNesting( SfxPoolItem & i_rAttr,
+ const xub_StrLen i_nStart, const xub_StrLen i_nEnd );
+ virtual ~SwTxtAttrNesting();
+};
+
+class SwTxtMeta : public SwTxtAttrNesting
+{
+private:
+ SwTxtNode * m_pTxtNode;
+
+public:
+ SwTxtMeta( SwFmtMeta & i_rAttr,
+ const xub_StrLen i_nStart, const xub_StrLen i_nEnd );
+ virtual ~SwTxtMeta();
+
+ void ChgTxtNode(SwTxtNode * const pNode);
+ SwTxtNode * GetTxtNode() const { return m_pTxtNode; }
+
+};
+
+
+// ******************************
+
+class SW_DLLPUBLIC SwTxtRuby : public SwTxtAttrNesting, public SwClient
+{
+ SwTxtNode* m_pTxtNode;
+
+public:
+ SwTxtRuby( SwFmtRuby& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ virtual ~SwTxtRuby();
+ TYPEINFO();
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ /// get and set TxtNode pointer
+ const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
+ inline const SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+
+ SwCharFmt* GetCharFmt();
+ const SwCharFmt* GetCharFmt() const
+ { return (const_cast<SwTxtRuby*>(this))->GetCharFmt(); }
+};
+
+// --------------- Inline Implementierungen ------------------------
+
+inline const SwTxtNode& SwTxtRuby::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtRuby: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+#endif
diff --git a/sw/inc/txtflcnt.hxx b/sw/inc/txtflcnt.hxx
new file mode 100644
index 000000000000..8a9dfecb422b
--- /dev/null
+++ b/sw/inc/txtflcnt.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TXTFLCNT_HXX
+#define _TXTFLCNT_HXX
+
+#include <txatbase.hxx>
+
+class SwFlyInCntFrm;
+class SwFrm;
+class SwTxtNode;
+class SwDoc;
+
+// SWTXT_FLYCNT ********************************
+// Attribut fuer zeilengebundene Frames (ohne Endindex)
+
+class SwTxtFlyCnt : public SwTxtAttr
+{
+ SwFlyInCntFrm *_GetFlyFrm( const SwFrm *pCurrFrm );
+
+public:
+ SwTxtFlyCnt( SwFmtFlyCnt& rAttr, xub_StrLen nStart );
+
+ // Setzt den Anker im pFmt und
+ void SetAnchor( const SwTxtNode *pNode );
+
+ inline SwFlyInCntFrm *GetFlyFrm( const SwFrm *pCurrFrm );
+ inline const SwFlyInCntFrm *GetFlyFrm( const SwFrm *pCurrFrm ) const;
+
+ // erzeugt sich ein neues FlyFrameFormat
+ void CopyFlyFmt( SwDoc* pDoc );
+};
+
+inline SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm )
+{
+ return _GetFlyFrm( pCurrFrm );
+}
+
+inline const SwFlyInCntFrm *SwTxtFlyCnt::GetFlyFrm( const SwFrm *pCurrFrm ) const
+{
+ return (const_cast<SwTxtFlyCnt*>(this))->_GetFlyFrm( pCurrFrm );
+}
+
+#endif
+
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
new file mode 100644
index 000000000000..d0be4a008cab
--- /dev/null
+++ b/sw/inc/txtfld.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TXTFLD_HXX
+#define _TXTFLD_HXX
+
+#include <txatbase.hxx>
+#include <tools/string.hxx>
+#include <pam.hxx>
+
+class SwTxtNode;
+
+// ATT_FLD ***********************************
+
+class SwTxtFld : public SwTxtAttr
+{
+ mutable String m_aExpand;
+ SwTxtNode * m_pTxtNode;
+
+public:
+ SwTxtFld(SwFmtFld & rAttr, xub_StrLen const nStart,
+ bool const bInClipboard);
+ virtual ~SwTxtFld();
+
+ void CopyFld( SwTxtFld *pDest ) const;
+ void Expand() const;
+ inline void ExpandAlways();
+
+ // get and set TxtNode pointer
+ SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
+ inline SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+ // enable notification that field content has changed and needs reformatting
+ void NotifyContentChange(SwFmtFld& rFmtFld);
+
+ // #111840#
+ /**
+ Returns position of this field.
+
+ @return position of this field. Has to be deleted explicitly.
+ */
+// SwPosition * GetPosition() const;
+};
+
+inline SwTxtNode& SwTxtFld::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtFld:: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+inline void SwTxtFld::ExpandAlways()
+{
+ m_aExpand += ' ';
+ Expand();
+}
+
+#endif
+
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
new file mode 100644
index 000000000000..07043a9263bc
--- /dev/null
+++ b/sw/inc/txtftn.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TXTFTN_HXX
+#define _TXTFTN_HXX
+
+#include <txatbase.hxx>
+
+class SwNodeIndex;
+class SwTxtNode;
+class SwNodes;
+class SwDoc;
+
+// ATT_FTN **********************************************************
+
+class SW_DLLPUBLIC SwTxtFtn : public SwTxtAttr
+{
+ SwNodeIndex * m_pStartNode;
+ SwTxtNode * m_pTxtNode;
+ USHORT m_nSeqNo;
+
+public:
+ SwTxtFtn( SwFmtFtn& rAttr, xub_StrLen nStart );
+ virtual ~SwTxtFtn();
+
+ inline SwNodeIndex *GetStartNode() const { return m_pStartNode; }
+ void SetStartNode( const SwNodeIndex *pNode, BOOL bDelNodes = TRUE );
+ void SetNumber( const USHORT nNumber, const String* = 0 );
+ void CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const;
+
+ // get and set TxtNode pointer
+ inline const SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+
+ // lege eine neue leere TextSection fuer diese Fussnote an
+ void MakeNewTextSection( SwNodes& rNodes );
+
+ // loesche die FtnFrame aus der Seite
+ void DelFrms();
+ // bedingten Absatzvorlagen checken
+ void CheckCondColl();
+
+ // fuer die Querverweise auf Fussnoten
+ USHORT SetSeqRefNo();
+ void SetSeqNo( USHORT n ) { m_nSeqNo = n; } // for Readers
+ USHORT GetSeqRefNo() const { return m_nSeqNo; }
+
+ static void SetUniqueSeqRefNo( SwDoc& rDoc );
+};
+
+inline const SwTxtNode& SwTxtFtn::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+#endif
+
diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx
new file mode 100644
index 000000000000..8e0d66df654e
--- /dev/null
+++ b/sw/inc/txtinet.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TXTINET_HXX
+#define _TXTINET_HXX
+
+#include <txatbase.hxx>
+#include <txtatr.hxx>
+#include <calbck.hxx>
+
+class SwTxtNode;
+class SwCharFmt;
+
+// ATT_INETFMT *********************************************
+
+class SW_DLLPUBLIC SwTxtINetFmt : public SwTxtAttrNesting, public SwClient
+{
+ SwTxtNode * m_pTxtNode;
+ bool m_bVisited : 1; // visited link?
+ bool m_bVisitedValid : 1; // is m_bVisited valid?
+
+ // forbidden and not implemented.
+ SwTxtINetFmt();
+
+public:
+ SwTxtINetFmt( SwFmtINetFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
+ virtual ~SwTxtINetFmt();
+ TYPEINFO();
+
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
+
+ // get and set TxtNode pointer
+ const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
+ inline const SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+
+ SwCharFmt* GetCharFmt();
+ const SwCharFmt* GetCharFmt() const
+ { return const_cast<SwTxtINetFmt*>(this)->GetCharFmt(); }
+
+ bool IsVisited() const { return m_bVisited; }
+ void SetVisited( bool bNew ) { m_bVisited = bNew; }
+
+ bool IsVisitedValid() const { return m_bVisitedValid; }
+ void SetVisitedValid( bool bNew ) { m_bVisitedValid = bNew; }
+
+ BOOL IsProtect() const;
+};
+
+inline const SwTxtNode& SwTxtINetFmt::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtINetFmt: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+#endif
+
diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx
new file mode 100644
index 000000000000..75a5305041f0
--- /dev/null
+++ b/sw/inc/txtrfmrk.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TXTRFMRK_HXX
+#define _TXTRFMRK_HXX
+
+#include <txatbase.hxx>
+
+class SwTxtNode;
+
+// SWTXT_REFMARK *************************************
+// Attribut fuer Inhalts-/Positions-Referenzen im Text
+
+class SwTxtRefMark : public SwTxtAttrEnd
+{
+ SwTxtNode * m_pTxtNode;
+ xub_StrLen * m_pEnd; // end is optional (point reference)
+
+public:
+ SwTxtRefMark( SwFmtRefMark& rAttr,
+ xub_StrLen nStart, xub_StrLen * pEnd = 0 );
+
+ virtual xub_StrLen * GetEnd(); // SwTxtAttr
+ inline const xub_StrLen * GetEnd() const { return m_pEnd; }
+
+ // get and set TxtNode pointer
+ inline const SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+};
+
+inline const SwTxtNode& SwTxtRefMark::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtRefMark: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+#endif
+
diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx
new file mode 100644
index 000000000000..efa88329c73b
--- /dev/null
+++ b/sw/inc/txttxmrk.hxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _TXTTXMRK_HXX
+#define _TXTTXMRK_HXX
+
+#include <txatbase.hxx>
+
+class SwTxtNode;
+class SwDoc;
+
+// SWTXT_TOXMARK *******************************
+// Attribut fuer die Verzeichnisse
+
+class SwTxtTOXMark : public SwTxtAttrEnd
+{
+ SwTxtNode * m_pTxtNode;
+ xub_StrLen * m_pEnd; // 0 if SwTOXMark without AlternativeText
+
+public:
+ SwTxtTOXMark( SwTOXMark& rAttr, xub_StrLen nStart, xub_StrLen * pEnd = 0 );
+ virtual ~SwTxtTOXMark();
+
+ virtual xub_StrLen *GetEnd(); // SwTxtAttr
+ inline const xub_StrLen* GetEnd() const { return m_pEnd; }
+
+ void CopyTOXMark( SwDoc* pDestDoc );
+
+ // get and set TxtNode pointer
+ inline const SwTxtNode* GetpTxtNd() const { return m_pTxtNode; }
+ inline const SwTxtNode& GetTxtNode() const;
+ void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
+};
+
+inline const SwTxtNode& SwTxtTOXMark::GetTxtNode() const
+{
+ ASSERT( m_pTxtNode, "SwTxtTOXMark: where is my TxtNode?" );
+ return *m_pTxtNode;
+}
+
+#endif
+
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
new file mode 100644
index 000000000000..cf92a707e40f
--- /dev/null
+++ b/sw/inc/undobj.hxx
@@ -0,0 +1,1921 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNDOBJ_HXX
+#define SW_UNDOBJ_HXX
+
+// --> OD 2006-11-01 #130889#
+#include <vector>
+// <--
+#include <memory>
+
+#include <boost/shared_ptr.hpp>
+
+#include <com/sun/star/uno/Sequence.h>
+
+#include <tools/mempool.hxx>
+#ifndef _SVSTDARR_HXX
+#define _SVSTDARR_USHORTS
+#define _SVSTDARR_ULONGS
+#define _SVSTDARR_BOOLS
+#define _SVSTDARR_BYTES
+#define _SVSTDARR_USHORTSSORT
+#include <svl/svstdarr.hxx>
+#endif
+#include <svl/itemset.hxx>
+
+#include <svx/svdundo.hxx> // #111827#
+
+#include <numrule.hxx>
+#include <itabenum.hxx>
+#include <format.hxx>
+#include <SwRewriter.hxx>
+#include <swundo.hxx>
+#include <IMark.hxx>
+#include <IDocumentContentOperations.hxx>
+
+
+class SwUndoIter;
+class SwHistory;
+class SwIndex;
+class SwPaM;
+struct SwPosition;
+class SwDoc;
+class SwFmt;
+class SwFmtColl;
+class SwTxtFmtColl;
+class SwTxtNode;
+class SwTableNode;
+class SwTable;
+class SwTableBox;
+struct SwSortOptions;
+class SwFrmFmt;
+class SwHistoryBookmark;
+class SwSectionData;
+class SwSectionFmt;
+class SwTOXBase;
+class SvxTabStopItem;
+class SwDDEFieldType;
+class Graphic;
+class SwGrfNode;
+class SwUndos;
+class SwFtnInfo;
+class SwEndNoteInfo;
+class SwNodeIndex;
+class SwNodeRange;
+class SwFmtAnchor;
+struct SwUndoGroupObjImpl;
+class SdrMark;
+class SdrMarkList;
+class SdrObject;
+class SdrObjGroup;
+class SdrUndoAction;
+class SwDrawFrmFmt;
+class _SaveTable;
+class SwTableAutoFmt;
+class SwSelBoxes;
+class SwTableSortBoxes;
+class SwUndoSaveSections;
+class SwUndoMoves;
+class SwStartNode;
+class _SaveFlyArr;
+class SwTblToTxtSaves;
+class SwRedlineData;
+class SwRedlineSaveData;
+class SwRedline;
+struct SwSaveRowSpan;
+
+namespace sfx2 {
+ class MetadatableUndo;
+}
+
+namespace utl {
+ class TransliterationWrapper;
+}
+
+
+const String UNDO_ARG1("$1", RTL_TEXTENCODING_ASCII_US);
+const String UNDO_ARG2("$2", RTL_TEXTENCODING_ASCII_US);
+const String UNDO_ARG3("$3", RTL_TEXTENCODING_ASCII_US);
+
+typedef SwRedlineSaveData* SwRedlineSaveDataPtr;
+SV_DECL_PTRARR_DEL( SwRedlineSaveDatas, SwRedlineSaveDataPtr, 8, 8 )
+
+class SwUndo
+{
+ SwUndoId nId;
+ USHORT nOrigRedlineMode;
+
+protected:
+ bool bCacheComment;
+ mutable String * pComment;
+
+ void RemoveIdxFromSection( SwDoc&, ULONG nSttIdx, ULONG* pEndIdx = 0 );
+ void RemoveIdxFromRange( SwPaM& rPam, BOOL bMoveNext );
+ void RemoveIdxRel( ULONG, const SwPosition& );
+
+ void SetId( SwUndoId nNew ) { nId = nNew; }
+
+ static BOOL CanRedlineGroup( SwRedlineSaveDatas& rCurr,
+ const SwRedlineSaveDatas& rCheck,
+ BOOL bCurrIsEnd );
+
+ // #111827#
+ /**
+ Returns the rewriter for this object.
+
+ @return the rewriter for this object
+ */
+ virtual SwRewriter GetRewriter() const;
+public:
+ SwUndo( SwUndoId nI );
+ virtual ~SwUndo();
+
+ SwUndoId GetId() const { return nId; }
+ virtual SwUndoId GetEffectiveId() const;
+ virtual void Undo( SwUndoIter& ) = 0;
+ virtual void Redo( SwUndoIter& ) = 0;
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns textual comment for this undo object.
+
+ The textual comment is created from the resource string
+ corresponding to this object's ID. The rewriter of this object
+ is applied to the resource string to get the final comment.
+
+ @return textual comment for this undo object
+ */
+ virtual String GetComment() const;
+
+ // das UndoObject merkt sich, welcher Mode eingeschaltet war.
+ // In Undo/Redo/Repeat wird dann immer auf diesen zurueck geschaltet
+ USHORT GetRedlineMode() const { return nOrigRedlineMode; }
+ void SetRedlineMode( USHORT eMode ) { nOrigRedlineMode = eMode; }
+
+ bool IsDelBox() const;
+
+ // sicher und setze die RedlineDaten
+ static BOOL FillSaveData( const SwPaM& rRange, SwRedlineSaveDatas& rSData,
+ BOOL bDelRange = TRUE, BOOL bCopyNext = TRUE );
+ static BOOL FillSaveDataForFmt( const SwPaM& , SwRedlineSaveDatas& );
+ static void SetSaveData( SwDoc& rDoc, const SwRedlineSaveDatas& rSData );
+ static BOOL HasHiddenRedlines( const SwRedlineSaveDatas& rSData );
+};
+
+typedef USHORT DelCntntType;
+namespace nsDelCntntType
+{
+ const DelCntntType DELCNT_FTN = 0x01;
+ const DelCntntType DELCNT_FLY = 0x02;
+ const DelCntntType DELCNT_TOC = 0x04;
+ const DelCntntType DELCNT_BKM = 0x08;
+ const DelCntntType DELCNT_ALL = 0x0F;
+ const DelCntntType DELCNT_CHKNOCNTNT = 0x80;
+}
+
+/// will DelCntntIndex destroy a frame anchored at character at rAnchorPos?
+bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos,
+ SwPosition const & rStart, SwPosition const & rEnd,
+ DelCntntType const nDelCntntType = nsDelCntntType::DELCNT_ALL);
+
+// diese Klasse muss in ein Undo-Object vererbt werden, wenn dieses Inhalt
+// fuers Redo/Undo ... speichert
+class SwUndoSaveCntnt
+{
+protected:
+
+ SwHistory* pHistory;
+
+ // wird fuer das loeschen von Inhalt benoetigt. Fuer das ReDo werden
+ // Inhalte in das UndoNodesArray verschoben. Diese Methoden fuegen
+ // am Ende eines TextNodes ein Trenner fuer die Attribute. Damit werden
+ // Attribute nicht expandiert.
+ // MoveTo.. verschiebt aus dem NodesArray in das UndoNodesArray
+ // MoveFrom.. verschiebt aus dem UndoNodesArray in das NodesArray
+ void MoveToUndoNds( SwPaM& rPam,
+ SwNodeIndex* pNodeIdx = 0, SwIndex* pCntIdx = 0,
+ ULONG* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
+ void MoveFromUndoNds( SwDoc& rDoc, ULONG nNodeIdx, xub_StrLen nCntntIdx,
+ SwPosition& rInsPos,
+ ULONG* pEndNdIdx = 0, xub_StrLen * pEndCntIdx = 0 );
+
+ // diese beiden Methoden bewegen den SPoint vom Pam zurueck/vor. Damit
+ // kann fuer ein Undo/Redo ein Bereich aufgespannt werden. (Der
+ // SPoint liegt dann vor dem manipuliertem Bereich !!)
+ // Das Flag gibt an, ob noch vorm SPoint Inhalt steht.
+ BOOL MovePtBackward( SwPaM& rPam );
+ void MovePtForward( SwPaM& rPam, BOOL bMvBkwrd );
+
+ // vor dem Move ins UndoNodes-Array muss dafuer gesorgt werden, das
+ // die Inhaltstragenden Attribute aus dem Nodes-Array entfernt werden.
+ void DelCntntIndex( const SwPosition& pMark, const SwPosition& pPoint,
+ DelCntntType nDelCntntType = nsDelCntntType::DELCNT_ALL );
+
+public:
+ SwUndoSaveCntnt();
+ ~SwUndoSaveCntnt();
+};
+
+
+// sicher eine vollstaendige Section im Nodes-Array
+class SwUndoSaveSection : private SwUndoSaveCntnt
+{
+ SwNodeIndex *pMvStt;
+ SwRedlineSaveDatas* pRedlSaveData;
+ ULONG nMvLen; // Index ins UndoNodes-Array
+ ULONG nStartPos;
+
+protected:
+ SwNodeIndex* GetMvSttIdx() const { return pMvStt; }
+ ULONG GetMvNodeCnt() const { return nMvLen; }
+
+public:
+ SwUndoSaveSection();
+ ~SwUndoSaveSection();
+
+ void SaveSection( SwDoc* pDoc, const SwNodeIndex& rSttIdx );
+ void SaveSection( SwDoc* pDoc, const SwNodeRange& rRange );
+ void RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, USHORT nSectType );
+ void RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos );
+
+ const SwHistory* GetHistory() const { return pHistory; }
+ SwHistory* GetHistory() { return pHistory; }
+};
+
+
+// Diese Klasse speichert den Pam als USHORT's und kann diese wieder zu
+// einem PaM zusammensetzen
+class SwUndRng
+{
+public:
+ ULONG nSttNode, nEndNode;
+ xub_StrLen nSttCntnt, nEndCntnt;
+
+ SwUndRng();
+ SwUndRng( const SwPaM& );
+
+ void SetValues( const SwPaM& rPam );
+ void SetPaM( SwPaM&, BOOL bCorrToCntnt = FALSE ) const;
+ void SetPaM( SwUndoIter&, BOOL bCorrToCntnt = FALSE ) const;
+};
+
+
+class SwUndoStart: public SwUndo
+{
+ // Um innerhalb von Undo zuerkennen, wann ein Start vorliegt, gibt
+ // GetId() immer die UNDO_START zurueck. Die UserId kann ueber
+ // GetUserId() erfragt werden.
+ SwUndoId nUserId;
+ // fuer die "Verpointerung" von Start- und End-Undos
+ USHORT nEndOffset;
+
+ SwRewriter mRewriter;
+
+public:
+ SwUndoStart( SwUndoId nId );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // -> #111827#
+ virtual String GetComment() const;
+ void SetRewriter(const SwRewriter & rRewriter);
+ virtual SwRewriter GetRewriter() const;
+ // <- #111827#
+
+ virtual SwUndoId GetEffectiveId() const;
+ SwUndoId GetUserId() const { return nUserId; }
+ // Setzen vom End-Undo-Offset geschieht im Doc::EndUndo
+ USHORT GetEndOffset() const { return nEndOffset; }
+ void SetEndOffset( USHORT n ) { nEndOffset = n; }
+};
+
+class SwUndoEnd: public SwUndo
+{
+ // Um innerhalb von Undo zuerkennen, wann ein Ende vorliegt, gibt
+ // GetId() immer die UNDO_END zurueck. Die UserId kann ueber
+ // GetUserId() erfragt werden.
+ SwUndoId nUserId;
+ // fuer die "Verpointerung" von Start- und End-Undos
+ USHORT nSttOffset;
+
+ SwRewriter mRewriter;
+
+public:
+ SwUndoEnd( SwUndoId nId );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // -> #111827#
+ virtual String GetComment() const;
+ void SetRewriter(const SwRewriter & rRewriter);
+ virtual SwRewriter GetRewriter() const;
+ // <- #111827#
+
+ virtual SwUndoId GetEffectiveId() const;
+ SwUndoId GetUserId() const { return nUserId; }
+
+ // Setzen vom Start-Undo-Offset geschieht im Doc::EndUndo
+ void SetSttOffset(USHORT _nSttOffSet) { nSttOffset = _nSttOffSet; }
+ USHORT GetSttOffset() const { return nSttOffset; }
+};
+
+class SwUndoInsert: public SwUndo, private SwUndoSaveCntnt
+{
+ SwPosition *pPos; // Inhalt fuers Redo
+ String *pTxt, *pUndoTxt;
+ SwRedlineData* pRedlData;
+ ULONG nNode;
+ xub_StrLen nCntnt, nLen;
+ BOOL bIsWordDelim : 1;
+ BOOL bIsAppend : 1;
+
+ const IDocumentContentOperations::InsertFlags m_nInsertFlags;
+
+ friend class SwDoc; // eigentlich nur SwDoc::Insert( String )
+ BOOL CanGrouping( sal_Unicode cIns );
+ BOOL CanGrouping( const SwPosition& rPos );
+
+ SwDoc * pDoc;
+
+ void Init(const SwNodeIndex & rNode);
+ String * GetTxtFromDoc() const;
+
+public:
+ SwUndoInsert( const SwNodeIndex& rNode, xub_StrLen nCntnt, xub_StrLen nLen,
+ const IDocumentContentOperations::InsertFlags nInsertFlags,
+ BOOL bWDelim = TRUE );
+ SwUndoInsert( const SwNodeIndex& rNode );
+ virtual ~SwUndoInsert();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns rewriter for this undo object.
+
+ The returned rewriter has the following rule:
+
+ $1 -> '<inserted text>'
+
+ <inserted text> is shortened to a length of nUndoStringLength.
+
+ @return rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert)
+};
+
+
+class SwUndoDelete: public SwUndo, private SwUndRng, private SwUndoSaveCntnt
+{
+ SwNodeIndex* pMvStt; // Position der Nodes im UndoNodes-Array
+ String *pSttStr, *pEndStr;
+ SwRedlineData* pRedlData;
+ SwRedlineSaveDatas* pRedlSaveData;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart;
+ ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd;
+
+ String sTableName;
+
+ ULONG nNode;
+ ULONG nNdDiff; // Differenz von Nodes vor-nach Delete
+ ULONG nSectDiff; // Diff. von Nodes vor/nach Move mit SectionNodes
+ ULONG nReplaceDummy; // Diff. to a temporary dummy object
+ USHORT nSetPos;
+
+ BOOL bGroup : 1; // TRUE: ist schon eine Gruppe; wird in CanGrouping() ausgwertet !!
+ BOOL bBackSp : 1; // TRUE: wenn Gruppierung und der Inhalt davor geloescht wird
+ BOOL bJoinNext: 1; // TRUE: wenn der Bereich von Oben nach unten geht
+ BOOL bTblDelLastNd : 1; // TRUE: TextNode hinter der Tabelle einf./loeschen
+ BOOL bDelFullPara : 1; // TRUE: gesamte Nodes wurden geloescht
+ BOOL bResetPgDesc : 1; // TRUE: am nachfolgenden Node das PgDsc zuruecksetzen
+ BOOL bResetPgBrk : 1; // TRUE: am nachfolgenden Node das PgBreak zuruecksetzen
+ BOOL bFromTableCopy : 1; // TRUE: called by SwUndoTblCpyTbl
+
+ BOOL SaveCntnt( const SwPosition* pStt, const SwPosition* pEnd,
+ SwTxtNode* pSttTxtNd, SwTxtNode* pEndTxtNd );
+public:
+ SwUndoDelete( SwPaM&, BOOL bFullPara = FALSE, BOOL bCalledByTblCpy = FALSE );
+ virtual ~SwUndoDelete();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns rewriter for this undo object.
+
+ The rewriter consists of the following rule:
+
+ $1 -> '<deleted text>'
+
+ <deleted text> is shortened to nUndoStringLength characters.
+
+ @return rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ BOOL CanGrouping( SwDoc*, const SwPaM& );
+
+ void SetTblDelLastNd() { bTblDelLastNd = TRUE; }
+
+ // fuer die PageDesc/PageBreak Attribute einer Tabelle
+ void SetPgBrkFlags( BOOL bPageBreak, BOOL bPageDesc )
+ { bResetPgDesc = bPageDesc; bResetPgBrk = bPageBreak; }
+
+ void SetTableName(const String & rName);
+
+ // SwUndoTblCpyTbl needs this information:
+ long NodeDiff() const { return nSttNode - nEndNode; }
+ xub_StrLen ContentStart() const { return nSttCntnt; }
+ BOOL IsDelFullPara() const { return bDelFullPara; }
+
+ DECL_FIXEDMEMPOOL_NEWDEL(SwUndoDelete)
+};
+
+
+class SwUndoOverwrite: public SwUndo, private SwUndoSaveCntnt
+{
+ String aDelStr, aInsStr;
+ SwRedlineSaveDatas* pRedlSaveData;
+ ULONG nSttNode;
+ xub_StrLen nSttCntnt;
+ BOOL bInsChar : 1; // kein Overwrite mehr; sondern Insert
+ BOOL bGroup : 1; // TRUE: ist schon eine Gruppe; wird in
+ // CanGrouping() ausgwertet !!
+public:
+ SwUndoOverwrite( SwDoc*, SwPosition&, sal_Unicode cIns );
+ virtual ~SwUndoOverwrite();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns the rewriter of this undo object.
+
+ The rewriter contains the following rule:
+
+ $1 -> '<overwritten text>'
+
+ <overwritten text> is shortened to nUndoStringLength characters.
+
+ @return the rewriter of this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ BOOL CanGrouping( SwDoc*, SwPosition&, sal_Unicode cIns );
+};
+
+
+class SwUndoSplitNode: public SwUndo
+{
+ SwHistory* pHistory;
+ SwRedlineData* pRedlData;
+ ULONG nNode;
+ xub_StrLen nCntnt;
+ BOOL bTblFlag : 1;
+ BOOL bChkTblStt : 1;
+public:
+ SwUndoSplitNode( SwDoc* pDoc, const SwPosition& rPos, BOOL bChkTbl );
+ virtual ~SwUndoSplitNode();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ void SetTblFlag() { bTblFlag = TRUE; }
+};
+
+
+class SwUndoMove : public SwUndo, private SwUndRng, private SwUndoSaveCntnt
+{
+ // nDest.. - Bereich, in den verschoben wurde (nach dem Move!)
+ // nIns.. - Position, von der verschoben wurde und wieder die neue InsPos. ist
+ // nMv.. Position auf die verschoben wird (vor dem Move!) ; fuers REDO
+ ULONG nDestSttNode, nDestEndNode, nInsPosNode, nMvDestNode;
+ xub_StrLen nDestSttCntnt, nDestEndCntnt, nInsPosCntnt, nMvDestCntnt;
+
+ USHORT nFtnStt; // StartPos der Fussnoten in der History
+
+ BOOL bJoinNext : 1,
+ bJoinPrev : 1,
+ bMoveRange : 1;
+
+ bool bMoveRedlines; // use DOC_MOVEREDLINES when calling SwDoc::Move
+
+ void DelFtn( const SwPaM& );
+public:
+ SwUndoMove( const SwPaM&, const SwPosition& );
+ SwUndoMove( SwDoc* pDoc, const SwNodeRange&, const SwNodeIndex& );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ // setze den Destination-Bereich nach dem Verschieben.
+ void SetDestRange( const SwPaM&, const SwPosition&, BOOL, BOOL );
+ void SetDestRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd,
+ const SwNodeIndex& rInsPos );
+
+ BOOL IsMoveRange() const { return bMoveRange; }
+ ULONG GetEndNode() const { return nEndNode; }
+ ULONG GetDestSttNode() const { return nDestSttNode; }
+ xub_StrLen GetDestSttCntnt() const { return nDestSttCntnt; }
+
+ void SetMoveRedlines( bool b ) { bMoveRedlines = b; }
+
+};
+
+
+class SwUndoAttr : public SwUndo, private SwUndRng
+{
+ SfxItemSet m_AttrSet; // attributes for Redo
+ const ::std::auto_ptr<SwHistory> m_pHistory; // History for Undo
+ ::std::auto_ptr<SwRedlineData> m_pRedlineData; // Redlining
+ ::std::auto_ptr<SwRedlineSaveDatas> m_pRedlineSaveData;
+ ULONG m_nNodeIndex; // Offset: for Redlining
+ const SetAttrMode m_nInsertFlags; // insert flags
+
+ void RemoveIdx( SwDoc& rDoc );
+
+public:
+ SwUndoAttr( const SwPaM&, const SfxItemSet &, const SetAttrMode nFlags );
+ SwUndoAttr( const SwPaM&, const SfxPoolItem&, const SetAttrMode nFlags );
+ virtual ~SwUndoAttr();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ void SaveRedlineData( const SwPaM& rPam, BOOL bInsCntnt );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+
+};
+
+class SwUndoResetAttr : public SwUndo, private SwUndRng
+{
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ SvUShortsSort m_Ids;
+ const USHORT m_nFormatId; // Format-Id for Redo
+
+public:
+ SwUndoResetAttr( const SwPaM&, USHORT nFmtId );
+ SwUndoResetAttr( const SwPosition&, USHORT nFmtId );
+ virtual ~SwUndoResetAttr();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ void SetAttrs( const SvUShortsSort& rArr );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+
+};
+
+class SwUndoFmtAttr : public SwUndo
+{
+ friend class SwUndoDefaultAttr;
+ SwFmt * m_pFmt;
+ ::std::auto_ptr<SfxItemSet> m_pOldSet; // old attributes
+ ULONG m_nNodeIndex;
+ const USHORT m_nFmtWhich;
+ const bool m_bSaveDrawPt;
+
+ bool IsFmtInDoc( SwDoc* ); //is the attribute format still in the Doc?
+ void SaveFlyAnchor( bool bSaveDrawPt = false );
+ // --> OD 2004-10-26 #i35443# - Add return value, type <bool>.
+ // Return value indicates, if anchor attribute is restored.
+ // Notes: - If anchor attribute is restored, all other existing attributes
+ // are also restored.
+ // - Anchor attribute isn't restored successfully, if it contains
+ // an invalid anchor position and all other existing attributes
+ // aren't restored.
+ // This situation occurs for undo of styles.
+ bool RestoreFlyAnchor( SwUndoIter& rIter );
+ // <--
+ // --> OD 2008-02-27 #refactorlists# - removed <rAffectedItemSet>
+ void Init();
+ // <--
+
+public:
+ // register at the Format and save old attributes
+ // --> OD 2008-02-27 #refactorlists# - removed <rNewSet>
+ SwUndoFmtAttr( const SfxItemSet& rOldSet,
+ SwFmt& rFmt,
+ bool bSaveDrawPt = true );
+ // <--
+ SwUndoFmtAttr( const SfxPoolItem& rItem,
+ SwFmt& rFmt,
+ bool bSaveDrawPt = true );
+ virtual ~SwUndoFmtAttr();
+ virtual void Undo( SwUndoIter& );
+ // --> OD 2004-10-26 #i35443# - <Redo(..)> calls <Undo(..)> - nothing else
+ virtual void Redo( SwUndoIter& );
+ // <--
+ virtual void Repeat( SwUndoIter& );
+ virtual SwRewriter GetRewriter() const;
+
+ void PutAttr( const SfxPoolItem& rItem );
+ SwFmt* GetFmt( SwDoc& rDoc ); // checks if it is still in the Doc!
+};
+
+// --> OD 2008-02-12 #newlistlevelattrs#
+class SwUndoFmtResetAttr : public SwUndo
+{
+ public:
+ SwUndoFmtResetAttr( SwFmt& rChangedFormat,
+ const USHORT nWhichId );
+ ~SwUndoFmtResetAttr();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ private:
+ // format at which a certain attribute is reset.
+ SwFmt * const m_pChangedFormat;
+ // which ID of the reset attribute
+ const USHORT m_nWhichId;
+ // old attribute which has been reset - needed for undo.
+ ::std::auto_ptr<SfxPoolItem> m_pOldItem;
+};
+// <--
+
+class SwUndoDontExpandFmt : public SwUndo
+{
+ const ULONG m_nNodeIndex;
+ const xub_StrLen m_nContentIndex;
+
+public:
+ SwUndoDontExpandFmt( const SwPosition& rPos );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+};
+
+// helper class to receive changed attribute sets
+class SwUndoFmtAttrHelper : public SwClient
+{
+ ::std::auto_ptr<SwUndoFmtAttr> m_pUndo;
+ const bool m_bSaveDrawPt;
+
+public:
+ SwUndoFmtAttrHelper( SwFmt& rFmt, bool bSaveDrawPt = true );
+
+ virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+
+ SwUndoFmtAttr* GetUndo() const { return m_pUndo.get(); }
+ // release the undo object (so it is not deleted here), and return it
+ SwUndoFmtAttr* ReleaseUndo() { return m_pUndo.release(); }
+};
+
+
+class SwUndoFmtColl : public SwUndo, private SwUndRng
+{
+ String aFmtName;
+ SwHistory* pHistory;
+ SwFmtColl* pFmtColl;
+ // --> OD 2008-04-15 #refactorlists# - for correct <ReDo(..)> and <Repeat(..)>
+ // boolean, which indicates that the attributes are reseted at the nodes
+ // before the format has been applied.
+ const bool mbReset;
+ // boolean, which indicates that the list attributes had been reseted at
+ // the nodes before the format has been applied.
+ const bool mbResetListAttrs;
+ // <--
+public:
+ // --> OD 2008-04-15 #refactorlists#
+// SwUndoFmtColl( const SwPaM&, SwFmtColl* );
+ SwUndoFmtColl( const SwPaM&, SwFmtColl*,
+ const bool bReset,
+ const bool bResetListAttrs );
+ // <--
+ virtual ~SwUndoFmtColl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns the rewriter for this undo object.
+
+ The rewriter contains one rule:
+
+ $1 -> <name of format collection>
+
+ <name of format collection> is the name of the format
+ collection that is applied by the action recorded by this undo
+ object.
+
+ @return the rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ SwHistory* GetHistory() { return pHistory; }
+
+};
+
+
+class SwUndoMoveLeftMargin : public SwUndo, private SwUndRng
+{
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ const bool m_bModulus;
+
+public:
+ SwUndoMoveLeftMargin( const SwPaM&, BOOL bRight, BOOL bModulus );
+ virtual ~SwUndoMoveLeftMargin();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+
+};
+
+// Basis-Klasse fuer Insert von Dokument, Glossaries und Kopieren
+class SwUndoInserts : public SwUndo, public SwUndRng, private SwUndoSaveCntnt
+{
+ SwTxtFmtColl *pTxtFmtColl, *pLastNdColl;
+ SvPtrarr* pFrmFmts;
+ SwUndos* pFlyUndos;
+ SwRedlineData* pRedlData;
+ BOOL bSttWasTxtNd;
+protected:
+ ULONG nNdDiff;
+ SwPosition *pPos; // Inhalt fuers Redo
+ USHORT nSetPos; // Start in der History-Liste
+
+ SwUndoInserts( SwUndoId nUndoId, const SwPaM& );
+public:
+ virtual ~SwUndoInserts();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ // setze den Destination-Bereich nach dem Einlesen.
+ void SetInsertRange( const SwPaM&, BOOL bScanFlys = TRUE,
+ BOOL bSttWasTxtNd = TRUE );
+};
+
+class SwUndoInsDoc : public SwUndoInserts
+{
+public:
+ SwUndoInsDoc( const SwPaM& );
+};
+
+class SwUndoCpyDoc : public SwUndoInserts
+{
+public:
+ SwUndoCpyDoc( const SwPaM& );
+};
+
+class SwUndoInsTbl : public SwUndo
+{
+ String sTblNm;
+ SwInsertTableOptions aInsTblOpts;
+ SwDDEFieldType* pDDEFldType;
+ SvUShorts* pColWidth;
+ SwRedlineData* pRedlData;
+ SwTableAutoFmt* pAutoFmt;
+ ULONG nSttNode;
+ USHORT nRows, nCols;
+ USHORT nAdjust;
+
+public:
+ SwUndoInsTbl( const SwPosition&, USHORT nCols, USHORT nRows,
+ USHORT eAdjust, const SwInsertTableOptions& rInsTblOpts,
+ const SwTableAutoFmt* pTAFmt, const SvUShorts* pColArr,
+ const String & rName);
+ virtual ~SwUndoInsTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ virtual SwRewriter GetRewriter() const;
+
+};
+
+class SwUndoTxtToTbl : public SwUndo, public SwUndRng
+{
+ String sTblNm;
+ SwInsertTableOptions aInsTblOpts;
+ SvULongs* pDelBoxes;
+ SwTableAutoFmt* pAutoFmt;
+ SwHistory* pHistory;
+ sal_Unicode cTrenner;
+ USHORT nAdjust;
+ BOOL bSplitEnd : 1;
+
+public:
+ SwUndoTxtToTbl( const SwPaM&, const SwInsertTableOptions&, sal_Unicode , USHORT,
+ const SwTableAutoFmt* pAFmt );
+ virtual ~SwUndoTxtToTbl();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ SwHistory& GetHistory(); // wird ggfs. angelegt
+ void AddFillBox( const SwTableBox& rBox );
+};
+
+class SwUndoTblToTxt : public SwUndo
+{
+ String sTblNm;
+ SwDDEFieldType* pDDEFldType;
+ _SaveTable* pTblSave;
+ SwTblToTxtSaves* pBoxSaves;
+ SwHistory* pHistory;
+ ULONG nSttNd, nEndNd;
+ USHORT nAdjust;
+ sal_Unicode cTrenner;
+ USHORT nHdlnRpt;
+ BOOL bCheckNumFmt : 1;
+
+public:
+ SwUndoTblToTxt( const SwTable& rTbl, sal_Unicode cCh );
+ virtual ~SwUndoTblToTxt();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ void SetRange( const SwNodeRange& );
+ void AddBoxPos( SwDoc& rDoc, ULONG nNdIdx, ULONG nEndIdx,
+ xub_StrLen nCntntIdx = STRING_MAXLEN);
+};
+
+class SwUndoAttrTbl : public SwUndo
+{
+ ULONG nSttNode;
+ _SaveTable* pSaveTbl;
+ BOOL bClearTabCol : 1;
+public:
+ SwUndoAttrTbl( const SwTableNode& rTblNd, BOOL bClearTabCols = FALSE );
+ virtual ~SwUndoAttrTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+class SwUndoTblAutoFmt : public SwUndo
+{
+ ULONG nSttNode;
+ _SaveTable* pSaveTbl;
+ SwUndos* pUndos;
+ BOOL bSaveCntntAttr;
+
+ void UndoRedo( BOOL bUndo, SwUndoIter& rUndoIter );
+
+public:
+ SwUndoTblAutoFmt( const SwTableNode& rTblNd, const SwTableAutoFmt& );
+ virtual ~SwUndoTblAutoFmt();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ void SaveBoxCntnt( const SwTableBox& rBox );
+};
+
+class SwUndoTblNdsChg : public SwUndo
+{
+ _SaveTable* pSaveTbl;
+ SvULongs aBoxes;
+
+ union {
+ SvULongs* pNewSttNds;
+ SwUndoSaveSections* pDelSects;
+ } Ptrs;
+ SvBools aMvBoxes; // fuers SplitRow (aufgeteilte Nodes einer Box)
+ long nMin, nMax; // for redo of delete column
+ ULONG nSttNode, nCurrBox;
+ USHORT nCount, nRelDiff, nAbsDiff, nSetColType;
+ BOOL bFlag;
+ BOOL bSameHeight; // only used for SplitRow
+public:
+ SwUndoTblNdsChg( SwUndoId UndoId,
+ const SwSelBoxes& rBoxes,
+ const SwTableNode& rTblNd,
+ long nMn, long nMx,
+ USHORT nCnt, BOOL bFlg, BOOL bSameHeight );
+
+ // fuer SetColWidth
+ SwUndoTblNdsChg( SwUndoId UndoId, const SwSelBoxes& rBoxes,
+ const SwTableNode& rTblNd );
+
+ virtual ~SwUndoTblNdsChg();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld );
+ void SaveNewBoxes( const SwTableNode& rTblNd, const SwTableSortBoxes& rOld,
+ const SwSelBoxes& rBoxes, const SvULongs& rNodeCnts );
+ void SaveSection( SwStartNode* pSttNd );
+ void ReNewBoxes( const SwSelBoxes& rBoxes );
+
+
+ void SetColWidthParam( ULONG nBoxIdx, USHORT nMode, USHORT nType,
+ SwTwips nAbsDif, SwTwips nRelDif )
+ {
+ nCurrBox = nBoxIdx;
+ nCount = nMode;
+ nSetColType = nType;
+ nAbsDiff = (USHORT)nAbsDif;
+ nRelDiff = (USHORT)nRelDif;
+ }
+
+};
+
+class SwUndoTblMerge : public SwUndo, private SwUndRng
+{
+ ULONG nTblNode;
+ _SaveTable* pSaveTbl;
+ SvULongs aBoxes, aNewSttNds;
+ SwUndoMoves* pMoves;
+ SwHistory* pHistory;
+
+public:
+ SwUndoTblMerge( const SwPaM& rTblSel );
+ virtual ~SwUndoTblMerge();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void MoveBoxCntnt( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& rPos );
+
+ void SetSelBoxes( const SwSelBoxes& rBoxes );
+
+ void AddNewBox( ULONG nSttNdIdx )
+ { aNewSttNds.Insert( nSttNdIdx, aNewSttNds.Count() ); }
+
+ void SaveCollection( const SwTableBox& rBox );
+
+};
+
+
+class SwUndoTblNumFmt : public SwUndo
+{
+ SfxItemSet *pBoxSet;
+ SwHistory* pHistory;
+ String aStr, aNewFml;
+
+ ULONG nFmtIdx, nNewFmtIdx;
+ double fNum, fNewNum;
+ ULONG nNode;
+ ULONG nNdPos;
+
+ BOOL bNewFmt : 1;
+ BOOL bNewFml : 1;
+ BOOL bNewValue : 1;
+
+public:
+ SwUndoTblNumFmt( const SwTableBox& rBox, const SfxItemSet* pNewSet = 0 );
+ virtual ~SwUndoTblNumFmt();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void SetNumFmt( ULONG nNewNumFmtIdx, const double& rNewNumber )
+ { nFmtIdx = nNewNumFmtIdx; fNum = rNewNumber; }
+ void SetBox( const SwTableBox& rBox );
+};
+
+class _UndoTblCpyTbl_Entries;
+
+class SwUndoTblCpyTbl : public SwUndo
+{
+ _UndoTblCpyTbl_Entries* pArr;
+ SwUndoTblNdsChg* pInsRowUndo;
+
+ //b6341295: When redlining is active, PrepareRedline has to create the redlining attributes
+ //for the new and the old table cell content
+ SwUndo* PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox, const SwPosition& rPos,
+ bool& rJoin, bool bRedo );
+public:
+ SwUndoTblCpyTbl();
+ virtual ~SwUndoTblCpyTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void AddBoxBefore( const SwTableBox& rBox, BOOL bDelCntnt );
+ void AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex& rIdx, BOOL bDelCntnt );
+
+ BOOL IsEmpty() const;
+ BOOL InsertRow( SwTable& rTbl, const SwSelBoxes& rBoxes, USHORT nCnt );
+};
+
+class SwUndoCpyTbl : public SwUndo
+{
+ SwUndoDelete* pDel;
+ ULONG nTblNode;
+public:
+ SwUndoCpyTbl();
+ virtual ~SwUndoCpyTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void SetTableSttIdx( ULONG nIdx ) { nTblNode = nIdx; }
+};
+
+class SwUndoSplitTbl : public SwUndo
+{
+ ULONG nTblNode, nOffset;
+ SwSaveRowSpan* mpSaveRowSpan; // stores the row span values at the splitting row
+ _SaveTable* pSavTbl;
+ SwHistory* pHistory;
+ USHORT nMode, nFmlEnd;
+ BOOL bCalcNewSize;
+public:
+ SwUndoSplitTbl( const SwTableNode& rTblNd, SwSaveRowSpan* pRowSp, USHORT nMode, BOOL bCalcNewSize );
+ virtual ~SwUndoSplitTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ void SetTblNodeOffset( ULONG nIdx ) { nOffset = nIdx - nTblNode; }
+ SwHistory* GetHistory() { return pHistory; }
+ void SaveFormula( SwHistory& rHistory );
+};
+
+class SwUndoMergeTbl : public SwUndo
+{
+ String aName;
+ ULONG nTblNode;
+ _SaveTable* pSavTbl, *pSavHdl;
+ SwHistory* pHistory;
+ USHORT nMode;
+ BOOL bWithPrev;
+public:
+ SwUndoMergeTbl( const SwTableNode& rTblNd, const SwTableNode& rDelTblNd,
+ BOOL bWithPrev, USHORT nMode );
+ virtual ~SwUndoMergeTbl();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ void SaveFormula( SwHistory& rHistory );
+};
+
+
+class SwUndoBookmark : public SwUndo
+{
+ const ::std::auto_ptr<SwHistoryBookmark> m_pHistoryBookmark;
+
+protected:
+ SwUndoBookmark( SwUndoId nUndoId, const ::sw::mark::IMark& );
+
+ void SetInDoc( SwDoc* );
+ void ResetInDoc( SwDoc* );
+
+public:
+ virtual ~SwUndoBookmark();
+
+ // #111827#
+ /**
+ Returns the rewriter for this undo object.
+
+ The rewriter contains the following rule:
+
+ $1 -> <name of bookmark>
+
+ <name of bookmark> is the name of the bookmark whose
+ insertion/deletion is recorded by this undo object.
+
+ @return the rewriter for this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+};
+
+
+class SwUndoInsBookmark : public SwUndoBookmark
+{
+public:
+ SwUndoInsBookmark( const ::sw::mark::IMark& );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+
+/*--------------------------------------------------------------------
+ Beschreibung: Undo auf Sorting
+ --------------------------------------------------------------------*/
+
+struct SwSortUndoElement
+{
+ union {
+ struct {
+ ULONG nKenn;
+ ULONG nSource, nTarget;
+ } TXT;
+ struct {
+ String *pSource, *pTarget;
+ } TBL;
+ } SORT_TXT_TBL;
+
+ SwSortUndoElement( const String& aS, const String& aT )
+ {
+ SORT_TXT_TBL.TBL.pSource = new String( aS );
+ SORT_TXT_TBL.TBL.pTarget = new String( aT );
+ }
+ SwSortUndoElement( ULONG nS, ULONG nT )
+ {
+ SORT_TXT_TBL.TXT.nSource = nS;
+ SORT_TXT_TBL.TXT.nTarget = nT;
+ SORT_TXT_TBL.TXT.nKenn = 0xffffffff;
+ }
+ ~SwSortUndoElement();
+};
+
+SV_DECL_PTRARR_DEL(SwSortList, SwSortUndoElement*, 10,30)
+SV_DECL_PTRARR(SwUndoSortList, SwNodeIndex*, 10,30)
+
+class SwUndoSort : public SwUndo, private SwUndRng
+{
+ SwSortOptions* pSortOpt; // die Optionen mit den Sortier-Kriterien
+ SwSortList aSortList;
+ SwUndoAttrTbl* pUndoTblAttr;
+ SwRedlineData* pRedlData;
+ ULONG nTblNd;
+
+ void RemoveIdx( SwPaM& rPam );
+public:
+ SwUndoSort( const SwPaM&, const SwSortOptions& );
+ SwUndoSort( ULONG nStt, ULONG nEnd, const SwTableNode&,
+ const SwSortOptions&, BOOL bSaveTable );
+ virtual ~SwUndoSort();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ void Insert( const String& rOrgPos, const String& rNewPos );
+ void Insert( ULONG nOrgPos, ULONG nNewPos );
+
+};
+
+
+
+//--------------------------------------------------------------------
+
+class SwUndoFlyBase : public SwUndo, private SwUndoSaveSection
+{
+protected:
+ SwFrmFmt* pFrmFmt; // das gespeicherte FlyFormat
+ ULONG nNdPgPos;
+ xub_StrLen nCntPos; // Seite/am Absatz/im Absatz
+ USHORT nRndId;
+ BOOL bDelFmt; // loesche das gespeicherte Format
+
+ void InsFly( SwUndoIter&, BOOL bShowSel = TRUE );
+ void DelFly( SwDoc* );
+
+ SwUndoFlyBase( SwFrmFmt* pFormat, SwUndoId nUndoId );
+
+ SwNodeIndex* GetMvSttIdx() const { return SwUndoSaveSection::GetMvSttIdx(); }
+ ULONG GetMvNodeCnt() const { return SwUndoSaveSection::GetMvNodeCnt(); }
+
+public:
+ virtual ~SwUndoFlyBase();
+
+ virtual void Undo( SwUndoIter& ) = 0;
+ virtual void Redo( SwUndoIter& ) = 0;
+
+};
+
+class SwUndoInsLayFmt : public SwUndoFlyBase
+{
+ ULONG mnCrsrSaveIndexPara; // Cursor position
+ xub_StrLen mnCrsrSaveIndexPos; // for undo
+public:
+ SwUndoInsLayFmt( SwFrmFmt* pFormat, ULONG nNodeIdx, xub_StrLen nCntIdx );
+ ~SwUndoInsLayFmt();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ String GetComment() const;
+
+};
+
+class SwUndoDelLayFmt : public SwUndoFlyBase
+{
+ BOOL bShowSelFrm;
+public:
+ SwUndoDelLayFmt( SwFrmFmt* pFormat );
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ void Redo(); // Schnittstelle fuers Rollback
+
+ void ChgShowSel( BOOL bNew ) { bShowSelFrm = bNew; }
+
+ virtual SwRewriter GetRewriter() const;
+
+};
+
+
+class SwUndoSetFlyFmt : public SwUndo, public SwClient
+{
+ SwFrmFmt* pFrmFmt; // das gespeicherte FlyFormat
+ SwFrmFmt* pOldFmt; // die alte Fly Vorlage
+ SwFrmFmt* pNewFmt; // die neue Fly Vorlage
+ SfxItemSet* pItemSet; // die zurueck-/ gesetzten Attribute
+ ULONG nOldNode, nNewNode;
+ xub_StrLen nOldCntnt, nNewCntnt;
+ USHORT nOldAnchorTyp, nNewAnchorTyp;
+ BOOL bAnchorChgd;
+
+ void PutAttr( USHORT nWhich, const SfxPoolItem* pItem );
+ void Modify( SfxPoolItem*, SfxPoolItem* );
+ void GetAnchor( SwFmtAnchor& rAnhor, ULONG nNode, xub_StrLen nCntnt );
+
+public:
+ SwUndoSetFlyFmt( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFrmFmt );
+ virtual ~SwUndoSetFlyFmt();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ virtual SwRewriter GetRewriter() const;
+};
+
+//--------------------------------------------------------------------
+
+class _UnReplaceData;
+SV_DECL_PTRARR_DEL( _UnReplaceDatas, _UnReplaceData*, 10, 25 )
+
+class SwUndoReplace : public SwUndo
+{
+ friend class SwDoc;
+
+ BOOL bOldIterFlag; // Status vom Undo-Iter vorm 1. Aufruf
+ USHORT nAktPos; // fuer GetUndoRange und Undo/Redo
+ _UnReplaceDatas aArr;
+ SwRedlineData* pRedlData;
+
+public:
+ SwUndoReplace();
+ virtual ~SwUndoReplace();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns the rewriter of this undo object.
+
+ If this undo object represents several replacements the
+ rewriter contains the following rules:
+
+ $1 -> <number of replacements>
+ $2 -> occurrences of
+ $3 -> <replaced text>
+
+ If this undo object represents one replacement the rewriter
+ contains these rules:
+
+ $1 -> <replaced text>
+ $2 -> "->" (STR_YIELDS)
+ $3 -> <replacing text>
+
+ @return the rewriter of this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ void AddEntry( const SwPaM& rPam, const String& rInsert, BOOL bRegExp );
+ void SetEntryEnd( const SwPaM& rPam );
+
+ BOOL IsFull() const
+ { return ((USHRT_MAX / sizeof( void* )) - 50 ) < aArr.Count(); }
+
+};
+
+
+//--------------------------------------------------------------------
+
+
+class SwUndoTblHeadline : public SwUndo
+{
+ ULONG nTblNd;
+ USHORT nOldHeadline;
+ USHORT nNewHeadline;
+public:
+ SwUndoTblHeadline( const SwTable&, USHORT nOldHdl, USHORT nNewHdl );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+};
+
+
+//------------ Undo von Insert-/Delete-Sections ----------------------
+
+class SwUndoInsSection : public SwUndo, private SwUndRng
+{
+private:
+ const ::std::auto_ptr<SwSectionData> m_pSectionData;
+ const ::std::auto_ptr<SwTOXBase> m_pTOXBase; /// set iff section is TOX
+ const ::std::auto_ptr<SfxItemSet> m_pAttrSet;
+ ::std::auto_ptr<SwHistory> m_pHistory;
+ ::std::auto_ptr<SwRedlineData> m_pRedlData;
+ ULONG m_nSectionNodePos;
+ bool m_bSplitAtStart : 1;
+ bool m_bSplitAtEnd : 1;
+ bool m_bUpdateFtn : 1;
+
+ void Join( SwDoc& rDoc, ULONG nNode );
+
+public:
+ SwUndoInsSection(SwPaM const&, SwSectionData const&,
+ SfxItemSet const*const pSet, SwTOXBase const*const pTOXBase);
+ virtual ~SwUndoInsSection();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ void SetSectNdPos(ULONG const nPos) { m_nSectionNodePos = nPos; }
+ void SaveSplitNode(SwTxtNode *const pTxtNd, bool const bAtStart);
+ void SetUpdtFtnFlag(bool const bFlag) { m_bUpdateFtn = bFlag; }
+};
+
+SW_DLLPRIVATE SwUndo * MakeUndoDelSection(SwSectionFmt const&);
+
+SW_DLLPRIVATE SwUndo * MakeUndoUpdateSection(SwSectionFmt const&, bool const);
+
+
+//------------ Undo von verschieben/stufen von Gliederung ----------------
+
+class SwUndoOutlineLeftRight : public SwUndo, private SwUndRng
+{
+ short nOffset;
+public:
+ SwUndoOutlineLeftRight( const SwPaM& rPam, short nOffset );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoDefaultAttr : public SwUndo
+{
+ ::std::auto_ptr<SfxItemSet> m_pOldSet; // the old attributes
+ ::std::auto_ptr<SvxTabStopItem> m_pTabStop;
+
+public:
+ // registers at the format and saves old attributes
+ SwUndoDefaultAttr( const SfxItemSet& rOldSet );
+ virtual ~SwUndoDefaultAttr();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+//--------------------------------------------------------------------
+// ---------- Undo fuer Numerierung ----------------------------------
+
+class SwUndoInsNum : public SwUndo, private SwUndRng
+{
+ SwNumRule aNumRule;
+ SwHistory* pHistory;
+ ULONG nSttSet;
+ SwNumRule* pOldNumRule;
+ String sReplaceRule;
+ USHORT nLRSavePos;
+public:
+ SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule );
+ SwUndoInsNum( const SwNumRule& rOldRule, const SwNumRule& rNewRule,
+ SwUndoId nUndoId = UNDO_INSFMTATTR );
+ SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule,
+ const String& rReplaceRule );
+ virtual ~SwUndoInsNum();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ virtual SwRewriter GetRewriter() const;
+
+ SwHistory* GetHistory(); // wird ggfs. neu angelegt!
+ void SetSttNum( ULONG nNdIdx ) { nSttSet = nNdIdx; }
+ void SaveOldNumRule( const SwNumRule& rOld );
+
+ void SetLRSpaceEndPos();
+
+};
+
+class SwUndoDelNum : public SwUndo, private SwUndRng
+{
+ SvULongs aNodeIdx;
+ SvBytes aLevels;
+ SvBools aRstLRSpaces;
+ SwHistory* pHistory;
+public:
+ SwUndoDelNum( const SwPaM& rPam );
+ virtual ~SwUndoDelNum();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ void AddNode( const SwTxtNode& rNd, BOOL bResetLRSpace );
+ SwHistory* GetHistory() { return pHistory; }
+
+};
+
+class SwUndoMoveNum : public SwUndo, private SwUndRng
+{
+ ULONG nNewStt;
+ long nOffset;
+public:
+ SwUndoMoveNum( const SwPaM& rPam, long nOffset, BOOL bIsOutlMv = FALSE );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+ void SetStartNode( ULONG nValue ) { nNewStt = nValue; }
+};
+
+class SwUndoNumUpDown : public SwUndo, private SwUndRng
+{
+ short nOffset;
+public:
+ SwUndoNumUpDown( const SwPaM& rPam, short nOffset );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+};
+
+class SwUndoNumOrNoNum : public SwUndo
+{
+ ULONG nIdx;
+ BOOL mbNewNum, mbOldNum;
+
+public:
+ SwUndoNumOrNoNum( const SwNodeIndex& rIdx, BOOL mbOldNum,
+ BOOL mbNewNum );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+};
+
+class SwUndoNumRuleStart : public SwUndo
+{
+ ULONG nIdx;
+ USHORT nOldStt, nNewStt;
+ BOOL bSetSttValue : 1;
+ BOOL bFlag : 1;
+public:
+ SwUndoNumRuleStart( const SwPosition& rPos, BOOL bDelete );
+ SwUndoNumRuleStart( const SwPosition& rPos, USHORT nStt );
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+};
+
+//--------------------------------------------------------------------
+// ---------- Undo fuer DrawObjecte ----------------------------------
+
+class SwSdrUndo : public SwUndo
+{
+ SdrUndoAction* pSdrUndo;
+ SdrMarkList* pMarkList; // MarkList for all selected SdrObjects
+public:
+ SwSdrUndo( SdrUndoAction* , const SdrMarkList* pMarkList );
+ virtual ~SwSdrUndo();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ String GetComment() const;
+};
+
+class SwUndoDrawGroup : public SwUndo
+{
+ SwUndoGroupObjImpl* pObjArr;
+ USHORT nSize;
+ BOOL bDelFmt;
+
+public:
+ SwUndoDrawGroup( USHORT nCnt );
+ virtual ~SwUndoDrawGroup();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void AddObj( USHORT nPos, SwDrawFrmFmt*, SdrObject* );
+ void SetGroupFmt( SwDrawFrmFmt* );
+};
+
+// --> OD 2006-11-01 #130889#
+// Action "ungroup drawing object" is now splitted into three parts - see
+// method <SwDoc::UnGroupSelection(..)>:
+// - creation for <SwDrawFrmFmt> instances for the group members of the
+// selected group objects
+// - intrinsic ungroup of the selected group objects
+// - creation of <SwDrawContact> instances for the former group members and
+// connection to the Writer layout.
+// Thus, two undo actions (instances of <SwUndo>) are needed:
+// - Existing class <SwUndoDrawUnGroup> takes over the part for the formats.
+// - New class <SwUndoDrawUnGroupConnectToLayout> takes over the part for
+// contact object.
+class SwUndoDrawUnGroup : public SwUndo
+{
+ SwUndoGroupObjImpl* pObjArr;
+ USHORT nSize;
+ BOOL bDelFmt;
+
+public:
+ SwUndoDrawUnGroup( SdrObjGroup* );
+ virtual ~SwUndoDrawUnGroup();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void AddObj( USHORT nPos, SwDrawFrmFmt* );
+};
+
+// --> OD 2006-11-01 #130889#
+class SwUndoDrawUnGroupConnectToLayout : public SwUndo
+{
+ private:
+ std::vector< std::pair< SwDrawFrmFmt*, SdrObject* > > aDrawFmtsAndObjs;
+
+ public:
+ SwUndoDrawUnGroupConnectToLayout();
+ virtual ~SwUndoDrawUnGroupConnectToLayout();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void AddFmtAndObj( SwDrawFrmFmt* pDrawFrmFmt,
+ SdrObject* pDrawObject );
+};
+// <--
+
+
+class SwUndoDrawDelete : public SwUndo
+{
+ SwUndoGroupObjImpl* pObjArr;
+ SdrMarkList* pMarkLst; // MarkList for all selected SdrObjects
+ USHORT nSize;
+ BOOL bDelFmt;
+
+public:
+ SwUndoDrawDelete( USHORT nCnt );
+ virtual ~SwUndoDrawDelete();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ void AddObj( USHORT nPos, SwDrawFrmFmt*, const SdrMark& );
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoReRead : public SwUndo
+{
+ Graphic *pGrf;
+ String *pNm, *pFltr;
+ ULONG nPos;
+ USHORT nMirr;
+
+ void SaveGraphicData( const SwGrfNode& );
+ void SetAndSave( SwUndoIter& );
+
+public:
+ SwUndoReRead( const SwPaM& rPam, const SwGrfNode& pGrfNd );
+ virtual ~SwUndoReRead();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoInsertLabel : public SwUndo
+{
+ union {
+ struct {
+ // fuer NoTxtFrms
+ SwUndoInsLayFmt* pUndoFly;
+ SwUndoFmtAttr* pUndoAttr;
+ } OBJECT;
+ struct {
+ // fuer Tabelle/TextRahmen
+ SwUndoDelete* pUndoInsNd;
+ ULONG nNode;
+ } NODE;
+ };
+
+ String sText;
+ // --> PB 2005-01-06 #i39983# - the separator will be drawed with a character style
+ String sSeparator;
+ // <--
+ String sNumberSeparator;
+ String sCharacterStyle;
+ // OD 2004-04-15 #i26791# - re-store of drawing object position no longer needed
+ USHORT nFldId;
+ SwLabelType eType;
+ BYTE nLayerId; // fuer Zeichen-Objekte
+ BOOL bBefore :1;
+ BOOL bUndoKeep :1;
+ BOOL bCpyBrd :1;
+
+public:
+ SwUndoInsertLabel( const SwLabelType eTyp, const String &rText,
+ // --> PB 2005-01-06 #i39983# - the separator will be drawed with a character style
+ const String& rSeparator,
+ // <--
+ const String& rNumberSeparator, //#i61007# order of captions
+ const BOOL bBefore, const USHORT nId,
+ const String& rCharacterStyle,
+ const BOOL bCpyBrd );
+ virtual ~SwUndoInsertLabel();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ // #111827#
+ /**
+ Returns the rewriter of this undo object.
+
+ The rewriter contains this rule:
+
+ $1 -> '<text of inserted label>'
+
+ <text of inserted label> is shortened to nUndoStringLength
+ characters.
+
+ @return the rewriter of this undo object
+ */
+ virtual SwRewriter GetRewriter() const;
+
+ void SetNodePos( ULONG nNd )
+ { if( LTYPE_OBJECT != eType ) NODE.nNode = nNd; }
+
+ void SetUndoKeep() { bUndoKeep = TRUE; }
+ void SetFlys( SwFrmFmt& rOldFly, SfxItemSet& rChgSet, SwFrmFmt& rNewFly );
+ void SetDrawObj( BYTE nLayerId );
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoChangeFootNote : public SwUndo, private SwUndRng
+{
+ const ::std::auto_ptr<SwHistory> m_pHistory;
+ const String m_Text;
+ const USHORT m_nNumber;
+ const bool m_bEndNote;
+
+public:
+ SwUndoChangeFootNote( const SwPaM& rRange, const String& rTxt,
+ USHORT nNum, bool bIsEndNote );
+ virtual ~SwUndoChangeFootNote();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+ virtual void Repeat( SwUndoIter& );
+
+ SwHistory& GetHistory() { return *m_pHistory; }
+};
+
+class SwUndoFootNoteInfo : public SwUndo
+{
+ ::std::auto_ptr<SwFtnInfo> m_pFootNoteInfo;
+
+public:
+ SwUndoFootNoteInfo( const SwFtnInfo &rInfo );
+ virtual ~SwUndoFootNoteInfo();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+class SwUndoEndNoteInfo : public SwUndo
+{
+ ::std::auto_ptr<SwEndNoteInfo> m_pEndNoteInfo;
+
+public:
+ SwUndoEndNoteInfo( const SwEndNoteInfo &rInfo );
+ virtual ~SwUndoEndNoteInfo();
+
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+
+//--------------------------------------------------------------------
+
+struct _UndoTransliterate_Data;
+class SwUndoTransliterate : public SwUndo, public SwUndRng
+{
+ _UndoTransliterate_Data *pData, *pLastData;
+ sal_uInt32 nType;
+
+public:
+ SwUndoTransliterate( const SwPaM& rPam,
+ const utl::TransliterationWrapper& rTrans );
+ virtual ~SwUndoTransliterate();
+
+ virtual void Undo( SwUndoIter& rUndoIter );
+ virtual void Redo( SwUndoIter& rUndoIter );
+ virtual void Repeat( SwUndoIter& rUndoIter );
+
+ void AddChanges( SwTxtNode& rTNd, xub_StrLen nStart, xub_StrLen nLen,
+ ::com::sun::star::uno::Sequence <sal_Int32>& rOffsets );
+ BOOL HasData() const {return 0 != pData; }
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoRedline : public SwUndo, public SwUndRng
+{
+protected:
+ SwRedlineData* pRedlData;
+ SwRedlineSaveDatas* pRedlSaveData;
+ SwUndoId nUserId;
+ BOOL bHiddenRedlines;
+
+ virtual void _Undo( SwUndoIter& );
+ virtual void _Redo( SwUndoIter& );
+
+public:
+ SwUndoRedline( SwUndoId nUserId, const SwPaM& rRange );
+ virtual ~SwUndoRedline();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+
+ SwUndoId GetUserId() const { return nUserId; }
+ USHORT GetRedlSaveCount() const
+ { return pRedlSaveData ? pRedlSaveData->Count() : 0; }
+};
+
+class SwUndoRedlineDelete : public SwUndoRedline
+{
+ BOOL bCanGroup : 1;
+ BOOL bIsDelim : 1;
+ BOOL bIsBackspace : 1;
+
+ virtual void _Undo( SwUndoIter& );
+ virtual void _Redo( SwUndoIter& );
+
+public:
+ SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUserId = UNDO_EMPTY );
+
+ BOOL CanGrouping( const SwUndoRedlineDelete& rPrev );
+};
+
+class SwUndoRedlineSort : public SwUndoRedline
+{
+ SwSortOptions* pOpt;
+ ULONG nSaveEndNode, nOffset;
+ xub_StrLen nSaveEndCntnt;
+
+ virtual void _Undo( SwUndoIter& );
+ virtual void _Redo( SwUndoIter& );
+
+public:
+ SwUndoRedlineSort( const SwPaM& rRange, const SwSortOptions& rOpt );
+ virtual ~SwUndoRedlineSort();
+ virtual void Repeat( SwUndoIter& );
+
+ void SetSaveRange( const SwPaM& rRange );
+ void SetOffset( const SwNodeIndex& rIdx );
+};
+
+class SwUndoAcceptRedline : public SwUndoRedline
+{
+ virtual void _Redo( SwUndoIter& );
+public:
+ SwUndoAcceptRedline( const SwPaM& rRange );
+ virtual void Repeat( SwUndoIter& );
+};
+
+class SwUndoRejectRedline : public SwUndoRedline
+{
+ virtual void _Redo( SwUndoIter& );
+public:
+ SwUndoRejectRedline( const SwPaM& rRange );
+ virtual void Repeat( SwUndoIter& );
+};
+
+//--------------------------------------------------------------------
+
+class SwUndoCompDoc : public SwUndo, public SwUndRng
+{
+ SwRedlineData* pRedlData;
+ SwUndoDelete* pUnDel, *pUnDel2;
+ SwRedlineSaveDatas* pRedlSaveData;
+ BOOL bInsert;
+public:
+ SwUndoCompDoc( const SwPaM& rRg, BOOL bIns );
+ SwUndoCompDoc( const SwRedline& rRedl );
+
+ virtual ~SwUndoCompDoc();
+ virtual void Undo( SwUndoIter& );
+ virtual void Redo( SwUndoIter& );
+};
+
+
+//--------------------------------------------------------------------
+
+// Object der als Iterator durch die Undo-Liste laeuft, bis die
+// letze oder die angegebene Klammerung/Id erreicht ist.
+
+class SwUndoIter
+{
+ friend class SwDoc; // um im SwDoc::Undo bWeiter zu stezen
+ friend void SwUndoEnd::Undo( SwUndoIter& );
+ friend void SwUndoStart::Undo( SwUndoIter& );
+ friend void SwUndoEnd::Redo( SwUndoIter& );
+ friend void SwUndoStart::Redo( SwUndoIter& );
+ friend void SwUndoEnd::Repeat( SwUndoIter& );
+ friend void SwUndoStart::Repeat( SwUndoIter& );
+ friend void SwUndoReplace::Undo( SwUndoIter& );
+ friend void SwUndoReplace::Redo( SwUndoIter& );
+
+ SwUndoId nUndoId;
+ USHORT nEndCnt;
+ BOOL bWeiter : 1;
+ BOOL bUpdateAttr : 1; // Setze das GCAttr an der CursorShell
+
+public:
+ SwPaM * pAktPam; // Member fuer das Undo
+ SwUndo* pLastUndoObj; // fuers Redo, das vorherige UndoObj.
+ SwFrmFmt* pSelFmt; // ggfs. das Format Rahmen/Object-Selektionen
+ SdrMarkList* pMarkList; // MarkList for all selected SdrObjects
+
+ SwUndoIter( SwPaM * pPam, SwUndoId nId = UNDO_EMPTY );
+
+ BOOL IsNextUndo() const { return bWeiter; }
+ BOOL IsUpdateAttr() const { return bUpdateAttr; }
+ void SetUpdateAttr( BOOL bNew ) { bUpdateAttr = bNew; }
+
+ inline SwDoc& GetDoc() const;
+ SwUndoId GetId() const { return nUndoId; }
+ SwUndoId GetLastUndoId() const
+ { return pLastUndoObj ? pLastUndoObj->GetId() : UNDO_EMPTY ; }
+ void ClearSelections() { pSelFmt = 0; pMarkList = 0; }
+};
+
+
+// -> #111827#
+const int nUndoStringLength = 20;
+
+/**
+ Shortens a string to a maximum length.
+
+ @param rStr the string to be shortened
+ @param nLength the maximum length for rStr
+ @param rFillStr string to replace cut out characters with
+
+ If rStr has less than nLength characters it will be returned unaltered.
+
+ If rStr has more than nLength characters the following algorithm
+ generates the shortened string:
+
+ frontLength = (nLength - length(rFillStr)) / 2
+ rearLength = nLength - length(rFillStr) - frontLength
+ shortenedString = concat(<first frontLength characters of rStr,
+ rFillStr,
+ <last rearLength characters of rStr>)
+
+ Preconditions:
+ - nLength - length(rFillStr) >= 2
+
+ @return the shortened string
+ */
+String ShortenString(const String & rStr, xub_StrLen nLength, const String & rFillStr);
+// <- #111827#
+
+// #16487#
+/**
+ Denotes special characters in a string.
+
+ The rStr is split into parts containing special characters and
+ parts not containing special characters. In a part containing
+ special characters all characters are equal. These parts are
+ maximal.
+
+ @param rStr the string to denote in
+
+ The resulting string is generated by concatenating the found
+ parts. The parts without special characters are surrounded by
+ "'". The parts containing special characters are denoted as "n x",
+ where n is the length of the part and x is the representation of
+ the special character (i. e. "tab(s)").
+
+ @return the denoted string
+*/
+String DenoteSpecialCharacters(const String & rStr);
+
+#endif
diff --git a/sw/inc/unoatxt.hxx b/sw/inc/unoatxt.hxx
new file mode 100644
index 000000000000..3a072b9ff5b0
--- /dev/null
+++ b/sw/inc/unoatxt.hxx
@@ -0,0 +1,306 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOATXT_HXX
+#define _UNOATXT_HXX
+
+#include <com/sun/star/text/XAutoTextGroup.hpp>
+#include <com/sun/star/text/XAutoTextEntry.hpp>
+#include <com/sun/star/text/XAutoTextContainer.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/document/XEventsSupplier.hpp>
+#include <svl/itemprop.hxx>
+#include <svl/lstner.hxx>
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <cppuhelper/implbase5.hxx> // helper for implementations
+#include <cppuhelper/implbase6.hxx> // helper for implementations
+#include <svtools/unoevent.hxx>
+class SwTextBlocks;
+class SwGlossaries;
+class SwDoc;
+class SwDocShell;
+class SwXBodyText;
+
+#ifndef SW_DECL_SWDOCSHELL_DEFINED
+#define SW_DECL_SWDOCSHELL_DEFINED
+#include <tools/ref.hxx>
+SV_DECL_REF( SwDocShell )
+#endif
+
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL SwXAutoTextContainer_createInstance(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & ) throw ( ::com::sun::star::uno::Exception );
+
+class SwXAutoTextContainer : public cppu::WeakImplHelper3
+<
+ ::com::sun::star::text::XAutoTextContainer,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XIndexAccess
+>
+{
+ SwGlossaries *pGlossaries;
+
+protected:
+ virtual ~SwXAutoTextContainer(); // ref-counted objects are not to be deleted from outside -> protected dtor
+
+public:
+ SwXAutoTextContainer();
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XAutoTextContainer
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextGroup > SAL_CALL insertNewByName(const rtl::OUString& aGroupName) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeByName(const rtl::OUString& aGroupName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+/* -----------------26.05.98 15:55-------------------
+ *
+ * --------------------------------------------------*/
+class SwXAutoTextGroup : public cppu::WeakImplHelper6
+<
+ ::com::sun::star::text::XAutoTextGroup,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XUnoTunnel
+>
+{
+ const SfxItemPropertySet* pPropSet;
+ SwGlossaries* pGlossaries;
+ rtl::OUString sName;
+ String m_sGroupName; // prefix m_ to disambiguate from some local vars in the implementation
+
+protected:
+ virtual ~SwXAutoTextGroup(); // ref-counted objects are not to be deleted from outside -> protected dtor
+
+public:
+ SwXAutoTextGroup(const rtl::OUString& rName, SwGlossaries* pGloss/*SwTextBlocks* pGroup*/);
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XAutoTextGroup
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getTitles(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL renameByName(const rtl::OUString& aElementName, const rtl::OUString& aNewElementName, const rtl::OUString& aNewElementTitle) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextEntry > SAL_CALL insertNewByName(const rtl::OUString& aName, const rtl::OUString& aTitle, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeByName(const rtl::OUString& aEntryName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException );
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //
+ void Invalidate();
+};
+
+/* -----------------17.06.98 12:03-------------------
+ *
+ * --------------------------------------------------*/
+class SwXAutoTextEntry
+ :public SfxListener
+ ,public cppu::WeakImplHelper5
+ <
+ ::com::sun::star::text::XAutoTextEntry,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::text::XText,
+ ::com::sun::star::document::XEventsSupplier
+ >
+{
+ SwGlossaries* pGlossaries;
+ String sGroupName;
+ String sEntryName;
+ SwDocShellRef xDocSh;
+ SwXBodyText* pBodyText;
+ com::sun::star::uno::Reference < com::sun::star::lang::XServiceInfo> xBodyText;
+
+ void EnsureBodyText ()
+ {
+ if ( !pBodyText )
+ GetBodyText();
+ }
+ void GetBodyText ();
+
+protected:
+ /** ensure that the current content (which may only be in-memory so far) is flushed to the auto text group file
+
+ <p>If somebody modifies an auto text via this class, then this is not directly reflected to the respective
+ glossaries file (on disk), instead we hold a copy of this text (in [p|x]BodyText). On the other hand,
+ in applyTo, we do not work with this _copy_, but just tell the target for the application to insert
+ the content which we're responsible for - and this target doesn't know about our copy, but only
+ about the persistent version.</br>
+ So we need to ensure that before somebody else does something with our auto text, we flush our
+ (in-memory) copy to disk.</p>
+
+ */
+ void implFlushDocument( bool _bCloseDoc = false );
+
+ // SfxListener overridables
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+protected:
+ virtual ~SwXAutoTextEntry(); // ref-counted objects are not to be deleted from outside -> protected dtor
+
+public:
+ SwXAutoTextEntry(SwGlossaries* , const String& rGroupName, const String& rEntryName);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const rtl::OUString& aString, BOOL bAbsorb) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertControlCharacter(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, sal_Int16 nControlCharacter, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insertTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent, BOOL bAbsorb) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeTextContent(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & xContent) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XAutoTextEntry
+ virtual void SAL_CALL applyTo(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange)throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XEventsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw( ::com::sun::star::uno::RuntimeException );
+
+ void Invalidate() {pGlossaries = 0;}
+ const SwGlossaries* GetGlossaries() { return pGlossaries; }
+ const String& GetGroupName() {return sGroupName;}
+ const String& GetEntryName() {return sEntryName;}
+};
+
+
+/** Implement the XNameAccess for the AutoText events */
+class SwAutoTextEventDescriptor : public SvBaseEventDescriptor
+{
+ ::rtl::OUString sSwAutoTextEventDescriptor;
+
+ SwXAutoTextEntry& rAutoTextEntry;
+
+ using SvBaseEventDescriptor::replaceByName;
+ using SvBaseEventDescriptor::getByName;
+
+public:
+ SwAutoTextEventDescriptor( SwXAutoTextEntry& rAutoText );
+
+ ~SwAutoTextEventDescriptor();
+
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+protected:
+
+ virtual void replaceByName(
+ const USHORT nEvent, /// item ID of event
+ const SvxMacro& rMacro) /// event (will be copied)
+ throw(
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void getByName(
+ SvxMacro& rMacro, /// macro to be filled
+ const USHORT nEvent ) /// item ID of event
+ throw(
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+};
+
+
+#endif
diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx
new file mode 100644
index 000000000000..6c12a01b0d47
--- /dev/null
+++ b/sw/inc/unobaseclass.hxx
@@ -0,0 +1,174 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOBASECLASS_HXX
+#define SW_UNOBASECLASS_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+
+
+class SfxPoolItem;
+class SwClient;
+class SwDoc;
+
+
+typedef ::cppu::WeakImplHelper2
+< ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::container::XEnumeration
+>
+SwSimpleEnumeration_Base;
+
+
+/* -----------------29.04.98 07:35-------------------
+ *
+ * --------------------------------------------------*/
+enum CursorType
+{
+ CURSOR_INVALID,
+ CURSOR_BODY,
+ CURSOR_FRAME,
+ CURSOR_TBLTEXT,
+ CURSOR_FOOTNOTE,
+ CURSOR_HEADER,
+ CURSOR_FOOTER,
+ CURSOR_REDLINE,
+ CURSOR_ALL, // for Search&Replace
+ CURSOR_SELECTION, // create a paragraph enumeration from
+ // a text range or cursor
+ CURSOR_SELECTION_IN_TABLE,
+ CURSOR_META, // meta/meta-field
+};
+
+/*-----------------04.03.98 11:54-------------------
+ Start/EndAction or Start/EndAllAction
+ -------------------------------------------------- */
+class UnoActionContext
+{
+ private:
+ SwDoc * m_pDoc;
+
+ public:
+ UnoActionContext(SwDoc *const pDoc);
+ ~UnoActionContext();
+
+ void InvalidateDocument() { m_pDoc = 0; }
+};
+
+/* -----------------07.07.98 12:03-------------------
+ interrupt Actions for a little while
+ -------------------------------------------------- */
+class UnoActionRemoveContext
+{
+ private:
+ SwDoc *const m_pDoc;
+
+ public:
+ UnoActionRemoveContext(SwDoc *const pDoc);
+ ~UnoActionRemoveContext();
+};
+
+
+::com::sun::star::uno::Sequence< sal_Int8 > CreateUnoTunnelId();
+
+/// helper function for implementing SwClient::Modify
+void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+
+#include <boost/utility.hpp>
+#include <osl/diagnose.h>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+
+namespace sw {
+
+ template<typename T> class UnoImplPtr
+ : private ::boost::noncopyable
+ {
+ private:
+ T * m_p;
+
+ public:
+ UnoImplPtr(T *const i_p)
+ : m_p(i_p)
+ {
+ OSL_ENSURE(i_p, "UnoImplPtr: null");
+ }
+
+ ~UnoImplPtr()
+ {
+ ::vos::OGuard g(Application::GetSolarMutex());
+ delete m_p; // #i105557#: call dtor with locked solar mutex
+ m_p = 0;
+ }
+
+ T & operator * () const { return *m_p; }
+
+ T * operator ->() const { return m_p; }
+
+ T * get () const { return m_p; }
+ };
+
+ template< class C > C *
+ UnoTunnelGetImplementation(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XUnoTunnel > const & xUnoTunnel)
+ {
+ if (!xUnoTunnel.is()) { return 0; }
+ C *const pC( reinterpret_cast< C* >(
+ ::sal::static_int_cast< sal_IntPtr >(
+ xUnoTunnel->getSomething(C::getUnoTunnelId()))));
+ return pC;
+ }
+
+ template< class C > sal_Int64
+ UnoTunnelImpl(const ::com::sun::star::uno::Sequence< sal_Int8 > & rId,
+ C *const pThis)
+ {
+ if ((rId.getLength() == 16) &&
+ (0 == rtl_compareMemory(C::getUnoTunnelId().getConstArray(),
+ rId.getConstArray(), 16)))
+ {
+ return ::sal::static_int_cast< sal_Int64 >(
+ reinterpret_cast< sal_IntPtr >(pThis) );
+ }
+ return 0;
+ }
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ GetSupportedServiceNamesImpl(
+ size_t const nServices, char const*const pServices[]);
+ sal_Bool SupportsServiceImpl(
+ size_t const nServices, char const*const pServices[],
+ ::rtl::OUString const & rServiceName);
+
+} // namespace sw
+
+#endif // SW_UNOBASECLASS_HXX
+
diff --git a/sw/inc/unobookmark.hxx b/sw/inc/unobookmark.hxx
new file mode 100644
index 000000000000..fdd5df4c8a6c
--- /dev/null
+++ b/sw/inc/unobookmark.hxx
@@ -0,0 +1,260 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOBOOKMARK_HXX
+#define SW_UNOBOOKMARK_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XFormField.hpp>
+
+#include <cppuhelper/implbase5.hxx>
+
+#include <sfx2/Metadatable.hxx>
+
+#include <unobaseclass.hxx>
+#include <IDocumentMarkAccess.hxx>
+
+
+class SwDoc;
+
+
+typedef ::cppu::ImplInheritanceHelper5
+< ::sfx2::MetadatableMixin
+, ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::container::XNamed
+, ::com::sun::star::text::XTextContent
+> SwXBookmark_Base;
+
+class SwXBookmark
+ : public SwXBookmark_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+protected:
+
+ void attachToRangeEx(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange,
+ IDocumentMarkAccess::MarkType eType)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException );
+ virtual void attachToRange(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ const ::sw::mark::IMark* GetBookmark() const;
+
+ virtual ~SwXBookmark();
+
+ /// @param pDoc and pMark != 0, but not & because of ImplInheritanceHelper
+ SwXBookmark(::sw::mark::IMark *const pMark, SwDoc *const pDoc);
+
+public:
+
+ /// descriptor
+ SwXBookmark();
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent>
+ CreateXBookmark(SwDoc & rDoc, ::sw::mark::IMark & rBookmark);
+
+ /// @return IMark for this, but only if it lives in pDoc
+ static ::sw::mark::IMark const* GetBookmarkInDoc(SwDoc const*const pDoc,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XUnoTunnel> & xUT);
+
+ // MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > GetModel();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& rValue)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XNamed
+ virtual ::rtl::OUString SAL_CALL getName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setName(const ::rtl::OUString& rName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTextContent
+ virtual void SAL_CALL attach(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+class SwXFieldmarkParameters
+ : public ::cppu::WeakImplHelper1< ::com::sun::star::container::XNameContainer>
+ , private SwClient
+{
+ public:
+ SwXFieldmarkParameters(::sw::mark::IFieldmark* const pFieldmark)
+ {
+ pFieldmark->Add(this);
+ }
+
+ // XNameContainer
+ virtual void SAL_CALL insertByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeByName( const ::rtl::OUString& Name ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ // XNameReplace
+ virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ // XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException);
+ //SwClient
+ virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew);
+ private:
+ ::sw::mark::IFieldmark::parameter_map_t* getCoreParameters() throw (::com::sun::star::uno::RuntimeException);
+};
+
+typedef cppu::ImplInheritanceHelper1< SwXBookmark,
+ ::com::sun::star::text::XFormField > SwXFieldmark_Base;
+
+class SwXFieldmark
+ : public SwXFieldmark_Base
+{
+
+private:
+
+ bool isReplacementObject;
+
+public:
+
+ SwXFieldmark(bool isReplacementObject,
+ ::sw::mark::IMark* pBkm = 0, SwDoc* pDoc = 0);
+
+ virtual void attachToRange(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getFieldType(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setFieldType(const ::rtl::OUString& description )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getParameters( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOBOOKMARK_HXX
+
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
new file mode 100644
index 000000000000..eeced6e62c50
--- /dev/null
+++ b/sw/inc/unochart.hxx
@@ -0,0 +1,433 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOCHART_HXX
+#define _UNOCHART_HXX
+
+#include <map>
+#include <set>
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/chart2/data/XDataProvider.hpp>
+#include <com/sun/star/chart2/data/XDataSource.hpp>
+#include <com/sun/star/chart2/data/XDataSequence.hpp>
+#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
+#include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
+#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
+#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
+#include <com/sun/star/chart2/data/DataSequenceRole.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/util/XModifiable.hpp>
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/chart/ChartDataRowSource.hpp>
+
+#include <cppuhelper/interfacecontainer.h> //OMultiTypeInterfaceContainerHelper
+#include <cppuhelper/implbase2.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <cppuhelper/implbase6.hxx> // helper for implementations
+#include <cppuhelper/implbase10.hxx> // helper for implementations
+#include <cppuhelper/weakref.hxx>
+
+#include <tools/string.hxx>
+#include <tools/link.hxx>
+#include <vcl/timer.hxx>
+
+#include <calbck.hxx>
+
+
+class SfxItemPropertySet;
+class SwDoc;
+class SwTable;
+class SwTableBox;
+class SwUnoCrsr;
+struct SwRangeDescriptor;
+class SwSelBoxes;
+class SwFrmFmt;
+
+//////////////////////////////////////////////////////////////////////
+
+sal_Bool FillRangeDescriptor( SwRangeDescriptor &rDesc, const String &rCellRangeName );
+
+//////////////////////////////////////////////////////////////////////
+
+class SwChartHelper
+{
+public:
+ static void DoUpdateAllCharts( SwDoc* pDoc );
+};
+
+//////////////////////////////////////////////////////////////////////
+
+class SwChartLockController_Helper
+{
+ SwDoc *pDoc;
+
+ DECL_LINK( DoUnlockAllCharts, Timer * );
+ Timer aUnlockTimer; // timer to unlock chart controllers
+ bool bIsLocked;
+
+
+ // disallow use of d-tor, copy c-tor and assignment operator
+ SwChartLockController_Helper( const SwChartLockController_Helper & );
+ SwChartLockController_Helper & operator = ( const SwChartLockController_Helper & );
+
+ void LockUnlockAllCharts( sal_Bool bLock );
+ void LockAllCharts() { LockUnlockAllCharts( sal_True ); };
+ void UnlockAllCharts() { LockUnlockAllCharts( sal_False ); };
+
+public:
+ SwChartLockController_Helper( SwDoc *pDocument );
+ ~SwChartLockController_Helper();
+
+ void StartOrContinueLocking();
+ void Disconnect();
+};
+
+//////////////////////////////////////////////////////////////////////
+
+typedef cppu::WeakImplHelper4
+<
+ ::com::sun::star::chart2::data::XDataProvider,
+ ::com::sun::star::chart2::data::XRangeXMLConversion,
+ ::com::sun::star::lang::XComponent,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwChartDataProviderBaseClass;
+
+class SwChartDataProvider :
+ public SwChartDataProviderBaseClass,
+ public SwClient
+{
+
+ // used to keep weak-references to all data-sequences of a single table
+ // see set definition below...
+ struct lt_DataSequenceRef
+ {
+ bool operator()( ::com::sun::star::uno::WeakReference< ::com::sun::star::chart2::data::XDataSequence > xWRef1, ::com::sun::star::uno::WeakReference< ::com::sun::star::chart2::data::XDataSequence > xWRef2 ) const
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > xRef1( xWRef1 );
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > xRef2( xWRef2 );
+ return xRef1.get() < xRef2.get();
+ }
+ };
+ typedef std::set< ::com::sun::star::uno::WeakReference < ::com::sun::star::chart2::data::XDataSequence >, lt_DataSequenceRef > Set_DataSequenceRef_t;
+
+ // map of data-sequence sets for each table
+ struct lt_SwTable_Ptr
+ {
+ bool operator()( const SwTable *p1, const SwTable *p2 ) const
+ {
+ return p1 < p2;
+ }
+ };
+ typedef std::map< const SwTable *, Set_DataSequenceRef_t, lt_SwTable_Ptr > Map_Set_DataSequenceRef_t;
+
+
+ // map of all data-sequences provided directly or indirectly (e.g. via
+ // data-source) by this object. Since there is only one object of this type
+ // for each document it should hold references to all used data-sequences for
+ // all tables of the document.
+ mutable Map_Set_DataSequenceRef_t aDataSequences;
+
+ ::cppu::OInterfaceContainerHelper aEvtListeners;
+ const SwDoc * pDoc;
+ sal_Bool bDisposed;
+
+
+ // disallow use of c-tor and assignment operator
+ SwChartDataProvider( const SwChartDataProvider & );
+ SwChartDataProvider & operator = ( const SwChartDataProvider & );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > SAL_CALL Impl_createDataSource( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments, sal_Bool bTestOnly = sal_False ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL Impl_createDataSequenceByRangeRepresentation( const ::rtl::OUString& aRangeRepresentation, sal_Bool bTestOnly = sal_False ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ rtl::OUString GetBrokenCellRangeForExport( const rtl::OUString &rCellRangeRepresentation );
+
+public:
+ SwChartDataProvider( const SwDoc* pDoc );
+ virtual ~SwChartDataProvider();
+
+ // XDataProvider
+ virtual ::sal_Bool SAL_CALL createDataSourcePossible( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource > SAL_CALL createDataSource( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL detectArguments( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource >& xDataSource ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL createDataSequenceByRangeRepresentationPossible( const ::rtl::OUString& aRangeRepresentation ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL createDataSequenceByRangeRepresentation( const ::rtl::OUString& aRangeRepresentation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XRangeSelection > SAL_CALL getRangeSelection( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XRangeXMLConversion
+ virtual ::rtl::OUString SAL_CALL convertRangeToXML( const ::rtl::OUString& aRangeRepresentation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL convertRangeFromXML( const ::rtl::OUString& aXMLRange ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+
+ void AddDataSequence( const SwTable &rTable, ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > &rxDataSequence );
+ void RemoveDataSequence( const SwTable &rTable, ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > &rxDataSequence );
+
+ // will send modifdied events for all data-sequences of the table
+ void InvalidateTable( const SwTable *pTable );
+ sal_Bool DeleteBox( const SwTable *pTable, const SwTableBox &rBox );
+ void DisposeAllDataSequences( const SwTable *pTable );
+
+ // functionality needed to get notified about new added rows/cols
+ void AddRowCols( const SwTable &rTable, const SwSelBoxes& rBoxes, USHORT nLines, BOOL bBehind );
+};
+
+//////////////////////////////////////////////////////////////////////
+
+typedef cppu::WeakImplHelper2
+<
+ ::com::sun::star::chart2::data::XDataSource,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwChartDataSourceBaseClass;
+
+class SwChartDataSource :
+ public SwChartDataSourceBaseClass
+{
+ com::sun::star::uno::Sequence<
+ com::sun::star::uno::Reference<
+ com::sun::star::chart2::data::XLabeledDataSequence > > aLDS;
+
+ // disallow use of c-tor and assignment operator
+ SwChartDataSource( const SwChartDataSource & );
+ SwChartDataSource & operator = ( const SwChartDataSource & );
+
+public:
+ SwChartDataSource( const com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::chart2::data::XLabeledDataSequence > > &rLDS );
+ virtual ~SwChartDataSource();
+
+ // XDataSource
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+//////////////////////////////////////////////////////////////////////
+
+typedef cppu::WeakImplHelper10
+<
+ ::com::sun::star::chart2::data::XDataSequence,
+ ::com::sun::star::chart2::data::XTextualDataSequence,
+ ::com::sun::star::chart2::data::XNumericalDataSequence,
+ ::com::sun::star::util::XCloneable,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::util::XModifiable,
+ ::com::sun::star::lang::XEventListener,
+ ::com::sun::star::lang::XComponent
+>
+SwChartDataSequenceBaseClass;
+
+class SwChartDataSequence :
+ public SwChartDataSequenceBaseClass,
+ public SwClient
+{
+ ::cppu::OInterfaceContainerHelper aEvtListeners;
+ ::cppu::OInterfaceContainerHelper aModifyListeners;
+ ::com::sun::star::chart2::data::DataSequenceRole aRole;
+
+ String aRowLabelText;
+ String aColLabelText;
+
+ // holds a reference to the data-provider to guarantee it's lifetime last as
+ // long as the pointer may be used.
+ ::com::sun::star::uno::Reference< com::sun::star::chart2::data::XDataProvider > xDataProvider;
+ SwChartDataProvider * pDataProvider;
+
+ SwUnoCrsr* pTblCrsr; // cursor spanned over cells to use
+ SwDepend aCursorDepend; //the cursor is removed after the doc has been removed
+
+ const SfxItemPropertySet* _pPropSet;
+
+ sal_Bool bDisposed;
+
+ // disallow use of c-tor and assignment operator
+ SwChartDataSequence( const SwChartDataSequence &rObj );
+ SwChartDataSequence & operator = ( const SwChartDataSequence & );
+
+public:
+ SwChartDataSequence( SwChartDataProvider &rProvider,
+ SwFrmFmt &rTblFmt,
+ SwUnoCrsr *pTableCursor );
+ virtual ~SwChartDataSequence();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XDataSequence
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getData( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getSourceRangeRepresentation( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL generateLabel( ::com::sun::star::chart2::data::LabelOrigin eLabelOrigin ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex( ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XTextualDataSequence
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getTextualData( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XNumericalDataSequence
+ virtual ::com::sun::star::uno::Sequence< double > SAL_CALL getNumericalData( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XModifiable
+ virtual ::sal_Bool SAL_CALL isModified( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setModified( ::sal_Bool bModified ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
+
+ // XModifyBroadcaster
+ virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ sal_Bool DeleteBox( const SwTableBox &rBox );
+
+ void FillRangeDesc( SwRangeDescriptor &rRangeDesc ) const;
+ bool ExtendTo( bool bExtendCol, sal_Int32 nFirstNew, sal_Int32 nCount );
+};
+
+//////////////////////////////////////////////////////////////////////
+
+typedef cppu::WeakImplHelper6
+<
+ ::com::sun::star::chart2::data::XLabeledDataSequence,
+ ::com::sun::star::util::XCloneable,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::util::XModifyListener,
+ ::com::sun::star::util::XModifyBroadcaster,
+ ::com::sun::star::lang::XComponent
+>
+SwChartLabeledDataSequenceBaseClass;
+
+class SwChartLabeledDataSequence :
+ public SwChartLabeledDataSequenceBaseClass
+{
+ ::cppu::OInterfaceContainerHelper aEvtListeners;
+ ::cppu::OInterfaceContainerHelper aModifyListeners;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::data::XDataSequence > xData;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::data::XDataSequence > xLabels;
+
+ sal_Bool bDisposed;
+
+ // disallow use of c-tor and assignment operator
+ SwChartLabeledDataSequence( const SwChartLabeledDataSequence & );
+ SwChartLabeledDataSequence & operator = ( const SwChartLabeledDataSequence & );
+
+ void SetDataSequence( ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& rxDest, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& rxSource );
+
+
+public:
+ SwChartLabeledDataSequence();
+ virtual ~SwChartLabeledDataSequence();
+
+ // XLabeledDataSequence
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getValues( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setValues( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getLabel( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setLabel( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XModifyBroadcaster
+ virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+//////////////////////////////////////////////////////////////////////
+
+#endif
+
diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
new file mode 100644
index 000000000000..cc65666d8fd4
--- /dev/null
+++ b/sw/inc/unocoll.hxx
@@ -0,0 +1,581 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOCOLL_HXX
+#define _UNOCOLL_HXX
+#include <tools/solar.h>
+#include <flyenum.hxx>
+#include <vcl/timer.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <tools/string.hxx>
+#include <cppuhelper/implbase1.hxx> // helper for implementations
+#include <cppuhelper/implbase2.hxx> // helper for implementations
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <IMark.hxx>
+#include <unobaseclass.hxx>
+#include "swdllapi.h"
+/***************************************************
+ ***************************************************
+ *
+ ***************************************************/
+class SwDoc;
+class SwFrmFmt;
+namespace com{namespace sun {namespace star {namespace text
+{
+ class XTextTable;
+ class XTextSection;
+ class XFootnote;
+}}}}
+class SwXFrame;
+class SwFrmFmt;
+class SwFmtFtn;
+class XBookmark;
+class SwXReferenceMark;
+class SwSectionFmt;
+class SwFmtRefMark;
+class SwXReferenceMark;
+class SwXBookmark;
+/*-----------------11.03.98 11:19-------------------
+
+--------------------------------------------------*/
+class SwUnoCollection
+{
+ SwDoc* pDoc;
+ sal_Bool bObjectValid;
+
+ public:
+ SwUnoCollection(SwDoc* p) :
+ pDoc(p),
+ bObjectValid(sal_True){}
+
+ virtual void Invalidate();
+ sal_Bool IsValid() const {return bObjectValid;}
+
+
+ SwDoc* GetDoc() const {return pDoc;}
+};
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+#define SW_SERVICE_TYPE_TEXTTABLE 0
+#define SW_SERVICE_TYPE_TEXTFRAME 1
+#define SW_SERVICE_TYPE_GRAPHIC 2
+#define SW_SERVICE_TYPE_OLE 3
+#define SW_SERVICE_TYPE_BOOKMARK 4
+#define SW_SERVICE_TYPE_FOOTNOTE 5
+#define SW_SERVICE_TYPE_ENDNOTE 6
+#define SW_SERVICE_TYPE_INDEXMARK 7
+#define SW_SERVICE_TYPE_INDEX 8
+#define SW_SERVICE_REFERENCE_MARK 9
+#define SW_SERVICE_STYLE_CHARACTER_STYLE 10
+#define SW_SERVICE_STYLE_PARAGRAPH_STYLE 11
+#define SW_SERVICE_STYLE_FRAME_STYLE 12
+#define SW_SERVICE_STYLE_PAGE_STYLE 13
+#define SW_SERVICE_STYLE_NUMBERING_STYLE 14
+#define SW_SERVICE_CONTENT_INDEX_MARK 15
+#define SW_SERVICE_CONTENT_INDEX 16
+#define SW_SERVICE_USER_INDEX_MARK 17
+#define SW_SERVICE_USER_INDEX 18
+#define SW_SERVICE_TEXT_SECTION 19
+#define SW_SERVICE_FIELDTYPE_DATETIME 20
+#define SW_SERVICE_FIELDTYPE_USER 21
+#define SW_SERVICE_FIELDTYPE_SET_EXP 22
+#define SW_SERVICE_FIELDTYPE_GET_EXP 23
+#define SW_SERVICE_FIELDTYPE_FILE_NAME 24
+#define SW_SERVICE_FIELDTYPE_PAGE_NUM 25
+#define SW_SERVICE_FIELDTYPE_AUTHOR 26
+#define SW_SERVICE_FIELDTYPE_CHAPTER 27
+#define SW_SERVICE_FIELDTYPE_DUMMY_0 28
+#define SW_SERVICE_FIELDTYPE_GET_REFERENCE 29
+#define SW_SERVICE_FIELDTYPE_CONDITIONED_TEXT 30
+#define SW_SERVICE_FIELDTYPE_ANNOTATION 31
+#define SW_SERVICE_FIELDTYPE_INPUT 32
+#define SW_SERVICE_FIELDTYPE_MACRO 33
+#define SW_SERVICE_FIELDTYPE_DDE 34
+#define SW_SERVICE_FIELDTYPE_HIDDEN_PARA 35
+#define SW_SERVICE_FIELDTYPE_DOC_INFO 36
+#define SW_SERVICE_FIELDTYPE_TEMPLATE_NAME 37
+#define SW_SERVICE_FIELDTYPE_USER_EXT 38
+#define SW_SERVICE_FIELDTYPE_REF_PAGE_SET 39
+#define SW_SERVICE_FIELDTYPE_REF_PAGE_GET 40
+#define SW_SERVICE_FIELDTYPE_JUMP_EDIT 41
+#define SW_SERVICE_FIELDTYPE_SCRIPT 42
+#define SW_SERVICE_FIELDTYPE_DATABASE_NEXT_SET 43
+#define SW_SERVICE_FIELDTYPE_DATABASE_NUM_SET 44
+#define SW_SERVICE_FIELDTYPE_DATABASE_SET_NUM 45
+#define SW_SERVICE_FIELDTYPE_DATABASE 46
+#define SW_SERVICE_FIELDTYPE_DATABASE_NAME 47
+#define SW_SERVICE_FIELDTYPE_TABLE_FORMULA 48
+#define SW_SERVICE_FIELDTYPE_PAGE_COUNT 49
+#define SW_SERVICE_FIELDTYPE_PARAGRAPH_COUNT 50
+#define SW_SERVICE_FIELDTYPE_WORD_COUNT 51
+#define SW_SERVICE_FIELDTYPE_CHARACTER_COUNT 52
+#define SW_SERVICE_FIELDTYPE_TABLE_COUNT 53
+#define SW_SERVICE_FIELDTYPE_GRAPHIC_OBJECT_COUNT 54
+#define SW_SERVICE_FIELDTYPE_EMBEDDED_OBJECT_COUNT 55
+#define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_AUTHOR 56
+#define SW_SERVICE_FIELDTYPE_DOCINFO_CHANGE_DATE_TIME 57
+#define SW_SERVICE_FIELDTYPE_DOCINFO_EDIT_TIME 58
+#define SW_SERVICE_FIELDTYPE_DOCINFO_DESCRIPTION 59
+#define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_AUTHOR 60
+#define SW_SERVICE_FIELDTYPE_DOCINFO_CREATE_DATE_TIME 61
+#define SW_SERVICE_FIELDTYPE_DUMMY_O 62
+#define SW_SERVICE_FIELDTYPE_DUMMY_1 63
+#define SW_SERVICE_FIELDTYPE_DUMMY_2 64
+#define SW_SERVICE_FIELDTYPE_DUMMY_3 65
+#define SW_SERVICE_FIELDTYPE_DOCINFO_CUSTOM 66
+#define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_AUTHOR 67
+#define SW_SERVICE_FIELDTYPE_DOCINFO_PRINT_DATE_TIME 68
+#define SW_SERVICE_FIELDTYPE_DOCINFO_KEY_WORDS 69
+#define SW_SERVICE_FIELDTYPE_DOCINFO_SUBJECT 70
+#define SW_SERVICE_FIELDTYPE_DOCINFO_TITLE 71
+#define SW_SERVICE_FIELDTYPE_DOCINFO_REVISION 72
+#define SW_SERVICE_FIELDTYPE_BIBLIOGRAPHY 73
+#define SW_SERVICE_FIELDTYPE_COMBINED_CHARACTERS 74
+#define SW_SERVICE_FIELDTYPE_DROPDOWN 75
+#define SW_SERVICE_FIELDTYPE_METAFIELD 76
+#define SW_SERVICE_FIELDTYPE_DUMMY_4 77
+#define SW_SERVICE_FIELDTYPE_DUMMY_5 78
+#define SW_SERVICE_FIELDTYPE_DUMMY_6 79
+#define SW_SERVICE_FIELDTYPE_DUMMY_7 80
+#define SW_SERVICE_FIELDMASTER_USER 81
+#define SW_SERVICE_FIELDMASTER_DDE 82
+#define SW_SERVICE_FIELDMASTER_SET_EXP 83
+#define SW_SERVICE_FIELDMASTER_DATABASE 84
+#define SW_SERVICE_FIELDMASTER_BIBLIOGRAPHY 85
+#define SW_SERVICE_FIELDMASTER_DUMMY2 86
+#define SW_SERVICE_FIELDMASTER_DUMMY3 87
+#define SW_SERVICE_FIELDMASTER_DUMMY4 88
+#define SW_SERVICE_FIELDMASTER_DUMMY5 89
+#define SW_SERVICE_INDEX_ILLUSTRATIONS 90
+#define SW_SERVICE_INDEX_OBJECTS 91
+#define SW_SERVICE_INDEX_TABLES 92
+#define SW_SERVICE_INDEX_BIBLIOGRAPHY 93
+#define SW_SERVICE_PARAGRAPH 94
+#define SW_SERVICE_FIELDTYPE_INPUT_USER 95
+#define SW_SERVICE_FIELDTYPE_HIDDEN_TEXT 96
+#define SW_SERVICE_STYLE_CONDITIONAL_PARAGRAPH_STYLE 97
+#define SW_SERVICE_NUMBERING_RULES 98
+#define SW_SERVICE_TEXT_COLUMNS 99
+#define SW_SERVICE_INDEX_HEADER_SECTION 100
+#define SW_SERVICE_DEFAULTS 101
+#define SW_SERVICE_IMAP_RECTANGLE 102
+#define SW_SERVICE_IMAP_CIRCLE 103
+#define SW_SERVICE_IMAP_POLYGON 104
+#define SW_SERVICE_TYPE_TEXT_GRAPHIC 105
+#define SW_SERVICE_CHART2_DATA_PROVIDER 106
+#define SW_SERVICE_TYPE_FIELDMARK 107
+#define SW_SERVICE_TYPE_FORMFIELDMARK 108
+#define SW_SERVICE_TYPE_META 109
+
+#define SW_SERVICE_LAST SW_SERVICE_TYPE_META
+
+#define SW_SERVICE_INVALID USHRT_MAX
+
+//
+// case-corrected versions of service-names (see #i67811)
+//
+#define CSS_TEXT_TEXTFIELD_DATE_TIME "com.sun.star.text.textfield.DateTime"
+#define CSS_TEXT_TEXTFIELD_USER "com.sun.star.text.textfield.User"
+#define CSS_TEXT_TEXTFIELD_SET_EXPRESSION "com.sun.star.text.textfield.SetExpression"
+#define CSS_TEXT_TEXTFIELD_GET_EXPRESSION "com.sun.star.text.textfield.GetExpression"
+#define CSS_TEXT_TEXTFIELD_FILE_NAME "com.sun.star.text.textfield.FileName"
+#define CSS_TEXT_TEXTFIELD_PAGE_NUMBER "com.sun.star.text.textfield.PageNumber"
+#define CSS_TEXT_TEXTFIELD_AUTHOR "com.sun.star.text.textfield.Author"
+#define CSS_TEXT_TEXTFIELD_CHAPTER "com.sun.star.text.textfield.Chapter"
+#define CSS_TEXT_TEXTFIELD_GET_REFERENCE "com.sun.star.text.textfield.GetReference"
+#define CSS_TEXT_TEXTFIELD_CONDITIONAL_TEXT "com.sun.star.text.textfield.ConditionalText"
+#define CSS_TEXT_TEXTFIELD_ANNOTATION "com.sun.star.text.textfield.Annotation"
+#define CSS_TEXT_TEXTFIELD_INPUT "com.sun.star.text.textfield.Input"
+#define CSS_TEXT_TEXTFIELD_MACRO "com.sun.star.text.textfield.Macro"
+#define CSS_TEXT_TEXTFIELD_DDE "com.sun.star.text.textfield.DDE"
+#define CSS_TEXT_TEXTFIELD_HIDDEN_PARAGRAPH "com.sun.star.text.textfield.HiddenParagraph"
+#define CSS_TEXT_TEXTFIELD_TEMPLATE_NAME "com.sun.star.text.textfield.TemplateName"
+#define CSS_TEXT_TEXTFIELD_EXTENDED_USER "com.sun.star.text.textfield.ExtendedUser"
+#define CSS_TEXT_TEXTFIELD_REFERENCE_PAGE_SET "com.sun.star.text.textfield.ReferencePageSet"
+#define CSS_TEXT_TEXTFIELD_REFERENCE_PAGE_GET "com.sun.star.text.textfield.ReferencePageGet"
+#define CSS_TEXT_TEXTFIELD_JUMP_EDIT "com.sun.star.text.textfield.JumpEdit"
+#define CSS_TEXT_TEXTFIELD_SCRIPT "com.sun.star.text.textfield.Script"
+#define CSS_TEXT_TEXTFIELD_DATABASE_NEXT_SET "com.sun.star.text.textfield.DatabaseNextSet"
+#define CSS_TEXT_TEXTFIELD_DATABASE_NUMBER_OF_SET "com.sun.star.text.textfield.DatabaseNumberOfSet"
+#define CSS_TEXT_TEXTFIELD_DATABASE_SET_NUMBER "com.sun.star.text.textfield.DatabaseSetNumber"
+#define CSS_TEXT_TEXTFIELD_DATABASE "com.sun.star.text.textfield.Database"
+#define CSS_TEXT_TEXTFIELD_DATABASE_NAME "com.sun.star.text.textfield.DatabaseName"
+#define CSS_TEXT_TEXTFIELD_TABLE_FORMULA "com.sun.star.text.textfield.TableFormula"
+#define CSS_TEXT_TEXTFIELD_PAGE_COUNT "com.sun.star.text.textfield.PageCount"
+#define CSS_TEXT_TEXTFIELD_PARAGRAPH_COUNT "com.sun.star.text.textfield.ParagraphCount"
+#define CSS_TEXT_TEXTFIELD_WORD_COUNT "com.sun.star.text.textfield.WordCount"
+#define CSS_TEXT_TEXTFIELD_CHARACTER_COUNT "com.sun.star.text.textfield.CharacterCount"
+#define CSS_TEXT_TEXTFIELD_TABLE_COUNT "com.sun.star.text.textfield.TableCount"
+#define CSS_TEXT_TEXTFIELD_GRAPHIC_OBJECT_COUNT "com.sun.star.text.textfield.GraphicObjectCount"
+#define CSS_TEXT_TEXTFIELD_EMBEDDED_OBJECT_COUNT "com.sun.star.text.textfield.EmbeddedObjectCount"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_AUTHOR "com.sun.star.text.textfield.docinfo.ChangeAuthor"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_CHANGE_DATE_TIME "com.sun.star.text.textfield.docinfo.ChangeDateTime"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_EDIT_TIME "com.sun.star.text.textfield.docinfo.EditTime"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_DESCRIPTION "com.sun.star.text.textfield.docinfo.Description"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_AUTHOR "com.sun.star.text.textfield.docinfo.CreateAuthor"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_CREATE_DATE_TIME "com.sun.star.text.textfield.docinfo.CreateDateTime"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_AUTHOR "com.sun.star.text.textfield.docinfo.PrintAuthor"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_PRINT_DATE_TIME "com.sun.star.text.textfield.docinfo.PrintDateTime"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_KEY_WORDS "com.sun.star.text.textfield.docinfo.KeyWords"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_SUBJECT "com.sun.star.text.textfield.docinfo.Subject"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_TITLE "com.sun.star.text.textfield.docinfo.Title"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_REVISION "com.sun.star.text.textfield.docinfo.Revision"
+#define CSS_TEXT_TEXTFIELD_DOCINFO_CUSTOM "com.sun.star.text.textfield.docinfo.Custom"
+#define CSS_TEXT_TEXTFIELD_BIBLIOGRAPHY "com.sun.star.text.textfield.Bibliography"
+#define CSS_TEXT_TEXTFIELD_COMBINED_CHARACTERS "com.sun.star.text.textfield.CombinedCharacters"
+#define CSS_TEXT_TEXTFIELD_DROP_DOWN "com.sun.star.text.textfield.DropDown"
+#define CSS_TEXT_TEXTFIELD_INPUT_USER "com.sun.star.text.textfield.InputUser"
+#define CSS_TEXT_TEXTFIELD_HIDDEN_TEXT "com.sun.star.text.textfield.HiddenText"
+#define CSS_TEXT_FIELDMASTER_USER "com.sun.star.text.fieldmaster.User"
+#define CSS_TEXT_FIELDMASTER_DDE "com.sun.star.text.fieldmaster.DDE"
+#define CSS_TEXT_FIELDMASTER_SET_EXPRESSION "com.sun.star.text.fieldmaster.SetExpression"
+#define CSS_TEXT_FIELDMASTER_DATABASE "com.sun.star.text.fieldmaster.Database"
+#define CSS_TEXT_FIELDMASTER_BIBLIOGRAPHY "com.sun.star.text.fieldmaster.Bibliography"
+
+
+class SwXServiceProvider
+{
+public:
+ static rtl::OUString GetProviderName(sal_uInt16 nObjectType);
+ static sal_uInt16 GetProviderType(const rtl::OUString& rServiceName);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > MakeInstance(sal_uInt16 nObjectType, SwDoc* pDoc);
+ static ::com::sun::star::uno::Sequence<rtl::OUString> GetAllServiceNames();
+
+};
+/*-----------------11.12.97 09:38-------------------
+
+--------------------------------------------------*/
+typedef
+cppu::WeakImplHelper3
+<
+ ::com::sun::star::container::XNameAccess,
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwCollectionBaseClass;
+class SW_DLLPUBLIC SwXTextTables : public SwCollectionBaseClass,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXTextTables();
+public:
+ SwXTextTables(SwDoc* pDoc);
+
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static ::com::sun::star::text::XTextTable* GetObject( SwFrmFmt& rFmt );
+};
+
+typedef
+cppu::WeakImplHelper4
+<
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::container::XNameAccess,
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::lang::XServiceInfo
+> SwXFramesBaseClass;
+
+class SwXFrames : public SwXFramesBaseClass,
+ public SwUnoCollection
+{
+ const FlyCntType eType;
+protected:
+ virtual ~SwXFrames();
+public:
+ SwXFrames(SwDoc* pDoc, FlyCntType eSet);
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ FlyCntType GetType()const{return eType;}
+ static SwXFrame* GetObject( SwFrmFmt& rFmt, FlyCntType eType );
+
+};
+
+/*-----------------20.02.98 10:51-------------------
+
+--------------------------------------------------*/
+class SwXTextFrames : public SwXFrames
+{
+protected:
+ virtual ~SwXTextFrames();
+public:
+ SwXTextFrames(SwDoc* pDoc);
+
+
+// SMART_UNO_DECLARATION( SwXTextFrames, UsrObject );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+/*-----------------20.02.98 10:55-------------------
+
+--------------------------------------------------*/
+class SwXTextGraphicObjects : public SwXFrames
+{
+protected:
+ virtual ~SwXTextGraphicObjects();
+public:
+ SwXTextGraphicObjects(SwDoc* pDoc);
+
+
+// SMART_UNO_DECLARATION( SwXTextGraphicObjects, UsrObject );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+/*-----------------20.02.98 10:57-------------------
+
+--------------------------------------------------*/
+class SwXTextEmbeddedObjects : public SwXFrames
+{
+protected:
+ virtual ~SwXTextEmbeddedObjects();
+public:
+ SwXTextEmbeddedObjects(SwDoc* pDoc);
+
+
+// SMART_UNO_DECLARATION( SwXTextEmbeddedObjects, UsrObject );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+/*-----------------12.02.98 07:58-------------------
+
+--------------------------------------------------*/
+class SwXTextSections : public SwCollectionBaseClass,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXTextSections();
+public:
+ SwXTextSections(SwDoc* pDoc);
+
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextSection> GetObject( SwSectionFmt& rFmt );
+};
+/*-----------------12.02.98 07:51-------------------
+
+--------------------------------------------------*/
+class SwXBookmarks : public SwCollectionBaseClass,
+ public SwUnoCollection
+{
+ protected:
+ virtual ~SwXBookmarks();
+ public:
+ SwXBookmarks(SwDoc* pDoc);
+
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+class SwXNumberingRulesCollection : public cppu::WeakImplHelper1
+<
+ ::com::sun::star::container::XIndexAccess
+>,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXNumberingRulesCollection();
+
+public:
+ SwXNumberingRulesCollection( SwDoc* pDoc );
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+};
+
+/*-----------------12.02.98 08:01-------------------
+
+--------------------------------------------------*/
+
+typedef
+cppu::WeakImplHelper2
+<
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwSimpleIndexAccessBaseClass;
+
+class SwXFootnotes : public SwSimpleIndexAccessBaseClass,
+ public SwUnoCollection
+{
+ const bool m_bEndnote;
+
+protected:
+ virtual ~SwXFootnotes();
+public:
+ SwXFootnotes(sal_Bool bEnd, SwDoc* pDoc);
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote> GetObject( SwDoc& rDoc, const SwFmtFtn& rFmt );
+};
+
+/* -----------------27.08.98 13:10-------------------
+ *
+ * --------------------------------------------------*/
+class SwXReferenceMarks : public SwCollectionBaseClass,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXReferenceMarks();
+public:
+ SwXReferenceMarks(SwDoc* pDoc);
+
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static SwXReferenceMark* GetObject( SwDoc* pDoc, const SwFmtRefMark* pMark );
+};
+
+#endif
+
+
+
+
+
+
diff --git a/sw/inc/unocore.hrc b/sw/inc/unocore.hrc
new file mode 100644
index 000000000000..428229d88968
--- /dev/null
+++ b/sw/inc/unocore.hrc
@@ -0,0 +1,48 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOCORE_HRC
+#define _UNOCORE_HRC
+
+#include "rcid.hrc"
+
+#define STR_CHART2_ROW_LABEL_TEXT (RC_UNOCORE_BEGIN + 1)
+#define STR_CHART2_COL_LABEL_TEXT (RC_UNOCORE_BEGIN + 2)
+#define STR_STYLE_FAMILY_CHARACTER (RC_UNOCORE_BEGIN + 3)
+#define STR_STYLE_FAMILY_PARAGRAPH (RC_UNOCORE_BEGIN + 4)
+#define STR_STYLE_FAMILY_FRAME (RC_UNOCORE_BEGIN + 5)
+#define STR_STYLE_FAMILY_PAGE (RC_UNOCORE_BEGIN + 6)
+#define STR_STYLE_FAMILY_NUMBERING (RC_UNOCORE_BEGIN + 7)
+
+#define UNOCORE_ACT_END STR_STYLE_FAMILY_NUMBERING
+
+#if UNOCORE_ACT_END > RC_UNOCORE_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif
+
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
new file mode 100644
index 000000000000..001f0eef3ab2
--- /dev/null
+++ b/sw/inc/unocrsr.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOCRSR_HXX
+#define _UNOCRSR_HXX
+#include <swcrsr.hxx>
+#include <calbck.hxx>
+
+
+class SwUnoCrsr : public virtual SwCursor, public SwModify
+{
+ BOOL bRemainInSection : 1;
+ BOOL bSkipOverHiddenSections : 1;
+ BOOL bSkipOverProtectSections : 1;
+
+public:
+ SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
+ virtual ~SwUnoCrsr();
+
+ // @@@ semantic: no copy ctor.
+ SwUnoCrsr( SwUnoCrsr& );
+private:
+ // forbidden and not implemented.
+ //SwUnoCrsr( const SwUnoCrsr& );
+ SwUnoCrsr & operator= ( const SwUnoCrsr& );
+
+protected:
+
+ virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
+ BOOL & io_rbLeft, BOOL bVisualAllowed, BOOL bInsertCrsr);
+ virtual void DoSetBidiLevelUpDown();
+
+public:
+
+// virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
+
+ // gibt es eine Selection vom Content in die Tabelle
+ // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
+ virtual BOOL IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+
+ virtual bool IsReadOnlyAvailable() const;
+
+ BOOL IsRemainInSection() const { return bRemainInSection; }
+ void SetRemainInSection( BOOL bFlag ) { bRemainInSection = bFlag; }
+
+ virtual BOOL IsSkipOverProtectSections() const
+ { return bSkipOverProtectSections; }
+ void SetSkipOverProtectSections( BOOL bFlag )
+ { bSkipOverProtectSections = bFlag; }
+
+ virtual BOOL IsSkipOverHiddenSections() const
+ { return bSkipOverHiddenSections; }
+ void SetSkipOverHiddenSections( BOOL bFlag )
+ { bSkipOverHiddenSections = bFlag; }
+
+ // make copy of cursor
+ virtual SwUnoCrsr * Clone() const;
+
+ DECL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr )
+};
+
+
+
+class SwUnoTableCrsr : public virtual SwUnoCrsr, public virtual SwTableCursor
+{
+ // die Selection hat die gleiche Reihenfolge wie die
+ // TabellenBoxen. D.h., wird aus dem einen Array an einer Position
+ // etwas geloescht, dann muss es auch im anderen erfolgen!!
+ SwCursor aTblSel;
+
+ using SwTableCursor::MakeBoxSels;
+
+public:
+ SwUnoTableCrsr( const SwPosition& rPos );
+ virtual ~SwUnoTableCrsr();
+
+// virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
+
+ // gibt es eine Selection vom Content in die Tabelle
+ // Return Wert gibt an, ob der Crsr auf der alten Position verbleibt
+ virtual BOOL IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+
+ virtual SwUnoTableCrsr * Clone() const;
+
+ void MakeBoxSels();
+
+ SwCursor& GetSelRing() { return aTblSel; }
+ const SwCursor& GetSelRing() const { return aTblSel; }
+};
+
+
+
+#endif
diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx
new file mode 100644
index 000000000000..7ca06ee09391
--- /dev/null
+++ b/sw/inc/unocrsrhelper.hxx
@@ -0,0 +1,218 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOCRSRHELPER_HXX
+#define _UNOCRSRHELPER_HXX
+
+#include <map>
+
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+#include <swtypes.hxx>
+#include <pam.hxx>
+
+
+class String;
+class SfxItemSet;
+class SfxItemPropertySet;
+struct SfxItemPropertySimpleEntry;
+class SwTxtNode;
+class SwPaM;
+class SwCursor;
+class SwUnoCrsr;
+class SwFmtColl;
+struct SwSortOptions;
+class SwDoc;
+
+namespace com{ namespace sun{ namespace star{
+ namespace uno{
+ class Any;
+ }
+ namespace beans{
+ struct PropertyValue;
+ }
+ namespace text {
+ class XTextContent;
+ }
+}}}
+
+/* -----------------03.12.98 12:16-------------------
+ *
+ * --------------------------------------------------*/
+enum SwGetPropertyStatesCaller
+{
+ SW_PROPERTY_STATE_CALLER_DEFAULT,
+ SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION,
+ SW_PROPERTY_STATE_CALLER_SINGLE_VALUE_ONLY,
+ SW_PROPERTY_STATE_CALLER_SWX_TEXT_PORTION_TOLERANT
+};
+
+/* -----------------------------14.12.00 15:06--------------------------------
+
+ ---------------------------------------------------------------------------*/
+namespace SwUnoCursorHelper
+{
+ // keep Any's mapped by (WhichId << 16 ) + (MemberId)
+ typedef std::map< sal_uInt32, com::sun::star::uno::Any *> AnyMapHelper_t;
+ class SwAnyMapHelper : public AnyMapHelper_t
+ {
+ public:
+ ~SwAnyMapHelper();
+
+ void SetValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any& rAny );
+ bool FillValue( USHORT nWhichId, USHORT nMemberId, const com::sun::star::uno::Any*& pAny );
+ };
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ GetNestedTextContent(SwTxtNode & rTextNode, xub_StrLen const nIndex,
+ bool const bParent);
+
+ sal_Bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry
+ , SwPaM& rPam
+ , com::sun::star::uno::Any *pAny
+ , com::sun::star::beans::PropertyState& eState
+ , const SwTxtNode* pNode = 0 );
+
+ void GetCurPageStyle(SwPaM& rPaM, String &rString);
+
+ inline sal_Bool IsStartOfPara(SwPaM& rUnoCrsr)
+ { return rUnoCrsr.GetPoint()->nContent == 0;}
+ inline sal_Bool IsEndOfPara(SwPaM& rUnoCrsr)
+ { return rUnoCrsr.GetCntntNode() &&
+ rUnoCrsr.GetPoint()->nContent == rUnoCrsr.GetCntntNode()->Len();}
+
+ void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPam);
+ void InsertFile(SwUnoCrsr* pUnoCrsr,
+ const String& rURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rOptions
+ ) throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::io::IOException, com::sun::star::uno::RuntimeException );
+
+ void getNumberingProperty(
+ SwPaM& rPam,
+ com::sun::star::beans::PropertyState& eState,
+ com::sun::star::uno::Any *pAny );
+
+ void setNumberingProperty(
+ const com::sun::star::uno::Any& rValue,
+ SwPaM& rPam);
+
+ sal_Int16 IsNodeNumStart(
+ SwPaM& rPam,
+ com::sun::star::beans::PropertyState& eState);
+
+ sal_Bool DocInsertStringSplitCR( SwDoc &rDoc,
+ const SwPaM &rNewCursor, const String &rText,
+ const bool bForceExpandHints );
+ void makeRedline( SwPaM& rPaM, const ::rtl::OUString& RedlineType,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& RedlineProperties )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+
+ /// @param bTableMode: attributes should be applied to a table selection
+ void SetCrsrAttr(SwPaM & rPam, const SfxItemSet & rSet,
+ const SetAttrMode nAttrMode,
+ const bool bTableMode = false);
+ void GetCrsrAttr(SwPaM & rPam, SfxItemSet & rSet,
+ const bool bOnlyTxtAttr = false,
+ const bool bGetFromChrFmt = true);
+ void GetTextFromPam(SwPaM & rPam, ::rtl::OUString & rBuffer);
+ SwFmtColl * GetCurTxtFmtColl(SwPaM & rPam, const bool bConditional);
+
+ void SelectPam(SwPaM & rPam, const bool bExpand);
+ void SetString(SwCursor & rCursor, const ::rtl::OUString & rString);
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
+ CreateSortDescriptor(const bool bFromTable);
+ sal_Bool ConvertSortProperties(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& rDescriptor,
+ SwSortOptions & rSortOpt);
+
+ /// @param bTableMode: attributes should be applied to a table selection
+ void SetPropertyValue(
+ SwPaM& rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName,
+ const ::com::sun::star::uno::Any & rValue,
+ const SetAttrMode nAttrMode = nsSetAttrMode::SETATTR_DEFAULT,
+ const bool bTableMode = false)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Any GetPropertyValue(
+ SwPaM& rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyState > GetPropertyStates(
+ SwPaM & rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const SwGetPropertyStatesCaller eCaller =
+ SW_PROPERTY_STATE_CALLER_DEFAULT)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::beans::PropertyState GetPropertyState(
+ SwPaM & rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ void SetPropertyToDefault(
+ SwPaM & rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Any GetPropertyDefault(
+ SwPaM & rPaM,
+ const SfxItemPropertySet & rPropSet,
+ const ::rtl::OUString & rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ bool SetPageDesc(
+ const ::com::sun::star::uno::Any& rValue,
+ SwDoc & rDoc, SfxItemSet & rSet);
+ void SetTxtFmtColl(const ::com::sun::star::uno::Any & rAny, SwPaM & rPaM)
+ throw (::com::sun::star::lang::IllegalArgumentException);
+ bool SetCursorPropertyValue(
+ SfxItemPropertySimpleEntry const& rEntry,
+ ::com::sun::star::uno::Any const& rValue,
+ SwPaM & rPam, SfxItemSet & rItemSet)
+ throw (::com::sun::star::lang::IllegalArgumentException);
+
+} // namespace SwUnoCursorHelper
+
+#endif
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
new file mode 100644
index 000000000000..d4ac0f4f3d61
--- /dev/null
+++ b/sw/inc/unodraw.hxx
@@ -0,0 +1,353 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNODRAW_HXX
+#define _UNODRAW_HXX
+
+#include <svx/fmdpage.hxx>
+#include <calbck.hxx>
+#include <frmfmt.hxx>
+#include <com/sun/star/text/XTextContent.hpp>
+// --> OD 2009-01-13 #i59051#
+#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
+// <--
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+// --> OD 2004-07-22 #i31698#
+#include <cppuhelper/implbase6.hxx> // helper for implementations
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/drawing/HomogenMatrix3.hpp>
+// <--
+#include <svl/itemprop.hxx>
+
+class SdrMarkList;
+class SdrView;
+class SwDoc;
+/******************************************************************************
+ *
+ ******************************************************************************/
+class SwFmDrawPage : public SvxFmDrawPage
+{
+ SdrPageView* pPageView;
+protected:
+
+ // Erzeugen eines SdrObjects anhand einer Description. Kann von
+ // abgeleiteten Klassen dazu benutzt werden, eigene ::com::sun::star::drawing::Shapes zu
+ // unterstuetzen (z.B. Controls)
+ virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape ) throw ();
+
+public:
+ SwFmDrawPage( SdrPage* pPage );
+ virtual ~SwFmDrawPage() throw ();
+
+ const SdrMarkList& PreGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > & xShapes);
+ void PreUnGroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > xShapeGroup);
+// void PostGroup(); ?? wird es noch gebraucht ??
+
+ SdrView* GetDrawView() {return mpView;}
+ SdrPageView* GetPageView();
+ void RemovePageView();
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetInterface( SdrObject* pObj );
+
+ // Die folgende Methode wird gerufen, wenn ein SvxShape-Objekt angelegt
+ // werden soll. abgeleitete Klassen koennen hier eine Ableitung oder
+ // ein ein SvxShape aggregierendes Objekt anlegen.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > _CreateShape( SdrObject *pObj ) const throw ();
+};
+
+typedef cppu::WeakAggImplHelper4
+<
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::drawing::XDrawPage,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::drawing::XShapeGrouper
+>
+SwXDrawPageBaseClass;
+class SwXDrawPage : public SwXDrawPageBaseClass
+{
+ SwDoc* pDoc;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xPageAgg;
+ SwFmDrawPage* pDrawPage;
+public:
+ SwXDrawPage(SwDoc* pDoc);
+ ~SwXDrawPage();
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XShapes
+ virtual void SAL_CALL add(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL remove(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & xShape) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XShapeGrouper
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > SAL_CALL group(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > & xShapes) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL ungroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > & aGroup) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ SwFmDrawPage* GetSvxPage();
+ // renamed and outlined to detect where it's called
+ void InvalidateSwDoc(); // {pDoc = 0;}
+};
+/* -----------------22.01.99 10:20-------------------
+ *
+ * --------------------------------------------------*/
+class SwShapeDescriptor_Impl;
+class SwXGroupShape;
+typedef
+cppu::WeakAggImplHelper6
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::text::XTextContent,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ // --> OD 2004-07-22 #i31698#
+ ::com::sun::star::drawing::XShape
+ // <--
+>
+SwXShapeBaseClass;
+class SwXShape : public SwXShapeBaseClass,
+ public SwClient
+{
+ friend class SwHTMLImageWatcher;
+ friend class SwHTMLParser;
+ friend class SwXGroupShape;
+ friend class SwXDrawPage;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xShapeAgg;
+ // --> OD 2004-07-23 #i31698# - reference to <XShape>, determined in the
+ // constructor by <queryAggregation> at <xShapeAgg>.
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape;
+ // <--
+
+ const SfxItemPropertySet* m_pPropSet;
+ const SfxItemPropertyMapEntry* m_pPropertyMapEntries;
+ com::sun::star::uno::Sequence< sal_Int8 >* pImplementationId;
+
+ SwShapeDescriptor_Impl* pImpl;
+
+ sal_Bool m_bDescriptor;
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+
+ SvxShape* GetSvxShape();
+
+ /** method to determine top group object
+
+ OD 2004-08-03 #i31698#
+
+ @author OD
+ */
+ SdrObject* _GetTopGroupObj( SvxShape* _pSvxShape = 0L );
+
+ /** method to determine position according to the positioning attributes
+
+ OD 2004-08-03 #i31698#
+
+ @author OD
+ */
+ com::sun::star::awt::Point _GetAttrPosition();
+
+ /** method to convert the position (translation) of the drawing object to
+ the layout direction horizontal left-to-right.
+
+ OD 2004-07-27 #i31698#
+
+ @author OD
+ */
+ ::com::sun::star::awt::Point _ConvertPositionToHoriL2R(
+ const ::com::sun::star::awt::Point _aObjPos,
+ const ::com::sun::star::awt::Size _aObjSize );
+
+ /** method to convert the transformation of the drawing object to the layout
+ direction, the drawing object is in
+
+ OD 2004-07-27 #i31698#
+
+ @author OD
+ */
+ ::com::sun::star::drawing::HomogenMatrix3 _ConvertTransformationToLayoutDir(
+ ::com::sun::star::drawing::HomogenMatrix3 _aMatrixInHoriL2R );
+
+ /** method to adjust the positioning properties
+
+ OD 2004-08-02 #i31698#
+
+ @author OD
+
+ @param _aPosition
+ input parameter - point representing the new shape position. The position
+ has to be given in the layout direction the shape is in and relative to
+ its position alignment areas.
+ */
+ void _AdjustPositionProperties( const ::com::sun::star::awt::Point _aPosition );
+
+ /** method to convert start or end position of the drawing object to the
+ Writer specific position, which is the attribute position in layout direction
+
+ OD 2009-01-12 #i59051#
+
+ @author OD
+ */
+ ::com::sun::star::awt::Point _ConvertStartOrEndPosToLayoutDir(
+ const ::com::sun::star::awt::Point& aStartOrEndPos );
+
+ /** method to convert PolyPolygonBezier of the drawing object to the
+ Writer specific position, which is the attribute position in layout direction
+
+ OD 2009-01-13 #i59051#
+
+ @author OD
+ */
+ ::com::sun::star::drawing::PolyPolygonBezierCoords _ConvertPolyPolygonBezierToLayoutDir(
+ const ::com::sun::star::drawing::PolyPolygonBezierCoords& aPath );
+
+ /** method to get property from aggregation object
+
+ OD 2004-10-28 #i36248#
+
+ @author OD
+ */
+ ::com::sun::star::uno::Any _getPropAtAggrObj( const ::rtl::OUString& _rPropertyName )
+ throw( ::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual ~SwXShape();
+public:
+ SwXShape(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xShape);
+
+
+ TYPEINFO();
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // --> OD 2004-07-22 #i31698# XShape
+ virtual ::com::sun::star::awt::Point SAL_CALL getPosition( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) 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 setSize( const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
+ // <--
+ // --> OD 2004-07-22 #i31698# XShapeDescriptor - superclass of XShape
+ virtual ::rtl::OUString SAL_CALL getShapeType( ) throw (::com::sun::star::uno::RuntimeException);
+ // <--
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ SwShapeDescriptor_Impl* GetDescImpl() {return pImpl;}
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > GetAggregationInterface() {return xShapeAgg;}
+
+ // helper
+ static void AddExistingShapeToFmt( SdrObject& _rObj );
+};
+/* -----------------------------31.05.01 09:54--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwXGroupShape :
+ public SwXShape,
+ public ::com::sun::star::drawing::XShapes
+{
+protected:
+ virtual ~SwXGroupShape();
+public:
+ SwXGroupShape(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xShape);
+
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw();
+ virtual void SAL_CALL release( ) throw();
+
+ //XShapes
+ virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+};
+#endif
+
+
diff --git a/sw/inc/unoevent.hxx b/sw/inc/unoevent.hxx
new file mode 100644
index 000000000000..6a9087519e68
--- /dev/null
+++ b/sw/inc/unoevent.hxx
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOEVENT_HXX
+#define _UNOEVENT_HXX
+
+#include <svtools/unoevent.hxx>
+#include <svl/macitem.hxx>
+
+
+class SvxMacroItem;
+class SvxMacro;
+class SwXFrame;
+class SwXTextFrame;
+class SwXTextGraphicObject;
+class SwXTextEmbeddedObject;
+class SwXFrameStyle;
+class SwFmtINetFmt;
+
+
+
+class SwHyperlinkEventDescriptor : public SvDetachedEventDescriptor
+{
+ const ::rtl::OUString sImplName;
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+protected:
+ virtual ~SwHyperlinkEventDescriptor();
+public:
+
+ SwHyperlinkEventDescriptor();
+
+
+
+ void copyMacrosFromINetFmt(const SwFmtINetFmt& aFmt);
+ void copyMacrosIntoINetFmt(SwFmtINetFmt& aFmt);
+
+ void copyMacrosFromNameReplace(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XNameReplace> & xReplace);
+};
+
+
+
+// SwEventDescriptor for
+// 1) SwXTextFrame
+// 2) SwXGraphicObject
+// 3) SwXEmbeddedObject
+// All these objects are an SwXFrame, so they can use a common implementation
+class SwFrameEventDescriptor : public SvEventDescriptor
+{
+ ::rtl::OUString sSwFrameEventDescriptor;
+
+ SwXFrame& rFrame;
+
+public:
+ SwFrameEventDescriptor( SwXTextFrame& rFrameRef );
+ SwFrameEventDescriptor( SwXTextGraphicObject& rGraphicRef );
+ SwFrameEventDescriptor( SwXTextEmbeddedObject& rObjectRef );
+
+ ~SwFrameEventDescriptor();
+
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ virtual void setMacroItem(const SvxMacroItem& rItem);
+ virtual const SvxMacroItem& getMacroItem();
+ virtual sal_uInt16 getMacroItemWhich() const;
+};
+
+class SwFrameStyleEventDescriptor : public SvEventDescriptor
+{
+ ::rtl::OUString sSwFrameStyleEventDescriptor;
+
+ SwXFrameStyle& rStyle;
+
+public:
+ SwFrameStyleEventDescriptor( SwXFrameStyle& rStyleRef );
+
+ ~SwFrameStyleEventDescriptor();
+
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+protected:
+ virtual void setMacroItem(const SvxMacroItem& rItem);
+ virtual const SvxMacroItem& getMacroItem();
+ virtual sal_uInt16 getMacroItemWhich() const;
+};
+
+
+#endif
diff --git a/sw/inc/unoevtlstnr.hxx b/sw/inc/unoevtlstnr.hxx
new file mode 100644
index 000000000000..9063120a6240
--- /dev/null
+++ b/sw/inc/unoevtlstnr.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOEVTLSTNR_HXX
+#define _UNOEVTLSTNR_HXX
+
+#include <svl/svarray.hxx>
+#include <com/sun/star/uno/Reference.h>
+
+namespace com{namespace sun{namespace star{
+ namespace lang
+ {
+ class XEventListener;
+ }
+}}}
+/* -----------------22.04.99 11:18-------------------
+ * Verwaltung der EventListener
+ * --------------------------------------------------*/
+typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > * XEventListenerPtr;
+SV_DECL_PTRARR(SwEvtLstnrArray, XEventListenerPtr, 4, 4)
+
+class SwEventListenerContainer
+{
+ protected:
+ SwEvtLstnrArray* pListenerArr;
+ ::com::sun::star::uno::XInterface* pxParent;
+ public:
+ SwEventListenerContainer( ::com::sun::star::uno::XInterface* pxParent);
+ ~SwEventListenerContainer();
+
+ void AddListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener);
+ BOOL RemoveListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & rxListener);
+ void Disposing();
+};
+#endif
diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx
new file mode 100644
index 000000000000..521a85e9168e
--- /dev/null
+++ b/sw/inc/unofield.hxx
@@ -0,0 +1,330 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOFIELD_HXX
+#define _UNOFIELD_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/util/XRefreshable.hpp>
+#include <com/sun/star/util/XUpdatable.hpp>
+#include <com/sun/star/text/XDependentTextField.hpp>
+
+#include <cppuhelper/implbase5.hxx>
+
+#include <calbck.hxx>
+#include <unocoll.hxx>
+#include <RefreshListenerContainer.hxx>
+
+
+class SwFieldType;
+class SwDoc;
+class SwFmtFld;
+class SwField;
+class SwSetExpField;
+class SwTextAPIObject;
+
+/* -----------------04.12.98 12:49-------------------
+ *
+ * --------------------------------------------------*/
+class SwXFieldMaster : public cppu::WeakImplHelper4
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::lang::XComponent
+>,
+ public SwClient
+{
+ SwEventListenerContainer aLstnrCntnr;
+ sal_uInt16 nResTypeId;
+ SwDoc* m_pDoc;
+
+ sal_Bool m_bIsDescriptor;
+
+ String sParam1; //Content / Database / NumberingSeparator
+ String sParam2; // - /DataTablename
+ String sParam3; // - /DataFieldName
+ String sParam4;
+ String sParam5; // - /DataBaseURL
+ String sParam6; // - /DataBaseResource
+ double fParam1; // Value / -
+ sal_Int8 nParam1; // ChapterNumberingLevel
+ sal_Bool bParam1; // IsExpression
+ sal_Int32 nParam2;
+
+protected:
+ virtual ~SwXFieldMaster();
+public:
+
+ SwXFieldMaster(SwDoc* pDoc, sal_uInt16 nResId);
+ SwXFieldMaster(SwFieldType& rType, SwDoc* pDoc);
+
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ static rtl::OUString GetProgrammaticName(const SwFieldType& rType, SwDoc& rDoc);
+ static rtl::OUString LocalizeFormula(const SwSetExpField& rFld, const rtl::OUString& rFormula, sal_Bool bQuery);
+
+ SwFieldType* GetFldType(sal_Bool bDontCreate = sal_False) const;
+ SwDoc* GetDoc() {return m_pDoc;}
+
+ sal_Bool IsDescriptor()const {return m_bIsDescriptor;}
+ sal_uInt16 GetResId() const {return nResTypeId;}
+};
+
+/* -----------------04.12.98 12:49-------------------
+ *
+ * --------------------------------------------------*/
+struct SwFieldProperties_Impl;
+class SwXTextField : public cppu::WeakImplHelper5
+<
+ ::com::sun::star::text::XDependentTextField,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::util::XUpdatable
+>,
+ public SwClient
+{
+ SwEventListenerContainer aLstnrCntnr;
+ const SwFmtFld* pFmtFld;
+ SwDoc* m_pDoc;
+ SwTextAPIObject* m_pTextObject;
+
+ sal_Bool m_bIsDescriptor;
+ SwClient m_aFieldTypeClient; // required to access field master of not yet inserted fields
+ sal_Bool m_bCallUpdate;
+ sal_uInt16 m_nServiceId;
+ SwFieldProperties_Impl* m_pProps;
+ String m_sTypeName;
+
+
+ //SwFieldType* GetFldType() const { return (SwFieldType*)GetRegisteredIn(); }
+ SwDoc* GetDoc() {return m_pDoc;}
+protected:
+ virtual ~SwXTextField();
+public:
+ SwXTextField(sal_uInt16 nServiceId, SwDoc* pDoc=0);
+ SwXTextField(const SwFmtFld& rFmt, SwDoc* pDoc);
+
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XDependentTextField
+ virtual void SAL_CALL attachTextFieldMaster(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xFieldMaster) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getTextFieldMaster(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XTextField
+ virtual rtl::OUString SAL_CALL getPresentation(sal_Bool bShowCommand) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XUpdatable
+ virtual void SAL_CALL update( ) throw (::com::sun::star::uno::RuntimeException);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ const SwField* GetField() const;
+ const SwFmtFld* GetFldFmt(){return GetField() ? pFmtFld : 0; };
+
+ void Invalidate();
+};
+
+/// @return a SwXTextField, either an already existing one or a new one
+SwXTextField * CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt);
+
+
+/* -----------------21.12.98 10:26-------------------
+ *
+ * --------------------------------------------------*/
+typedef
+cppu::WeakImplHelper2
+<
+ ::com::sun::star::container::XNameAccess,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwXTextFieldMastersBaseClass;
+class SwXTextFieldMasters : public SwXTextFieldMastersBaseClass,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXTextFieldMasters();
+public:
+ SwXTextFieldMasters(SwDoc* pDoc);
+
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+
+ static sal_Bool getInstanceName(const SwFieldType& rFldType, String& rName);
+};
+
+/* -----------------21.12.98 10:26-------------------
+ *
+ * --------------------------------------------------*/
+typedef
+cppu::WeakImplHelper3
+<
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::util::XRefreshable
+>
+SwXTextFieldTypesBaseClass;
+class SwXTextFieldTypes : public SwXTextFieldTypesBaseClass,
+ public SwUnoCollection
+{
+ SwRefreshListenerContainer aRefreshCont;
+protected:
+ virtual ~SwXTextFieldTypes();
+public:
+ SwXTextFieldTypes(SwDoc* pDoc);
+
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::util::XRefreshable
+ virtual void SAL_CALL refresh( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // SwUnoCollection
+ virtual void Invalidate();
+};
+
+/* -----------------21.12.98 14:49-------------------
+ *
+ * --------------------------------------------------*/
+class SwXFieldEnumeration : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::container::XEnumeration,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+{
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextField > > aItems;
+ sal_Int32 nNextIndex; // index of next element to be returned
+
+ SwDoc* pDoc;
+
+protected:
+ virtual ~SwXFieldEnumeration();
+public:
+ SwXFieldEnumeration(SwDoc* pDoc);
+
+ //XEnumeration
+ virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+#endif
+
+
+
diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx
new file mode 100644
index 000000000000..acc004d473ab
--- /dev/null
+++ b/sw/inc/unoflatpara.hxx
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOFLATPARA_HXX
+#define _UNOFLATPARA_HXX
+
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/text/XFlatParagraph.hpp>
+#include <com/sun/star/text/XFlatParagraphIterator.hpp>
+#include <calbck.hxx>
+#include <modeltoviewhelper.hxx>
+#include <unotextmarkup.hxx>
+
+#include <set>
+
+namespace css = com::sun::star;
+
+namespace com { namespace sun { namespace star { namespace container {
+ class XStringKeyMap;
+} } } }
+
+class SwTxtNode;
+class SwDoc;
+
+/******************************************************************************
+ * SwXFlatParagraph
+ ******************************************************************************/
+
+class SwXFlatParagraph:
+ public ::cppu::WeakImplHelper2
+ <
+ css::text::XFlatParagraph,
+ css::lang::XUnoTunnel
+ >,
+ public SwXTextMarkup
+{
+public:
+ SwXFlatParagraph( SwTxtNode& rTxtNode, rtl::OUString aExpandText, const ModelToViewHelper::ConversionMap* pConversionMap );
+ virtual ~SwXFlatParagraph();
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw();
+ virtual void SAL_CALL release( ) throw();
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // text::XTextMarkup:
+ virtual css::uno::Reference< css::container::XStringKeyMap > SAL_CALL getMarkupInfoContainer() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL commitTextMarkup(::sal_Int32 nType, const ::rtl::OUString & aIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const css::uno::Reference< css::container::XStringKeyMap > & xMarkupInfoContainer) throw (css::uno::RuntimeException);
+
+ // text::XFlatParagraph:
+ virtual ::rtl::OUString SAL_CALL getText() throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isModified() throw (css::uno::RuntimeException);
+ virtual void SAL_CALL setChecked(::sal_Int32 nType, ::sal_Bool bVal) throw (css::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isChecked(::sal_Int32 nType) throw (css::uno::RuntimeException);
+ virtual css::lang::Locale SAL_CALL getLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+ virtual css::lang::Locale SAL_CALL getPrimaryLanguageOfText(::sal_Int32 nPos, ::sal_Int32 nLen) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+ virtual void SAL_CALL changeText(::sal_Int32 nPos, ::sal_Int32 nLen, const ::rtl::OUString & aNewText, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+ virtual void SAL_CALL changeAttributes(::sal_Int32 nPos, ::sal_Int32 nLen, const css::uno::Sequence< css::beans::PropertyValue > & aAttributes) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+ virtual css::uno::Sequence< ::sal_Int32 > SAL_CALL getLanguagePortions() throw (css::uno::RuntimeException);
+
+ const SwTxtNode* getTxtNode() const;
+
+ static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 >& rId)
+ throw (css::uno::RuntimeException);
+
+private:
+ SwXFlatParagraph( const SwXFlatParagraph & ); // not defined
+ SwXFlatParagraph & operator = ( const SwXFlatParagraph & ); // not defined
+
+ rtl::OUString maExpandText;
+};
+
+/******************************************************************************
+ * SwXFlatParagraphIterator
+ ******************************************************************************/
+
+class SwXFlatParagraphIterator:
+ public ::cppu::WeakImplHelper1
+ <
+ css::text::XFlatParagraphIterator
+ >,
+ public SwClient // to get notified when doc is closed...
+{
+public:
+ SwXFlatParagraphIterator( SwDoc& rDoc, sal_Int32 nType, sal_Bool bAutomatic );
+ virtual ~SwXFlatParagraphIterator();
+
+ // text::XFlatParagraphIterator:
+ virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getFirstPara() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getNextPara() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getLastPara() throw (css::uno::RuntimeException);
+ virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaBefore(const css::uno::Reference< css::text::XFlatParagraph > & xPara) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+ virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaAfter(const css::uno::Reference< css::text::XFlatParagraph > & xPara) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+
+ // SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+
+private:
+ SwXFlatParagraphIterator( const SwXFlatParagraphIterator & ); // not defined
+ SwXFlatParagraphIterator & operator =(const SwXFlatParagraphIterator & ); // not defined
+
+ // container to hold the 'hard' references as long as necessary and valid
+ std::set< css::uno::Reference< css::text::XFlatParagraph > > m_aFlatParaList;
+
+ SwDoc* mpDoc;
+ const sal_Int32 mnType;
+ const sal_Bool mbAutomatic;
+
+ ULONG mnCurrentNode; // used for non-automatic mode
+ ULONG mnStartNode; // used for non-automatic mode
+ ULONG mnEndNode; // used for non-automatic mode
+ sal_Bool mbWrapped; // used for non-automatic mode
+};
+
+#endif
diff --git a/sw/inc/unofootnote.hxx b/sw/inc/unofootnote.hxx
new file mode 100644
index 000000000000..784a72098e87
--- /dev/null
+++ b/sw/inc/unofootnote.hxx
@@ -0,0 +1,229 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOFOOTNOTE_HXX
+#define SW_UNOFOOTNOTE_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XFootnote.hpp>
+
+#include <cppuhelper/implbase5.hxx>
+
+#include <unotext.hxx>
+
+
+class SwDoc;
+class SwModify;
+class SwFmtFtn;
+
+
+/*-----------------12.02.98 08:01-------------------
+
+--------------------------------------------------*/
+typedef ::cppu::WeakImplHelper5
+< ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::container::XEnumerationAccess
+, ::com::sun::star::text::XFootnote
+> SwXFootnote_Base;
+
+class SwXFootnote
+ : public SwXFootnote_Base
+ , public SwXText
+{
+
+private:
+
+ friend class SwXFootnotes;
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+
+protected:
+
+ virtual const SwStartNode *GetStartNode() const;
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor >
+ CreateCursor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ~SwXFootnote();
+
+ SwXFootnote(SwDoc & rDoc, const SwFmtFtn & rFmt);
+
+public:
+
+ SwXFootnote(const bool bEndnote);
+
+ static SwXFootnote *
+ CreateXFootnote(SwDoc & rDoc, SwFmtFtn const& rFootnoteFmt);
+ /// may return 0
+ static SwXFootnote *
+ GetXFootnote(SwModify const& rUnoCB, SwFmtFtn const& rFootnoteFmt);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() { OWeakObject::release(); }
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
+ SAL_CALL getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
+ getImplementationId()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& rValue)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTextContent
+ virtual void SAL_CALL attach(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XFootnote
+ virtual ::rtl::OUString SAL_CALL getLabel()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setLabel(const ::rtl::OUString& rLabel)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSimpleText
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor > SAL_CALL
+ createTextCursor()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor > SAL_CALL
+ createTextCursorByRange(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextPosition)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOFOOTNOTE_HXX
+
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
new file mode 100644
index 000000000000..65de34a4db7f
--- /dev/null
+++ b/sw/inc/unoframe.hxx
@@ -0,0 +1,379 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOFRAME_HXX
+#define _UNOFRAME_HXX
+
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
+#include <com/sun/star/text/XTextFrame.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/document/XEventsSupplier.hpp>
+
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase6.hxx>
+
+#include <sfx2/objsh.hxx>
+
+#include <flyenum.hxx>
+#include <frmfmt.hxx>
+#include <unoevtlstnr.hxx>
+#include <unotext.hxx>
+
+
+class SfxItemPropertSet;
+class SdrObject;
+class SwDoc;
+class SwFmt;
+class SwFlyFrmFmt;
+
+
+/*-----------------12.02.98 11:21-------------------
+
+--------------------------------------------------*/
+class BaseFrameProperties_Impl;
+class SwXFrame : public cppu::WeakImplHelper6
+<
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::drawing::XShape,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XUnoTunnel
+>,
+ public SwClient
+{
+ SwEventListenerContainer aLstnrCntnr;
+ const SfxItemPropertySet* m_pPropSet;
+ SwDoc* m_pDoc;
+
+ const FlyCntType eType;
+
+ // Descriptor-interface
+ BaseFrameProperties_Impl* pProps;
+ sal_Bool bIsDescriptor;
+ String sName;
+
+ SwPaM* m_pCopySource;
+
+protected:
+ com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData;
+ com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxStyleFamily;
+
+ virtual ~SwXFrame();
+public:
+ SwXFrame(FlyCntType eSet,
+ const SfxItemPropertySet* pPropSet,
+ SwDoc *pDoc ); //Descriptor-If
+ SwXFrame(SwFrmFmt& rFrmFmt, FlyCntType eSet,
+ const SfxItemPropertySet* pPropSet);
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ TYPEINFO();
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XShape
+ virtual ::com::sun::star::awt::Point SAL_CALL getPosition( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) 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 setSize( const ::com::sun::star::awt::Size& aSize ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
+
+ //XShapeDescriptor
+ virtual rtl::OUString SAL_CALL getShapeType(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //Basisimplementierung
+ //XComponent
+ virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ void attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ SwFrmFmt* GetFrmFmt() const
+ {
+ return PTR_CAST ( SwFrmFmt, GetRegisteredIn() );
+ }
+ FlyCntType GetFlyCntType()const {return eType;}
+
+ sal_Bool IsDescriptor() const {return bIsDescriptor;}
+ void ResetDescriptor();
+ //copy text from a given source PaM
+ void SetSelection(SwPaM& rCopySource);
+ static SdrObject *GetOrCreateSdrObject( SwFlyFrmFmt *pFmt );
+};
+/*-----------------20.02.98 11:28-------------------
+
+--------------------------------------------------*/
+typedef cppu::WeakImplHelper3
+<
+ ::com::sun::star::text::XTextFrame,
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::document::XEventsSupplier
+>
+SwXTextFrameBaseClass;
+
+class SwXTextFrame : public SwXTextFrameBaseClass,
+ public SwXText,
+ public SwXFrame
+{
+ const SfxItemPropertSet* _pPropSet;
+
+protected:
+ virtual const SwStartNode *GetStartNode() const;
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor >
+ CreateCursor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ~SwXTextFrame();
+public:
+ SwXTextFrame(SwDoc *pDoc);
+ SwXTextFrame(SwFrmFmt& rFmt);
+
+ // FIXME: EVIL HACK: make available for SwXFrame::attachToRange
+ void SetDoc(SwDoc *const pDoc) { SwXText::SetDoc(pDoc); };
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw();
+ virtual void SAL_CALL release( ) throw();
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextFrame
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess - frueher XParagraphEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XEventsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ void * SAL_CALL operator new( size_t ) throw();
+ void SAL_CALL operator delete( void * ) throw();
+};
+/*-----------------20.02.98 11:28-------------------
+
+--------------------------------------------------*/
+typedef cppu::WeakImplHelper2
+<
+ ::com::sun::star::text::XTextContent,
+ ::com::sun::star::document::XEventsSupplier
+>
+SwXTextGraphicObjectBaseClass;
+class SwXTextGraphicObject : public SwXTextGraphicObjectBaseClass,
+ public SwXFrame
+{
+protected:
+ virtual ~SwXTextGraphicObject();
+public:
+ SwXTextGraphicObject( SwDoc *pDoc );
+ SwXTextGraphicObject(SwFrmFmt& rFmt);
+
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw();
+ virtual void SAL_CALL release( ) throw();
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XEventsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
+ void * SAL_CALL operator new( size_t ) throw();
+ void SAL_CALL operator delete( void * ) throw();
+};
+/*-----------------20.02.98 11:28-------------------
+
+--------------------------------------------------*/
+class SwOLENode;
+typedef cppu::WeakImplHelper3
+<
+ ::com::sun::star::text::XTextContent,
+ ::com::sun::star::document::XEmbeddedObjectSupplier2,
+ ::com::sun::star::document::XEventsSupplier
+>SwXTextEmbeddedObjectBaseClass;
+
+class SwXTextEmbeddedObject : public SwXTextEmbeddedObjectBaseClass,
+ public SwXFrame
+{
+protected:
+ virtual ~SwXTextEmbeddedObject();
+
+public:
+ SwXTextEmbeddedObject( SwDoc *pDoc );
+ SwXTextEmbeddedObject(SwFrmFmt& rFmt);
+
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw();
+ virtual void SAL_CALL release( ) throw();
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEmbeddedObjectSupplier2
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL getEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > SAL_CALL getExtendedControlOverEmbeddedObject(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::sal_Int64 SAL_CALL getAspect() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setAspect( ::sal_Int64 _aspect ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL getReplacementGraphic() throw (::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XEventsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
+ void * SAL_CALL operator new( size_t ) throw();
+ void SAL_CALL operator delete( void * ) throw();
+};
+
+
+
+class SwXOLEListener : public cppu::WeakImplHelper1
+<
+ ::com::sun::star::util::XModifyListener
+>,
+ public SwClient
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLEModel;
+// SfxObjectShell* GetObjShell( const SwFmt& rFmt,
+// SwOLENode** ppNd = 0 ) const;
+ SwFmt* GetFmt() const { return (SwFmt*)GetRegisteredIn(); }
+public:
+ SwXOLEListener(SwFmt& rOLEFmt, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xOLE);
+ ~SwXOLEListener();
+ TYPEINFO();
+
+// ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::util::XModifyListener
+ virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException);
+
+ void Modify( SfxPoolItem*, SfxPoolItem* );
+};
+
+
+
+#endif
+
diff --git a/sw/inc/unoidx.hxx b/sw/inc/unoidx.hxx
new file mode 100644
index 000000000000..fe42330685a6
--- /dev/null
+++ b/sw/inc/unoidx.hxx
@@ -0,0 +1,375 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOIDX_HXX
+#define _UNOIDX_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/text/XDocumentIndexMark.hpp>
+#include <com/sun/star/text/XDocumentIndex.hpp>
+
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase5.hxx>
+
+#include <sfx2/Metadatable.hxx>
+
+#include <unocoll.hxx>
+#include <toxe.hxx>
+
+
+class SwTOXBaseSection;
+class SwTOXMark;
+class SwTOXType;
+
+/* -----------------07.12.98 10:08-------------------
+ *
+ * --------------------------------------------------*/
+
+typedef ::cppu::ImplInheritanceHelper5
+< ::sfx2::MetadatableMixin
+, ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::container::XNamed
+, ::com::sun::star::text::XDocumentIndex
+> SwXDocumentIndex_Base;
+
+class SwXDocumentIndex
+ : public SwXDocumentIndex_Base
+{
+
+private:
+
+ class StyleAccess_Impl;
+ class TokenAccess_Impl;
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXDocumentIndex();
+
+ SwXDocumentIndex(SwTOXBaseSection const&, SwDoc &);
+
+public:
+
+ /// descriptor
+ SwXDocumentIndex(const TOXTypes eToxType, SwDoc& rDoc);
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XDocumentIndex>
+ CreateXDocumentIndex(SwDoc & rDoc, SwTOXBaseSection const& rSection);
+
+ // MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetModel();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& rValue)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XNamed
+ virtual ::rtl::OUString SAL_CALL getName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setName(const ::rtl::OUString& rName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTextContent
+ virtual void SAL_CALL attach(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+
+ // XDocumentIndex
+ virtual ::rtl::OUString SAL_CALL getServiceName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL update()
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+/* -----------------07.12.98 10:08-------------------
+ *
+ * --------------------------------------------------*/
+typedef ::cppu::WeakImplHelper4
+< ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::text::XDocumentIndexMark
+> SwXDocumentIndexMark_Base;
+
+class SwXDocumentIndexMark
+ : public SwXDocumentIndexMark_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXDocumentIndexMark();
+
+ SwXDocumentIndexMark(SwDoc & rDoc,
+ SwTOXType & rType, SwTOXMark & rMark);
+
+public:
+
+ /// descriptor
+ SwXDocumentIndexMark(const TOXTypes eToxType);
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XDocumentIndexMark>
+ CreateXDocumentIndexMark(SwDoc & rDoc,
+ SwTOXType & rType, SwTOXMark & rMark);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& rValue)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XTextContent
+ virtual void SAL_CALL attach(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XDocumentIndexMark
+ virtual rtl::OUString SAL_CALL getMarkEntry()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setMarkEntry(const rtl::OUString& rIndexEntry)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+/* -----------------05.05.99 12:27-------------------
+ *
+ * --------------------------------------------------*/
+class SwXDocumentIndexes
+ : public SwCollectionBaseClass
+ , public SwUnoCollection
+{
+
+private:
+
+ virtual ~SwXDocumentIndexes();
+
+public:
+
+ SwXDocumentIndexes(SwDoc *const pDoc);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex)
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(
+ const ::rtl::OUString& rName)
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getElementNames() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasByName(const ::rtl::OUString& rName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif
+
diff --git a/sw/inc/unomailmerge.hxx b/sw/inc/unomailmerge.hxx
new file mode 100644
index 000000000000..39a9664c4123
--- /dev/null
+++ b/sw/inc/unomailmerge.hxx
@@ -0,0 +1,206 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOMAILMERGE_HXX_
+#define _UNOMAILMERGE_HXX_
+
+#include <functional>
+#include <cppuhelper/implbase5.hxx> // WeakImplHelper4
+#include <cppuhelper/interfacecontainer.hxx> // OMultiTypeInterfaceContainerHelperVar
+#include <unotools/configitem.hxx> // !! needed for OMultiTypeInterfaceContainerHelperVar !!
+
+
+#include <com/sun/star/task/XJob.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#include <com/sun/star/text/XMailMergeBroadcaster.hpp>
+#include <svl/itemprop.hxx>
+#include <sfx2/objsh.hxx> // SfxObjectShellRef
+
+#include <functional>
+
+namespace com { namespace sun { namespace star {
+
+ namespace sdbc {
+ class XResultSet;
+ class XConnection;
+ }
+ namespace frame {
+ class XModel;
+ }
+ namespace lang {
+ class XMultiServiceFactory;
+ }
+ namespace text {
+ class XMailMergeListener;
+ struct MailMergeEvent;
+ }
+ namespace beans{
+ struct PropertyValue;
+ }
+
+}}}
+
+namespace rtl {
+ class OUString;
+}
+
+///////////////////////////////////////////////////////////////////////////
+
+// uses templates from <cppuhelper/interfacecontainer.h>
+// and <unotools/configitem.hxx>
+
+// helper function call class
+struct PropHashType_Impl
+{
+ size_t operator()(const INT32 &s) const { return s; }
+};
+
+typedef cppu::OMultiTypeInterfaceContainerHelperVar
+ <
+ INT32,
+ PropHashType_Impl,
+ std::equal_to< INT32 >
+ > OPropertyListenerContainerHelper;
+
+////////////////////////////////////////////////////////////
+
+class SwXMailMerge :
+ public cppu::WeakImplHelper5
+ <
+ com::sun::star::task::XJob,
+ com::sun::star::beans::XPropertySet,
+ com::sun::star::text::XMailMergeBroadcaster,
+ com::sun::star::lang::XComponent,
+ com::sun::star::lang::XServiceInfo
+ >
+{
+ cppu::OInterfaceContainerHelper aEvtListeners;
+ cppu::OInterfaceContainerHelper aMergeListeners;
+ OPropertyListenerContainerHelper aPropListeners;
+
+ //SfxItemPropertySet aPropSet;
+ const SfxItemPropertySet* pPropSet;
+
+ SfxObjectShellRef xDocSh; // the document
+
+ String aTmpFileName;
+
+ // properties of mail merge service
+ com::sun::star::uno::Sequence< com::sun::star::uno::Any > aSelection;
+ com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSet > xResultSet;
+ com::sun::star::uno::Reference< com::sun::star::sdbc::XConnection > xConnection;
+ com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel;
+ rtl::OUString aDataSourceName;
+ rtl::OUString aDataCommand;
+ rtl::OUString aFilter;
+ rtl::OUString aDocumentURL;
+ rtl::OUString aOutputURL;
+ rtl::OUString aFileNamePrefix;
+ sal_Int32 nDataCommandType;
+ sal_Int16 nOutputType;
+ sal_Bool bEscapeProcessing;
+ sal_Bool bSinglePrintJobs;
+ sal_Bool bFileNameFromColumn;
+
+
+ ::rtl::OUString sInServerPassword;
+ ::rtl::OUString sOutServerPassword;
+ ::rtl::OUString sSubject;
+ ::rtl::OUString sAddressFromColumn;
+ ::rtl::OUString sMailBody;
+ ::rtl::OUString sAttachmentName;
+ ::rtl::OUString sAttachmentFilter;
+ com::sun::star::uno::Sequence< ::rtl::OUString > aCopiesTo;
+ com::sun::star::uno::Sequence< ::rtl::OUString > aBlindCopiesTo;
+ sal_Bool bSendAsHTML;
+ sal_Bool bSendAsAttachment;
+
+ com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aPrintSettings;
+
+ sal_Bool bSaveAsSingleFile;
+ ::rtl::OUString sSaveFilter;
+ ::rtl::OUString sSaveFilterOptions;
+ com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSaveFilterData;
+
+
+
+ sal_Bool bDisposing;
+
+
+ void launchEvent( const com::sun::star::beans::PropertyChangeEvent &rEvt ) const;
+
+ // disallow use of copy-constructor and assignment-operator for now
+ SwXMailMerge( const SwXMailMerge & );
+ SwXMailMerge & operator = ( const SwXMailMerge & );
+protected:
+ virtual ~SwXMailMerge();
+public:
+ SwXMailMerge();
+
+
+ void LaunchMailMergeEvent( const com::sun::star::text::MailMergeEvent &rData ) const;
+
+ // XJob
+ virtual ::com::sun::star::uno::Any SAL_CALL execute( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // XMailMergeBroadcaster
+ virtual void SAL_CALL addMailMergeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XMailMergeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeMailMergeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XMailMergeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+};
+
+
+extern com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL SwXMailMerge_getSupportedServiceNames() throw();
+extern rtl::OUString SAL_CALL SwXMailMerge_getImplementationName() throw();
+extern com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SwXMailMerge_createInstance(const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( com::sun::star::uno::Exception );
+
+////////////////////////////////////////////////////////////
+
+#endif
+
+
diff --git a/sw/inc/unomap.hxx b/sw/inc/unomap.hxx
new file mode 100644
index 000000000000..abeedbd8a0de
--- /dev/null
+++ b/sw/inc/unomap.hxx
@@ -0,0 +1,349 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOMAP_HXX
+#define _UNOMAP_HXX
+
+#include <svl/itemprop.hxx>
+
+#define PROPERTY_NONE 0
+
+#define PROPERTY_MAP_TEXT_CURSOR 0
+#define PROPERTY_MAP_CHAR_STYLE 1
+#define PROPERTY_MAP_PARA_STYLE 2
+#define PROPERTY_MAP_FRAME_STYLE 3
+#define PROPERTY_MAP_PAGE_STYLE 4
+#define PROPERTY_MAP_NUM_STYLE 5
+#define PROPERTY_MAP_SECTION 6
+#define PROPERTY_MAP_TEXT_TABLE 7
+#define PROPERTY_MAP_TABLE_CELL 8
+#define PROPERTY_MAP_TABLE_RANGE 9
+#define PROPERTY_MAP_TEXT_SEARCH 10
+#define PROPERTY_MAP_TEXT_FRAME 11
+#define PROPERTY_MAP_TEXT_GRAPHIC 12
+#define PROPERTY_MAP_TEXT_SHAPE 13
+#define PROPERTY_MAP_INDEX_USER 14
+#define PROPERTY_MAP_INDEX_CNTNT 15
+#define PROPERTY_MAP_INDEX_IDX 16
+#define PROPERTY_MAP_USER_MARK 17
+#define PROPERTY_MAP_CNTIDX_MARK 18
+#define PROPERTY_MAP_INDEX_MARK 19
+#define PROPERTY_MAP_TEXT_TABLE_ROW 20
+#define PROPERTY_MAP_TEXT_SHAPE_DESCRIPTOR 21
+#define PROPERTY_MAP_TEXT_TABLE_CURSOR 22
+#define PROPERTY_MAP_BOOKMARK 23
+#define PROPERTY_MAP_PARAGRAPH_EXTENSIONS 24
+#define PROPERTY_MAP_INDEX_ILLUSTRATIONS 25
+#define PROPERTY_MAP_INDEX_OBJECTS 26
+#define PROPERTY_MAP_INDEX_TABLES 27
+#define PROPERTY_MAP_BIBLIOGRAPHY 28
+#define PROPERTY_MAP_TEXT_DOCUMENT 29
+#define PROPERTY_MAP_LINK_TARGET 30
+#define PROPERTY_MAP_AUTO_TEXT_GROUP 31
+#define PROPERTY_MAP_TEXTPORTION_EXTENSIONS 34
+#define PROPERTY_MAP_FOOTNOTE 35
+#define PROPERTY_MAP_TEXT_COLUMS 36
+#define PROPERTY_MAP_PARAGRAPH 37
+#define PROPERTY_MAP_EMBEDDED_OBJECT 38
+#define PROPERTY_MAP_REDLINE 39
+#define PROPERTY_MAP_TEXT_DEFAULT 40
+
+#define PROPERTY_MAP_FLDTYP_DATETIME 41
+#define PROPERTY_MAP_FLDTYP_USER 42
+#define PROPERTY_MAP_FLDTYP_SET_EXP 43
+#define PROPERTY_MAP_FLDTYP_GET_EXP 44
+#define PROPERTY_MAP_FLDTYP_FILE_NAME 45
+#define PROPERTY_MAP_FLDTYP_PAGE_NUM 46
+#define PROPERTY_MAP_FLDTYP_AUTHOR 47
+#define PROPERTY_MAP_FLDTYP_CHAPTER 48
+#define PROPERTY_MAP_FLDTYP_GET_REFERENCE 49
+#define PROPERTY_MAP_FLDTYP_CONDITIONED_TEXT 50
+#define PROPERTY_MAP_FLDTYP_HIDDEN_TEXT 51
+#define PROPERTY_MAP_FLDTYP_ANNOTATION 52
+#define PROPERTY_MAP_FLDTYP_INPUT 53
+#define PROPERTY_MAP_FLDTYP_MACRO 54
+#define PROPERTY_MAP_FLDTYP_DDE 55
+#define PROPERTY_MAP_FLDTYP_HIDDEN_PARA 56
+#define PROPERTY_MAP_FLDTYP_DOC_INFO 57
+#define PROPERTY_MAP_FLDTYP_TEMPLATE_NAME 58
+#define PROPERTY_MAP_FLDTYP_USER_EXT 59
+#define PROPERTY_MAP_FLDTYP_REF_PAGE_SET 60
+#define PROPERTY_MAP_FLDTYP_REF_PAGE_GET 61
+#define PROPERTY_MAP_FLDTYP_JUMP_EDIT 62
+#define PROPERTY_MAP_FLDTYP_SCRIPT 63
+#define PROPERTY_MAP_FLDTYP_DATABASE_NEXT_SET 64
+#define PROPERTY_MAP_FLDTYP_DATABASE_NUM_SET 65
+#define PROPERTY_MAP_FLDTYP_DATABASE_SET_NUM 66
+#define PROPERTY_MAP_FLDTYP_DATABASE 67
+#define PROPERTY_MAP_FLDTYP_DATABASE_NAME 68
+#define PROPERTY_MAP_FLDTYP_DOCSTAT 69
+#define PROPERTY_MAP_FLDTYP_DOCINFO_AUTHOR 70
+#define PROPERTY_MAP_FLDTYP_DOCINFO_DATE_TIME 71
+#define PROPERTY_MAP_FLDTYP_DOCINFO_CHANGE_DATE_TIME 72
+#define PROPERTY_MAP_FLDTYP_DOCINFO_CREATE_DATE_TIME 73
+#define PROPERTY_MAP_FLDTYP_DOCINFO_EDIT_TIME 74
+#define PROPERTY_MAP_FLDTYP_DOCINFO_MISC 75
+#define PROPERTY_MAP_FLDTYP_DOCINFO_REVISION 76
+#define PROPERTY_MAP_FLDTYP_COMBINED_CHARACTERS 77
+#define PROPERTY_MAP_FLDTYP_DUMMY_0 78
+#define PROPERTY_MAP_FLDTYP_TABLE_FORMULA 79
+#define PROPERTY_MAP_FLDMSTR_USER 80
+#define PROPERTY_MAP_FLDMSTR_DDE 81
+#define PROPERTY_MAP_FLDMSTR_SET_EXP 82
+#define PROPERTY_MAP_FLDMSTR_DATABASE 83
+#define PROPERTY_MAP_FLDMSTR_DUMMY0 84
+#define PROPERTY_MAP_FLDTYP_BIBLIOGRAPHY 85
+#define PROPERTY_MAP_FLDMSTR_BIBLIOGRAPHY 86
+#define PROPERTY_MAP_TEXT 87
+#define PROPERTY_MAP_REDLINE_PORTION 88
+#define PROPERTY_MAP_MAILMERGE 89
+#define PROPERTY_MAP_FLDTYP_DROPDOWN 90
+#define PROPERTY_MAP_CHART2_DATA_SEQUENCE 91
+#define PROPERTY_MAP_TEXT_VIEW 92
+#define PROPERTY_MAP_CONDITIONAL_PARA_STYLE 93
+#define PROPERTY_MAP_CHAR_AUTO_STYLE 94
+#define PROPERTY_MAP_RUBY_AUTO_STYLE 95
+#define PROPERTY_MAP_PARA_AUTO_STYLE 96
+#define PROPERTY_MAP_FLDTYP_DOCINFO_CUSTOM 97
+#define PROPERTY_MAP_METAFIELD 98
+
+#define PROPERTY_MAP_END 99
+
+//S&E
+#define WID_WORDS 0
+#define WID_BACKWARDS 1
+#define WID_REGULAR_EXPRESSION 2
+#define WID_CASE_SENSITIVE 3
+#define WID_IN_SELECTION 4
+#define WID_STYLES 5
+#define WID_SIMILARITY 6
+#define WID_SIMILARITY_RELAX 7
+#define WID_SIMILARITY_EXCHANGE 8
+#define WID_SIMILARITY_ADD 9
+#define WID_SIMILARITY_REMOVE 10
+#define WID_SEARCH_ALL 11
+
+//Sections
+#define WID_SECT_CONDITION 8000
+#define WID_SECT_DDE_TYPE 8001
+#define WID_SECT_DDE_FILE 8002
+#define WID_SECT_DDE_ELEMENT 8003
+#define WID_SECT_LINK 8004
+#define WID_SECT_VISIBLE 8005
+#define WID_SECT_PROTECTED 8006
+#define WID_SECT_REGION 8007
+#define WID_SECT_DDE_AUTOUPDATE 8008
+#define WID_SECT_DOCUMENT_INDEX 8009
+#define WID_SECT_IS_GLOBAL_DOC_SECTION 8010
+#define WID_SECT_PASSWORD 8011
+#define WID_SECT_CURRENTLY_VISIBLE 8012
+#define WID_SECT_EDIT_IN_READONLY 8013
+
+
+//Verzeichnisse
+#define WID_PRIMARY_KEY 1000
+#define WID_SECONDARY_KEY 1001
+#define WID_ALT_TEXT 1002
+#define WID_IDX_TITLE 1003
+#define WID_LEVEL 1004
+#define WID_CREATE_FROM_MARKS 1005
+#define WID_CREATE_FROM_OUTLINE 1006
+#define WID_MAIN_ENTRY 1007
+#define WID_CREATE_FROM_CHAPTER 1008
+#define WID_CREATE_FROM_LABELS 1009
+#define WID_USE_ALPHABETICAL_SEPARATORS 1010
+#define WID_USE_KEY_AS_ENTRY 1011
+#define WID_USE_COMBINED_ENTRIES 1012
+#define WID_IS_CASE_SENSITIVE 1013
+#define WID_USE_P_P 1014
+#define WID_USE_DASH 1015
+#define WID_USE_UPPER_CASE 1016
+#define WID_INDEX_AUTO_MARK_FILE_U_R_L 1017
+#define WID_LABEL_CATEGORY 1018
+#define WID_LABEL_DISPLAY_TYPE 1019
+#define WID_USE_LEVEL_FROM_SOURCE 1020
+#define WID_LEVEL_FORMAT 1021
+#define WID_LEVEL_PARAGRAPH_STYLES 1022
+#define WID_RECALC_TAB_STOPS 1023
+//#define WID_??? 1024
+#define WID_MAIN_ENTRY_CHARACTER_STYLE_NAME 1025
+#define WID_CREATE_FROM_TABLES 1026
+#define WID_CREATE_FROM_TEXT_FRAMES 1027
+#define WID_CREATE_FROM_GRAPHIC_OBJECTS 1028
+#define WID_CREATE_FROM_EMBEDDED_OBJECTS 1029
+#define WID_CREATE_FROM_STAR_MATH 1030
+#define WID_PROTECTED 1031
+
+#define WID_CREATE_FROM_STAR_CHART 1032
+#define WID_CREATE_FROM_STAR_CALC 1033
+#define WID_CREATE_FROM_STAR_DRAW 1034
+#define WID_CREATE_FROM_OTHER_EMBEDDED_OBJECTS 1035
+#define WID_USER_IDX_NAME 1036
+#define WID_PARA_HEAD 1037
+#define WID_PARA_SEP 1038
+#define WID_PARA_LEV1 1039
+#define WID_PARA_LEV2 1040
+#define WID_PARA_LEV3 1041
+#define WID_PARA_LEV4 1042
+#define WID_PARA_LEV5 1043
+#define WID_PARA_LEV6 1044
+#define WID_PARA_LEV7 1045
+#define WID_PARA_LEV8 1046
+#define WID_PARA_LEV9 1047
+#define WID_PARA_LEV10 1048
+#define WID_IS_COMMA_SEPARATED 1049
+#define WID_INDEX_MARKS 1050
+#define WID_IS_RELATIVE_TABSTOPS 1051
+#define WID_CREATE_FROM_PARAGRAPH_STYLES 1052
+#define WID_IDX_CONTENT_SECTION 1053
+#define WID_IDX_HEADER_SECTION 1054
+#define WID_IDX_LOCALE 1055
+#define WID_IDX_SORT_ALGORITHM 1056
+#define WID_IDX_NAME 1057
+
+#define WID_TEXT_READING 1058
+#define WID_PRIMARY_KEY_READING 1059
+#define WID_SECONDARY_KEY_READING 1060
+
+//text document
+#define WID_DOC_CHAR_COUNT 1000
+#define WID_DOC_PARA_COUNT 1001
+#define WID_DOC_WORD_COUNT 1002
+#define WID_DOC_WORD_SEPARATOR 1003
+#define WID_DOC_CHANGES_SHOW 1004
+#define WID_DOC_CHANGES_RECORD 1005
+#define WID_DOC_AUTO_MARK_URL 1006
+#define WID_DOC_HIDE_TIPS 1007
+#define WID_DOC_REDLINE_DISPLAY 1008
+#define WID_DOC_FORBIDDEN_CHARS 1009
+#define WID_DOC_CHANGES_PASSWORD 1010
+#define WID_DOC_TWO_DIGIT_YEAR 1011
+#define WID_DOC_AUTOMATIC_CONTROL_FOCUS 1012
+#define WID_DOC_APPLY_FORM_DESIGN_MODE 1013
+#define WID_DOC_BASIC_LIBRARIES 1014
+#define WID_DOC_RUNTIME_UID 1015
+#define WID_DOC_LOCK_UPDATES 1016
+#define WID_DOC_HAS_VALID_SIGNATURES 1017
+#define WID_DOC_BUILDID 1024
+#define WID_DOC_ISTEMPLATEID 1025
+// --> OD 2006-03-21 #b6375613#
+#define WID_APPLY_WORKAROUND_FOR_B6375613 1070
+// <--
+
+//MailMerge
+#define WID_SELECTION 1071
+#define WID_RESULT_SET 1072
+#define WID_CONNECTION 1073
+#define WID_MODEL 1074
+#define WID_DATA_SOURCE_NAME 1075
+#define WID_DATA_COMMAND 1076
+#define WID_FILTER 1077
+#define WID_DOCUMENT_URL 1078
+#define WID_OUTPUT_URL 1079
+#define WID_DATA_COMMAND_TYPE 1080
+#define WID_OUTPUT_TYPE 1081
+#define WID_ESCAPE_PROCESSING 1082
+#define WID_SINGLE_PRINT_JOBS 1083
+#define WID_FILE_NAME_FROM_COLUMN 1084
+#define WID_FILE_NAME_PREFIX 1085
+#define WID_MAIL_SUBJECT 1086
+#define WID_ADDRESS_FROM_COLUMN 1087
+#define WID_SEND_AS_HTML 1088
+#define WID_SEND_AS_ATTACHMENT 1089
+#define WID_MAIL_BODY 1090
+#define WID_ATTACHMENT_NAME 1091
+#define WID_ATTACHMENT_FILTER 1092
+#define WID_PRINT_OPTIONS 1093
+#define WID_SAVE_AS_SINGLE_FILE 1094
+#define WID_SAVE_FILTER 1095
+#define WID_COPIES_TO 1096
+#define WID_BLIND_COPIES_TO 1097
+#define WID_IN_SERVER_PASSWORD 1098
+#define WID_OUT_SERVER_PASSWORD 1099
+#define WID_SAVE_FILTER_OPTIONS 1100
+#define WID_SAVE_FILTER_DATA 1101
+
+#define WID_PAGE_COUNT 1100
+#define WID_LINE_COUNT 1101
+#define WID_IS_CONSTANT_SPELLCHECK 1102
+#define WID_IS_HIDE_SPELL_MARKS 1103 /* deprecated #i91949 */
+
+#define WID_LAYOUT_SIZE 1104
+#define WID_DOC_DIALOG_LIBRARIES 1105
+#define WID_DOC_VBA_DOCOBJ 1106
+
+
+//AutoText
+#define WID_GROUP_PATH 0
+#define WID_GROUP_TITLE 1
+
+//NumberingRules
+#define WID_IS_AUTOMATIC 0
+#define WID_CONTINUOUS 1
+#define WID_RULE_NAME 2
+#define WID_IS_ABS_MARGINS 3
+#define WID_IS_OUTLINE 4
+#define WID_DEFAULT_LIST_ID 5
+
+//TextColumns
+#define WID_TXTCOL_LINE_WIDTH 0
+#define WID_TXTCOL_LINE_COLOR 1
+#define WID_TXTCOL_LINE_REL_HGT 2
+#define WID_TXTCOL_LINE_ALIGN 3
+#define WID_TXTCOL_LINE_IS_ON 4
+#define WID_TXTCOL_IS_AUTOMATIC 5
+#define WID_TXTCOL_AUTO_DISTANCE 6
+
+/* -----------------04.07.98 11:41-------------------
+ *
+ * --------------------------------------------------*/
+class SwItemPropertySet : public SfxItemPropertySet
+{
+protected:
+ virtual sal_Bool FillItem(SfxItemSet& rSet, sal_uInt16 nWhich, sal_Bool bGetProperty) const;
+public:
+ SwItemPropertySet( const SfxItemPropertyMapEntry *pMap ) :
+ SfxItemPropertySet( pMap ){}
+};
+/* -----------------04.07.98 11:41-------------------
+ *
+ * --------------------------------------------------*/
+class SwUnoPropertyMapProvider
+{
+ SfxItemPropertyMapEntry* aMapEntriesArr[PROPERTY_MAP_END];
+ SfxItemPropertySet* aPropertySetArr[PROPERTY_MAP_END];
+
+public:
+ SwUnoPropertyMapProvider();
+ ~SwUnoPropertyMapProvider();
+
+ const SfxItemPropertyMapEntry* GetPropertyMapEntries(sal_uInt16 PropertyId);
+ const SfxItemPropertySet* GetPropertySet( sal_uInt16 PropertyId );
+
+};
+
+extern SwUnoPropertyMapProvider aSwMapProvider;
+#endif
diff --git a/sw/inc/unomid.h b/sw/inc/unomid.h
new file mode 100644
index 000000000000..8f35f4146c59
--- /dev/null
+++ b/sw/inc/unomid.h
@@ -0,0 +1,157 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOMID_HXX
+#define SW_UNOMID_HXX
+
+#define C2S(cChar) String::CreateFromAscii( cChar )
+#define C2U(cChar) rtl::OUString::createFromAscii( cChar )
+
+#define MID_MIRROR_VERT 0
+#define MID_MIRROR_HORZ_EVEN_PAGES 1
+#define MID_MIRROR_HORZ_ODD_PAGES 2
+
+#define MID_PAGEDESC_PAGEDESCNAME 0
+#define MID_PAGEDESC_PAGENUMOFFSET 1
+
+#define MID_SURROUND_SURROUNDTYPE 0
+#define MID_SURROUND_ANCHORONLY 1
+#define MID_SURROUND_CONTOUR 2
+#define MID_SURROUND_CONTOUROUTSIDE 3
+
+#define MID_VERTORIENT_ORIENT 0
+#define MID_VERTORIENT_RELATION 1
+#define MID_VERTORIENT_POSITION 2
+
+#define MID_HORIORIENT_ORIENT 0
+#define MID_HORIORIENT_RELATION 1
+#define MID_HORIORIENT_POSITION 2
+#define MID_HORIORIENT_PAGETOGGLE 3
+
+#define MID_ANCHOR_ANCHORTYPE 0
+#define MID_ANCHOR_PAGENUM 1
+#define MID_ANCHOR_ANCHORFRAME 2
+
+#define MID_URL_HYPERLINKFORMAT 0
+#define MID_URL_HYPERLINKNAME 1
+#define MID_URL_CLIENTMAP 2
+#define MID_URL_SERVERMAP 3
+#define MID_URL_URL 4
+#define MID_URL_TARGET 5
+#define MID_URL_VISITED_FMT 6
+#define MID_URL_UNVISITED_FMT 7
+#define MID_URL_HYPERLINKEVENTS 8
+
+#define MID_CHAIN_PREVNAME 0
+#define MID_CHAIN_NEXTNAME 1
+
+#define MID_LINENUMBER_COUNT 0
+#define MID_LINENUMBER_STARTVALUE 1
+
+#define MID_DROPCAP_FORMAT 0
+#define MID_DROPCAP_WHOLE_WORD 1
+#define MID_DROPCAP_CHAR_STYLE_NAME 2
+#define MID_DROPCAP_LINES 3
+#define MID_DROPCAP_COUNT 4
+#define MID_DROPCAP_DISTANCE 5
+
+#define MID_FRMSIZE_SIZE 0
+#define MID_FRMSIZE_REL_HEIGHT 1
+#define MID_FRMSIZE_REL_WIDTH 2
+
+#define MID_FRMSIZE_WIDTH 4
+#define MID_FRMSIZE_HEIGHT 5
+#define MID_FRMSIZE_SIZE_TYPE 6
+#define MID_FRMSIZE_IS_AUTO_HEIGHT 7
+/* XML only */
+#define MID_FRMSIZE_MIN_HEIGHT 8
+#define MID_FRMSIZE_FIX_HEIGHT 9
+#define MID_FRMSIZE_COL_WIDTH 10
+#define MID_FRMSIZE_REL_COL_WIDTH 11
+/* UNO */
+#define MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT 12
+#define MID_FRMSIZE_IS_SYNC_HEIGHT_TO_WIDTH 13
+#define MID_FRMSIZE_WIDTH_TYPE 14
+
+#define MID_COLUMNS 0
+#define MID_COLUMN_SEPARATOR_LINE 1
+
+//SwFmtFtnAtTxtEnd
+#define MID_COLLECT 0
+#define MID_RESTART_NUM 1
+#define MID_NUM_START_AT 2
+#define MID_OWN_NUM 3
+#define MID_NUM_TYPE 4
+#define MID_PREFIX 5
+#define MID_SUFFIX 6
+
+//page style footnote
+#define MID_FTN_HEIGHT 0
+#define MID_LINE_WEIGHT 1
+#define MID_LINE_COLOR 2
+#define MID_LINE_RELWIDTH 3
+#define MID_LINE_ADJUST 4
+#define MID_LINE_TEXT_DIST 5
+#define MID_LINE_FOOTNOTE_DIST 6
+
+//SwFmtRuby
+#define MID_RUBY_TEXT 0
+#define MID_RUBY_ADJUST 1
+#define MID_RUBY_CHARSTYLE 2
+#define MID_RUBY_ABOVE 3
+
+//SwTextGridItem
+#define MID_GRID_COLOR 0
+#define MID_GRID_LINES 1
+#define MID_GRID_BASEHEIGHT 2
+#define MID_GRID_RUBYHEIGHT 3
+#define MID_GRID_TYPE 4
+#define MID_GRID_RUBY_BELOW 5
+#define MID_GRID_PRINT 6
+#define MID_GRID_DISPLAY 7
+#define MID_GRID_BASEWIDTH 8
+#define MID_GRID_SNAPTOCHARS 9
+#define MID_GRID_STANDARD_MODE 10
+
+//SwEnvItem
+#define MID_ENV_ADDR_TEXT 1
+#define MID_ENV_SEND 2
+#define MID_SEND_TEXT 3
+#define MID_ENV_ADDR_FROM_LEFT 4
+#define MID_ENV_ADDR_FROM_TOP 5
+#define MID_ENV_SEND_FROM_LEFT 6
+#define MID_ENV_SEND_FROM_TOP 7
+#define MID_ENV_WIDTH 8
+#define MID_ENV_HEIGHT 9
+#define MID_ENV_ALIGN 10
+#define MID_ENV_PRINT_FROM_ABOVE 11
+#define MID_ENV_SHIFT_RIGHT 12
+#define MID_ENV_SHIFT_DOWN 13
+
+// OD 2004-05-04 #i28701# - SwFmtWrapInfluenceOnObjPos
+#define MID_WRAP_INFLUENCE 0
+
+#endif
diff --git a/sw/inc/unomod.hxx b/sw/inc/unomod.hxx
new file mode 100644
index 000000000000..b65ae69d49fe
--- /dev/null
+++ b/sw/inc/unomod.hxx
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOMOD_HXX
+#define _UNOMOD_HXX
+
+#include <com/sun/star/text/XModule.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/view/XPrintSettingsSupplier.hpp>
+#include <com/sun/star/view/XViewSettingsSupplier.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <cppuhelper/implbase2.hxx> // helper for implementations
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <comphelper/ChainablePropertySet.hxx>
+#include <comphelper/SettingsHelper.hxx>
+#include <usrpref.hxx>
+
+class SwView;
+class SwViewOption;
+class SwPrintData;
+class SwDoc;
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+/*-----------------15.03.98 13:21-------------------
+
+--------------------------------------------------*/
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SwXModule_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & );
+
+class SwXModule : public cppu::WeakImplHelper4
+<
+ ::com::sun::star::text::XModule,
+ ::com::sun::star::view::XViewSettingsSupplier,
+ ::com::sun::star::view::XPrintSettingsSupplier,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxViewSettings;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxPrintSettings;
+
+protected:
+ virtual ~SwXModule();
+public:
+ SwXModule();
+
+
+ //XViewSettings
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getViewSettings(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPrintSettings
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getPrintSettings(void)
+ 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& ServiceName)
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+};
+
+enum SwXPrintSettingsType
+{
+ PRINT_SETTINGS_MODULE,
+ PRINT_SETTINGS_WEB,
+ PRINT_SETTINGS_DOCUMENT
+};
+
+class SwXPrintSettings : public comphelper::ChainableHelperNoState
+{
+ friend class SwXDocumentSettings;
+protected:
+ SwXPrintSettingsType meType;
+ SwPrintData * mpPrtOpt;
+ SwDoc *mpDoc;
+
+ virtual void _preSetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _postSetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+
+ virtual void _preGetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _postGetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+
+ virtual ~SwXPrintSettings()
+ throw();
+public:
+ SwXPrintSettings( SwXPrintSettingsType eType, SwDoc * pDoc = NULL );
+
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+};
+/*-----------------15.03.98 13:21-------------------
+
+--------------------------------------------------*/
+class SwXViewSettings : public comphelper::ChainableHelperNoState
+{
+
+ friend class SwXDocumentSettings;
+protected:
+ SwView* pView;
+ SwViewOption* mpViewOption;
+ const SwViewOption* mpConstViewOption;
+ sal_Bool bObjectValid:1, bWeb:1, mbApplyZoom;
+
+ sal_Int32 eHRulerUnit;
+ sal_Bool mbApplyHRulerMetric;
+ sal_Int32 eVRulerUnit;
+ sal_Bool mbApplyVRulerMetric;
+
+ virtual void _preSetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _postSetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+
+ virtual void _preGetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _postGetValues ()
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+
+ virtual ~SwXViewSettings()
+ throw();
+public:
+ SwXViewSettings(sal_Bool bWeb, SwView* pView);
+
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ sal_Bool IsValid() const {return bObjectValid;}
+ void Invalidate() {bObjectValid = sal_False;}
+};
+/* -----------------24.09.98 10:47-------------------
+ *
+ * --------------------------------------------------*/
+/*class SwXTerminateListener : public ::com::sun::star::frame::XTerminateListener,
+ public UsrObject
+{
+public:
+ SwXTerminateListener();
+ virtual ~SwXTerminateListener();
+
+ SMART_UNO_DECLARATION( SwXTerminateListener, UsrObject );
+
+ virtual UString getClassName();
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual ::com::sun::star::uno::XInterface * queryInterface( ::com::sun::star::uno::Uik aUik);
+
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void);
+
+
+ //XTerminateListener
+ virtual void queryTermination(const ::com::sun::star::lang::EventObject& aEvent);
+ virtual void notifyTermination(const ::com::sun::star::lang::EventObject& aEvent);
+
+ //XEventListener
+ virtual void disposing(const ::com::sun::star::lang::EventObject& Source);
+};
+
+*/
+#endif
diff --git a/sw/inc/unoparaframeenum.hxx b/sw/inc/unoparaframeenum.hxx
new file mode 100644
index 000000000000..90b1f8141902
--- /dev/null
+++ b/sw/inc/unoparaframeenum.hxx
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOPARAFRAMEENUM_HXX
+#define SW_UNOPARAFRAMEENUM_HXX
+
+#include <deque>
+
+#include <boost/shared_ptr.hpp>
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+
+#include <unobaseclass.hxx>
+
+
+class SwDepend;
+class SwNodeIndex;
+class SwPaM;
+class SwFrmFmt;
+
+
+struct FrameDependSortListEntry
+{
+ xub_StrLen nIndex;
+ sal_uInt32 nOrder;
+ ::boost::shared_ptr<SwDepend> pFrameDepend;
+
+ FrameDependSortListEntry (xub_StrLen const i_nIndex,
+ sal_uInt32 const i_nOrder, SwDepend * const i_pDepend)
+ : nIndex(i_nIndex), nOrder(i_nOrder), pFrameDepend(i_pDepend) { }
+};
+
+typedef ::std::deque< FrameDependSortListEntry >
+ FrameDependSortList_t;
+
+typedef ::std::deque< ::boost::shared_ptr<SwDepend> >
+ FrameDependList_t;
+
+
+// OD 2004-05-07 #i28701# - adjust 4th parameter
+void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
+ FrameDependSortList_t & rFrames,
+ const bool _bAtCharAnchoredObjs );
+
+
+/* -----------------23.03.99 12:57-------------------
+ *
+ * --------------------------------------------------*/
+
+enum ParaFrameMode
+{
+ PARAFRAME_PORTION_PARAGRAPH,
+ PARAFRAME_PORTION_CHAR,
+ PARAFRAME_PORTION_TEXTRANGE,
+};
+
+typedef ::cppu::WeakImplHelper2
+< ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::container::XEnumeration
+> SwXParaFrameEnumeration_Base;
+
+class SwXParaFrameEnumeration
+ : public SwXParaFrameEnumeration_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXParaFrameEnumeration();
+
+public:
+
+ SwXParaFrameEnumeration(const SwPaM& rPaM,
+ const enum ParaFrameMode eParaFrameMode, SwFrmFmt *const pFmt = 0);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XEnumeration
+ virtual sal_Bool SAL_CALL hasMoreElements()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOPARAFRAMEENUM_HXX
+
diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx
new file mode 100644
index 000000000000..5093efaf65a3
--- /dev/null
+++ b/sw/inc/unoparagraph.hxx
@@ -0,0 +1,365 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOPARAGRAPH_HXX
+#define SW_UNOPARAGRAPH_HXX
+
+#include <memory>
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+
+#include <cppuhelper/implbase10.hxx>
+
+#include <sfx2/Metadatable.hxx>
+
+#include <unobaseclass.hxx>
+
+
+struct SwPosition;
+class SwPaM;
+class SwUnoCrsr;
+class SwStartNode;
+class SwTxtNode;
+class SwTable;
+class SwXText;
+
+
+/*-----------------07.04.98 08:15-------------------
+
+--------------------------------------------------*/
+typedef ::cppu::ImplInheritanceHelper10
+< ::sfx2::MetadatableMixin
+, ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::beans::XPropertyState
+, ::com::sun::star::beans::XMultiPropertySet
+, ::com::sun::star::beans::XTolerantMultiPropertySet
+, ::com::sun::star::container::XEnumerationAccess
+, ::com::sun::star::container::XContentEnumerationAccess
+, ::com::sun::star::text::XTextContent
+, ::com::sun::star::text::XTextRange
+> SwXParagraph_Base;
+
+class SwXParagraph
+ : public SwXParagraph_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXParagraph();
+
+ SwXParagraph(::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XText > const & xParent,
+ SwTxtNode & rTxtNode,
+ const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = - 1);
+
+public:
+
+ /// descriptor
+ SwXParagraph();
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent>
+ CreateXParagraph(SwDoc & rDoc, SwTxtNode& rTxtNode,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText>
+ const& xParentText = 0,
+ const sal_Int32 nSelStart = -1, const sal_Int32 nSelEnd = - 1);
+
+ const SwTxtNode * GetTxtNode() const;
+ bool IsDescriptor() const;
+ /// make rPaM select the paragraph
+ bool SelectPaM(SwPaM & rPaM);
+ /// for SwXText
+ void attachToText(SwXText & rParent, SwTxtNode & rTxtNode);
+
+ // MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetModel();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& rValue)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL
+ getPropertyState(const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyState > SAL_CALL
+ getPropertyStates(
+ const ::com::sun::star::uno::Sequence<
+ ::rtl::OUString >& rPropertyNames)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XMultiPropertySet
+ virtual void SAL_CALL setPropertyValues(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Any >& rValues)
+ throw (::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ SAL_CALL getPropertyValues(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertiesChangeListener(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertiesChangeListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL firePropertiesChangeEvent(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTolerantMultiPropertySet
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL
+ setPropertyValuesTolerant(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Any >& rValues)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL
+ getPropertyValuesTolerant(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL
+ getDirectPropertyValuesTolerant(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XContentEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createContentEnumeration(const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getAvailableServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTextContent
+ virtual void SAL_CALL attach(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ SAL_CALL getText()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getStart()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getEnd()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getString()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setString(const ::rtl::OUString& rString)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+
+/*-----------------07.04.98 08:10-------------------
+
+--------------------------------------------------*/
+class SwXParagraphEnumeration
+ : public SwSimpleEnumeration_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXParagraphEnumeration();
+
+public:
+
+ /// takes ownership of cursor
+ SwXParagraphEnumeration(
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ const & xParent,
+ ::std::auto_ptr<SwUnoCrsr> pCursor,
+ const CursorType eType,
+ SwStartNode const*const pStartNode = 0,
+ SwTable const*const pTable = 0);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XEnumeration
+ virtual sal_Bool SAL_CALL hasMoreElements()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOPARAGRAPH_HXX
+
diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx
new file mode 100644
index 000000000000..9071a388a5b8
--- /dev/null
+++ b/sw/inc/unoport.hxx
@@ -0,0 +1,325 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOPORT_HXX
+#define _UNOPORT_HXX
+
+#include <unocrsr.hxx>
+#include <unoevtlstnr.hxx>
+#include <calbck.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
+#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/text/XFootnote.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase8.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <svl/itemprop.hxx>
+
+#include <memory>
+#include <deque>
+
+
+class SwFmtFld;
+class SwFrmFmt;
+class SwTxtRuby;
+
+
+typedef ::std::deque<
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > >
+ TextRangeList_t;
+
+
+/* -----------------29.05.98 14:42-------------------
+ *
+ * --------------------------------------------------*/
+enum SwTextPortionType
+{
+ PORTION_TEXT,
+ PORTION_FIELD,
+ PORTION_FRAME,
+ PORTION_FOOTNOTE,
+// obsolete! PORTION_CONTROL_CHAR,
+ PORTION_REFMARK_START,
+ PORTION_REFMARK_END,
+ PORTION_TOXMARK_START,
+ PORTION_TOXMARK_END,
+ PORTION_BOOKMARK_START,
+ PORTION_BOOKMARK_END,
+ PORTION_REDLINE_START,
+ PORTION_REDLINE_END,
+ PORTION_RUBY_START,
+ PORTION_RUBY_END,
+ PORTION_SOFT_PAGEBREAK,
+ PORTION_META,
+ PORTION_FIELD_START,
+ PORTION_FIELD_END,
+ PORTION_FIELD_START_END
+};
+
+
+class SwXTextPortion : public cppu::WeakImplHelper8
+<
+ ::com::sun::star::beans::XTolerantMultiPropertySet,
+ ::com::sun::star::beans::XMultiPropertySet,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::text::XTextRange,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::container::XContentEnumerationAccess,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+{
+private:
+
+ SwEventListenerContainer m_ListenerContainer;
+ const SfxItemPropertySet * m_pPropSet;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ m_xParentText;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xRefMark;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xTOXMark;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xBookmark;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote >
+ m_xFootnote;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextField >
+ m_xTextField;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >
+ m_xMeta;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyText;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyStyle;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyAdjust;
+ ::std::auto_ptr< ::com::sun::star::uno::Any > m_pRubyIsAbove;
+
+ const SwDepend m_FrameDepend;
+ SwFrmFmt * m_pFrameFmt;
+ const SwTextPortionType m_ePortionType;
+
+ bool m_bIsCollapsed;
+
+ SwFmtFld * GetFldFmt(bool bInit = false);
+
+protected:
+
+ //SfxItemPropertySet& GetPropSet() { return aPropSet; }
+
+ void SAL_CALL SetPropertyValues_Impl(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::uno::Any GetPropertyValue( const SfxItemPropertyMap *pEntry,
+// SwUnoCrsr *pUnoCrsr,
+// SfxItemSet *pSet );
+ void GetPropertyValues( const ::rtl::OUString *pPropertyNames,
+ ::com::sun::star::uno::Any *pValues,
+ sal_Int32 nLength );
+
+ void GetPropertyValue( ::com::sun::star::uno::Any &rVal,
+ const SfxItemPropertySimpleEntry& rEntry, SwUnoCrsr *pUnoCrsr, SfxItemSet *&pSet );
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL GetPropertyValuesTolerant_Impl(
+ const ::com::sun::star::uno::Sequence< rtl::OUString >& rPropertyNames,
+ sal_Bool bDirectValuesOnly ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ~SwXTextPortion();
+
+public:
+ SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwTextPortionType eType );
+ SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwFrmFmt& rFmt );
+
+ // for Ruby
+ SwXTextPortion(const SwUnoCrsr* pPortionCrsr,
+ SwTxtRuby const& rAttr,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ const& xParent,
+ sal_Bool bIsEnd );
+
+ //XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd() throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getString() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XTolerantMultiPropertySet
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL setPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XMultiPropertySet
+// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XUnoTunnel
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
+
+ //XContentEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames() throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ void SetRefMark( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMark)
+ { m_xRefMark = xMark; }
+
+ void SetTOXMark( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMark)
+ { m_xTOXMark = xMark; }
+
+ void SetBookmark( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMark)
+ { m_xBookmark = xMark; }
+
+ void SetFootnote( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XFootnote > xNote)
+ { m_xFootnote = xNote; }
+
+ void SetTextField( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextField> xField)
+ { m_xTextField = xField; }
+
+ void SetMeta( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > xMeta)
+ { m_xMeta = xMeta; }
+
+ bool IsCollapsed() const { return m_bIsCollapsed; }
+ void SetCollapsed(bool bSet) { m_bIsCollapsed = bSet;}
+
+ SwTextPortionType GetTextPortionType() const { return m_ePortionType; }
+
+ SwUnoCrsr* GetCursor() const
+ {return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));}
+};
+
+/* -----------------29.05.98 14:42-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTextPortionEnumeration
+ : public ::cppu::WeakImplHelper3
+ < ::com::sun::star::container::XEnumeration
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::lang::XUnoTunnel
+ >
+ , public SwClient
+{
+ TextRangeList_t m_Portions; // contains all portions, filled by ctor
+
+ SwUnoCrsr* GetCursor() const
+ {return static_cast<SwUnoCrsr*>(const_cast<SwModify*>(GetRegisteredIn()));}
+
+protected:
+ virtual ~SwXTextPortionEnumeration();
+
+public:
+ SwXTextPortionEnumeration(SwPaM& rParaCrsr,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ const & xParent,
+ const sal_Int32 nStart, const sal_Int32 nEnd );
+
+ SwXTextPortionEnumeration(SwPaM& rParaCrsr,
+ TextRangeList_t const & rPortions );
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier )
+ throw(::com::sun::star::uno::RuntimeException);
+
+ //XEnumeration
+ virtual sal_Bool SAL_CALL hasMoreElements()
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
+ throw( ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName()
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+
+#endif
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
new file mode 100644
index 000000000000..0ea5fa9db598
--- /dev/null
+++ b/sw/inc/unoprnms.hxx
@@ -0,0 +1,841 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOPRNMS_HXX
+#define _UNOPRNMS_HXX
+
+
+#include <sal/types.h>
+#include <tools/solar.h>
+#include "swdllapi.h"
+
+enum SwPropNameIds
+{
+/* 0001 */ SW_PROPNAME_BEGIN = 1,
+
+/* 0001 */ UNO_NAME_FOLLOW_STYLE = SW_PROPNAME_BEGIN,
+/* 0002 */ UNO_NAME_IS_PHYSICAL,
+/* 0003 */ UNO_NAME_IS_AUTO_UPDATE,
+/* 0004 */ UNO_NAME_DISPLAY_NAME,
+/* 0005 */ UNO_NAME_PARA_GRAPHIC_URL,
+/* 0006 */ UNO_NAME_PARA_GRAPHIC_FILTER,
+/* 0007 */ UNO_NAME_HEADER_GRAPHIC_URL,
+/* 0008 */ UNO_NAME_HEADER_GRAPHIC_FILTER,
+/* 0009 */ UNO_NAME_FOOTER_GRAPHIC_URL,
+/* 0010 */ UNO_NAME_FOOTER_GRAPHIC_FILTER,
+/* 0011 */ UNO_NAME_BACK_GRAPHIC_URL,
+/* 0012 */ UNO_NAME_BACK_GRAPHIC_FILTER,
+/* 0013 */ UNO_NAME_BACK_GRAPHIC_LOCATION,
+/* 0014 */ UNO_NAME_BACK_GRAPHIC_BITMAP,
+/* 0015 */ UNO_NAME_GRAPHIC_URL,
+/* 0016 */ UNO_NAME_GRAPHIC_FILTER,
+/* 0017 */ UNO_NAME_GRAPHIC_LOCATION,
+/* 0018 */ UNO_NAME_GRAPHIC_SIZE,
+/* 0019 */ UNO_NAME_GRAPHIC_BITMAP,
+/* 0020 */ UNO_NAME_BULLET_FONT,
+/* 0021 */ UNO_NAME_PARA_GRAPHIC_LOCATION,
+/* 0022 */ UNO_NAME_HEADER_GRAPHIC_LOCATION,
+/* 0023 */ UNO_NAME_FOOTER_GRAPHIC_LOCATION,
+/* 0024 */ UNO_NAME_PARA_LEFT_PARA_MARGIN,
+/* 0025 */ UNO_NAME_PARA_RIGHT_PARA_MARGIN,
+/* 0026 */ UNO_NAME_PARA_LEFT_MARGIN,
+/* 0027 */ UNO_NAME_PARA_RIGHT_MARGIN,
+/* 0028 */ UNO_NAME_PARA_LEFT_MARGIN_RELATIVE,
+/* 0029 */ UNO_NAME_PARA_RIGHT_MARGIN_RELATIVE,
+/* 0030 */ UNO_NAME_PARA_IS_AUTO_FIRST_LINE_INDENT,
+/* 0031 */ UNO_NAME_PARA_FIRST_LINE_INDENT,
+/* 0032 */ UNO_NAME_PARA_FIRST_LINE_INDENT_RELATIVE,
+/* 0033 */ UNO_NAME_PARA_IS_HYPHENATION,
+/* 0034 */ UNO_NAME_PARA_HYPHENATION_MAX_LEADING_CHARS,
+/* 0035 */ UNO_NAME_PARA_HYPHENATION_MAX_TRAILING_CHARS,
+/* 0036 */ UNO_NAME_PARA_HYPHENATION_MAX_HYPHENS,
+/* 0037 */ UNO_NAME_LEFT_MARGIN,
+/* 0038 */ UNO_NAME_RIGHT_MARGIN,
+/* 0039 */ UNO_NAME_HEADER_LEFT_MARGIN,
+/* 0040 */ UNO_NAME_HEADER_RIGHT_MARGIN,
+/* 0041 */ UNO_NAME_FOOTER_LEFT_MARGIN,
+/* 0042 */ UNO_NAME_FOOTER_RIGHT_MARGIN,
+/* 0043 */ UNO_NAME_TEXT_RANGE,
+/* 0044 */ UNO_NAME_NAME,
+/* 0045 */ UNO_NAME_NUMBERING_ALIGNMENT,
+/* 0046 */ UNO_NAME_BULLET_FONT_NAME,
+/* 0047 */ UNO_NAME_BULLET_ID,
+/* 0048 */ UNO_NAME_CHAR_STYLE_NAME,
+/* 0049 */ UNO_NAME_ANCHOR_CHAR_STYLE_NAME,
+/* 0050 */ UNO_NAME_SUFFIX,
+/* 0051 */ UNO_NAME_PREFIX,
+/* 0052 */ UNO_NAME_PARENT_NUMBERING,
+/* 0053 */ UNO_NAME_START_WITH,
+/* 0054 */ UNO_NAME_CHAR_FONT_NAME,
+/* 0055 */ UNO_NAME_CHAR_FONT_STYLE_NAME,
+/* 0056 */ UNO_NAME_CHAR_FONT_FAMILY,
+/* 0057 */ UNO_NAME_CHAR_FONT_CHAR_SET,
+/* 0058 */ UNO_NAME_CHAR_FONT_PITCH,
+/* 0059 */ UNO_NAME_CHAR_POSTURE,
+/* 0060 */ UNO_NAME_CHAR_WEIGHT,
+/* 0061 */ UNO_NAME_CHAR_HEIGHT,
+/* 0062 */ UNO_NAME_CHAR_LOCALE,
+/* 0063 */ UNO_NAME_CHAR_FONT_NAME_ASIAN,
+/* 0064 */ UNO_NAME_CHAR_FONT_STYLE_NAME_ASIAN,
+/* 0065 */ UNO_NAME_CHAR_FONT_FAMILY_ASIAN,
+/* 0066 */ UNO_NAME_CHAR_FONT_CHAR_SET_ASIAN,
+/* 0067 */ UNO_NAME_CHAR_FONT_PITCH_ASIAN,
+/* 0068 */ UNO_NAME_CHAR_POSTURE_ASIAN,
+/* 0069 */ UNO_NAME_CHAR_WEIGHT_ASIAN,
+/* 0070 */ UNO_NAME_CHAR_HEIGHT_ASIAN,
+/* 0071 */ UNO_NAME_CHAR_LOCALE_ASIAN,
+/* 0072 */ UNO_NAME_CHAR_FONT_NAME_COMPLEX,
+/* 0073 */ UNO_NAME_CHAR_FONT_STYLE_NAME_COMPLEX,
+/* 0074 */ UNO_NAME_CHAR_FONT_FAMILY_COMPLEX,
+/* 0075 */ UNO_NAME_CHAR_FONT_CHAR_SET_COMPLEX,
+/* 0076 */ UNO_NAME_CHAR_FONT_PITCH_COMPLEX,
+/* 0077 */ UNO_NAME_CHAR_POSTURE_COMPLEX,
+/* 0078 */ UNO_NAME_CHAR_WEIGHT_COMPLEX,
+/* 0079 */ UNO_NAME_CHAR_HEIGHT_COMPLEX,
+/* 0080 */ UNO_NAME_CHAR_LOCALE_COMPLEX,
+/* 0081 */ UNO_NAME_CHAR_AUTO_KERNING,
+/* 0082 */ UNO_NAME_CHAR_UNDERLINE,
+/* 0083 */ UNO_NAME_CHAR_UNDERLINE_COLOR,
+/* 0084 */ UNO_NAME_CHAR_UNDERLINE_HAS_COLOR,
+/* 0085 */ UNO_NAME_CHAR_ESCAPEMENT,
+/* 0086 */ UNO_NAME_CHAR_CASE_MAP,
+/* 0087 */ UNO_NAME_CHAR_SHADOWED,
+/* 0088 */ UNO_NAME_CHAR_STRIKEOUT,
+/* 0089 */ UNO_NAME_CHAR_CROSSED_OUT,
+/* 0090 */ UNO_NAME_CHAR_NO_HYPHENATION,
+/* 0091 */ UNO_NAME_CHAR_AUTO_ESCAPEMENT,
+/* 0092 */ UNO_NAME_CHAR_PROP_HEIGHT,
+/* 0093 */ UNO_NAME_CHAR_DIFF_HEIGHT,
+/* 0094 */ UNO_NAME_CHAR_PROP_HEIGHT_ASIAN,
+/* 0095 */ UNO_NAME_CHAR_DIFF_HEIGHT_ASIAN,
+/* 0096 */ UNO_NAME_CHAR_PROP_HEIGHT_COMPLEX,
+/* 0097 */ UNO_NAME_CHAR_DIFF_HEIGHT_COMPLEX,
+/* 0098 */ UNO_NAME_CHAR_ESCAPEMENT_HEIGHT,
+/* 0099 */ UNO_NAME_CHAR_COLOR,
+
+/* 0100 */ UNO_NAME_CHAR_FLASH,
+/* 0101 */ UNO_NAME_CHAR_KERNING,
+/* 0102 */ UNO_NAME_CHAR_BACK_COLOR,
+/* 0103 */ UNO_NAME_CHAR_BACK_TRANSPARENT,
+/* 0104 */ UNO_NAME_CHAR_COMBINE_IS_ON,
+/* 0105 */ UNO_NAME_CHAR_COMBINE_PREFIX,
+/* 0106 */ UNO_NAME_CHAR_COMBINE_SUFFIX,
+/* 0107 */ UNO_NAME_CHAR_EMPHASIS,
+/* 0108 */ UNO_NAME_PARA_LINE_SPACING,
+/* 0109 */ UNO_NAME_PARA_TOP_MARGIN,
+/* 0110 */ UNO_NAME_PARA_BOTTOM_MARGIN,
+/* 0111 */ UNO_NAME_PARA_TOP_MARGIN_RELATIVE,
+/* 0112 */ UNO_NAME_PARA_BOTTOM_MARGIN_RELATIVE,
+/* 0113 */ UNO_NAME_PARA_EXPAND_SINGLE_WORD,
+/* 0114 */ UNO_NAME_END_NOTICE,
+/* 0115 */ UNO_NAME_EMBEDDED_OBJECTS,
+/* 0116 */ UNO_NAME_ALPHABETICAL_SEPARATORS,
+/* 0117 */ UNO_NAME_BACKGROUND_COLOR,
+/* 0118 */ UNO_NAME_BEGIN_NOTICE,
+/* 0119 */ UNO_NAME_CASE_SENSITIVE,
+/* 0120 */ UNO_NAME_FRAME_STYLE_NAME,
+/* 0121 */ UNO_NAME_NUMBERING_STYLE_NAME,
+/* 0122 */ UNO_NAME_NUMBERING_LEVEL,
+/* 0123 */ UNO_NAME_NUMBERING_START_VALUE,
+/* 0124 */ UNO_NAME_NUMBERING_IS_NUMBER,
+/* 0125 */ UNO_NAME_COMBINE_ENTRIES,
+/* 0126 */ UNO_NAME_COUNT_LINES_IN_FRAMES,
+/* 0127 */ UNO_NAME_DDE_COMMAND_TYPE,
+/* 0128 */ UNO_NAME_DDE_COMMAND_FILE,
+/* 0129 */ UNO_NAME_DDE_COMMAND_ELEMENT,
+/* 0130 */ UNO_NAME_IS_AUTOMATIC_UPDATE,
+/* 0131 */ UNO_NAME_DEFAULT_TABSTOP_DISTANCE,
+/* 0132 */ UNO_NAME_DISTANCE,
+/* 0133 */ UNO_NAME_DROP_CAP_FORMAT,
+/* 0134 */ UNO_NAME_DROP_CAP_WHOLE_WORD,
+/* 0135 */ UNO_NAME_DROP_CAP_CHAR_STYLE_NAME,
+/* 0136 */ UNO_NAME_FILE_LINK,
+/* 0137 */ UNO_NAME_GRAPHIC,
+/* 0138 */ UNO_NAME_GRAPHICS,
+/* 0139 */ UNO_NAME_IS_PROTECTED,
+/* 0140 */ UNO_NAME_KEY_AS_ENTRY,
+/* 0141 */ UNO_NAME_PARA_KEEP_TOGETHER,
+/* 0142 */ UNO_NAME_KEEP_TOGETHER,
+/* 0143 */ UNO_NAME_IS_LANDSCAPE,
+/* 0144 */ UNO_NAME_SEPARATOR_TEXT,
+/* 0145 */ UNO_NAME_MARKS,
+/* 0146 */ UNO_NAME_NUMBER_POSITION,
+/* 0147 */ UNO_NAME_OUTLINES,
+/* 0148 */ UNO_NAME_PAGE_STYLE_NAME,
+/* 0149 */ UNO_NAME_PAGE_STYLE_LAYOUT,
+/* 0150 */ UNO_NAME_PARA_STYLES,
+/* 0151 */ UNO_NAME_PARA_ADJUST,
+/* 0152 */ UNO_NAME_PARA_REGISTER_MODE_ACTIVE,
+/* 0153 */ UNO_NAME_PARA_STYLE_NAME,
+/* 0154 */ UNO_NAME_PARA_LAST_LINE_ADJUST,
+/* 0155 */ UNO_NAME_PARA_LINE_NUMBER_COUNT,
+/* 0156 */ UNO_NAME_PARA_LINE_NUMBER_START_VALUE,
+/* 0157 */ UNO_NAME_BACK_COLOR,
+/* 0158 */ UNO_NAME_PARA_BACK_COLOR,
+/* 0159 */ UNO_NAME_PARA_WIDOWS,
+/* 0160 */ UNO_NAME_PARA_ORPHANS,
+/* 0161 */ UNO_NAME_PARA_BACK_TRANSPARENT,
+/* 0162 */ UNO_NAME_POSITION_END_OF_DOC,
+/* 0163 */ UNO_NAME_POSITION_PROTECTED,
+/* 0164 */ UNO_NAME_ALTERNATIVE_TEXT,
+/* 0165 */ UNO_NAME_PRIMARY_KEY,
+/* 0166 */ UNO_NAME_PRINT_TABLES,
+/* 0167 */ UNO_NAME_PRINT_GRAPHICS,
+/* 0168 */ UNO_NAME_PRINT_REVERSED,
+/* 0169 */ UNO_NAME_PRINT_PROSPECT,
+/* 0170 */ UNO_NAME_PRINT_CONTROLS,
+/* 0171 */ UNO_NAME_PRINT_DRAWINGS,
+/* 0172 */ UNO_NAME_PRINT_RIGHT_PAGES,
+/* 0173 */ UNO_NAME_PRINT_LEFT_PAGES,
+/* 0174 */ UNO_NAME_PRINT_BLACK_FONTS,
+/* 0175 */ UNO_NAME_PRINTER_PAPER_TRAY,
+/* 0176 */ UNO_NAME_PRINT_PAGE_BACKGROUND,
+/* 0177 */ UNO_NAME_PRINT_ANNOTATION_MODE,
+/* 0178 */ UNO_NAME_PRINT_FAX_NAME,
+/* 0179 */ UNO_NAME_PRINT_PAPER_FROM_SETUP,
+/* 0180 */ UNO_NAME_REGISTER_MODE_ACTIVE,
+/* 0181 */ UNO_NAME_RELATIVE_WIDTH,
+/* 0182 */ UNO_NAME_RELATIVE_HEIGHT,
+/* 0183 */ UNO_NAME_REPEAT_HEADLINE,
+/* 0184 */ UNO_NAME_SEARCH_STYLES,
+/* 0185 */ UNO_NAME_SEARCH_BACKWARDS,
+/* 0186 */ UNO_NAME_SEARCH_SIMILARITY,
+/* 0187 */ UNO_NAME_SEARCH_IN_SELECTION,
+/* 0188 */ UNO_NAME_SEARCH_CASE_SENSITIVE,
+/* 0189 */ UNO_NAME_SEARCH_SIMILARITY_ADD,
+/* 0190 */ UNO_NAME_SEARCH_SIMILARITY_RELAX,
+/* 0191 */ UNO_NAME_SEARCH_SIMILARITY_REMOVE,
+/* 0192 */ UNO_NAME_SEARCH_REGULAR_EXPRESSION,
+/* 0193 */ UNO_NAME_SEARCH_SIMILARITY_EXCHANGE,
+/* 0194 */ UNO_NAME_SECONDARY_KEY,
+/* 0195 */ UNO_NAME_SEPARATOR_INTERVAL,
+/* 0196 */ UNO_NAME_SHOW_BREAKS,
+/* 0197 */ UNO_NAME_SHOW_SPACES,
+/* 0198 */ UNO_NAME_SHOW_TABLES,
+/* 0199 */ UNO_NAME_SHOW_GRAPHICS,
+
+/* 0200 */ UNO_NAME_SHOW_DRAWINGS,
+/* 0201 */ UNO_NAME_SHOW_TABSTOPS,
+/* 0202 */ UNO_NAME_SHOW_VERT_RULER,
+/* 0203 */ UNO_NAME_SHOW_PARA_BREAKS,
+/* 0204 */ UNO_NAME_SHOW_HIDDEN_TEXT,
+/* 0205 */ UNO_NAME_SHOW_ANNOTATIONS,
+/* 0206 */ UNO_NAME_SHOW_SOFT_HYPHENS,
+/* 0207 */ UNO_NAME_SHOW_VERT_SCROLL_BAR,
+/* 0208 */ UNO_NAME_SHOW_HORI_SCROLL_BAR,
+/* 0209 */ UNO_NAME_SHOW_FIELD_COMMANDS,
+/* 0210 */ UNO_NAME_SHOW_TEXT_BOUNDARIES,
+/* 0211 */ UNO_NAME_SHOW_PROTECTED_SPACES,
+/* 0212 */ UNO_NAME_SHOW_TABLE_BOUNDARIES,
+/* 0213 */ UNO_NAME_SHOW_HIDDEN_PARAGRAPHS,
+/* 0214 */ UNO_NAME_SHOW_INDEX_MARK_BACKGROUND,
+/* 0215 */ UNO_NAME_SHOW_FOOTNOTE_BACKGROUND,
+/* 0216 */ UNO_NAME_SHOW_TEXT_FIELD_BACKGROUND,
+/* 0217 */ UNO_NAME_IS_SYNC_WIDTH_TO_HEIGHT,
+/* 0218 */ UNO_NAME_IS_SYNC_HEIGHT_TO_WIDTH,
+/* 0219 */ UNO_NAME_SIZE_PROTECTED,
+/* 0220 */ UNO_NAME_SMOOTH_SCROLLING,
+/* 0221 */ UNO_NAME_SOLID_MARK_HANDLES,
+/* 0222 */ UNO_NAME_TABLES,
+/* 0223 */ UNO_NAME_TEXT_FRAMES,
+/* 0224 */ UNO_NAME_TEXT_COLUMNS,
+/* 0225 */ UNO_NAME_BACK_TRANSPARENT,
+/* 0226 */ UNO_NAME_USE_PP,
+/* 0227 */ UNO_NAME_USER_METRIC,
+/* 0228 */ UNO_NAME_ANCHOR_TYPE,
+/* 0229 */ UNO_NAME_ANCHOR_TYPES,
+/* 0230 */ UNO_NAME_ANCHOR_PAGE_NO,
+/* 0231 */ UNO_NAME_ANCHOR_FRAME,
+/* 0232 */ UNO_NAME_AUTHOR,
+/* 0233 */ UNO_NAME_BREAK_TYPE,
+/* 0234 */ UNO_NAME_CHAIN_NEXT_NAME,
+/* 0235 */ UNO_NAME_CHAIN_PREV_NAME,
+/* 0236 */ UNO_NAME_CHAPTER_FORMAT,
+/* 0237 */ UNO_NAME_CLIENT_MAP,
+/* 0238 */ UNO_NAME_CONDITION,
+/* 0239 */ UNO_NAME_CONTENT,
+/* 0240 */ UNO_NAME_CHAR_CONTOURED,
+/* 0241 */ UNO_NAME_CONTOUR_OUTSIDE,
+/* 0242 */ UNO_NAME_CONTENT_PROTECTED,
+/* 0243 */ UNO_NAME_COUNT_EMPTY_LINES,
+/* 0244 */ UNO_NAME_RESTART_AT_EACH_PAGE,
+/* 0245 */ UNO_NAME_DATA_BASE_NAME,
+/* 0246 */ UNO_NAME_DATA_TABLE_NAME,
+/* 0247 */ UNO_NAME_DATA_COMMAND_TYPE,
+/* 0248 */ UNO_NAME_DATA_COLUMN_NAME,
+/* 0249 */ UNO_NAME_IS_DATA_BASE_FORMAT,
+/* 0250 */ UNO_NAME_DATE,
+/* 0251 */ UNO_NAME_IS_DATE,
+/* 0252 */ UNO_NAME_EDIT_IN_READONLY,
+/* 0253 */ UNO_NAME_FALSE_CONTENT,
+/* 0254 */ UNO_NAME_FILE_FORMAT,
+/* 0255 */ UNO_NAME_IS_FIXED,
+/* 0256 */ UNO_NAME_FOOTNOTE_COUNTING,
+/* 0257 */ UNO_NAME_FORMULA,
+/* 0258 */ UNO_NAME_FRAME_NAME,
+/* 0259 */ UNO_NAME_GRAPHIC_NAME,
+/* 0260 */ UNO_NAME_FULL_NAME,
+/* 0261 */ UNO_NAME_HEIGHT,
+/* 0262 */ UNO_NAME_IS_AUTO_HEIGHT,
+/* 0263 */ UNO_NAME_SIZE_TYPE,
+/* 0264 */ UNO_NAME_HINT,
+/* 0265 */ UNO_NAME_HORI_ORIENT,
+/* 0266 */ UNO_NAME_HORI_MIRRORED_ON_EVEN_PAGES,
+/* 0267 */ UNO_NAME_HORI_MIRRORED_ON_ODD_PAGES,
+/* 0268 */ UNO_NAME_HORI_ORIENT_RELATION,
+/* 0269 */ UNO_NAME_HORI_ORIENT_POSITION,
+/* 0270 */ UNO_NAME_HYPER_LINK_U_R_L,
+/* 0271 */ UNO_NAME_HYPER_LINK_TARGET,
+/* 0272 */ UNO_NAME_HYPER_LINK_NAME,
+/* 0273 */ UNO_NAME_HYPER_LINK_EVENTS,
+/* 0274 */ UNO_NAME_INFO_TYPE,
+/* 0275 */ UNO_NAME_INFO_FORMAT,
+/* 0276 */ UNO_NAME_IS_INPUT,
+/* 0277 */ UNO_NAME_LEVEL,
+/* 0278 */ UNO_NAME_INTERVAL,
+/* 0279 */ UNO_NAME_LINK_REGION,
+/* 0280 */ UNO_NAME_MACRO_NAME,
+/* 0281 */ UNO_NAME_SPLIT,
+/* 0282 */ UNO_NAME_PARA_SPLIT,
+/* 0283 */ UNO_NAME_NUMBER_FORMAT,
+/* 0284 */ UNO_NAME_NUMBERING_TYPE,
+/* 0285 */ UNO_NAME_NUMBERING_RULES,
+/* 0286 */ UNO_NAME_OFFSET,
+/* 0287 */ UNO_NAME_ON,
+/* 0288 */ UNO_NAME_OPAQUE,
+/* 0289 */ UNO_NAME_PAGE_TOGGLE,
+/* 0290 */ UNO_NAME_PAGE_DESC_NAME,
+/* 0291 */ UNO_NAME_PAGE_NUMBER_OFFSET,
+/* 0292 */ UNO_NAME_PLACEHOLDER,
+/* 0293 */ UNO_NAME_PLACEHOLDER_TYPE,
+/* 0294 */ UNO_NAME_PRINT,
+/* 0295 */ UNO_NAME_REFERENCE_FIELD_PART,
+/* 0296 */ UNO_NAME_REFERENCE_FIELD_SOURCE,
+/* 0297 */ UNO_NAME_REGISTER_PARAGRAPH_STYLE,
+/* 0298 */ UNO_NAME_SCRIPT_TYPE,
+/* 0299 */ UNO_NAME_SEARCH_ALL,
+
+/* 0300 */ UNO_NAME_SEARCH_WORDS,
+/* 0301 */ UNO_NAME_SEQUENCE_VALUE,
+/* 0302 */ UNO_NAME_SERVER_MAP,
+/* 0303 */ UNO_NAME_IMAGE_MAP,
+/* 0304 */ UNO_NAME_SET_NUMBER,
+/* 0305 */ UNO_NAME_SHADOW_FORMAT,
+/* 0306 */ UNO_NAME_SHOW_HORI_RULER,
+/* 0307 */ UNO_NAME_SIZE,
+/* 0308 */ UNO_NAME_ACTUAL_SIZE,
+/* 0309 */ UNO_NAME_SOURCE_NAME,
+/* 0310 */ UNO_NAME_START_AT,
+/* 0311 */ UNO_NAME_STATISTIC_TYPE_ID,
+/* 0312 */ UNO_NAME_SUB_TYPE,
+/* 0313 */ UNO_NAME_SURROUND,
+/* 0314 */ UNO_NAME_IS_EXPRESSION,
+/* 0315 */ UNO_NAME_IS_SHOW_FORMULA,
+/* 0316 */ UNO_NAME_TEXT_WRAP,
+/* 0317 */ UNO_NAME_SURROUND_CONTOUR,
+/* 0318 */ UNO_NAME_SURROUND_ANCHORONLY,
+/* 0319 */ UNO_NAME_TABLE_NAME,
+/* 0320 */ UNO_NAME_TABSTOPS,
+/* 0321 */ UNO_NAME_TITLE,
+/* 0322 */ UNO_NAME_TOP_MARGIN,
+/* 0323 */ UNO_NAME_BOTTOM_MARGIN,
+/* 0324 */ UNO_NAME_TRUE_CONTENT,
+/* 0325 */ UNO_NAME_URL_CONTENT,
+/* 0326 */ UNO_NAME_USERTEXT,
+/* 0327 */ UNO_NAME_USER_DATA_TYPE,
+/* 0328 */ UNO_NAME_VALUE,
+/* 0329 */ UNO_NAME_VARIABLE_NAME,
+/* 0330 */ UNO_NAME_VARIABLE_SUBTYPE,
+/* 0331 */ UNO_NAME_VERT_ORIENT,
+/* 0332 */ UNO_NAME_VERT_MIRRORED,
+/* 0333 */ UNO_NAME_VERT_ORIENT_POSITION,
+/* 0334 */ UNO_NAME_VERT_ORIENT_RELATION,
+/* 0335 */ UNO_NAME_IS_VISIBLE,
+/* 0336 */ UNO_NAME_WIDTH,
+/* 0337 */ UNO_NAME_CHAR_WORD_MODE,
+/* 0338 */ UNO_NAME_GRAPHIC_CROP,
+/* 0339 */ UNO_NAME_CHARACTER_FORMAT_NONE,
+/* 0340 */ UNO_NAME_TEXT_POSITION,
+/* 0341 */ UNO_NAME_DOCUMENT_INDEX_MARK,
+/* 0342 */ UNO_NAME_DOCUMENT_INDEX,
+/* 0343 */ UNO_NAME_IS_GLOBAL_DOCUMENT_SECTION,
+/* 0344 */ UNO_NAME_TEXT_FIELD,
+/* 0345 */ UNO_NAME_BOOKMARK,
+/* 0346 */ UNO_NAME_TEXT_TABLE,
+/* 0347 */ UNO_NAME_CELL,
+/* 0348 */ UNO_NAME_TEXT_FRAME,
+/* 0349 */ UNO_NAME_REFERENCE_MARK,
+/* 0350 */ UNO_NAME_TEXT_SECTION,
+/* 0351 */ UNO_NAME_FOOTNOTE,
+/* 0352 */ UNO_NAME_ENDNOTE,
+/* 0353 */ UNO_NAME_CHART_ROW_AS_LABEL,
+/* 0354 */ UNO_NAME_CHART_COLUMN_AS_LABEL,
+/* 0355 */ UNO_NAME_TABLE_COLUMS,
+/* 0356 */ UNO_NAME_LEFT_BORDER,
+/* 0357 */ UNO_NAME_RIGHT_BORDER,
+/* 0358 */ UNO_NAME_TOP_BORDER,
+/* 0359 */ UNO_NAME_BOTTOM_BORDER,
+/* 0360 */ UNO_NAME_BORDER_DISTANCE,
+/* 0361 */ UNO_NAME_LEFT_BORDER_DISTANCE,
+/* 0362 */ UNO_NAME_RIGHT_BORDER_DISTANCE,
+/* 0363 */ UNO_NAME_TOP_BORDER_DISTANCE,
+/* 0364 */ UNO_NAME_BOTTOM_BORDER_DISTANCE,
+/* 0365 */ UNO_NAME_TABLE_BORDER,
+/* 0366 */ UNO_NAME_TABLE_COLUMN_SEPARATORS,
+/* 0367 */ UNO_NAME_TABLE_COLUMN_RELATIVE_SUM,
+/* 0368 */ UNO_NAME_HEADER_TEXT,
+/* 0369 */ UNO_NAME_HEADER_TEXT_LEFT,
+/* 0370 */ UNO_NAME_HEADER_TEXT_RIGHT,
+/* 0371 */ UNO_NAME_FOOTER_TEXT,
+/* 0372 */ UNO_NAME_FOOTER_TEXT_LEFT,
+/* 0373 */ UNO_NAME_FOOTER_TEXT_RIGHT,
+/* 0374 */ UNO_NAME_HEADER_BACK_COLOR,
+/* 0375 */ UNO_NAME_HEADER_GRAPHIC,
+/* 0376 */ UNO_NAME_HEADER_BACK_TRANSPARENT,
+/* 0377 */ UNO_NAME_HEADER_LEFT_BORDER,
+/* 0378 */ UNO_NAME_HEADER_RIGHT_BORDER,
+/* 0379 */ UNO_NAME_HEADER_TOP_BORDER,
+/* 0380 */ UNO_NAME_HEADER_BOTTOM_BORDER,
+/* 0381 */ UNO_NAME_HEADER_BORDER_DISTANCE,
+/* 0382 */ UNO_NAME_HEADER_SHADOW_FORMAT,
+/* 0383 */ UNO_NAME_HEADER_BODY_DISTANCE,
+/* 0384 */ UNO_NAME_HEADER_IS_DYNAMIC_HEIGHT,
+/* 0385 */ UNO_NAME_HEADER_IS_SHARED,
+/* 0386 */ UNO_NAME_HEADER_HEIGHT,
+/* 0387 */ UNO_NAME_HEADER_IS_ON,
+/* 0388 */ UNO_NAME_FOOTER_BACK_COLOR,
+/* 0389 */ UNO_NAME_FOOTER_GRAPHIC,
+/* 0390 */ UNO_NAME_FOOTER_BACK_TRANSPARENT,
+/* 0391 */ UNO_NAME_FOOTER_LEFT_BORDER,
+/* 0392 */ UNO_NAME_FOOTER_RIGHT_BORDER,
+/* 0393 */ UNO_NAME_FOOTER_TOP_BORDER,
+/* 0394 */ UNO_NAME_FOOTER_BOTTOM_BORDER,
+/* 0395 */ UNO_NAME_FOOTER_BORDER_DISTANCE,
+/* 0396 */ UNO_NAME_FOOTER_SHADOW_FORMAT,
+/* 0397 */ UNO_NAME_FOOTER_BODY_DISTANCE,
+/* 0398 */ UNO_NAME_FOOTER_IS_DYNAMIC_HEIGHT,
+/* 0399 */ UNO_NAME_FOOTER_IS_SHARED,
+
+/* 0400 */ UNO_NAME_FOOTER_HEIGHT,
+/* 0401 */ UNO_NAME_FOOTER_IS_ON,
+/* 0402 */ UNO_NAME_OVERWRITE_STYLES,
+/* 0403 */ UNO_NAME_LOAD_NUMBERING_STYLES,
+/* 0404 */ UNO_NAME_LOAD_PAGE_STYLES,
+/* 0405 */ UNO_NAME_LOAD_FRAME_STYLES,
+/* 0406 */ UNO_NAME_LOAD_TEXT_STYLES,
+/* 0407 */ UNO_NAME_FILE_NAME,
+/* 0408 */ UNO_NAME_FILTER_NAME,
+/* 0409 */ UNO_NAME_FILTER_OPTION,
+/* 0410 */ UNO_NAME_PASSWORD,
+/* 0411 */ UNO_NAME_COPY_COUNT,
+/* 0412 */ UNO_NAME_COLLATE,
+/* 0413 */ UNO_NAME_SORT,
+/* 0414 */ UNO_NAME_PAGES,
+/* 0415 */ UNO_NAME_FIRST_LINE_OFFSET,
+/* 0416 */ UNO_NAME_SYMBOL_TEXT_DISTANCE,
+/* 0417 */ UNO_NAME_USER_INDEX_NAME,
+/* 0418 */ UNO_NAME_REVISION,
+/* 0419 */ UNO_NAME_UNVISITED_CHAR_STYLE_NAME,
+/* 0420 */ UNO_NAME_VISITED_CHAR_STYLE_NAME,
+/* 0421 */ UNO_NAME_PARAGRAPH_COUNT,
+/* 0422 */ UNO_NAME_WORD_COUNT,
+/* 0423 */ UNO_NAME_WORD_SEPARATOR,
+/* 0424 */ UNO_NAME_CHARACTER_COUNT,
+/* 0425 */ UNO_NAME_ZOOM_VALUE,
+/* 0426 */ UNO_NAME_ZOOM_TYPE,
+/* 0427 */ UNO_NAME_CREATE_FROM_MARKS,
+/* 0428 */ UNO_NAME_CREATE_FROM_OUTLINE,
+/* 0429 */ UNO_NAME_PARAGRAPH_STYLE_NAMES,
+/* 0430 */ UNO_NAME_CREATE_FROM_CHAPTER,
+/* 0431 */ UNO_NAME_CREATE_FROM_LABELS,
+/* 0432 */ UNO_NAME_USE_ALPHABETICAL_SEPARATORS,
+/* 0433 */ UNO_NAME_USE_KEY_AS_ENTRY,
+/* 0434 */ UNO_NAME_USE_COMBINED_ENTRIES,
+/* 0435 */ UNO_NAME_IS_CASE_SENSITIVE,
+/* 0436 */ UNO_NAME_USE_P_P,
+/* 0437 */ UNO_NAME_USE_DASH,
+/* 0438 */ UNO_NAME_USE_UPPER_CASE,
+/* 0439 */ UNO_NAME_LABEL_CATEGORY,
+/* 0440 */ UNO_NAME_LABEL_DISPLAY_TYPE,
+/* 0441 */ UNO_NAME_USE_LEVEL_FROM_SOURCE,
+/* 0442 */ UNO_NAME_LEVEL_FORMAT,
+/* 0443 */ UNO_NAME_LEVEL_PARAGRAPH_STYLES,
+/* 0444 */ UNO_NAME_RECALC_TAB_STOPS,
+/* 0445 */ UNO_NAME_MAIN_ENTRY_CHARACTER_STYLE_NAME,
+/* 0446 */ UNO_NAME_CREATE_FROM_TABLES,
+/* 0447 */ UNO_NAME_CREATE_FROM_TEXT_FRAMES,
+/* 0448 */ UNO_NAME_CREATE_FROM_GRAPHIC_OBJECTS,
+/* 0449 */ UNO_NAME_CREATE_FROM_EMBEDDED_OBJECTS,
+/* 0450 */ UNO_NAME_CREATE_FROM_STAR_MATH,
+/* 0451 */ UNO_NAME_CREATE_FROM_STAR_CHART,
+/* 0452 */ UNO_NAME_CREATE_FROM_STAR_CALC,
+/* 0453 */ UNO_NAME_CREATE_FROM_STAR_DRAW,
+/* 0454 */ UNO_NAME_CREATE_FROM_OTHER_EMBEDDED_OBJECTS,
+/* 0455 */ UNO_NAME_INDEX_AUTO_MARK_FILE_U_R_L,
+/* 0456 */ UNO_NAME_IS_COMMA_SEPARATED,
+/* 0457 */ UNO_NAME_IS_RELATIVE_TABSTOPS,
+/* 0458 */ UNO_NAME_CREATE_FROM_LEVEL_PARAGRAPH_STYLES,
+/* 0459 */ UNO_NAME_SHOW_CHANGES,
+/* 0460 */ UNO_NAME_RECORD_CHANGES,
+/* 0461 */ UNO_LINK_DISPLAY_NAME,
+/* 0462 */ UNO_LINK_DISPLAY_BITMAP,
+/* 0463 */ UNO_NAME_HEADING_STYLE_NAME,
+/* 0464 */ UNO_NAME_SHOW_ONLINE_LAYOUT,
+/* 0465 */ UNO_NAME_USER_DEFINED_ATTRIBUTES,
+/* 0466 */ UNO_NAME_TEXT_USER_DEFINED_ATTRIBUTES,
+/* 0467 */ UNO_NAME_FILE_PATH,
+/* 0468 */ UNO_NAME_PARA_CHAPTER_NUMBERING_LEVEL,
+/* 0469 */ UNO_NAME_PARA_CONDITIONAL_STYLE_NAME,
+/* 0470 */ UNO_NAME_CHAPTER_NUMBERING_LEVEL,
+/* 0471 */ UNO_NAME_NUMBERING_SEPARATOR,
+/* 0472 */ UNO_NAME_IS_CONTINUOUS_NUMBERING,
+/* 0473 */ UNO_NAME_IS_AUTOMATIC,
+/* 0474 */ UNO_NAME_IS_ABSOLUTE_MARGINS,
+/* 0475 */ UNO_NAME_CATEGORY,
+/* 0476 */ UNO_NAME_DEPENDENT_TEXT_FIELDS,
+/* 0477 */ UNO_NAME_CURRENT_PRESENTATION,
+/* 0478 */ UNO_NAME_ADJUST,
+/* 0479 */ UNO_NAME_INSTANCE_NAME,
+/* 0480 */ UNO_NAME_TEXT_PORTION_TYPE,
+/* 0481 */ UNO_NAME_CONTROL_CHARACTER,
+/* 0482 */ UNO_NAME_IS_COLLAPSED,
+/* 0483 */ UNO_NAME_IS_START,
+/* 0484 */ UNO_NAME_SEQUENCE_NUMBER,
+/* 0485 */ UNO_NAME_REFERENCE_ID,
+/* 0486 */ UNO_NAME_HEADER_LEFT_BORDER_DISTANCE,
+/* 0487 */ UNO_NAME_HEADER_RIGHT_BORDER_DISTANCE,
+/* 0488 */ UNO_NAME_HEADER_TOP_BORDER_DISTANCE,
+/* 0489 */ UNO_NAME_HEADER_BOTTOM_BORDER_DISTANCE,
+/* 0490 */ UNO_NAME_FOOTER_LEFT_BORDER_DISTANCE,
+/* 0491 */ UNO_NAME_FOOTER_RIGHT_BORDER_DISTANCE,
+/* 0492 */ UNO_NAME_FOOTER_TOP_BORDER_DISTANCE,
+/* 0493 */ UNO_NAME_FOOTER_BOTTOM_BORDER_DISTANCE,
+/* 0494 */ UNO_NAME_PARA_IS_NUMBERING_RESTART,
+/* 0495 */ UNO_NAME_HIDE_FIELD_TIPS,
+/* 0496 */ UNO_NAME_HEADER_USER_DEFINED_ATTRIBUTES,
+/* 0497 */ UNO_NAME_FOOTER_USER_DEFINED_ATTRIBUTES,
+/* 0498 */ UNO_NAME_PARA_SHADOW_FORMAT,
+/* 0499 */ UNO_NAME_CONTOUR_POLY_POLYGON,
+
+/* 0500 */ UNO_NAME_IS_PIXEL_CONTOUR,
+/* 0501 */ UNO_NAME_IS_AUTOMATIC_CONTOUR,
+/* 0502 */ UNO_NAME_SEPARATOR_LINE_WIDTH,
+/* 0503 */ UNO_NAME_SEPARATOR_LINE_COLOR,
+/* 0504 */ UNO_NAME_SEPARATOR_LINE_RELATIVE_HEIGHT,
+/* 0505 */ UNO_NAME_SEPARATOR_LINE_VERTIVAL_ALIGNMENT,
+/* 0506 */ UNO_NAME_SEPARATOR_LINE_IS_ON,
+/* 0507 */ UNO_NAME_IS_SKIP_HIDDEN_TEXT,
+/* 0508 */ UNO_NAME_IS_SKIP_PROTECTED_TEXT,
+/* 0509 */ UNO_NAME_DOCUMENT_INDEX_MARKS,
+/* 0510 */ UNO_NAME_FOOTNOTE_IS_COLLECT_AT_TEXT_END,
+/* 0511 */ UNO_NAME_FOOTNOTE_IS_RESTART_NUMBERING,
+/* 0512 */ UNO_NAME_FOOTNOTE_RESTART_NUMBERING_AT,
+/* 0513 */ UNO_NAME_FOOTNOTE_IS_OWN_NUMBERING,
+/* 0514 */ UNO_NAME_FOOTNOTE_NUMBERING_TYPE,
+/* 0515 */ UNO_NAME_FOOTNOTE_NUMBERING_PREFIX,
+/* 0516 */ UNO_NAME_FOOTNOTE_NUMBERING_SUFFIX,
+/* 0517 */ UNO_NAME_ENDNOTE_IS_COLLECT_AT_TEXT_END,
+/* 0518 */ UNO_NAME_ENDNOTE_IS_RESTART_NUMBERING,
+/* 0519 */ UNO_NAME_ENDNOTE_RESTART_NUMBERING_AT,
+/* 0520 */ UNO_NAME_ENDNOTE_IS_OWN_NUMBERING,
+/* 0521 */ UNO_NAME_ENDNOTE_NUMBERING_TYPE,
+/* 0522 */ UNO_NAME_ENDNOTE_NUMBERING_PREFIX,
+/* 0523 */ UNO_NAME_ENDNOTE_NUMBERING_SUFFIX,
+/* 0524 */ UNO_NAME_BRACKET_BEFORE,
+/* 0525 */ UNO_NAME_BRACKET_AFTER,
+/* 0526 */ UNO_NAME_IS_NUMBER_ENTRIES,
+/* 0527 */ UNO_NAME_IS_SORT_BY_POSITION,
+/* 0528 */ UNO_NAME_SORT_KEYS,
+/* 0529 */ UNO_NAME_IS_SORT_ASCENDING,
+/* 0530 */ UNO_NAME_SORT_KEY,
+/* 0531 */ UNO_NAME_FIELDS,
+/* 0532 */ UNO_NAME_DATE_TIME_VALUE,
+/* 0533 */ UNO_NAME_IS_ON,
+/* 0534 */ UNO_NAME_Z_ORDER,
+/* 0535 */ UNO_NAME_CONTENT_SECTION,
+/* 0536 */ UNO_NAME_HEADER_SECTION,
+/* 0537 */ UNO_NAME_PARA_IS_HANGING_PUNCTUATION,
+/* 0538 */ UNO_NAME_PARA_IS_CHARACTER_DISTANCE,
+/* 0539 */ UNO_NAME_PARA_IS_FORBIDDEN_RULES,
+/* 0540 */ UNO_NAME_PARA_VERT_ALIGNMENT,
+/* 0541 */ UNO_NAME_IS_MAIN_ENTRY,
+/* 0542 */ UNO_NAME_GRAPHIC_ROTATION,
+/* 0543 */ UNO_NAME_ADJUST_LUMINANCE,
+/* 0544 */ UNO_NAME_ADJUST_CONTRAST,
+/* 0545 */ UNO_NAME_ADJUST_RED,
+/* 0546 */ UNO_NAME_ADJUST_GREEN,
+/* 0547 */ UNO_NAME_ADJUST_BLUE,
+/* 0548 */ UNO_NAME_GAMMA,
+/* 0549 */ UNO_NAME_GRAPHIC_IS_INVERTED,
+/* 0550 */ UNO_NAME_TRANSPARENCY,
+/* 0551 */ UNO_NAME_GRAPHIC_COLOR_MODE,
+/* 0552 */ UNO_NAME_REDLINE_AUTHOR,
+/* 0553 */ UNO_NAME_REDLINE_DATE_TIME,
+/* 0554 */ UNO_NAME_REDLINE_COMMENT,
+/* 0555 */ UNO_NAME_REDLINE_TYPE,
+/* 0556 */ UNO_NAME_REDLINE_SUCCESSOR_DATA,
+/* 0557 */ UNO_NAME_REDLINE_IDENTIFIER,
+/* 0558 */ UNO_NAME_IS_IN_HEADER_FOOTER,
+/* 0559 */ UNO_NAME_START_REDLINE,
+/* 0560 */ UNO_NAME_END_REDLINE,
+/* 0561 */ UNO_NAME_REDLINE_START,
+/* 0562 */ UNO_NAME_REDLINE_END,
+/* 0563 */ UNO_NAME_REDLINE_TEXT,
+/* 0564 */ UNO_NAME_REDLINE_DISPLAY_TYPE,
+/* 0565 */ UNO_NAME_FORBIDDEN_CHARACTERS,
+/* 0566 */ UNO_NAME_RUBY_BASE_TEXT,
+/* 0567 */ UNO_NAME_RUBY_TEXT,
+/* 0568 */ UNO_NAME_RUBY_ADJUST,
+/* 0569 */ UNO_NAME_RUBY_CHAR_STYLE_NAME,
+/* 0570 */ UNO_NAME_RUBY_IS_ABOVE,
+/* 0571 */ UNO_NAME_FOOTNOTE_HEIGHT,
+/* 0572 */ UNO_NAME_FOOTNOTE_LINE_WEIGHT,
+/* 0573 */ UNO_NAME_FOOTNOTE_LINE_COLOR,
+/* 0574 */ UNO_NAME_FOOTNOTE_LINE_RELATIVE_WIDTH,
+/* 0575 */ UNO_NAME_FOOTNOTE_LINE_ADJUST,
+/* 0576 */ UNO_NAME_FOOTNOTE_LINE_TEXT_DISTANCE,
+/* 0577 */ UNO_NAME_FOOTNOTE_LINE_DISTANCE,
+/* 0578 */ UNO_NAME_CHAR_ROTATION,
+/* 0579 */ UNO_NAME_CHAR_ROTATION_IS_FIT_TO_LINE,
+/* 0580 */ UNO_NAME_CHAR_SCALE_WIDTH,
+/* 0581 */ UNO_NAME_TAB_STOP_DISTANCE,
+/* 0582 */ UNO_NAME_IS_WIDTH_RELATIVE,
+/* 0583 */ UNO_NAME_CHAR_RELIEF,
+/* 0584 */ UNO_NAME_IS_HIDDEN,
+/* 0585 */ UNO_NAME_IS_CONDITION_TRUE,
+/* 0586 */ UNO_NAME_TWO_DIGIT_YEAR,
+/* 0587 */ UNO_NAME_PROTECTION_KEY,
+/* 0588 */ UNO_NAME_REDLINE_PROTECTION_KEY,
+/* 0589 */ UNO_NAME_AUTOMATIC_DISTANCE,
+/* 0590 */ UNO_NAME_AUTOMATIC_CONTROL_FOCUS,
+/* 0591 */ UNO_NAME_APPLY_FORM_DESIGN_MODE,
+/* 0592 */ UNO_NAME_LOCALE,
+/* 0593 */ UNO_NAME_SORT_ALGORITHM,
+/* 0594 */ UNO_NAME_FRAME_HEIGHT_ABSOLUTE,
+/* 0596 */ UNO_NAME_FRAME_HEIGHT_PERCENT,
+/* 0597 */ UNO_NAME_FRAME_ISAUTOMATIC_HEIGHT,
+/* 0598 */ UNO_NAME_FRAME_WIDTH_ABSOLUTE,
+/* 0599 */ UNO_NAME_FRAME_WIDTH_PERCENT,
+/* 0600 */ UNO_NAME_PARA_STYLEHEADING,
+/* 0601 */ UNO_NAME_PARA_STYLELEVEL1,
+/* 0602 */ UNO_NAME_PARA_STYLELEVEL10,
+/* 0603 */ UNO_NAME_PARA_STYLELEVEL2,
+/* 0604 */ UNO_NAME_PARA_STYLELEVEL3,
+/* 0605 */ UNO_NAME_PARA_STYLELEVEL4,
+/* 0606 */ UNO_NAME_PARA_STYLELEVEL5,
+/* 0607 */ UNO_NAME_PARA_STYLELEVEL6,
+/* 0608 */ UNO_NAME_PARA_STYLELEVEL7,
+/* 0609 */ UNO_NAME_PARA_STYLELEVEL8,
+/* 0610 */ UNO_NAME_PARA_STYLELEVEL9,
+/* 0611 */ UNO_NAME_PARA_STYLESEPARATOR,
+/* 0612 */ UNO_NAME_MACRO_LIBRARY,
+/* 0613 */ UNO_NAME_CELL_NAME,
+/* 0614 */ UNO_NAME_PARA_USER_DEFINED_ATTRIBUTES,
+/* 0615 */ UNO_NAME_MERGE_LAST_PARA,
+/* 0616 */ UNO_NAME_WRITING_MODE,
+/* 0617 */ UNO_NAME_GRID_COLOR,
+/* 0618 */ UNO_NAME_GRID_LINES,
+/* 0619 */ UNO_NAME_GRID_BASE_HEIGHT,
+/* 0620 */ UNO_NAME_GRID_RUBY_HEIGHT,
+/* 0621 */ UNO_NAME_GRID_MODE,
+/* 0622 */ UNO_NAME_GRID_RUBY_BELOW,
+/* 0623 */ UNO_NAME_GRID_PRINT,
+/* 0624 */ UNO_NAME_GRID_DISPLAY,
+/* 0625 */ UNO_NAME_SNAP_TO_GRID,
+/* 0626 */ UNO_NAME_DONT_BALANCE_TEXT_COLUMNS,
+/* 0627 */ UNO_NAME_IS_CURRENTLY_VISIBLE,
+/* 0628 */ UNO_NAME_ANCHOR_POSITION,
+/* 0629 */ UNO_NAME_TEXT_READING,
+/* 0630 */ UNO_NAME_PRIMARY_KEY_READING,
+/* 0631 */ UNO_NAME_SECONDARY_KEY_READING,
+/* 0632 */ UNO_NAME_BACK_GRAPHIC_TRANSPARENCY,
+/* 0633 */ UNO_NAME_BACK_COLOR_R_G_B,
+/* 0634 */ UNO_NAME_BACK_COLOR_TRANSPARENCY,
+/* 0635 */ UNO_NAME_HEADER_DYNAMIC_SPACING,
+/* 0636 */ UNO_NAME_FOOTER_DYNAMIC_SPACING,
+/* 0637 */ UNO_NAME_BASIC_LIBRARIES,
+/* 0638 */ UNO_NAME_IS_FIXED_LANGUAGE,
+/* 0639 */ UNO_NAME_SELECTION,
+/* 0640 */ UNO_NAME_RESULT_SET,
+/* 0641 */ UNO_NAME_CONNECTION,
+/* 0642 */ UNO_NAME_MODEL,
+/* 0643 */ UNO_NAME_DATA_SOURCE_NAME,
+/* 0644 */ UNO_NAME_DATA_COMMAND,
+/* 0645 */ UNO_NAME_FILTER,
+/* 0646 */ UNO_NAME_DOCUMENT_URL,
+/* 0647 */ UNO_NAME_OUTPUT_URL,
+/* 0648 */ UNO_NAME_OUTPUT_TYPE,
+/* 0649 */ UNO_NAME_ESCAPE_PROCESSING,
+/* 0650 */ UNO_NAME_SINGLE_PRINT_JOBS,
+/* 0651 */ UNO_NAME_FILE_NAME_FROM_COLUMN,
+/* 0652 */ UNO_NAME_FILE_NAME_PREFIX,
+/* 0653 */ UNO_NAME_CHAR_STYLE_NAMES,
+/* 0654 */ UNO_NAME_DAD_COMMAND, /* DAD = DataAccessDescriptor (see com.sun.star.sdb.DataAccessDescriptor) */
+/* 0655 */ UNO_NAME_DAD_COMMAND_TYPE,
+/* 0656 */ UNO_NAME_CLSID,
+/* 0657 */ UNO_NAME_COMPONENT,
+/* 0658 */ UNO_NAME_SECT_LEFT_MARGIN,
+/* 0659 */ UNO_NAME_SECT_RIGHT_MARGIN,
+/* 0660 */ UNO_NAME_PARA_IS_CONNECT_BORDER,
+/* 0661 */ UNO_NAME_ITEMS,
+/* 0662 */ UNO_NAME_SELITEM,
+/* 0663 */ UNO_NAME_IS_SPLIT_ALLOWED,
+/* 0664 */ UNO_NAME_CHAR_HIDDEN,
+// OD 18.09.2003 #i18732#
+/* 0665 */ UNO_NAME_IS_FOLLOWING_TEXT_FLOW,
+/* 0666 */ UNO_NAME_WIDTH_TYPE,
+/* 0667 */ UNO_NAME_SCRIPT_URL,
+/* 0668 */ UNO_NAME_RUNTIME_UID,
+/* 0669 */ UNO_NAME_COLLAPSING_BORDERS,
+// OD 2004-05-05 #i28701#
+/* 0670 */ UNO_NAME_WRAP_INFLUENCE_ON_POSITION,
+/* 0671 */ UNO_NAME_DATA_BASE_URL,
+/* 0672 */ UNO_NAME_DATA_BASE_RESOURCE,
+// --> OD 2004-08-06 #i28749#
+/* 0673 */ UNO_NAME_TRANSFORMATION_IN_HORI_L2R,
+/* 0674 */ UNO_NAME_POSITION_LAYOUT_DIR,
+// <--
+/* 0675 */ UNO_NAME_NUMBERING_IS_OUTLINE,
+///* 0676 */ UNO_NAME_DEFAULT_OUTLINE_LEVEL, //#outline level, removed by zhaojianwei
+// --> OD 2004-10-28 #i36248#
+/* 0677 */ UNO_NAME_STARTPOSITION_IN_HORI_L2R,
+/* 0678 */ UNO_NAME_ENDPOSITION_IN_HORI_L2R,
+// <--
+// --> OS 2004-12-13 #30916#
+/* 0679 */ UNO_NAME_SUBJECT,
+/* 0680 */ UNO_NAME_ADDRESS_FROM_COLUMN,
+/* 0681 */ UNO_NAME_SEND_AS_HTML,
+/* 0682 */ UNO_NAME_SEND_AS_ATTACHMENT,
+/* 0683 */ UNO_NAME_MAIL_BODY,
+/* 0684 */ UNO_NAME_ATTACHMENT_NAME,
+/* 0685 */ UNO_NAME_ATTACHMENT_FILTER,
+/* 0686 */ UNO_NAME_PRINT_OPTIONS,
+/* 0687 */ UNO_NAME_SAVE_AS_SINGLE_FILE,
+/* 0688 */ UNO_NAME_SAVE_FILTER,
+/* 0689 */ UNO_NAME_COPIES_TO,
+/* 0690 */ UNO_NAME_BLIND_COPIES_TO,
+/* 0691 */ UNO_NAME_IN_SERVER_PASSWORD,
+/* 0692 */ UNO_NAME_OUT_SERVER_PASSWORD,
+// <--
+/* 0693 */ UNO_NAME_SAVE_FILTER_OPTIONS,
+/* 0694 */ UNO_NAME_SAVE_FILTER_DATA,
+/* 0695 */ UNO_NAME_LOCK_UPDATES,
+// --> TL 2005-02-14 #i37766#
+/* 0696 */ UNO_NAME_PAGE_COUNT,
+/* 0697 */ UNO_NAME_LINE_COUNT,
+/* 0698 */ UNO_NAME_IS_CONSTANT_SPELLCHECK,
+/* 0699 */ UNO_NAME_IS_HIDE_SPELL_MARKS, // deprecated #i91949
+// <--
+/* 0700 */ UNO_NAME_IS_FIELD_USED,
+/* 0701 */ UNO_NAME_IS_FIELD_DISPLAYED,
+/* 0702 */ UNO_NAME_BUILDID,
+/* 0703 */ UNO_NAME_PARA_STYLE_CONDITIONS,
+// --> FME 2005-12-13 #b6354161# Print empty pages
+/* 0704 */ UNO_NAME_PRINT_EMPTY_PAGES,
+// <--
+// --> BM 2006 New Chart (chart2)
+/* 0705 */ UNO_NAME_ROLE,
+// <--
+/* 0706 */ UNO_NAME_FIELD_CODE,
+/* 0707 */ UNO_NAME_HAS_VALID_SIGNATURES,
+// --> AMA #i65476# automatic styles
+/* 0708 */ UNO_NAME_CHAR_AUTO_STYLE_NAME,
+/* 0709 */ UNO_NAME_PARA_AUTO_STYLE_NAME,
+// --> OD 2006-03-21 #b6375613#
+/* 0710 */ UNO_NAME_APPLY_WORKAROUND_FOR_B6375613,
+/* 0711 */ UNO_NAME_LAYOUT_SIZE,
+// --> HB #144146#
+/* 0712 */ UNO_NAME_HELP,
+/* 0713 */ UNO_NAME_TOOLTIP,
+// --> #i73329# / 2007-01-11 / frank.schoenheit@sun.com
+/* 0714 */ UNO_NAME_DIALOG_LIBRARIES,
+/* 0715 */ UNO_NAME_HEADER_ROW_COUNT,
+/* 0716 */ UNO_NAME_INPUT,
+/* 0717 */ UNO_NAME_ROW_SPAN,
+// --> OD 2008-01-15 #newlistlevelattrs#
+/* 0718 */ UNO_NAME_POSITION_AND_SPACE_MODE,
+/* 0719 */ UNO_NAME_LABEL_FOLLOWED_BY,
+/* 0720 */ UNO_NAME_LISTTAB_STOP_POSITION,
+/* 0721 */ UNO_NAME_FIRST_LINE_INDENT,
+/* 0722 */ UNO_NAME_INDENT_AT,
+// --> #i52420# / 2008-02-07 / beppec56@openoffice.org
+/* 0723 */ UNO_NAME_CHAPTER_LEVEL,
+// --> 2007-03-27 text grid enhancement for better CJK support
+/* 0724 */ UNO_NAME_GRID_BASE_WIDTH,
+/* 0725 */ UNO_NAME_GRID_SNAP_TO_CHARS,
+/* 0726 */ UNO_NAME_GRID_STANDARD_PAGE_MODE,
+/* 0727 */ UNO_NAME_TABLE_BORDER_DISTANCES,
+// --> OD 2008-04-22 #refactorlists#
+/* 0728 */ UNO_NAME_LIST_ID,
+/* 0729 */ UNO_NAME_DEFAULT_LIST_ID,
+// <--
+/* 0730 */ UNO_NAME_STREAM_NAME,
+// --> OD 2008-11-26 #158694#
+/* 0731 */ UNO_NAME_PARA_CONTINUEING_PREVIOUS_SUB_TREE,
+/* 0732 */ UNO_NAME_PARA_LIST_LABEL_STRING,
+// <--
+/* 0733 */ UNO_NAME_CHAR_OVERLINE,
+/* 0734 */ UNO_NAME_CHAR_OVERLINE_COLOR,
+/* 0735 */ UNO_NAME_CHAR_OVERLINE_HAS_COLOR,
+/* 0736 */ UNO_NAME_OUTLINE_LEVEL, //#outline level,add<-zhaojianwei outlinelevel
+// --> OD 2009-07-13 #i73249#
+/* 0737 */ UNO_NAME_DESCRIPTION,
+// <--
+/* 0738 */ UNO_NAME_META, // #i91565#
+/* 0739 */ UNO_NAME_NESTED_TEXT_CONTENT, // #i109601#
+/* 0740 */ SW_PROPNAME_END
+};
+
+
+struct SwPropNameLen
+{
+ const char* pName;
+ USHORT nNameLen;
+ operator const char*() const { return pName; }
+};
+
+
+
+typedef const SwPropNameLen SwPropNameTab[ SW_PROPNAME_END - SW_PROPNAME_BEGIN ];
+extern const SwPropNameTab aPropNameTab;
+
+// !!! function must not(!) be inline because it is called via the below !!!
+// !!! listed macros from the swui DLL and that can not access the !!!
+// !!! array aPropNameTab which is located in a different DLL. !!!
+SW_DLLPUBLIC const SwPropNameLen& GetPropName( USHORT nId );
+SW_DLLPUBLIC const SwPropNameLen& SwGetPropName( USHORT nId );
+
+#define SW_PROP_NAME(nId) \
+ GetPropName( nId ).pName, GetPropName( nId ).nNameLen
+
+#define SW_PRPNM_EQLASCI(nId) \
+ GetPropName( nId ).pName, 0, GetPropName( nId ).nNameLen
+
+#define SW_PROP_NAME_STR(nId) \
+ GetPropName( nId ).pName
+
+
+#endif
diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx
new file mode 100644
index 000000000000..92db9257c4a6
--- /dev/null
+++ b/sw/inc/unoredline.hxx
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOREDLINE_HXX
+#define _UNOREDLINE_HXX
+
+#include <unoport.hxx>
+#include <unotext.hxx>
+
+
+class SwRedline;
+
+/* -----------------------------19.12.00 11:35--------------------------------
+
+ ---------------------------------------------------------------------------*/
+
+/**
+ * SwXRedlineText provides an XText which may be used to write
+ * directly into a redline node. It got implemented to enable XML
+ * import of redlines and should not be used directly via the API.
+ */
+class SwXRedlineText :
+ public SwXText,
+ public cppu::OWeakObject,
+ public ::com::sun::star::container::XEnumerationAccess
+{
+ SwNodeIndex aNodeIndex;
+ virtual const SwStartNode *GetStartNode() const;
+
+public:
+ SwXRedlineText(SwDoc* pDoc, SwNodeIndex aNodeIndex);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw(){OWeakObject::acquire();}
+ virtual void SAL_CALL release( ) throw(){OWeakObject::release();}
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess (via XEnumerationAccess)
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+};
+/* ---------------------------------------------------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwXRedlinePortion : public SwXTextPortion
+{
+ const SwRedline* pRedline;
+
+ void Validate() throw( ::com::sun::star::uno::RuntimeException );
+
+ using SwXTextPortion::GetPropertyValue;
+
+public:
+ SwXRedlinePortion( const SwRedline* pRed,
+ const SwUnoCrsr* pPortionCrsr,
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParent,
+ BOOL bIsStart);
+
+ ~SwXRedlinePortion();
+
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ static ::com::sun::star::uno::Any GetPropertyValue( const ::rtl::OUString& PropertyName, const SwRedline& rRedline ) throw();
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > CreateRedlineProperties( const SwRedline& rRedline, sal_Bool bIsStart ) throw();
+
+};
+/* -----------------------------11.01.01 16:52--------------------------------
+
+ ---------------------------------------------------------------------------*/
+typedef
+cppu::WeakImplHelper1
+<
+ ::com::sun::star::container::XEnumerationAccess
+>
+SwXRedlineBaseClass;
+class SwXRedline :
+ public SwXRedlineBaseClass,
+ public SwXText,
+ public SwClient
+{
+ SwDoc* pDoc;
+ SwRedline* pRedline;
+public:
+ SwXRedline(SwRedline& rRedline, SwDoc& rDoc);
+ ~SwXRedline();
+
+ TYPEINFO();
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw(){OWeakObject::acquire();}
+ virtual void SAL_CALL release( ) throw(){OWeakObject::release();}
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ const SwRedline* GetRedline() const {return pRedline;}
+};
+#endif
diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx
new file mode 100644
index 000000000000..948e972e1998
--- /dev/null
+++ b/sw/inc/unoredlines.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOREDLINES_HXX
+#define _UNOREDLINES_HXX
+
+#include <unocoll.hxx>
+#include <unobaseclass.hxx>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+
+class SwRedline;
+namespace com{ namespace sun{ namespace star{
+ namespace beans{
+ class XPropertySet;
+ }
+}}}
+typedef
+cppu::WeakImplHelper3
+<
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::container::XEnumerationAccess,
+ ::com::sun::star::lang::XServiceInfo
+>
+SwRedlinesBaseClass;
+class SwXRedlines : public SwRedlinesBaseClass,
+ public SwUnoCollection
+{
+protected:
+ virtual ~SwXRedlines();
+public:
+ SwXRedlines(SwDoc* pDoc);
+
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XEnumerationAccess - frueher XParagraphEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ static ::com::sun::star::beans::XPropertySet* GetObject( SwRedline& rRedline, SwDoc& rDoc );
+};
+/* -----------------------------12.01.01 14:58--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwXRedlineEnumeration
+ : public SwSimpleEnumeration_Base
+ , public SwClient
+{
+ SwDoc* pDoc;
+ USHORT nCurrentIndex;
+protected:
+ virtual ~SwXRedlineEnumeration();
+public:
+ SwXRedlineEnumeration(SwDoc& rDoc);
+
+
+ //XEnumeration
+ virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+
+
+#endif
+
diff --git a/sw/inc/unorefmark.hxx b/sw/inc/unorefmark.hxx
new file mode 100644
index 000000000000..ba8ca8e8b45c
--- /dev/null
+++ b/sw/inc/unorefmark.hxx
@@ -0,0 +1,174 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOREFMARK_HXX
+#define SW_UNOREFMARK_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+
+#include <cppuhelper/implbase5.hxx>
+
+#include <unobaseclass.hxx>
+
+
+class SwDoc;
+class SwModify;
+class SwFmtRefMark;
+
+
+/* -----------------27.08.98 15:11-------------------
+ *
+ * --------------------------------------------------*/
+typedef ::cppu::WeakImplHelper5
+< ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::container::XNamed
+, ::com::sun::star::text::XTextContent
+> SwXReferenceMark_Base;
+
+class SwXReferenceMark
+ : public SwXReferenceMark_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXReferenceMark();
+
+public:
+
+ SwXReferenceMark(SwDoc *const pDoc, const SwFmtRefMark *const pMark);
+
+ static SwXReferenceMark *
+ CreateXReferenceMark(SwDoc & rDoc, SwFmtRefMark const& rMarkFmt);
+ /// may return 0
+ static SwXReferenceMark *
+ GetReferenceMark(SwModify const& rUnoCB, SwFmtRefMark const& rMarkFmt);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& rValue)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XNamed
+ virtual ::rtl::OUString SAL_CALL getName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setName(const ::rtl::OUString& rName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTextContent
+ virtual void SAL_CALL attach(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOREFMARK_HXX
+
diff --git a/sw/inc/unosection.hxx b/sw/inc/unosection.hxx
new file mode 100644
index 000000000000..e54bdd5775af
--- /dev/null
+++ b/sw/inc/unosection.hxx
@@ -0,0 +1,255 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOSECTION_HXX
+#define SW_UNOSECTION_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/text/XTextContent.hpp>
+#include <com/sun/star/text/XTextSection.hpp>
+
+#include <cppuhelper/implbase7.hxx>
+
+#include <sfx2/Metadatable.hxx>
+
+#include <unobaseclass.hxx>
+
+
+class SwSectionFmt;
+
+
+/*-----------------09.03.98 13:57-------------------
+
+--------------------------------------------------*/
+
+
+struct SwTextSectionProperties_Impl;
+
+typedef ::cppu::ImplInheritanceHelper7
+< ::sfx2::MetadatableMixin
+, ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::beans::XPropertyState
+, ::com::sun::star::beans::XMultiPropertySet
+, ::com::sun::star::container::XNamed
+, ::com::sun::star::text::XTextSection
+> SwXTextSection_Base;
+
+class SwXTextSection
+ : public SwXTextSection_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ SwXTextSection(SwSectionFmt *const pFmt, const bool bIndexHeader = false);
+
+ virtual ~SwXTextSection();
+
+public:
+
+ SwSectionFmt* GetFmt() const;
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextSection >
+ CreateXTextSection(SwSectionFmt *const pFmt = 0,
+ const bool bIndexHeader = false);
+
+ // MetadatableMixin
+ virtual ::sfx2::Metadatable* GetCoreObject();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ GetModel();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent
+ virtual void SAL_CALL dispose()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener > & xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& rValue)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL
+ getPropertyState(const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyState > SAL_CALL
+ getPropertyStates(
+ const ::com::sun::star::uno::Sequence<
+ ::rtl::OUString >& rPropertyNames)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XMultiPropertySet
+ virtual void SAL_CALL setPropertyValues(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Any >& rValues)
+ throw (::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ SAL_CALL getPropertyValues(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertiesChangeListener(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertiesChangeListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL firePropertiesChangeEvent(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertiesChangeListener >& xListener)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XNamed
+ virtual ::rtl::OUString SAL_CALL getName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setName(const ::rtl::OUString& rName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTextContent
+ virtual void SAL_CALL attach(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getAnchor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTextSection
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextSection > SAL_CALL
+ getParentSection()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextSection > > SAL_CALL
+ getChildSections()
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOSECTION_HXX
+
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
new file mode 100644
index 000000000000..8423ac29ad4c
--- /dev/null
+++ b/sw/inc/unosett.hxx
@@ -0,0 +1,326 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOSETT_HXX
+#define _UNOSETT_HXX
+
+#include <swtypes.hxx>
+#include <calbck.hxx>
+#include <com/sun/star/text/XTextColumns.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/container/XIndexReplace.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase5.hxx>
+#include <tools/string.hxx>
+#include <svl/itemprop.hxx>
+
+class SwDoc;
+class SwFmtCol;
+class SwDocShell;
+class SwNumRule;
+/******************************************************************************
+ *
+ ******************************************************************************/
+/* -----------------04.05.98 12:28-------------------
+ *
+ * --------------------------------------------------*/
+class SwXFootnoteProperties : public cppu::WeakAggImplHelper2
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ SwDoc* pDoc;
+ const SfxItemPropertySet* m_pPropertySet;
+protected:
+ virtual ~SwXFootnoteProperties();
+public:
+ SwXFootnoteProperties(SwDoc* pDoc);
+
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ void Invalidate() {pDoc = 0;}
+};
+
+/* -----------------04.05.98 12:28-------------------
+ *
+ * --------------------------------------------------*/
+class SwXEndnoteProperties : public cppu::WeakAggImplHelper2
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ SwDoc* pDoc;
+ const SfxItemPropertySet* m_pPropertySet;
+protected:
+ virtual ~SwXEndnoteProperties();
+public:
+ SwXEndnoteProperties(SwDoc* pDoc);
+
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ void Invalidate() {pDoc = 0;}
+};
+
+/* -----------------04.05.98 12:28-------------------
+ *
+ * --------------------------------------------------*/
+class SwXLineNumberingProperties : public cppu::WeakAggImplHelper2
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ SwDoc* pDoc;
+ const SfxItemPropertySet* m_pPropertySet;
+protected:
+ virtual ~SwXLineNumberingProperties();
+public:
+ SwXLineNumberingProperties(SwDoc* pDoc);
+
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ void Invalidate() {pDoc = 0;}
+};
+
+/* -----------------25.05.98 08:21-------------------
+ *
+ * --------------------------------------------------*/
+class SwXNumberingRules : public cppu::WeakAggImplHelper5
+<
+ ::com::sun::star::container::XIndexReplace,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+{
+ String sNewCharStyleNames[MAXLEVEL];
+ String sNewBulletFontNames[MAXLEVEL];
+ String sCreatedNumRuleName; //connects to a numbering in SwDoc
+ SwDoc* pDoc; // wird nur fuers anmelden gebraucht
+ SwDocShell* pDocShell; //nur, wenn als ChapterNumbering verwendet
+ SwNumRule* pNumRule;
+ const SfxItemPropertySet* m_pPropertySet;
+ sal_Bool bOwnNumRuleCreated;
+ static String sInvalidStyle;
+protected:
+ virtual ~SwXNumberingRules();
+public:
+ SwXNumberingRules(SwDocShell& rDocSh); // chapter numbering
+ SwXNumberingRules(const SwNumRule& rRule); // NumRule for paragraphs, numbering styles
+ SwXNumberingRules(SwDoc& rDoc); //create a new instance
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+
+ //XIndexReplace
+ virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue>
+ GetNumberingRuleByIndex(const SwNumRule& rNumRule, sal_Int32 nIndex)const;
+ void SetNumberingRuleByIndex(SwNumRule& rNumRule,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties, sal_Int32 nIndex)
+ throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ const String* GetNewCharStyleNames() const {return sNewCharStyleNames;}
+ const String* GetBulletFontNames() const {return sNewBulletFontNames;}
+ const SwNumRule* GetNumRule() {return pNumRule;}
+
+ static const String& GetInvalidStyle();
+ void Invalidate() {pDocShell = 0;}
+ const String& GetCreatedNumRuleName() const{return sCreatedNumRuleName; }
+};
+/*-----------------12.02.98 08:27-------------------
+
+--------------------------------------------------*/
+class SwXChapterNumbering : public SwXNumberingRules
+{
+protected:
+ virtual ~SwXChapterNumbering();
+public:
+ SwXChapterNumbering(SwDocShell& rDocSh);
+
+
+ void Invalidate() {SwXNumberingRules::Invalidate();}
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+
+/* -----------------27.05.98 15:44-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTextColumns : public cppu::WeakAggImplHelper4
+<
+
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::text::XTextColumns,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ sal_Int32 nReference;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn> aTextColumns;
+ sal_Bool bIsAutomaticWidth;
+ sal_Int32 nAutoDistance;
+
+ const SfxItemPropertySet* m_pPropSet;
+
+ //separator line
+ sal_Int32 nSepLineWidth;
+ sal_Int32 nSepLineColor;
+ sal_Int8 nSepLineHeightRelative;
+ sal_Int8 nSepLineVertAlign;//style::VerticalAlignment
+ sal_Bool bSepLineIsOn;
+protected:
+ virtual ~SwXTextColumns();
+public:
+ SwXTextColumns(sal_uInt16 nColCount);
+ SwXTextColumns(const SwFmtCol& rFmtCol);
+
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextColumns
+ virtual sal_Int32 SAL_CALL getReferenceValue( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getColumnCount( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setColumnCount( sal_Int16 nColumns ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn > SAL_CALL getColumns( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setColumns( const ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextColumn >& Columns ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ sal_Int32 GetSepLineWidth() const {return nSepLineWidth;}
+ sal_Int32 GetSepLineColor() const {return nSepLineColor;}
+ sal_Int8 GetSepLineHeightRelative() const {return nSepLineHeightRelative;}
+ sal_Int8 GetSepLineVertAlign() const {return nSepLineVertAlign;}
+ sal_Bool GetSepLineIsOn() const {return bSepLineIsOn;}
+
+ sal_Bool IsAutomaticWidth() const {return bIsAutomaticWidth;}
+};
+#endif
+
+
diff --git a/sw/inc/unosrch.hxx b/sw/inc/unosrch.hxx
new file mode 100644
index 000000000000..c9da0cc39fe4
--- /dev/null
+++ b/sw/inc/unosrch.hxx
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOSRCH_HXX
+#define _UNOSRCH_HXX
+
+#include <com/sun/star/util/XPropertyReplace.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase3.hxx> // helper for implementations
+#include <tools/string.hxx>
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+class SfxItemPropertySet;
+class SwXTextDocument;
+class SwSearchProperties_Impl;
+class SfxItemSet;
+
+namespace com{namespace sun{namespace star{namespace util{
+ struct SearchOptions;
+}}}}
+
+
+/*-----------------19.12.97 12:58-------------------
+
+--------------------------------------------------*/
+class SwXTextSearch : public cppu::WeakImplHelper3
+<
+ ::com::sun::star::util::XPropertyReplace,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel
+>
+{
+ friend class SwXTextDocument;
+
+ String sSearchText;
+ String sReplaceText;
+
+ SwSearchProperties_Impl* pSearchProperties;
+ SwSearchProperties_Impl* pReplaceProperties;
+
+
+ const SfxItemPropertySet* m_pPropSet;
+ sal_Bool bAll : 1;
+ sal_Bool bWord : 1;
+ sal_Bool bBack : 1;
+ sal_Bool bExpr : 1;
+ sal_Bool bCase : 1;
+// sal_Bool bInSel: 1; // wie geht Suchen in Selektionen?
+ sal_Bool bStyles:1;
+ sal_Bool bSimilarity : 1;
+ sal_Bool bLevRelax :1;
+ sal_Int16 nLevExchange;
+ sal_Int16 nLevAdd;
+ sal_Int16 nLevRemove;
+
+ sal_Bool bIsValueSearch :1;
+protected:
+ virtual ~SwXTextSearch();
+public:
+ SwXTextSearch();
+
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XSearchDescriptor
+ virtual ::rtl::OUString SAL_CALL getSearchString( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setSearchString( const ::rtl::OUString& aString ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XReplaceDescriptor
+ virtual ::rtl::OUString SAL_CALL getReplaceString(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setReplaceString(const ::rtl::OUString& aReplaceString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XPropertyReplace
+ virtual sal_Bool SAL_CALL getValueSearch(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setValueSearch(sal_Bool ValueSearch_) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > SAL_CALL getSearchAttributes(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setSearchAttributes(const ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& aSearchAttribs) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > SAL_CALL getReplaceAttributes(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setReplaceAttributes(const ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& aSearchAttribs) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ void FillSearchItemSet(SfxItemSet& rSet) const;
+ void FillReplaceItemSet(SfxItemSet& rSet) const;
+
+ sal_Bool HasSearchAttributes() const;
+ sal_Bool HasReplaceAttributes() const;
+
+ void FillSearchOptions( ::com::sun::star::util::SearchOptions&
+ rSearchOpt ) const;
+};
+
+#endif
+
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
new file mode 100644
index 000000000000..4a9fd533da66
--- /dev/null
+++ b/sw/inc/unostyle.hxx
@@ -0,0 +1,467 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOSTYLE_HXX
+#define _UNOSTYLE_HXX
+
+#include <boost/shared_ptr.hpp>
+#include <svl/style.hxx>
+#include <svl/lstner.hxx>
+#include <unocoll.hxx>
+#include <unomap.hxx>
+#include <com/sun/star/style/XStyle.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/style/XStyleLoader.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XMultiPropertyStates.hpp>
+#include <cppuhelper/implbase7.hxx>
+#include <com/sun/star/document/XEventsSupplier.hpp>
+#include <calbck.hxx>
+
+
+#include <com/sun/star/style/XAutoStyleFamily.hpp>
+#include <com/sun/star/style/XAutoStyles.hpp>
+#include <com/sun/star/style/XAutoStyle.hpp>
+
+#include <istyleaccess.hxx>
+
+class SwDocShell;
+class SfxItemPropertySet;
+class SwXStyle;
+class SwStyleProperties_Impl;
+class SwAutoStylesEnumImpl;
+class IStyleAccess;
+class SfxItemSet;
+typedef boost::shared_ptr<SfxItemSet> SfxItemSet_Pointer_t;
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+/*-----------------12.02.98 08:27-------------------
+
+--------------------------------------------------*/
+class SwXStyleFamilies : public cppu::WeakImplHelper4
+<
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::container::XNameAccess,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::style::XStyleLoader
+>,
+ public SwUnoCollection
+{
+ SwDocShell* pDocShell;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxCharStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxParaStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxFrameStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxPageStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > * pxNumberingStyles;
+protected:
+ virtual ~SwXStyleFamilies();
+public:
+ SwXStyleFamilies(SwDocShell& rDocShell);
+
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XStyleLoader
+ virtual void SAL_CALL loadStylesFromURL(const rtl::OUString& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aOptions) throw( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getStyleLoaderOptions(void) throw( ::com::sun::star::uno::RuntimeException );
+
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+};
+
+/* -----------------26.05.98 10:56-------------------
+ *
+ * --------------------------------------------------*/
+class SwXStyleFamily : public cppu::WeakImplHelper4
+<
+ ::com::sun::star::container::XNameContainer,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::container::XIndexAccess,
+ ::com::sun::star::beans::XPropertySet
+>,
+ public SfxListener
+{
+ SfxStyleFamily eFamily; // Familie
+ SfxStyleSheetBasePool* pBasePool;
+// const SfxItemPropertyMap* _pPropMap;
+ SwDocShell* pDocShell;
+
+ SwXStyle* _FindStyle(const String& rStyleName) const;
+public:
+ SwXStyleFamily(SwDocShell* pDocShell, sal_uInt16 nFamily);
+ ~SwXStyleFamily();
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XNameContainer
+ virtual void SAL_CALL insertByName(const rtl::OUString& Name, const ::com::sun::star::uno::Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL replaceByName(const rtl::OUString& Name, const ::com::sun::star::uno::Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //SfxListener
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+};
+/* -----------------20.05.98 09:51-------------------
+ *
+ * --------------------------------------------------*/
+class SwXStyle : public cppu::WeakImplHelper7
+<
+ ::com::sun::star::style::XStyle,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XMultiPropertySet,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::beans::XMultiPropertyStates
+>,
+ public SfxListener,
+ public SwClient
+{
+ friend class SwXStyleFamily;
+ SwDoc* m_pDoc;
+ String sStyleName;
+ SfxStyleSheetBasePool* pBasePool;
+ SfxStyleFamily eFamily; // fuer Notify
+
+ sal_Bool bIsDescriptor : 1;
+ sal_Bool bIsConditional : 1;
+ String sParentStyleName;
+ SwStyleProperties_Impl* pPropImpl;
+
+ void ApplyDescriptorProperties();
+protected:
+ void Invalidate();
+
+ const SfxStyleSheetBasePool* GetBasePool() const {return pBasePool;}
+ SfxStyleSheetBasePool* GetBasePool() {return pBasePool;}
+
+ void SetStyleName(const String& rSet){ sStyleName = rSet;}
+ SwStyleProperties_Impl* GetPropImpl(){return pPropImpl;}
+ com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData;
+ com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxStyleFamily;
+
+ void SAL_CALL SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+public:
+ SwXStyle(SwDoc* pDoc, SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, BOOL bConditional = FALSE);
+ SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam,
+ SwDoc* pDoc,
+ const String& rStyleName);//,
+ //const SfxItemPropertyMap* _pMap);
+ ~SwXStyle();
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XStyle
+ virtual sal_Bool SAL_CALL isUserDefined(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL isInUse(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getParentStyle(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setParentStyle(const rtl::OUString& aParentStyle) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XMultiPropertySet
+// virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XMultiPropertyStates
+ //virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SfxListener
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ const String& GetStyleName() const { return sStyleName;}
+ SfxStyleFamily GetFamily() const {return eFamily;}
+
+ sal_Bool IsDescriptor() const {return bIsDescriptor;}
+ sal_Bool IsConditional() const { return bIsConditional;}
+ const String& GetParentStyleName() const { return sParentStyleName;}
+ void SetDoc(SwDoc* pDc, SfxStyleSheetBasePool* pPool)
+ {
+ bIsDescriptor = sal_False; m_pDoc = pDc;
+ pBasePool = pPool;
+ StartListening(*pBasePool);
+ }
+ SwDoc* GetDoc() const { return m_pDoc; }
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+/* -----------------------------15.12.00 14:25--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwXFrameStyle : public SwXStyle,
+ public com::sun::star::document::XEventsSupplier
+{
+public:
+ SwXFrameStyle(SfxStyleSheetBasePool& rPool,
+ SwDoc* pDoc,
+ const String& rStyleName) :
+ SwXStyle(rPool, SFX_STYLE_FAMILY_FRAME, pDoc, rStyleName){}
+ SwXFrameStyle( SwDoc *pDoc );
+ ~SwXFrameStyle();
+
+ virtual void SAL_CALL acquire( ) throw(){SwXStyle::acquire();}
+ virtual void SAL_CALL release( ) throw(){SwXStyle::release();}
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw(::com::sun::star::uno::RuntimeException);
+
+ friend class SwFrameStyleEventDescriptor;
+};
+/* -----------------24.08.98 16:04-------------------
+ *
+ * --------------------------------------------------*/
+class SwXPageStyle : public SwXStyle
+{
+ SwDocShell* pDocShell;
+
+protected:
+ void SAL_CALL SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+public:
+ SwXPageStyle(SfxStyleSheetBasePool& rPool, SwDocShell* pDocSh, SfxStyleFamily eFam,
+ const String& rStyleName);//,
+ //const SfxItemPropertyMap* _pMap);
+ SwXPageStyle(SwDocShell* pDocSh);
+ ~SwXPageStyle();
+
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::uno::RuntimeException);
+
+};
+/*-- 19.05.2006 11:20:22---------------------------------------------------
+ access to all automatic style families
+ -----------------------------------------------------------------------*/
+class SwXAutoStyles :
+ public cppu::WeakImplHelper1< ::com::sun::star::style::XAutoStyles >,
+ public SwUnoCollection
+{
+ SwDocShell *pDocShell;
+ ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoCharStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoRubyStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoParaStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyleFamily > xAutoNotxtStyles;
+ virtual ~SwXAutoStyles();
+
+public:
+ SwXAutoStyles(SwDocShell& rDocShell);
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
+
+};
+/*-- 19.05.2006 11:20:12---------------------------------------------------
+ access to a family of automatic styles (character or paragraph or ...)
+ -----------------------------------------------------------------------*/
+class SwXAutoStyleFamily : public cppu::WeakImplHelper1< com::sun::star::style::XAutoStyleFamily >,
+ public SwClient
+{
+ SwDocShell *pDocShell;
+ IStyleAccess::SwAutoStyleFamily eFamily;
+
+public:
+ SwXAutoStyleFamily(SwDocShell* pDocShell, IStyleAccess::SwAutoStyleFamily eFamily);
+ virtual ~SwXAutoStyleFamily();
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ //XAutoStyleFamily
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyle > SAL_CALL insertStyle( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Values ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration( ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+};
+class SwXAutoStylesEnumerator : public cppu::WeakImplHelper1< ::com::sun::star::container::XEnumeration >,
+ public SwClient
+{
+ SwAutoStylesEnumImpl *pImpl;
+public:
+ SwXAutoStylesEnumerator( SwDoc* pDoc, IStyleAccess::SwAutoStyleFamily eFam );
+ virtual ~SwXAutoStylesEnumerator();
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ //XEnumeration
+ virtual sal_Bool SAL_CALL hasMoreElements( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL nextElement( ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+};
+/*-- 19.05.2006 11:20:02---------------------------------------------------
+ an automatic style
+ -----------------------------------------------------------------------*/
+
+class SwXAutoStyle : public cppu::WeakImplHelper3
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XPropertyState,
+ ::com::sun::star::style::XAutoStyle
+>,
+ public SwClient
+{
+ SfxItemSet_Pointer_t pSet;
+ IStyleAccess::SwAutoStyleFamily eFamily;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+public:
+
+ SwXAutoStyle( SwDoc* pDoc, SfxItemSet_Pointer_t pInitSet, IStyleAccess::SwAutoStyleFamily eFam );
+ virtual ~SwXAutoStyle();
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XMultiPropertySet
+ // virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XMultiPropertyStates
+ // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // Special
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getProperties() throw (::com::sun::star::uno::RuntimeException);
+};
+#endif
+
+
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
new file mode 100644
index 000000000000..372b55ca9193
--- /dev/null
+++ b/sw/inc/unotbl.hxx
@@ -0,0 +1,625 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOTBL_HXX
+#define _UNOTBL_HXX
+
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/util/XSortable.hpp>
+#include <com/sun/star/chart/XChartData.hpp>
+#include <com/sun/star/chart/XChartDataArray.hpp>
+#include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
+#include <com/sun/star/text/XTextTableCursor.hpp>
+#include <com/sun/star/text/XTextTable.hpp>
+#include <com/sun/star/table/XCellRange.hpp>
+#include <com/sun/star/sheet/XCellRangeData.hpp>
+#include <com/sun/star/table/XAutoFormattable.hpp>
+
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase5.hxx>
+#include <cppuhelper/implbase7.hxx>
+#include <cppuhelper/implbase10.hxx>
+
+#include <comphelper/uno3.hxx>
+#include <tools/string.hxx>
+
+#include <calbck.hxx>
+#include <TextCursorHelper.hxx>
+#include <unoevtlstnr.hxx>
+#include <unotext.hxx>
+
+
+class SwUnoCrsr;
+class SwTable;
+class SwTableBox;
+class SwTableLine;
+class SwTableCursor;
+class SwTableBoxFmt;
+class SwChartDataProvider;
+class SwFrmFmt;
+
+
+/* -----------------------------22.09.00 11:10--------------------------------
+
+ ---------------------------------------------------------------------------*/
+class SwChartEventListenerContainer : public SwEventListenerContainer
+{
+ public:
+ SwChartEventListenerContainer( ::com::sun::star::uno::XInterface* pxParentL) :
+ SwEventListenerContainer(pxParentL){}
+ void ChartDataChanged();
+};
+/* ---------------------------------------------------------------------------
+
+ ---------------------------------------------------------------------------*/
+typedef
+cppu::WeakImplHelper4
+<
+ ::com::sun::star::table::XCell,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::container::XEnumerationAccess
+>
+SwXCellBaseClass;
+class SwXCell : public SwXCellBaseClass,
+ public SwXText,
+ public SwClient
+{
+ friend void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt,
+ BOOL bKeepNumberFmt = FALSE );
+ friend double lcl_getValue( SwXCell &rCell );
+ friend void lcl_setValue( SwXCell &rCell, double nVal );
+
+
+ const SfxItemPropertySet* m_pPropSet;
+ SwTableBox* pBox; // only set in non-XML import
+ const SwStartNode* pStartNode; // only set in XML import
+
+ // table position where pBox was found last
+ sal_uInt16 nFndPos;
+
+protected:
+ virtual const SwStartNode *GetStartNode() const;
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor >
+ CreateCursor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ bool IsValid() const;
+
+ virtual ~SwXCell();
+
+public:
+ SwXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, sal_uInt16 nPos=USHRT_MAX );
+ SwXCell(SwFrmFmt* pTblFmt, const SwStartNode& rStartNode); // XML import interface
+
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw();
+ virtual void SAL_CALL release( ) throw();
+
+ //XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XCell
+ virtual ::rtl::OUString SAL_CALL getFormula( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula ) throw(::com::sun::star::uno::RuntimeException);
+ virtual double SAL_CALL getValue( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setValue( double nValue ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::table::CellContentType SAL_CALL getType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getError( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & aTextPosition) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setString(const rtl::OUString& aString) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ //XEnumerationAccess - frueher XParagraphEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ SwTableBox* GetTblBox()const {return pBox;}
+ static SwXCell* CreateXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, SwTable *pTbl = 0 );
+ SwTableBox* FindBox(SwTable* pTable, SwTableBox* pBox);
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+};
+/* -----------------27.06.98 15:40-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTextTableRow : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+{
+ const SfxItemPropertySet* m_pPropSet;
+ SwTableLine* pLine;
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+protected:
+ virtual ~SwXTextTableRow();
+public:
+ SwXTextTableRow(SwFrmFmt* pFmt, SwTableLine* pLine);
+
+
+ TYPEINFO();
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ const SwTableLine* GetTblRow() const {return pLine;}
+ static SwTableLine* FindLine(SwTable* pTable, SwTableLine* pLine);
+};
+/* -----------------20.07.98 13:03-------------------
+ *
+ * --------------------------------------------------*/
+typedef cppu::WeakImplHelper3<
+ ::com::sun::star::text::XTextTableCursor,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::beans::XPropertySet
+ > SwXTextTableCursor_Base;
+class SW_DLLPUBLIC SwXTextTableCursor : public SwXTextTableCursor_Base
+ ,public SwClient
+ ,public OTextCursorHelper
+{
+ SwDepend aCrsrDepend;
+ const SfxItemPropertySet* m_pPropSet;
+
+ // SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
+
+protected:
+ virtual ~SwXTextTableCursor();
+public:
+ SwXTextTableCursor(SwFrmFmt* pFmt, SwTableBox* pBox);
+ SwXTextTableCursor(SwFrmFmt& rTableFmt,
+ const SwTableCursor* pTableSelection);
+
+
+ DECLARE_XINTERFACE()
+
+ //XTextTableCursor
+ virtual ::rtl::OUString SAL_CALL getRangeName( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoCellByName( const ::rtl::OUString& aCellName, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goUp( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goDown( sal_Int16 nCount, sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoStart( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoEnd( sal_Bool bExpand ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL mergeRange( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL splitRange( sal_Int16 Count, sal_Bool Horizontal ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ // ITextCursorHelper
+ virtual const SwPaM* GetPaM() const;
+ virtual SwPaM* GetPaM();
+ virtual const SwDoc* GetDoc() const;
+ virtual SwDoc* GetDoc();
+
+ const SwUnoCrsr* GetCrsr() const;
+ SwUnoCrsr* GetCrsr();
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+};
+
+/*-----------------11.12.97 09:38-------------------
+
+--------------------------------------------------*/
+struct SwRangeDescriptor
+{
+ sal_Int32 nTop;
+ sal_Int32 nLeft;
+ sal_Int32 nBottom;
+ sal_Int32 nRight;
+
+ void Normalize();
+};
+
+class SwTableProperties_Impl;
+class SwXTextTable : public cppu::WeakImplHelper10
+<
+ ::com::sun::star::text::XTextTable,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::table::XCellRange,
+ ::com::sun::star::chart::XChartDataArray,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::table::XAutoFormattable,
+ ::com::sun::star::util::XSortable,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::sheet::XCellRangeData
+>,
+ public SwClient
+{
+ SwEventListenerContainer aLstnrCntnr;
+ SwChartEventListenerContainer aChartLstnrCntnr;
+ const SfxItemPropertySet* m_pPropSet;
+
+ // Descriptor-interface
+ SwTableProperties_Impl* pTableProps;
+ String m_sTableName;
+ sal_Bool bIsDescriptor;
+ unsigned short nRows;
+ unsigned short nColumns;
+
+
+ sal_Bool bFirstRowAsLabel :1;
+ sal_Bool bFirstColumnAsLabel :1;
+protected:
+ virtual ~SwXTextTable();
+public:
+ SwXTextTable();
+ SwXTextTable(SwFrmFmt& rFrmFmt);
+
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ TYPEINFO();
+
+ //XTextTable
+ virtual void SAL_CALL initialize( sal_Int32 nRows, sal_Int32 nColumns ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableRows > SAL_CALL getRows( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableColumns > SAL_CALL getColumns( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByName( const ::rtl::OUString& aCellName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getCellNames( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextTableCursor > SAL_CALL createCursorByCellName( const ::rtl::OUString& aCellName ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTextContent
+ virtual void SAL_CALL attach(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getAnchor( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XCellRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw(com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByName( const ::rtl::OUString& aRange ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XChartDataArray
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XChartData
+ virtual void SAL_CALL addChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual double SAL_CALL getNotANumber( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XSortable
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XAutoFormattable
+ virtual void SAL_CALL autoFormat(const rtl::OUString& aName) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XNamed
+ virtual rtl::OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setName(const rtl::OUString& Name_) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XCellRangeData
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > > SAL_CALL getDataArray( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& aArray ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+
+ sal_uInt16 getRowCount(void);
+ sal_uInt16 getColumnCount(void);
+ ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > GetRangeByName(SwFrmFmt* pFmt, SwTable* pTable,
+ const String& sTLName, const String& sBRName,
+ SwRangeDescriptor& rDesc);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+
+ static SwXTextTable* GetImplementation(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xRef );
+};
+
+/* -----------------27.04.98 16:41-------------------
+ *
+ * --------------------------------------------------*/
+class SwXCellRange : public cppu::WeakImplHelper7
+<
+ ::com::sun::star::table::XCellRange,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::chart::XChartDataArray,
+ ::com::sun::star::util::XSortable,
+ ::com::sun::star::sheet::XCellRangeData
+>,
+ public SwClient
+{
+ SwDepend aCursorDepend; //the cursor is removed after the doc has been removed
+ SwChartEventListenerContainer aChartLstnrCntnr;
+
+ SwRangeDescriptor aRgDesc;
+ const SfxItemPropertySet* m_pPropSet;
+
+ SwUnoCrsr* pTblCrsr;
+
+ sal_Bool bFirstRowAsLabel :1;
+ sal_Bool bFirstColumnAsLabel :1;
+
+public:
+ SwXCellRange(SwUnoCrsr* pCrsr, SwFrmFmt& rFrmFmt, SwRangeDescriptor& rDesc);
+ ~SwXCellRange();
+
+ TYPEINFO();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+
+ //XCellRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw(com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL getCellRangeByName( const ::rtl::OUString& aRange ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XChartData
+ virtual void SAL_CALL addChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDataChangeEventListener >& aListener ) throw(::com::sun::star::uno::RuntimeException);
+ virtual double SAL_CALL getNotANumber( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isNotANumber( double nNumber ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XChartDataArray
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL getData( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > >& aData ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRowDescriptions ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aColumnDescriptions ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XSortable
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL sort(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xDescriptor) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XCellRangeData
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > > SAL_CALL getDataArray( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& aArray ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ sal_uInt16 getRowCount(void);
+ sal_uInt16 getColumnCount(void);
+
+ const SwUnoCrsr* GetTblCrsr() const;
+
+ // for SwChartDataSequence
+ void GetDataSequence(
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > *pAnySeq,
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > *pTxtSeq,
+ ::com::sun::star::uno::Sequence< double > *pDblSeq,
+ sal_Bool bForceNumberResults = sal_False ) throw (::com::sun::star::uno::RuntimeException);
+
+};
+/* -----------------03.02.99 07:31-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTableRows : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::table::XTableRows,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+
+{
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+protected:
+ virtual ~SwXTableRows();
+public:
+ SwXTableRows(SwFrmFmt& rFrmFmt);
+
+
+ TYPEINFO();
+
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) throw( ::com::sun::star::uno::RuntimeException );
+
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut );
+
+// SMART_UNO_DECLARATION( SwXTableRows, UsrObject );
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTableRows
+ virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+
+/* -----------------03.02.99 07:31-------------------
+ *
+ * --------------------------------------------------*/
+class SwXTableColumns : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::table::XTableColumns,
+ ::com::sun::star::lang::XServiceInfo
+>,
+ public SwClient
+
+{
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+protected:
+ virtual ~SwXTableColumns();
+public:
+ SwXTableColumns(SwFrmFmt& rFrmFmt);
+
+
+ TYPEINFO();
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) throw( ::com::sun::star::uno::RuntimeException );
+
+// automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
+// virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut );
+
+// SMART_UNO_DECLARATION( SwXTableColumns, UsrObject );
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+ //XTableColumns
+ virtual void SAL_CALL insertByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) throw( ::com::sun::star::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+};
+
+#endif
+
+
+
+
diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx
new file mode 100644
index 000000000000..d6ada94d5396
--- /dev/null
+++ b/sw/inc/unotext.hxx
@@ -0,0 +1,346 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOTEXT_HXX
+#define SW_UNOTEXT_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextCopy.hpp>
+#include <com/sun/star/text/XTextRangeCompare.hpp>
+#include <com/sun/star/text/XRelativeTextContentInsert.hpp>
+#include <com/sun/star/text/XRelativeTextContentRemove.hpp>
+#include <com/sun/star/text/XTextAppendAndConvert.hpp>
+
+#include <unobaseclass.hxx>
+
+
+namespace com { namespace sun { namespace star {
+ namespace text {
+ class XTextContent;
+ }
+} } }
+
+class SfxItemPropertySet;
+class SwDoc;
+class SwStartNode;
+class SwPaM;
+class OTextCursorHelper;
+class SwXTextRange;
+
+
+/* -----------------03.12.98 12:22-------------------
+ *
+ * --------------------------------------------------*/
+
+class SwXText
+ : public ::com::sun::star::lang::XTypeProvider
+ , public ::com::sun::star::lang::XUnoTunnel
+ , public ::com::sun::star::beans::XPropertySet
+ , public ::com::sun::star::text::XTextAppendAndConvert
+ , public ::com::sun::star::text::XTextCopy
+ , public ::com::sun::star::text::XTextRangeCompare
+ , public ::com::sun::star::text::XRelativeTextContentInsert
+ , public ::com::sun::star::text::XRelativeTextContentRemove
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual void PrepareForAttach(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xRange,
+ SwPaM const & rPam);
+ virtual bool CheckForOwnMemberMeta(
+ const SwPaM & rPam, const bool bAbsorb)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+protected:
+
+ bool IsValid() const;
+ void Invalidate();
+ void SetDoc(SwDoc *const pDoc);
+
+ virtual ~SwXText();
+
+public: /*not protected because C++ is retarded*/
+ virtual const SwStartNode *GetStartNode() const;
+
+public:
+
+ SwXText(SwDoc *const pDoc, const enum CursorType eType);
+
+ const SwDoc* GetDoc() const;
+ SwDoc* GetDoc();
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor >
+ CreateCursor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
+ SAL_CALL getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& rValue)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ SAL_CALL getText()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getStart()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getEnd()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getString()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setString(const ::rtl::OUString& rString)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSimpleText
+ virtual void SAL_CALL insertString(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xRange,
+ const ::rtl::OUString& aString, sal_Bool bAbsorb)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertControlCharacter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xRange,
+ sal_Int16 nControlCharacter, sal_Bool bAbsorb)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XText
+ virtual void SAL_CALL insertTextContent(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xRange,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > & xContent,
+ sal_Bool bAbsorb)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTextContent(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > & xContent)
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XParagraphAppend
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL
+ appendParagraph(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >&
+ rCharacterAndParagraphProperties)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL
+ finishParagraph(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >&
+ rCharacterAndParagraphProperties)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XTextPortionAppend
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL
+ appendTextPortion(
+ const ::rtl::OUString& rText,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >&
+ rCharacterAndParagraphProperties)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XTextContentAppend
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL
+ appendTextContent(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent >& xTextContent,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >&
+ rCharacterAndParagraphProperties)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XTextConvert
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent > SAL_CALL
+ convertToTextFrame(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange >& xStart,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange >& xEnd,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& xFrameProperties)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextTable > SAL_CALL
+ convertToTable(
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > > > > const&
+ rTableRanges,
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > > > const&
+ rCellProperties,
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > > const&
+ rRowProperties,
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > const&
+ rTableProperties)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XTextRangeCompare
+ sal_Int16 SAL_CALL compareRegionStarts(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange >& xR1,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange >& xR2)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ sal_Int16 SAL_CALL compareRegionEnds(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange >& xR1,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange >& xR2)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XRelativeTextContentInsert
+ virtual void SAL_CALL insertTextContentBefore(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent>& xNewContent,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent>& xSuccessor)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertTextContentAfter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent>& xNewContent,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent>& xPredecessor)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XRelativeTextContentRemove
+ virtual void SAL_CALL removeTextContentBefore(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent>& xSuccessor)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTextContentAfter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent>& xPredecessor)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XTextCopy
+ virtual void SAL_CALL copyText(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCopy >& xSource )
+ throw (::com::sun::star::uno::RuntimeException);
+};
+
+#endif // SW_UNOTEXT_HXX
+
diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx
new file mode 100644
index 000000000000..dd5fa736fe17
--- /dev/null
+++ b/sw/inc/unotextbodyhf.hxx
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOTEXTBODYHF_HXX
+#define SW_UNOTEXTBODYHF_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+
+#include <cppuhelper/implbase2.hxx>
+
+#include <unotext.hxx>
+
+
+class SwDoc;
+class SwFrmFmt;
+class SwXTextCursor;
+
+
+typedef ::cppu::WeakAggImplHelper2
+< ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::container::XEnumerationAccess
+> SwXBodyText_Base;
+
+class SwXBodyText
+ : public SwXBodyText_Base
+ , public SwXText
+{
+
+protected:
+
+ virtual ~SwXBodyText();
+
+public:
+
+ SwXBodyText(SwDoc *const pDoc);
+
+ SwXTextCursor * CreateTextCursor(const bool bIgnoreTables = false);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() { OWeakObject::release(); }
+
+ // XAggregation
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(
+ const ::com::sun::star::uno::Type& rType)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
+ SAL_CALL getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
+ getImplementationId()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSimpleText
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor > SAL_CALL
+ createTextCursor()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor > SAL_CALL
+ createTextCursorByRange(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextPosition)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+
+/* -----------------25.08.98 11:02-------------------
+ *
+ * --------------------------------------------------*/
+typedef ::cppu::WeakImplHelper2
+< ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::container::XEnumerationAccess
+> SwXHeadFootText_Base;
+
+class SwXHeadFootText
+ : public SwXHeadFootText_Base
+ , public SwXText
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+protected:
+
+ virtual const SwStartNode *GetStartNode() const;
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor >
+ CreateCursor()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ~SwXHeadFootText();
+
+ SwXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader);
+
+public:
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ CreateXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader);
+ static bool IsXHeadFootText(SwClient *const pClient);
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ const ::com::sun::star::uno::Type& rType)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw() { OWeakObject::acquire(); }
+ virtual void SAL_CALL release() throw() { OWeakObject::release(); }
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
+ SAL_CALL getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
+ getImplementationId()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSimpleText
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor > SAL_CALL
+ createTextCursor()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor > SAL_CALL
+ createTextCursorByRange(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextPosition)
+ throw (::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOTEXTBODYHF_HXX
+
diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx
new file mode 100644
index 000000000000..fe04602377c0
--- /dev/null
+++ b/sw/inc/unotextcursor.hxx
@@ -0,0 +1,347 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOTEXTCURSOR_HXX
+#define SW_UNOTEXTCURSOR_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/beans/XMultiPropertyStates.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/util/XSortable.hpp>
+#include <com/sun/star/document/XDocumentInsertable.hpp>
+#include <com/sun/star/text/XSentenceCursor.hpp>
+#include <com/sun/star/text/XWordCursor.hpp>
+#include <com/sun/star/text/XParagraphCursor.hpp>
+#include <com/sun/star/text/XRedline.hpp>
+
+#include <cppuhelper/implbase12.hxx>
+
+#include <comphelper/uno3.hxx>
+
+#include <unobaseclass.hxx>
+#include <TextCursorHelper.hxx>
+
+
+class SwDoc;
+struct SwPosition;
+class SwUnoCrsr;
+
+
+typedef ::cppu::WeakImplHelper12
+< ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::beans::XPropertyState
+, ::com::sun::star::beans::XMultiPropertyStates
+, ::com::sun::star::container::XEnumerationAccess
+, ::com::sun::star::container::XContentEnumerationAccess
+, ::com::sun::star::util::XSortable
+, ::com::sun::star::document::XDocumentInsertable
+, ::com::sun::star::text::XSentenceCursor
+, ::com::sun::star::text::XWordCursor
+, ::com::sun::star::text::XParagraphCursor
+, ::com::sun::star::text::XRedline
+> SwXTextCursor_Base;
+
+class SwXTextCursor
+ : public SwXTextCursor_Base
+ , public OTextCursorHelper
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXTextCursor();
+
+public:
+
+ SwXTextCursor(
+ SwDoc & rDoc,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XText > const& xParent,
+ const enum CursorType eType,
+ SwPosition const& rPos,
+ SwPosition const*const pMark = 0);
+ SwXTextCursor(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XText > const& xParent,
+ SwPaM const& rSourceCursor,
+ const enum CursorType eType = CURSOR_ALL);
+
+ SwUnoCrsr * GetCursor();
+ const SwUnoCrsr * GetCursor() const;
+
+ bool IsAtEndOfMeta() const;
+
+ void DeleteAndInsert(::rtl::OUString const& rText,
+ const bool bForceExpandHints);
+
+ // OTextCursorHelper
+ virtual const SwPaM* GetPaM() const;
+ virtual SwPaM* GetPaM();
+ virtual const SwDoc* GetDoc() const;
+ virtual SwDoc* GetDoc();
+
+ DECLARE_XINTERFACE()
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& rValue)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL
+ getPropertyState(const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyState > SAL_CALL
+ getPropertyStates(
+ const ::com::sun::star::uno::Sequence<
+ ::rtl::OUString >& rPropertyNames)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XMultiPropertyStates
+ virtual void SAL_CALL setAllPropertiesToDefault()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertiesToDefault(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
+ SAL_CALL getPropertyDefaults(
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString >&
+ rPropertyNames)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XContentEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createContentEnumeration(const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getAvailableServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSortable
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > SAL_CALL
+ createSortDescriptor()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL sort(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& xDescriptor)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XDocumentInsertable
+ virtual void SAL_CALL insertDocumentFromURL(
+ const ::rtl::OUString& rURL,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& rOptions)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::io::IOException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ SAL_CALL getText()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getStart()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getEnd()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getString()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setString(const ::rtl::OUString& rString)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTextCursor
+ virtual void SAL_CALL collapseToStart()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL collapseToEnd()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isCollapsed()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goLeft(sal_Int16 nCount, sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL goRight(sal_Int16 nCount, sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoStart(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoEnd(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL gotoRange(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange >& xRange,
+ sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XWordCursor
+ virtual sal_Bool SAL_CALL isStartOfWord()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isEndOfWord()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoNextWord(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoPreviousWord(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoEndOfWord(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoStartOfWord(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XSentenceCursor
+ virtual sal_Bool SAL_CALL isStartOfSentence()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isEndOfSentence()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoNextSentence(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoPreviousSentence(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoStartOfSentence(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoEndOfSentence(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XParagraphCursor
+ virtual sal_Bool SAL_CALL isStartOfParagraph()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isEndOfParagraph()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoStartOfParagraph(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoEndOfParagraph(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoNextParagraph(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL gotoPreviousParagraph(sal_Bool Expand)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XRedline
+ virtual void SAL_CALL makeRedline(
+ const ::rtl::OUString& rRedlineType,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& RedlineProperties)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOTEXTCURSOR_HXX
+
diff --git a/sw/inc/unotextmarkup.hxx b/sw/inc/unotextmarkup.hxx
new file mode 100644
index 000000000000..98bb3416d385
--- /dev/null
+++ b/sw/inc/unotextmarkup.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOTEXTMARKUP_HXX
+#define _UNOTEXTMARKUP_HXX
+
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <com/sun/star/text/XTextMarkup.hpp>
+#include <com/sun/star/text/XMultiTextMarkup.hpp>
+#include <calbck.hxx>
+#include <modeltoviewhelper.hxx>
+
+#include <map>
+
+namespace com { namespace sun { namespace star { namespace container {
+ class XStringKeyMap;
+} } } }
+
+class SwTxtNode;
+class SfxPoolItem;
+
+/** Implementation of the css::text::XTextMarkup interface
+ */
+class SwXTextMarkup:
+ public ::cppu::WeakImplHelper2
+ <
+ ::com::sun::star::text::XTextMarkup,
+ ::com::sun::star::text::XMultiTextMarkup
+ >,
+ public SwClient
+{
+public:
+ SwXTextMarkup( SwTxtNode& rTxtNode, const ModelToViewHelper::ConversionMap* pConversionMap );
+ virtual ~SwXTextMarkup();
+
+ // ::com::sun::star::text::XTextMarkup:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > SAL_CALL getMarkupInfoContainer() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL commitTextMarkup(::sal_Int32 nType, const ::rtl::OUString & aIdentifier, ::sal_Int32 nStart, ::sal_Int32 nLength, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XStringKeyMap > & xMarkupInfoContainer) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::text::XMultiTextMarkup:
+ virtual void SAL_CALL commitMultiTextMarkup( const ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextMarkupDescriptor >& aMarkups ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ //SwClient
+ virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+
+private:
+ SwXTextMarkup( const SwXTextMarkup & ); // not defined
+ SwXTextMarkup & operator =( const SwXTextMarkup & ); // not defined
+
+protected:
+ SwTxtNode* mpTxtNode;
+ const ModelToViewHelper::ConversionMap* mpConversionMap;
+
+};
+
+
+/** Implementation of the ::com::sun::star::container::XStringKeyMap interface
+ */
+class SwXStringKeyMap:
+ public ::cppu::WeakImplHelper1<
+ ::com::sun::star::container::XStringKeyMap>
+{
+public:
+ SwXStringKeyMap();
+
+ // ::com::sun::star::container::XStringKeyMap:
+ virtual ::com::sun::star::uno::Any SAL_CALL getValue(const ::rtl::OUString & aKey) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::container::NoSuchElementException);
+ virtual ::sal_Bool SAL_CALL hasValue(const ::rtl::OUString & aKey) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertValue(const ::rtl::OUString & aKey, const ::com::sun::star::uno::Any & aValue) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException);
+ virtual ::sal_Int32 SAL_CALL getCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getKeyByIndex(::sal_Int32 nIndex) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getValueByIndex(::sal_Int32 nIndex) throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException);
+
+private:
+ SwXStringKeyMap(SwXStringKeyMap &); // not defined
+ void operator =(SwXStringKeyMap &); // not defined
+
+ virtual ~SwXStringKeyMap() {}
+
+ std::map< rtl::OUString, ::com::sun::star::uno::Any > maMap;
+};
+
+#endif
+
+
diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx
new file mode 100644
index 000000000000..ff7a536fb69e
--- /dev/null
+++ b/sw/inc/unotextrange.hxx
@@ -0,0 +1,338 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 SW_UNOTEXTRANGE_HXX
+#define SW_UNOTEXTRANGE_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/XRedline.hpp>
+
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase8.hxx>
+
+#include <pam.hxx>
+#include <unobaseclass.hxx>
+
+
+class SwDoc;
+struct SwPosition;
+class SwPaM;
+class SwUnoCrsr;
+class SwFrmFmt;
+
+/* -----------------29.04.98 07:35-------------------
+ *
+ * --------------------------------------------------*/
+class SwUnoInternalPaM
+ : public SwPaM
+{
+
+private:
+ SwUnoInternalPaM(const SwUnoInternalPaM&);
+
+public:
+ SwUnoInternalPaM(SwDoc& rDoc);
+ virtual ~SwUnoInternalPaM();
+
+ SwUnoInternalPaM& operator=(const SwPaM& rPaM);
+};
+
+
+namespace sw {
+
+ void DeepCopyPaM(SwPaM const & rSource, SwPaM & rTarget);
+
+ bool XTextRangeToSwPaM(SwUnoInternalPaM& rToFill,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & xTextRange);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos);
+
+ bool GetDefaultTextContentValue(::com::sun::star::uno::Any& rAny,
+ const ::rtl::OUString& rPropertyName, USHORT nWID = 0);
+
+} // namespace sw
+
+
+typedef ::cppu::WeakImplHelper8
+< ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::beans::XPropertySet
+, ::com::sun::star::beans::XPropertyState
+, ::com::sun::star::container::XEnumerationAccess
+, ::com::sun::star::container::XContentEnumerationAccess
+, ::com::sun::star::text::XTextRange
+, ::com::sun::star::text::XRedline
+> SwXTextRange_Base;
+
+class SW_DLLPUBLIC SwXTextRange
+ : public SwXTextRange_Base
+{
+
+private:
+
+ friend class SwXText;
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ enum RangePosition
+ {
+ RANGE_IN_TEXT, // "ordinary" ::com::sun::star::text::TextRange
+ RANGE_IN_CELL, // position created with a cell that has no uno object
+ RANGE_IS_TABLE, // anchor of a table
+ };
+
+ void SetPositions(SwPaM const& rPam);
+ //TODO: new exception type for protected content
+ void DeleteAndInsert(
+ const ::rtl::OUString& rText, const bool bForceExpandHints)
+ throw (::com::sun::star::uno::RuntimeException);
+ void Invalidate();
+
+ virtual ~SwXTextRange();
+
+public:
+
+ SwXTextRange(SwPaM& rPam,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XText > & xParent,
+ const enum RangePosition eRange = RANGE_IN_TEXT);
+ // only for RANGE_IS_TABLE
+ SwXTextRange(SwFrmFmt& rTblFmt);
+
+ const SwDoc* GetDoc() const;
+ SwDoc* GetDoc();
+ bool GetPositions(SwPaM & rToFill) const;
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > CreateXTextRange(
+ SwDoc & rDoc,
+ const SwPosition& rPos, const SwPosition *const pMark);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
+ getPropertySetInfo()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Any& rValue)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::beans::PropertyVetoException,
+ ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertyChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener(
+ const ::rtl::OUString& rPropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XVetoableChangeListener >& xListener)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL
+ getPropertyState(const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyState > SAL_CALL
+ getPropertyStates(
+ const ::com::sun::star::uno::Sequence<
+ ::rtl::OUString >& rPropertyNames)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
+ const ::rtl::OUString& rPropertyName)
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createEnumeration()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XContentEnumerationAccess
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XEnumeration > SAL_CALL
+ createContentEnumeration(const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getAvailableServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >
+ SAL_CALL getText()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getStart()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > SAL_CALL getEnd()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getString()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setString(const ::rtl::OUString& rString)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XRedline
+ virtual void SAL_CALL makeRedline(
+ const ::rtl::OUString& rRedlineType,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& RedlineProperties)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+};
+
+/* -----------------15.05.98 08:29-------------------
+ *
+ * --------------------------------------------------*/
+
+typedef ::cppu::WeakImplHelper3
+< ::com::sun::star::lang::XUnoTunnel
+, ::com::sun::star::lang::XServiceInfo
+, ::com::sun::star::container::XIndexAccess
+> SwXTextRanges_Base;
+
+class SwXTextRanges
+ : public SwXTextRanges_Base
+{
+
+private:
+
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
+ virtual ~SwXTextRanges();
+
+public:
+
+ SwXTextRanges(SwPaM *const pCrsr);
+
+ const SwUnoCrsr* GetCursor() const;
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& rServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex)
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // SW_UNOTEXTRANGE_HXX
+
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
new file mode 100755
index 000000000000..b50d5b0a1b76
--- /dev/null
+++ b/sw/inc/unotxdoc.hxx
@@ -0,0 +1,615 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _UNOTXDOC_HXX
+#define _UNOTXDOC_HXX
+
+#include "swdllapi.h"
+#include <svl/svarray.hxx>
+#include <sfx2/sfxbasemodel.hxx>
+
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/style/XAutoStylesSupplier.hpp>
+#include <com/sun/star/document/XLinkTargetSupplier.hpp>
+#include <com/sun/star/document/XRedlinesSupplier.hpp>
+#include <com/sun/star/text/XNumberingRulesSupplier.hpp>
+#include <com/sun/star/text/XFootnotesSupplier.hpp>
+#include <com/sun/star/text/XEndnotesSupplier.hpp>
+#include <com/sun/star/text/XEndnotesSettingsSupplier.hpp>
+#include <com/sun/star/text/XTextSectionsSupplier.hpp>
+#include <com/sun/star/text/XLineNumberingProperties.hpp>
+#include <com/sun/star/text/XChapterNumberingSupplier.hpp>
+#include <com/sun/star/text/XPagePrintable.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
+#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
+#include <com/sun/star/text/XBookmarksSupplier.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
+#include <com/sun/star/text/XReferenceMarksSupplier.hpp>
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/util/XReplaceable.hpp>
+#include <com/sun/star/util/XReplaceDescriptor.hpp>
+#include <com/sun/star/util/XRefreshable.hpp>
+#include <com/sun/star/util/XLinkUpdate.hpp>
+#include <com/sun/star/view/XRenderable.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/xforms/XFormsSupplier.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/text/XFlatParagraphIteratorProvider.hpp>
+#include <com/sun/star/document/XDocumentLanguages.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
+#include <svl/itemprop.hxx>
+#include <svx/fmdmod.hxx>
+#include <editeng/UnoForbiddenCharsTable.hxx>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase2.hxx> // helper for implementations
+#include <cppuhelper/implbase4.hxx> // helper for implementations
+#include <RefreshListenerContainer.hxx>
+
+#include <viewopt.hxx>
+
+#define __IFC32 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, Ifc14, Ifc15, Ifc16, \
+Ifc17, Ifc18, Ifc19, Ifc20, Ifc21, Ifc22, Ifc23, Ifc24, Ifc25, Ifc26, Ifc27, Ifc28, Ifc29, Ifc30, Ifc31, Ifc32
+
+#define __CLASS_IFC32 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, \
+class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12, class Ifc13, class Ifc14, class Ifc15, class Ifc16, \
+class Ifc17, class Ifc18, class Ifc19, class Ifc20, class Ifc21, class Ifc22, class Ifc23, class Ifc24,\
+class Ifc25, class Ifc26, class Ifc27, class Ifc28, class Ifc29, class Ifc30, class Ifc31 , class Ifc32
+
+#define __PUBLIC_IFC32 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, \
+public Ifc13, public Ifc14, public Ifc15, public Ifc16, public Ifc17, public Ifc18, \
+public Ifc19, public Ifc20, public Ifc21, public Ifc22, public Ifc23, public Ifc24, \
+public Ifc25, public Ifc26, public Ifc27, public Ifc28, public Ifc29, public Ifc30, \
+public Ifc31, public Ifc32
+#include <cppuhelper/implbase_ex.hxx>
+#include <cppuhelper/implbase_ex_pre.hxx>
+#define __IFC_EX_TYPE_INIT32( class_cast ) \
+ __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 3 ), __IFC_EX_TYPE_INIT( class_cast, 4 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 5 ), __IFC_EX_TYPE_INIT( class_cast, 6 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 7 ), __IFC_EX_TYPE_INIT( class_cast, 8 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 9 ), __IFC_EX_TYPE_INIT( class_cast, 10 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 11 ), __IFC_EX_TYPE_INIT( class_cast, 12 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 13 ), __IFC_EX_TYPE_INIT( class_cast, 14 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 15 ), __IFC_EX_TYPE_INIT( class_cast, 16 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 17 ), __IFC_EX_TYPE_INIT( class_cast, 18 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 19 ), __IFC_EX_TYPE_INIT( class_cast, 20 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 21 ), __IFC_EX_TYPE_INIT( class_cast, 22 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 23 ), __IFC_EX_TYPE_INIT( class_cast, 24 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 25 ), __IFC_EX_TYPE_INIT( class_cast, 26 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 27 ), __IFC_EX_TYPE_INIT( class_cast, 28 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 29 ), __IFC_EX_TYPE_INIT( class_cast, 30 ), \
+ __IFC_EX_TYPE_INIT( class_cast, 31 ), __IFC_EX_TYPE_INIT( class_cast, 32)
+#include <cppuhelper/implbase_ex_post.hxx>
+
+__DEF_IMPLHELPER_EX( 32 )
+
+namespace css = ::com::sun::star;
+
+class SwDoc;
+class SwDocShell;
+class UnoActionContext;
+class SwXBodyText;
+class SwXDrawPage;
+class SwUnoCrsr;
+class SwXDocumentPropertyHelper;
+class SfxViewFrame;
+class SwPrintUIOptions;
+class SwPrintData;
+class SwRenderData;
+class SwPrtOptions;
+class SwWrtShell;
+
+
+typedef UnoActionContext* UnoActionContextPtr;
+SV_DECL_PTRARR(ActionContextArr, UnoActionContextPtr, 4, 4)
+
+
+/******************************************************************************
+ *
+ ******************************************************************************/
+
+
+typedef cppu::WeakImplHelper32
+<
+ css::text::XTextDocument,
+ css::text::XLineNumberingProperties,
+ css::text::XChapterNumberingSupplier,
+ css::text::XNumberingRulesSupplier,
+ css::text::XFootnotesSupplier,
+ css::text::XEndnotesSupplier,
+ css::util::XReplaceable,
+ css::text::XPagePrintable,
+ css::text::XReferenceMarksSupplier,
+ css::text::XTextTablesSupplier,
+ css::text::XTextFramesSupplier,
+ css::text::XBookmarksSupplier,
+ css::text::XTextSectionsSupplier,
+ css::text::XTextGraphicObjectsSupplier,
+ css::text::XTextEmbeddedObjectsSupplier,
+ css::text::XTextFieldsSupplier,
+ css::style::XStyleFamiliesSupplier,
+ css::style::XAutoStylesSupplier,
+ css::lang::XServiceInfo,
+ css::drawing::XDrawPageSupplier,
+ css::text::XDocumentIndexesSupplier,
+ css::beans::XPropertySet,
+ css::beans::XPropertyState,
+ css::document::XLinkTargetSupplier,
+ css::document::XRedlinesSupplier,
+ css::util::XRefreshable,
+ css::util::XLinkUpdate,
+ css::view::XRenderable,
+ css::xforms::XFormsSupplier,
+ css::text::XFlatParagraphIteratorProvider,
+ css::document::XDocumentLanguages,
+ css::util::XCloneable
+>
+SwXTextDocumentBaseClass;
+
+class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass,
+ public SvxFmMSFactory,
+ public SfxBaseModel
+{
+ ActionContextArr aActionArr;
+ SwRefreshListenerContainer aRefreshCont;
+
+ const SfxItemPropertySet* pPropSet;
+
+ SwDocShell* pDocShell;
+ sal_Bool bObjectValid;
+
+ SwXDrawPage* pDrawPage;
+ css::uno::Reference< css::drawing::XDrawPage > * pxXDrawPage;
+
+ css::uno::Reference< css::text::XText > xBodyText;
+ SwXBodyText* pBodyText;
+ css::uno::Reference< css::uno::XAggregation > xNumFmtAgg;
+
+ css::uno::Reference< css::container::XIndexAccess > * pxXNumberingRules;
+ css::uno::Reference< css::container::XIndexAccess > * pxXFootnotes;
+ css::uno::Reference< css::beans::XPropertySet > * pxXFootnoteSettings;
+ css::uno::Reference< css::container::XIndexAccess > * pxXEndnotes;
+ css::uno::Reference< css::beans::XPropertySet > * pxXEndnoteSettings;
+ css::uno::Reference< css::container::XNameAccess > * pxXReferenceMarks;
+ css::uno::Reference< css::container::XEnumerationAccess > * pxXTextFieldTypes;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextFieldMasters;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextSections;
+ css::uno::Reference< css::container::XNameAccess > * pxXBookmarks;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextTables;
+ css::uno::Reference< css::container::XNameAccess > * pxXTextFrames;
+ css::uno::Reference< css::container::XNameAccess > * pxXGraphicObjects;
+ css::uno::Reference< css::container::XNameAccess > * pxXEmbeddedObjects;
+ css::uno::Reference< css::container::XNameAccess > * pxXStyleFamilies;
+ mutable css::uno::Reference< css::style::XAutoStyles > * pxXAutoStyles;
+ css::uno::Reference< css::container::XIndexReplace > * pxXChapterNumbering;
+ css::uno::Reference< css::container::XIndexAccess > * pxXDocumentIndexes;
+
+ css::uno::Reference< css::beans::XPropertySet > * pxXLineNumberingProperties;
+ css::uno::Reference< css::container::XNameAccess > * pxLinkTargetSupplier;
+ css::uno::Reference< css::container::XEnumerationAccess >* pxXRedlines;
+ css::uno::Reference< css::container::XNameContainer> xXFormsContainer;
+
+ //temporary frame to enable PDF export if no valid view is available
+ SfxViewFrame* m_pHiddenViewFrame;
+ css::uno::Reference< css::uno::XInterface> xPropertyHelper;
+ SwXDocumentPropertyHelper* pPropertyHelper;
+
+ SwPrintUIOptions * m_pPrintUIOptions;
+ SwRenderData * m_pRenderData;
+
+ void GetBodyText();
+ void GetNumberFormatter();
+
+ // used for XRenderable implementation
+ SfxViewShell * GuessViewShell( /* out */ bool &rbIsSwSrcView, const css::uno::Reference< css::frame::XController > xController = css::uno::Reference< css::frame::XController >() );
+ SwDoc * GetRenderDoc( SfxViewShell *&rpView, const css::uno::Any& rSelection, bool bIsPDFExport );
+ SfxViewShell * GetRenderView( bool &rbIsSwSrcView, const css::uno::Sequence< css::beans::PropertyValue >& rxOptions, bool bIsPDFExport );
+
+ rtl::OUString maBuildId;
+
+ using SfxBaseModel::addEventListener;
+ using SfxBaseModel::removeEventListener;
+
+protected:
+ virtual ~SwXTextDocument();
+public:
+ SwXTextDocument(SwDocShell* pShell);
+
+ inline void notifyRefreshListeners() { aRefreshCont.Refreshed(); }
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw();
+ virtual void SAL_CALL release( ) throw();
+
+ //XWeak
+ virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter( ) throw(css::uno::RuntimeException);
+
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) throw(css::uno::RuntimeException);
+
+ static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
+
+ //XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException);
+
+ //XTextDocument
+ virtual css::uno::Reference< css::text::XText > SAL_CALL getText(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL reformat(void) throw( css::uno::RuntimeException );
+
+ //XModel
+ virtual sal_Bool SAL_CALL attachResource( const ::rtl::OUString& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs ) throw(css::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getURL( ) throw(css::uno::RuntimeException);
+ virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL connectController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL disconnectController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL lockControllers( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL unlockControllers( ) throw(css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasControllersLocked( ) throw(css::uno::RuntimeException);
+ virtual css::uno::Reference< css::frame::XController > SAL_CALL getCurrentController( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setCurrentController( const css::uno::Reference< css::frame::XController >& xController ) throw(css::container::NoSuchElementException, css::uno::RuntimeException);
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getCurrentSelection( ) throw(css::uno::RuntimeException);
+
+ //XComponent
+ virtual void SAL_CALL dispose(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) throw( css::uno::RuntimeException );
+
+ //XCloseable
+ virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw (css::util::CloseVetoException, css::uno::RuntimeException);
+
+ //XLineNumberingProperties
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getLineNumberingProperties(void) throw( css::uno::RuntimeException );
+
+ //XChapterNumberingSupplier
+ virtual css::uno::Reference< css::container::XIndexReplace > SAL_CALL getChapterNumberingRules(void) throw( css::uno::RuntimeException );
+
+ //XNumberingRulesSupplier
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getNumberingRules() throw (css::uno::RuntimeException);
+
+ //XFootnotesSupplier
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getFootnotes(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getFootnoteSettings(void) throw( css::uno::RuntimeException );
+
+ //XEndnotesSupplier
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getEndnotes(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getEndnoteSettings(void) throw( css::uno::RuntimeException );
+
+ //XReplaceable
+ virtual css::uno::Reference< css::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor(void) throw( css::uno::RuntimeException );
+ virtual sal_Int32 SAL_CALL replaceAll(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
+
+ //XSearchable
+ virtual css::uno::Reference< css::util::XSearchDescriptor > SAL_CALL createSearchDescriptor(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL findAll(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL findFirst(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL findNext(const css::uno::Reference< css::uno::XInterface > & xStartAt, const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) throw( css::uno::RuntimeException );
+
+ //XPagePrintable
+ virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPagePrintSettings(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL setPagePrintSettings(const css::uno::Sequence< css::beans::PropertyValue >& aSettings) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL printPages(const css::uno::Sequence< css::beans::PropertyValue >& xOptions) throw( css::lang::IllegalArgumentException, css::uno::RuntimeException );
+
+ //XReferenceMarksSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getReferenceMarks(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextFieldsSupplier
+ virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getTextFields(void) throw( css::uno::RuntimeException );
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextFieldMasters(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextEmbeddedObjectsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getEmbeddedObjects(void) throw( css::uno::RuntimeException );
+
+// // css::text::XTextShapesSupplier
+// virtual css::uno::Reference< css::container::XIndexAccess > getShapes(void) throw( css::uno::RuntimeException );
+
+ // css::text::XBookmarksSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getBookmarks(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextSectionsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextSections(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextTablesSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextTables(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextGraphicObjectsSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getGraphicObjects(void) throw( css::uno::RuntimeException );
+
+ // css::text::XTextFramesSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextFrames(void) throw( css::uno::RuntimeException );
+
+ //XStyleFamiliesSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getStyleFamilies(void) throw( css::uno::RuntimeException );
+
+ //XAutoStylesSupplier
+ virtual css::uno::Reference< css::style::XAutoStyles > SAL_CALL getAutoStyles( ) throw (css::uno::RuntimeException);
+
+ //XMultiServiceFactory
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const rtl::OUString& ServiceSpecifier)
+ throw( css::uno::Exception, css::uno::RuntimeException );
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const rtl::OUString& ServiceSpecifier,
+ const css::uno::Sequence< css::uno::Any >& Arguments)
+ throw( css::uno::Exception, css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void)
+ throw( css::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
+
+ // css::drawing::XDrawPageSupplier
+ virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getDrawPage(void) throw( css::uno::RuntimeException );
+
+ // css::text::XDocumentIndexesSupplier
+ virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getDocumentIndexes(void) throw( css::uno::RuntimeException );
+
+ //XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ //XPropertyState
+ virtual css::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
+ virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::uno::Sequence< ::rtl::OUString >& rPropertyNames ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& rPropertyName ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ //XLinkTargetSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks(void) throw( css::uno::RuntimeException );
+
+ //XRedlinesSupplier
+ virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getRedlines( ) throw(css::uno::RuntimeException);
+
+ // css::util::XRefreshable
+ virtual void SAL_CALL refresh(void) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener > & l) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener > & l) throw( css::uno::RuntimeException );
+
+ // css::util::XLinkUpdate,
+ virtual void SAL_CALL updateLinks( ) throw(css::uno::RuntimeException);
+
+ // css::view::XRenderable
+ virtual sal_Int32 SAL_CALL getRendererCount( const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getRenderer( sal_Int32 nRenderer, const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+ virtual void SAL_CALL render( sal_Int32 nRenderer, const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+
+ // css::xforms::XFormsSupplier
+ virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL getXForms( ) throw (css::uno::RuntimeException);
+
+ // css::document::XDocumentLanguages
+ virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getDocumentLanguages( ::sal_Int16 nScriptTypes, ::sal_Int16 nCount ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+
+ // css::text::XFlatParagraphIteratorProvider:
+ virtual css::uno::Reference< css::text::XFlatParagraphIterator > SAL_CALL getFlatParagraphIterator(::sal_Int32 nTextMarkupType, sal_Bool bAutomatic ) throw (css::uno::RuntimeException);
+
+ // ::com::sun::star::util::XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
+
+
+ //
+ void Invalidate();
+ void Reactivate(SwDocShell* pNewDocShell);
+ SwXDocumentPropertyHelper * GetPropertyHelper ();
+ sal_Bool IsValid() const {return bObjectValid;}
+
+ void InitNewDoc();
+
+ SwUnoCrsr* CreateCursorForSearch(css::uno::Reference< css::text::XTextCursor > & xCrsr);
+ SwUnoCrsr* FindAny(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc,
+ css::uno::Reference< css::text::XTextCursor > & xCrsr, sal_Bool bAll,
+ sal_Int32& nResult,
+ css::uno::Reference< css::uno::XInterface > xLastResult);
+
+ SwXDrawPage* GetDrawPage();
+ SwDocShell* GetDocShell() {return pDocShell;}
+
+
+ void * SAL_CALL operator new( size_t ) throw();
+ void SAL_CALL operator delete( void * ) throw();
+
+};
+/* -----------------25.10.99 11:02-------------------
+
+ --------------------------------------------------*/
+class SwXLinkTargetSupplier : public cppu::WeakImplHelper2
+<
+ css::container::XNameAccess,
+ css::lang::XServiceInfo
+>
+{
+ SwXTextDocument* pxDoc;
+ String sTables;
+ String sFrames;
+ String sGraphics;
+ String sOLEs;
+ String sSections;
+ String sOutlines;
+ String sBookmarks;
+
+public:
+ SwXLinkTargetSupplier(SwXTextDocument& rxDoc);
+ ~SwXLinkTargetSupplier();
+
+ //XNameAccess
+ virtual css::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( css::uno::RuntimeException );
+
+ //XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType( ) throw(css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(css::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
+
+ //
+ void Invalidate() {pxDoc = 0;}
+};
+/* -----------------26.10.99 09:05-------------------
+
+ --------------------------------------------------*/
+class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper4
+<
+ css::beans::XPropertySet,
+ css::container::XNameAccess,
+ css::lang::XServiceInfo,
+ css::document::XLinkTargetSupplier
+>
+{
+ css::uno::Reference< css::container::XNameAccess > xRealAccess;
+ const SfxItemPropertySet* pPropSet;
+ const String sLinkSuffix;
+ const String sLinkDisplayName;
+ css::uno::Reference< css::text::XTextDocument > xDoc;
+ SwXTextDocument* pxDoc;
+
+
+public:
+ SwXLinkNameAccessWrapper(css::uno::Reference< css::container::XNameAccess > xAccess,
+ const String& rLinkDisplayName, String sSuffix);
+ SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
+ const String& rLinkDisplayName, String sSuffix);
+ ~SwXLinkNameAccessWrapper();
+
+ //XNameAccess
+ virtual css::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( css::uno::RuntimeException );
+
+ //XElementAccess
+ virtual css::uno::Type SAL_CALL getElementType( ) throw(css::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(css::uno::RuntimeException);
+
+ //XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ //XLinkTargetSupplier
+ virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks(void) throw( css::uno::RuntimeException );
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
+
+};
+/* -----------------26.10.99 15:46-------------------
+
+ --------------------------------------------------*/
+class SwXOutlineTarget : public cppu::WeakImplHelper2
+<
+ css::beans::XPropertySet,
+ css::lang::XServiceInfo
+>
+{
+ const SfxItemPropertySet* pPropSet;
+ String sOutlineText;
+
+public:
+ SwXOutlineTarget(const String& rOutlineText);
+ ~SwXOutlineTarget();
+
+ //XPropertySet
+ virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException);
+
+ //XServiceInfo
+ virtual rtl::OUString SAL_CALL getImplementationName(void) throw( css::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( css::uno::RuntimeException );
+ virtual css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( css::uno::RuntimeException );
+};
+#endif
+
+class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable
+{
+ css::uno::Reference < css::uno::XInterface > xDashTable;
+ css::uno::Reference < css::uno::XInterface > xGradientTable;
+ css::uno::Reference < css::uno::XInterface > xHatchTable;
+ css::uno::Reference < css::uno::XInterface > xBitmapTable;
+ css::uno::Reference < css::uno::XInterface > xTransGradientTable;
+ css::uno::Reference < css::uno::XInterface > xMarkerTable;
+ css::uno::Reference < css::uno::XInterface > xDrawDefaults;
+
+ SwDoc* m_pDoc;
+public:
+ SwXDocumentPropertyHelper(SwDoc& rDoc);
+ ~SwXDocumentPropertyHelper();
+ css::uno::Reference<css::uno::XInterface> GetDrawTable(short nWhich);
+ void Invalidate();
+
+ virtual void onChange();
+};
+
+
+/*-- 06.01.2004 15:08:34---------------------------------------------------
+ The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of
+ the current ViewShell so that fields are not printed as commands and
+ hidden characters are always invisible. Hidden text and place holders
+ should be printed according to the current print options.
+ After printing the view options are restored
+ -----------------------------------------------------------------------*/
+class SwViewOptionAdjust_Impl
+{
+ SwWrtShell & m_rShell;
+ SwViewOption m_aOldViewOptions;
+// SwViewOption m_aRenderViewOptions; // view options to use when rendering for PDF export or printing
+// bool m_bRestoreViewOptions;
+
+public:
+ SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions );
+ ~SwViewOptionAdjust_Impl();
+
+ void AdjustViewOptions( const SwPrtOptions *pPrtOptions );
+
+ bool checkShell( const SwWrtShell& rCompare ) const
+ { return &rCompare == &m_rShell; }
+};
+
+
diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx
new file mode 100644
index 000000000000..b755cbc1631b
--- /dev/null
+++ b/sw/inc/usrfld.hxx
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _USRFLD_HXX
+#define _USRFLD_HXX
+
+#include "swdllapi.h"
+#include "fldbas.hxx"
+
+class SfxPoolItem;
+class SwCalc;
+class SwDoc;
+
+/*--------------------------------------------------------------------
+ Beschreibung: Benutzerfelder
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwUserFieldType : public SwValueFieldType
+{
+ BOOL bValidValue : 1;
+ BOOL bDeleted : 1;
+ double nValue;
+ String aName;
+ String aContent;
+ USHORT nType;
+
+public:
+ SwUserFieldType( SwDoc* pDocPtr, const String& );
+
+ virtual const String& GetName() const;
+ virtual SwFieldType* Copy() const;
+
+ String Expand(sal_uInt32 nFmt, USHORT nSubType, USHORT nLng);
+
+ String GetContent( sal_uInt32 nFmt = 0 );
+ void SetContent( const String& rStr, sal_uInt32 nFmt = 0 );
+
+ inline BOOL IsValid() const;
+ inline void ChgValid( BOOL bNew );
+
+ virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+
+ double GetValue(SwCalc& rCalc); // Member nValue neu berrechnen
+ inline double GetValue() const;
+ inline void SetValue(const double nVal);
+
+ inline USHORT GetType() const;
+ inline void SetType(USHORT);
+
+ BOOL IsDeleted() const { return bDeleted; }
+ void SetDeleted( BOOL b ) { bDeleted = b; }
+
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nMId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nMId );
+};
+
+inline BOOL SwUserFieldType::IsValid() const
+ { return bValidValue; }
+
+inline void SwUserFieldType::ChgValid( BOOL bNew )
+ { bValidValue = bNew; }
+
+inline double SwUserFieldType::GetValue() const
+ { return nValue; }
+
+inline void SwUserFieldType::SetValue(const double nVal)
+ { nValue = nVal; }
+
+inline USHORT SwUserFieldType::GetType() const
+ { return nType; }
+
+inline void SwUserFieldType::SetType(USHORT nSub)
+{
+ nType = nSub;
+ EnableFormat(!(nSub & nsSwGetSetExpType::GSE_STRING));
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Benutzerfelder
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwUserField : public SwValueField
+{
+ USHORT nSubType;
+
+public:
+ SwUserField(SwUserFieldType*, USHORT nSub = 0, sal_uInt32 nFmt = 0);
+
+ virtual USHORT GetSubType() const;
+ virtual void SetSubType(USHORT nSub);
+
+ virtual double GetValue() const;
+ virtual void SetValue( const double& rVal );
+
+ virtual String Expand() const;
+ virtual SwField* Copy() const;
+ virtual String GetCntnt(BOOL bName = FALSE) const;
+
+ // Name kann nicht geaendert werden
+ virtual const String& GetPar1() const;
+
+ // Inhalt
+ virtual String GetPar2() const;
+ virtual void SetPar2(const String& rStr);
+ virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const;
+ virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
+};
+
+#endif // _USRFLD_HXX
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
new file mode 100755
index 000000000000..8d37888ea789
--- /dev/null
+++ b/sw/inc/viewopt.hxx
@@ -0,0 +1,615 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _VIEWOPT_HXX
+#define _VIEWOPT_HXX
+#include <tools/gen.hxx>
+#include <tools/string.hxx>
+#include <tools/color.hxx>
+
+#include <svx/zoomitem.hxx>
+#include "swdllapi.h"
+#include "authratr.hxx"
+
+class SwRect;
+class Window;
+class OutputDevice;
+class ViewShell;
+class SwDocShell;
+namespace svtools{ class ColorConfig;}
+
+//#define VIEWOPT_1_IDLE 0x00000001L no longer used, see new member 'bIdle'
+#define VIEWOPT_1_TAB 0x00000002L
+#define VIEWOPT_1_BLANK 0x00000004L
+#define VIEWOPT_1_HARDBLANK 0x00000008L
+#define VIEWOPT_1_PARAGRAPH 0x00000010L
+#define VIEWOPT_1_LINEBREAK 0x00000020L
+#define VIEWOPT_1_PAGEBREAK 0x00000040L
+#define VIEWOPT_1_COLUMNBREAK 0x00000080L
+#define VIEWOPT_1_SOFTHYPH 0x00000100L
+
+#define VIEWOPT_1_REF 0x00000400L
+#define VIEWOPT_1_FLDNAME 0x00000800L
+//#define 0x00001000L
+//#define 0x00002000L
+#define VIEWOPT_1_POSTITS 0x00004000L
+#define VIEWOPT_1_FLD_HIDDEN 0x00008000L
+#define VIEWOPT_1_CHAR_HIDDEN 0x00010000L
+#define VIEWOPT_1_GRAPHIC 0x00020000L
+#define VIEWOPT_1_TABLE 0x00040000L
+#define VIEWOPT_1_DRAW 0x00080000L
+#define VIEWOPT_1_CONTROL 0x00100000L
+//#define 0x00200000L
+#define VIEWOPT_1_CROSSHAIR 0x00400000L
+#define VIEWOPT_1_SNAP 0x00800000L
+#define VIEWOPT_1_SYNCHRONIZE 0x01000000L
+#define VIEWOPT_1_GRIDVISIBLE 0x02000000L
+#define VIEWOPT_1_ONLINESPELL 0x04000000L
+//#define VIEWOPT_1_HIDESPELL 0x08000000L /* removed #i91949 */
+#define VIEWOPT_1_RESERVED1 0x10000000L
+#define VIEWOPT_1_VIEWMETACHARS 0x20000000L
+#define VIEWOPT_1_PAGEBACK 0x40000000L
+#define VIEWOPT_1_SOLIDMARKHDL 0x80000000L
+
+#define VIEWOPT_CORE2_BLACKFONT 0x00000001L
+#define VIEWOPT_CORE2_HIDDENPARA 0x00000002L
+#define VIEWOPT_CORE2_SMOOTHSCROLL 0x00000004L
+#define VIEWOPT_CORE2_CRSR_IN_PROT 0x00000008L
+#define VIEWOPT_CORE2_PDF_EXPORT 0x00000010L
+#define VIEWOPT_CORE2_PRINTING 0x00000020L
+#define VIEWOPT_CORE2_BIGMARKHDL 0x00000040L
+
+#define VIEWOPT_2_UNUSED1 0x00000100L
+#define VIEWOPT_2_UNUSED2 0x00000200L
+#define VIEWOPT_2_H_RULER 0x00000400L
+#define VIEWOPT_2_VSCROLLBAR 0x00000800L
+#define VIEWOPT_2_HSCROLLBAR 0x00001000L
+#define VIEWOPT_2_STATUSLINE 0x00002000L
+#define VIEWOPT_2_V_RULER 0x00004000L
+#define VIEWOPT_2_ANY_RULER 0x00008000L
+#define VIEWOPT_2_MODIFIED 0x00010000L
+#define VIEWOPT_2_KEEPASPECTRATIO 0x00020000L
+#define VIEWOPT_2_GRFKEEPZOOM 0x00040000L
+#define VIEWOPT_2_PREVENT_TIPS 0x00100000L
+#define VIEWOPT_2_RESERVED3 0x00200000L
+#define VIEWOPT_2_RESERVED4 0x00400000L
+#define VIEWOPT_2_PRTFORMAT 0x00800000L
+#define VIEWOPT_2_SHADOWCRSR 0x01000000L
+#define VIEWOPT_2_V_RULER_RIGHT 0x02000000L
+
+//Tabellenhintergrund
+#define TBL_DEST_CELL 0
+#define TBL_DEST_ROW 1
+#define TBL_DEST_TBL 2
+
+//Appearance flags
+#define VIEWOPT_DOC_BOUNDARIES 0x0001
+#define VIEWOPT_OBJECT_BOUNDARIES 0x0002
+#define VIEWOPT_TABLE_BOUNDARIES 0x0004
+#define VIEWOPT_INDEX_SHADINGS 0x0008
+#define VIEWOPT_LINKS 0x0010
+#define VIEWOPT_VISITED_LINKS 0x0020
+#define VIEWOPT_FIELD_SHADINGS 0x0040
+#define VIEWOPT_SECTION_BOUNDARIES 0x0080
+
+// Implementierung in core/text/txtpaint.cxx
+extern void SyncVout( const OutputDevice *pOut );
+
+class SwViewOption
+{
+ static Color aDocColor; // color of document boundaries
+ static Color aDocBoundColor; // color of document boundaries
+ static Color aObjectBoundColor; // color of object boundaries
+ static Color aAppBackgroundColor; // application background
+ static Color aTableBoundColor; // color of table boundaries
+ static Color aFontColor;
+ static Color aIndexShadingsColor; // background color of indexes
+ static Color aLinksColor;
+ static Color aVisitedLinksColor;
+ static Color aDirectCursorColor;
+ static Color aTextGridColor;
+ static Color aSpellColor; // mark color of online spell checking
+ static Color aSmarttagColor;
+ static Color aFieldShadingsColor;
+ static Color aSectionBoundColor;
+ static Color aPageBreakColor;
+ static Color aScriptIndicatorColor;
+
+ static sal_Int32 nAppearanceFlags; //
+protected:
+ static USHORT nPixelTwips;// 1 Pixel == ? Twips
+
+ String sSymbolFont; // Symbolzeichensatz
+ UINT32 nCoreOptions; // Bits fuer die ViewShell
+ UINT32 nCore2Options; // Bits fuer die ViewShell
+ UINT32 nUIOptions; // UI-Bits
+ Color aRetoucheColor; // DefaultBackground fuer BrowseView
+ Size aSnapSize; // Beschreibt hori. wie vert. Snap
+ USHORT mnViewLayoutColumns;// # columns for edit view
+ short nDivisionX; // Rasterunterteilung
+ short nDivisionY;
+ BYTE nPagePrevRow; // Page Preview Row/Columns
+ BYTE nPagePrevCol; // Page Preview Row/Columns
+ BYTE nShdwCrsrFillMode; // FillMode fuer den ShadowCrsr
+ BOOL bReadonly : 1; // Readonly-Doc
+ BOOL bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents)
+ BOOL bIsPagePreview : 1; // the preview mustn't print field/footnote/... shadings
+ BOOL bSelectionInReadonly : 1; //determines whether selection is switched on in readonly documents
+ // --> FME 2004-06-29 #114856# Formular view
+ BOOL bFormView : 1;
+ // <--
+ BOOL bBookview : 1; // view mode for page preview
+ BOOL mbViewLayoutBookMode : 1; // book view mode for edit view
+ sal_Bool bShowPlaceHolderFields : 1; //only used in printing!
+ mutable bool bIdle;
+
+ // Maszstab
+ USHORT nZoom; // Angaben in Prozent
+ SvxZoomType eZoom; // 'enum' fuer Zoom
+
+ BYTE nTblDest; // Ziel fuer Tabellenhintergrund
+
+#ifdef DBG_UTIL
+ // korrespondieren zu den Angaben in ui/config/cfgvw.src
+ BOOL bTest1 :1; // Test-Flag "Layout not loading"
+ BOOL bTest2 :1; // Test-Flag "WYSIWYG++"
+ BOOL bTest3 :1; // Test-Flag ""
+ BOOL bTest4 :1; // Test-Flag "WYSIWYG debug"
+ BOOL bTest5 :1; // Test-Flag "No idle format"
+ BOOL bTest6 :1; // Test-Flag "No screen adj"
+ BOOL bTest7 :1; // Test-Flag "win format"
+ BOOL bTest8 :1; // Test-Flag ""
+ static BOOL bTest9; // Test-Flag "DrawingLayerNotLoading"
+ BOOL bTest10 :1; // Test-Flag "Format by Input"
+#endif
+
+public:
+ SwViewOption(); // CTOR
+ SwViewOption(const SwViewOption&); //
+ ~SwViewOption(); //
+
+ void Init( Window *pWin ); // Initialisierung der statischen Daten
+
+ USHORT GetPixelTwips() const { return nPixelTwips; }
+
+ inline UINT32 GetCoreOptions() const {return nCoreOptions;}
+ inline void SetUIOptions( const SwViewOption& );
+
+/*---------------------------------------------------------------------------
+ Optionen aus nCoreOptions
+----------------------------------------------------------------------------*/
+
+ inline BOOL IsIdle() const
+ { return bIdle; }
+
+ // logically this is a const function since it does not modify the viewoptions
+ // but only effects idle formatting. Of course that member is already implement
+ // in the wrong place here... Also currently there are many const modifying casts in the code
+ // just to call this function on otherwise const objects. Thus declaring it as const now.
+ inline void SetIdle( BOOL b ) const
+ { bIdle = b; }
+
+ inline BOOL IsTab(BOOL bHard = FALSE) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_TAB) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? TRUE : FALSE; }
+ inline void SetTab( BOOL b ) {
+ (b != 0) ? (nCoreOptions |= VIEWOPT_1_TAB ) : ( nCoreOptions &= ~VIEWOPT_1_TAB); }
+
+ inline BOOL IsBlank(BOOL bHard = FALSE) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_BLANK) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? TRUE : FALSE; }
+ inline void SetBlank( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_BLANK ) : ( nCoreOptions &= ~VIEWOPT_1_BLANK); }
+
+ inline BOOL IsHardBlank() const
+ { return !bReadonly && nCoreOptions & VIEWOPT_1_HARDBLANK ? TRUE : FALSE; }
+ inline void SetHardBlank( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_HARDBLANK ) : ( nCoreOptions &= ~VIEWOPT_1_HARDBLANK); }
+
+ inline BOOL IsParagraph(BOOL bHard = FALSE) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_PARAGRAPH) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? TRUE : FALSE; }
+ inline void SetParagraph( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PARAGRAPH ) : ( nCoreOptions &= ~VIEWOPT_1_PARAGRAPH); }
+
+ inline BOOL IsLineBreak(BOOL bHard = FALSE) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_LINEBREAK) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? TRUE : FALSE; }
+ inline void SetLineBreak( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_LINEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_LINEBREAK); }
+
+ inline void SetPageBreak( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBREAK); }
+
+ inline void SetColumnBreak( BOOL b)
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_COLUMNBREAK ) : ( nCoreOptions &= ~VIEWOPT_1_COLUMNBREAK); }
+
+ inline BOOL IsSoftHyph() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_SOFTHYPH) ? TRUE : FALSE; }
+ inline void SetSoftHyph( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOFTHYPH ) : ( nCoreOptions &= ~VIEWOPT_1_SOFTHYPH); }
+
+ inline BOOL IsFldName() const { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLDNAME) ? TRUE : FALSE; }
+ inline void SetFldName( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLDNAME ) : ( nCoreOptions &= ~VIEWOPT_1_FLDNAME); }
+
+ inline BOOL IsPostIts() const
+ { return (nCoreOptions & VIEWOPT_1_POSTITS) ? TRUE : FALSE; }
+ inline void SetPostIts( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_POSTITS ) : ( nCoreOptions &= ~VIEWOPT_1_POSTITS); }
+ void PaintPostIts( OutputDevice *pOut, const SwRect &rRect,
+ sal_Bool bIsScript ) const;
+ USHORT GetPostItsWidth( const OutputDevice *pOut = 0 ) const;
+
+ inline BOOL IsShowHiddenChar(sal_Bool bHard = sal_False) const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_CHAR_HIDDEN) &&
+ ((nCoreOptions & VIEWOPT_1_VIEWMETACHARS)||bHard)
+ ? TRUE : FALSE; }
+
+ inline void SetShowHiddenChar( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CHAR_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_CHAR_HIDDEN); }
+
+
+ inline BOOL IsShowHiddenField() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_FLD_HIDDEN) ? TRUE : FALSE; }
+ inline void SetShowHiddenField( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_FLD_HIDDEN ) : ( nCoreOptions &= ~VIEWOPT_1_FLD_HIDDEN); }
+
+ inline BOOL IsGraphic() const
+ { return nCoreOptions & VIEWOPT_1_GRAPHIC ? TRUE : FALSE; }
+ inline void SetGraphic( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRAPHIC ) : ( nCoreOptions &= ~VIEWOPT_1_GRAPHIC); }
+
+ inline BOOL IsPageBack() const
+ { return nCoreOptions & VIEWOPT_1_PAGEBACK ? TRUE : FALSE; }
+ inline void SetPageBack( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_PAGEBACK) : ( nCoreOptions &= ~VIEWOPT_1_PAGEBACK); }
+
+ inline BOOL IsSolidMarkHdl() const
+ { return nCoreOptions & VIEWOPT_1_SOLIDMARKHDL ? TRUE : FALSE; }
+ inline void SetSolidMarkHdl( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SOLIDMARKHDL) : ( nCoreOptions &= ~VIEWOPT_1_SOLIDMARKHDL); }
+
+ inline BOOL IsBigMarkHdl() const
+ { return nCore2Options & VIEWOPT_CORE2_BIGMARKHDL ? TRUE : FALSE;}
+ inline void SetBigMarkHdl(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BIGMARKHDL ) : (nCore2Options &= ~VIEWOPT_CORE2_BIGMARKHDL);}
+
+ inline BOOL IsTable() const
+ { return nCoreOptions & VIEWOPT_1_TABLE ? TRUE : FALSE; }
+ inline void SetTable( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_TABLE ) : ( nCoreOptions &= ~VIEWOPT_1_TABLE); }
+
+ inline BOOL IsDraw() const
+ { return nCoreOptions & VIEWOPT_1_DRAW ? TRUE : FALSE; }
+ inline void SetDraw( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_DRAW ) : ( nCoreOptions &= ~VIEWOPT_1_DRAW); }
+
+ inline BOOL IsControl() const
+ { return nCoreOptions & VIEWOPT_1_CONTROL ? TRUE : FALSE; }
+ inline void SetControl( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CONTROL ) : ( nCoreOptions &= ~VIEWOPT_1_CONTROL); }
+
+ inline BOOL IsSnap() const
+ { return nCoreOptions & VIEWOPT_1_SNAP ? TRUE : FALSE; }
+ inline void SetSnap( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SNAP ) : ( nCoreOptions &= ~VIEWOPT_1_SNAP); }
+
+ inline void SetSnapSize( Size &rSz ){ aSnapSize = rSz; }
+ inline const Size &GetSnapSize() const { return aSnapSize; }
+
+ inline BOOL IsGridVisible() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_GRIDVISIBLE) ? TRUE : FALSE; }
+ inline void SetGridVisible( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_GRIDVISIBLE ) : ( nCoreOptions &= ~VIEWOPT_1_GRIDVISIBLE); }
+
+ inline BOOL IsOnlineSpell() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_ONLINESPELL) ? TRUE : FALSE; }
+ inline void SetOnlineSpell( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_ONLINESPELL ) : ( nCoreOptions &= ~VIEWOPT_1_ONLINESPELL); }
+
+ inline BOOL IsViewMetaChars() const
+ { return !bReadonly && (nCoreOptions & VIEWOPT_1_VIEWMETACHARS) ? TRUE : FALSE; }
+ inline void SetViewMetaChars( BOOL b)
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_VIEWMETACHARS ) : ( nCoreOptions &= ~VIEWOPT_1_VIEWMETACHARS); }
+
+ inline BOOL IsSynchronize() const
+ { return nCoreOptions & VIEWOPT_1_SYNCHRONIZE ? TRUE : FALSE;}
+ inline void SetSynchronize( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_SYNCHRONIZE ) : ( nCoreOptions &= ~VIEWOPT_1_SYNCHRONIZE); }
+
+ inline BOOL IsCrossHair() const
+ { return nCoreOptions & VIEWOPT_1_CROSSHAIR ? TRUE : FALSE; }
+ inline void SetCrossHair( BOOL b )
+ { (b != 0) ? (nCoreOptions |= VIEWOPT_1_CROSSHAIR ) : ( nCoreOptions &= ~VIEWOPT_1_CROSSHAIR); }
+
+/*---------------------------------------------------------------------------
+ Optionen aus nCore2Options
+----------------------------------------------------------------------------*/
+ inline BOOL IsBlackFont() const
+ {return nCore2Options & VIEWOPT_CORE2_BLACKFONT ? TRUE : FALSE;}
+
+ inline void SetBlackFont(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_BLACKFONT) : (nCore2Options &= ~VIEWOPT_CORE2_BLACKFONT);}
+
+ inline BOOL IsShowHiddenPara() const
+ {return nCore2Options & VIEWOPT_CORE2_HIDDENPARA ? TRUE : FALSE;}
+
+ inline void SetShowHiddenPara(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_HIDDENPARA) : (nCore2Options &= ~VIEWOPT_CORE2_HIDDENPARA);}
+
+ inline BOOL IsSmoothScroll() const
+ {return nCore2Options & VIEWOPT_CORE2_SMOOTHSCROLL ? TRUE : FALSE;}
+
+ inline void SetSmoothScroll(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_SMOOTHSCROLL) : (nCore2Options &= ~VIEWOPT_CORE2_SMOOTHSCROLL);}
+
+ inline BOOL IsCursorInProtectedArea() const
+ {return nCore2Options & VIEWOPT_CORE2_CRSR_IN_PROT ? TRUE : FALSE;}
+
+ inline void SetCursorInProtectedArea(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_CRSR_IN_PROT) : (nCore2Options &= ~VIEWOPT_CORE2_CRSR_IN_PROT);}
+
+ inline BOOL IsPDFExport() const
+ {return nCore2Options & VIEWOPT_CORE2_PDF_EXPORT ? TRUE : FALSE;}
+
+ inline void SetPDFExport(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PDF_EXPORT) : (nCore2Options &= ~VIEWOPT_CORE2_PDF_EXPORT);}
+
+ inline BOOL IsPrinting() const
+ {return nCore2Options & VIEWOPT_CORE2_PRINTING ? TRUE : FALSE;}
+
+ inline void SetPrinting(BOOL b)
+ { (b != 0) ? (nCore2Options |= VIEWOPT_CORE2_PRINTING) : (nCore2Options &= ~VIEWOPT_CORE2_PRINTING);}
+
+/*---------------------------------------------------------------------------
+
+----------------------------------------------------------------------------*/
+
+
+ inline short GetDivisionX() const { return nDivisionX; }
+ inline void SetDivisionX( short n ){ nDivisionX = n; }
+ inline short GetDivisionY() const { return nDivisionY; }
+ inline void SetDivisionY( short n ){ nDivisionY = n; }
+
+ inline BYTE GetPagePrevRow() const { return nPagePrevRow; }
+ inline void SetPagePrevRow( BYTE n ) { nPagePrevRow = n; }
+ inline BYTE GetPagePrevCol() const { return nPagePrevCol; }
+ inline void SetPagePrevCol( BYTE n ) { nPagePrevCol = n; }
+ BOOL IsReadonly() const { return bReadonly; }
+ void SetReadonly(BOOL bSet) { bReadonly = bSet; }
+
+ BOOL IsSelectionInReadonly() const {return bSelectionInReadonly;}
+ void SetSelectionInReadonly(BOOL bSet) {bSelectionInReadonly = bSet;}
+
+ // --> FME 2004-06-29 #114856# Formular view
+ BOOL IsFormView() const { return bFormView; }
+ void SetFormView( BOOL bSet ) { bFormView = bSet; }
+ // <--
+
+ inline BOOL IsPagePrevBookview() const { return bBookview; }
+ inline void SetPagePrevBookview(BOOL bSet) { bBookview = bSet; }
+
+ BOOL IsAutoCompleteWords() const;
+
+ // PAGES01
+ bool IsViewLayoutBookMode() const { return mbViewLayoutBookMode; }
+ void SetViewLayoutBookMode( bool bNew ) { mbViewLayoutBookMode = bNew; }
+ USHORT GetViewLayoutColumns() const { return mnViewLayoutColumns; }
+ void SetViewLayoutColumns( USHORT nNew ) { mnViewLayoutColumns = nNew; }
+
+#ifdef DBG_UTIL
+ // korrespondieren zu den Angaben in ui/config/cfgvw.src
+ inline BOOL IsTest1() const { return bTest1; }
+ inline void SetTest1( BOOL b ) { bTest1 = b; }
+ inline BOOL IsTest2() const { return bTest2; }
+ inline void SetTest2( BOOL b ) { bTest2 = b; }
+ inline BOOL IsTest3() const { return bTest3; }
+ inline void SetTest3( BOOL b ) { bTest3 = b; }
+ inline BOOL IsTest4() const { return bTest4; }
+ inline void SetTest4( BOOL b ) { bTest4 = b; }
+ inline BOOL IsTest5() const { return bTest5; }
+ inline void SetTest5( BOOL b ) { bTest5 = b; }
+ inline BOOL IsTest6() const { return bTest6; }
+ inline void SetTest6( BOOL b ) { bTest6 = b; }
+ inline BOOL IsTest7() const { return bTest7; }
+ inline void SetTest7( BOOL b ) { bTest7 = b; }
+ inline BOOL IsTest8() const { return bTest8; }
+ inline void SetTest8( BOOL b ) { bTest8 = b; }
+ static inline BOOL IsTest9() { return bTest9; }
+ static inline void SetTest9( BOOL b ) { bTest9 = b; }
+ inline BOOL IsTest10() const { return bTest10; }
+ inline void SetTest10( BOOL b ) { bTest10 = b; }
+#endif
+
+ inline USHORT GetZoom() const { return nZoom; }
+ inline void SetZoom( USHORT n ){ nZoom = n; }
+
+ void DrawRect( OutputDevice* pOut, const SwRect &rRect, long nCol ) const;
+ void DrawRectPrinter( OutputDevice* pOut, const SwRect& rRect ) const;
+
+ SwViewOption& operator=( const SwViewOption &rOpt );
+ // Vergleichsmethoden
+ BOOL IsEqualFlags ( const SwViewOption &rOpt ) const;
+ inline BOOL operator == ( const SwViewOption &rOpt ) const;
+ inline BOOL operator != ( const SwViewOption &rOpt ) const { return !(*this == rOpt); }
+
+
+/*---------------------------------------------------------------------------
+ Optionen aus nUIOptions
+----------------------------------------------------------------------------*/
+
+ BOOL IsViewVScrollBar() const
+ { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? TRUE : FALSE; }
+ BOOL IsViewHScrollBar() const
+ { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? TRUE : FALSE; }
+ BOOL IsKeepRatio() const
+ { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? TRUE : FALSE; }
+ BOOL IsGrfKeepZoom() const
+ { return nUIOptions & VIEWOPT_2_GRFKEEPZOOM ? TRUE : FALSE; }
+ BOOL IsPreventTips() const
+ { return nUIOptions & VIEWOPT_2_PREVENT_TIPS ? TRUE : FALSE; }
+ BOOL IsPrtFormat() const
+ { return nUIOptions & VIEWOPT_2_PRTFORMAT ? TRUE : FALSE; }
+
+ SvxZoomType GetZoomType() const { return eZoom; }
+
+ BYTE GetTblDest() const { return nTblDest; }
+
+ void SetViewVScrollBar(BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_VSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_VSCROLLBAR); }
+ void SetViewHScrollBar(BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_HSCROLLBAR ) : ( nUIOptions &= ~VIEWOPT_2_HSCROLLBAR); }
+ void SetKeepRatio (BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_KEEPASPECTRATIO ) : ( nUIOptions &= ~VIEWOPT_2_KEEPASPECTRATIO); }
+ void SetGrfKeepZoom (BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_GRFKEEPZOOM ) : ( nUIOptions &= ~VIEWOPT_2_GRFKEEPZOOM); }
+ void SetPreventTips( BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_PREVENT_TIPS) : (nUIOptions &= ~VIEWOPT_2_PREVENT_TIPS); }
+ void SetPrtFormat( BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_PRTFORMAT) : (nUIOptions &= ~VIEWOPT_2_PRTFORMAT); }
+
+ void SetZoomType (SvxZoomType eZoom_){ eZoom = eZoom_; }
+ void SetTblDest( BYTE nNew ) { nTblDest = nNew; }
+
+ const String& GetSymbolFont() const {return sSymbolFont;}
+ void SetSymbolFont(const String& sSet) {sSymbolFont = sSet;}
+
+ const Color& GetRetoucheColor() const { return aRetoucheColor;}
+ void SetRetoucheColor(const Color&r) { aRetoucheColor = r; }
+
+ BOOL IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);}
+ void SetViewAnyRuler(BOOL bSet)
+ { bSet ? (nUIOptions |= VIEWOPT_2_ANY_RULER) : (nUIOptions &= ~VIEWOPT_2_ANY_RULER);}
+
+ BOOL IsViewHRuler(BOOL bDirect = FALSE) const
+ {
+ BOOL bRet = sal::static_int_cast< BOOL >( bDirect ?
+ 0 != (nUIOptions & VIEWOPT_2_H_RULER) :
+ !bReadonly ?
+ (nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)
+ : FALSE );
+ return bRet;
+
+ }
+ void SetViewHRuler (BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_H_RULER ) : ( nUIOptions &= ~VIEWOPT_2_H_RULER);}
+
+ BOOL IsViewVRuler(BOOL bDirect = FALSE) const
+ {
+ BOOL bRet = sal::static_int_cast< BOOL >( bDirect ?
+ 0 !=(nUIOptions & VIEWOPT_2_V_RULER) :
+ !bReadonly ?
+ (nUIOptions &
+ (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)
+ : FALSE );
+ return bRet;
+ }
+ void SetViewVRuler (BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_V_RULER ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER);}
+
+ // ShadowCursor ein schalten/abfragen/Farbe setzen/Modus setzen
+ BOOL IsShadowCursor() const
+ { return nUIOptions & VIEWOPT_2_SHADOWCRSR ? TRUE : FALSE; }
+ void SetShadowCursor(BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_SHADOWCRSR ) : ( nUIOptions &= ~VIEWOPT_2_SHADOWCRSR); }
+
+ //move vertical ruler to the right
+ BOOL IsVRulerRight() const
+ { return nUIOptions & VIEWOPT_2_V_RULER_RIGHT ? TRUE : FALSE; }
+ void SetVRulerRight(BOOL b)
+ { b ? (nUIOptions |= VIEWOPT_2_V_RULER_RIGHT ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER_RIGHT); }
+
+ BOOL IsStarOneSetting() const {return bStarOneSetting; }
+ void SetStarOneSetting(BOOL bSet) {bStarOneSetting = bSet; }
+
+ BOOL IsPagePreview() const {return bIsPagePreview; }
+ void SetPagePreview(BOOL bSet) { bIsPagePreview= bSet; }
+
+ BYTE GetShdwCrsrFillMode() const { return nShdwCrsrFillMode; }
+ void SetShdwCrsrFillMode( BYTE nMode ) { nShdwCrsrFillMode = nMode; };
+
+ sal_Bool IsShowPlaceHolderFields() const { return bShowPlaceHolderFields; }
+ void SetShowPlaceHolderFields(sal_Bool bSet) { bShowPlaceHolderFields = bSet; }
+
+ static Color& GetDocColor();
+ static Color& GetDocBoundariesColor();
+ static Color& GetAppBackgroundColor();
+ static Color& GetObjectBoundariesColor();
+ static Color& GetTableBoundariesColor();
+ static Color& GetIndexShadingsColor();
+ static Color& GetLinksColor();
+ static Color& GetVisitedLinksColor();
+ static Color& GetDirectCursorColor();
+ static Color& GetTextGridColor();
+ static Color& GetSpellColor();
+ static Color& GetSmarttagColor();
+ SW_DLLPUBLIC static Color& GetFontColor();
+ static Color& GetFieldShadingsColor();
+ static Color& GetSectionBoundColor();
+ static Color& GetPageBreakColor();
+
+ static BOOL IsAppearanceFlag(sal_Int32 nFlag);
+
+ static BOOL IsDocBoundaries() {return IsAppearanceFlag(VIEWOPT_DOC_BOUNDARIES);}
+ static BOOL IsObjectBoundaries(){return IsAppearanceFlag(VIEWOPT_OBJECT_BOUNDARIES);}
+ static BOOL IsTableBoundaries() {return IsAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES );}
+ static BOOL IsIndexShadings() {return IsAppearanceFlag(VIEWOPT_INDEX_SHADINGS );}
+ static BOOL IsLinks() {return IsAppearanceFlag(VIEWOPT_LINKS );}
+ static BOOL IsVisitedLinks() {return IsAppearanceFlag(VIEWOPT_VISITED_LINKS );}
+ static BOOL IsFieldShadings() {return IsAppearanceFlag(VIEWOPT_FIELD_SHADINGS);}
+ static BOOL IsSectionBoundaries() {return IsAppearanceFlag(VIEWOPT_SECTION_BOUNDARIES);}
+
+ static void SetAppearanceFlag(sal_Int32 nFlag, BOOL bSet, BOOL bSaveInConfig = FALSE);
+
+ void SetDocBoundaries(BOOL bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);}
+
+ static void ApplyColorConfigValues(const svtools::ColorConfig& rConfig);
+};
+
+
+inline BOOL SwViewOption::operator==( const SwViewOption &rOpt ) const
+{
+ return IsEqualFlags( rOpt ) && nZoom == rOpt.GetZoom();
+}
+
+inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt )
+{
+ nUIOptions = rVOpt.nUIOptions;
+ nTblDest = rVOpt.nTblDest;
+ nShdwCrsrFillMode = rVOpt.nShdwCrsrFillMode;
+}
+
+
+// Hilfsfunktion zur Ermittlung der HTML-Faehigkeiten
+SW_DLLPUBLIC USHORT GetHtmlMode(const SwDocShell*);
+
+
+#endif
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
new file mode 100644
index 000000000000..6c7011d78bb4
--- /dev/null
+++ b/sw/inc/viewsh.hxx
@@ -0,0 +1,636 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _VIEWSH_HXX
+#define _VIEWSH_HXX
+#include <com/sun/star/embed/XClassifiedObject.hpp>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <tools/rtti.hxx>
+#include <svl/svarray.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx>
+#include <ring.hxx>
+#include <swrect.hxx>
+#include <errhdl.hxx>
+#include <vcl/mapmod.hxx>
+#include <vcl/print.hxx>
+
+namespace com { namespace sun { namespace star { namespace accessibility {
+ class XAccessible; } } } }
+
+class SfxObjectShellRef;
+class SwDoc;
+class IDocumentSettingAccess;
+class IDocumentDeviceAccess;
+class IDocumentMarkAccess;
+class IDocumentDrawModelAccess;
+class IDocumentRedlineAccess;
+class IDocumentLayoutAccess;
+class IDocumentFieldsAccess;
+class IDocumentContentOperations;
+class IDocumentStylePoolAccess;
+class IDocumentStatistics;
+class IDocumentUndoRedo;
+// --> OD 2007-11-14 #i83479#
+class IDocumentListItems;
+class IDocumentOutlineNodes;
+// <--
+class SfxPrinter;
+class SfxProgress;
+class SwRootFrm;
+class SwNodes;
+class SdrView;
+class SfxItemPool;
+class SfxViewShell;
+class SwViewOption;
+class SwViewImp;
+class SwPrtOptions;
+class SwPrintData;
+class SwPagePreViewPrtData;
+class Window;
+class OutputDevice;
+class SwLayIdle;
+struct ShellResource;
+class SwRegionRects;
+class SwFrm;
+class SvtAccessibilityOptions;
+class SwPagePreviewLayout;
+class SwTxtFrm;
+class BitmapEx;
+
+struct SwAccessibilityOptions;
+class Region;
+class SwPostItMgr;
+class SdrPaintWindow;
+class SwAccessibleMap;
+
+namespace vcl
+{
+ class OldStylePrintAdaptor;
+}
+
+
+//JP 19.07.98: - Bug 52312
+// define fuer Flags, die im CTOR oder den darunter liegenden Schichten
+// benoetigt werden.
+// Zur Zeit wird fuer die DrawPage das PreView Flag benoetigt
+#define VSHELLFLAG_ISPREVIEW ((long)0x1)
+
+
+class SW_DLLPUBLIC ViewShell : public Ring
+{
+ friend void SetOutDev( ViewShell *pSh, OutputDevice *pOut );
+ friend void SetOutDevAndWin( ViewShell *pSh, OutputDevice *pOut,
+ Window *pWin, sal_uInt16 nZoom );
+
+ friend class SwViewImp;
+ friend class SwLayIdle;
+
+ // OD 12.12.2002 #103492# - for setting visible area for page preview paint
+ friend class SwPagePreviewLayout;
+
+ //Umsetzen der SwVisArea, damit vor dem Drucken sauber formatiert
+ //werden kann.
+ friend void SetSwVisArea( ViewShell *pSh, const SwRect &, BOOL bPDFExport = FALSE );
+
+ // --> PB 2007-05-30 #146850#
+ static BitmapEx* pReplaceBmp; // replaced display of still loaded images
+ static BitmapEx* pErrorBmp; // error display of missed images
+ // <--
+
+ static sal_Bool bLstAct; // sal_True wenn Das EndAction der letzten Shell
+ // laeuft; also die EndActions der
+ // anderen Shells auf das Dokument
+ // abgearbeitet sind.
+
+ Point aPrtOffst; //Ofst fuer den Printer,
+ //nicht bedruckbarer Rand.
+ Size aBrowseBorder; //Rand fuer Framedokumente
+ SwRect aInvalidRect;
+
+ SfxViewShell *pSfxViewShell;
+ SwViewImp *pImp; //Core-Interna der ViewShell.
+ //Der Pointer ist niemals 0.
+
+ Window *pWin; // = 0 during printing or pdf export
+ OutputDevice *pOut; // Window, Printer, VirtDev, ...
+ OutputDevice* mpTmpRef; // Temporariy reference device. Is used
+ // during (printer depending) prospect
+ // and page preview printing
+ // (because a scaling has to be set at
+ // the original printer)
+
+ SwViewOption *pOpt;
+ SwAccessibilityOptions* pAccOptions;
+
+
+ sal_Bool bDocSizeChgd :1; //Fuer DocChgNotify(): Neue DocGroesse bei
+ //EndAction an das DocMDI melden.
+ sal_Bool bPaintWorks :1; //Normal Painten wenn sal_True,
+ //Paint merken wenn sal_False
+ sal_Bool bPaintInProgress :1; //Kein zweifaches Paint durchlassen.
+ sal_Bool bViewLocked :1; //Lockt den sichtbaren Bereich,
+ //MakeVisible laeuft dann in's leere.
+ sal_Bool bInEndAction :1; //Fiese unstaende vermeiden, siehe viewsh.cxx
+ sal_Bool bPreView :1; //Ist sal_True wenns eine PreView-ViewShell ist.
+ sal_Bool bFrameView :1; //sal_True wenn es ein (HTML-)Frame ist.
+ sal_Bool bEnableSmooth :1; //Disable des SmoothScroll z.B. fuer
+ //Drag der Scrollbars.
+ sal_Bool bEndActionByVirDev:1; //Paints aus der EndAction immer ueber virtuelles
+
+ //Device (etwa beim Browsen)
+
+ // OD 2004-06-01 #i26791# - boolean, indicating that class in in constructor
+ bool mbInConstructor:1;
+
+ // #i74769#
+ SdrPaintWindow* mpTargetPaintWindow;
+ OutputDevice* mpBufferedOut;
+
+ //Initialisierung, wird von den verschiedenen Konstruktoren gerufen.
+ SW_DLLPRIVATE void Init( const SwViewOption *pNewOpt );
+
+ inline void ResetInvalidRect();
+
+ SW_DLLPRIVATE void Reformat(); //Invalidert das ges. Layout (ApplyViewOption)
+
+ SW_DLLPRIVATE void PaintDesktop( const SwRect & ); // sammeln der Werte fuers
+ // Malen der Wiese und rufen
+ // PaintDesktop gesplittet, dieser Teil wird auch von PreViewPage benutzt
+ SW_DLLPRIVATE void _PaintDesktop( const SwRegionRects &rRegion );
+
+ SW_DLLPRIVATE sal_Bool CheckInvalidForPaint( const SwRect & );//Direkt Paint oder lieber
+ //eine Aktion ausloesen.
+
+ SW_DLLPRIVATE void PrepareForPrint( const SwPrintData &rOptions );
+
+ SW_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt );
+
+protected:
+ static ShellResource* pShellRes; // Resourcen fuer die Shell
+ static Window* pCareWindow; // diesem Fenster ausweichen
+
+ SwRect aVisArea; //Die moderne Ausfuerung der VisArea
+ SwDoc *pDoc; //Das Dokument, niemals 0
+
+ sal_uInt16 nStartAction; //ist != 0 wenn mindestens eine ::com::sun::star::chaos::Action laeuft
+ sal_uInt16 nLockPaint; //ist != 0 wenn das Paint gelocked ist.
+
+public:
+ TYPEINFO();
+
+ SwViewImp *Imp() { return pImp; }
+ const SwViewImp *Imp() const { return pImp; }
+
+ const SwNodes& GetNodes() const;
+
+ //Nach Druckerwechsel, vom Doc
+ void InitPrt( OutputDevice *pOutDev );
+
+ //Klammerung von zusammengehoerenden Aktionen.
+ inline void StartAction();
+ void ImplStartAction();
+ inline void EndAction( const sal_Bool bIdleEnd = sal_False );
+ void ImplEndAction( const sal_Bool bIdleEnd = sal_False );
+ sal_uInt16 ActionCount() const { return nStartAction; }
+ sal_Bool ActionPend() const { return nStartAction != 0; }
+ sal_Bool IsInEndAction() const { return bInEndAction; }
+
+ void SetEndActionByVirDev( sal_Bool b ) { bEndActionByVirDev = b; }
+ sal_Bool IsEndActionByVirDev() { return bEndActionByVirDev; }
+
+ // Per UNO wird am RootFrame fuer alle shells der ActionCount kurzfristig
+ // auf Null gesetzt und wieder restauriert
+ void SetRestoreActions(sal_uInt16 nSet);
+ sal_uInt16 GetRestoreActions() const;
+
+ inline sal_Bool HasInvalidRect() const { return aInvalidRect.HasArea(); }
+ void ChgHyphenation() { Reformat(); }
+ void ChgNumberDigits();
+
+ sal_Bool AddPaintRect( const SwRect &rRect );
+
+ void InvalidateWindows( const SwRect &rRect );
+
+ //////////////////////////////////////////////////////////////////////////////
+ // #i72754# set of Pre/PostPaints with lock counter and initial target OutDev
+protected:
+ sal_uInt32 mnPrePostPaintCount;
+ OutputDevice* mpPrePostOutDev;
+ MapMode maPrePostMapMode;
+public:
+ void PrePaint();
+ void DLPrePaint2(const Region& rRegion);
+ void DLPostPaint2(bool bPaintFormLayer);
+ const MapMode& getPrePostMapMode() const { return maPrePostMapMode; }
+ //////////////////////////////////////////////////////////////////////////////
+
+ virtual void Paint(const Rectangle &rRect);
+ sal_Bool IsPaintInProgress() const { return bPaintInProgress; }
+ bool IsDrawingLayerPaintInProgress() const { return 0 != mnPrePostPaintCount; }
+
+ //Benachrichtung, dass sich der sichtbare Bereich geaendert hat.
+ //VisArea wird neu gesetzt, anschliessend wird gescrollt.
+ //Das uebergebene Rect liegt auf Pixelgrenzen,
+ //um Pixelfehler beim Scrollen zu vermeiden.
+ virtual void VisPortChgd( const SwRect & );
+ sal_Bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser
+ void EnableSmooth( sal_Bool b ) { bEnableSmooth = b; }
+
+ const SwRect& VisArea() const { return aVisArea; }
+ //Es wird, wenn notwendig, soweit gescrollt, dass das
+ //uebergebene Rect im sichtbaren Ausschnitt liegt.
+ void MakeVisible( const SwRect & );
+
+ //Bei naechster Gelegenheit die neue Dokuemntgroesse an das UI weiterreichen.
+ void SizeChgNotify();
+ void UISizeNotify(); //Das weiterreichen der aktuellen groesse.
+
+ Point GetPagePos( sal_uInt16 nPageNum ) const;
+
+ sal_uInt16 GetNumPages(); //Anzahl der aktuellen Seiten Layout erfragen.
+ sal_Bool IsDummyPage( USHORT nPageNum ) const; // An empty page?
+
+ //Invalidierung der ersten Sichtbaren Seite fuer alle Shells im Ring.
+ void SetFirstVisPageInvalid();
+
+ SwRootFrm *GetLayout() const;
+ sal_Bool IsNewLayout() const; //Wurde das Layout geladen oder neu
+ //erzeugt?
+
+ Size GetDocSize() const;// erfrage die Groesse des Dokuments
+
+ void CalcLayout(); //Durchformatierung des Layouts erzwingen.
+
+ inline SwDoc *GetDoc() const { return pDoc; } //niemals 0.
+
+ /** Provides access to the document setting interface
+ */
+ const IDocumentSettingAccess* getIDocumentSettingAccess() const;
+ IDocumentSettingAccess* getIDocumentSettingAccess();
+
+ /** Provides access to the document device interface
+ */
+ const IDocumentDeviceAccess* getIDocumentDeviceAccess() const;
+ IDocumentDeviceAccess* getIDocumentDeviceAccess();
+
+ /** Provides access to the document bookmark interface
+ */
+ const IDocumentMarkAccess* getIDocumentMarkAccess() const;
+ IDocumentMarkAccess* getIDocumentMarkAccess();
+
+ /** Provides access to the document draw model interface
+ */
+ const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const;
+ IDocumentDrawModelAccess* getIDocumentDrawModelAccess();
+
+ /** Provides access to the document redline interface
+ */
+ const IDocumentRedlineAccess* getIDocumentRedlineAccess() const;
+ IDocumentRedlineAccess* getIDocumentRedlineAccess();
+
+ /** Provides access to the document layout interface
+ */
+ const IDocumentLayoutAccess* getIDocumentLayoutAccess() const;
+ IDocumentLayoutAccess* getIDocumentLayoutAccess();
+
+ /** Provides access to the document fields administration interface
+ */
+ const IDocumentFieldsAccess* getIDocumentFieldsAccess() const;
+
+ /** Provides access to the content operations interface
+ */
+ IDocumentContentOperations* getIDocumentContentOperations();
+
+ /** Provides access to the document style pool interface
+ */
+ IDocumentStylePoolAccess* getIDocumentStylePoolAccess();
+
+ /** Provides access to the document statistics interface
+ */
+ const IDocumentStatistics* getIDocumentStatistics() const;
+
+ /** Provides access to the document undo/redo interface
+ */
+ IDocumentUndoRedo* getIDocumentUndoRedoAccess();
+
+ // --> OD 2007-11-14 #i83479#
+ const IDocumentListItems* getIDocumentListItemsAccess() const;
+ const IDocumentOutlineNodes* getIDocumentOutlineNodesAccess() const;
+ // <--
+
+ // 1. GetRefDev: Either the printer or the virtual device from the doc
+ // 2. GetWin: Available if we not printing
+ // 3. GetOut: Printer, Window or Virtual device
+ OutputDevice& GetRefDev() const;
+ inline Window* GetWin() const { return pWin; }
+ inline OutputDevice* GetOut() const { return pOut; }
+
+ static inline sal_Bool IsLstEndAction() { return ViewShell::bLstAct; }
+
+ //Andern alle PageDescriptoren
+ void ChgAllPageOrientation( sal_uInt16 eOri );
+ void ChgAllPageSize( Size &rSz );
+
+ // printing of one page.
+ // bIsPDFExport == true is: do PDF Export (no printing!)
+ sal_Bool PrintOrPDFExport( OutputDevice *pOutDev, const SwPrtOptions &rPrintData,
+ sal_Int32 nRenderer /* offset in vector of pages to print */ );
+
+ // printing of one brochure page
+ void PrintProspect( OutputDevice *pOutDev, const SwPrintData &rPrintData,
+ sal_Int32 nRenderer /* offset in vector of page pairs for prospect printing */ );
+
+ // printing for OLE 2.0
+ static void PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
+ OutputDevice* pOleOut, const Rectangle& rRect );
+
+ // creates temporary doc with selected text for PDF export
+ SwDoc * CreatePrtDoc( SfxObjectShellRef& );
+ SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
+
+ //Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten.
+ void CalcPagesForPrint( sal_uInt16 nMax );
+
+ //All about fields.
+ void UpdateFlds(sal_Bool bCloseDB = sal_False);
+ sal_Bool IsAnyFieldInDoc() const;
+ // update all charts, for that exists any table
+ void UpdateAllCharts();
+ sal_Bool HasCharts() const;
+
+ //
+ // DOCUMENT COMPATIBILITY FLAGS START
+ //
+
+ // Sollen Absatzabstaende addiert oder maximiert werden?
+ void SetParaSpaceMax( bool bNew );
+
+ // Sollen Absatzabstaende addiert oder maximiert werden?
+ void SetParaSpaceMaxAtPages( bool bNew );
+
+ // compatible behaviour of tabs
+ void SetTabCompat( bool bNew );
+
+ // font metric attribute "External Leading" should be considered
+ void SetAddExtLeading( bool bNew );
+
+ // formatting by virtual device or printer
+ void SetUseVirDev( bool nNew );
+
+ // OD 2004-02-16 #106629# - adding paragraph and table spacing at bottom
+ // of table cells
+ void SetAddParaSpacingToTableCells( bool _bAddParaSpacingToTableCells );
+
+ // OD 06.01.2004 #i11859# - former formatting of text lines with
+ // proportional line spacing or not
+ void SetUseFormerLineSpacing( bool _bUseFormerLineSpacing );
+
+ // OD 2004-03-12 #i11860# - former object positioning
+ void SetUseFormerObjectPositioning( bool _bUseFormerObjPos );
+
+ // OD 2004-05-05 #i28701#
+ void SetConsiderWrapOnObjPos( bool _bConsiderWrapOnObjPos );
+
+ // --> FME #108724#
+ void SetUseFormerTextWrapping( bool _bUseFormerTextWrapping );
+
+ // -> PB 2007-06-11 #i45491#
+ void SetDoNotJustifyLinesWithManualBreak( bool _bDoNotJustifyLinesWithManualBreak );
+ // <--
+
+ //
+ // DOCUMENT COMPATIBILITY FLAGS END
+ //
+
+ //Ruft den Idle-Formatierer des Layouts
+ void LayoutIdle();
+
+ inline const SwViewOption *GetViewOptions() const { return pOpt; }
+ void ApplyViewOptions( const SwViewOption &rOpt );
+ void SetUIOptions( const SwViewOption &rOpt );
+ void SetReadonlyOption(sal_Bool bSet); // Readonly-Bit d. ViewOptions setzen
+ void SetPDFExportOption(sal_Bool bSet); // set/reset PDF export mode
+ void SetPrtFormatOption(sal_Bool bSet); // PrtFormat-Bit d. ViewOptions setzen
+ void SetReadonlySelectionOption(sal_Bool bSet);//change the selection mode in readonly docs
+
+ const SwAccessibilityOptions* GetAccessibilityOptions() const { return pAccOptions;}
+
+ static void SetShellRes( ShellResource* pRes ) { pShellRes = pRes; }
+ static ShellResource* GetShellRes();
+
+ static void SetCareWin( Window* pNew );
+ static Window* GetCareWin(ViewShell& rVSh)
+ { return pCareWindow ? pCareWindow : CareChildWin(rVSh); }
+ static Window* CareChildWin(ViewShell& rVSh);
+
+ inline SfxViewShell *GetSfxViewShell() { return pSfxViewShell; }
+ inline void SetSfxViewShell(SfxViewShell *pNew) { pSfxViewShell = pNew; }
+
+ // Selektion der Draw ::com::sun::star::script::Engine geaendert
+ virtual void DrawSelChanged();
+
+ // OD 12.12.2002 #103492#
+ SwPagePreviewLayout* PagePreviewLayout();
+
+ /** adjust view options for page preview
+
+ OD 09.01.2003 #i6467#
+ Because page preview should show the document as it is printed -
+ page preview is print preview -, the view options are adjusted to the
+ same as for printing.
+
+ @param _rPrintOptions
+ input parameter - constant reference to print options, to which the
+ view option will be adjusted.
+ */
+ void AdjustOptionsForPagePreview( const SwPrtOptions &_rPrintOptions );
+
+ sal_Bool IsViewLocked() const { return bViewLocked; }
+ void LockView( sal_Bool b ) { bViewLocked = b; }
+
+ inline void LockPaint();
+ void ImplLockPaint();
+ inline void UnlockPaint( sal_Bool bVirDev = sal_False );
+ void ImplUnlockPaint( sal_Bool bVirDev );
+ sal_Bool IsPaintLocked() const { return nLockPaint != 0; }
+
+ // Abfragen/Erzeugen DrawView + PageView
+ sal_Bool HasDrawView() const;
+ void MakeDrawView();
+
+ //DrawView darf u.U. am UI benutzt werden.
+ SdrView *GetDrawView();
+ const SdrView *GetDrawView() const { return ((ViewShell*)this)->GetDrawView(); }
+
+ //sorge dafuer, das auf jedenfall die MarkListe aktuell ist (Bug 57153)
+ SdrView *GetDrawViewWithValidMarkList();
+
+ // erfrage den Attribut Pool
+ inline const SfxItemPool& GetAttrPool() const;
+ SfxItemPool& GetAttrPool();
+
+ sal_Bool IsPreView() const { return bPreView; }
+
+ sal_Bool IsFrameView() const { return bFrameView; }
+ void SetFrameView( const Size& rBrowseBorder )
+ { bFrameView = sal_True; aBrowseBorder = rBrowseBorder; }
+
+ //Nimmt die notwendigen Invalidierungen vor,
+ //wenn sich der BrowdseModus aendert, bBrowseChgd == sal_True
+ //oder, im BrowseModus, wenn sich die Groessenverhaeltnisse
+ //aendern (bBrowseChgd == sal_False)
+ void CheckBrowseView( BOOL bBrowseChgd );
+
+ const Size& GetBrowseBorder() const;
+ sal_Int32 GetBrowseWidth() const;
+ void SetBrowseBorder( const Size& rNew );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ // OD 15.01.2003 #103492# - change method signature due to new page preview
+ // functionality.
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ CreateAccessiblePreview();
+
+ void ShowPreViewSelection( sal_uInt16 nSelPage );
+ void InvalidateAccessibleFocus();
+
+ //apply Accessiblity options
+ void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
+
+ /** invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
+
+ OD 2005-12-01 #i27138#
+
+ @author OD
+
+ @param _pFromTxtFrm
+ input parameter - paragraph frame, for which the relation CONTENT_FLOWS_FROM
+ has to be invalidated.
+ If NULL, no CONTENT_FLOWS_FROM relation has to be invalidated
+
+ @param _pToTxtFrm
+ input parameter - paragraph frame, for which the relation CONTENT_FLOWS_TO
+ has to be invalidated.
+ If NULL, no CONTENT_FLOWS_TO relation has to be invalidated
+ */
+ void InvalidateAccessibleParaFlowRelation( const SwTxtFrm* _pFromTxtFrm,
+ const SwTxtFrm* _pToTxtFrm );
+
+ /** invalidate text selection for paragraphs
+
+ OD 2005-12-12 #i27301#
+
+ @author OD
+ */
+ void InvalidateAccessibleParaTextSelection();
+
+ /** invalidate attributes for paragraphs and paragraph's characters
+
+ OD 2009-01-06 #i88069#
+ OD 2010-02-16 #i104008# - usage also for changes of the attributes of
+ paragraph's characters.
+
+ @author OD
+
+ @param rTxtFrm
+ input parameter - paragraph frame, whose attributes have changed
+ */
+ void InvalidateAccessibleParaAttrs( const SwTxtFrm& rTxtFrm );
+
+ SwAccessibleMap* GetAccessibleMap();
+
+ ViewShell( ViewShell&, Window *pWin = 0, OutputDevice *pOut = 0,
+ long nFlags = 0 );
+ ViewShell( SwDoc& rDoc, Window *pWin,
+ const SwViewOption *pOpt = 0, OutputDevice *pOut = 0,
+ long nFlags = 0 );
+ virtual ~ViewShell();
+
+ // --> FME 2004-06-15 #i12836# enhanced pdf export
+ sal_Int32 GetPageNumAndSetOffsetForPDF( OutputDevice& rOut, const SwRect& rRect ) const;
+ // <--
+
+ inline bool IsInConstructor() const { return mbInConstructor; }
+
+ // --> PB 2007-05-30 #146850#
+ static const BitmapEx& GetReplacementBitmap( bool bIsErrorState );
+ static void DeleteReplacementBitmaps();
+ // <--
+
+ const SwPostItMgr* GetPostItMgr() const { return (const_cast<ViewShell*>(this))->GetPostItMgr(); }
+ SwPostItMgr* GetPostItMgr();
+};
+
+//---- class CurrShell verwaltet den globalen ShellPointer -------------------
+
+class CurrShell
+{
+public:
+ ViewShell *pPrev;
+ SwRootFrm *pRoot;
+
+ CurrShell( ViewShell *pNew );
+ ~CurrShell();
+};
+
+inline void ViewShell::ResetInvalidRect()
+{
+ aInvalidRect.Clear();
+}
+
+inline void ViewShell::StartAction()
+{
+ if ( !nStartAction++ )
+ ImplStartAction();
+}
+inline void ViewShell::EndAction( const sal_Bool bIdleEnd )
+{
+ if( 0 == (nStartAction - 1) )
+ ImplEndAction( bIdleEnd );
+ --nStartAction;
+}
+
+inline void ViewShell::LockPaint()
+{
+ if ( !nLockPaint++ )
+ ImplLockPaint();
+}
+inline void ViewShell::UnlockPaint( sal_Bool bVirDev )
+{
+ if ( 0 == --nLockPaint )
+ ImplUnlockPaint( bVirDev );
+}
+inline const SfxItemPool& ViewShell::GetAttrPool() const
+{
+ return ((ViewShell*)this)->GetAttrPool();
+}
+
+
+
+#endif //_VIEWSH_HXX
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
new file mode 100644
index 000000000000..827671a7f94e
--- /dev/null
+++ b/sw/inc/viscrs.hxx
@@ -0,0 +1,223 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _VISCRS_HXX
+#define _VISCRS_HXX
+
+#include <vcl/cursor.hxx>
+#include "swcrsr.hxx"
+#include "swrect.hxx"
+#include "swregion.hxx"
+
+class SwCrsrShell;
+class SwShellCrsr;
+
+// -------- Ab hier Klassen / Methoden fuer den nicht Text-Cursor ------
+
+class SwVisCrsr
+#ifdef SW_CRSR_TIMER
+ : private Timer
+#endif
+{
+ friend void _InitCore();
+ friend void _FinitCore();
+
+ BOOL bIsVisible : 1;
+ BOOL bIsDragCrsr : 1;
+
+#ifdef SW_CRSR_TIMER
+ BOOL bTimerOn : 1;
+#endif
+
+ Cursor aTxtCrsr;
+ const SwCrsrShell* pCrsrShell;
+
+#ifdef SW_CRSR_TIMER
+ virtual void Timeout();
+#endif
+ void _SetPosAndShow();
+
+public:
+ SwVisCrsr( const SwCrsrShell * pCShell );
+ ~SwVisCrsr();
+
+ void Show();
+ void Hide();
+
+ BOOL IsVisible() const { return bIsVisible; }
+ void SetDragCrsr( BOOL bFlag = TRUE ) { bIsDragCrsr = bFlag; }
+
+#ifdef SW_CRSR_TIMER
+ BOOL ChgTimerFlag( BOOL bTimerOn = TRUE );
+#endif
+};
+
+
+// ------ Ab hier Klassen / Methoden fuer die Selectionen -------
+
+// #i75172# predefines
+namespace sdr { namespace overlay { class OverlayObject; }}
+
+class SwSelPaintRects : public SwRects
+{
+ friend void _InitCore();
+ friend void _FinitCore();
+
+ static long nPixPtX, nPixPtY;
+ static MapMode *pMapMode;
+
+ // die Shell
+ const SwCrsrShell* pCShell;
+
+ virtual void Paint( const Rectangle& rRect );
+ virtual void FillRects() = 0;
+
+ // #i75172#
+ sdr::overlay::OverlayObject* mpCursorOverlay;
+
+ // #i75172# access to mpCursorOverlay for swapContent
+ sdr::overlay::OverlayObject* getCursorOverlay() const { return mpCursorOverlay; }
+ void setCursorOverlay(sdr::overlay::OverlayObject* pNew) { mpCursorOverlay = pNew; }
+
+public:
+ SwSelPaintRects( const SwCrsrShell& rCSh );
+ virtual ~SwSelPaintRects();
+
+ // #i75172# in SwCrsrShell::CreateCrsr() the content of SwSelPaintRects is exchanged. To
+ // make a complete swap access to mpCursorOverlay is needed there
+ void swapContent(SwSelPaintRects& rSwap);
+
+ void Show();
+ void Hide();
+ void Invalidate( const SwRect& rRect );
+
+ const SwCrsrShell* GetShell() const { return pCShell; }
+ // check current MapMode of the shell and set possibly the static members.
+ // Optional set the parameters pX, pY
+ static void Get1PixelInLogic( const ViewShell& rSh,
+ long* pX = 0, long* pY = 0 );
+};
+
+
+class SwShellCrsr : public virtual SwCursor, public SwSelPaintRects
+{
+ // Dokument-Positionen der Start/End-Charakter einer SSelection
+ Point aMkPt, aPtPt;
+ const SwPosition* pPt; // fuer Zuordung vom GetPoint() zum aPtPt
+
+ virtual void FillRects(); // fuer Table- und normalen Crsr
+
+ using SwCursor::UpDown;
+
+public:
+ SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos );
+ SwShellCrsr( const SwCrsrShell& rCrsrSh, const SwPosition &rPos,
+ const Point& rPtPos, SwPaM* pRing = 0 );
+ SwShellCrsr( SwShellCrsr& );
+ virtual ~SwShellCrsr();
+
+ void Show(); // Update und zeige alle Selektionen an
+ void Hide(); // verstecke alle Selektionen
+ void Invalidate( const SwRect& rRect );
+
+ const Point& GetPtPos() const { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); }
+ Point& GetPtPos() { return( SwPaM::GetPoint() == pPt ? aPtPt : aMkPt ); }
+ const Point& GetMkPos() const { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); }
+ Point& GetMkPos() { return( SwPaM::GetMark() == pPt ? aPtPt : aMkPt ); }
+ const Point& GetSttPos() const { return( SwPaM::Start() == pPt ? aPtPt : aMkPt ); }
+ Point& GetSttPos() { return( SwPaM::Start() == pPt ? aPtPt : aMkPt ); }
+ const Point& GetEndPos() const { return( SwPaM::End() == pPt ? aPtPt : aMkPt ); }
+ Point& GetEndPos() { return( SwPaM::End() == pPt ? aPtPt : aMkPt ); }
+
+ virtual void SetMark();
+
+ virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
+
+ virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
+ virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
+
+ BOOL UpDown( BOOL bUp, USHORT nCnt = 1 );
+
+ // TRUE: an die Position kann der Cursor gesetzt werden
+ virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+
+#ifdef DBG_UTIL
+// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
+// am sichtbaren Cursor
+ virtual BOOL IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+#endif
+
+ virtual bool IsReadOnlyAvailable() const;
+
+ DECL_FIXEDMEMPOOL_NEWDEL( SwShellCrsr )
+};
+
+
+
+class SwShellTableCrsr : public virtual SwShellCrsr, public virtual SwTableCursor
+{
+ // die Selection hat die gleiche Reihenfolge wie die
+ // TabellenBoxen. D.h., wird aus dem einen Array an einer Position
+ // etwas geloescht, dann muss es auch im anderen erfolgen!!
+
+
+public:
+ SwShellTableCrsr( const SwCrsrShell& rCrsrSh, const SwPosition& rPos );
+ SwShellTableCrsr( const SwCrsrShell& rCrsrSh,
+ const SwPosition &rMkPos, const Point& rMkPt,
+ const SwPosition &rPtPos, const Point& rPtPt );
+ virtual ~SwShellTableCrsr();
+
+ virtual void FillRects(); // fuer Table- und normalen Crsr
+
+ // Pruefe, ob sich der SPoint innerhalb der Tabellen-SSelection befindet
+ BOOL IsInside( const Point& rPt ) const;
+
+ virtual void SetMark();
+ virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
+
+ virtual short MaxReplaceArived(); //returns RET_YES/RET_CANCEL/RET_NO
+ virtual void SaveTblBoxCntnt( const SwPosition* pPos = 0 );
+
+ // TRUE: an die Position kann der Cursor gesetzt werden
+ virtual BOOL IsAtValidPos( BOOL bPoint = TRUE ) const;
+
+#ifdef DBG_UTIL
+// JP 05.03.98: zum Testen des UNO-Crsr Verhaltens hier die Implementierung
+// am sichtbaren Cursor
+ virtual BOOL IsSelOvr( int eFlags =
+ ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
+ nsSwCursorSelOverFlags::SELOVER_TOGGLE |
+ nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ));
+#endif
+};
+
+
+
+#endif // _VISCRS_HXX
diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx
new file mode 100644
index 000000000000..fe066a6b010c
--- /dev/null
+++ b/sw/inc/wdocsh.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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 _SWWDOCSH_HXX
+#define _SWWDOCSH_HXX
+#include "swdllapi.h"
+#include "docsh.hxx"
+#include <swdll.hxx>
+
+class SW_DLLPUBLIC SwWebDocShell: public SwDocShell
+{
+ USHORT nSourcePara; // aktive Zeile in der SourceView
+
+public:
+
+ using SotObject::GetInterface;
+
+ // aber selbst implementieren
+ SFX_DECL_INTERFACE(SW_WEBDOCSHELL)
+ SFX_DECL_OBJECTFACTORY();
+ TYPEINFO();
+
+ SwWebDocShell(SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED);
+ ~SwWebDocShell();
+
+ virtual void FillClass( SvGlobalName * pClassName,
+ sal_uInt32 * pClipFormat,
+ String * pAppName,
+ String * pLongUserName,
+ String * pUserName,
+ sal_Int32 nFileFormat,
+ sal_Bool bTemplate = sal_False ) const;
+ USHORT GetSourcePara()const
+ {return nSourcePara;}
+ void SetSourcePara(USHORT nSet) {nSourcePara = nSet;}
+};
+
+#endif
+
+