summaryrefslogtreecommitdiff
path: root/sw/source/core/uibase/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/uibase/inc')
-rw-r--r--sw/source/core/uibase/inc/DashedLine.hxx30
-rw-r--r--sw/source/core/uibase/inc/DropDownFieldDialog.hxx58
-rw-r--r--sw/source/core/uibase/inc/FrameControl.hxx53
-rw-r--r--sw/source/core/uibase/inc/FrameControlsManager.hxx56
-rw-r--r--sw/source/core/uibase/inc/HeaderFooterWin.hxx58
-rw-r--r--sw/source/core/uibase/inc/PageBreakWin.hxx63
-rw-r--r--sw/source/core/uibase/inc/SidebarWindowsConsts.hxx31
-rw-r--r--sw/source/core/uibase/inc/SwSpellDialogChildWindow.hxx67
-rw-r--r--sw/source/core/uibase/inc/SwXFilterOptions.hxx101
-rw-r--r--sw/source/core/uibase/inc/abstract.hxx42
-rw-r--r--sw/source/core/uibase/inc/actctrl.hxx92
-rw-r--r--sw/source/core/uibase/inc/addrdlg.hxx32
-rw-r--r--sw/source/core/uibase/inc/annotsh.hxx74
-rw-r--r--sw/source/core/uibase/inc/app.hrc118
-rw-r--r--sw/source/core/uibase/inc/ascfldlg.hxx62
-rw-r--r--sw/source/core/uibase/inc/autoedit.hxx37
-rw-r--r--sw/source/core/uibase/inc/barcfg.hxx41
-rw-r--r--sw/source/core/uibase/inc/basesh.hxx115
-rw-r--r--sw/source/core/uibase/inc/beziersh.hxx38
-rw-r--r--sw/source/core/uibase/inc/bmpwin.hxx56
-rw-r--r--sw/source/core/uibase/inc/bookctrl.hxx47
-rw-r--r--sw/source/core/uibase/inc/bookmark.hxx70
-rw-r--r--sw/source/core/uibase/inc/break.hxx75
-rw-r--r--sw/source/core/uibase/inc/caption.hxx98
-rw-r--r--sw/source/core/uibase/inc/cfgid.h28
-rw-r--r--sw/source/core/uibase/inc/cfgitems.hxx221
-rw-r--r--sw/source/core/uibase/inc/changedb.hxx68
-rw-r--r--sw/source/core/uibase/inc/chartins.hxx27
-rw-r--r--sw/source/core/uibase/inc/chldwrap.hxx47
-rw-r--r--sw/source/core/uibase/inc/chrdlg.hxx94
-rw-r--r--sw/source/core/uibase/inc/chrdlgmodes.hxx21
-rw-r--r--sw/source/core/uibase/inc/cnttab.hxx88
-rw-r--r--sw/source/core/uibase/inc/colex.hxx109
-rw-r--r--sw/source/core/uibase/inc/colmgr.hxx127
-rw-r--r--sw/source/core/uibase/inc/column.hxx206
-rw-r--r--sw/source/core/uibase/inc/conarc.hxx48
-rw-r--r--sw/source/core/uibase/inc/concustomshape.hxx63
-rw-r--r--sw/source/core/uibase/inc/condedit.hxx49
-rw-r--r--sw/source/core/uibase/inc/conform.hxx38
-rw-r--r--sw/source/core/uibase/inc/conpoly.hxx47
-rw-r--r--sw/source/core/uibase/inc/conrect.hxx51
-rw-r--r--sw/source/core/uibase/inc/content.hxx208
-rw-r--r--sw/source/core/uibase/inc/conttree.hxx329
-rw-r--r--sw/source/core/uibase/inc/convert.hxx74
-rw-r--r--sw/source/core/uibase/inc/cption.hxx113
-rw-r--r--sw/source/core/uibase/inc/dbconfig.hxx47
-rw-r--r--sw/source/core/uibase/inc/dbinsdlg.hxx171
-rw-r--r--sw/source/core/uibase/inc/dbtree.hxx72
-rw-r--r--sw/source/core/uibase/inc/dbui.hxx70
-rw-r--r--sw/source/core/uibase/inc/dialmgr.hxx31
-rw-r--r--sw/source/core/uibase/inc/docfnote.hxx44
-rw-r--r--sw/source/core/uibase/inc/docstdlg.hxx70
-rw-r--r--sw/source/core/uibase/inc/drawbase.hxx79
-rw-r--r--sw/source/core/uibase/inc/drawsh.hxx50
-rw-r--r--sw/source/core/uibase/inc/drformsh.hxx41
-rw-r--r--sw/source/core/uibase/inc/drpcps.hxx103
-rw-r--r--sw/source/core/uibase/inc/drwbassh.hxx56
-rw-r--r--sw/source/core/uibase/inc/drwtxtsh.hxx80
-rw-r--r--sw/source/core/uibase/inc/dselect.hxx43
-rw-r--r--sw/source/core/uibase/inc/edtwin.hxx302
-rw-r--r--sw/source/core/uibase/inc/envimg.hxx91
-rw-r--r--sw/source/core/uibase/inc/envlop.hxx122
-rw-r--r--sw/source/core/uibase/inc/fldedt.hxx55
-rw-r--r--sw/source/core/uibase/inc/fldmgr.hxx217
-rw-r--r--sw/source/core/uibase/inc/fldtdlg.hxx66
-rw-r--r--sw/source/core/uibase/inc/fldwrap.hxx56
-rw-r--r--sw/source/core/uibase/inc/fontcfg.hxx112
-rw-r--r--sw/source/core/uibase/inc/formatclipboard.hxx95
-rw-r--r--sw/source/core/uibase/inc/formedt.hxx92
-rw-r--r--sw/source/core/uibase/inc/frmdlg.hxx68
-rw-r--r--sw/source/core/uibase/inc/frmmgr.hxx188
-rw-r--r--sw/source/core/uibase/inc/frmpage.hxx328
-rw-r--r--sw/source/core/uibase/inc/frmsh.hxx44
-rw-r--r--sw/source/core/uibase/inc/frmui.hrc71
-rw-r--r--sw/source/core/uibase/inc/globals.h31
-rw-r--r--sw/source/core/uibase/inc/globdoc.hrc44
-rw-r--r--sw/source/core/uibase/inc/glosbib.hxx116
-rw-r--r--sw/source/core/uibase/inc/glosdoc.hxx135
-rw-r--r--sw/source/core/uibase/inc/gloshdl.hxx104
-rw-r--r--sw/source/core/uibase/inc/gloslst.hxx82
-rw-r--r--sw/source/core/uibase/inc/glossary.hxx168
-rw-r--r--sw/source/core/uibase/inc/glshell.hxx85
-rw-r--r--sw/source/core/uibase/inc/grfsh.hxx41
-rw-r--r--sw/source/core/uibase/inc/hyp.hxx58
-rw-r--r--sw/source/core/uibase/inc/idxmrk.hxx60
-rw-r--r--sw/source/core/uibase/inc/imaildsplistener.hxx70
-rw-r--r--sw/source/core/uibase/inc/initui.hxx66
-rw-r--r--sw/source/core/uibase/inc/inpdlg.hxx63
-rw-r--r--sw/source/core/uibase/inc/inputwin.hxx119
-rw-r--r--sw/source/core/uibase/inc/insfnote.hxx85
-rw-r--r--sw/source/core/uibase/inc/instable.hxx76
-rw-r--r--sw/source/core/uibase/inc/javaedit.hxx88
-rw-r--r--sw/source/core/uibase/inc/label.hxx93
-rw-r--r--sw/source/core/uibase/inc/labelcfg.hxx61
-rw-r--r--sw/source/core/uibase/inc/labimg.hxx125
-rw-r--r--sw/source/core/uibase/inc/langhelper.hxx62
-rw-r--r--sw/source/core/uibase/inc/linenum.hxx64
-rw-r--r--sw/source/core/uibase/inc/listsh.hxx38
-rw-r--r--sw/source/core/uibase/inc/macassgn.hxx47
-rw-r--r--sw/source/core/uibase/inc/mailconfigpage.hxx77
-rw-r--r--sw/source/core/uibase/inc/maildispatcher.hxx154
-rw-r--r--sw/source/core/uibase/inc/mailmergechildwindow.hxx52
-rw-r--r--sw/source/core/uibase/inc/mailmergehelper.hxx310
-rw-r--r--sw/source/core/uibase/inc/mailmergewizard.hxx97
-rw-r--r--sw/source/core/uibase/inc/mailmrge.hxx176
-rw-r--r--sw/source/core/uibase/inc/mediash.hxx37
-rw-r--r--sw/source/core/uibase/inc/mergetbl.hxx41
-rw-r--r--sw/source/core/uibase/inc/misc.hrc60
-rw-r--r--sw/source/core/uibase/inc/mmconfigitem.hxx270
-rw-r--r--sw/source/core/uibase/inc/multmrk.hxx53
-rw-r--r--sw/source/core/uibase/inc/navicfg.hxx109
-rw-r--r--sw/source/core/uibase/inc/navicont.hxx54
-rw-r--r--sw/source/core/uibase/inc/navipi.hxx186
-rw-r--r--sw/source/core/uibase/inc/navmgr.hxx56
-rw-r--r--sw/source/core/uibase/inc/navsh.hxx28
-rw-r--r--sw/source/core/uibase/inc/num.hxx166
-rw-r--r--sw/source/core/uibase/inc/numberingtypelistbox.hxx51
-rw-r--r--sw/source/core/uibase/inc/numfmtlb.hxx73
-rw-r--r--sw/source/core/uibase/inc/numpara.hxx86
-rw-r--r--sw/source/core/uibase/inc/numprevw.hxx71
-rw-r--r--sw/source/core/uibase/inc/olesh.hxx35
-rw-r--r--sw/source/core/uibase/inc/olmenu.hxx91
-rw-r--r--sw/source/core/uibase/inc/optcomp.hxx75
-rw-r--r--sw/source/core/uibase/inc/optload.hxx175
-rw-r--r--sw/source/core/uibase/inc/optpage.hxx439
-rw-r--r--sw/source/core/uibase/inc/outline.hxx138
-rw-r--r--sw/source/core/uibase/inc/pardlg.hxx30
-rw-r--r--sw/source/core/uibase/inc/pattern.hxx36
-rw-r--r--sw/source/core/uibase/inc/pgfnote.hxx77
-rw-r--r--sw/source/core/uibase/inc/pggrid.hxx101
-rw-r--r--sw/source/core/uibase/inc/popbox.hxx57
-rw-r--r--sw/source/core/uibase/inc/popup.hrc49
-rw-r--r--sw/source/core/uibase/inc/prcntfld.hxx111
-rw-r--r--sw/source/core/uibase/inc/pview.hxx301
-rw-r--r--sw/source/core/uibase/inc/redline_tmpl.hrc39
-rw-r--r--sw/source/core/uibase/inc/redlndlg.hxx162
-rw-r--r--sw/source/core/uibase/inc/regionsw.hxx303
-rw-r--r--sw/source/core/uibase/inc/ribbar.hrc104
-rw-r--r--sw/source/core/uibase/inc/rowht.hxx44
-rw-r--r--sw/source/core/uibase/inc/scroll.hxx59
-rw-r--r--sw/source/core/uibase/inc/selglos.hxx54
-rw-r--r--sw/source/core/uibase/inc/sharedconnection.hxx30
-rw-r--r--sw/source/core/uibase/inc/shdwcrsr.hxx57
-rw-r--r--sw/source/core/uibase/inc/shells.hrc100
-rw-r--r--sw/source/core/uibase/inc/splittbl.hxx49
-rw-r--r--sw/source/core/uibase/inc/srcedtw.hxx157
-rw-r--r--sw/source/core/uibase/inc/srcview.hxx89
-rw-r--r--sw/source/core/uibase/inc/srtdlg.hxx92
-rw-r--r--sw/source/core/uibase/inc/stmenu.hxx74
-rw-r--r--sw/source/core/uibase/inc/swcont.hxx99
-rw-r--r--sw/source/core/uibase/inc/swdtflvr.hxx213
-rw-r--r--sw/source/core/uibase/inc/swlbox.hxx86
-rw-r--r--sw/source/core/uibase/inc/swmessdialog.hxx30
-rw-r--r--sw/source/core/uibase/inc/swmodalredlineacceptdlg.hxx40
-rw-r--r--sw/source/core/uibase/inc/swrenamexnameddlg.hxx69
-rw-r--r--sw/source/core/uibase/inc/swruler.hxx122
-rw-r--r--sw/source/core/uibase/inc/swtablerep.hxx84
-rw-r--r--sw/source/core/uibase/inc/swuiccoll.hxx75
-rw-r--r--sw/source/core/uibase/inc/swuicnttab.hxx497
-rw-r--r--sw/source/core/uibase/inc/swuiidxmrk.hxx253
-rw-r--r--sw/source/core/uibase/inc/swuipardlg.hxx53
-rw-r--r--sw/source/core/uibase/inc/swvset.hxx32
-rw-r--r--sw/source/core/uibase/inc/swwrtshitem.hxx45
-rw-r--r--sw/source/core/uibase/inc/syncbtn.hxx53
-rw-r--r--sw/source/core/uibase/inc/table.hrc37
-rw-r--r--sw/source/core/uibase/inc/tabledlg.hxx49
-rw-r--r--sw/source/core/uibase/inc/tablemgr.hxx88
-rw-r--r--sw/source/core/uibase/inc/tabsh.hxx52
-rw-r--r--sw/source/core/uibase/inc/tautofmt.hxx91
-rw-r--r--sw/source/core/uibase/inc/tblctrl.hxx40
-rw-r--r--sw/source/core/uibase/inc/tblnumfm.hxx35
-rw-r--r--sw/source/core/uibase/inc/tbxanchr.hxx42
-rw-r--r--sw/source/core/uibase/inc/textsh.hxx83
-rw-r--r--sw/source/core/uibase/inc/titlepage.hxx70
-rw-r--r--sw/source/core/uibase/inc/tmpdlg.hxx89
-rw-r--r--sw/source/core/uibase/inc/tmplctrl.hxx45
-rw-r--r--sw/source/core/uibase/inc/toolbox.hrc553
-rw-r--r--sw/source/core/uibase/inc/toxmgr.hxx310
-rw-r--r--sw/source/core/uibase/inc/uiborder.hxx41
-rw-r--r--sw/source/core/uibase/inc/uiitems.hxx119
-rw-r--r--sw/source/core/uibase/inc/uinums.hxx123
-rw-r--r--sw/source/core/uibase/inc/uitool.hxx109
-rw-r--r--sw/source/core/uibase/inc/uivwimp.hxx173
-rw-r--r--sw/source/core/uibase/inc/unoatxt.hxx283
-rw-r--r--sw/source/core/uibase/inc/unodispatch.hxx128
-rw-r--r--sw/source/core/uibase/inc/unomailmerge.hxx191
-rw-r--r--sw/source/core/uibase/inc/unomod.hxx161
-rw-r--r--sw/source/core/uibase/inc/unotools.hxx121
-rw-r--r--sw/source/core/uibase/inc/unotxvw.hxx338
-rw-r--r--sw/source/core/uibase/inc/usrpref.hxx276
-rw-r--r--sw/source/core/uibase/inc/utlui.hrc189
-rw-r--r--sw/source/core/uibase/inc/view.hxx689
-rw-r--r--sw/source/core/uibase/inc/viewlayoutctrl.hxx46
-rw-r--r--sw/source/core/uibase/inc/web.hrc47
-rw-r--r--sw/source/core/uibase/inc/wformsh.hxx36
-rw-r--r--sw/source/core/uibase/inc/wfrmsh.hxx38
-rw-r--r--sw/source/core/uibase/inc/wgrfsh.hxx36
-rw-r--r--sw/source/core/uibase/inc/wlistsh.hxx36
-rw-r--r--sw/source/core/uibase/inc/wolesh.hxx35
-rw-r--r--sw/source/core/uibase/inc/wordcountctrl.hxx33
-rw-r--r--sw/source/core/uibase/inc/wordcountdialog.hxx79
-rw-r--r--sw/source/core/uibase/inc/workctrl.hxx185
-rw-r--r--sw/source/core/uibase/inc/wrap.hxx117
-rw-r--r--sw/source/core/uibase/inc/wrtsh.hxx646
-rw-r--r--sw/source/core/uibase/inc/wtabsh.hxx36
-rw-r--r--sw/source/core/uibase/inc/wtextsh.hxx38
-rw-r--r--sw/source/core/uibase/inc/wview.hxx41
-rw-r--r--sw/source/core/uibase/inc/zoomctrl.hxx43
208 files changed, 21518 insertions, 0 deletions
diff --git a/sw/source/core/uibase/inc/DashedLine.hxx b/sw/source/core/uibase/inc/DashedLine.hxx
new file mode 100644
index 000000000000..14ea2ef2507d
--- /dev/null
+++ b/sw/source/core/uibase/inc/DashedLine.hxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DASHEDLINE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DASHEDLINE_HXX
+
+#include <basegfx/color/bcolor.hxx>
+#include <vcl/fixed.hxx>
+
+/** Class for displaying a dashed line in the Writer GUI.
+ */
+class SwDashedLine : public FixedLine
+{
+ Color& (*m_pColorFn)();
+
+public:
+ SwDashedLine( Window* pParent, Color& ( *pColorFn )() );
+ ~SwDashedLine( );
+
+ virtual void Paint( const Rectangle& rRect );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/DropDownFieldDialog.hxx b/sw/source/core/uibase/inc/DropDownFieldDialog.hxx
new file mode 100644
index 000000000000..48ee686e8fe6
--- /dev/null
+++ b/sw/source/core/uibase/inc/DropDownFieldDialog.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DROPDOWNFIELDDIALOG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DROPDOWNFIELDDIALOG_HXX
+
+#include <svx/stddlg.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/button.hxx>
+
+class SwDropDownField;
+class SwField;
+class SwWrtShell;
+
+/*--------------------------------------------------------------------
+ Dialog to edit drop down field selection
+ --------------------------------------------------------------------*/
+namespace sw
+{
+class DropDownFieldDialog : public SvxStandardDialog
+{
+ ListBox* m_pListItemsLB;
+
+ OKButton* m_pOKPB;
+ PushButton* m_pNextPB;
+
+ PushButton* m_pEditPB;
+
+ SwWrtShell &rSh;
+ SwDropDownField* pDropField;
+
+ DECL_LINK(ButtonHdl, PushButton*);
+ virtual void Apply();
+public:
+ DropDownFieldDialog( Window *pParent, SwWrtShell &rSh,
+ SwField* pField, sal_Bool bNextButton = sal_False );
+};
+} //namespace sw
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/FrameControl.hxx b/sw/source/core/uibase/inc/FrameControl.hxx
new file mode 100644
index 000000000000..f976efbb31c5
--- /dev/null
+++ b/sw/source/core/uibase/inc/FrameControl.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FRAMECONTROL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FRAMECONTROL_HXX
+
+class SwEditWin;
+class SwFrm;
+class Point;
+
+/** Class representing a control linked to a SwFrm.
+ */
+class SwFrameControl
+{
+ SwEditWin* m_pEditWin;
+ const SwFrm* m_pFrm;
+
+public:
+ SwFrameControl( SwEditWin* pEditWin, const SwFrm* pFrm ) :
+ m_pEditWin( pEditWin ), m_pFrm( pFrm ) {};
+ virtual ~SwFrameControl( ) {};
+
+ SwFrameControl( const SwFrameControl& rCopy ) :
+ m_pEditWin( rCopy.m_pEditWin ),
+ m_pFrm( rCopy.m_pFrm )
+ {
+ }
+
+ const SwFrameControl& operator=( const SwFrameControl& rCopy )
+ {
+ m_pEditWin = rCopy.m_pEditWin;
+ m_pFrm = rCopy.m_pFrm;
+ return *this;
+ }
+
+ const SwFrm* GetFrame( ) { return m_pFrm; }
+ SwEditWin* GetEditWin( ) { return m_pEditWin; }
+
+ virtual void SetReadonly( bool bReadonly ) = 0;
+ virtual void ShowAll( bool bShow ) = 0;
+
+ /// Returns true if the point is inside the control.
+ virtual bool Contains( const Point &rDocPt ) const = 0;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/FrameControlsManager.hxx b/sw/source/core/uibase/inc/FrameControlsManager.hxx
new file mode 100644
index 000000000000..a9824c953b60
--- /dev/null
+++ b/sw/source/core/uibase/inc/FrameControlsManager.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FRAMECONTROLSMANAGER_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FRAMECONTROLSMANAGER_HXX
+
+#include <viewsh.hxx>
+#include <FrameControl.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <tools/gen.hxx>
+
+#include <map>
+#include <vector>
+
+class SwPageFrm;
+class SwEditWin;
+
+typedef boost::shared_ptr< SwFrameControl > SwFrameControlPtr;
+
+typedef std::map<const SwFrm*, SwFrameControlPtr> SwFrameControlPtrMap;
+
+/** A container for the Header/Footer, or PageBreak controls.
+*/
+class SwFrameControlsManager
+{
+ private:
+ SwEditWin* m_pEditWin;
+ std::map< FrameControlType, SwFrameControlPtrMap > m_aControls;
+
+ public:
+ SwFrameControlsManager( SwEditWin* pEditWin );
+ ~SwFrameControlsManager( );
+
+ SwFrameControlsManager( const SwFrameControlsManager& rCopy );
+ const SwFrameControlsManager& operator=( const SwFrameControlsManager& rCopy );
+
+ SwFrameControlPtr GetControl( FrameControlType eType, const SwFrm* pFrm );
+ void RemoveControls( const SwFrm* pFrm );
+ void RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm );
+ void HideControls( FrameControlType eType );
+ void SetReadonlyControls( bool bReadonly );
+
+ // Helper methods
+ void SetHeaderFooterControl( const SwPageFrm* pPageFrm, FrameControlType eType, Point aOffset );
+ void SetPageBreakControl( const SwPageFrm* pPageFrm );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/HeaderFooterWin.hxx b/sw/source/core/uibase/inc/HeaderFooterWin.hxx
new file mode 100644
index 000000000000..945d02de07e6
--- /dev/null
+++ b/sw/source/core/uibase/inc/HeaderFooterWin.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_HEADERFOOTERWIN_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_HEADERFOOTERWIN_HXX
+
+#include <FrameControl.hxx>
+
+#include <vcl/menubtn.hxx>
+
+/** Class for the header and footer separator control window.
+
+ This control is showing the header / footer style name and provides
+ a few useful actions to the user.
+ */
+class SwHeaderFooterWin : public MenuButton, public SwFrameControl
+{
+ OUString m_sLabel;
+ bool m_bIsHeader;
+ PopupMenu* m_pPopupMenu;
+ Window* m_pLine;
+ bool m_bIsAppearing;
+ int m_nFadeRate;
+ Timer m_aFadeTimer;
+
+public:
+ SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm, bool bHeader );
+ ~SwHeaderFooterWin( );
+
+ void SetOffset( Point aOffset, long nXLineStart, long nXLineEnd );
+
+ virtual void Paint( const Rectangle& rRect );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void Select( );
+
+ virtual void ShowAll( bool bShow );
+ virtual bool Contains( const Point &rDocPt ) const;
+
+ bool IsHeader() { return m_bIsHeader; };
+ bool IsEmptyHeaderFooter( );
+ const SwPageFrm* GetPageFrame( );
+
+ void ExecuteCommand(sal_uInt16 nSlot);
+
+ void SetReadonly( bool bReadonly );
+
+private:
+ DECL_LINK( FadeHandler, void * );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/PageBreakWin.hxx b/sw/source/core/uibase/inc/PageBreakWin.hxx
new file mode 100644
index 000000000000..9e9ed283b182
--- /dev/null
+++ b/sw/source/core/uibase/inc/PageBreakWin.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_PAGEBREAKWIN_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_PAGEBREAKWIN_HXX
+
+#include <FrameControl.hxx>
+
+#include <vcl/menubtn.hxx>
+
+class SwPageFrm;
+
+/** Class for the page break control window.
+
+ This control shows a line indicating a manual page break and a
+ button providing a few actions on that page break.
+ */
+class SwPageBreakWin : public MenuButton, public SwFrameControl
+{
+ PopupMenu* m_pPopupMenu;
+ Window* m_pLine;
+ bool m_bIsAppearing;
+ int m_nFadeRate;
+ int m_nDelayAppearing; ///< Before we show the control, let it transparent for a few timer ticks to avoid appearing with every mouse over.
+ Timer m_aFadeTimer;
+ bool m_bDestroyed;
+
+ const Point* m_pMousePt;
+
+public:
+ SwPageBreakWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm );
+ ~SwPageBreakWin( );
+
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Select( );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void Activate( );
+
+ void UpdatePosition( const Point* pEvtPt = NULL );
+
+ virtual void ShowAll( bool bShow );
+ virtual bool Contains( const Point &rDocPt ) const;
+
+ const SwPageFrm* GetPageFrame( );
+
+ void SetReadonly( bool bReadonly );
+
+ void Fade( bool bFadeIn );
+
+private:
+ /// Hide the button (used when the popup menu is closed by clicking outside)
+ DECL_LINK( HideHandler, void * );
+ DECL_LINK( FadeHandler, void * );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/SidebarWindowsConsts.hxx b/sw/source/core/uibase/inc/SidebarWindowsConsts.hxx
new file mode 100644
index 000000000000..c2ed68276da5
--- /dev/null
+++ b/sw/source/core/uibase/inc/SidebarWindowsConsts.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SIDEBARWINDOWSCONSTS_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SIDEBARWINDOWSCONSTS_HXX
+
+namespace sw { namespace sidebarwindows {
+
+const sal_Int8 ANCHORLINE_WIDTH = 1;
+
+} } // end of namespace sw::sidebarwindows
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/SwSpellDialogChildWindow.hxx b/sw/source/core/uibase/inc/SwSpellDialogChildWindow.hxx
new file mode 100644
index 000000000000..922841304721
--- /dev/null
+++ b/sw/source/core/uibase/inc/SwSpellDialogChildWindow.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWSPELLDIALOGCHILDWINDOW_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWSPELLDIALOGCHILDWINDOW_HXX
+
+#include <svx/SpellDialogChildWindow.hxx>
+#include <view.hxx>
+
+class SwWrtShell;
+struct SpellState;
+class SwSpellDialogChildWindow
+ : public ::svx::SpellDialogChildWindow
+{
+ bool m_bIsGrammarCheckingOn;
+ SpellState* m_pSpellState;
+
+ SwWrtShell* GetWrtShell_Impl();
+ bool MakeTextSelection_Impl(SwWrtShell& rSh, ShellModes eSelMode);
+ bool FindNextDrawTextError_Impl(SwWrtShell& rSh);
+ bool SpellDrawText_Impl(SwWrtShell& rSh, ::svx::SpellPortions& rPortions);
+ void LockFocusNotification(bool bLock);
+
+protected:
+ virtual svx::SpellPortions GetNextWrongSentence(bool bRecheck);
+ virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck);
+ virtual void AddAutoCorrection(const OUString& rOld, const OUString& rNew, LanguageType eLanguage);
+ virtual bool HasAutoCorrection();
+ virtual bool HasGrammarChecking();
+ virtual bool IsGrammarChecking();
+ virtual void SetGrammarChecking(bool bOn);
+ virtual void GetFocus();
+ virtual void LoseFocus();
+
+public:
+ SwSpellDialogChildWindow (
+ Window*pParent,
+ sal_uInt16 nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo);
+ ~SwSpellDialogChildWindow();
+
+ SFX_DECL_CHILDWINDOW_WITHID(SwSpellDialogChildWindow);
+
+ void InvalidateSpellDialog();
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/SwXFilterOptions.hxx b/sw/source/core/uibase/inc/SwXFilterOptions.hxx
new file mode 100644
index 000000000000..8e39c494f529
--- /dev/null
+++ b/sw/source/core/uibase/inc/SwXFilterOptions.hxx
@@ -0,0 +1,101 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWXFILTEROPTIONS_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWXFILTEROPTIONS_HXX
+
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/document/XImporter.hpp>
+#include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/implbase5.hxx>
+
+namespace com { namespace sun { namespace star { namespace io {
+ class XInputStream;
+} } } }
+
+class SwXFilterOptions : public ::cppu::WeakImplHelper5<
+ ::com::sun::star::beans::XPropertyAccess,
+ ::com::sun::star::ui::dialogs::XExecutableDialog,
+ ::com::sun::star::document::XImporter,
+ ::com::sun::star::document::XExporter,
+ ::com::sun::star::lang::XServiceInfo >
+{
+ OUString sFilterName;
+ OUString sFilterOptions;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::io::XInputStream > xInputStream;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XComponent > xModel;
+ sal_Bool bExport;
+
+public:
+ SwXFilterOptions();
+ virtual ~SwXFilterOptions();
+
+ static OUString getImplementationName_Static();
+ static ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_Static();
+
+ // XPropertyAccess
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
+ SAL_CALL getPropertyValues() throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& aProps )
+ 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, std::exception);
+
+ // XExecutableDialog
+ virtual void SAL_CALL setTitle( const OUString& aTitle )
+ throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual sal_Int16 SAL_CALL execute() throw (::com::sun::star::uno::RuntimeException, std::exception);
+
+ // XImporter
+ virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XComponent >& xDoc )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException, std::exception);
+
+ // XExporter
+ virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XComponent >& xDoc )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException, std::exception);
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName()
+ throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
+ throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
+ throw(::com::sun::star::uno::RuntimeException, std::exception);
+
+};
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ SwXFilterOptions_createInstance(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory >& );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/abstract.hxx b/sw/source/core/uibase/inc/abstract.hxx
new file mode 100644
index 000000000000..e6c80037e57b
--- /dev/null
+++ b/sw/source/core/uibase/inc/abstract.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_ABSTRACT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_ABSTRACT_HXX
+
+#include <sfx2/basedlgs.hxx>
+
+#include <vcl/field.hxx>
+
+class SwInsertAbstractDlg : public SfxModalDialog
+{
+ NumericField* m_pLevelNF;
+ NumericField* m_pParaNF;
+
+protected:
+
+public:
+ SwInsertAbstractDlg( Window* pParent );
+
+ sal_uInt8 GetLevel() const;
+ sal_uInt8 GetPara() const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/actctrl.hxx b/sw/source/core/uibase/inc/actctrl.hxx
new file mode 100644
index 000000000000..0111eb1de37d
--- /dev/null
+++ b/sw/source/core/uibase/inc/actctrl.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_ACTCTRL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_ACTCTRL_HXX
+
+#include <vcl/field.hxx>
+#include "swdllapi.h"
+
+/*--------------------------------------------------------------------
+ Description: numerical input
+ --------------------------------------------------------------------*/
+class SW_DLLPUBLIC NumEditAction: public NumericField
+{
+ Link aActionLink;
+
+protected:
+ virtual void Action();
+ virtual bool Notify( NotifyEvent& rNEvt );
+public:
+ NumEditAction( Window* pParent, const ResId& rResId ) :
+ NumericField(pParent, rResId) {}
+
+ void SetActionHdl( const Link& rLink ) { aActionLink = rLink;}
+ const Link& GetActionHdl() const { return aActionLink; }
+};
+
+/* --------------------------------------------------
+ * Edit that doesn't accept spaces
+ * --------------------------------------------------*/
+class SW_DLLPUBLIC NoSpaceEdit : public Edit
+{
+ OUString sForbiddenChars;
+protected:
+ virtual void KeyInput( const KeyEvent& );
+ virtual void Modify();
+
+public:
+ NoSpaceEdit( Window* pParent );
+ virtual ~NoSpaceEdit();
+ void SetForbiddenChars(const OUString& rSet){sForbiddenChars = rSet;}
+ const OUString& GetForbiddenChars(){return sForbiddenChars;}
+};
+
+/* --------------------------------------------------
+ * No space and no full stop
+ * --------------------------------------------------*/
+class TableNameEdit : public NoSpaceEdit
+{
+public:
+ TableNameEdit(Window* pWin)
+ : NoSpaceEdit(pWin)
+ {
+ SetForbiddenChars(OUString(" .<>"));
+ }
+};
+
+/* --------------------------------------------------
+ call a link when KEY_RETURN is pressed
+ --------------------------------------------------*/
+class SW_DLLPUBLIC ReturnActionEdit : public Edit
+{
+ Link aReturnActionLink;
+public:
+ ReturnActionEdit(Window* pParent, const ResId& rResId);
+ ReturnActionEdit(Window* pParent, WinBits nStyle)
+ : Edit(pParent, nStyle){}
+ ~ReturnActionEdit();
+ virtual void KeyInput( const KeyEvent& );
+
+ void SetReturnActionLink(const Link& rLink)
+ { aReturnActionLink = rLink;}
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/addrdlg.hxx b/sw/source/core/uibase/inc/addrdlg.hxx
new file mode 100644
index 000000000000..14a1f0d9929f
--- /dev/null
+++ b/sw/source/core/uibase/inc/addrdlg.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_ADDRDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_ADDRDLG_HXX
+
+#include <sfx2/basedlgs.hxx>
+
+class SwAddrDlg : public SfxSingleTabDialog
+{
+public:
+ SwAddrDlg(Window* pParent, const SfxItemSet& rSet);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/annotsh.hxx b/sw/source/core/uibase/inc/annotsh.hxx
new file mode 100644
index 000000000000..7592d441b29a
--- /dev/null
+++ b/sw/source/core/uibase/inc/annotsh.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_ANNOTSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_ANNOTSH_HXX
+
+#include <sfx2/shell.hxx>
+#include "shellid.hxx"
+#include "swmodule.hxx"
+#include <unotools/caserotate.hxx>
+
+class SwView;
+class SwAnnotationShell: public SfxShell
+{
+ SwView& rView;
+ RotateTransliteration m_aRotateCase;
+
+public:
+ SFX_DECL_INTERFACE(SW_ANNOTATIONSHELL)
+ TYPEINFO();
+
+ SwAnnotationShell(SwView&);
+ virtual ~SwAnnotationShell();
+
+ void StateDisableItems(SfxItemSet &);
+ void Exec(SfxRequest &);
+
+ void GetState(SfxItemSet &);
+ void StateInsert(SfxItemSet &rSet);
+
+ void NoteExec(SfxRequest &);
+ void GetNoteState(SfxItemSet &);
+
+ void ExecLingu(SfxRequest &rReq);
+ void GetLinguState(SfxItemSet &);
+
+ void ExecClpbrd(SfxRequest &rReq);
+ void StateClpbrd(SfxItemSet &rSet);
+
+ void ExecTransliteration(SfxRequest &);
+ void ExecRotateTransliteration(SfxRequest &);
+
+ void ExecUndo(SfxRequest &rReq);
+ void StateUndo(SfxItemSet &rSet);
+
+ void StateStatusLine(SfxItemSet &rSet);
+
+ void InsertSymbol(SfxRequest& rReq);
+
+ void ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False);
+ void StateSearch(SfxItemSet &);
+
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/app.hrc b/sw/source/core/uibase/inc/app.hrc
new file mode 100644
index 000000000000..c5ac3f54edfe
--- /dev/null
+++ b/sw/source/core/uibase/inc/app.hrc
@@ -0,0 +1,118 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _APP_HRC
+#define _APP_HRC
+
+#include "rcid.hrc"
+
+#define STR_CANTCREATE (RC_APP_BEGIN + 4)
+#define STR_CANTOPEN (RC_APP_BEGIN + 5)
+
+// For the interface because the RID_APP_BEGIN is now Desktop.
+#define RID_SW_NAME ( RC_APP_BEGIN + 8)
+
+
+#define STR_UNBENANNT (RC_APP_BEGIN + 13)
+#define STR_VERSION (RC_APP_BEGIN + 14)
+#define STR_PRINT_MERGE_MACRO (RC_APP_BEGIN + 15)
+#define STR_PAGE_COUNT_MACRO (RC_APP_BEGIN + 16)
+
+// Bitmap for the numbering style in organizer
+#define BMP_STYLES_FAMILY_NUM (RC_APP_BEGIN + 17)
+
+// Strings for regions in the configuration
+#define STR_PAGEOFFSET (RC_APP_BEGIN + 74)
+#define STR_PAGEBREAK (RC_APP_BEGIN + 75)
+#define STR_REDLINE_UNKNOWN_AUTHOR (RC_APP_BEGIN + 76)
+#define STR_WESTERN_FONT (RC_APP_BEGIN + 77)
+#define STR_CJK_FONT (RC_APP_BEGIN + 78)
+#define MSG_PRINT_AS_MERGE (RC_APP_BEGIN + 80)
+
+#define STR_ENV_TITLE (RC_APP_BEGIN + 91)
+#define STR_LAB_TITLE (RC_APP_BEGIN + 92)
+
+#define STR_HUMAN_SWDOC_NAME (RC_APP_BEGIN + 93)
+
+#define RID_SW_ERRHDL (RC_APP_BEGIN + 95)
+
+#define STR_FDLG_TEMPLATE_BUTTON (RC_APP_BEGIN + 1)
+#define STR_FDLG_TEMPLATE_NAME (RC_APP_BEGIN + 2)
+
+
+// Ids for all the PopUpMenues
+#define MN_FORMAT_STYLE (RC_APP_BEGIN + 17)
+#define MN_FORMAT_ALGN (RC_APP_BEGIN + 18)
+#define MN_FORMAT_LINESPACE (RC_APP_BEGIN + 19)
+#define MN_FORMAT_FRM_HORZ (RC_APP_BEGIN + 23)
+#define MN_CELL (RC_APP_BEGIN + 29)
+#define MN_WRAP (RC_APP_BEGIN + 38)
+#define MN_SUB_TBLROW (RC_APP_BEGIN + 39)
+#define MN_SUB_TBLCOL (RC_APP_BEGIN + 40)
+#define MN_SUB_ARRANGE (RC_APP_BEGIN + 46)
+
+#define MN_SUB_ALIGN (RC_APP_BEGIN + 50)
+
+#define STR_WRITER_DOCUMENT_FULLTYPE (RC_APP_BEGIN + 100)
+#define STR_CONVERT_TEXT_TABLE (RC_APP_BEGIN + 101)
+#define STR_ABSTRACT_TITLE (RC_APP_BEGIN + 102)
+#define STR_DONT_ASK_AGAIN (RC_APP_BEGIN + 103)
+#define STR_OUTLINE_NUMBERING (RC_APP_BEGIN + 104)
+#define STR_FDLG_OUTLINE_LEVEL (RC_APP_BEGIN + 105)
+#define STR_FDLG_STYLE (RC_APP_BEGIN + 106)
+
+// Status bar strings
+#define STR_STATUSBAR_WORDCOUNT_NO_SELECTION (RC_APP_BEGIN + 110)
+#define STR_STATUSBAR_WORDCOUNT (RC_APP_BEGIN + 111)
+
+#define STR_ADD_AUTOFORMAT_TITLE (RC_APP_BEGIN + 112)
+#define STR_ADD_AUTOFORMAT_LABEL (RC_APP_BEGIN + 113)
+#define STR_DEL_AUTOFORMAT_TITLE (RC_APP_BEGIN + 114)
+#define STR_DEL_AUTOFORMAT_MSG (RC_APP_BEGIN + 115)
+#define STR_RENAME_AUTOFORMAT_TITLE (RC_APP_BEGIN + 116)
+#define STR_BTN_AUTOFORMAT_CLOSE (RC_APP_BEGIN + 117)
+#define STR_INVALID_AUTOFORMAT_NAME (RC_APP_BEGIN + 118)
+#define STR_JAN (RC_APP_BEGIN + 119)
+#define STR_FEB (RC_APP_BEGIN + 120)
+#define STR_MAR (RC_APP_BEGIN + 121)
+#define STR_NORTH (RC_APP_BEGIN + 122)
+#define STR_MID (RC_APP_BEGIN + 123)
+#define STR_SOUTH (RC_APP_BEGIN + 124)
+#define STR_SUM (RC_APP_BEGIN + 125)
+#define STR_NUMERIC (RC_APP_BEGIN + 126)
+#define STR_COL (RC_APP_BEGIN + 127)
+#define STR_ROW (RC_APP_BEGIN + 128)
+#define STR_SIMPLE (RC_APP_BEGIN + 129)
+#define STR_AUTHMRK_EDIT (RC_APP_BEGIN + 130)
+#define STR_AUTHMRK_INSERT (RC_APP_BEGIN + 131)
+#define STR_CAPTION_TABLE (RC_APP_BEGIN + 133)
+#define STR_CAPTION_FRAME (RC_APP_BEGIN + 134)
+#define STR_CAPTION_GRAPHIC (RC_APP_BEGIN + 135)
+#define STR_CAPTION_OLE (RC_APP_BEGIN + 136)
+#define STR_CATEGORY_NONE (RC_APP_BEGIN + 137)
+
+#define APP_ACT_END STR_CATEGORY_NONE
+
+#if APP_ACT_END > RC_APP_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/ascfldlg.hxx b/sw/source/core/uibase/inc/ascfldlg.hxx
new file mode 100644
index 000000000000..040485fedc08
--- /dev/null
+++ b/sw/source/core/uibase/inc/ascfldlg.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_ASCFLDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_ASCFLDLG_HXX
+#include <vcl/fixed.hxx>
+
+#include <vcl/button.hxx>
+#include <vcl/lstbox.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <svx/txencbox.hxx>
+#include <svx/langbox.hxx>
+
+class SwAsciiOptions;
+class SvStream;
+class SwDocShell;
+
+class SwAsciiFilterDlg : public SfxModalDialog
+{
+ SvxTextEncodingBox* m_pCharSetLB;
+ FixedText* m_pFontFT;
+ ListBox* m_pFontLB;
+ FixedText* m_pLanguageFT;
+ SvxLanguageBox* m_pLanguageLB;
+ RadioButton* m_pCRLF_RB;
+ RadioButton* m_pCR_RB;
+ RadioButton* m_pLF_RB;
+ bool m_bSaveLineStatus;
+
+ DECL_LINK( CharSetSelHdl, SvxTextEncodingBox* );
+ DECL_LINK( LineEndHdl, RadioButton* );
+ void SetCRLF( LineEnd eEnd );
+ LineEnd GetCRLF() const;
+
+public:
+ // CTOR: for import - pStream is the inputstream
+ // for export - pStream must be 0
+ SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
+ SvStream* pStream );
+ virtual ~SwAsciiFilterDlg();
+
+ void FillOptions( SwAsciiOptions& rOptions );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/autoedit.hxx b/sw/source/core/uibase/inc/autoedit.hxx
new file mode 100644
index 000000000000..94d81b771527
--- /dev/null
+++ b/sw/source/core/uibase/inc/autoedit.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_AUTOEDIT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_AUTOEDIT_HXX
+
+#include <vcl/edit.hxx>
+
+class AutoEdit : public Edit
+{
+public:
+ AutoEdit( Window* pParent, ResId aResId ) : Edit( pParent, aResId ){}
+
+protected:
+ virtual void KeyInput( const KeyEvent& rEvent );
+};
+
+// Implementation in autocorr.cxx
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/barcfg.hxx b/sw/source/core/uibase/inc/barcfg.hxx
new file mode 100644
index 000000000000..f0e05c11dde9
--- /dev/null
+++ b/sw/source/core/uibase/inc/barcfg.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_BARCFG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_BARCFG_HXX
+#include <unotools/configitem.hxx>
+
+class SwToolbarConfigItem : public utl::ConfigItem
+{
+ sal_Int32 aTbxIdArray[5];
+
+ com::sun::star::uno::Sequence<OUString> GetPropertyNames();
+
+public:
+ SwToolbarConfigItem( bool bWeb );
+ ~SwToolbarConfigItem();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+
+ void SetTopToolbar( sal_Int32 nSelType, sal_Int32 nBarId );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/basesh.hxx b/sw/source/core/uibase/inc/basesh.hxx
new file mode 100644
index 000000000000..9875221d4c72
--- /dev/null
+++ b/sw/source/core/uibase/inc/basesh.hxx
@@ -0,0 +1,115 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_BASESH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_BASESH_HXX
+
+#include <shellid.hxx>
+
+#include <tools/link.hxx>
+#include <vcl/timer.hxx>
+#include <sfx2/module.hxx>
+#include <sfx2/shell.hxx>
+#include <viewopt.hxx>
+
+#include <mdiexp.hxx>
+#include <set>
+
+class SwWrtShell;
+class SwView;
+class SfxItemSet;
+
+struct DBTextStruct_Impl;
+class SwBaseShell: public SfxShell
+{
+ SwView &rView;
+
+ // DragMode
+ static FlyMode eFrameMode;
+
+ // Bug 75078 - if in GetState the asynch call of GetGraphic returns
+ // synch, the set the state directly into the itemset
+ SfxItemSet* pGetStateSet;
+
+ // Update-Timer for graphic
+ std::set<sal_uInt16> aGrfUpdateSlots;
+
+ DECL_LINK( GraphicArrivedHdl, void* );
+
+protected:
+ SwWrtShell& GetShell();
+ SwWrtShell* GetShellPtr();
+
+ inline SwView& GetView() { return rView; }
+ inline void SetGetStateSet( SfxItemSet* p ) { pGetStateSet = p; }
+ inline bool AddGrfUpdateSlot( sal_uInt16 nSlot ){ return aGrfUpdateSlots.insert( nSlot ).second; }
+
+ DECL_STATIC_LINK( SwBaseShell, InsertDBTextHdl, DBTextStruct_Impl* );
+
+ void InsertURLButton( const OUString& rURL, const OUString& rTarget, const OUString& rTxt );
+ void InsertTable( SfxRequest& _rRequest );
+
+public:
+ SwBaseShell(SwView &rShell);
+ virtual ~SwBaseShell();
+
+ SFX_DECL_INTERFACE(SW_BASESHELL)
+ TYPEINFO();
+
+ void ExecDelete(SfxRequest &);
+
+ void ExecClpbrd(SfxRequest &);
+ void StateClpbrd(SfxItemSet &);
+
+ void ExecUndo(SfxRequest &);
+ void StateUndo(SfxItemSet &);
+
+ void Execute(SfxRequest &);
+ void GetState(SfxItemSet &);
+ void StateStyle(SfxItemSet &);
+
+ void ExecuteGallery(SfxRequest&);
+ void GetGalleryState(SfxItemSet&);
+
+ void ExecDlg(SfxRequest &);
+
+ void StateStatusLine(SfxItemSet &rSet);
+ void ExecTxtCtrl(SfxRequest& rReq);
+ void GetTxtFontCtrlState(SfxItemSet& rSet);
+ void GetTxtCtrlState(SfxItemSet& rSet);
+ void GetBorderState(SfxItemSet &rSet);
+ void GetBckColState(SfxItemSet &rSet);
+
+ void ExecBckCol(SfxRequest& rReq);
+ void SetWrapMode( sal_uInt16 nSlot );
+
+ void StateDisableItems(SfxItemSet &);
+
+ void EditRegionDialog(SfxRequest& rReq);
+ void InsertRegionDialog(SfxRequest& rReq);
+
+ void ExecField(SfxRequest& rReq);
+
+ static void SetFrmMode( FlyMode eMode, SwWrtShell *pShell ); // with update!
+ static void _SetFrmMode( FlyMode eMode ) { eFrameMode = eMode; }
+ static FlyMode GetFrmMode() { return eFrameMode; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/beziersh.hxx b/sw/source/core/uibase/inc/beziersh.hxx
new file mode 100644
index 000000000000..c957d083d1f8
--- /dev/null
+++ b/sw/source/core/uibase/inc/beziersh.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_BEZIERSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_BEZIERSH_HXX
+
+#include "basesh.hxx"
+
+class SwBezierShell: public SwBaseShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_BEZIERSHELL)
+ TYPEINFO();
+
+ SwBezierShell(SwView &rView);
+
+ void GetState(SfxItemSet &);
+ void Execute(SfxRequest &);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/bmpwin.hxx b/sw/source/core/uibase/inc/bmpwin.hxx
new file mode 100644
index 000000000000..dcf59bb97efb
--- /dev/null
+++ b/sw/source/core/uibase/inc/bmpwin.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_BMPWIN_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_BMPWIN_HXX
+
+#include <vcl/graph.hxx>
+#include <vcl/bitmapex.hxx>
+#include <vcl/window.hxx>
+
+/*--------------------------------------------------------------------
+ Description: extended page for graphics
+ --------------------------------------------------------------------*/
+class BmpWindow : public Window
+{
+private:
+ Graphic aGraphic;
+ BitmapEx aBmp;
+
+ sal_Bool bHorz : 1;
+ sal_Bool bVert : 1;
+ sal_Bool bGraphic : 1;
+ bool bLeftAlign : 1;
+
+ virtual void Paint(const Rectangle& rRect);
+
+ virtual Size GetOptimalSize() const;
+
+public:
+ BmpWindow(Window* pPar, WinBits nStyle);
+ ~BmpWindow();
+ void MirrorVert(sal_Bool bMirror) { bVert = bMirror; Invalidate(); }
+ void MirrorHorz(sal_Bool bMirror) { bHorz = bMirror; Invalidate(); }
+ void SetGraphic(const Graphic& rGrf);
+ void SetBitmapEx(const BitmapEx& rGrf);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/bookctrl.hxx b/sw/source/core/uibase/inc/bookctrl.hxx
new file mode 100644
index 000000000000..a8ce181fd7fc
--- /dev/null
+++ b/sw/source/core/uibase/inc/bookctrl.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_BOOKCTRL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_BOOKCTRL_HXX
+
+#include <rtl/ustring.hxx>
+#include <sfx2/stbitem.hxx>
+
+// class BookmarkToolBoxControl -------------------------------------------
+
+class SwBookmarkControl : public SfxStatusBarControl
+{
+ virtual void Command( const CommandEvent& rCEvt );
+
+public:
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void Paint( const UserDrawEvent& rEvt );
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SwBookmarkControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
+ ~SwBookmarkControl();
+
+private:
+ OUString sPageNumber;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/bookmark.hxx b/sw/source/core/uibase/inc/bookmark.hxx
new file mode 100644
index 000000000000..2c896c17d3eb
--- /dev/null
+++ b/sw/source/core/uibase/inc/bookmark.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_BOOKMARK_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_BOOKMARK_HXX
+
+#include <svx/stddlg.hxx>
+#include <vcl/fixed.hxx>
+
+#include <vcl/button.hxx>
+
+#include "swlbox.hxx"
+
+class SwWrtShell;
+class SfxRequest;
+
+class BookmarkCombo : public SwComboBox
+{
+ sal_Int32 GetFirstSelEntryPos() const;
+ sal_Int32 GetNextSelEntryPos(sal_Int32 nPos) const;
+ sal_Int32 GetSelEntryPos(sal_Int32 nPos) const;
+
+ virtual bool PreNotify(NotifyEvent& rNEvt);
+public:
+ BookmarkCombo(Window* pWin, WinBits nStyle);
+
+ sal_Int32 GetSelectEntryCount() const;
+ sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex = 0 ) const;
+
+ static const OUString aForbiddenChars;
+};
+
+class SwInsertBookmarkDlg: public SvxStandardDialog
+{
+ BookmarkCombo* m_pBookmarkBox;
+ OKButton* m_pOkBtn;
+ PushButton* m_pDeleteBtn;
+
+ OUString sRemoveWarning;
+ SwWrtShell &rSh;
+ SfxRequest& rReq;
+
+ DECL_LINK(ModifyHdl, BookmarkCombo *);
+ DECL_LINK(DeleteHdl, void *);
+
+ virtual void Apply();
+
+public:
+ SwInsertBookmarkDlg(Window *pParent, SwWrtShell &rSh, SfxRequest& rReq);
+ ~SwInsertBookmarkDlg();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/break.hxx b/sw/source/core/uibase/inc/break.hxx
new file mode 100644
index 000000000000..00933a759b4f
--- /dev/null
+++ b/sw/source/core/uibase/inc/break.hxx
@@ -0,0 +1,75 @@
+
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_BREAK_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_BREAK_HXX
+
+#include <svx/stddlg.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/lstbox.hxx>
+
+#include <vcl/field.hxx>
+
+#include <boost/optional.hpp>
+
+class SwWrtShell;
+
+class SwBreakDlg: public SvxStandardDialog
+{
+ SwWrtShell &rSh;
+ RadioButton* m_pLineBtn;
+ RadioButton* m_pColumnBtn;
+ RadioButton* m_pPageBtn;
+ FixedText* m_pPageCollText;
+ ListBox* m_pPageCollBox;
+ CheckBox* m_pPageNumBox;
+ NumericField* m_pPageNumEdit;
+
+ OUString aTemplate;
+ sal_uInt16 nKind;
+ ::boost::optional<sal_uInt16> oPgNum;
+
+ sal_Bool bHtmlMode;
+
+ DECL_LINK( ClickHdl, void * );
+ DECL_LINK( PageNumHdl, CheckBox * );
+ DECL_LINK(PageNumModifyHdl, void *);
+ DECL_LINK(OkHdl, void *);
+
+ void CheckEnable();
+
+protected:
+ virtual void Apply();
+
+public:
+ SwBreakDlg( Window *pParent, SwWrtShell &rSh );
+ ~SwBreakDlg();
+
+ OUString GetTemplateName() { return aTemplate; }
+ sal_uInt16 GetKind() { return nKind; }
+ ::boost::optional<sal_uInt16> GetPageNumber() { return oPgNum; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/caption.hxx b/sw/source/core/uibase/inc/caption.hxx
new file mode 100644
index 000000000000..5f91f6f24fae
--- /dev/null
+++ b/sw/source/core/uibase/inc/caption.hxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CAPTION_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CAPTION_HXX
+
+#include <rtl/ustring.hxx>
+#include <tools/globname.hxx>
+#include <SwCapObjType.hxx>
+#include "swdllapi.h"
+
+class SW_DLLPUBLIC InsCaptionOpt
+{
+private:
+ sal_Bool bUseCaption;
+ SwCapObjType eObjType;
+ SvGlobalName aOleId;
+ OUString sCategory;
+ sal_uInt16 nNumType;
+ OUString sNumberSeparator;
+ OUString sCaption;
+ sal_uInt16 nPos;
+ sal_uInt16 nLevel;
+ OUString sSeparator;
+ OUString sCharacterStyle;
+
+ bool bIgnoreSeqOpts; // is not being saved
+ sal_Bool bCopyAttributes; // -""-
+
+public:
+ InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = 0);
+ InsCaptionOpt(const InsCaptionOpt&);
+ ~InsCaptionOpt();
+
+ inline sal_Bool& UseCaption() { return bUseCaption; }
+ inline sal_Bool UseCaption() const { return bUseCaption; }
+
+ inline SwCapObjType GetObjType() const { return eObjType; }
+ inline void SetObjType(const SwCapObjType eType) { eObjType = eType; }
+
+ inline const SvGlobalName& GetOleId() const { return aOleId; }
+ inline void SetOleId(const SvGlobalName &rId) { aOleId = rId; }
+
+ inline const OUString& GetCategory() const { return sCategory; }
+ inline void SetCategory(const OUString& rCat) { sCategory = rCat; }
+
+ inline sal_uInt16 GetNumType() const { return nNumType; }
+ inline void SetNumType(const sal_uInt16 nNT) { nNumType = nNT; }
+
+ const OUString& GetNumSeparator() const { return sNumberSeparator; }
+ void SetNumSeparator(const OUString& rSet) {sNumberSeparator = rSet;}
+
+ inline const OUString& GetCaption() const { return sCaption; }
+ inline void SetCaption(const OUString& rCap) { sCaption = rCap; }
+
+ inline sal_uInt16 GetPos() const { return nPos; }
+ inline void SetPos(const sal_uInt16 nP) { nPos = nP; }
+
+ inline sal_uInt16 GetLevel() const { return nLevel; }
+ inline void SetLevel(const sal_uInt16 nLvl) { nLevel = nLvl; }
+
+ inline const OUString& GetSeparator() const { return sSeparator; }
+ inline void SetSeparator(const OUString& rSep) { sSeparator = rSep; }
+
+ const OUString& GetCharacterStyle() const { return sCharacterStyle; }
+ void SetCharacterStyle(const OUString& rStyle)
+ { sCharacterStyle = rStyle; }
+
+ inline bool& IgnoreSeqOpts() { return bIgnoreSeqOpts; }
+ inline bool IgnoreSeqOpts() const { return bIgnoreSeqOpts; }
+
+ inline sal_Bool& CopyAttributes() { return bCopyAttributes; }
+ inline sal_Bool CopyAttributes() const { return bCopyAttributes; }
+
+ bool operator==( const InsCaptionOpt& rOpt ) const;
+ InsCaptionOpt& operator= ( const InsCaptionOpt& rOpt );
+ inline bool operator< ( const InsCaptionOpt & rObj ) const
+ { return aOleId < rObj.aOleId; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/cfgid.h b/sw/source/core/uibase/inc/cfgid.h
new file mode 100644
index 000000000000..20f652978fe1
--- /dev/null
+++ b/sw/source/core/uibase/inc/cfgid.h
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CFGID_H
+#define INCLUDED_SW_SOURCE_UI_INC_CFGID_H
+
+#include <sfx2/sfx.hrc>
+
+#define CFG_STATUSBAR (SFX_ITEMTYPE_SW_BEGIN +13)
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/cfgitems.hxx b/sw/source/core/uibase/inc/cfgitems.hxx
new file mode 100644
index 000000000000..fbcafa3c228c
--- /dev/null
+++ b/sw/source/core/uibase/inc/cfgitems.hxx
@@ -0,0 +1,221 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CFGITEMS_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CFGITEMS_HXX
+
+#include <tools/color.hxx>
+#include <svl/poolitem.hxx>
+#include "swdllapi.h"
+#include <printdata.hxx>
+
+#include <cmdid.h>
+
+class SwModule;
+#ifdef DBG_UTIL
+class SwTestTabPage;
+#endif
+class SwAddPrinterTabPage;
+class SfxPrinter;
+class SwViewShell;
+class SwViewOption;
+class SwContentOptPage;
+class SwShdwCrsrOptionsTabPage;
+
+SfxPrinter* GetPrt( SwViewShell* );
+void SetPrt( SfxPrinter* );
+
+/*--------OS 12.01.95 -----------------------------------
+Item for settings dialog - document view
+--------------------------------------------------------- */
+class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem
+{
+ friend class SwShdwCrsrOptionsTabPage;
+ friend class SwModule;
+
+ sal_Bool bParagraphEnd :1;
+ sal_Bool bTab :1;
+ sal_Bool bSpace :1;
+ sal_Bool bNonbreakingSpace :1;
+ sal_Bool bSoftHyphen :1;
+ sal_Bool bCharHiddenText :1;
+ sal_Bool bFldHiddenText :1;
+ sal_Bool bManualBreak :1;
+ sal_Bool bShowHiddenPara :1;
+
+ Color aIndexBackgrndCol;
+
+public:
+ TYPEINFO();
+ SwDocDisplayItem( sal_uInt16 nWhich = FN_PARAM_DOCDISP );
+ SwDocDisplayItem(
+ const SwDocDisplayItem& rSwDocDisplayItem );
+ SwDocDisplayItem( const SwViewOption& rVOpt,
+ sal_uInt16 nWhich );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual bool operator==( const SfxPoolItem& ) const;
+ void operator=( const SwDocDisplayItem& );
+ void FillViewOptions( SwViewOption& rVOpt) const;
+};
+
+/*--------OS 12.01.95 -----------------------------------
+Item for settings dialog, element page
+--------------------------------------------------------- */
+class SW_DLLPUBLIC SwElemItem : public SfxPoolItem
+{
+ //view
+ bool bHorzScrollbar :1;
+ bool bVertScrollbar :1;
+ bool bAnyRuler : 1;
+ bool bHorzRuler :1;
+ bool bVertRuler :1;
+ bool bVertRulerRight:1;
+ bool bSmoothScroll :1;
+ //visual aids
+ bool bCrosshair :1;
+ //display
+ bool bTable :1;
+ bool bGraphic :1;
+ bool bDrawing :1;
+ bool bFieldName :1;
+ bool bNotes :1;
+
+ friend class SwContentOptPage;
+
+public:
+ TYPEINFO();
+ SwElemItem( sal_uInt16 nWhich = FN_PARAM_ELEM );
+ SwElemItem(const SwElemItem& rElemItem);
+ SwElemItem(const SwViewOption& rVOpt, sal_uInt16 nWhich);
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual bool operator==( const SfxPoolItem& ) const;
+ void operator=( const SwElemItem& );
+
+ void FillViewOptions( SwViewOption& rVOpt) const;
+
+};
+
+/*--------OS 12.01.95 -----------------------------------
+Item for settings dialog - printer/add ons
+--------------------------------------------------------- */
+class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData
+{
+ friend class SwAddPrinterTabPage;
+
+ using SwPrintData::operator ==;
+
+public:
+ TYPEINFO();
+ SwAddPrinterItem( sal_uInt16 nWhich = FN_PARAM_ADDPRINTER );
+ SwAddPrinterItem( sal_uInt16 nWhich, const SwPrintData& rPrtData );
+ SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem);
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ virtual bool operator==( const SfxPoolItem& ) const;
+
+ const OUString &GetFax() const { return sFaxName; }
+ void SetFax( const OUString& rFax) { sFaxName = rFax; }
+
+ sal_Bool IsPrintProspect() const { return bPrintProspect; }
+ sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; }
+ void SetPrintProspect(sal_Bool bFlag ){ bPrintProspect = bFlag; }
+ void SetPrintProspectRTL(sal_Bool bFlag ){ bPrintProspectRTL = bFlag; }
+ 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 IsPrintPageBackground() const { return bPrintPageBackground; }
+ sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; }
+ //#i81434# - printing of hidden text
+ sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; }
+ sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; }
+
+ sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; }
+ sal_uLong GetPrintPostIts () const { return nPrintPostIts; }
+
+};
+
+/*--------OS 12.01.95 -----------------------------------
+Item for settings dialog, ShadowCursorPage
+--------------------------------------------------------- */
+class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem
+{
+ sal_uInt8 eMode;
+ sal_Bool bOn;
+public:
+ TYPEINFO();
+ SwShadowCursorItem( sal_uInt16 nWhich = FN_PARAM_SHADOWCURSOR );
+ SwShadowCursorItem( const SwShadowCursorItem& rElemItem );
+ SwShadowCursorItem( const SwViewOption& rVOpt, sal_uInt16 nWhich );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual bool operator==( const SfxPoolItem& ) const;
+ void operator=( const SwShadowCursorItem& );
+
+ void FillViewOptions( SwViewOption& rVOpt) const;
+
+ sal_uInt8 GetMode() const { return eMode; }
+ sal_Bool IsOn() const { return bOn; }
+
+ void SetMode( sal_uInt8 eM ) { eMode = eM; }
+ void SetOn( sal_Bool bFlag ) { bOn = bFlag; }
+};
+
+#ifdef DBG_UTIL
+
+/*--------OS 12.01.95 -----------------------------------
+Item for settings dialog - test settings
+--------------------------------------------------------- */
+class SW_DLLPUBLIC SwTestItem : public SfxPoolItem
+{
+ friend class SwModule;
+ friend class SwTestTabPage;
+
+ bool bTest1:1;
+ bool bTest2:1;
+ bool bTest3:1;
+ bool bTest4:1;
+ bool bTest5:1;
+ bool bTest6:1;
+ bool bTest7:1;
+ bool bTest8:1;
+ bool bTest9:1;
+ bool bTest10:1;
+
+public:
+ SwTestItem( sal_uInt16 _nWhich):
+ SfxPoolItem(_nWhich){};
+ SwTestItem( const SwTestItem& pTestItem);
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual bool operator==( const SfxPoolItem& ) const;
+
+};
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/changedb.hxx b/sw/source/core/uibase/inc/changedb.hxx
new file mode 100644
index 000000000000..4e8e31acce58
--- /dev/null
+++ b/sw/source/core/uibase/inc/changedb.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CHANGEDB_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CHANGEDB_HXX
+
+#include <vcl/bitmap.hxx>
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <svtools/stdctrl.hxx>
+#include <svtools/treelistbox.hxx>
+#include <svx/stddlg.hxx>
+#include "dbtree.hxx"
+
+class SwFldMgr;
+class SwView;
+class SwWrtShell;
+struct SwDBData;
+
+/*--------------------------------------------------------------------
+ Description: exchange database at fields
+ --------------------------------------------------------------------*/
+class SwChangeDBDlg: public SvxStandardDialog
+{
+ SvTreeListBox* m_pUsedDBTLB;
+ SwDBTreeList* m_pAvailDBTLB;
+ PushButton* m_pAddDBPB;
+ FixedText* m_pDocDBNameFT;
+ PushButton* m_pDefineBT;
+
+ ImageList aImageList;
+
+ SwWrtShell *pSh;
+ SwFldMgr *pMgr;
+
+ DECL_LINK(TreeSelectHdl, void * = 0);
+ DECL_LINK(ButtonHdl, void *);
+ DECL_LINK(AddDBHdl, void *);
+
+ virtual void Apply();
+ void UpdateFlds();
+ void FillDBPopup();
+ SvTreeListEntry* Insert(const OUString& rDBName);
+ void ShowDBName(const SwDBData& rDBData);
+
+public:
+ SwChangeDBDlg(SwView& rVw);
+ ~SwChangeDBDlg();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/chartins.hxx b/sw/source/core/uibase/inc/chartins.hxx
new file mode 100644
index 000000000000..848653cf45f0
--- /dev/null
+++ b/sw/source/core/uibase/inc/chartins.hxx
@@ -0,0 +1,27 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CHARTINS_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CHARTINS_HXX
+
+Point SwGetChartDialogPos( const Window *pParentWin, const Size& rDialogSize, const Rectangle& rLogicChart );
+void SwInsertChart( Window *pParent, SfxBindings *pBindings );
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_CHARTINS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/chldwrap.hxx b/sw/source/core/uibase/inc/chldwrap.hxx
new file mode 100644
index 000000000000..41f771acc2f9
--- /dev/null
+++ b/sw/source/core/uibase/inc/chldwrap.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CHLDWRAP_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CHLDWRAP_HXX
+
+#include <sfx2/childwin.hxx>
+#include <vcl/timer.hxx>
+
+class SwDocShell;
+
+class SwChildWinWrapper : public SfxChildWindow
+{
+ Timer m_aUpdateTimer;
+ SwDocShell* m_pDocSh;
+
+ DECL_LINK( UpdateHdl, void* );
+
+ // Implementation in fldtdlg.cxx
+protected:
+ SwChildWinWrapper(Window *pParentWindow, sal_uInt16 nId);
+
+public:
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
+
+ inline SwDocShell* GetOldDocShell() { return m_pDocSh; }
+ inline void SetOldDocShell(SwDocShell *pDcSh) { m_pDocSh = pDcSh; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/chrdlg.hxx b/sw/source/core/uibase/inc/chrdlg.hxx
new file mode 100644
index 000000000000..c01cc2d16357
--- /dev/null
+++ b/sw/source/core/uibase/inc/chrdlg.hxx
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CHRDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CHRDLG_HXX
+#include <sfx2/tabdlg.hxx>
+
+#include <vcl/group.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/edit.hxx>
+
+#include <vcl/combobox.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/lstbox.hxx>
+
+class SwView;
+class SvxMacroItem;
+
+class SwCharDlg: public SfxTabDialog
+{
+ SwView& m_rView;
+ sal_uInt8 m_nDialogMode;
+
+ sal_uInt16 m_nCharStdId;
+ sal_uInt16 m_nCharExtId;
+ sal_uInt16 m_nCharPosId;
+ sal_uInt16 m_nCharTwoId;
+ sal_uInt16 m_nCharUrlId;
+ sal_uInt16 m_nCharBgdId;
+ sal_uInt16 m_nCharBrdId;
+
+public:
+ SwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
+ sal_uInt8 nDialogMode, const OUString* pFmtStr = 0);
+
+ ~SwCharDlg();
+
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
+};
+
+class SwCharURLPage : public SfxTabPage
+{
+ Edit* m_pURLED;
+ FixedText* m_pTextFT;
+ Edit* m_pTextED;
+ Edit* m_pNameED;
+ ComboBox* m_pTargetFrmLB;
+ PushButton* m_pURLPB;
+ PushButton* m_pEventPB;
+ ListBox* m_pVisitedLB;
+ ListBox* m_pNotVisitedLB;
+
+ VclContainer* m_pCharStyleContainer;
+
+ SvxMacroItem* pINetItem;
+ bool bModified;
+
+ DECL_LINK(InsertFileHdl, void *);
+ DECL_LINK(EventHdl, void *);
+
+public:
+ SwCharURLPage( Window* pParent,
+ const SfxItemSet& rSet );
+
+ ~SwCharURLPage();
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/chrdlgmodes.hxx b/sw/source/core/uibase/inc/chrdlgmodes.hxx
new file mode 100644
index 000000000000..bc7d6a2be8d0
--- /dev/null
+++ b/sw/source/core/uibase/inc/chrdlgmodes.hxx
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CHRDLGMODES_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CHRDLGMODES_HXX
+
+// DialogModes for SwCharDlg
+#define DLG_CHAR_STD 0
+#define DLG_CHAR_DRAW 1
+#define DLG_CHAR_ENV 2
+#define DLG_CHAR_ANN 3
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_CHRDLGMODES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/cnttab.hxx b/sw/source/core/uibase/inc/cnttab.hxx
new file mode 100644
index 000000000000..a1a6fae550a3
--- /dev/null
+++ b/sw/source/core/uibase/inc/cnttab.hxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CNTTAB_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CNTTAB_HXX
+
+#include <svx/stddlg.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/edit.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/field.hxx>
+#include <vcl/lstbox.hxx>
+#include <sfx2/tabdlg.hxx>
+
+#include "tox.hxx"
+#include <toxmgr.hxx>
+#include <svx/checklbx.hxx>
+#include <tools/resary.hxx>
+#include <svtools/treelistbox.hxx>
+#include <vcl/menubtn.hxx>
+#include <svx/langbox.hxx>
+
+#define TOX_PAGE_SELECT 1
+#define TOX_PAGE_ENTRY 2
+#define TOX_PAGE_STYLES 3
+
+#define TO_CONTENT 1
+#define TO_INDEX 2
+#define TO_ILLUSTRATION 4
+#define TO_TABLE 8
+#define TO_USER 16
+#define TO_OBJECT 32
+#define TO_AUTHORITIES 64
+#define TO_BIBLIOGRAPHY 128
+
+struct CurTOXType
+{
+ TOXTypes eType;
+ sal_uInt16 nIndex; //for TOX_USER only
+
+ bool operator==(const CurTOXType aCmp)
+ {
+ return eType == aCmp.eType && nIndex == aCmp.nIndex;
+ }
+ sal_uInt16 GetFlatIndex() const;
+
+ CurTOXType () : eType (TOX_INDEX), nIndex (0) {};
+
+ CurTOXType (TOXTypes t, sal_uInt16 i) : eType (t), nIndex (i) {};
+};
+
+class SwOLENames : public Resource
+{
+ ResStringArray aNamesAry;
+public:
+ SwOLENames(const ResId& rResId) :
+ Resource(rResId),
+ aNamesAry(ResId(1,*rResId.GetResMgr()))
+ {
+ FreeResource();
+ }
+
+ ResStringArray& GetNames() { return aNamesAry;}
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/colex.hxx b/sw/source/core/uibase/inc/colex.hxx
new file mode 100644
index 000000000000..748cc8db0396
--- /dev/null
+++ b/sw/source/core/uibase/inc/colex.hxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_COLEX_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_COLEX_HXX
+
+#include <svx/pagectrl.hxx>
+#include <editeng/paperinf.hxx>
+#include "swdllapi.h"
+#include <fmtclds.hxx>
+#include "frmatr.hxx"
+
+class SwColMgr;
+class SfxItemSet;
+
+class SW_DLLPUBLIC SwPageExample : public SvxPageWindow
+{
+public:
+ SwPageExample(Window* pPar)
+ : SvxPageWindow(pPar)
+ {
+ SetSize(SvxPaperInfo::GetPaperSize(PAPER_A4));
+ }
+
+ void UpdateExample( const SfxItemSet& rSet );
+};
+
+class SwTextGridItem;
+
+class SW_DLLPUBLIC SwPageGridExample : public SwPageExample
+{
+ SwTextGridItem* pGridItem;
+ bool m_bVertical;
+protected:
+ virtual void DrawPage( const Point& rPoint,
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled );
+public:
+ SwPageGridExample(Window* pPar) :
+ SwPageExample(pPar),
+ pGridItem(0),
+ m_bVertical(false){}
+
+ ~SwPageGridExample();
+ void UpdateExample( const SfxItemSet& rSet );
+};
+
+class SW_DLLPUBLIC SwColExample : public SwPageExample
+{
+ SwColMgr* pColMgr;
+
+ using SwPageExample::UpdateExample;
+
+protected:
+ virtual void DrawPage( const Point& rPoint,
+ const sal_Bool bSecond,
+ const sal_Bool bEnabled );
+
+public:
+ SwColExample(Window* pPar)
+ : SwPageExample(pPar)
+ , pColMgr(0)
+ {
+ }
+
+ void UpdateExample( const SfxItemSet& rSet, SwColMgr* pMgr )
+ {
+ pColMgr = pMgr;
+ SwPageExample::UpdateExample(rSet);
+ }
+};
+
+class SW_DLLPUBLIC SwColumnOnlyExample : public Window
+{
+private:
+ Size m_aWinSize;
+
+ Size m_aFrmSize;
+ SwFmtCol m_aCols;
+
+protected:
+ virtual void Paint( const Rectangle& rRect );
+
+public:
+ SwColumnOnlyExample(Window*);
+
+ void SetColumns(const SwFmtCol& rCol);
+
+ virtual Size GetOptimalSize() const;
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_COLEX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/colmgr.hxx b/sw/source/core/uibase/inc/colmgr.hxx
new file mode 100644
index 000000000000..b3f73001005a
--- /dev/null
+++ b/sw/source/core/uibase/inc/colmgr.hxx
@@ -0,0 +1,127 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_COLMGR_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_COLMGR_HXX
+
+#include "swdllapi.h"
+#include <fmtclds.hxx>
+
+SW_DLLPUBLIC void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth);
+
+class SW_DLLPUBLIC SwColMgr
+{
+public:
+ // lActWidth is passed directly from the page dialogs edits
+ SwColMgr(const SfxItemSet &rSet, sal_uInt16 nActWidth = USHRT_MAX);
+ ~SwColMgr();
+
+ inline sal_uInt16 GetCount() const;
+ void SetCount(sal_uInt16 nCount, sal_uInt16 nGutterWidth);
+ sal_uInt16 GetGutterWidth(sal_uInt16 nPos = USHRT_MAX) const;
+ void SetGutterWidth(sal_uInt16 nWidth, sal_uInt16 nPos = USHRT_MAX);
+
+ sal_uInt16 GetColWidth(sal_uInt16 nIdx) const;
+ void SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWidth);
+
+ inline sal_Bool IsAutoWidth() const;
+ void SetAutoWidth(sal_Bool bOn = sal_True, sal_uInt16 lGutterWidth = 0);
+
+ inline bool HasLine() const;
+ inline void SetNoLine();
+
+ void SetLineWidthAndColor(::editeng::SvxBorderStyle eStyle, sal_uLong nWidth, const Color& rCol);
+ inline ::editeng::SvxBorderStyle GetLineStyle() const;
+ inline sal_uLong GetLineWidth() const;
+ inline const Color& GetLineColor() const;
+
+ inline SwColLineAdj GetAdjust() const;
+ inline void SetAdjust(SwColLineAdj);
+
+ short GetLineHeightPercent() const;
+ void SetLineHeightPercent(short nPercent);
+
+ inline void NoCols();
+ void Update();
+
+ const SwFmtCol& GetColumns() const { return aFmtCol; }
+
+ void SetActualWidth(sal_uInt16 nW);
+ sal_uInt16 GetActualSize() const { return nWidth; }
+
+private:
+
+ SwFmtCol aFmtCol;
+ sal_uInt16 nWidth;
+};
+
+// INLINE METHOD --------------------------------------------------------
+inline sal_uInt16 SwColMgr::GetCount() const
+{
+ return aFmtCol.GetNumCols();
+}
+
+inline ::editeng::SvxBorderStyle SwColMgr::GetLineStyle() const
+{
+ return aFmtCol.GetLineStyle();
+}
+inline sal_uLong SwColMgr::GetLineWidth() const
+{
+ return aFmtCol.GetLineWidth();
+}
+
+inline const Color& SwColMgr::GetLineColor() const
+{
+ return aFmtCol.GetLineColor();
+}
+
+inline SwColLineAdj SwColMgr::GetAdjust() const
+{
+ return aFmtCol.GetLineAdj();
+}
+
+inline void SwColMgr::SetAdjust(SwColLineAdj eAdj)
+{
+ aFmtCol.SetLineAdj(eAdj);
+}
+inline sal_Bool SwColMgr::IsAutoWidth() const
+{
+ return aFmtCol.IsOrtho();
+}
+inline void SwColMgr::SetAutoWidth(sal_Bool bOn, sal_uInt16 nGutterWidth)
+{
+ aFmtCol.SetOrtho(bOn, nGutterWidth, nWidth);
+}
+
+inline void SwColMgr::NoCols()
+{
+ aFmtCol.GetColumns().clear();
+}
+inline bool SwColMgr::HasLine() const
+{
+ return GetAdjust() != COLADJ_NONE;
+}
+
+inline void SwColMgr::SetNoLine()
+{
+ SetAdjust(COLADJ_NONE);
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/column.hxx b/sw/source/core/uibase/inc/column.hxx
new file mode 100644
index 000000000000..2593a35be19c
--- /dev/null
+++ b/sw/source/core/uibase/inc/column.hxx
@@ -0,0 +1,206 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_COLUMN_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_COLUMN_HXX
+
+#include <vcl/fixed.hxx>
+#include <vcl/field.hxx>
+#include <vcl/image.hxx>
+#include <vcl/group.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/button.hxx>
+#include <vcl/timer.hxx>
+#include <svtools/ctrlbox.hxx>
+#include <svtools/valueset.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <fmtclbl.hxx>
+#include <colex.hxx>
+#include <prcntfld.hxx>
+
+const int nMaxCols = 99;
+class SwColMgr;
+class SwWrtShell;
+class SwColumnPage;
+
+class SwColumnDlg : public SfxModalDialog
+{
+ ListBox* m_pApplyToLB;
+
+ SwWrtShell& rWrtShell;
+ SwColumnPage* pTabPage;
+ SfxItemSet* pPageSet;
+ SfxItemSet* pSectionSet;
+ SfxItemSet* pSelectionSet;
+ SfxItemSet* pFrameSet;
+
+ long nOldSelection;
+ long nSelectionWidth;
+ long nPageWidth;
+
+ bool bPageChanged : 1;
+ bool bSectionChanged : 1;
+ bool bSelSectionChanged : 1;
+ bool bFrameChanged : 1;
+
+ DECL_LINK(ObjectHdl, ListBox*);
+ DECL_LINK(OkHdl, void *);
+
+public:
+ SwColumnDlg(Window* pParent, SwWrtShell& rSh);
+ virtual ~SwColumnDlg();
+
+ SwWrtShell& GetWrtShell() { return rWrtShell; }
+};
+
+class ColumnValueSet : public ValueSet
+{
+public:
+ ColumnValueSet(Window* pParent, const ResId& rResId)
+ : ValueSet(pParent, rResId)
+ {
+ }
+ ColumnValueSet(Window* pParent)
+ : ValueSet(pParent, WB_TABSTOP | WB_ITEMBORDER | WB_DOUBLEBORDER)
+ {
+ }
+ virtual void UserDraw( const UserDrawEvent& rUDEvt );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+};
+
+/*--------------------------------------------------------------------
+ Description: column dialog now as TabPage
+ --------------------------------------------------------------------*/
+class SwColumnPage : public SfxTabPage
+{
+ NumericField* m_pCLNrEdt;
+ ColumnValueSet* m_pDefaultVS;
+ CheckBox* m_pBalanceColsCB;
+
+ PushButton* m_pBtnBack;
+ FixedText* m_pLbl1;
+ PercentField aEd1;
+ FixedText* m_pLbl2;
+ PercentField aEd2;
+ FixedText* m_pLbl3;
+ PercentField aEd3;
+ PushButton* m_pBtnNext;
+ PercentField aDistEd1;
+ PercentField aDistEd2;
+ CheckBox* m_pAutoWidthBox;
+
+ FixedText* m_pLineTypeLbl;
+ LineListBox* m_pLineTypeDLB;
+ FixedText* m_pLineWidthLbl;
+ MetricField* m_pLineWidthEdit;
+ FixedText* m_pLineColorLbl;
+ ColorListBox* m_pLineColorDLB;
+ FixedText* m_pLineHeightLbl;
+ MetricField* m_pLineHeightEdit;
+ FixedText* m_pLinePosLbl;
+ ListBox* m_pLinePosDLB;
+
+ FixedText* m_pTextDirectionFT;
+ ListBox* m_pTextDirectionLB;
+
+ // Example
+ SwColExample* m_pPgeExampleWN;
+ SwColumnOnlyExample* m_pFrmExampleWN;
+
+ SwColMgr* pColMgr;
+
+ sal_uInt16 nFirstVis;
+ sal_uInt16 nCols;
+ long nColWidth[nMaxCols];
+ long nColDist[nMaxCols];
+ sal_uInt16 nMinWidth;
+ PercentField* pModifiedField;
+
+ std::map<MetricField*, PercentField*> m_aPercentFieldsMap;
+
+ sal_Bool bFormat;
+ sal_Bool bFrm;
+ sal_Bool bHtmlMode;
+ bool bLockUpdate;
+
+ // Handler
+ DECL_LINK( ColModify, NumericField * );
+ DECL_LINK( GapModify, MetricField * );
+ DECL_LINK( EdModify, MetricField * );
+ DECL_LINK( AutoWidthHdl, CheckBox * );
+ DECL_LINK( SetDefaultsHdl, ValueSet * );
+
+ DECL_LINK(Up, void *);
+ DECL_LINK(Down, void *);
+ DECL_LINK( UpdateColMgr, void* );
+ void Apply(Button *);
+ void Timeout();
+
+ void Update();
+ void UpdateCols();
+ void Init();
+ void ResetColWidth();
+ void SetLabels( sal_uInt16 nVis );
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+ virtual void ActivatePage(const SfxItemSet& rSet);
+ virtual int DeactivatePage(SfxItemSet *pSet);
+
+ SwColumnPage(Window *pParent, const SfxItemSet &rSet);
+
+ void connectPercentField(PercentField &rWrap, const OString &rName);
+
+ bool isLineNotNone() const;
+
+public:
+ virtual ~SwColumnPage();
+
+ static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
+ static sal_uInt16* GetRanges();
+
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
+ virtual void Reset(const SfxItemSet &rSet);
+
+ void SetFrmMode(sal_Bool bMod);
+ void SetPageWidth(long nPageWidth);
+
+ void SetFormatUsed(sal_Bool bFmt)
+ {
+ bFormat = bFmt;
+ }
+
+ void ShowBalance(sal_Bool bShow)
+ {
+ m_pBalanceColsCB->Show(bShow);
+ }
+
+ void SetInSection(sal_Bool bSet);
+
+ void ActivateColumnControl()
+ {
+ m_pCLNrEdt->GrabFocus();
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/conarc.hxx b/sw/source/core/uibase/inc/conarc.hxx
new file mode 100644
index 000000000000..354a625468f2
--- /dev/null
+++ b/sw/source/core/uibase/inc/conarc.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CONARC_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CONARC_HXX
+
+#include "drawbase.hxx"
+
+/*************************************************************************
+|*
+|* draw rectangle
+|*
+\************************************************************************/
+
+class ConstArc : public SwDrawBase
+{
+ Point aStartPnt;
+ sal_uInt16 nAnzButUp;
+
+public:
+ ConstArc(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
+
+ // Mouse- & Key-Events
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(const sal_uInt16 nSlotId); // activate function
+ virtual void Deactivate();
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_CONARC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/concustomshape.hxx b/sw/source/core/uibase/inc/concustomshape.hxx
new file mode 100644
index 000000000000..96d6707b9a90
--- /dev/null
+++ b/sw/source/core/uibase/inc/concustomshape.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CONCUSTOMSHAPE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CONCUSTOMSHAPE_HXX
+
+#include <rtl/ustring.hxx>
+#include "drawbase.hxx"
+
+class SdrObject;
+class SfxRequest;
+
+/*************************************************************************
+|*
+|* draw rectangle
+|*
+\************************************************************************/
+
+class ConstCustomShape : public SwDrawBase
+{
+
+ OUString aCustomShape;
+
+ void SetAttributes( SdrObject* pObj );
+
+ public:
+
+ ConstCustomShape( SwWrtShell* pSh, SwEditWin* pWin, SwView* pView, SfxRequest& rReq );
+
+ // Mouse- & Key-Events
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(const sal_uInt16 nSlotId); // activate function
+
+ OUString GetShapeType() const;
+ static OUString GetShapeTypeFromRequest( SfxRequest& rReq );
+
+ virtual void CreateDefaultObject();
+
+ // #i33136#
+ virtual bool doConstructOrthogonal() const;
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_CONCUSTOMSHAPE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/condedit.hxx b/sw/source/core/uibase/inc/condedit.hxx
new file mode 100644
index 000000000000..514a23e58c55
--- /dev/null
+++ b/sw/source/core/uibase/inc/condedit.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CONDEDIT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CONDEDIT_HXX
+
+#include <vcl/edit.hxx>
+#include <svtools/transfer.hxx>
+#include "swdllapi.h"
+
+class SW_DLLPUBLIC ConditionEdit : public Edit, public DropTargetHelper
+{
+ bool bBrackets, bEnableDrop;
+
+ SAL_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ SAL_DLLPRIVATE virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+
+public:
+ ConditionEdit(Window* pParent, WinBits nStyle);
+
+ void ShowBrackets(bool bShow)
+ {
+ bBrackets = bShow;
+ }
+
+ void SetDropEnable(bool bFlag)
+ {
+ bEnableDrop = bFlag;
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/conform.hxx b/sw/source/core/uibase/inc/conform.hxx
new file mode 100644
index 000000000000..a1226a21f25e
--- /dev/null
+++ b/sw/source/core/uibase/inc/conform.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CONFORM_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CONFORM_HXX
+
+#include "drawbase.hxx"
+
+class ConstFormControl : public SwDrawBase
+{
+public:
+ ConstFormControl(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
+
+ // Mouse- & Key-Events
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(const sal_uInt16 nSlotId); // activate function
+ virtual void CreateDefaultObject();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/conpoly.hxx b/sw/source/core/uibase/inc/conpoly.hxx
new file mode 100644
index 000000000000..d91c38e0dd6b
--- /dev/null
+++ b/sw/source/core/uibase/inc/conpoly.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CONPOLY_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CONPOLY_HXX
+
+#include "drawbase.hxx"
+
+/*************************************************************************
+|*
+|* base class for all functions
+|*
+\************************************************************************/
+
+class ConstPolygon : public SwDrawBase
+{
+ Point aLastPos;
+
+public:
+ ConstPolygon(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
+
+ // Mouse- & Key-Events
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(const sal_uInt16 nSlotId); // activate function
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_CONPOLY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/conrect.hxx b/sw/source/core/uibase/inc/conrect.hxx
new file mode 100644
index 000000000000..4791935d37ce
--- /dev/null
+++ b/sw/source/core/uibase/inc/conrect.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CONRECT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CONRECT_HXX
+
+#include "drawbase.hxx"
+
+/*************************************************************************
+|*
+|* draw rectangle
+|*
+\************************************************************************/
+
+class ConstRectangle : public SwDrawBase
+{
+ bool bMarquee;
+ bool bCapVertical;
+
+ // #93382#
+ bool mbVertical;
+
+ public:
+ ConstRectangle(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
+
+ // Mouse- & Key-Events
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(const sal_uInt16 nSlotId); // activate function
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_CONRECT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/content.hxx b/sw/source/core/uibase/inc/content.hxx
new file mode 100644
index 000000000000..2700bd261e83
--- /dev/null
+++ b/sw/source/core/uibase/inc/content.hxx
@@ -0,0 +1,208 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CONTENT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CONTENT_HXX
+#include <limits.h>
+#include "swcont.hxx"
+
+#include <vcl/menu.hxx>
+
+class SwWrtShell;
+class SwContentArr;
+class SwContentType;
+class SwFmtFld;
+class SwTxtINetFmt;
+class SwTOXBase;
+class SwRangeRedline;
+
+// helper classes
+
+class SwPopup : public PopupMenu
+{
+ sal_uInt16 nCurId;
+ virtual void Select(){nCurId = GetCurItemId();}
+
+public:
+ SwPopup() :
+ PopupMenu(),
+ nCurId(USHRT_MAX){}
+
+ sal_uInt16 GetCurId() const { return nCurId; }
+
+};
+
+class SwOutlineContent : public SwContent
+{
+ sal_uInt16 nOutlinePos;
+ sal_uInt8 nOutlineLevel;
+ bool bIsMoveable;
+ public:
+ SwOutlineContent( const SwContentType* pCnt,
+ const OUString& rName,
+ sal_uInt16 nArrPos,
+ sal_uInt8 nLevel,
+ bool bMove,
+ long nYPos) :
+ SwContent(pCnt, rName, nYPos),
+ nOutlinePos(nArrPos), nOutlineLevel(nLevel), bIsMoveable(bMove) {}
+
+ sal_uInt16 GetPos(){return nOutlinePos;}
+ sal_uInt8 GetOutlineLevel(){return nOutlineLevel;}
+ bool IsMoveable(){return bIsMoveable;};
+};
+
+class SwRegionContent : public SwContent
+{
+
+ sal_uInt8 nRegionLevel;
+
+ public:
+ SwRegionContent( const SwContentType* pCnt,
+ const OUString& rName,
+ sal_uInt8 nLevel,
+ long nYPos) :
+ SwContent(pCnt, rName, nYPos),
+ nRegionLevel(nLevel){}
+ sal_uInt8 GetRegionLevel() const {return nRegionLevel;}
+};
+
+class SwURLFieldContent : public SwContent
+{
+ OUString sURL;
+ const SwTxtINetFmt* pINetAttr;
+
+public:
+ SwURLFieldContent( const SwContentType* pCnt,
+ const OUString& rName,
+ const OUString& rURL,
+ const SwTxtINetFmt* pAttr,
+ long nYPos )
+ : SwContent( pCnt, rName, nYPos ), sURL( rURL ), pINetAttr( pAttr )
+ {}
+
+ virtual sal_Bool IsProtect() const;
+ const OUString& GetURL() { return sURL; }
+ const SwTxtINetFmt* GetINetAttr() { return pINetAttr; }
+};
+
+class SwPostItContent : public SwContent
+{
+ const SwFmtFld* pFld;
+ SwRangeRedline* pRedline;
+ bool mbPostIt;
+public:
+ SwPostItContent( const SwContentType* pCnt,
+ const OUString& rName,
+ const SwFmtFld* pField,
+ long nYPos )
+ : SwContent(pCnt, rName, nYPos)
+ , pFld(pField)
+ , pRedline(NULL)
+ , mbPostIt(true)
+ {}
+ SwPostItContent( const SwContentType* pCnt,
+ const OUString& rName,
+ SwRangeRedline* pRed,
+ long nYPos )
+ : SwContent(pCnt, rName, nYPos)
+ , pFld(NULL)
+ , pRedline(pRed)
+ , mbPostIt(false)
+ {}
+
+ const SwFmtFld* GetPostIt() { return pFld; }
+ SwRangeRedline* GetRedline() { return pRedline; }
+ virtual sal_Bool IsProtect() const;
+ bool IsPostIt() {return mbPostIt; }
+};
+
+class SwGraphicContent : public SwContent
+{
+ OUString sLink;
+public:
+ SwGraphicContent(const SwContentType* pCnt, const OUString& rName, const OUString& rLink, long nYPos)
+ : SwContent( pCnt, rName, nYPos ), sLink( rLink )
+ {}
+ virtual ~SwGraphicContent();
+
+ const OUString& GetLink() const {return sLink;}
+};
+
+class SwTOXBaseContent : public SwContent
+{
+ const SwTOXBase* pBase;
+public:
+ SwTOXBaseContent(const SwContentType* pCnt, const OUString& rName, long nYPos, const SwTOXBase& rBase)
+ : SwContent( pCnt, rName, nYPos ), pBase(&rBase)
+ {}
+ virtual ~SwTOXBaseContent();
+
+ const SwTOXBase* GetTOXBase() const {return pBase;}
+};
+/*
+ class ContentType contains information to one type of content.
+ MemberArray is only populated if the content is requested by
+ GetMember. It is reloaded after Invalidate() only if the content
+ should be read again.
+*/
+
+class SwContentType : public SwTypeNumber
+{
+ SwWrtShell* pWrtShell;
+ SwContentArr* pMember; // array for content
+ OUString sContentTypeName; // name of content type
+ OUString sSingleContentTypeName; // name of content type, singular
+ OUString sTypeToken; // attachment for URL
+ sal_uInt16 nMemberCount; // content count
+ sal_uInt16 nContentType; // content type's Id
+ sal_uInt8 nOutlineLevel;
+ bool bDataValid : 1;
+ bool bEdit: 1; // can this type be edited?
+ bool bDelete: 1; // can this type be deleted?
+protected:
+ OUString RemoveNewline(const OUString&);
+public:
+ SwContentType(SwWrtShell* pParent, sal_uInt16 nType, sal_uInt8 nLevel );
+ ~SwContentType();
+
+ void Init(sal_Bool* pbInvalidateWindow = 0);
+ void FillMemberList(sal_Bool* pbLevelChanged = NULL);
+ sal_uInt16 GetMemberCount() const
+ {return nMemberCount;};
+ sal_uInt16 GetType() const {return nContentType;}
+ const SwContent* GetMember(sal_uInt16 nIndex);
+ const OUString& GetName() {return sContentTypeName;}
+ const OUString& GetSingleName() const {return sSingleContentTypeName;}
+ const OUString& GetTypeToken() const{return sTypeToken;}
+
+ void SetOutlineLevel(sal_uInt8 nNew)
+ {
+ nOutlineLevel = nNew;
+ Invalidate();
+ }
+
+ void Invalidate(); // only nMemberCount is read again
+
+ bool IsEditable() const {return bEdit;}
+ bool IsDeletable() const {return bDelete;}
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/conttree.hxx b/sw/source/core/uibase/inc/conttree.hxx
new file mode 100644
index 000000000000..d51152a344e7
--- /dev/null
+++ b/sw/source/core/uibase/inc/conttree.hxx
@@ -0,0 +1,329 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CONTTREE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CONTTREE_HXX
+
+#include "svtools/treelistbox.hxx"
+#include "svtools/svlbitm.hxx"
+#include "swcont.hxx"
+
+#include <map>
+
+class SwWrtShell;
+class SwContentType;
+class SwNavigationPI;
+class SwNavigationConfig;
+class Menu;
+class ToolBox;
+class SwGlblDocContents;
+class SwGlblDocContent;
+class SfxObjectShell;
+class SdrObject;
+
+#define EDIT_MODE_EDIT 0
+#define EDIT_MODE_UPD_IDX 1
+#define EDIT_MODE_RMV_IDX 2
+#define EDIT_UNPROTECT_TABLE 3
+#define EDIT_MODE_DELETE 4
+#define EDIT_MODE_RENAME 5
+
+class SwContentTree : public SvTreeListBox
+{
+ ImageList aEntryImages;
+ OUString sSpace;
+ AutoTimer aUpdTimer;
+
+ SwContentType* aActiveContentArr[CONTENT_TYPE_MAX];
+ SwContentType* aHiddenContentArr[CONTENT_TYPE_MAX];
+ OUString aContextStrings[CONTEXT_COUNT + 1];
+ OUString sRemoveIdx;
+ OUString sUpdateIdx;
+ OUString sUnprotTbl;
+ OUString sRename;
+ OUString sReadonlyIdx;
+ OUString sInvisible;
+ OUString sPostItShow;
+ OUString sPostItHide;
+ OUString sPostItDelete;
+
+ SwWrtShell* pHiddenShell; // dropped Doc
+ SwWrtShell* pActiveShell; // the active or a const. open view
+ SwNavigationConfig* pConfig;
+
+ std::map< void*, bool > mOutLineNodeMap;
+
+ sal_Int32 nActiveBlock;
+ sal_uInt16 nHiddenBlock;
+ sal_uInt16 nRootType;
+ sal_uInt16 nLastSelType;
+ sal_uInt8 nOutlineLevel;
+
+ bool bIsActive :1;
+ bool bIsConstant :1;
+ bool bIsHidden :1;
+ bool bDocChgdInDragging :1;
+ bool bIsInternalDrag :1;
+ bool bIsRoot :1;
+ bool bIsIdleClear :1;
+ sal_Bool bIsLastReadOnly :1;
+ bool bIsOutlineMoveable :1;
+ bool bViewHasChanged :1;
+ bool bIsImageListInitialized : 1;
+
+ static bool bIsInDrag;
+
+ bool bIsKeySpace;
+ Rectangle oldRectangle;
+
+ void FindActiveTypeAndRemoveUserData();
+
+ using SvTreeListBox::ExecuteDrop;
+ using SvTreeListBox::EditEntry;
+
+protected:
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+ virtual void InitEntry(SvTreeListEntry*, const OUString&, const Image&, const Image&, SvLBoxButtonKind);
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ SwNavigationPI* GetParentWindow(){return
+ (SwNavigationPI*)Window::GetParent();}
+
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+ virtual void DragFinished( sal_Int8 );
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+
+ bool FillTransferData( TransferDataContainer& rTransfer,
+ sal_Int8& rDragMode );
+ bool HasContentChanged();
+
+ virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
+ SvTreeListEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvTreeListEntry* );
+
+ virtual sal_Bool NotifyMoving( SvTreeListEntry* pTarget,
+ SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent,
+ sal_uLong& rNewChildPos
+ );
+ virtual sal_Bool NotifyCopying( SvTreeListEntry* pTarget,
+ SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent,
+ sal_uLong& rNewChildPos
+ );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+
+ void EditEntry( SvTreeListEntry* pEntry, sal_uInt8 nMode );
+
+ void GotoContent(SwContent* pCnt);
+ static void SetInDrag(bool bSet) {bIsInDrag = bSet;}
+
+ virtual PopupMenu* CreateContextMenu( void );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
+
+public:
+ SwContentTree(Window* pParent, const ResId& rResId);
+ ~SwContentTree();
+ OUString GetEntryAltText( SvTreeListEntry* pEntry ) const;
+ OUString GetEntryLongDescription( SvTreeListEntry* pEntry ) const;
+ SdrObject* GetDrawingObjectsByContent(const SwContent *pCnt);
+
+ bool ToggleToRoot();
+ bool IsRoot() const {return bIsRoot;}
+ sal_uInt16 GetRootType() const {return nRootType;}
+ void SetRootType(sal_uInt16 nType);
+ void Display( bool bActiveView );
+ void Clear();
+ void SetHiddenShell(SwWrtShell* pSh);
+ void ShowHiddenShell();
+ void ShowActualView();
+ void SetActiveShell(SwWrtShell* pSh);
+ void SetConstantShell(SwWrtShell* pSh);
+
+ SwWrtShell* GetWrtShell()
+ {return bIsActive||bIsConstant ?
+ pActiveShell :
+ pHiddenShell;}
+
+ static bool IsInDrag() {return bIsInDrag;}
+ bool IsInternalDrag() const {return bIsInternalDrag;}
+
+ sal_Int32 GetActiveBlock() const {return nActiveBlock;}
+
+ sal_uInt8 GetOutlineLevel()const {return nOutlineLevel;}
+ void SetOutlineLevel(sal_uInt8 nSet);
+
+ sal_Bool Expand( SvTreeListEntry* pParent );
+
+ sal_Bool Collapse( SvTreeListEntry* pParent );
+
+ void ExecCommand(sal_uInt16 nCmd, sal_Bool bModifier);
+
+ void ShowTree();
+ void HideTree();
+
+ bool IsConstantView() {return bIsConstant;}
+ bool IsActiveView() {return bIsActive;}
+ bool IsHiddenView() {return bIsHidden;}
+
+ const SwWrtShell* GetActiveWrtShell() {return pActiveShell;}
+ SwWrtShell* GetHiddenWrtShell() {return pHiddenShell;}
+
+ DECL_LINK( ContentDoubleClickHdl, void * );
+ DECL_LINK( TimerUpdate, void * );
+
+ virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* );
+ virtual void RequestingChildren( SvTreeListEntry* pParent );
+ virtual void GetFocus();
+ virtual void KeyInput(const KeyEvent& rKEvt);
+
+ virtual sal_Bool Select( SvTreeListEntry* pEntry, sal_Bool bSelect=sal_True );
+ virtual sal_Int32 GetEntryRealChildrenNum( SvTreeListEntry* pEntry ) const;
+};
+
+// TreeListBox for global documents
+
+class SwLBoxString : public SvLBoxString
+{
+public:
+
+ SwLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags,
+ const OUString& rStr ) : SvLBoxString(pEntry,nFlags,rStr)
+ {
+ }
+
+ virtual void Paint(
+ const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView,
+ const SvTreeListEntry* pEntry);
+};
+
+namespace sfx2 { class DocumentInserter; }
+namespace sfx2 { class FileDialogHelper; }
+
+class SwGlobalTree : public SvTreeListBox
+{
+private:
+ AutoTimer aUpdateTimer;
+ OUString aContextStrings[GLOBAL_CONTEXT_COUNT];
+
+ ImageList aEntryImages;
+
+ SwWrtShell* pActiveShell;
+ SvTreeListEntry* pEmphasisEntry; // Drag'n Drop emphasis
+ SvTreeListEntry* pDDSource; // source for Drag'n Drop
+ SwGlblDocContents* pSwGlblDocContents; // array with sorted content
+
+ Window* pDefParentWin;
+ SwGlblDocContent* pDocContent;
+ sfx2::DocumentInserter* pDocInserter;
+
+ bool bIsInternalDrag :1;
+ bool bLastEntryEmphasis :1; // Drag'n Drop
+ bool bIsImageListInitialized : 1;
+
+ static const SfxObjectShell* pShowShell;
+
+ void InsertRegion( const SwGlblDocContent* _pContent,
+ const com::sun::star::uno::Sequence< OUString >& _rFiles );
+
+ DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
+
+ using SvTreeListBox::DoubleClickHdl;
+ using SvTreeListBox::ExecuteDrop;
+ using Window::Update;
+
+protected:
+
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+
+ virtual sal_IntPtr GetTabPos( SvTreeListEntry*, SvLBoxTab* );
+ virtual sal_Bool NotifyMoving( SvTreeListEntry* pTarget,
+ SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent,
+ sal_uLong& rNewChildPos
+ );
+ virtual sal_Bool NotifyCopying( SvTreeListEntry* pTarget,
+ SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent,
+ sal_uLong& rNewChildPos
+ );
+
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+ virtual void DragFinished( sal_Int8 );
+ virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
+ SvTreeListEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvTreeListEntry* );
+
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void KeyInput(const KeyEvent& rKEvt);
+ virtual void GetFocus();
+ virtual void SelectHdl();
+ virtual void DeselectHdl();
+ virtual void InitEntry(SvTreeListEntry*, const OUString&, const Image&, const Image&, SvLBoxButtonKind);
+
+ void Clear();
+
+ DECL_LINK( PopupHdl, Menu* );
+ DECL_LINK( Timeout, void* );
+ DECL_LINK( DoubleClickHdl, void* );
+
+ bool IsInternalDrag() const {return bIsInternalDrag;}
+ SwNavigationPI* GetParentWindow()
+ { return (SwNavigationPI*)Window::GetParent(); }
+
+ void OpenDoc(const SwGlblDocContent*);
+ void GotoContent(const SwGlblDocContent*);
+ sal_uInt16 GetEnableFlags() const;
+
+ static const SfxObjectShell* GetShowShell() {return pShowShell;}
+ static void SetShowShell(const SfxObjectShell*pSet) {pShowShell = pSet;}
+ DECL_STATIC_LINK(SwGlobalTree, ShowFrameHdl, SwGlobalTree*);
+
+ virtual PopupMenu* CreateContextMenu( void );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
+
+public:
+ SwGlobalTree(Window* pParent, const ResId& rResId);
+ virtual ~SwGlobalTree();
+
+ void TbxMenuHdl(sal_uInt16 nTbxId, ToolBox* pBox);
+ void InsertRegion( const SwGlblDocContent* pCont,
+ const OUString* pFileName = 0 );
+ void EditContent(const SwGlblDocContent* pCont );
+
+ void ShowTree();
+ void HideTree();
+
+ void ExecCommand(sal_uInt16 nCmd);
+
+ void Display(bool bOnlyUpdateUserData = false);
+
+ sal_Bool Update(sal_Bool bHard);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/convert.hxx b/sw/source/core/uibase/inc/convert.hxx
new file mode 100644
index 000000000000..e9f17a60e6e7
--- /dev/null
+++ b/sw/source/core/uibase/inc/convert.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CONVERT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CONVERT_HXX
+
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
+#include <vcl/edit.hxx>
+#include <sfx2/basedlgs.hxx>
+
+class SwTableAutoFmt;
+class SwView;
+class SwWrtShell;
+class NumericField;
+struct SwInsertTableOptions;
+
+class SwConvertTableDlg: public SfxModalDialog
+{
+ RadioButton* mpTabBtn;
+ RadioButton* mpSemiBtn;
+ RadioButton* mpParaBtn;
+ RadioButton* mpOtherBtn;
+ Edit* mpOtherEd;
+ CheckBox* mpKeepColumn;
+
+ VclContainer* mpOptions;
+
+ CheckBox* mpHeaderCB;
+ CheckBox* mpRepeatHeaderCB;
+
+ VclContainer* mpRepeatRows;
+ NumericField* mpRepeatHeaderNF;
+
+ CheckBox* mpDontSplitCB;
+ CheckBox* mpBorderCB;
+ PushButton* mpAutoFmtBtn;
+
+ OUString sConvertTextTable;
+ SwTableAutoFmt* pTAutoFmt;
+ SwWrtShell* pShell;
+
+ DECL_LINK( AutoFmtHdl, PushButton* );
+ DECL_LINK( BtnHdl, Button* );
+ DECL_LINK(CheckBoxHdl, void * = 0);
+ DECL_LINK( ReapeatHeaderCheckBoxHdl, void* p = 0 );
+
+public:
+ SwConvertTableDlg( SwView& rView, bool bToTable );
+ ~SwConvertTableDlg();
+
+ void GetValues( sal_Unicode& rDelim,
+ SwInsertTableOptions& rInsTblOpts,
+ SwTableAutoFmt const*& prTAFmt );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/cption.hxx b/sw/source/core/uibase/inc/cption.hxx
new file mode 100644
index 000000000000..578efcdb8e1c
--- /dev/null
+++ b/sw/source/core/uibase/inc/cption.hxx
@@ -0,0 +1,113 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_CPTION_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_CPTION_HXX
+
+#include <svx/stddlg.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/lstbox.hxx>
+
+#include <vcl/edit.hxx>
+
+#include <vcl/group.hxx>
+
+#include <vcl/button.hxx>
+#include <actctrl.hxx>
+
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/container/XElementAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+
+class SwFldMgr;
+class SwView;
+
+#include <wrtsh.hxx>
+#include "optload.hxx"
+#include "swlbox.hxx"
+
+class CategoryBox : public ComboBox
+{
+public:
+ CategoryBox( Window* pParent, WinBits nStyle = 0 )
+ : ComboBox( pParent, nStyle )
+ {}
+
+ virtual bool PreNotify( NotifyEvent& rNEvt );
+};
+
+class SwCaptionDialog : public SvxStandardDialog
+{
+ Edit* m_pTextEdit;
+ CategoryBox* m_pCategoryBox;
+ FixedText* m_pFormatText;
+ ListBox* m_pFormatBox;
+ //#i61007# order of captions
+ FixedText* m_pNumberingSeparatorFT;
+ Edit* m_pNumberingSeparatorED;
+ FixedText* m_pSepText;
+ Edit* m_pSepEdit;
+ FixedText* m_pPosText;
+ ListBox* m_pPosBox;
+ OKButton* m_pOKButton;
+ PushButton* m_pAutoCaptionButton;
+ PushButton* m_pOptionButton;
+
+ SwCaptionPreview* m_pPreview;
+
+ OUString m_sNone;
+
+ SwView &rView; // search per active, avoid ::com::sun::star::sdbcx::View
+ SwFldMgr *pMgr; // pointer to save the include
+ SelectionType eType;
+
+ OUString sCharacterStyle;
+ OUString sObjectName;
+ bool bCopyAttributes;
+ bool bOrderNumberingFirst; //#i61007# order of captions
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xNameAccess;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > xNamed;
+
+ DECL_LINK(SelectHdl, void *);
+ DECL_LINK(ModifyHdl, void *);
+ DECL_LINK(OptionHdl, Button *);
+ DECL_LINK(CaptionHdl, void *);
+
+ virtual void Apply();
+
+ void DrawSample();
+ void CheckButtonWidth();
+ void ApplyCaptionOrder(); //#i61007# order of captions
+
+ static OUString our_aSepTextSave; // Save caption separator text
+public:
+ SwCaptionDialog( Window *pParent, SwView &rV );
+ ~SwCaptionDialog();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/dbconfig.hxx b/sw/source/core/uibase/inc/dbconfig.hxx
new file mode 100644
index 000000000000..042a719b7338
--- /dev/null
+++ b/sw/source/core/uibase/inc/dbconfig.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DBCONFIG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DBCONFIG_HXX
+
+#include <unotools/configitem.hxx>
+#include "swdllapi.h"
+
+struct SwDBData;
+
+class SW_DLLPUBLIC SwDBConfig : public utl::ConfigItem
+{
+ SAL_DLLPRIVATE const com::sun::star::uno::Sequence<OUString>& GetPropertyNames();
+
+ SwDBData* pAdrImpl;
+ SwDBData* pBibImpl;
+
+public:
+ SwDBConfig();
+ virtual ~SwDBConfig();
+
+ void Load();
+ const SwDBData& GetAddressSource();
+ const SwDBData& GetBibliographySource();
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/dbinsdlg.hxx b/sw/source/core/uibase/inc/dbinsdlg.hxx
new file mode 100644
index 000000000000..4d271dd41e2a
--- /dev/null
+++ b/sw/source/core/uibase/inc/dbinsdlg.hxx
@@ -0,0 +1,171 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DBINSDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DBINSDLG_HXX
+
+#include <vcl/button.hxx>
+#include <vcl/group.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/layout.hxx>
+#include <vcl/lstbox.hxx>
+#include <svtools/svmedit.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <unotools/configitem.hxx>
+#include <numfmtlb.hxx>
+#include <swdbdata.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.h>
+#include <boost/ptr_container/ptr_vector.hpp>
+#include <o3tl/sorted_vector.hxx>
+
+namespace com{namespace sun{namespace star{
+ namespace sdbcx{
+ class XColumnsSupplier;
+ }
+ namespace sdbc{
+ class XDataSource;
+ class XConnection;
+ class XResultSet;
+ }
+}}}
+
+class SwTableAutoFmt;
+class SwView;
+class SfxItemSet;
+class SwTableRep;
+struct _DB_Column;
+typedef boost::ptr_vector<_DB_Column> _DB_Columns;
+
+struct SwInsDBColumn
+{
+ OUString sColumn, sUsrNumFmt;
+ sal_Int32 nDBNumFmt;
+ sal_uInt32 nUsrNumFmt;
+ LanguageType eUsrNumFmtLng;
+ sal_uInt16 nCol;
+ sal_Bool bHasFmt : 1;
+ sal_Bool bIsDBFmt : 1;
+
+ SwInsDBColumn( const OUString& rStr, sal_uInt16 nColumn )
+ : sColumn( rStr ),
+ nDBNumFmt( 0 ),
+ nUsrNumFmt( 0 ),
+ eUsrNumFmtLng( LANGUAGE_SYSTEM ),
+ nCol( nColumn ),
+ bHasFmt(sal_False),
+ bIsDBFmt(sal_True)
+ {}
+
+ bool operator==( const SwInsDBColumn& rCmp ) const
+ { return sColumn == rCmp.sColumn; }
+ bool operator<( const SwInsDBColumn& rCmp ) const;
+};
+
+class SwInsDBColumns : public o3tl::sorted_vector<SwInsDBColumn*, o3tl::less_ptr_to<SwInsDBColumn> >
+{
+public:
+ ~SwInsDBColumns() { DeleteAndDestroyAll(); }
+};
+
+class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem
+{
+ RadioButton* m_pRbAsTable;
+ RadioButton* m_pRbAsField;
+ RadioButton* m_pRbAsText;
+
+ VclFrame* m_pHeadFrame;
+
+ ListBox* m_pLbTblDbColumn;
+ ListBox* m_pLbTxtDbColumn;
+
+ VclFrame* m_pFormatFrame;
+ RadioButton* m_pRbDbFmtFromDb;
+ RadioButton* m_pRbDbFmtFromUsr;
+ NumFormatListBox* m_pLbDbFmtFromUsr;
+
+ /* ----- Page Text/Field ------- */
+ PushButton* m_pIbDbcolToEdit;
+ VclMultiLineEdit* m_pEdDbText;
+ FixedText* m_pFtDbParaColl;
+ ListBox* m_pLbDbParaColl;
+
+ /* ----- Page Table ------------ */
+ PushButton* m_pIbDbcolAllTo;
+ PushButton* m_pIbDbcolOneTo;
+ PushButton* m_pIbDbcolOneFrom;
+ PushButton* m_pIbDbcolAllFrom;
+ FixedText* m_pFtTableCol;
+ ListBox* m_pLbTableCol;
+ CheckBox* m_pCbTableHeadon;
+ RadioButton* m_pRbHeadlColnms;
+ RadioButton* m_pRbHeadlEmpty;
+ PushButton* m_pPbTblFormat;
+ PushButton* m_pPbTblAutofmt;
+
+ SwInsDBColumns aDBColumns;
+ const SwDBData aDBData;
+
+ Link aOldNumFmtLnk;
+ OUString sNoTmpl;
+
+ SwView* pView;
+ SwTableAutoFmt* pTAutoFmt;
+
+ SfxItemSet* pTblSet;
+ SwTableRep* pRep;
+ sal_Int32 nGBFmtLen;
+
+ DECL_LINK( PageHdl, Button* );
+ DECL_LINK( AutoFmtHdl, PushButton* );
+ DECL_LINK( TblFmtHdl, PushButton* );
+ DECL_LINK( DBFormatHdl, Button* );
+ DECL_LINK( TblToFromHdl, Button* );
+ DECL_LINK( SelectHdl, ListBox* );
+ DECL_LINK( DblClickHdl, ListBox* );
+ DECL_LINK( HeaderHdl, Button* );
+
+ bool SplitTextToColArr( const OUString& rTxt, _DB_Columns& rColArr, sal_Bool bInsField );
+ using SfxModalDialog::Notify;
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+ virtual void Commit();
+ void Load();
+
+ // set the tables - properties
+ void SetTabSet();
+
+public:
+ SwInsertDBColAutoPilot( SwView& rView,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> rxSource,
+ com::sun::star::uno::Reference<com::sun::star::sdbcx::XColumnsSupplier>,
+ const SwDBData& rData );
+
+ virtual ~SwInsertDBColAutoPilot();
+
+ 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);
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/dbtree.hxx b/sw/source/core/uibase/inc/dbtree.hxx
new file mode 100644
index 000000000000..7120cbf25e17
--- /dev/null
+++ b/sw/source/core/uibase/inc/dbtree.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DBTREE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DBTREE_HXX
+
+#include <svtools/treelistbox.hxx>
+#include <com/sun/star/uno/Reference.h>
+
+#include "swdllapi.h"
+#include <swtypes.hxx>
+
+class SwDBTreeList_Impl;
+class SwWrtShell;
+
+class SW_DLLPUBLIC SwDBTreeList : public SvTreeListBox
+{
+ ImageList aImageList;
+ Image aDBBMP;
+ Image aTableBMP;
+ Image aQueryBMP;
+
+ OUString sDefDBName;
+ bool bInitialized;
+ sal_Bool bShowColumns;
+
+ SwDBTreeList_Impl* pImpl;
+
+ SAL_DLLPRIVATE DECL_LINK( DBCompare, SvSortData* );
+
+ SAL_DLLPRIVATE void InitTreeList();
+ SAL_DLLPRIVATE virtual void RequestingChildren( SvTreeListEntry* pParent );
+
+ SAL_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ SAL_DLLPRIVATE virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+
+ using SvTreeListBox::Select;
+
+public:
+ SwDBTreeList(Window* pParent, WinBits nStyle);
+ virtual ~SwDBTreeList();
+ virtual Size GetOptimalSize() const;
+
+ OUString GetDBName( OUString& rTableName, OUString& rColumnName, sal_Bool* pbIsTable = 0);
+
+ void Select( const OUString& rDBName, const OUString& rTableName,
+ const OUString& rColumnName );
+
+ void ShowColumns(sal_Bool bShowCol);
+ void SetWrtShell(SwWrtShell& rSh);
+
+ void AddDataSource(const OUString& rSource);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/dbui.hxx b/sw/source/core/uibase/inc/dbui.hxx
new file mode 100644
index 000000000000..7105b2ec0199
--- /dev/null
+++ b/sw/source/core/uibase/inc/dbui.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DBUI_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DBUI_HXX
+
+#include <svx/stddlg.hxx>
+
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+
+class SW_DLLPUBLIC PrintMonitor: public ModelessDialog
+{
+public:
+ enum PrintMonitorType
+ {
+ MONITOR_TYPE_PRINT,
+ MONITOR_TYPE_SAVE
+ };
+ FixedText* m_pDocName;
+ FixedText* m_pPrinting;
+ FixedText* m_pPrinter;
+ FixedText* m_pPrintInfo;
+ CancelButton* m_pCancel;
+
+ PrintMonitor( Window *pParent, PrintMonitorType eType );
+};
+
+class CreateMonitor : public ModelessDialog
+{
+public:
+ CreateMonitor( Window *pParent );
+
+ void SetTotalCount( sal_Int32 nTotal );
+ void SetCurrentPosition( sal_Int32 nCurrent );
+
+ void SetCancelHdl( const Link& rLink );
+
+private:
+ void UpdateCountingText();
+
+private:
+ FixedText* m_pCounting;
+ CancelButton* m_pCancelButton;
+
+ OUString m_sCountingPattern;
+ OUString m_sVariable_Total;
+ OUString m_sVariable_Position;
+ sal_Int32 m_nTotalCount;
+ sal_Int32 m_nCurrentPosition;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/dialmgr.hxx b/sw/source/core/uibase/inc/dialmgr.hxx
new file mode 100644
index 000000000000..468b90402f9b
--- /dev/null
+++ b/sw/source/core/uibase/inc/dialmgr.hxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DIALMGR_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DIALMGR_HXX
+
+#include <tools/resid.hxx>
+
+struct SwDialogsResMgr
+{
+ static ResMgr* GetResMgr();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/docfnote.hxx b/sw/source/core/uibase/inc/docfnote.hxx
new file mode 100644
index 000000000000..c5289213d2b2
--- /dev/null
+++ b/sw/source/core/uibase/inc/docfnote.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DOCFNOTE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DOCFNOTE_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+class SwWrtShell;
+
+class SwFootNoteOptionDlg :public SfxTabDialog
+{
+ SwWrtShell &rSh;
+ Link aOldOkHdl;
+
+ sal_uInt16 m_nFootNoteId;
+ sal_uInt16 m_nEndNoteId;
+
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
+
+ DECL_LINK( OkHdl, Button * );
+
+public:
+ SwFootNoteOptionDlg(Window *pParent, SwWrtShell &rSh );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/docstdlg.hxx b/sw/source/core/uibase/inc/docstdlg.hxx
new file mode 100644
index 000000000000..60275da16acd
--- /dev/null
+++ b/sw/source/core/uibase/inc/docstdlg.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DOCSTDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DOCSTDLG_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+#include <vcl/fixed.hxx>
+#include <svtools/stdctrl.hxx>
+
+#include "docstat.hxx"
+
+/*--------------------------------------------------------------------
+ Description: DocInfo now as page
+ --------------------------------------------------------------------*/
+class SwDocStatPage: public SfxTabPage
+{
+public:
+ SwDocStatPage(Window *pParent, const SfxItemSet &rSet);
+ ~SwDocStatPage();
+
+ static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
+
+protected:
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
+ virtual void Reset (const SfxItemSet &rSet);
+
+ DECL_LINK(UpdateHdl, void *);
+
+private:
+ FixedText* m_pPageNo;
+ FixedText* m_pTableNo;
+ FixedText* m_pGrfNo;
+ FixedText* m_pOLENo;
+ FixedText* m_pParaNo;
+ FixedText* m_pWordNo;
+ FixedText* m_pCharNo;
+ FixedText* m_pCharExclSpacesNo;
+
+ FixedText* m_pLineLbl;
+ FixedText* m_pLineNo;
+ PushButton* m_pUpdatePB;
+
+ SwDocStat aDocStat;
+
+ void Update();
+
+ using Window::SetData;
+ void SetData(const SwDocStat &rStat);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/drawbase.hxx b/sw/source/core/uibase/inc/drawbase.hxx
new file mode 100644
index 000000000000..98c111dc2a6a
--- /dev/null
+++ b/sw/source/core/uibase/inc/drawbase.hxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DRAWBASE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DRAWBASE_HXX
+
+#include <tools/gen.hxx>
+
+class SwView;
+class SwWrtShell;
+class SwEditWin;
+class KeyEvent;
+class MouseEvent;
+
+/*************************************************************************
+|*
+|* base class for all functions
+|*
+\************************************************************************/
+
+class SwDrawBase
+{
+protected:
+ SwView* m_pView;
+ SwWrtShell* m_pSh;
+ SwEditWin* m_pWin;
+ Point m_aStartPos; // position of BeginCreate
+ Point m_aMDPos; // position of MouseButtonDown
+ sal_uInt16 m_nSlotId;
+ bool m_bCreateObj :1;
+ bool m_bInsForm :1;
+
+ Point GetDefaultCenterPos();
+public:
+ SwDrawBase(SwWrtShell *pSh, SwEditWin* pWin, SwView* pView);
+ virtual ~SwDrawBase();
+
+ void SetDrawPointer();
+ void EnterSelectMode(const MouseEvent& rMEvt);
+ inline bool IsInsertForm() const { return m_bInsForm; }
+ inline bool IsCreateObj() const { return m_bCreateObj; }
+
+ // mouse- & key events; return value=sal_True: event was edited
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+
+ void BreakCreate();
+ void SetSlotId(sal_uInt16 nSlot) {m_nSlotId = nSlot;}
+ sal_uInt16 GetSlotId() { return m_nSlotId;}
+
+ virtual void Activate(const sal_uInt16 nSlotId); // activate function
+ virtual void Deactivate(); // deactivate function
+
+ virtual void CreateDefaultObject();
+
+ // #i33136#
+ virtual bool doConstructOrthogonal() const;
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_DRAWBASE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/drawsh.hxx b/sw/source/core/uibase/inc/drawsh.hxx
new file mode 100644
index 000000000000..545faf748d7d
--- /dev/null
+++ b/sw/source/core/uibase/inc/drawsh.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DRAWSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DRAWSH_HXX
+
+#include "drwbassh.hxx"
+
+class SwDrawBaseShell;
+
+class SwDrawShell: public SwDrawBaseShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_DRAWSHELL)
+ TYPEINFO();
+
+ SwDrawShell(SwView &rView);
+
+ void Execute(SfxRequest &);
+ void GetState(SfxItemSet &);
+ void ExecDrawDlg(SfxRequest& rReq);
+ void ExecDrawAttrArgs(SfxRequest& rReq);
+ void GetDrawAttrState(SfxItemSet &rSet);
+
+ void ExecFormText(SfxRequest& rReq);
+ void GetFormTextState(SfxItemSet& rSet);
+
+ // #i123922# added helper methods to handle applying graphic data to draw objects
+ SdrObject* IsSingleFillableNonOLESelected();
+ void InsertPictureFromFile(SdrObject& rObject);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/drformsh.hxx b/sw/source/core/uibase/inc/drformsh.hxx
new file mode 100644
index 000000000000..8f58bae51b96
--- /dev/null
+++ b/sw/source/core/uibase/inc/drformsh.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DRFORMSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DRFORMSH_HXX
+
+#include "drwbassh.hxx"
+
+class SwDrawBaseShell;
+
+class SwDrawFormShell: public SwDrawBaseShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_DRAWFORMSHELL)
+ TYPEINFO();
+
+ SwDrawFormShell(SwView &rView);
+ virtual ~SwDrawFormShell();
+
+ void Execute(SfxRequest &);
+ void GetState(SfxItemSet &);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/drpcps.hxx b/sw/source/core/uibase/inc/drpcps.hxx
new file mode 100644
index 000000000000..dd4a37377a4b
--- /dev/null
+++ b/sw/source/core/uibase/inc/drpcps.hxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DRPCPS_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DRPCPS_HXX
+
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/tabdlg.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/field.hxx>
+
+#include <vcl/edit.hxx>
+
+#include <vcl/lstbox.hxx>
+
+class SwWrtShell;
+
+// class SwDropCapsDlg ******************************************************
+
+class SwDropCapsDlg : public SfxSingleTabDialog
+{
+public:
+ SwDropCapsDlg(Window *pParent, const SfxItemSet &rSet );
+};
+
+class SwDropCapsPict;
+
+// class SwDropCapsPage *****************************************************
+
+class SwDropCapsPage : public SfxTabPage
+{
+friend class SwDropCapsPict;
+ CheckBox* m_pDropCapsBox;
+ CheckBox* m_pWholeWordCB;
+ FixedText* m_pSwitchText;
+ NumericField* m_pDropCapsField;
+ FixedText* m_pLinesText;
+ NumericField* m_pLinesField;
+ FixedText* m_pDistanceText;
+ MetricField* m_pDistanceField;
+ FixedText* m_pTextText;
+ Edit* m_pTextEdit;
+ FixedText* m_pTemplateText;
+ ListBox* m_pTemplateBox;
+
+ SwDropCapsPict* m_pPict;
+
+ sal_Bool bModified;
+ sal_Bool bFormat;
+ sal_Bool bHtmlMode;
+
+ SwWrtShell &rSh;
+
+ SwDropCapsPage(Window *pParent, const SfxItemSet &rSet);
+ ~SwDropCapsPage();
+
+ virtual int DeactivatePage(SfxItemSet *pSet);
+ void FillSet( SfxItemSet &rSet );
+
+ DECL_LINK(ClickHdl, void *);
+ DECL_LINK( ModifyHdl, Edit * );
+ DECL_LINK(SelectHdl, void *);
+ DECL_LINK(WholeWordHdl, void *);
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+
+ static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
+ static sal_uInt16* GetRanges();
+
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
+ virtual void Reset (const SfxItemSet &rSet);
+
+ void SetFormat(sal_Bool bSet){bFormat = bSet;}
+protected:
+ void aSwitchText(sal_Bool bChecked);
+ //void SW_RES(int arg1);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/drwbassh.hxx b/sw/source/core/uibase/inc/drwbassh.hxx
new file mode 100644
index 000000000000..7bb62ad9076c
--- /dev/null
+++ b/sw/source/core/uibase/inc/drwbassh.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DRWBASSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DRWBASSH_HXX
+#include "basesh.hxx"
+
+class SwView;
+class SfxItemSet;
+class SwDrawBase;
+class AbstractSvxNameDialog;
+struct SvxSwFrameValidation;
+
+class SwDrawBaseShell: public SwBaseShell
+{
+ SwDrawBase* pDrawActual;
+
+ sal_uInt16 eDrawMode;
+
+ DECL_LINK( CheckGroupShapeNameHdl, AbstractSvxNameDialog* );
+ DECL_LINK(ValidatePosition, SvxSwFrameValidation* );
+public:
+ SwDrawBaseShell(SwView &rShell);
+ virtual ~SwDrawBaseShell();
+
+ SFX_DECL_INTERFACE(SW_DRAWBASESHELL)
+ TYPEINFO();
+
+ void Execute(SfxRequest &);
+ void GetState(SfxItemSet &);
+ void GetDrawAttrStateForIFBX( SfxItemSet& rSet );
+ void DisableState(SfxItemSet &rSet) { Disable(rSet);}
+ sal_Bool Disable(SfxItemSet& rSet, sal_uInt16 nWhich = 0);
+
+ void StateStatusline(SfxItemSet &rSet);
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/drwtxtsh.hxx b/sw/source/core/uibase/inc/drwtxtsh.hxx
new file mode 100644
index 000000000000..9fbe1b20eee5
--- /dev/null
+++ b/sw/source/core/uibase/inc/drwtxtsh.hxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DRWTXTSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DRWTXTSH_HXX
+
+#include <sfx2/shell.hxx>
+#include "shellid.hxx"
+#include <unotools/caserotate.hxx>
+
+class SdrView;
+class SwView;
+class SwWrtShell;
+
+class SwDrawTextShell: public SfxShell
+{
+ SwView &rView;
+ RotateTransliteration m_aRotateCase;
+
+ SdrView *pSdrView;
+
+ void SetAttrToMarked(const SfxItemSet& rAttr);
+ void InsertSymbol(SfxRequest& rReq);
+ sal_Bool IsTextEdit();
+public:
+ SFX_DECL_INTERFACE(SW_DRWTXTSHELL)
+ TYPEINFO();
+
+ SwView &GetView() { return rView; }
+ SwWrtShell &GetShell();
+
+ SwDrawTextShell(SwView &rView);
+ virtual ~SwDrawTextShell();
+
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
+
+ void StateDisableItems(SfxItemSet &);
+
+ void Execute(SfxRequest &);
+ void ExecDraw(SfxRequest &);
+ void GetStatePropPanelAttr(SfxItemSet &);
+ void GetState(SfxItemSet &);
+ void GetDrawTxtCtrlState(SfxItemSet&);
+
+ void ExecFontWork(SfxRequest& rReq);
+ void StateFontWork(SfxItemSet& rSet);
+ void ExecFormText(SfxRequest& rReq);
+ void GetFormTextState(SfxItemSet& rSet);
+ void ExecDrawLingu(SfxRequest &rReq);
+ void ExecUndo(SfxRequest &rReq);
+ void StateUndo(SfxItemSet &rSet);
+ void ExecClpbrd(SfxRequest &rReq);
+ void StateClpbrd(SfxItemSet &rSet);
+ void StateInsert(SfxItemSet &rSet);
+ void ExecTransliteration(SfxRequest &);
+ void ExecRotateTransliteration(SfxRequest &);
+
+ void Init();
+ void StateStatusline(SfxItemSet &rSet);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/dselect.hxx b/sw/source/core/uibase/inc/dselect.hxx
new file mode 100644
index 000000000000..d3905bc27e57
--- /dev/null
+++ b/sw/source/core/uibase/inc/dselect.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_DSELECT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_DSELECT_HXX
+
+#include "drawbase.hxx"
+
+/*************************************************************************
+|*
+|* draw rectangle
+|*
+\************************************************************************/
+
+class DrawSelection : public SwDrawBase
+{
+ public:
+ DrawSelection(SwWrtShell* pSh, SwEditWin* pWin, SwView* pView);
+
+ // mouse- & key events
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+
+ virtual void Activate(const sal_uInt16 nSlotId); // activate function
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_DSELECT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/edtwin.hxx b/sw/source/core/uibase/inc/edtwin.hxx
new file mode 100644
index 000000000000..7b6c807a6223
--- /dev/null
+++ b/sw/source/core/uibase/inc/edtwin.hxx
@@ -0,0 +1,302 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_EDTWIN_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_EDTWIN_HXX
+
+#include <FrameControlsManager.hxx>
+
+#include <svx/svdobj.hxx>
+#include <tools/link.hxx>
+#include <vcl/timer.hxx>
+#include <vcl/window.hxx>
+#include <svtools/transfer.hxx>
+#include <swevent.hxx>
+
+class SwWrtShell;
+class SwView;
+class SwRect;
+class SwViewShell;
+class SwAnchorMarker;
+class SdrObject;
+class SwShadowCursor;
+class DataChangedEvent;
+class SvxAutoCorrCfg;
+class SvxAutoCorrect;
+class SwPaM;
+struct SwApplyTemplate;
+struct QuickHelpData;
+class SdrDropMarkerOverlay;
+
+/*--------------------------------------------------------------------
+ Description: input window
+ --------------------------------------------------------------------*/
+
+/** Window class for the Writer edit area, this is the one handling mouse
+ and keyboard events and doing the final painting of the document from
+ the buffered layout.
+
+ To translate the pixel positions from the buffer OutputDevice to the real
+ pixel positions, use the PixelToLogic methods of this class.
+ */
+class SwEditWin: public Window,
+ public DropTargetHelper, public DragSourceHelper
+{
+friend void ScrollMDI(SwViewShell* pVwSh, const SwRect&,
+ sal_uInt16 nRangeX, sal_uInt16 nRangeY);
+friend sal_Bool IsScrollMDI(SwViewShell* pVwSh, const SwRect&);
+
+friend void SizeNotify(SwViewShell* pVwSh, const Size &);
+
+friend void PageNumNotify( SwViewShell* pVwSh,
+ sal_uInt16 nPhyNum,
+ sal_uInt16 nVirtNum,
+ const OUString& rPg );
+
+ static QuickHelpData* m_pQuickHlpData;
+
+ static long m_nDDStartPosX, m_nDDStartPosY;
+
+ static Color m_aTextColor; // text color; for the watering can
+ static bool m_bTransparentBackColor; // transparent background
+ static Color m_aTextBackColor; // text background; for the watering can
+
+ /*
+ * timer and handler for scrolling on when the mousepointer
+ * stopps outside of EditWin during a drag-operation.
+ * The selection is increased towards the mouse position
+ * regularly.
+ */
+ AutoTimer m_aTimer;
+ // timer for overlapping KeyInputs (e.g. for tables)
+ Timer m_aKeyInputTimer;
+ // timer for ANY-KeyInut question without a following KeyInputEvent
+ Timer m_aKeyInputFlushTimer;
+
+ OUString m_aInBuffer;
+ LanguageType m_eBufferLanguage;
+ Point m_aStartPos;
+ Point m_aMovePos;
+ Point m_aRszMvHdlPt;
+ Timer m_aTemplateTimer;
+
+ // type/object where the mouse pointer is
+ SwCallMouseEvent m_aSaveCallEvent;
+
+ SwApplyTemplate *m_pApplyTempl;
+ SwAnchorMarker *m_pAnchorMarker; // for relocating the anchor
+
+ SdrDropMarkerOverlay *m_pUserMarker;
+ SdrObject *m_pUserMarkerObj;
+ SwShadowCursor *m_pShadCrsr;
+ Point *m_pRowColumnSelectionStart; // save position where table row/column selection has been started
+
+ SwView &m_rView;
+
+ int m_aActHitType; // current mouse pointer
+
+ sal_uLong m_nDropFormat; // format from the last QueryDrop
+ sal_uInt16 m_nDropAction; // action from the last QueryDrop
+ sal_uInt16 m_nDropDestination; // destination from the last QueryDrop
+
+ sal_uInt16 m_eBezierMode;
+ sal_uInt16 m_nInsFrmColCount; // column number for interactive frame
+ SdrObjKind m_eDrawMode;
+ sal_Bool m_bMBPressed : 1,
+ m_bInsDraw : 1,
+ m_bInsFrm : 1,
+ m_bIsInMove : 1,
+ m_bIsInDrag : 1, // don't execute StartExecuteDrag twice
+ m_bOldIdle : 1, // to stop to idle
+ m_bOldIdleSet : 1, // during QeueryDrop
+ m_bTblInsDelMode : 1,
+ m_bTblIsInsMode : 1,
+ m_bChainMode : 1, // connect frames
+ m_bWasShdwCrsr : 1, // ShadowCrsr was on in MouseButtonDown
+ m_bLockInput : 1, // lock while calc panel is active
+ m_bIsRowDrag : 1, //selection of rows is used, in combination with m_pRowColumnSelectionStart
+ /** #i42732# display status of font size/name depending on either the input language or the
+ selection position depending on what has changed lately
+ */
+ m_bUseInputLanguage: 1,
+ m_bObjectSelect : 1;
+
+ sal_uInt16 m_nKS_NUMDOWN_Count; // #i23725#
+ sal_uInt16 m_nKS_NUMINDENTINC_Count;
+
+ SwFrameControlsManager m_aFrameControlsManager;
+
+ void LeaveArea(const Point &);
+ void JustifyAreaTimer();
+ inline void EnterArea();
+
+ void RstMBDownFlags();
+
+ void ChangeFly( sal_uInt8 nDir, sal_Bool bWeb = sal_False );
+ void ChangeDrawing( sal_uInt8 nDir );
+
+ sal_Bool EnterDrawMode(const MouseEvent& rMEvt, const Point& aDocPos);
+ sal_Bool RulerColumnDrag( const MouseEvent& rMEvt, sal_Bool bVerticalMode);
+
+ // helper function for D&D
+ void DropCleanup();
+ void CleanupDropUserMarker();
+ sal_uInt16 GetDropDestination( const Point& rPixPnt,
+ SdrObject ** ppObj = 0 );
+ //select the object/cursor at the mouse position of the context menu request
+ sal_Bool SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos );
+
+ /*
+ * handler for scrolling on when the mousepointer
+ * stopps outside of EditWin during a drag-operation.
+ * The selection is regularly increased towards the mouse
+ * position.
+ */
+ DECL_LINK( TimerHandler, void * );
+ void StartDDTimer();
+ void StopDDTimer(SwWrtShell *, const Point &);
+ DECL_LINK( DDHandler, void * );
+
+ // timer for ANY-KeyInut question without a following KeyInputEvent
+ DECL_LINK( KeyInputFlushHandler, void * );
+
+ // timer for overlapping KeyInputs (e.g. for tables)
+ DECL_LINK( KeyInputTimerHandler, void * );
+
+ // timer for ApplyTemplates via mouse (in disguise Drag&Drop)
+ DECL_LINK( TemplateTimerHdl, void * );
+
+ using OutputDevice::GetTextColor;
+
+protected:
+
+ virtual void DataChanged( const DataChangedEvent& );
+ virtual void PrePaint();
+ virtual void Paint( const Rectangle& rRect );
+ virtual void KeyInput(const KeyEvent &rKEvt);
+
+ virtual void GetFocus();
+ virtual void LoseFocus();
+
+ virtual void MouseMove(const MouseEvent& rMEvt);
+ virtual void MouseButtonDown(const MouseEvent& rMEvt);
+ virtual void MouseButtonUp(const MouseEvent& rMEvt);
+ virtual void RequestHelp(const HelpEvent& rEvt);
+
+ virtual void Command( const CommandEvent& rCEvt );
+
+ // Drag & Drop Interface
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+
+ virtual OUString GetSurroundingText() const;
+ virtual Selection GetSurroundingTextSelection() const;
+
+ void ShowAutoTextCorrectQuickHelp( const OUString& rWord, SvxAutoCorrCfg* pACfg,
+ SvxAutoCorrect* pACorr, bool bFromIME = false );
+
+ /// Returns true if in header/footer area, or in the header/footer control.
+ bool IsInHeaderFooter( const Point &rDocPt, FrameControlType &rControl ) const;
+
+ bool IsOverHeaderFooterFly( const Point& rDocPos, FrameControlType& rControl, bool& bOverFly, bool& bPageAnchored ) const;
+public:
+
+ void UpdatePointer(const Point &, sal_uInt16 nButtons = 0);
+
+ sal_Bool IsDrawSelMode();
+ sal_Bool IsDrawAction() { return (m_bInsDraw); }
+ void SetDrawAction(sal_Bool bFlag) { m_bInsDraw = bFlag; }
+
+ void SetObjectSelect( sal_Bool bVal ) { m_bObjectSelect = bVal; }
+ sal_Bool IsObjectSelect() const { return m_bObjectSelect; }
+
+ inline SdrObjKind GetSdrDrawMode(/*sal_Bool bBuf = sal_False*/) const { return m_eDrawMode; }
+ inline void SetSdrDrawMode( SdrObjKind eSdrObjectKind ) { m_eDrawMode = eSdrObjectKind; SetObjectSelect( sal_False ); }
+ void StdDrawMode( SdrObjKind eSdrObjectKind, sal_Bool bObjSelect );
+
+ bool IsFrmAction() const { return (m_bInsFrm); }
+ sal_uInt16 GetBezierMode() const { return m_eBezierMode; }
+ void SetBezierMode(sal_uInt16 eBezMode) { m_eBezierMode = eBezMode; }
+ void EnterDrawTextMode(const Point& aDocPos); // turn on DrawTextEditMode
+ void InsFrm(sal_uInt16 nCols);
+ void StopInsFrm();
+ sal_uInt16 GetFrmColCount() const {return m_nInsFrmColCount;} // column number for interactive frame
+
+ void SetChainMode( sal_Bool bOn );
+ sal_Bool IsChainMode() const { return m_bChainMode; }
+
+ void FlushInBuffer();
+ sal_Bool IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCrsr ) const;
+
+ void SetApplyTemplate(const SwApplyTemplate &);
+ SwApplyTemplate* GetApplyTemplate() const { return m_pApplyTempl; }
+
+ void StartExecuteDrag();
+ void DragFinished();
+ sal_uInt16 GetDropAction() const { return m_nDropAction; }
+ sal_uLong GetDropFormat() const { return m_nDropFormat; }
+
+ Color GetTextColor() { return m_aTextColor; }
+
+ void SetTextColor(const Color& rCol ) { m_aTextColor = rCol; }
+
+ Color GetTextBackColor()
+ { return m_aTextBackColor; }
+ void SetTextBackColor(const Color& rCol )
+ { m_aTextBackColor = rCol; }
+ void SetTextBackColorTransparent(bool bSet)
+ { m_bTransparentBackColor = bSet; }
+ bool IsTextBackColorTransparent()
+ { return m_bTransparentBackColor; }
+ void LockKeyInput(sal_Bool bSet){m_bLockInput = bSet;}
+
+ const SwView &GetView() const { return m_rView; }
+ SwView &GetView() { return m_rView; }
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ static inline long GetDDStartPosX() { return m_nDDStartPosX; }
+ static inline long GetDDStartPosY() { return m_nDDStartPosY; }
+
+ static void _InitStaticData();
+ static void _FinitStaticData();
+
+ //#i3370# remove quick help to prevent saving of autocorrection suggestions
+ void StopQuickHelp();
+
+ // #i42921# - add parameter <bVerticalMode>
+ sal_Bool RulerMarginDrag( const MouseEvent& rMEvt,
+ const bool bVerticalMode );
+
+ /** #i42732# display status of font size/name depending on either the input
+ language or the selection position depending on what has changed lately
+ */
+ void SetUseInputLanguage( sal_Bool bNew );
+ sal_Bool IsUseInputLanguage() const { return m_bUseInputLanguage; }
+
+ SwFrameControlsManager& GetFrameControlsManager() { return m_aFrameControlsManager; }
+
+ SwEditWin(Window *pParent, SwView &);
+ virtual ~SwEditWin();
+ virtual void SwitchView();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/envimg.hxx b/sw/source/core/uibase/inc/envimg.hxx
new file mode 100644
index 000000000000..9c766e11acea
--- /dev/null
+++ b/sw/source/core/uibase/inc/envimg.hxx
@@ -0,0 +1,91 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_ENVIMG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_ENVIMG_HXX
+
+#include <svl/poolitem.hxx>
+#include <unotools/configitem.hxx>
+#include "swdllapi.h"
+
+// MakeSender -----------------------------------------------------------------
+SW_DLLPUBLIC OUString MakeSender();
+
+// enum -----------------------------------------------------------------------
+enum SwEnvAlign
+{
+ ENV_HOR_LEFT = 0,
+ ENV_HOR_CNTR,
+ ENV_HOR_RGHT,
+ ENV_VER_LEFT,
+ ENV_VER_CNTR,
+ ENV_VER_RGHT
+};
+
+// class SwEnvItem ------------------------------------------------------------
+class SW_DLLPUBLIC SwEnvItem : public SfxPoolItem
+{
+public:
+
+ OUString aAddrText; // text for receiver
+ sal_Bool bSend; // sender?
+ OUString aSendText; // text for sender
+ sal_Int32 lAddrFromLeft; // left gap for receiver (twips)
+ sal_Int32 lAddrFromTop; // upper gap for receiver (twips)
+ sal_Int32 lSendFromLeft; // left gap for sender (twips)
+ sal_Int32 lSendFromTop; // upper gap for sender (twips)
+ sal_Int32 lWidth; // envelope's width (twips)
+ sal_Int32 lHeight; // envelope's height (twips)
+ SwEnvAlign eAlign; // alignment at indent
+ sal_Bool bPrintFromAbove; // print from above?
+ sal_Int32 lShiftRight; // shift to right (twips)
+ sal_Int32 lShiftDown; // shift down (twips)
+
+ SwEnvItem();
+ SwEnvItem(const SwEnvItem& rItem);
+
+ TYPEINFO();
+
+ SwEnvItem& operator =(const SwEnvItem& rItem);
+
+ virtual bool operator ==(const SfxPoolItem& rItem) const;
+
+ virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+};
+
+// class SwEnvCfgItem -------------------------------------------------------
+class SwEnvCfgItem : public utl::ConfigItem
+{
+ SwEnvItem aEnvItem;
+
+ com::sun::star::uno::Sequence<OUString> GetPropertyNames();
+public:
+ SwEnvCfgItem();
+ ~SwEnvCfgItem();
+
+ SwEnvItem& GetItem() {return aEnvItem;}
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/envlop.hxx b/sw/source/core/uibase/inc/envlop.hxx
new file mode 100644
index 000000000000..b7b7906ec79e
--- /dev/null
+++ b/sw/source/core/uibase/inc/envlop.hxx
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_ENVLOP_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_ENVLOP_HXX
+
+#include <svtools/svmedit.hxx>
+#include <sfx2/tabdlg.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/edit.hxx>
+
+#include <vcl/lstbox.hxx>
+
+#include <vcl/button.hxx>
+
+#include "envimg.hxx"
+
+#define GetFldVal(rField) (rField).Denormalize((rField).GetValue(FUNIT_TWIP))
+#define SetFldVal(rField, lValue) (rField).SetValue((rField).Normalize(lValue), FUNIT_TWIP)
+
+class SwEnvPage;
+class SwEnvFmtPage;
+class SwWrtShell;
+class Printer;
+
+// class SwEnvPreview ---------------------------------------------------------
+class SwEnvPreview : public Window
+{
+ void Paint(const Rectangle&);
+
+public:
+
+ SwEnvPreview(Window * pParent, WinBits nStyle);
+
+protected:
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual Size GetOptimalSize() const;
+};
+
+// class SwEnvDlg -----------------------------------------------------------
+class SwEnvDlg : public SfxTabDialog
+{
+friend class SwEnvPage;
+friend class SwEnvFmtPage;
+friend class SwEnvPrtPage;
+friend class SwEnvPreview;
+
+ SwEnvItem aEnvItem;
+ SwWrtShell *pSh;
+ Printer *pPrinter;
+ SfxItemSet *pAddresseeSet;
+ SfxItemSet *pSenderSet;
+ sal_uInt16 m_nEnvPrintId;
+
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
+ virtual short Ok();
+
+public:
+ SwEnvDlg(Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, sal_Bool bInsert);
+ ~SwEnvDlg();
+};
+
+// class SwEnvPage ----------------------------------------------------------
+class SwEnvPage : public SfxTabPage
+{
+ VclMultiLineEdit* m_pAddrEdit;
+ ListBox* m_pDatabaseLB;
+ ListBox* m_pTableLB;
+ ListBox* m_pDBFieldLB;
+ PushButton* m_pInsertBT;
+ CheckBox* m_pSenderBox;
+ VclMultiLineEdit* m_pSenderEdit;
+ SwEnvPreview* m_pPreview;
+
+ SwWrtShell* pSh;
+ OUString sActDBName;
+
+ SwEnvPage(Window* pParent, const SfxItemSet& rSet);
+ ~SwEnvPage();
+
+ DECL_LINK( DatabaseHdl, ListBox * );
+ DECL_LINK(FieldHdl, void *);
+ DECL_LINK(SenderHdl, void *);
+
+ void InitDatabaseBox();
+
+ SwEnvDlg* GetParentSwEnvDlg() {return (SwEnvDlg*)GetParentDialog();}
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+
+ static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
+
+ virtual void ActivatePage(const SfxItemSet& rSet);
+ virtual int DeactivatePage(SfxItemSet* pSet = 0);
+ void FillItem(SwEnvItem& rItem);
+ virtual sal_Bool FillItemSet(SfxItemSet& rSet);
+ virtual void Reset(const SfxItemSet& rSet);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/fldedt.hxx b/sw/source/core/uibase/inc/fldedt.hxx
new file mode 100644
index 000000000000..89312e6421ee
--- /dev/null
+++ b/sw/source/core/uibase/inc/fldedt.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FLDEDT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FLDEDT_HXX
+#include <sfx2/basedlgs.hxx>
+#include <vcl/button.hxx>
+
+class SwView;
+class SwWrtShell;
+
+class SwFldEditDlg : public SfxSingleTabDialog
+{
+ SwWrtShell* pSh;
+ PushButton* m_pPrevBT;
+ PushButton* m_pNextBT;
+ PushButton* m_pAddressBT;
+
+ DECL_LINK(AddressHdl, void *);
+ DECL_LINK(NextPrevHdl, Button *pBt = 0);
+
+ void Init();
+ SfxTabPage* CreatePage(sal_uInt16 nGroup);
+
+public:
+
+ SwFldEditDlg(SwView& rVw);
+ ~SwFldEditDlg();
+
+ DECL_LINK(OKHdl, void *);
+
+ virtual short Execute();
+
+ void EnableInsert(sal_Bool bEnable);
+ void InsertHdl();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/fldmgr.hxx b/sw/source/core/uibase/inc/fldmgr.hxx
new file mode 100644
index 000000000000..62c4210cae3a
--- /dev/null
+++ b/sw/source/core/uibase/inc/fldmgr.hxx
@@ -0,0 +1,217 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FLDMGR_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FLDMGR_HXX
+
+#include "swdllapi.h"
+#include "swtypes.hxx"
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Any.h>
+#include <vector>
+
+namespace com{namespace sun{namespace star{
+ namespace container{
+ class XNameAccess;
+ }
+ namespace text{
+ class XNumberingTypeInfo;
+ }
+}}}
+
+class SwWrtShell;
+class SwField;
+class SwFieldType;
+class SwPaM;
+class SbModule;
+class SvxMacroItem;
+class SvNumberFormatter;
+class Window;
+
+/*--------------------------------------------------------------------
+ Description: the groups of fields
+ --------------------------------------------------------------------*/
+enum SwFldGroups
+{
+ GRP_DOC,
+ GRP_FKT,
+ GRP_REF,
+ GRP_REG,
+ GRP_DB,
+ GRP_VAR
+};
+
+struct SwFldGroupRgn
+{
+ sal_uInt16 nStart;
+ sal_uInt16 nEnd;
+};
+
+/*--------------------------------------------------------------------
+ Description: the field manager handles the insertation of fields
+ with command strings
+ --------------------------------------------------------------------*/
+struct SwInsertFld_Data
+{
+ sal_uInt16 nTypeId;
+ sal_uInt16 nSubType;
+ const OUString sPar1;
+ const OUString sPar2;
+ sal_uLong nFormatId;
+ SwWrtShell* pSh;
+ sal_Unicode cSeparator;
+ sal_Bool bIsAutomaticLanguage;
+ ::com::sun::star::uno::Any aDBDataSource;
+ ::com::sun::star::uno::Any aDBConnection;
+ ::com::sun::star::uno::Any aDBColumn;
+ Window* pParent; // parent dialog used for SwWrtShell::StartInputFldDlg()
+
+ SwInsertFld_Data(sal_uInt16 nType, sal_uInt16 nSub, const OUString& rPar1, const OUString& rPar2,
+ sal_uLong nFmtId, SwWrtShell* pShell = NULL, sal_Unicode cSep = ' ', sal_Bool bIsAutoLanguage = sal_True) :
+ nTypeId(nType),
+ nSubType(nSub),
+ sPar1(rPar1),
+ sPar2(rPar2),
+ nFormatId(nFmtId),
+ pSh(pShell),
+ cSeparator(cSep),
+ bIsAutomaticLanguage(bIsAutoLanguage),
+ pParent(0) {}
+
+ SwInsertFld_Data() :
+ pSh(0),
+ cSeparator(' '),
+ bIsAutomaticLanguage(sal_True){}
+
+};
+
+class SW_DLLPUBLIC SwFldMgr
+{
+private:
+ SwField* pCurFld;
+ SbModule* pModule;
+ const SvxMacroItem* pMacroItem;
+ SwWrtShell* pWrtShell; // can be ZERO too!
+ OUString aCurPar1;
+ OUString aCurPar2;
+ OUString sCurFrame;
+
+ OUString sMacroPath;
+ OUString sMacroName;
+
+ sal_uLong nCurFmt;
+ sal_Bool bEvalExp;
+
+ SAL_DLLPRIVATE sal_uInt16 GetCurrLanguage() const;
+
+ com::sun::star::uno::Reference<com::sun::star::container::XNameAccess> xDBContext;
+ com::sun::star::uno::Reference<com::sun::star::text::XNumberingTypeInfo> xNumberingInfo;
+ SAL_DLLPRIVATE com::sun::star::uno::Reference<com::sun::star::text::XNumberingTypeInfo> GetNumberingInfo()const;
+
+public:
+ SwFldMgr(SwWrtShell* pSh = 0);
+ ~SwFldMgr();
+
+ void SetWrtShell( SwWrtShell* pShell )
+ { pWrtShell = pShell; }
+
+ // insert field using TypeID (TYP_ ...)
+ sal_Bool InsertFld( const SwInsertFld_Data& rData );
+
+ // change the current field directly
+ void UpdateCurFld(sal_uLong nFormat,
+ const OUString& rPar1,
+ const OUString& rPar2,
+ SwField * _pField = 0); // #111840#
+
+ OUString GetCurFldPar1() const { return aCurPar1; }
+ OUString GetCurFldPar2() const { return aCurPar2; }
+ inline sal_uLong GetCurFldFmt() const;
+
+ // determine a field
+ SwField* GetCurFld();
+
+ void InsertFldType(SwFieldType& rType);
+
+ sal_Bool ChooseMacro(const OUString &rSelMacro = OUString());
+ void SetMacroPath(const OUString& rPath);
+ inline OUString GetMacroPath() const { return sMacroPath; }
+ inline OUString GetMacroName() const { return sMacroName; }
+ inline void SetMacroModule(SbModule* pMod) { pModule = pMod; }
+
+ // previous and next of the same type
+ sal_Bool GoNextPrev( sal_Bool bNext = sal_True, SwFieldType* pTyp = 0 );
+ sal_Bool GoNext( SwFieldType* pTyp = 0 ) { return GoNextPrev( sal_True, pTyp ); }
+ sal_Bool GoPrev( SwFieldType* pTyp = 0 ) { return GoNextPrev( sal_False, pTyp ); }
+
+ // query values from database fields (BASIC )
+// String GetDataBaseFieldValue(const String &rDBName, const String &rFieldName, SwWrtShell* pSh);
+ sal_Bool IsDBNumeric(const OUString& rDBName, const OUString& rTblQryName,
+ sal_Bool bIsTable, const OUString& rFldName);
+
+ // organise RefMark with names
+ bool CanInsertRefMark( const OUString& rStr );
+
+ // access to field types via ResId
+ sal_uInt16 GetFldTypeCount(sal_uInt16 nResId = USHRT_MAX) const;
+ SwFieldType* GetFldType(sal_uInt16 nResId, sal_uInt16 nId = 0) const;
+ SwFieldType* GetFldType(sal_uInt16 nResId, const OUString& rName) const;
+
+ void RemoveFldType(sal_uInt16 nResId, const OUString& rName);
+
+ // access via TypeId from the dialog
+ // Ids for a range of fields
+ const SwFldGroupRgn& GetGroupRange(sal_Bool bHtmlMode, sal_uInt16 nGrpId) const;
+ sal_uInt16 GetGroup(sal_Bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType = 0) const;
+
+ // the current field's TypeId
+ sal_uInt16 GetCurTypeId() const;
+
+ // TypeId for a concrete position in the list
+ static sal_uInt16 GetTypeId(sal_uInt16 nPos);
+ // name of the type in the list of fields
+ static OUString GetTypeStr(sal_uInt16 nPos);
+
+ // Pos in the list of fields
+ static sal_uInt16 GetPos(sal_uInt16 nTypeId);
+
+ // subtypes to a type
+ bool GetSubTypes(sal_uInt16 nId, std::vector<OUString>& rToFill);
+
+ // format to a type
+ sal_uInt16 GetFormatCount(sal_uInt16 nTypeId, bool bIsText, sal_Bool bHtmlMode = sal_False) const;
+ OUString GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
+ sal_uInt16 GetFormatId(sal_uInt16 nTypeId, sal_uLong nFormatId) const;
+ sal_uLong GetDefaultFormat(sal_uInt16 nTypeId, bool bIsText, SvNumberFormatter* pFormatter, double* pVal = 0L);
+
+ // turn off evaluation of expression fields for insertation
+ // of many expressino fields (see labels)
+
+ inline void SetEvalExpFlds(sal_Bool bEval);
+ void EvalExpFlds(SwWrtShell* pSh = NULL);
+};
+
+inline void SwFldMgr::SetEvalExpFlds(sal_Bool bEval)
+ { bEvalExp = bEval; }
+
+inline sal_uLong SwFldMgr::GetCurFldFmt() const
+ { return nCurFmt; }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/fldtdlg.hxx b/sw/source/core/uibase/inc/fldtdlg.hxx
new file mode 100644
index 000000000000..4835a4afb054
--- /dev/null
+++ b/sw/source/core/uibase/inc/fldtdlg.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FLDTDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FLDTDLG_HXX
+#include <sfx2/tabdlg.hxx>
+
+class SfxBindings;
+class SfxTabPage;
+class SwChildWinWrapper;
+struct SfxChildWinInfo;
+
+class SwFldDlg: public SfxTabDialog
+{
+ SwChildWinWrapper* m_pChildWin;
+ SfxBindings* m_pBindings;
+ sal_Bool m_bHtmlMode;
+ sal_Bool m_bDataBaseMode;
+ sal_uInt16 m_nDokId;
+ sal_uInt16 m_nVarId;
+ sal_uInt16 m_nDokInf;
+ sal_uInt16 m_nRefId;
+ sal_uInt16 m_nFuncId;
+ sal_uInt16 m_nDbId;
+
+ virtual bool Close();
+ virtual SfxItemSet* CreateInputItemSet( sal_uInt16 nId );
+ virtual void Activate();
+ virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
+
+ void ReInitTabPage( sal_uInt16 nPageId,
+ sal_Bool bOnlyActivate = sal_False );
+
+public:
+ SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent);
+ virtual ~SwFldDlg();
+
+ DECL_LINK(OKHdl, void *);
+ DECL_LINK(CancelHdl, void *);
+
+ void Initialize(SfxChildWinInfo *pInfo);
+ void ReInitDlg();
+ void EnableInsert(sal_Bool bEnable);
+ void InsertHdl();
+ void ActivateDatabasePage();
+ void ShowReferencePage();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/fldwrap.hxx b/sw/source/core/uibase/inc/fldwrap.hxx
new file mode 100644
index 000000000000..4a92fcf9c66d
--- /dev/null
+++ b/sw/source/core/uibase/inc/fldwrap.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FLDWRAP_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FLDWRAP_HXX
+
+#include "chldwrap.hxx"
+class AbstractSwFldDlg;
+
+class SwFldDlgWrapper : public SwChildWinWrapper
+{
+public:
+ AbstractSwFldDlg * pDlgInterface;
+ SwFldDlgWrapper( Window* pParent, sal_uInt16 nId,
+ SfxBindings* pBindings, SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW_WITHID(SwFldDlgWrapper);
+
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
+ void ShowReferencePage();
+};
+
+/* --------------------------------------------------
+ * field dialog only showing database page to support
+ * mail merge
+ * --------------------------------------------------*/
+class SwFldDataOnlyDlgWrapper : public SwChildWinWrapper
+{
+public:
+ AbstractSwFldDlg * pDlgInterface;
+ SwFldDataOnlyDlgWrapper( Window* pParent, sal_uInt16 nId,
+ SfxBindings* pBindings, SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW(SwFldDataOnlyDlgWrapper);
+
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/fontcfg.hxx b/sw/source/core/uibase/inc/fontcfg.hxx
new file mode 100644
index 000000000000..49f536e8f48e
--- /dev/null
+++ b/sw/source/core/uibase/inc/fontcfg.hxx
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FONTCFG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FONTCFG_HXX
+
+#include <rtl/ustring.hxx>
+#include <unotools/configitem.hxx>
+#include <i18nlangtag/lang.h>
+#include <osl/diagnose.h>
+#include "swdllapi.h"
+
+#define FONT_STANDARD 0
+#define FONT_OUTLINE 1
+#define FONT_LIST 2
+#define FONT_CAPTION 3
+#define FONT_INDEX 4
+#define FONT_STANDARD_CJK 5
+#define FONT_OUTLINE_CJK 6
+#define FONT_LIST_CJK 7
+#define FONT_CAPTION_CJK 8
+#define FONT_INDEX_CJK 9
+#define FONT_STANDARD_CTL 10
+#define FONT_OUTLINE_CTL 11
+#define FONT_LIST_CTL 12
+#define FONT_CAPTION_CTL 13
+#define FONT_INDEX_CTL 14
+#define DEF_FONT_COUNT 15
+
+#define FONT_PER_GROUP 5
+
+#define FONT_GROUP_DEFAULT 0
+#define FONT_GROUP_CJK 1
+#define FONT_GROUP_CTL 2
+
+//pt-size of fonts
+#define FONTSIZE_DEFAULT 240
+#define FONTSIZE_CJK_DEFAULT 210
+#define FONTSIZE_OUTLINE 280
+
+class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem
+{
+ OUString sDefaultFonts[DEF_FONT_COUNT];
+ sal_Int32 nDefaultFontHeight[DEF_FONT_COUNT];
+
+ SAL_DLLPRIVATE com::sun::star::uno::Sequence<OUString> GetPropertyNames();
+
+ void ChangeString(sal_uInt16 nFontType, const OUString& rSet)
+ {
+ if(sDefaultFonts[nFontType] != rSet)
+ {
+ SetModified();
+ sDefaultFonts[nFontType] = rSet;
+ }
+ }
+
+ void ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight );
+
+public:
+ SwStdFontConfig();
+ ~SwStdFontConfig();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+
+ const OUString& GetFontStandard(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_STANDARD + FONT_PER_GROUP * nFontGroup];}
+ const OUString& GetFontOutline(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_OUTLINE + FONT_PER_GROUP * nFontGroup];}
+ const OUString& GetFontList (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_LIST + FONT_PER_GROUP * nFontGroup];}
+ const OUString& GetFontCaption(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_CAPTION + FONT_PER_GROUP * nFontGroup];}
+ const OUString& GetFontIndex (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_INDEX + FONT_PER_GROUP * nFontGroup];}
+
+ const OUString& GetFontFor(sal_uInt16 nFontType) const {return sDefaultFonts[nFontType];}
+ bool IsFontDefault(sal_uInt16 nFontType) const;
+
+ void SetFontStandard(const OUString& rSet, sal_uInt8 nFontGroup)
+ {ChangeString(FONT_STANDARD + FONT_PER_GROUP * nFontGroup, rSet);}
+
+ void SetFontOutline(const OUString& rSet, sal_uInt8 nFontGroup)
+ { ChangeString(FONT_OUTLINE + FONT_PER_GROUP * nFontGroup, rSet);}
+ void SetFontList (const OUString& rSet, sal_uInt8 nFontGroup)
+ { ChangeString(FONT_LIST + FONT_PER_GROUP * nFontGroup, rSet);}
+ void SetFontCaption(const OUString& rSet, sal_uInt8 nFontGroup)
+ { ChangeString(FONT_CAPTION + FONT_PER_GROUP * nFontGroup, rSet);}
+ void SetFontIndex (const OUString& rSet, sal_uInt8 nFontGroup)
+ { ChangeString(FONT_INDEX + FONT_PER_GROUP * nFontGroup, rSet);}
+
+ void SetFontHeight( sal_Int32 nHeight, sal_uInt8 nFont, sal_uInt8 nScriptType )
+ { ChangeInt(nFont + FONT_PER_GROUP * nScriptType, nHeight);}
+
+ sal_Int32 GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang );
+
+ static OUString GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang);
+ static sal_Int32 GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang);
+};
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/formatclipboard.hxx b/sw/source/core/uibase/inc/formatclipboard.hxx
new file mode 100644
index 000000000000..9d9335a32147
--- /dev/null
+++ b/sw/source/core/uibase/inc/formatclipboard.hxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FORMATCLIPBOARD_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FORMATCLIPBOARD_HXX
+
+// header for class SwWrtShell
+#include <wrtsh.hxx>
+// header for class SfxItemSet
+#include <svl/itemset.hxx>
+// header for class SfxStyleSheetBasePool
+#include <svl/style.hxx>
+
+/** This class acts as data container and execution class for the format paintbrush feature in writer.
+*/
+
+class SwFormatClipboard
+{
+public:
+ SwFormatClipboard();
+ ~SwFormatClipboard();
+
+ /**
+ * Test if the object contains text or paragraph attribute
+ */
+ bool HasContent() const;
+ bool HasContentForThisType( int nSelectionType ) const;
+ bool CanCopyThisType( int nSelectionType ) const;
+
+ /**
+ * Store/Backup the text and paragraph attribute of the current selection.
+ *
+ * @param bPersistentCopy
+ * input parameter - specify if the Paste function will erase the current object.
+ */
+ void Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bPersistentCopy=false );
+
+ /**
+ * Paste the stored text and paragraph attributes on the current selection and current paragraph.
+ *
+ * @param bNoCharacterFormats
+ * Do not paste the character formats.
+ *
+ * @param bNoParagraphFormats
+ * Do not paste the paragraph formats.
+ */
+ void Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPool
+ , bool bNoCharacterFormats=false, bool bNoParagraphFormats=false );
+
+ /**
+ * Clear the currently stored text and paragraph attributes.
+ */
+ void Erase();
+
+private:
+ int m_nSelectionType;
+
+ /** automatic/named character attribute set */
+ SfxItemSet* m_pItemSet_TxtAttr;
+ /** automatic/named paragraph attribute set
+ * (it can be caractere attribute applyied to the paragraph) */
+ SfxItemSet* m_pItemSet_ParAttr;
+
+ /** table attribute set */
+ SfxItemSet* m_pTableItemSet;
+
+ /** name of the character format (if it exist) */
+ OUString m_aCharStyle;
+ /** name of the paragraph format (if it exist) */
+ OUString m_aParaStyle;
+ //no frame style because it contains position information
+
+ /** specify if the Paste function have to clear the current object */
+ bool m_bPersistentCopy;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/formedt.hxx b/sw/source/core/uibase/inc/formedt.hxx
new file mode 100644
index 000000000000..eb0cdb05f323
--- /dev/null
+++ b/sw/source/core/uibase/inc/formedt.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FORMEDT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FORMEDT_HXX
+
+#include <svx/stddlg.hxx>
+
+#include <vcl/lstbox.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/edit.hxx>
+
+#include "toxe.hxx"
+
+class SwWrtShell;
+class SwForm;
+
+/*--------------------------------------------------------------------
+ Description: insert marker for index entry
+ --------------------------------------------------------------------*/
+class SwIdxFormDlg : public SvxStandardDialog
+{
+ DECL_LINK( EntryHdl, Button * );
+ DECL_LINK( PageHdl, Button * );
+ DECL_LINK( TabHdl, Button * );
+ DECL_LINK( JumpHdl, Button * );
+ DECL_LINK( StdHdl, Button * );
+ DECL_LINK( SelectHdl, ListBox * );
+ DECL_LINK( EnableSelectHdl, ListBox * );
+ DECL_LINK( DoubleClickHdl, Button * );
+ DECL_LINK( ModifyHdl, Edit * );
+ DECL_LINK( AssignHdl, Button * );
+ void UpdatePattern();
+ void Apply();
+
+ ListBox aEntryLB;
+ OKButton aOKBtn;
+ CancelButton aCancelBT;
+ FixedText aLevelFT;
+ Edit aEntryED;
+ PushButton aEntryBT;
+ PushButton aTabBT;
+ PushButton aPageBT;
+ PushButton aJumpBT;
+ FixedLine aEntryFL;
+ FixedText aLevelFT2;
+ ListBox aLevelLB;
+ FixedText aTemplateFT;
+ ListBox aParaLayLB;
+ PushButton aStdBT;
+ PushButton aAssignBT;
+ FixedLine aFormatFL;
+
+ SwWrtShell &rSh;
+ SwForm *pForm;
+ sal_uInt16 nAktLevel;
+ sal_Bool bLastLinkIsEnd;
+
+public:
+ SwIdxFormDlg( Window* pParent, SwWrtShell &rShell, const SwForm& rForm );
+ ~SwIdxFormDlg();
+
+ const SwForm& GetTOXForm();
+};
+
+inline const SwForm& SwIdxFormDlg::GetTOXForm()
+{
+ return *pForm;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/frmdlg.hxx b/sw/source/core/uibase/inc/frmdlg.hxx
new file mode 100644
index 000000000000..6a985691da16
--- /dev/null
+++ b/sw/source/core/uibase/inc/frmdlg.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FRMDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FRMDLG_HXX
+
+#include "globals.hrc"
+#include <sfx2/tabdlg.hxx>
+class SwWrtShell;
+
+/*--------------------------------------------------------------------
+ Description: frame dialog
+ --------------------------------------------------------------------*/
+class SwFrmDlg : public SfxTabDialog
+{
+ bool m_bFormat;
+ bool m_bNew;
+ bool m_bHTMLMode;
+ const SfxItemSet& m_rSet;
+ OString m_sDlgType;
+ SwWrtShell* m_pWrtShell;
+
+ sal_uInt16 m_nStdId;
+ sal_uInt16 m_nAddId;
+ sal_uInt16 m_nWrapId;
+ sal_uInt16 m_nUrlId;
+ sal_uInt16 m_nPictureId;
+ sal_uInt16 m_nCropId;
+ sal_uInt16 m_nColumnId;
+ sal_uInt16 m_nBackgroundId;
+ sal_uInt16 m_nMacroId;
+ sal_uInt16 m_nBorderId;
+
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
+
+public:
+ SwFrmDlg( SfxViewFrame *pFrame, Window *pParent,
+ const SfxItemSet& rCoreSet,
+ bool bNewFrm = false,
+ OString sResType = OString("FrameDialog"),
+ bool bFmt = false,
+ OString sDefPage = OString(),
+ const OUString* pFmtStr = 0);
+
+ ~SwFrmDlg();
+
+ SwWrtShell* GetWrtShell() { return m_pWrtShell; }
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_FRMDLG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/frmmgr.hxx b/sw/source/core/uibase/inc/frmmgr.hxx
new file mode 100644
index 000000000000..8ff94053f2eb
--- /dev/null
+++ b/sw/source/core/uibase/inc/frmmgr.hxx
@@ -0,0 +1,188 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FRMMGR_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FRMMGR_HXX
+
+#include "swtypes.hxx"
+#include "frmatr.hxx"
+#include <editeng/svxenum.hxx>
+#include <tools/gen.hxx>
+#include <fmtfsize.hxx>
+#include <fmtsrnd.hxx>
+#include <fmtornt.hxx>
+#include <fmtanchr.hxx>
+#include "swdllapi.h"
+
+class SwWrtShell;
+struct SvxSwFrameValidation;
+struct SwPosition;
+
+class SwFmtCol;
+
+const SwTwips DFLT_WIDTH = MM50 * 4;
+const SwTwips DFLT_HEIGHT = MM50;
+
+#define FULL_ATTRSET 0xffff
+
+#define FRMMGR_TYPE_NONE 0x00
+#define FRMMGR_TYPE_TEXT 0x01
+#define FRMMGR_TYPE_GRF 0x02
+#define FRMMGR_TYPE_OLE 0x04
+#define FRMMGR_TYPE_LABEL 0x08
+#define FRMMGR_TYPE_ENVELP 0x10
+
+class SW_DLLPUBLIC SwFlyFrmAttrMgr
+{
+ SfxItemSet m_aSet;
+ Point m_aAbsPos;
+ SwWrtShell* m_pOwnSh;
+
+ sal_Bool m_bAbsPos,
+ m_bNewFrm;
+ sal_Bool m_bIsInVertical;
+ // --> OD 2009-09-01 #mongolianlayout#
+ sal_Bool m_bIsInVerticalL2R;
+
+ // internal calculation for borders
+ SAL_DLLPRIVATE SwTwips CalcTopSpace();
+ SAL_DLLPRIVATE SwTwips CalcBottomSpace();
+ SAL_DLLPRIVATE SwTwips CalcLeftSpace();
+ SAL_DLLPRIVATE SwTwips CalcRightSpace();
+
+ SAL_DLLPRIVATE void _UpdateFlyFrm(); // post-treatment after insert or update
+
+public:
+ SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell* pSh, sal_uInt8 nType );
+
+ //CopyCtor for dialogs to check the metrics
+ SwFlyFrmAttrMgr( sal_Bool bNew, SwWrtShell *pSh, const SfxItemSet &rSet );
+
+ inline SwWrtShell* GetShell() { return m_pOwnSh; }
+
+ void SetAnchor(RndStdIds eId);
+ inline RndStdIds GetAnchor() const;
+
+ void SetHorzOrientation(sal_Int16 eOrient);
+ void SetVertOrientation(sal_Int16 eOrient);
+
+ // absolute position
+ void SetAbsPos(const Point& rLPoint);
+
+ // anchor's relative position
+ void SetPos(const Point& rLPoint);
+ inline Point GetPos() const;
+
+ // size
+ void SetSize(const Size& rLSize);
+ inline const Size& GetSize() const;
+
+ inline sal_uInt16 GetHeightPercent() const;
+
+ void SetHeightSizeType(SwFrmSize eType);
+
+ // space to content
+ void SetLRSpace( long nLeft = LONG_MAX,
+ long nRight = LONG_MAX );
+ void SetULSpace( long nTop = LONG_MAX,
+ long nBottom= LONG_MAX );
+
+ void SetCol( const SwFmtCol &rCol);
+
+ // change and query attributes
+ void UpdateAttrMgr();
+ void UpdateFlyFrm();
+
+ // create new frame
+ sal_Bool InsertFlyFrm();
+ void InsertFlyFrm(RndStdIds eAnchorType,
+ const Point &rPos,
+ const Size &rSize,
+ sal_Bool bAbsPos = sal_False);
+
+ // check and change metrics
+ void ValidateMetrics(SvxSwFrameValidation& rVal,
+ const SwPosition* pToCharCntntPos,
+ bool bOnlyPercentRefValue = false);
+
+ void DelAttr(sal_uInt16 nId);
+
+ // reach out the set
+ inline const SfxItemSet &GetAttrSet() const { return m_aSet; }
+ inline SfxItemSet &GetAttrSet() { return m_aSet; }
+ void SetAttrSet(const SfxItemSet& rSet);
+
+ inline const SwFmtVertOrient &GetVertOrient() const;
+ inline const SwFmtHoriOrient &GetHoriOrient() const;
+ inline const SvxShadowItem &GetShadow() const;
+ inline const SvxBoxItem &GetBox() const;
+ inline const SwFmtSurround &GetSurround() const;
+ inline const SwFmtFrmSize &GetFrmSize() const;
+
+ long CalcWidthBorder() { return CalcLeftSpace()+CalcRightSpace(); }
+ long CalcHeightBorder() { return CalcTopSpace()+CalcBottomSpace(); }
+};
+
+inline const Size& SwFlyFrmAttrMgr::GetSize() const
+{
+ return ((SwFmtFrmSize&)m_aSet.Get(RES_FRM_SIZE)).GetSize();
+}
+
+inline const SwFmtVertOrient &SwFlyFrmAttrMgr::GetVertOrient() const
+{
+ return ((SwFmtVertOrient&)m_aSet.Get(RES_VERT_ORIENT));
+}
+inline const SwFmtHoriOrient &SwFlyFrmAttrMgr::GetHoriOrient() const
+{
+ return ((SwFmtHoriOrient &)m_aSet.Get(RES_HORI_ORIENT));
+}
+inline const SwFmtFrmSize& SwFlyFrmAttrMgr::GetFrmSize() const
+{
+ return ((SwFmtFrmSize&)m_aSet.Get(RES_FRM_SIZE));
+}
+inline const SvxShadowItem &SwFlyFrmAttrMgr::GetShadow() const
+{
+ return ((SvxShadowItem&)m_aSet.Get(RES_SHADOW));
+}
+inline const SvxBoxItem &SwFlyFrmAttrMgr::GetBox() const
+{
+ return ((SvxBoxItem&)m_aSet.Get(RES_BOX));
+}
+inline const SwFmtSurround &SwFlyFrmAttrMgr::GetSurround() const
+{
+ return ((SwFmtSurround&)m_aSet.Get(RES_SURROUND));
+}
+
+inline Point SwFlyFrmAttrMgr::GetPos() const
+{
+ return Point( GetHoriOrient().GetPos(), GetVertOrient().GetPos() );
+}
+
+inline RndStdIds SwFlyFrmAttrMgr::GetAnchor() const
+{
+ return ((SwFmtAnchor&)m_aSet.Get(RES_ANCHOR)).GetAnchorId();
+}
+
+inline sal_uInt16 SwFlyFrmAttrMgr::GetHeightPercent() const
+{
+ return GetFrmSize().GetHeightPercent();
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/frmpage.hxx b/sw/source/core/uibase/inc/frmpage.hxx
new file mode 100644
index 000000000000..4f47b2c68067
--- /dev/null
+++ b/sw/source/core/uibase/inc/frmpage.hxx
@@ -0,0 +1,328 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FRMPAGE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FRMPAGE_HXX
+
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/field.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svx/swframeposstrings.hxx>
+#include <swtypes.hxx>
+#include <bmpwin.hxx>
+#include <svx/swframeexample.hxx>
+#include <prcntfld.hxx>
+#include <globals.hrc>
+
+namespace sfx2{class FileDialogHelper;}
+class SwWrtShell;
+struct FrmMap;
+// OD 12.11.2003 #i22341#
+struct SwPosition;
+
+/*--------------------------------------------------------------------
+ Description: frame dialog
+ --------------------------------------------------------------------*/
+class SwFrmPage: public SfxTabPage
+{
+ // size
+ FixedText* m_pWidthFT;
+ FixedText* m_pWidthAutoFT;
+ PercentField m_aWidthED;
+ CheckBox* m_pRelWidthCB;
+ ListBox* m_pRelWidthRelationLB;
+ CheckBox* m_pAutoWidthCB;
+
+ FixedText* m_pHeightFT;
+ FixedText* m_pHeightAutoFT;
+ PercentField m_aHeightED;
+ CheckBox* m_pRelHeightCB;
+ ListBox* m_pRelHeightRelationLB;
+ CheckBox* m_pAutoHeightCB;
+
+ CheckBox* m_pFixedRatioCB;
+ PushButton* m_pRealSizeBT;
+
+ // anchor
+ VclContainer* m_pAnchorFrame;
+ RadioButton* m_pAnchorAtPageRB;
+ RadioButton* m_pAnchorAtParaRB;
+ RadioButton* m_pAnchorAtCharRB;
+ RadioButton* m_pAnchorAsCharRB;
+ RadioButton* m_pAnchorAtFrameRB;
+
+ // position
+ FixedText* m_pHorizontalFT;
+ ListBox* m_pHorizontalDLB;
+ FixedText* m_pAtHorzPosFT;
+ MetricField* m_pAtHorzPosED;
+ FixedText* m_pHoriRelationFT;
+ ListBox* m_pHoriRelationLB;
+
+ CheckBox* m_pMirrorPagesCB;
+
+ FixedText* m_pVerticalFT;
+ ListBox* m_pVerticalDLB;
+ FixedText* m_pAtVertPosFT;
+ MetricField* m_pAtVertPosED;
+ FixedText* m_pVertRelationFT;
+ ListBox* m_pVertRelationLB;
+ // #i18732# - check box for new option 'FollowTextFlow'
+ CheckBox* m_pFollowTextFlowCB;
+
+ // example
+ SvxSwFrameExample* m_pExampleWN;
+
+ //'string provider'
+ SvxSwFramePosString aFramePosString;
+
+ sal_Bool bAtHorzPosModified;
+ sal_Bool bAtVertPosModified;
+
+ sal_Bool bFormat;
+ sal_Bool bNew;
+ sal_Bool bNoModifyHdl;
+ bool bIsVerticalFrame; //current frame is in vertical environment - strings are exchanged
+ // --> OD 2009-08-31 #mongolianlayou#
+ sal_Bool bIsVerticalL2R;
+ sal_Bool bIsInRightToLeft; // current frame is in right-to-left environment - strings are exchanged
+ sal_Bool bHtmlMode;
+ sal_uInt16 nHtmlMode;
+ OString sDlgType;
+ Size aGrfSize;
+ Size aWrap;
+ SwTwips nUpperBorder;
+ SwTwips nLowerBorder;
+ double fWidthHeightRatio; //width-to-height ratio to support the KeepRatio button
+
+ // OD 12.11.2003 #i22341# - keep content position of character for
+ // to character anchored objects.
+ const SwPosition* mpToCharCntntPos;
+
+ // old alignment
+ short nOldH;
+ short nOldHRel;
+ short nOldV;
+ short nOldVRel;
+
+ FrmMap* pVMap;
+ FrmMap* pHMap;
+
+ bool m_bAllowVertPositioning;
+ bool m_bIsMathOLE;
+ bool m_bIsMathBaselineAlignment;
+
+ virtual void ActivatePage(const SfxItemSet& rSet);
+ virtual int DeactivatePage(SfxItemSet *pSet);
+
+ DECL_LINK(RangeModifyHdl, void *);
+ DECL_LINK(AnchorTypeHdl, void *);
+ DECL_LINK( PosHdl, ListBox * );
+ DECL_LINK( RelHdl, ListBox * );
+ void InitPos(RndStdIds eId, sal_uInt16 nH, sal_uInt16 nHRel,
+ sal_uInt16 nV, sal_uInt16 nVRel,
+ long nX, long nY);
+
+ DECL_LINK(RealSizeHdl, void *);
+ DECL_LINK( RelSizeClickHdl, CheckBox * );
+ DECL_LINK(MirrorHdl, void *);
+
+ DECL_LINK( AutoWidthClickHdl, void* );
+ DECL_LINK( AutoHeightClickHdl, void* );
+
+ // update example
+ void UpdateExample();
+ DECL_LINK( ModifyHdl, Edit * );
+
+ void Init(const SfxItemSet& rSet, sal_Bool bReset = sal_False);
+ // OD 12.11.2003 #i22341# - adjustment to handle maps, that are ambigous
+ // in the alignment.
+ sal_Int32 FillPosLB( const FrmMap* _pMap,
+ const sal_uInt16 _nAlign,
+ const sal_uInt16 _nRel,
+ ListBox& _rLB );
+ // OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous
+ // in their string entries.
+ sal_uLong FillRelLB( const FrmMap* _pMap,
+ const sal_uInt16 _nLBSelPos,
+ const sal_uInt16 _nAlign,
+ sal_uInt16 _nRel,
+ ListBox& _rLB,
+ FixedText& _rFT );
+ sal_Int32 GetMapPos( const FrmMap *pMap, ListBox &rAlignLB );
+ short GetAlignment(FrmMap *pMap, sal_Int32 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB);
+ short GetRelation(FrmMap *pMap, ListBox &rRelationLB);
+ RndStdIds GetAnchor();
+
+ void setOptimalFrmWidth();
+ void setOptimalRelWidth();
+
+ void EnableGraficMode( void ); // hides auto check boxes and re-org controls for "Real Size" button
+
+ SwFrmPage(Window *pParent, const SfxItemSet &rSet);
+ ~SwFrmPage();
+
+ SwWrtShell *getFrmDlgParentShell();
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+
+ static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
+ static sal_uInt16* GetRanges();
+
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
+ virtual void Reset(const SfxItemSet &rSet);
+
+ void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
+ void SetFormatUsed(sal_Bool bFmt);
+ void SetFrmType(const OString &rType) { sDlgType = rType; }
+ inline sal_Bool IsInGraficMode( void ) { return sDlgType == "PictureDialog" || sDlgType == "ObjectDialog"; }
+ void EnableVerticalPositioning( bool bEnable );
+};
+
+class SwGrfExtPage: public SfxTabPage
+{
+ // mirror
+ VclContainer* m_pMirror;
+ CheckBox* m_pMirrorVertBox;
+ CheckBox* m_pMirrorHorzBox;
+ RadioButton* m_pAllPagesRB;
+ RadioButton* m_pLeftPagesRB;
+ RadioButton* m_pRightPagesRB;
+ BmpWindow* m_pBmpWin;
+
+ Edit* m_pConnectED;
+ PushButton* m_pBrowseBT;
+
+ OUString aFilterName;
+ OUString aGrfName, aNewGrfName;
+
+ ::sfx2::FileDialogHelper* pGrfDlg;
+
+ sal_Bool bHtmlMode;
+
+ // handler for mirroring
+ DECL_LINK(MirrorHdl, void *);
+ DECL_LINK(BrowseHdl, void *);
+
+ virtual void ActivatePage(const SfxItemSet& rSet);
+ SwGrfExtPage(Window *pParent, const SfxItemSet &rSet);
+ ~SwGrfExtPage();
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+
+ static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
+
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
+ virtual void Reset(const SfxItemSet &rSet);
+ virtual int DeactivatePage(SfxItemSet *pSet);
+};
+
+class SwFrmURLPage : public SfxTabPage
+{
+ // hyperlink
+ Edit* pURLED;
+ PushButton* pSearchPB;
+ Edit* pNameED;
+ ComboBox* pFrameCB;
+
+ // image map
+ CheckBox* pServerCB;
+ CheckBox* pClientCB;
+
+ DECL_LINK(InsertFileHdl, void *);
+
+ SwFrmURLPage(Window *pParent, const SfxItemSet &rSet);
+ ~SwFrmURLPage();
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+
+ static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
+
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
+ virtual void Reset(const SfxItemSet &rSet);
+};
+
+class SwFrmAddPage : public SfxTabPage
+{
+ VclContainer* pNameFrame;
+ FixedText* pNameFT;
+ Edit* pNameED;
+ FixedText* pAltNameFT;
+ Edit* pAltNameED;
+ FixedText* pPrevFT;
+ ListBox* pPrevLB;
+ FixedText* pNextFT;
+ ListBox* pNextLB;
+
+ VclContainer* pProtectFrame;
+ CheckBox* pProtectContentCB;
+ CheckBox* pProtectFrameCB;
+ CheckBox* pProtectSizeCB;
+
+ VclContainer* m_pContentAlignFrame;
+ ListBox* m_pVertAlignLB;
+
+ VclContainer* pPropertiesFrame;
+ CheckBox* pEditInReadonlyCB;
+ CheckBox* pPrintFrameCB;
+ FixedText* pTextFlowFT;
+ ListBox* pTextFlowLB;
+
+ SwWrtShell* pWrtSh;
+
+ OString sDlgType;
+ sal_Bool bHtmlMode;
+ sal_Bool bFormat;
+ sal_Bool bNew;
+
+ DECL_LINK(EditModifyHdl, void *);
+ DECL_LINK(ChainModifyHdl, ListBox*);
+
+ SwFrmAddPage(Window *pParent, const SfxItemSet &rSet);
+ ~SwFrmAddPage();
+
+public:
+
+ static SfxTabPage* Create(Window *pParent, const SfxItemSet &rSet);
+ static sal_uInt16* GetRanges();
+
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
+ virtual void Reset(const SfxItemSet &rSet);
+
+ void SetFormatUsed(sal_Bool bFmt);
+ void SetFrmType(const OString &rType) { sDlgType = rType; }
+ void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
+ void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
+
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_FRMPAGE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/frmsh.hxx b/sw/source/core/uibase/inc/frmsh.hxx
new file mode 100644
index 000000000000..031025c9a2dd
--- /dev/null
+++ b/sw/source/core/uibase/inc/frmsh.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_FRMSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_FRMSH_HXX
+
+#include "basesh.hxx"
+
+class SwFrameShell: public SwBaseShell
+{
+
+public:
+ SFX_DECL_INTERFACE(SW_FRAMESHELL)
+
+ SwFrameShell(SwView &rView);
+ virtual ~SwFrameShell();
+
+ void Execute(SfxRequest &);
+ void GetState(SfxItemSet &);
+ void ExecFrameStyle(SfxRequest& rReq);
+ void GetLineStyleState(SfxItemSet &rSet);
+ void StateInsert(SfxItemSet &rSet);
+
+ void StateStatusline(SfxItemSet &rSet);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/frmui.hrc b/sw/source/core/uibase/inc/frmui.hrc
new file mode 100644
index 000000000000..4e765f9c9456
--- /dev/null
+++ b/sw/source/core/uibase/inc/frmui.hrc
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _FRMUI_HRC
+#define _FRMUI_HRC
+
+#include "rcid.hrc"
+#include "globals.hrc"
+
+#define DLG_COLUMN (RC_FRMDLG_BEGIN + 4)
+
+#define DLG_CAPTION (RC_FRMDLG_BEGIN + 11)
+#define DLG_SEQUENCE_OPTION (RC_FRMDLG_BEGIN + 12)
+
+#define STR_FRMUI_BORDER (RC_FRMDLG_BEGIN + 16)
+#define STR_FRMUI_PATTERN (RC_FRMDLG_BEGIN + 17)
+
+#define BMP_BEGIN (RC_FRMDLG_BEGIN + 18)
+#define BMP_NOWRAP (BMP_BEGIN+5)
+
+#define BMP_END (BMP_NOWRAP)
+
+#define MN_BACKGROUND (BMP_END + 4)
+
+#define MN_FOOTNOTE (BMP_END + 7)
+
+#define STR_FRMDLG_BEGIN (MN_FOOTNOTE + 1)
+
+#define STR_TOPPRT (STR_FRMDLG_BEGIN + 1)
+
+#define STR_BORDER (STR_FRMDLG_BEGIN + 16)
+#define STR_COLUMN (STR_FRMDLG_BEGIN + 17)
+#define STR_CHAR (STR_FRMDLG_BEGIN + 19)
+
+#define STR_OLE_INSERT (STR_FRMDLG_BEGIN + 45)
+#define STR_OLE_EDIT (STR_FRMDLG_BEGIN + 46)
+#define STR_COLL_HEADER (STR_FRMDLG_BEGIN + 47)
+
+#define STR_LINE_TOP (STR_FRMDLG_BEGIN + 50)
+#define STR_LINE_BOTTOM (STR_FRMDLG_BEGIN + 51)
+#define STR_LINE_CENTER (STR_FRMDLG_BEGIN + 52)
+#define STR_CHAR_TOP (STR_FRMDLG_BEGIN + 53)
+#define STR_CHAR_BOTTOM (STR_FRMDLG_BEGIN + 54)
+#define STR_CHAR_CENTER (STR_FRMDLG_BEGIN + 55)
+
+#define FRMDLG_ACT_END STR_CHAR_CENTER
+
+#if FRMDLG_ACT_END > RC_FRMDLG_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+
+#endif // FRMUI_HRC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/globals.h b/sw/source/core/uibase/inc/globals.h
new file mode 100644
index 000000000000..4da432350b6f
--- /dev/null
+++ b/sw/source/core/uibase/inc/globals.h
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_GLOBALS_H
+#define INCLUDED_SW_SOURCE_UI_INC_GLOBALS_H
+
+enum SwChangeState
+{
+ STATE_OFF = 0,
+ STATE_ON = 1,
+ STATE_TOGGLE = 2
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/globdoc.hrc b/sw/source/core/uibase/inc/globdoc.hrc
new file mode 100644
index 000000000000..8c954b379294
--- /dev/null
+++ b/sw/source/core/uibase/inc/globdoc.hrc
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _GLOBDOC_HRC
+#define _GLOBDOC_HRC
+
+#include "rcid.hrc"
+
+#define STR_HUMAN_SWGLOBDOC_NAME (RC_GLOBDOC_BEGIN + 2)
+#define STR_WRITER_GLOBALDOC_FULLTYPE_40 (RC_GLOBDOC_BEGIN + 3)
+#define STR_WRITER_GLOBALDOC_FULLTYPE_50 (RC_GLOBDOC_BEGIN + 4)
+#define STR_WRITER_GLOBALDOC_FULLTYPE (RC_GLOBDOC_BEGIN + 5)
+
+
+
+#define MN_GLOBAL_TEXT_POPUPMENU (RC_GLOBDOC_BEGIN + 63)
+
+
+#define GLOBDOC_ACT_END MN_GLOBAL_TEXT_POPUPMENU
+
+
+#if GLOBDOC_ACT_END > RC_GLOBDOC_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/glosbib.hxx b/sw/source/core/uibase/inc/glosbib.hxx
new file mode 100644
index 000000000000..7620f419784a
--- /dev/null
+++ b/sw/source/core/uibase/inc/glosbib.hxx
@@ -0,0 +1,116 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_GLOSBIB_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_GLOSBIB_HXX
+
+#include <vcl/edit.hxx>
+#include <svx/stddlg.hxx>
+
+#include <vcl/lstbox.hxx>
+#include <svtools/svtabbx.hxx>
+
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include "rtl/ustring.hxx"
+
+#include <vector>
+
+class SwGlossaryHdl;
+
+class FEdit : public Edit
+{
+public:
+ FEdit(Window* pParent, const ResId& rResId)
+ : Edit(pParent, rResId)
+ {
+ }
+
+ FEdit(Window* pParent)
+ : Edit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK)
+ {
+ }
+
+ virtual void KeyInput( const KeyEvent& rKEvent );
+};
+
+struct GlosBibUserData
+{
+ OUString sPath;
+ OUString sGroupName;
+ OUString sGroupTitle;
+};
+
+class SwGlossaryGroupTLB : public SvTabListBox
+{
+public:
+ SwGlossaryGroupTLB(Window* pParent, const ResId& rResId)
+ : SvTabListBox(pParent, rResId)
+ {
+ }
+
+ SwGlossaryGroupTLB(Window* pParent)
+ : SvTabListBox(pParent, WB_BORDER|WB_HSCROLL|WB_CLIPCHILDREN|WB_SORT)
+ {
+ }
+
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+};
+
+class SwGlossaryGroupDlg : public SvxStandardDialog
+{
+ FEdit* m_pNameED;
+ ListBox* m_pPathLB;
+ SwGlossaryGroupTLB* m_pGroupTLB;
+
+ PushButton* m_pNewPB;
+ PushButton* m_pDelPB;
+ PushButton* m_pRenamePB;
+
+ typedef std::vector< OUString> OUVector_t;
+ OUVector_t m_RemovedArr;
+ OUVector_t m_InsertedArr;
+ OUVector_t m_RenamedArr;
+
+ SwGlossaryHdl *pGlosHdl;
+
+ OUString sCreatedGroup;
+
+ sal_Bool IsDeleteAllowed(const OUString &rGroup);
+
+protected:
+ virtual void Apply();
+ DECL_LINK( SelectHdl, SvTabListBox* );
+ DECL_LINK(NewHdl, void *);
+ DECL_LINK( DeleteHdl, Button* );
+ DECL_LINK(ModifyHdl, void *);
+ DECL_LINK(RenameHdl, void *);
+
+public:
+ SwGlossaryGroupDlg(Window * pParent,
+ std::vector<OUString> const& rPathArr,
+ SwGlossaryHdl *pGlosHdl);
+ ~SwGlossaryGroupDlg();
+
+ const OUString& GetCreatedGroupName() const {return sCreatedGroup;}
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/glosdoc.hxx b/sw/source/core/uibase/inc/glosdoc.hxx
new file mode 100644
index 000000000000..a5213b1179a1
--- /dev/null
+++ b/sw/source/core/uibase/inc/glosdoc.hxx
@@ -0,0 +1,135 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_GLOSDOC_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_GLOSDOC_HXX
+
+#include "rtl/ustring.hxx"
+#include <com/sun/star/text/XAutoTextGroup.hpp>
+
+class SwTextBlocks;
+class SwDocShell;
+
+#ifndef SW_DECL_SWDOCSHELL_DEFINED
+#define SW_DECL_SWDOCSHELL_DEFINED
+#include <tools/ref.hxx>
+SV_DECL_REF( SwDocShell )
+#endif
+#include <cppuhelper/weakref.hxx>
+
+#include <vector>
+#include "swdllapi.h"
+
+typedef ::com::sun::star::uno::WeakReference< ::com::sun::star::text::XAutoTextGroup > AutoTextGroupRef;
+typedef ::std::vector< AutoTextGroupRef > UnoAutoTextGroups;
+
+typedef ::com::sun::star::uno::WeakReference< ::com::sun::star::text::XAutoTextEntry > AutoTextEntryRef;
+typedef ::std::vector< AutoTextEntryRef > UnoAutoTextEntries;
+
+#define GLOS_DELIM (sal_Unicode)'*'
+
+// CLASS -----------------------------------------------------------------
+class SW_DLLPUBLIC SwGlossaries
+{
+ UnoAutoTextGroups m_aGlossaryGroups;
+ UnoAutoTextEntries m_aGlossaryEntries;
+
+ OUString m_aPath;
+ std::vector<OUString> m_aInvalidPaths;
+ std::vector<OUString> m_PathArr;
+ std::vector<OUString> m_GlosArr;
+ sal_Bool m_bError;
+
+ SAL_DLLPRIVATE SwTextBlocks* GetGlosDoc(const OUString &rName, sal_Bool bCreate = sal_True) const;
+ SAL_DLLPRIVATE std::vector<OUString> & GetNameList();
+
+ // implementation in unoatxt.cxx
+ SAL_DLLPRIVATE void RemoveFileFromList( const OUString& rGroup );
+ SAL_DLLPRIVATE void InvalidateUNOOjects();
+
+public:
+ SwGlossaries();
+ ~SwGlossaries();
+
+ /** returns the cached AutoTextGroup (if any) for the given group name
+
+ @precond
+ If <arg>_bCreate</arg> is <TRUE/>, the SolarMutex must be locked when calling into this method.
+
+ @param _rGroupName
+ the name of the glossaries group
+ @param _bCreate
+ if <TRUE/>, the group is created if it does not yet exist
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextGroup >
+ GetAutoTextGroup(
+ const OUString& _rGroupName,
+ bool _bCreate = false
+ );
+
+ /** returns the cached AutoTextEntry (if any) for the given group/with the given name
+
+ @precond
+ If <arg>_bCreate</arg> is <TRUE/>, the SolarMutex must be locked when calling into this method.
+
+ @param _rGroupAccessName
+ the name to access the group
+ @param _rGroupName
+ the name of the glossaries group, as to be passed to the entry
+ @param _rEntryName
+ the name of the auto text entry
+ @param _bCreate
+ if <TRUE/>, the entry is created if it does not yet exist
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextEntry >
+ GetAutoTextEntry(
+ const OUString& _rCompleteGroupName,
+ const OUString& _rGroupName,
+ const OUString& _rEntryName,
+ bool _bCreate = false
+ );
+
+ sal_uInt16 GetGroupCnt();
+ OUString GetGroupName(sal_uInt16 );
+ OUString GetGroupTitle( const OUString& rGroupName );
+
+ sal_Bool FindGroupName(OUString& rGroup);
+
+ SwTextBlocks* GetGroupDoc(const OUString &rName,
+ sal_Bool bCreate = sal_False);
+ SwTextBlocks* GetDefGroupDoc() { return GetGroupDoc(GetDefName()); }
+ void PutGroupDoc(SwTextBlocks *pBlock);
+ static OUString GetDefName();
+ static OUString GetExtension();
+
+ OUString GetCompleteGroupName( const OUString& GroupName );
+
+ sal_Bool NewGroupDoc(OUString &rGroupName, const OUString& rTitle);
+ sal_Bool RenameGroupDoc(const OUString& sOldGroup, OUString& sNewGroup, const OUString& rNewTitle);
+ sal_Bool DelGroupDoc(const OUString &);
+ SwDocShellRef EditGroupDoc(const OUString &rGrpName, const OUString& rShortName, sal_Bool bShow = sal_True );
+ void SaveGroupDoc(const OUString &rGrpName, const OUString& rLongName );
+ void UpdateGlosPath(sal_Bool bFull);
+ void ShowError();
+ inline sal_uLong IsGlosPathErr() { return m_bError; }
+ std::vector<OUString> const& GetPathArray() const { return m_PathArr; }
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_GLOSDOC_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/gloshdl.hxx b/sw/source/core/uibase/inc/gloshdl.hxx
new file mode 100644
index 000000000000..2d341fd80ec0
--- /dev/null
+++ b/sw/source/core/uibase/inc/gloshdl.hxx
@@ -0,0 +1,104 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_GLOSHDL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_GLOSHDL_HXX
+
+#include <rtl/ustring.hxx>
+#include "swdllapi.h"
+
+class SwWrtShell;
+class SwTextBlocks;
+class SvxMacro;
+class SwGlossaries;
+class SfxViewFrame;
+
+// CLASS -----------------------------------------------------------------
+class SW_DLLPUBLIC SwGlossaryHdl
+{
+
+ SwGlossaries& rStatGlossaries;
+ OUString aCurGrp;
+ SfxViewFrame* pViewFrame;
+ SwWrtShell* pWrtShell;
+ SwTextBlocks* pCurGrp;
+
+ SAL_DLLPRIVATE void _SetMacros(const OUString &rName,
+ const SvxMacro *pStart,
+ const SvxMacro *pEnd);
+
+ SAL_DLLPRIVATE sal_Bool Expand( const OUString& rShortName,
+ SwGlossaries* pGlossaries,
+ SwTextBlocks *pGlossary );
+
+public:
+ sal_Bool ConvertToNew(SwTextBlocks& rOld);
+ void GlossaryDlg();
+
+ sal_uInt16 GetGroupCnt() const;
+ OUString GetGroupName( sal_uInt16, OUString* pTitle = 0 );
+ sal_Bool NewGroup(OUString & rGroupName, const OUString& rTitle);
+ sal_Bool DelGroup(const OUString &);
+ sal_Bool RenameGroup(const OUString& rOld, OUString& rNew, const OUString& rNewTitle);
+ void SetCurGroup(const OUString &aGrp, sal_Bool bApi = sal_False, sal_Bool bAlwaysCreateNew = sal_False);
+
+ OUString GetCurGroup() const { return aCurGrp; }
+
+ sal_uInt16 GetGlossaryCnt();
+ OUString GetGlossaryName(sal_uInt16);
+ OUString GetGlossaryShortName(const OUString &rName);
+ OUString GetGlossaryShortName(sal_uInt16);
+
+ sal_Bool Rename( const OUString& rOldShortName, const OUString& rNewShortName,
+ const OUString& rNewName);
+ sal_Bool CopyOrMove( const OUString& rSourceGroupName, OUString& rSourceShortName,
+ const OUString& rDestGroupName, const OUString& rLongName, sal_Bool bMove );
+ sal_Bool HasShortName(const OUString &rShortName) const;
+ // when NewGlossary is called from Basic then the previously set group should
+ // be newly created if applicable.
+ sal_Bool NewGlossary(const OUString &rName, const OUString &rShortName,
+ sal_Bool bApiCall = sal_False, sal_Bool bNoAttr = sal_False );
+ sal_Bool DelGlossary(const OUString&);
+ sal_Bool CopyToClipboard(SwWrtShell& rSh, const OUString& rShortName);
+
+ sal_Bool ExpandGlossary();
+ bool InsertGlossary(const OUString &rName);
+
+ void SetMacros(const OUString& rName,
+ const SvxMacro* pStart,
+ const SvxMacro* pEnd,
+ SwTextBlocks *pGlossary = 0 );
+ void GetMacros(const OUString& rShortName,
+ SvxMacro& rStart,
+ SvxMacro& rEnd,
+ SwTextBlocks* pGlossary = 0 );
+
+ sal_Bool IsReadOnly( const OUString* = 0 ) const;
+ sal_Bool IsOld() const;
+
+ sal_Bool FindGroupName(OUString& rGroup); // find group without path index
+
+ sal_Bool ImportGlossaries( const OUString& rName );
+
+ SwGlossaryHdl(SfxViewFrame* pViewFrame, SwWrtShell *);
+ ~SwGlossaryHdl();
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_GLOSHDL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/gloslst.hxx b/sw/source/core/uibase/inc/gloslst.hxx
new file mode 100644
index 000000000000..fb47656da3f2
--- /dev/null
+++ b/sw/source/core/uibase/inc/gloslst.hxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_GLOSLST_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_GLOSLST_HXX
+
+#include <rtl/ustring.hxx>
+#include <tools/datetime.hxx>
+#include <vcl/timer.hxx>
+
+class SwGlossaries;
+class vector;
+
+struct AutoTextGroup
+{
+ sal_uInt16 nCount;
+ OUString sName;
+ OUString sTitle;
+ OUString sLongNames; // by 0x0A separated long names
+ OUString sShortNames; // by 0x0A separated short names
+ DateTime aDateModified;
+
+ AutoTextGroup()
+ : nCount(0)
+ , aDateModified(DateTime::EMPTY)
+ {
+ }
+};
+
+typedef std::vector<AutoTextGroup*> AutoTextGroups;
+
+class SwGlossaryList : public AutoTimer
+{
+ AutoTextGroups aGroupArr;
+ OUString sPath;
+ bool bFilled;
+
+ AutoTextGroup* FindGroup(const OUString& rGroupName);
+ void FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGloss);
+
+public:
+ SwGlossaryList();
+ ~SwGlossaryList();
+
+ bool HasLongName(const OUString& rBegin, std::vector<OUString> *pLongNames);
+ sal_Bool GetShortName(const OUString& rLongName,
+ OUString& rShortName, OUString& rGroupName );
+
+ sal_uInt16 GetGroupCount();
+ OUString GetGroupName(sal_uInt16 nPos, bool bNoPath = true);
+ OUString GetGroupTitle(sal_uInt16 nPos);
+
+ sal_uInt16 GetBlockCount(sal_uInt16 nGroup);
+ OUString GetBlockLongName(sal_uInt16 nGroup, sal_uInt16 nBlock);
+ OUString GetBlockShortName(sal_uInt16 nGroup, sal_uInt16 nBlock);
+
+ void Update();
+
+ virtual void Timeout();
+
+ void ClearGroups();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/glossary.hxx b/sw/source/core/uibase/inc/glossary.hxx
new file mode 100644
index 000000000000..98f441620528
--- /dev/null
+++ b/sw/source/core/uibase/inc/glossary.hxx
@@ -0,0 +1,168 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_GLOSSARY_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_GLOSSARY_HXX
+
+#include <vcl/edit.hxx>
+#include <svtools/treelistbox.hxx>
+#include <svx/stddlg.hxx>
+
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+
+#include <vcl/combobox.hxx>
+
+#include <vcl/menubtn.hxx>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XContentEnumerationAccess.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/container/XElementAccess.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/text/XAutoTextContainer2.hpp>
+
+#include "rtl/ustring.hxx"
+
+#include <actctrl.hxx>
+
+class SwGlossaryHdl;
+class SwNewGlosNameDlg;
+class SwWrtShell;
+class SfxViewFrame;
+class PopupMenu;
+class Menu;
+
+const short RET_EDIT = 100;
+
+class SwGlTreeListBox : public SvTreeListBox
+{
+ const OUString sReadonly;
+
+ SvTreeListEntry* pDragEntry;
+
+ virtual DragDropMode NotifyStartDrag( TransferDataContainer& rContainer,
+ SvTreeListEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvTreeListEntry* );
+
+ virtual sal_Bool NotifyMoving( SvTreeListEntry* pTarget,
+ SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent,
+ sal_uLong& rNewChildPos
+ );
+ virtual sal_Bool NotifyCopying( SvTreeListEntry* pTarget,
+ SvTreeListEntry* pEntry,
+ SvTreeListEntry*& rpNewParent,
+ sal_uLong& rNewChildPos);
+
+ sal_Bool NotifyCopyingOrMoving( SvTreeListEntry* pTarget,
+ SvTreeListEntry* pEntry,
+ bool bIsMove);
+public:
+ SwGlTreeListBox(Window* pParent, WinBits nBits);
+
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+ virtual Size GetOptimalSize() const;
+ void Clear();
+};
+
+class SwOneExampleFrame;
+class SwGlossaryDlg : public SvxStandardDialog
+{
+ friend class SwNewGlosNameDlg;
+ friend class SwGlTreeListBox;
+
+ CheckBox* m_pInsertTipCB;
+ Edit* m_pNameED;
+ FixedText* m_pShortNameLbl;
+ NoSpaceEdit* m_pShortNameEdit;
+ SwGlTreeListBox* m_pCategoryBox;
+ CheckBox* m_pFileRelCB;
+ CheckBox* m_pNetRelCB;
+ Window* m_pExampleWIN;
+ PushButton* m_pInsertBtn;
+ CloseButton* m_pCloseBtn;
+ MenuButton* m_pEditBtn;
+ PushButton* m_pBibBtn;
+ PushButton* m_pPathBtn;
+
+ OUString sReadonlyPath;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextContainer2 > m_xAutoText;
+ SwOneExampleFrame* pExampleFrame;
+
+ SwGlossaryHdl* pGlossaryHdl;
+
+ OUString sResumeGroup;
+ OUString sResumeShortName;
+ sal_Bool bResume;
+
+ const sal_Bool bSelection : 1;
+ sal_Bool bReadOnly : 1;
+ sal_Bool bIsOld : 1;
+ sal_Bool bIsDocReadOnly:1;
+
+ SwWrtShell* pSh;
+
+ void EnableShortName(sal_Bool bOn = sal_True);
+ void ShowPreview();
+
+ DECL_LINK( NameModify, Edit * );
+ DECL_LINK( NameDoubleClick, SvTreeListBox * );
+ DECL_LINK( GrpSelect, SvTreeListBox * );
+ DECL_LINK( MenuHdl, Menu * );
+ DECL_LINK( EnableHdl, Menu * );
+ DECL_LINK(BibHdl, void *);
+ DECL_LINK(EditHdl, void *);
+ DECL_LINK(InsertHdl, void *);
+ DECL_LINK( PathHdl, Button * );
+ DECL_LINK( CheckBoxHdl, CheckBox * );
+ DECL_LINK( PreviewLoadedHdl, void * );
+
+ virtual void Apply();
+ void Init();
+ SvTreeListEntry* DoesBlockExist(const OUString& sBlock, const OUString& rShort);
+ void ShowAutoText(const OUString& rGroup, const OUString& rShortName);
+ void ResumeShowAutoText();
+
+ sal_Bool GetResumeData(OUString& rGroup, OUString& rShortName)
+ {rGroup = sResumeGroup; rShortName = sResumeShortName; return bResume;}
+ void SetResumeData(const OUString& rGroup, const OUString& rShortName)
+ {sResumeGroup = rGroup; sResumeShortName = rShortName; bResume = sal_True;}
+ void ResetResumeData() {bResume = sal_False;}
+public:
+ SwGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl, SwWrtShell *pWrtShell);
+ ~SwGlossaryDlg();
+ OUString GetCurrGrpName() const;
+ OUString GetCurrLongName() const
+ {
+ return m_pNameED->GetText();
+ }
+ OUString GetCurrShortName() const
+ {
+ return m_pShortNameEdit->GetText();
+ }
+ static OUString GetCurrGroup();
+ static void SetActGroup(const OUString& rNewGroup);
+ static OUString GetExtension();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/glshell.hxx b/sw/source/core/uibase/inc/glshell.hxx
new file mode 100644
index 000000000000..9e9513d22b77
--- /dev/null
+++ b/sw/source/core/uibase/inc/glshell.hxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_GLSHELL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_GLSHELL_HXX
+#include "wdocsh.hxx"
+
+class SwGlosDocShell : public SwDocShell
+{
+ OUString aLongName;
+ OUString aShortName;
+ OUString aGroupName;
+
+ using SotObject::GetInterface;
+
+protected:
+ virtual sal_Bool Save();
+
+public:
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SW_GLOSDOCSHELL)
+
+ SwGlosDocShell( sal_Bool bNewShow = sal_True);
+ virtual ~SwGlosDocShell();
+
+ void Execute( SfxRequest& );
+ void GetState( SfxItemSet& );
+ void SetLongName( const OUString& rLongName )
+ { aLongName = rLongName; }
+ void SetShortName( const OUString& rShortName )
+ { aShortName = rShortName; }
+ void SetGroupName( const OUString& rGroupName )
+ { aGroupName = rGroupName; }
+ const OUString& GetShortName(){return aShortName;}
+};
+
+class SwWebGlosDocShell : public SwWebDocShell
+{
+ OUString aLongName;
+ OUString aShortName;
+ OUString aGroupName;
+
+ using SotObject::GetInterface;
+
+protected:
+ virtual sal_Bool Save();
+
+public:
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SW_WEBGLOSDOCSHELL)
+
+ SwWebGlosDocShell();
+ virtual ~SwWebGlosDocShell();
+
+ void Execute( SfxRequest& );
+ void GetState( SfxItemSet& );
+ void SetLongName( const OUString& rLongName )
+ { aLongName = rLongName; }
+ void SetShortName( const OUString& rShortName )
+ { aShortName = rShortName; }
+ void SetGroupName( const OUString& rGroupName )
+ { aGroupName = rGroupName; }
+ const OUString& GetShortName(){return aShortName;}
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/grfsh.hxx b/sw/source/core/uibase/inc/grfsh.hxx
new file mode 100644
index 000000000000..b05b5cb97d16
--- /dev/null
+++ b/sw/source/core/uibase/inc/grfsh.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_GRFSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_GRFSH_HXX
+
+#include "frmsh.hxx"
+
+class SwGrfShell: public SwBaseShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_GRFSHELL)
+
+ void Execute(SfxRequest& rRequest);
+ void ExecAttr(SfxRequest& rRequest);
+ void GetAttrState(SfxItemSet& rRequest);
+
+ void ExecuteRotation(SfxRequest &rRequest);
+ void GetAttrStateForRotation(SfxItemSet& rRequest);
+
+ SwGrfShell(SwView &rView);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/hyp.hxx b/sw/source/core/uibase/inc/hyp.hxx
new file mode 100644
index 000000000000..02edf350fe63
--- /dev/null
+++ b/sw/source/core/uibase/inc/hyp.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_HYP_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_HYP_HXX
+
+#include <tools/link.hxx>
+#include <editeng/splwrap.hxx>
+#include <com/sun/star/linguistic2/XHyphenator.hpp>
+
+class SwView;
+
+class SwHyphWrapper : public SvxSpellWrapper {
+private:
+ SwView* pView;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenator > xHyph;
+ Link aOldLnk;
+ sal_uInt16 nPageCount; // page count for progress view
+ sal_uInt16 nPageStart; // 1st checked page
+ sal_Bool bInSelection : 1; // separating selected text
+ sal_Bool bAutomatic : 1; // insert separators without further inquiry
+ sal_Bool bInfoBox : 1; // display info-box when ending
+
+protected:
+ virtual void SpellStart( SvxSpellArea eSpell );
+ virtual bool SpellContinue();
+ virtual void SpellEnd( );
+ virtual bool SpellMore();
+ virtual void InsertHyphen( const sal_uInt16 nPos ); // insert hyphen
+
+public:
+ SwHyphWrapper( SwView* pVw,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenator > &rxHyph,
+ sal_Bool bStart, sal_Bool bOther, sal_Bool bSelect );
+ ~SwHyphWrapper();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/idxmrk.hxx b/sw/source/core/uibase/inc/idxmrk.hxx
new file mode 100644
index 000000000000..597dee285a91
--- /dev/null
+++ b/sw/source/core/uibase/inc/idxmrk.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_IDXMRK_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_IDXMRK_HXX
+
+#include <sfx2/childwin.hxx>
+
+#include "swabstdlg.hxx"
+
+class SwWrtShell;
+
+class SwInsertIdxMarkWrapper : public SfxChildWindow
+{
+ AbstractMarkFloatDlg* pAbstDlg;
+protected:
+ SwInsertIdxMarkWrapper( Window *pParentWindow,
+ sal_uInt16 nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW_WITHID(SwInsertIdxMarkWrapper);
+
+public:
+ void ReInitDlg(SwWrtShell& rWrtShell);
+};
+
+class SwInsertAuthMarkWrapper : public SfxChildWindow
+{
+ AbstractMarkFloatDlg* pAbstDlg;
+protected:
+ SwInsertAuthMarkWrapper( Window *pParentWindow,
+ sal_uInt16 nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW_WITHID(SwInsertAuthMarkWrapper);
+
+public:
+ void ReInitDlg(SwWrtShell& rWrtShell);
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_IDXMRK_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/imaildsplistener.hxx b/sw/source/core/uibase/inc/imaildsplistener.hxx
new file mode 100644
index 000000000000..5b7e329df0d7
--- /dev/null
+++ b/sw/source/core/uibase/inc/imaildsplistener.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_IMAILDSPLISTENER_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_IMAILDSPLISTENER_HXX
+
+#include "com/sun/star/mail/XMailMessage.hpp"
+#include <salhelper/refobj.hxx>
+
+class MailDispatcher;
+
+/**
+ MailDispatcher listener interface.
+ Clients may implement and register instances of the
+ mail dispatcher interface in order to get notifications
+ about the MailDispatcher status.
+
+ @see MailDispatcher
+*/
+class IMailDispatcherListener : public ::salhelper::ReferenceObject
+{
+public:
+ /**
+ Called when the MailDispatcher is started.
+ */
+ virtual void started(::rtl::Reference<MailDispatcher> xMailDispatcher) = 0;
+
+ /**
+ Called when the MailDispatcher is stopped.
+ */
+ virtual void stopped(::rtl::Reference<MailDispatcher> xMailDispatcher) = 0;
+
+ /**
+ Called when there are no more mail messages
+ to deliver.
+ */
+ virtual void idle(::rtl::Reference<MailDispatcher> xMailDispatcher) = 0;
+
+ /**
+ Called for every mail message that has been
+ successfully delivered.
+ */
+ virtual void mailDelivered(::rtl::Reference<MailDispatcher> xMailDispatcher, ::com::sun::star::uno::Reference< ::com::sun::star::mail::XMailMessage> xMailMessage) = 0;
+
+ /**
+ Called for every mail message whose delivery
+ failed.
+ */
+ virtual void mailDeliveryError(::rtl::Reference<MailDispatcher> xMailDispatcher, ::com::sun::star::uno::Reference< ::com::sun::star::mail::XMailMessage> xMailMessage, const OUString& sErrorMessage) = 0;
+};
+
+#endif // INCLUDED_IMAILDISPATCHERLISTENER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/initui.hxx b/sw/source/core/uibase/inc/initui.hxx
new file mode 100644
index 000000000000..9d95043d3a19
--- /dev/null
+++ b/sw/source/core/uibase/inc/initui.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_INITUI_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_INITUI_HXX
+
+#include "tools/solar.h"
+#include "swdllapi.h"
+#include "rtl/ustring.hxx"
+
+#include <vector>
+
+/*
+ * Forward Declarations
+ */
+class SwThesaurus;
+
+/*
+ * Extern Definitions
+ */
+extern SwThesaurus* pThes;
+
+SW_DLLPUBLIC OUString GetOldGrfCat();
+SW_DLLPUBLIC void SetOldGrfCat(OUString sStr);
+SW_DLLPUBLIC OUString GetOldTabCat();
+SW_DLLPUBLIC void SetOldTabCat(OUString sStr);
+SW_DLLPUBLIC OUString GetOldFrmCat();
+SW_DLLPUBLIC void SetOldFrmCat(OUString sStr);
+SW_DLLPUBLIC OUString GetOldDrwCat();
+SW_DLLPUBLIC void SetOldDrwCat(OUString sStr);
+
+SW_DLLPUBLIC OUString GetCurrGlosGroup();
+SW_DLLPUBLIC void SetCurrGlosGroup(OUString sStr);
+
+// provides textblock management
+class SwGlossaries;
+SW_DLLPUBLIC SwGlossaries* GetGlossaries();
+
+class SwGlossaryList;
+
+bool HasGlossaryList();
+SwGlossaryList* GetGlossaryList();
+
+extern void _InitUI();
+extern void _FinitUI();
+extern void _InitSpell();
+extern void _FinitSpell();
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/inpdlg.hxx b/sw/source/core/uibase/inc/inpdlg.hxx
new file mode 100644
index 000000000000..d96c59f484ad
--- /dev/null
+++ b/sw/source/core/uibase/inc/inpdlg.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_INPDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_INPDLG_HXX
+
+#include <svx/stddlg.hxx>
+
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/vclmedit.hxx>
+
+class SwInputField;
+class SwSetExpField;
+class SwUserFieldType;
+class SwField;
+class SwWrtShell;
+
+/*--------------------------------------------------------------------
+ Description: insert fields
+ --------------------------------------------------------------------*/
+
+class SwFldInputDlg: public SvxStandardDialog
+{
+ virtual void Apply();
+ virtual void StateChanged( StateChangedType );
+
+ SwWrtShell& rSh;
+ SwInputField* pInpFld;
+ SwSetExpField* pSetFld;
+ SwUserFieldType* pUsrType;
+
+ Edit* m_pLabelED;
+
+ VclMultiLineEdit* m_pEditED;
+
+ OKButton* m_pOKBT;
+ PushButton* m_pNextBT;
+
+ DECL_LINK(NextHdl, void *);
+public:
+ SwFldInputDlg( Window *pParent, SwWrtShell &rSh,
+ SwField* pField, sal_Bool bNextButton = sal_False );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/inputwin.hxx b/sw/source/core/uibase/inc/inputwin.hxx
new file mode 100644
index 000000000000..2278f51c23d4
--- /dev/null
+++ b/sw/source/core/uibase/inc/inputwin.hxx
@@ -0,0 +1,119 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_INPUTWIN_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_INPUTWIN_HXX
+
+#include <vcl/edit.hxx>
+#include <vcl/menu.hxx>
+#include <vcl/toolbox.hxx>
+
+#include <sfx2/childwin.hxx>
+
+class SwFldMgr;
+class SwWrtShell;
+class SwView;
+class SfxDispatcher;
+
+class InputEdit : public Edit
+{
+public:
+ InputEdit(Window* pParent, WinBits nStyle) :
+ Edit(pParent , nStyle){}
+
+ void UpdateRange(const OUString& aSel,
+ const OUString& aTblName );
+
+protected:
+ virtual void KeyInput( const KeyEvent& );
+};
+
+class SwInputWindow : public ToolBox
+{
+friend class InputEdit;
+
+ Edit aPos;
+ InputEdit aEdit;
+ PopupMenu aPopMenu;
+ SwFldMgr* pMgr;
+ SwWrtShell* pWrtShell;
+ SwView* pView;
+ SfxBindings* pBindings;
+ OUString aAktTableName, sOldFml;
+
+ sal_Bool bFirst : 1; // initialisations at first call
+ sal_Bool bActive : 1; // for hide/show when switching documents
+ sal_Bool bIsTable : 1;
+ sal_Bool bDelSel : 1;
+ bool m_bDoesUndo : 1;
+ bool m_bResetUndo : 1;
+ bool m_bCallUndo : 1;
+
+ void CleanupUglyHackWithUndo();
+
+ void DelBoxCntnt();
+ DECL_LINK( ModifyHdl, void* );
+
+ using Window::IsActive;
+
+protected:
+ virtual void Resize();
+ virtual void Click();
+ DECL_LINK( MenuHdl, Menu * );
+ DECL_LINK( DropdownClickHdl, void* );
+ void ApplyFormula();
+ void CancelFormula();
+
+public:
+ SwInputWindow( Window* pParent, SfxBindings* pBindings );
+ virtual ~SwInputWindow();
+
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ void SelectHdl( ToolBox*);
+
+ void ShowWin();
+
+ sal_Bool IsActive(){ return bActive; };
+
+ DECL_LINK( SelTblCellsNotify, SwWrtShell * );
+
+ void SetFormula( const OUString& rFormula, sal_Bool bDelSel = sal_True );
+ const SwView* GetView() const{return pView;}
+};
+
+class SwInputChild : public SfxChildWindow
+{
+ SfxDispatcher* pDispatch;
+public:
+ SwInputChild( Window* ,
+ sal_uInt16 nId,
+ SfxBindings*,
+ SfxChildWinInfo* );
+ ~SwInputChild();
+ SFX_DECL_CHILDWINDOW_WITHID( SwInputChild );
+ void SetFormula( const OUString& rFormula, sal_Bool bDelSel = sal_True )
+ { ((SwInputWindow*)pWindow)->SetFormula(
+ rFormula, bDelSel ); }
+ const SwView* GetView() const{return ((SwInputWindow*)pWindow)->GetView();}
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/insfnote.hxx b/sw/source/core/uibase/inc/insfnote.hxx
new file mode 100644
index 000000000000..0c903a9a8341
--- /dev/null
+++ b/sw/source/core/uibase/inc/insfnote.hxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_INSFNOTE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_INSFNOTE_HXX
+
+#include <svx/stddlg.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+
+class SwWrtShell;
+
+class VclFrame;
+
+class SwInsFootNoteDlg: public SvxStandardDialog
+{
+ SwWrtShell &rSh;
+
+ // everything for the character(s)
+ OUString m_aFontName;
+ rtl_TextEncoding eCharSet;
+ sal_Bool bExtCharAvailable;
+ sal_Bool bEdit;
+
+ VclFrame* m_pNumberFrame;
+ RadioButton* m_pNumberAutoBtn;
+ RadioButton* m_pNumberCharBtn;
+ Edit* m_pNumberCharEdit;
+ PushButton* m_pNumberExtChar;
+
+ // everything for the selection footnote/endnote
+ RadioButton* m_pFtnBtn;
+ RadioButton* m_pEndNoteBtn;
+
+ PushButton* m_pOkBtn;
+ PushButton* m_pPrevBT;
+ PushButton* m_pNextBT;
+
+ DECL_LINK(NumberCharHdl, void *);
+ DECL_LINK(NumberEditHdl, void *);
+ DECL_LINK(NumberAutoBtnHdl, void *);
+ DECL_LINK(NumberExtCharHdl, void *);
+ DECL_LINK(NextPrevHdl, Button *);
+
+ virtual void Apply();
+
+ void Init();
+
+public:
+ SwInsFootNoteDlg(Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False);
+ ~SwInsFootNoteDlg();
+
+ rtl_TextEncoding GetCharSet() { return eCharSet; }
+ sal_Bool IsExtCharAvailable() { return bExtCharAvailable; }
+ OUString GetFontName() { return m_aFontName; }
+ sal_Bool IsEndNote() { return m_pEndNoteBtn->IsChecked(); }
+ OUString GetStr()
+ {
+ if ( m_pNumberCharBtn->IsChecked() )
+ return m_pNumberCharEdit->GetText();
+ return OUString();
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/instable.hxx b/sw/source/core/uibase/inc/instable.hxx
new file mode 100644
index 000000000000..e8046d6079a1
--- /dev/null
+++ b/sw/source/core/uibase/inc/instable.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_INSTABLE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_INSTABLE_HXX
+
+#include <rtl/ustring.hxx>
+#include <vcl/button.hxx>
+#include <vcl/field.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/layout.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <actctrl.hxx>
+
+class SwWrtShell;
+class SwTableAutoFmt;
+class SwView;
+struct SwInsertTableOptions;
+
+class SwInsTableDlg : public SfxModalDialog
+{
+ TableNameEdit* m_pNameEdit;
+
+ NumericField* m_pColNF;
+ NumericField* m_pRowNF;
+
+ CheckBox* m_pHeaderCB;
+ CheckBox* m_pRepeatHeaderCB;
+ NumericField* m_pRepeatHeaderNF;
+ VclContainer* m_pRepeatGroup;
+
+ CheckBox* m_pDontSplitCB;
+ CheckBox* m_pBorderCB;
+
+ PushButton* m_pInsertBtn;
+ PushButton* m_pAutoFmtBtn;
+
+ SwWrtShell* pShell;
+ SwTableAutoFmt* pTAutoFmt;
+ sal_Int64 nEnteredValRepeatHeaderNF;
+
+ DECL_LINK( ModifyName, Edit * );
+ DECL_LINK( ModifyRowCol, NumericField * );
+ DECL_LINK( AutoFmtHdl, PushButton* );
+ DECL_LINK(OKHdl, void*);
+ DECL_LINK(CheckBoxHdl, void * = 0);
+ DECL_LINK( ReapeatHeaderCheckBoxHdl, void* p = 0 );
+ DECL_LINK( ModifyRepeatHeaderNF_Hdl, void* p = 0 );
+
+public:
+ SwInsTableDlg( SwView& rView );
+ ~SwInsTableDlg();
+
+ void GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol,
+ SwInsertTableOptions& rInsTblOpts, OUString& rTableAutoFmtName,
+ SwTableAutoFmt *& prTAFmt );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/javaedit.hxx b/sw/source/core/uibase/inc/javaedit.hxx
new file mode 100644
index 000000000000..209c39a931fc
--- /dev/null
+++ b/sw/source/core/uibase/inc/javaedit.hxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_JAVAEDIT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_JAVAEDIT_HXX
+
+#include <svx/stddlg.hxx>
+#include <vcl/fixed.hxx>
+#include <svtools/svmedit.hxx>
+#include <vcl/button.hxx>
+
+class SwWrtShell;
+class SwFldMgr;
+class SwScriptField;
+
+namespace sfx2 { class FileDialogHelper; }
+
+// class SwJavaEditDialog -------------------------------------------------
+
+class SwJavaEditDialog : public SvxStandardDialog
+{
+private:
+ Edit* m_pTypeED;
+ RadioButton* m_pUrlRB;
+ RadioButton* m_pEditRB;
+ PushButton* m_pUrlPB;
+ Edit* m_pUrlED;
+ VclMultiLineEdit* m_pEditED;
+
+ OKButton* m_pOKBtn;
+ PushButton* m_pPrevBtn;
+ PushButton* m_pNextBtn;
+
+ OUString aText;
+ OUString aType;
+
+ sal_Bool bNew;
+ sal_Bool bIsUrl;
+
+ SwScriptField* pFld;
+ SwFldMgr* pMgr;
+ SwWrtShell* pSh;
+ sfx2::FileDialogHelper* pFileDlg;
+ Window* pOldDefDlgParent;
+
+ DECL_LINK(OKHdl, void *);
+ DECL_LINK(PrevHdl, void *);
+ DECL_LINK(NextHdl, void *);
+ DECL_LINK(RadioButtonHdl, void *);
+ DECL_LINK(InsertFileHdl, PushButton *);
+ DECL_LINK(DlgClosedHdl, void *);
+
+ virtual void Apply();
+
+ void CheckTravel();
+ void SetFld();
+
+public:
+ SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh);
+ ~SwJavaEditDialog();
+
+ OUString GetScriptText() const { return aText; }
+
+ OUString GetScriptType() const { return aType; }
+
+ sal_Bool IsUrl() const { return bIsUrl; }
+ sal_Bool IsNew() const { return bNew; }
+ bool IsUpdate() const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/label.hxx b/sw/source/core/uibase/inc/label.hxx
new file mode 100644
index 000000000000..43eb936734e5
--- /dev/null
+++ b/sw/source/core/uibase/inc/label.hxx
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_LABEL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_LABEL_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <com/sun/star/frame/XModel.hpp>
+#include <labelcfg.hxx>
+#include <vector>
+
+class SwLabRec;
+class SwLabRecs;
+class SwLabItem;
+class SwLabPrtPage;
+class SwNewDBMgr;
+class Printer;
+
+class SwLabDlg : public SfxTabDialog
+{
+ SwLabelConfig aLabelsCfg;
+ SwNewDBMgr* pNewDBMgr;
+ SwLabPrtPage* pPrtPage;
+
+ std::vector<sal_uInt16> aTypeIds;
+ std::vector<OUString> aMakes;
+
+ SwLabRecs* pRecs;
+ OUString aLstGroup;
+ OUString m_sBusinessCardDlg;
+ bool m_bLabel;
+ sal_uInt16 m_nFormatId;
+ sal_uInt16 m_nOptionsId;
+ sal_uInt16 m_nLabelId;
+ sal_uInt16 m_nCardsId;
+ sal_uInt16 m_nBusinessId;
+ sal_uInt16 m_nPrivateId;
+ void _ReplaceGroup( const OUString &rMake );
+
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
+public:
+
+ SwLabDlg( Window* pParent, const SfxItemSet& rSet,
+ SwNewDBMgr* pNewDBMgr, sal_Bool bLabel);
+ ~SwLabDlg();
+
+ SwLabRec* GetRecord(const OUString &rRecName, sal_Bool bCont);
+ void GetLabItem(SwLabItem &rItem);
+
+ SwLabRecs &Recs() { return *pRecs; }
+ const SwLabRecs &Recs() const { return *pRecs; }
+
+ std::vector<sal_uInt16> &TypeIds() { return aTypeIds; }
+ const std::vector<sal_uInt16> &TypeIds() const { return aTypeIds; }
+
+ std::vector<OUString> &Makes() { return aMakes; }
+ const std::vector<OUString> &Makes() const { return aMakes; }
+
+ Printer *GetPrt();
+ inline void ReplaceGroup( const OUString &rMake );
+ void UpdateGroup( const OUString &rMake ) {_ReplaceGroup( rMake );}
+ static void UpdateFieldInformation(::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& xModel,
+ const SwLabItem& rItem);
+ const OUString& GetBusinessCardStr() const {return m_sBusinessCardDlg;}
+
+ SwLabelConfig& GetLabelsConfig() {return aLabelsCfg;}
+
+};
+
+inline void SwLabDlg::ReplaceGroup( const OUString &rMake )
+{
+ if ( rMake != aLstGroup )
+ _ReplaceGroup( rMake );
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/labelcfg.hxx b/sw/source/core/uibase/inc/labelcfg.hxx
new file mode 100644
index 000000000000..a70260010d58
--- /dev/null
+++ b/sw/source/core/uibase/inc/labelcfg.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_LABELCFG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_LABELCFG_HXX
+
+#include <unotools/configitem.hxx>
+#include "swdllapi.h"
+
+#include <map>
+#include <vector>
+
+class SwLabRecs;
+class SwLabRec;
+
+struct SwLabelMeasure
+{
+ OUString m_aMeasure; // string contains the label dimensions
+ bool m_bPredefined; // used to distinguish predefined from user-defined labels
+};
+
+class SW_DLLPUBLIC SwLabelConfig : public utl::ConfigItem
+{
+ std::vector<OUString> m_aManufacturers;
+ std::map< OUString, std::map<OUString, SwLabelMeasure> > m_aLabels;
+
+public:
+ SwLabelConfig();
+ virtual ~SwLabelConfig();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+
+ void FillLabels(const OUString& rManufacturer, SwLabRecs& rLabArr);
+ const std::vector<OUString>& GetManufacturers() const {return m_aManufacturers;}
+
+ sal_Bool HasLabel(const OUString& rManufacturer, const OUString& rType);
+ bool IsPredefinedLabel(const OUString& rManufacturer, const OUString& rType)
+ { return m_aLabels[rManufacturer][rType].m_bPredefined; };
+ void SaveLabel(const OUString& rManufacturer, const OUString& rType,
+ const SwLabRec& rRec);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/labimg.hxx b/sw/source/core/uibase/inc/labimg.hxx
new file mode 100644
index 000000000000..d668383efb68
--- /dev/null
+++ b/sw/source/core/uibase/inc/labimg.hxx
@@ -0,0 +1,125 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_LABIMG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_LABIMG_HXX
+
+#include <svl/poolitem.hxx>
+#include <unotools/configitem.hxx>
+#include "swdllapi.h"
+
+// class SwLabItem ----------------------------------------------------------
+class SwLabCfgItem;
+
+class SW_DLLPUBLIC SwLabItem : public SfxPoolItem
+{
+
+public:
+
+ SwLabItem();
+ SwLabItem(const SwLabItem& rItem);
+
+ SwLabItem& operator =(const SwLabItem& rItem);
+
+ virtual bool operator ==(const SfxPoolItem& rItem) const;
+
+ virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
+
+ OUString aLstMake; // remember last selection
+ OUString aLstType;
+ OUString sDBName; // used database
+
+ OUString aWriting; // label
+ OUString aMake; // label mark
+ OUString aType; // label type
+ OUString aBin; // printer shaft
+ sal_Int32 lHDist; // horizontal distance (user)
+ sal_Int32 lVDist; // vertical distance (user)
+ sal_Int32 lWidth; // width (user)
+ sal_Int32 lHeight; // height (user)
+ sal_Int32 lLeft; // left border (user)
+ sal_Int32 lUpper; // upper border (user)
+ sal_Int32 nCols; // number of columns (user)
+ sal_Int32 nRows; // number of rows (user)
+ sal_Int32 nCol; // column for single print
+ sal_Int32 nRow; // row for single print
+ sal_Int32 lPHeight; // paper height
+ sal_Int32 lPWidth; // paper width
+ sal_Bool bAddr;// address as label?
+ sal_Bool bCont;// continuous paper?
+ sal_Bool bPage;// whole page or single labels?
+ sal_Bool bSynchron;// synchronise all labels
+
+ //parts of the business card
+ OUString aPrivFirstName;
+ OUString aPrivName;
+ OUString aPrivShortCut;
+ OUString aPrivFirstName2;
+ OUString aPrivName2;
+ OUString aPrivShortCut2;
+ OUString aPrivStreet;
+ OUString aPrivZip;
+ OUString aPrivCity;
+ OUString aPrivCountry;
+ OUString aPrivState;
+ OUString aPrivTitle;
+ OUString aPrivProfession;
+ OUString aPrivPhone;
+ OUString aPrivMobile;
+ OUString aPrivFax;
+ OUString aPrivWWW;
+ OUString aPrivMail;
+ OUString aCompCompany;
+ OUString aCompCompanyExt;
+ OUString aCompSlogan;
+ OUString aCompStreet;
+ OUString aCompZip;
+ OUString aCompCity;
+ OUString aCompCountry;
+ OUString aCompState;
+ OUString aCompPosition;
+ OUString aCompPhone;
+ OUString aCompMobile;
+ OUString aCompFax;
+ OUString aCompWWW;
+ OUString aCompMail;
+
+ OUString sGlossaryGroup;
+ OUString sGlossaryBlockName;
+};
+
+// class SwLabCfgItem -------------------------------------------------------
+class SwLabCfgItem : public utl::ConfigItem
+{
+ SwLabItem aItem;
+ sal_Bool bIsLabel;
+
+ com::sun::star::uno::Sequence<OUString> GetPropertyNames();
+public:
+ SwLabCfgItem(sal_Bool bLabel);
+
+ SwLabItem& GetItem() {return aItem;}
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/langhelper.hxx b/sw/source/core/uibase/inc/langhelper.hxx
new file mode 100644
index 000000000000..c771c0040c2f
--- /dev/null
+++ b/sw/source/core/uibase/inc/langhelper.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_LANGHELPER_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_LANGHELPER_HXX
+
+class SwWrtShell;
+class SwView;
+class EditEngine;
+class EditView;
+class OutlinerView;
+class SfxItemSet;
+struct ESelection;
+
+namespace SwLangHelper
+{
+ extern sal_uInt16 GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet );
+ extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView &rView, SwWrtShell &rSh );
+
+ extern void SetLanguage( SwWrtShell &rWrtSh, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
+// extern void SetLanguage( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, const String &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet );
+// extern void SetLanguage_None( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void ResetLanguages( SwWrtShell &rWrtSh, bool bIsForSelection );
+// extern void ResetLanguages( SwWrtShell &rWrtSh, EditEngine* pEditEngine, ESelection aSelection, bool bIsForSelection );
+ extern void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView* pOLV, ESelection aSelection, bool bIsForSelection );
+
+ // document
+ extern void SelectCurrentPara( SwWrtShell &rWrtSh );
+ // EditView
+ extern void SelectPara( EditView &rEditView, const ESelection &rCurSel );
+
+ extern OUString GetTextForLanguageGuessing( EditEngine* rEditEngine, ESelection aDocSelection );
+ extern OUString GetTextForLanguageGuessing( SwWrtShell &rSh );
+
+ extern LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId );
+ extern LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId );
+
+ extern LanguageType GetCurrentLanguage( SfxItemSet aSet, sal_uInt16 nScriptType );
+ extern LanguageType GetCurrentLanguage( SwWrtShell &rSh );
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/linenum.hxx b/sw/source/core/uibase/inc/linenum.hxx
new file mode 100644
index 000000000000..94cc0fa02589
--- /dev/null
+++ b/sw/source/core/uibase/inc/linenum.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_LINENUM_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_LINENUM_HXX
+
+#include <sfx2/basedlgs.hxx>
+#include <vcl/button.hxx>
+#include <vcl/layout.hxx>
+#include <vcl/lstbox.hxx>
+#include <numberingtypelistbox.hxx>
+
+class Window;
+class SwView;
+class SwWrtShell;
+
+class SwLineNumberingDlg : public SfxModalDialog
+{
+private:
+ SwWrtShell* pSh;
+ VclContainer* m_pBodyContent;
+ Window* m_pDivIntervalFT;
+ NumericField* m_pDivIntervalNF;
+ Window* m_pDivRowsFT;
+ NumericField* m_pNumIntervalNF;
+ ListBox* m_pCharStyleLB;
+ SwNumberingTypeListBox* m_pFormatLB;
+ ListBox* m_pPosLB;
+ MetricField* m_pOffsetMF;
+ Edit* m_pDivisorED;
+ CheckBox* m_pCountEmptyLinesCB;
+ CheckBox* m_pCountFrameLinesCB;
+ CheckBox* m_pRestartEachPageCB;
+ CheckBox* m_pNumberingOnCB;
+
+ DECL_LINK(OKHdl, void *);
+ DECL_LINK(LineOnOffHdl, void * = 0);
+ DECL_LINK(ModifyHdl, void * = 0);
+
+public:
+ SwWrtShell* GetWrtShell() const { return pSh; }
+
+ SwLineNumberingDlg(SwView *pVw);
+ ~SwLineNumberingDlg();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/listsh.hxx b/sw/source/core/uibase/inc/listsh.hxx
new file mode 100644
index 000000000000..d37d9ed62b6e
--- /dev/null
+++ b/sw/source/core/uibase/inc/listsh.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_LISTSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_LISTSH_HXX
+
+#include "basesh.hxx"
+
+class SwListShell: public SwBaseShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_LISTSHELL)
+ TYPEINFO();
+
+ SwListShell(SwView &rView);
+
+ void Execute(SfxRequest &);
+ void GetState(SfxItemSet &);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/macassgn.hxx b/sw/source/core/uibase/inc/macassgn.hxx
new file mode 100644
index 000000000000..cb4cda8e0391
--- /dev/null
+++ b/sw/source/core/uibase/inc/macassgn.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_MACASSGN_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_MACASSGN_HXX
+
+#include <sfx2/evntconf.hxx>
+
+class SwWrtShell;
+class SvxMacroItem;
+
+enum DlgEventType
+{
+ MACASSGN_AUTOTEXT,
+ MACASSGN_GRAPHIC,
+ MACASSGN_OLE,
+ MACASSGN_FRMURL,
+ MACASSGN_INETFMT,
+ MACASSGN_ALLFRM
+};
+
+class SwMacroAssignDlg
+{
+public:
+ static SfxEventNamesItem AddEvents( DlgEventType eType );
+ static bool INetFmtDlg( Window* pParent, SwWrtShell& rSh,
+ SvxMacroItem*& rpINetItem );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/mailconfigpage.hxx b/sw/source/core/uibase/inc/mailconfigpage.hxx
new file mode 100644
index 000000000000..2de39fd89704
--- /dev/null
+++ b/sw/source/core/uibase/inc/mailconfigpage.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_MAILCONFIGPAGE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_MAILCONFIGPAGE_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/button.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <sfx2/basedlgs.hxx>
+
+class SwTestAccountSettingsDialog;
+class SwMailMergeConfigItem;
+
+class SwMailConfigPage : public SfxTabPage
+{
+ friend class SwTestAccountSettingsDialog;
+
+ Edit* m_pDisplayNameED;
+ Edit* m_pAddressED;
+
+ CheckBox* m_pReplyToCB;
+ FixedText* m_pReplyToFT;
+ Edit* m_pReplyToED;
+
+ Edit* m_pServerED;
+ NumericField* m_pPortNF;
+
+ CheckBox* m_pSecureCB;
+
+ PushButton* m_pServerAuthenticationPB;
+ PushButton* m_pTestPB;
+
+ SwMailMergeConfigItem* m_pConfigItem;
+
+ DECL_LINK(ReplyToHdl, CheckBox*);
+ DECL_LINK(AuthenticationHdl, void *);
+ DECL_LINK(TestHdl, void *);
+
+public:
+ SwMailConfigPage( Window* pParent, const SfxItemSet& rSet );
+ ~SwMailConfigPage();
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+
+};
+
+class SwMailConfigDlg : public SfxSingleTabDialog
+{
+public:
+ SwMailConfigDlg(Window* pParent, SfxItemSet& rSet);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/maildispatcher.hxx b/sw/source/core/uibase/inc/maildispatcher.hxx
new file mode 100644
index 000000000000..512d6fde5b56
--- /dev/null
+++ b/sw/source/core/uibase/inc/maildispatcher.hxx
@@ -0,0 +1,154 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_MAILDISPATCHER_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_MAILDISPATCHER_HXX
+
+#include "com/sun/star/mail/XSmtpService.hpp"
+#include "com/sun/star/mail/XMailMessage.hpp"
+#include <osl/thread.hxx>
+#include <osl/conditn.hxx>
+#include <salhelper/refobj.hxx>
+
+#include <list>
+
+class IMailDispatcherListener;
+
+/**
+ A MailDispatcher should be used for sending a bunch a mail messages
+ asynchronously. Usually a client enqueues a number of mail messages
+ and then calls start to begin sending them. An instance of this class
+ must not be shared among different client threads. Instead each client
+ thread should create an own instance of this class.
+*/
+class MailDispatcher : public ::salhelper::ReferenceObject, private ::osl::Thread
+{
+public:
+ // bringing operator new/delete into scope
+ using osl::Thread::operator new;
+ using osl::Thread::operator delete;
+ using osl::Thread::join;
+
+public:
+
+ /**
+ @param xSmtpService
+ [in] a reference to a mail server. A user must be
+ connected to the mail server otherwise errors occur
+ during the delivery of mail messages.
+
+ @throws ::com::sun::star::uno::RuntimeException
+ on errors during construction of an instance of this class.
+ */
+ MailDispatcher(::com::sun::star::uno::Reference< ::com::sun::star::mail::XSmtpService> xMailService);
+
+ /**
+ Shutdown the mail dispatcher. Every mail messages
+ not yet sent will be discarded.
+ */
+ virtual ~MailDispatcher();
+
+ /**
+ Enqueue a mail message for delivery. A client must
+ start the mail dispatcher in order to send the
+ enqueued mail messages.
+
+ @param xMailMessage
+ [in] a mail message that should be send.
+ */
+ void enqueueMailMessage(::com::sun::star::uno::Reference< ::com::sun::star::mail::XMailMessage> xMailMessage);
+ /**
+ Dequeues a mail message.
+ This enables the caller to remove attachments when sending mails is to be cancelled.
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::mail::XMailMessage> dequeueMailMessage();
+
+ /**
+ Start sending mail messages asynchronously. A client may register
+ a listener for mail dispatcher events. For every mail message sent
+ the notification will be sent. While handling such notification a
+ client may enqueue new mail messages. If there are no more mail
+ messages to send an respective notification is sent and the mail
+ dispatcher waits for more mail messages.
+
+ @precond not isStarted()
+ */
+ void start();
+
+ /**
+ Stop sending mail messages.
+
+ @precond isStarted()
+ */
+ void stop();
+
+ /**
+ Request shutdown of the mail dispatcher thread.
+ NOTE: You must call this method before you release
+ your last reference to this class otherwise the
+ mail dispatcher thread will never end.
+ */
+ void shutdown();
+
+ /**
+ Check whether the mail dispatcher is started or not.
+
+ @return
+ <TRUE/> if the sending thread is running.
+ */
+ bool isStarted() const;
+
+ /** returns if the thread is still running
+ */
+ using osl::Thread::isRunning;
+
+ /** returns if shutdown has already been called
+ */
+ bool isShutdownRequested() const
+ { return shutdown_requested_; }
+ /**
+ Register a listener for mail dispatcher events.
+ */
+ void addListener(::rtl::Reference<IMailDispatcherListener> listener);
+
+protected:
+ virtual void SAL_CALL run();
+ virtual void SAL_CALL onTerminated();
+
+private:
+ std::list< ::rtl::Reference<IMailDispatcherListener> > cloneListener();
+ void sendMailMessageNotifyListener(::com::sun::star::uno::Reference< ::com::sun::star::mail::XMailMessage> message);
+
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::mail::XSmtpService> mailserver_;
+ ::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::mail::XMailMessage > > messages_;
+ ::std::list< ::rtl::Reference<IMailDispatcherListener> > listeners_;
+ ::osl::Mutex message_container_mutex_;
+ ::osl::Mutex listener_container_mutex_;
+ ::osl::Mutex thread_status_mutex_;
+ ::osl::Condition mail_dispatcher_active_;
+ ::osl::Condition wakening_call_;
+ ::rtl::Reference<MailDispatcher> m_xSelfReference;
+ bool run_;
+ bool shutdown_requested_;
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_MAILDISPATCHER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/mailmergechildwindow.hxx b/sw/source/core/uibase/inc/mailmergechildwindow.hxx
new file mode 100644
index 000000000000..f1ecd5a87c2c
--- /dev/null
+++ b/sw/source/core/uibase/inc/mailmergechildwindow.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_MAILMERGECHILDWINDOW_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_MAILMERGECHILDWINDOW_HXX
+#include <sfx2/childwin.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <vcl/toolbox.hxx>
+#include "swdllapi.h"
+
+class SwMailMergeChildWin : public SfxFloatingWindow
+{
+ ToolBox m_aBackTB;
+
+ DECL_LINK( BackHdl, void* );
+
+public:
+ SwMailMergeChildWin(SfxBindings*, SfxChildWindow*, Window *pParent);
+ ~SwMailMergeChildWin();
+
+ virtual void FillInfo(SfxChildWinInfo&) const;
+};
+
+class SwMailMergeChildWindow : public SfxChildWindow
+{
+public:
+ SwMailMergeChildWindow( Window* ,
+ sal_uInt16 nId,
+ SfxBindings*,
+ SfxChildWinInfo* );
+
+ SFX_DECL_CHILDWINDOW( SwMailMergeChildWindow );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/mailmergehelper.hxx b/sw/source/core/uibase/inc/mailmergehelper.hxx
new file mode 100644
index 000000000000..fc87a3ec9949
--- /dev/null
+++ b/sw/source/core/uibase/inc/mailmergehelper.hxx
@@ -0,0 +1,310 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_MAILMERGEHELPER_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_MAILMERGEHELPER_HXX
+
+#include <svtools/stdctrl.hxx>
+#include <unotools/configitem.hxx>
+#include <com/sun/star/uno/Sequence.h>
+#include "com/sun/star/mail/XAuthenticator.hpp"
+#include "com/sun/star/mail/XConnectionListener.hpp"
+#include "com/sun/star/uno/XCurrentContext.hpp"
+#include "com/sun/star/mail/XMailMessage.hpp"
+#include "com/sun/star/datatransfer/XTransferable.hpp"
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/compbase2.hxx>
+#include <vcl/scrbar.hxx>
+#include "rtl/ustring.hxx"
+#include "swdllapi.h"
+
+class SwMailMergeConfigItem;
+
+namespace com { namespace sun { namespace star { namespace mail {
+ class XMailService;
+ class XSmtpService;
+} } } }
+
+namespace SwMailMergeHelper
+{
+ SW_DLLPUBLIC OUString CallSaveAsDialog(OUString& rFilter);
+ SW_DLLPUBLIC bool CheckMailAddress( const OUString& rMailAddress );
+ SW_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::mail::XSmtpService >
+ ConnectToSmtpServer( SwMailMergeConfigItem& rConfigItem,
+ com::sun::star::uno::Reference< com::sun::star::mail::XMailService >& xInMailService,
+ const OUString& rInMailServerPassword,
+ const OUString& rOutMailServerPassword,
+ Window* pDialogParentWindow = 0 );
+}
+
+class SW_DLLPUBLIC SwBoldFixedInfo : public FixedInfo
+{
+public:
+ SwBoldFixedInfo(Window* pParent, const ResId& rResId);
+ ~SwBoldFixedInfo();
+};
+struct SwAddressPreview_Impl;
+
+/*-------------------------------------------------------------------------
+ Preview window used to show the possible selection of address blocks
+ and also the resulting address filled with database data
+ -----------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwAddressPreview : public Window
+{
+ ScrollBar aVScrollBar;
+ SwAddressPreview_Impl* pImpl;
+ Link m_aSelectHdl;
+
+ void DrawText_Impl( const OUString& rAddress, const Point& rTopLeft, const Size& rSize, bool bIsSelected);
+
+ virtual void Paint(const Rectangle&);
+ virtual void Resize();
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void StateChanged( StateChangedType nStateChange );
+ void UpdateScrollBar();
+
+ DECL_LINK(ScrollHdl, void*);
+
+public:
+ SwAddressPreview(Window* pParent, const ResId& rResId);
+
+ SwAddressPreview(Window* pParent, WinBits nStyle=WB_BORDER);
+
+ void positionScrollBar();
+
+ /** The address string is a list of address elements separated by spaces
+ and breaks. The addresses fit into the given layout. If more addresses then
+ rows/columns should be used a scrollbar will be added.
+
+ AddAddress appends the new address to the already added ones.
+ Initially the first added address will be selected
+ */
+ void AddAddress(const OUString& rAddress);
+ // for preview mode - replaces the currently used address by the given one
+ void SetAddress(const OUString& rAddress);
+ // removes all addresses
+ void Clear();
+
+ // returns the selected address
+ sal_uInt16 GetSelectedAddress() const;
+ void SelectAddress(sal_uInt16 nSelect);
+ void ReplaceSelectedAddress(const OUString&);
+ void RemoveSelectedAddress();
+
+ // set the number of rows and columns of addresses
+ void SetLayout(sal_uInt16 nRows, sal_uInt16 nColumns);
+ void EnableScrollBar(bool bEnable = true);
+
+ // fill the actual data into a string (address block or greeting)
+ static OUString FillData(
+ const OUString& rAddress,
+ SwMailMergeConfigItem& rConfigItem,
+ const ::com::sun::star::uno::Sequence< OUString>* pAssignments = 0);
+
+ void SetSelectHdl (const Link& rLink) {m_aSelectHdl = rLink;}
+};
+
+/*-------------------------------------------------------------------------
+ iterate over an address block or a greeting line
+ the iterator returns the parts either as pure string
+ or as column
+ -----------------------------------------------------------------------*/
+struct SwMergeAddressItem
+{
+ OUString sText;
+ bool bIsColumn;
+ bool bIsReturn;
+ SwMergeAddressItem() :
+ bIsColumn(false),
+ bIsReturn(false) {}
+};
+
+class SW_DLLPUBLIC SwAddressIterator
+{
+ OUString sAddress;
+public:
+ SwAddressIterator(const OUString& rAddress) :
+ sAddress(rAddress){}
+
+ SwMergeAddressItem Next();
+ bool HasMore() const{return !sAddress.isEmpty();}
+};
+
+class SW_DLLPUBLIC SwAuthenticator :
+ public cppu::WeakImplHelper1< ::com::sun::star::mail::XAuthenticator>
+{
+ OUString m_aUserName;
+ OUString m_aPassword;
+ Window* m_pParentWindow;
+public:
+ SwAuthenticator() : m_pParentWindow(0) {}
+ SwAuthenticator(const OUString& username, const OUString& password, Window* pParent) :
+ m_aUserName(username),
+ m_aPassword(password),
+ m_pParentWindow( pParent )
+ {}
+ ~SwAuthenticator();
+
+ virtual OUString SAL_CALL getUserName( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual OUString SAL_CALL getPassword( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+
+};
+
+class SW_DLLPUBLIC SwConnectionContext :
+ public cppu::WeakImplHelper1< ::com::sun::star::uno::XCurrentContext >
+{
+ OUString m_sMailServer;
+ sal_Int16 m_nPort;
+ OUString m_sConnectionType;
+
+public:
+ SwConnectionContext(const OUString& rMailServer, sal_Int16 nPort, const OUString& rConnectionType);
+ ~SwConnectionContext();
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getValueByName( const OUString& Name )
+ throw (::com::sun::star::uno::RuntimeException, std::exception);
+};
+
+class SwMutexBase
+{
+public:
+ osl::Mutex m_aMutex;
+};
+
+class SW_DLLPUBLIC SwConnectionListener :
+ public SwMutexBase,
+ public cppu::WeakComponentImplHelper1< ::com::sun::star::mail::XConnectionListener >
+{
+ using cppu::WeakComponentImplHelperBase::disposing;
+
+public:
+ SwConnectionListener() :
+ cppu::WeakComponentImplHelper1< ::com::sun::star::mail::XConnectionListener>(m_aMutex)
+ {}
+ ~SwConnectionListener();
+
+ virtual void SAL_CALL connected(const ::com::sun::star::lang::EventObject& aEvent)
+ throw (::com::sun::star::uno::RuntimeException, std::exception);
+
+ virtual void SAL_CALL disconnected(const ::com::sun::star::lang::EventObject& aEvent)
+ throw (::com::sun::star::uno::RuntimeException, std::exception);
+
+ virtual void SAL_CALL disposing(const com::sun::star::lang::EventObject& aEvent)
+ throw(com::sun::star::uno::RuntimeException, std::exception);
+};
+
+class SwMailTransferable :
+ public SwMutexBase,
+ public cppu::WeakComponentImplHelper2
+ <
+ ::com::sun::star::datatransfer::XTransferable,
+ ::com::sun::star::beans::XPropertySet
+ >
+{
+ OUString m_aMimeType;
+ OUString m_sBody;
+ OUString m_aURL;
+ OUString m_aName;
+ bool m_bIsBody;
+
+ public:
+ SwMailTransferable(const OUString& rURL, const OUString& rName, const OUString& rMimeType);
+ SwMailTransferable(const OUString& rBody, const OUString& rMimeType);
+ ~SwMailTransferable();
+ virtual ::com::sun::star::uno::Any SAL_CALL
+ getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
+ throw (::com::sun::star::datatransfer::UnsupportedFlavorException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL
+ getTransferDataFlavors( )
+ throw (::com::sun::star::uno::RuntimeException, std::exception) ;
+ virtual ::sal_Bool SAL_CALL
+ isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
+ throw (::com::sun::star::uno::RuntimeException, std::exception);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setPropertyValue( const 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, std::exception);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL addPropertyChangeListener( const 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, std::exception);
+ virtual void SAL_CALL removePropertyChangeListener( const 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, std::exception);
+ virtual void SAL_CALL addVetoableChangeListener( const 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, std::exception);
+ virtual void SAL_CALL removeVetoableChangeListener( const 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, std::exception);
+
+};
+
+class SwMailMessage :
+ public SwMutexBase,
+ public cppu::WeakComponentImplHelper1< ::com::sun::star::mail::XMailMessage >
+{
+ OUString m_sSenderName;
+ OUString m_sSenderAddress;
+ OUString m_sReplyToAddress;
+ OUString m_sSubject;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable> m_xBody;
+// ::com::sun::star::mail::MailMessageBody m_aBody;
+
+ ::com::sun::star::uno::Sequence< OUString > m_aRecipients;
+ ::com::sun::star::uno::Sequence< OUString > m_aCcRecipients;
+ ::com::sun::star::uno::Sequence< OUString > m_aBccRecipients;
+// ::com::sun::star::uno::Sequence< ::com::sun::star::mail::MailAttachmentDescriptor > m_aAttachments;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::mail::MailAttachment > m_aAttachments;
+public:
+ SwMailMessage();
+ ~SwMailMessage();
+
+ // attributes
+ virtual OUString SAL_CALL getSenderName() throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual OUString SAL_CALL getSenderAddress() throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual OUString SAL_CALL getReplyToAddress() throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setReplyToAddress( const OUString& _replytoaddress ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual OUString SAL_CALL getSubject() throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setSubject( const OUString& _subject ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL
+ getBody()
+ throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setBody( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& _body )
+ throw (::com::sun::star::uno::RuntimeException, std::exception);
+
+ // methods
+ virtual void SAL_CALL addRecipient( const OUString& sRecipientAddress ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL addCcRecipient( const OUString& sRecipientAddress ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL addBccRecipient( const OUString& sRecipientAddress ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
+ getRecipients( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
+ getCcRecipients( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
+ getBccRecipients( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL addAttachment( const ::com::sun::star::mail::MailAttachment& aMailAttachment )
+ throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::mail::MailAttachment > SAL_CALL
+ getAttachments( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ void SetSenderName(const OUString& rSenderName)
+ {m_sSenderName = rSenderName;}
+ void SetSenderAddress(const OUString& rSenderAddress)
+ {m_sSenderAddress = rSenderAddress;}
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/mailmergewizard.hxx b/sw/source/core/uibase/inc/mailmergewizard.hxx
new file mode 100644
index 000000000000..f7a3b2ce944f
--- /dev/null
+++ b/sw/source/core/uibase/inc/mailmergewizard.hxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_MAILMERGEWIZARD_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_MAILMERGEWIZARD_HXX
+
+#include <svtools/roadmapwizard.hxx>
+#include "rtl/ustring.hxx"
+
+class SwView;
+class SwMailMergeConfigItem;
+
+#define MM_DOCUMENTSELECTPAGE 0
+#define MM_OUTPUTTYPETPAGE 1
+#define MM_ADDRESSBLOCKPAGE 2
+#define MM_GREETINGSPAGE 3
+#define MM_LAYOUTPAGE 4
+#define MM_PREPAREMERGEPAGE 5
+#define MM_MERGEPAGE 6
+#define MM_OUTPUTPAGE 7
+
+class SwMailMergeWizard : public ::svt::RoadmapWizard
+{
+ SwView* m_pSwView;
+ OUString sDocumentURL;
+ bool m_bDocumentLoad;
+
+ SwMailMergeConfigItem& m_rConfigItem;
+
+ OUString m_sStarting;
+ OUString m_sDocumentType;
+ OUString m_sAddressBlock;
+ OUString m_sAddressList;
+ OUString m_sGreetingsLine;
+ OUString m_sLayout;
+ OUString m_sPrepareMerge;
+ OUString m_sMerge;
+ OUString m_sOutput;
+ OUString m_sFinish;
+
+ sal_uInt16 m_nRestartPage;
+
+ using svt::OWizardMachine::skipUntil;
+
+protected:
+ virtual svt::OWizardPage* createPage(WizardState _nState);
+ virtual void enterState( WizardState _nState );
+
+// roadmap feature ??
+// virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
+ virtual OUString getStateDisplayName( WizardState _nState ) const;
+
+public:
+ SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem);
+ ~SwMailMergeWizard();
+
+ SwView* GetSwView() {return m_pSwView;}
+ SwMailMergeConfigItem& GetConfigItem() { return m_rConfigItem;}
+
+ void SetReloadDocument(const OUString& rURL) {sDocumentURL = rURL;}
+ OUString GetReloadDocument() const {return sDocumentURL;}
+
+ //next step requires loading of document
+ void SetDocumentLoad(bool bSet) {m_bDocumentLoad = bSet;}
+
+ void UpdateRoadmap();
+ void CreateTargetDocument();
+
+ sal_uInt16 GetRestartPage() const {return m_nRestartPage;}
+ void SetRestartPage(sal_uInt16 nPage) { m_nRestartPage = nPage;}
+
+ sal_Bool skipUntil( sal_uInt16 nPage)
+ {return ::svt::RoadmapWizard::skipUntil(WizardState(nPage));}
+
+ void updateRoadmapItemLabel( WizardState _nState );
+
+ virtual short Execute();
+ virtual void StartExecuteModal( const Link& rEndDialogHdl );
+};
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/mailmrge.hxx b/sw/source/core/uibase/inc/mailmrge.hxx
new file mode 100644
index 000000000000..c59bfda286f8
--- /dev/null
+++ b/sw/source/core/uibase/inc/mailmrge.hxx
@@ -0,0 +1,176 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_MAILMRGE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_MAILMRGE_HXX
+
+#include <svx/stddlg.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/field.hxx>
+
+#include <vcl/fixed.hxx>
+#include <vcl/edit.hxx>
+#include <svtools/stdctrl.hxx>
+
+#include <vcl/lstbox.hxx>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/uno/Reference.h>
+
+class SwWrtShell;
+class SwModuleOptions;
+class SwXSelChgLstnr_Impl;
+struct SwMailMergeDlg_Impl;
+namespace com{namespace sun{namespace star{
+ namespace frame{
+ class XFrame2;
+ }
+ namespace sdbc{
+ class XResultSet;
+ class XConnection;
+ }
+}}}
+
+class SwMailMergeDlg : public SvxStandardDialog
+{
+ friend class SwXSelChgLstnr_Impl;
+
+ Window* pBeamerWin;
+
+ RadioButton aAllRB;
+ RadioButton aMarkedRB;
+ RadioButton aFromRB;
+ NumericField aFromNF;
+ FixedText aBisFT;
+ NumericField aToNF;
+ FixedLine aRecordFL;
+
+ FixedLine aSeparatorFL;
+
+ RadioButton aPrinterRB;
+ RadioButton aMailingRB;
+ RadioButton aFileRB;
+
+ CheckBox aSingleJobsCB;
+
+ FixedLine aSaveMergedDocumentFL;
+ RadioButton aSaveSingleDocRB;
+ RadioButton aSaveIndividualRB;
+
+ CheckBox aGenerateFromDataBaseCB;
+
+ FixedText aColumnFT;
+ ListBox aColumnLB;
+ FixedText aPathFT;
+ Edit aPathED;
+ PushButton aPathPB;
+ FixedText aFilterFT;
+ ListBox aFilterLB;
+
+ ListBox aAddressFldLB;
+ FixedText aSubjectFT;
+ Edit aSubjectED;
+ FixedText aFormatFT;
+ FixedText aAttachFT;
+ Edit aAttachED;
+ PushButton aAttachPB;
+ CheckBox aFormatHtmlCB;
+ CheckBox aFormatRtfCB;
+ CheckBox aFormatSwCB;
+ FixedLine aDestFL;
+
+ FixedLine aBottomSeparatorFL;
+
+ OKButton aOkBTN;
+ CancelButton aCancelBTN;
+ HelpButton aHelpBTN;
+
+ SwMailMergeDlg_Impl* pImpl;
+
+ SwWrtShell& rSh;
+ SwModuleOptions* pModOpt;
+ OUString rDBName;
+ OUString rTableName;
+
+ sal_uInt16 nMergeType;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_aSelection;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 > m_xFrame;
+
+ Size m_aDialogSize;
+ OUString m_sSaveFilter;
+
+ DECL_LINK( ButtonHdl, Button* pBtn );
+ DECL_LINK(InsertPathHdl, void *);
+ DECL_LINK(AttachFileHdl, void *);
+ DECL_LINK( OutputTypeHdl, RadioButton* pBtn );
+ DECL_LINK( FilenameHdl, CheckBox* pBtn );
+ DECL_LINK(ModifyHdl, void *);
+ DECL_LINK( SaveTypeHdl, RadioButton* pBtn );
+
+ virtual void Apply();
+ virtual void Resize();
+ bool ExecQryShell();
+
+public:
+ SwMailMergeDlg(Window* pParent, SwWrtShell& rSh,
+ const OUString& rSourceName,
+ const OUString& 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);
+ ~SwMailMergeDlg();
+
+ inline sal_uInt16 GetMergeType() { return nMergeType; }
+
+ bool IsSaveIndividualDocs() const { return aSaveIndividualRB.IsChecked(); }
+ bool IsGenerateFromDataBase() const { return aGenerateFromDataBaseCB.IsChecked(); }
+ OUString GetColumnName() const { return aColumnLB.GetSelectEntry();}
+ OUString GetPath() const { return aPathED.GetText();}
+
+ const OUString& GetSaveFilter() const {return m_sSaveFilter;}
+ inline const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const { return m_aSelection; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;
+
+};
+
+class SwMailMergeCreateFromDlg : public ModalDialog
+{
+ RadioButton* m_pThisDocRB;
+public:
+ SwMailMergeCreateFromDlg(Window* pParent);
+ bool IsThisDocument() const
+ {
+ return m_pThisDocRB->IsChecked();
+ }
+};
+
+class SwMailMergeFieldConnectionsDlg : public ModalDialog
+{
+ RadioButton* m_pUseExistingRB;
+public:
+ SwMailMergeFieldConnectionsDlg(Window* pParent);
+ bool IsUseExistingConnections() const
+ {
+ return m_pUseExistingRB->IsChecked();
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/mediash.hxx b/sw/source/core/uibase/inc/mediash.hxx
new file mode 100644
index 000000000000..8d8cfd7b23b4
--- /dev/null
+++ b/sw/source/core/uibase/inc/mediash.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_MEDIASH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_MEDIASH_HXX
+
+#include "frmsh.hxx"
+
+class SwMediaShell: public SwBaseShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_MEDIASHELL)
+
+ void ExecMedia(SfxRequest &);
+ void GetMediaState(SfxItemSet &);
+
+ SwMediaShell(SwView &rView);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/mergetbl.hxx b/sw/source/core/uibase/inc/mergetbl.hxx
new file mode 100644
index 000000000000..3926c21b7376
--- /dev/null
+++ b/sw/source/core/uibase/inc/mergetbl.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_MERGETBL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_MERGETBL_HXX
+
+#include <vcl/button.hxx>
+
+#include <vcl/fixed.hxx>
+#include <svx/stddlg.hxx>
+
+class SwMergeTblDlg : public SvxStandardDialog
+{
+ RadioButton* m_pMergePrevRB;
+
+ sal_Bool& m_rMergePrev;
+protected:
+ virtual void Apply();
+
+public:
+ SwMergeTblDlg( Window *pParent, sal_Bool& rWithPrev );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/misc.hrc b/sw/source/core/uibase/inc/misc.hrc
new file mode 100644
index 000000000000..95113ff989f2
--- /dev/null
+++ b/sw/source/core/uibase/inc/misc.hrc
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _MISC_HRC
+#define _MISC_HRC
+
+#include "rcid.hrc"
+
+#define DLG_INSERT_BOOKMARK (RC_MISC_BEGIN + 17)
+#define DLG_NUM_NAMES (RC_MISC_BEGIN + 18)
+#define DLG_SORTING (RC_MISC_BEGIN + 19)
+
+#define DLG_TAB_OUTLINE (RC_MISC_BEGIN + 31)
+
+#define MSG_DOUBLE_SHORTNAME (RC_MISC_BEGIN + 30)
+#define MSG_QUERY_DELETE (RC_MISC_BEGIN + 31)
+#define STR_QUERY_DELETE_GROUP1 (RC_MISC_BEGIN + 32)
+#define STR_QUERY_DELETE_GROUP2 (RC_MISC_BEGIN + 33)
+#define MSG_NO_GLOSSARIES (RC_MISC_BEGIN + 34)
+
+#define MSG_SRTERR (RC_MISC_BEGIN + 42)
+
+#define STR_GLOSSARY (RC_MISC_BEGIN + 43)
+#define STR_CHANGE_START (RC_MISC_BEGIN + 44)
+#define STR_CHANGE_END (RC_MISC_BEGIN + 45)
+#define STR_SAVE_GLOSSARY (RC_MISC_BEGIN + 46)
+
+#define MN_REDLINE_POPUP (RC_MISC_BEGIN + 61)
+#define STRRES_NUMTYPES (RC_MISC_BEGIN + 63)
+#define STR_MY_AUTOTEXT (RC_MISC_BEGIN + 64)
+
+#define STR_COMMENTS_LABEL (RC_MISC_BEGIN + 65)
+#define STR_SHOW_COMMENTS (RC_MISC_BEGIN + 66)
+#define STR_HIDE_COMMENTS (RC_MISC_BEGIN + 67)
+
+#define MISC_ACT_END STR_HIDE_COMMENTS
+
+#if MISC_ACT_END > RC_MISC_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif // _MISC_HRC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/mmconfigitem.hxx b/sw/source/core/uibase/inc/mmconfigitem.hxx
new file mode 100644
index 000000000000..8e53939f4bf8
--- /dev/null
+++ b/sw/source/core/uibase/inc/mmconfigitem.hxx
@@ -0,0 +1,270 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_MMCONFIGITEM_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_MMCONFIGITEM_HXX
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <tools/resary.hxx>
+#include <swdbdata.hxx>
+#include "swdllapi.h"
+#include "sharedconnection.hxx"
+
+namespace com{namespace sun{namespace star{
+ namespace sdbc{
+ class XDataSource;
+ class XResultSet;
+ }
+ namespace sdbcx{
+ class XColumnsSupplier;
+ }
+}}}
+
+class SwMailMergeConfigItem_Impl;
+class SwView;
+
+struct SwDocMergeInfo
+{
+ long nStartPageInTarget;
+ long nEndPageInTarget;
+ long nDBRow;
+};
+
+class SW_DLLPUBLIC SwMailMergeConfigItem
+{
+// com::sun::star::uno::Sequence< OUString> m_aSavedDocuments;
+ SwMailMergeConfigItem_Impl* m_pImpl;
+ //session information - not stored in configuration
+ bool m_bAddressInserted;
+ bool m_bMergeDone;
+ bool m_bGreetingInserted;
+ sal_Int32 m_nGreetingMoves;
+ OUString m_rAddressBlockFrame;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> m_aSelection;
+
+ sal_uInt16 m_nStartPrint;
+ sal_uInt16 m_nEndPrint;
+
+ OUString m_sSelectedPrinter;
+
+ SwView* m_pSourceView;
+ SwView* m_pTargetView;
+public:
+ SwMailMergeConfigItem();
+ ~SwMailMergeConfigItem();
+
+ enum Gender
+ {
+ FEMALE,
+ MALE,
+ NEUTRAL
+ };
+
+ void Commit();
+
+ const ResStringArray& GetDefaultAddressHeaders() const;
+
+ void SetCurrentConnection(
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xSource,
+ SharedConnection xConnection,
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier> xColumnsSupplier,
+ const SwDBData& rDBData);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>
+ GetSource();
+
+ SharedConnection GetConnection();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XColumnsSupplier>
+ GetColumnsSupplier();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>
+ GetResultSet() const;
+
+ void DisposeResultSet();
+
+ OUString& GetFilter() const;
+ void SetFilter(OUString&);
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>
+ GetSelection()const;
+ void SetSelection(::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > rSelection);
+
+ void SetCurrentDBData( const SwDBData& rDBData);
+ const SwDBData& GetCurrentDBData() const;
+
+ // move absolute, nTarget == -1 -> goto last record
+ sal_Int32 MoveResultSet(sal_Int32 nTarget);
+ sal_Int32 GetResultSetPosition()const;
+ bool IsResultSetFirstLast(bool& bIsFirst, bool& bIsLast);
+
+ bool IsRecordExcluded(sal_Int32 nRecord);
+ void ExcludeRecord(sal_Int32 nRecord, bool bExclude);
+
+ const com::sun::star::uno::Sequence< OUString>&
+ GetSavedDocuments() const;
+ void AddSavedDocument(OUString rName);
+
+ sal_Bool IsOutputToLetter()const;
+ void SetOutputToLetter(sal_Bool bSet);
+
+ bool IsAddressBlock()const;
+ void SetAddressBlock(sal_Bool bSet);
+
+ sal_Bool IsHideEmptyParagraphs() const;
+ void SetHideEmptyParagraphs(sal_Bool bSet);
+
+ const com::sun::star::uno::Sequence< OUString>
+ GetAddressBlocks() const;
+ void SetAddressBlocks(const com::sun::star::uno::Sequence< OUString>& rBlocks);
+
+ void SetCurrentAddressBlockIndex( sal_Int32 nSet );
+ sal_Int32 GetCurrentAddressBlockIndex() const;
+
+ sal_Bool IsIncludeCountry() const;
+ OUString& GetExcludeCountry() const;
+ void SetCountrySettings(sal_Bool bSet, const OUString& sCountry);
+
+ sal_Bool IsIndividualGreeting(sal_Bool bInEMail) const;
+ void SetIndividualGreeting(sal_Bool bSet, sal_Bool bInEMail);
+
+ sal_Bool IsGreetingLine(sal_Bool bInEMail) const;
+ void SetGreetingLine(sal_Bool bSet, sal_Bool bInEMail);
+
+ const com::sun::star::uno::Sequence< OUString>
+ GetGreetings(Gender eType) const;
+ void SetGreetings(Gender eType, const com::sun::star::uno::Sequence< OUString>& rBlocks);
+
+ sal_Int32 GetCurrentGreeting(Gender eType) const;
+ void SetCurrentGreeting(Gender eType, sal_Int32 nIndex);
+
+ //the content of the gender column that marks it as female
+ const OUString& GetFemaleGenderValue() const;
+ void SetFemaleGenderValue(const OUString rValue);
+
+ //returns the assignment in the order of the default headers (GetDefaultAddressHeaders())
+ com::sun::star::uno::Sequence< OUString >
+ GetColumnAssignment( const SwDBData& rDBData ) const;
+ void SetColumnAssignment(
+ const SwDBData& rDBData,
+ const com::sun::star::uno::Sequence< OUString>& );
+
+ bool IsAddressFieldsAssigned() const;
+ bool IsGreetingFieldsAssigned() const;
+
+ //e-Mail settings:
+ OUString GetMailDisplayName() const;
+ void SetMailDisplayName(const OUString& rName);
+
+ OUString GetMailAddress() const;
+ void SetMailAddress(const OUString& rAddress);
+
+ sal_Bool IsMailReplyTo() const;
+ void SetMailReplyTo(sal_Bool bSet);
+
+ OUString GetMailReplyTo() const;
+ void SetMailReplyTo(const OUString& rReplyTo);
+
+ OUString GetMailServer() const;
+ void SetMailServer(const OUString& rAddress);
+
+ sal_Int16 GetMailPort() const;
+ void SetMailPort(sal_Int16 nSet);
+
+ sal_Bool IsSecureConnection() const;
+ void SetSecureConnection(sal_Bool bSet);
+
+ sal_Bool IsAuthentication() const;
+ void SetAuthentication(sal_Bool bSet);
+
+ OUString GetMailUserName() const;
+ void SetMailUserName(const OUString& rName);
+
+ OUString GetMailPassword() const;
+ void SetMailPassword(const OUString& rPassword);
+
+ sal_Bool IsSMTPAfterPOP() const;
+ void SetSMTPAfterPOP(sal_Bool bSet);
+
+ OUString GetInServerName() const;
+ void SetInServerName(const OUString& rServer);
+
+ sal_Int16 GetInServerPort() const;
+ void SetInServerPort(sal_Int16 nSet);
+
+ sal_Bool IsInServerPOP() const;
+ void SetInServerPOP(sal_Bool bSet);
+
+ OUString GetInServerUserName() const;
+ void SetInServerUserName(const OUString& rName);
+
+ OUString GetInServerPassword() const;
+ void SetInServerPassword(const OUString& rPassword);
+
+ //session information
+ bool IsAddressInserted() const { return m_bAddressInserted; }
+ void SetAddressInserted(const OUString& rFrameName)
+ { m_bAddressInserted = true;
+ m_rAddressBlockFrame = rFrameName;
+ }
+
+ bool IsGreetingInserted() const { return m_bGreetingInserted; }
+ void SetGreetingInserted()
+ { m_bGreetingInserted = true; }
+
+ // counts the moves in the layout page
+ void MoveGreeting( sal_Int32 nMove) { m_nGreetingMoves += nMove;}
+ sal_Int32 GetGreetingMoves() const { return m_nGreetingMoves;}
+
+ bool IsMergeDone() const { return m_bMergeDone;}
+ void SetMergeDone( ) { m_bMergeDone = true; }
+
+ // new source document - reset some flags
+ void DocumentReloaded();
+
+ bool IsMailAvailable() const;
+
+ // notify a completed merge, provid the appropriate e-Mail address if available
+ void AddMergedDocument(SwDocMergeInfo& rInfo);
+ //returns the page and database cursor information of each merged document
+ SwDocMergeInfo& GetDocumentMergeInfo(sal_uInt32 nDocument);
+ sal_uInt32 GetMergedDocumentCount() const;
+
+ void SetPrintRange( sal_uInt16 nStartDocument, sal_uInt16 nEndDocument)
+ {m_nStartPrint = nStartDocument; m_nEndPrint = nEndDocument;}
+ sal_uInt16 GetPrintRangeStart() const {return m_nStartPrint;}
+ sal_uInt16 GetPrintRangeEnd() const {return m_nEndPrint;}
+
+ const OUString& GetSelectedPrinter() const {return m_sSelectedPrinter;}
+ void SetSelectedPrinter(const OUString& rSet )
+ {m_sSelectedPrinter = rSet;}
+
+ SwView* GetTargetView();
+ void SetTargetView(SwView* pView);
+
+ SwView* GetSourceView();
+ void SetSourceView(SwView* pView);
+
+ //helper methods
+ OUString GetAssignedColumn(sal_uInt32 nColumn)const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/multmrk.hxx b/sw/source/core/uibase/inc/multmrk.hxx
new file mode 100644
index 000000000000..b98192765931
--- /dev/null
+++ b/sw/source/core/uibase/inc/multmrk.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_MULTMRK_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_MULTMRK_HXX
+
+#include <svx/stddlg.hxx>
+#include <vcl/fixed.hxx>
+#include <svtools/stdctrl.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/button.hxx>
+
+class SwTOXMgr;
+
+/*--------------------------------------------------------------------
+ Description: insert mark for index entry
+ --------------------------------------------------------------------*/
+
+class SwMultiTOXMarkDlg : public SvxStandardDialog
+{
+ DECL_LINK( SelectHdl, ListBox * );
+
+ FixedText* m_pTextFT;
+ ListBox* m_pTOXLB;
+
+ SwTOXMgr& rMgr;
+ sal_uInt16 nPos;
+
+ void Apply();
+public:
+ SwMultiTOXMarkDlg( Window* pParent, SwTOXMgr &rTOXMgr );
+ ~SwMultiTOXMarkDlg();
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_MULTMRK_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/navicfg.hxx b/sw/source/core/uibase/inc/navicfg.hxx
new file mode 100644
index 000000000000..77a14d667166
--- /dev/null
+++ b/sw/source/core/uibase/inc/navicfg.hxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_NAVICFG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_NAVICFG_HXX
+
+#include <unotools/configitem.hxx>
+
+class SwNavigationConfig : public utl::ConfigItem
+{
+ sal_Int32 nRootType; //RootType
+ sal_Int32 nSelectedPos; //SelectedPosition
+ sal_Int32 nOutlineLevel; //OutlineLevel
+ sal_Int32 nRegionMode; //InsertMode
+ sal_Int32 nActiveBlock; //ActiveBlock//Expand/CollapsState
+ sal_Bool bIsSmall; //ShowListBox
+ sal_Bool bIsGlobalActive; //GlobalDocMode// global view for GlobalDoc valid?
+
+ com::sun::star::uno::Sequence<OUString> GetPropertyNames();
+
+public:
+ SwNavigationConfig();
+ ~SwNavigationConfig();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+
+ sal_Int32 GetRootType()const {return nRootType;}
+ void SetRootType(sal_Int32 nSet){
+ if(nRootType != nSet)
+ {
+ SetModified();
+ nRootType = nSet;
+ }
+ }
+
+ sal_Int32 GetSelectedPos()const {return nSelectedPos;}
+ void SetSelectedPos(sal_Int32 nSet){
+ if(nSelectedPos != nSet)
+ {
+ SetModified();
+ nSelectedPos = nSet;
+ }
+ }
+
+ sal_Int32 GetOutlineLevel()const {return nOutlineLevel;}
+ void SetOutlineLevel(sal_Int32 nSet){
+ if(nOutlineLevel != nSet)
+ {
+ SetModified();
+ nOutlineLevel = nSet;
+ }
+ }
+
+ sal_Int32 GetRegionMode()const {return nRegionMode;}
+ void SetRegionMode(sal_Int32 nSet){
+ if(nRegionMode != nSet)
+ {
+ SetModified();
+ nRegionMode = nSet;
+ }
+ }
+
+ sal_Int32 GetActiveBlock()const {return nActiveBlock;}
+ void SetActiveBlock(sal_Int32 nSet){
+ if(nActiveBlock != nSet)
+ {
+ SetModified();
+ nActiveBlock = nSet;
+ }
+ }
+
+ sal_Bool IsSmall() const {return bIsSmall;}
+ void SetSmall(sal_Bool bSet){
+ if(bIsSmall != bSet)
+ {
+ SetModified();
+ bIsSmall = bSet;
+ }
+ }
+
+ sal_Bool IsGlobalActive() const {return bIsGlobalActive;}
+ void SetGlobalActive(sal_Bool bSet){
+ if(bIsGlobalActive != bSet)
+ {
+ SetModified();
+ bIsGlobalActive = bSet;
+ }
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/navicont.hxx b/sw/source/core/uibase/inc/navicont.hxx
new file mode 100644
index 000000000000..d04035ab1a72
--- /dev/null
+++ b/sw/source/core/uibase/inc/navicont.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_NAVICONT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_NAVICONT_HXX
+
+#include <rtl/ustring.hxx>
+
+class SwDocShell;
+class TransferDataContainer;
+class TransferableDataHelper;
+
+/*
+ navigator bookmark for distinct identification in Sw
+*/
+
+class NaviContentBookmark
+{
+ OUString aUrl; // URL including jump mark
+ OUString aDescr; // description
+ long nDocSh; // address of DocShell
+ sal_uInt16 nDefDrag; // description contains defaultDragType
+
+public:
+ NaviContentBookmark();
+ NaviContentBookmark( const OUString &rUrl, const OUString& rDesc,
+ sal_uInt16 nDragType, const SwDocShell* );
+
+ const OUString& GetURL() const { return aUrl; }
+ const OUString& GetDescription() const { return aDescr; }
+ sal_uInt16 GetDefaultDragType() const { return nDefDrag; }
+ void Copy( TransferDataContainer& rData ) const;
+ sal_Bool Paste( TransferableDataHelper& rData );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/navipi.hxx b/sw/source/core/uibase/inc/navipi.hxx
new file mode 100644
index 000000000000..04a6c269c706
--- /dev/null
+++ b/sw/source/core/uibase/inc/navipi.hxx
@@ -0,0 +1,186 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_NAVIPI_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_NAVIPI_HXX
+
+// INCLUDE ---------------------------------------------------------------
+
+#include <vcl/lstbox.hxx>
+#include <svl/lstner.hxx>
+#include <svtools/transfer.hxx>
+#include <sfx2/childwin.hxx>
+#include <sfx2/ctrlitem.hxx>
+#include <sfx2/tbxctrl.hxx>
+#include <conttree.hxx>
+#include <popbox.hxx>
+
+class SwWrtShell;
+class SwNavigationPI;
+class SwNavigationChild;
+class SfxBindings;
+class NumEditAction;
+class SwView;
+class SwNavigationConfig;
+class SfxObjectShellLock;
+class SfxChildWindowContext;
+class SwNavigationPI;
+
+class SwNavHelpToolBox : public SwHelpToolBox
+{
+ virtual void MouseButtonDown(const MouseEvent &rEvt);
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+ public:
+ SwNavHelpToolBox(SwNavigationPI* pParent, const ResId &rResId);
+};
+
+// CLASS -----------------------------------------------------------------
+class SwNavigationPI : public Window,
+ public SfxControllerItem, public SfxListener
+{
+ friend class SwNavigationChild;
+ friend class SwContentTree;
+ friend class SwGlobalTree;
+
+ // --------- members -----------------------------
+ SwNavHelpToolBox aContentToolBox;
+ SwHelpToolBox aGlobalToolBox;
+ ImageList aContentImageList;
+ SwContentTree aContentTree;
+ SwGlobalTree aGlobalTree;
+ ListBox aDocListBox;
+ Timer aPageChgTimer;
+ OUString sContentFileName;
+ OUString aContextArr[3];
+ OUString aStatusArr[4];
+ Point aBoxBottomLeft; // Pos when Box is at bottom
+
+ SfxObjectShellLock *pxObjectShell;
+ SwView *pContentView;
+ SwWrtShell *pContentWrtShell;
+ SwView *pActContView;
+ SwView *pCreateView;
+ SfxPopupWindow *pPopupWindow;
+ SfxPopupWindow *pFloatingWindow;
+
+ SfxChildWindowContext* pContextWin;
+
+ SwNavigationConfig *pConfig;
+ SfxBindings &rBindings;
+
+ long nDocLBIniHeight;
+ long nWishWidth;
+ sal_uInt16 nAutoMarkIdx;
+ sal_uInt16 nRegionMode; // 0 - URL, 1 - region with link 2 - region without link
+ short nZoomIn;
+ short nZoomOutInit;
+ short nZoomOut;
+
+ sal_Bool bSmallMode : 1;
+ sal_Bool bIsZoomedIn : 1;
+ sal_Bool bPageCtrlsVisible : 1;
+ sal_Bool bGlobalMode : 1;
+
+ // --------- methods -----------------------------
+ sal_Bool _IsZoomedIn() const {return bIsZoomedIn;}
+ void _ZoomOut();
+ void _ZoomIn();
+
+ void FillBox();
+ void MakeMark();
+
+ DECL_LINK( DocListBoxSelectHdl, ListBox * );
+ DECL_LINK( ToolBoxSelectHdl, ToolBox * );
+ DECL_LINK( ToolBoxClickHdl, ToolBox * );
+ DECL_LINK( ToolBoxDropdownClickHdl, ToolBox* );
+ DECL_LINK( EditAction, NumEditAction * );
+ DECL_LINK( EditGetFocus, NumEditAction * );
+ DECL_LINK( DoneLink, SfxPoolItem * );
+ DECL_LINK( MenuSelectHdl, Menu * );
+ DECL_LINK( ChangePageHdl, void* );
+ DECL_LINK( PageEditModifyHdl, void* );
+ DECL_LINK( PopupModeEndHdl, void * );
+ DECL_LINK( ClosePopupWindow, SfxPopupWindow * );
+ void UsePage(SwWrtShell *);
+
+ void MakeVisible();
+ void InitImageList();
+ virtual SfxChildAlignment
+ CheckAlignment(SfxChildAlignment,SfxChildAlignment);
+ void SetPopupWindow( SfxPopupWindow* );
+
+ using Window::Notify;
+ using Window::StateChanged;
+
+protected:
+
+ virtual sal_Bool Close();
+ virtual void Resize();
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ // release ObjectShellLock early enough for app end
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ NumEditAction& GetPageEdit();
+ sal_Bool ToggleTree();
+ void SetGlobalMode(sal_Bool bSet) {bGlobalMode = bSet;}
+
+public:
+
+ SwNavigationPI(SfxBindings*, SfxChildWindowContext*, Window*);
+ ~SwNavigationPI();
+
+ void GotoPage(); // jump to page; bindable function
+
+ void Update() { FillBox(); }
+ void UpdateListBox();
+ void MoveOutline(sal_uInt16 nSource, sal_uInt16 nTarget, bool bWithCilds);
+
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+
+ static OUString CreateDropFileName( TransferableDataHelper& rData );
+ static OUString CleanEntry(const OUString& rEntry);
+
+ sal_uInt16 GetRegionDropMode() const {return nRegionMode;}
+ void SetRegionDropMode(sal_uInt16 nNewMode);
+
+ sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+
+ sal_Bool IsGlobalDoc() const;
+ sal_Bool IsGlobalMode() const {return bGlobalMode;}
+
+ SwView* GetCreateView() const;
+ void CreateNavigationTool(const Rectangle& rRect, bool bSetFocus, Window *pParent);
+};
+
+class SwNavigationChild : public SfxChildWindowContext
+{
+public:
+ SwNavigationChild( Window* ,
+ sal_uInt16 nId,
+ SfxBindings*,
+ SfxChildWinInfo* );
+
+ SFX_DECL_CHILDWINDOW_CONTEXT( SwNavigationChild )
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/navmgr.hxx b/sw/source/core/uibase/inc/navmgr.hxx
new file mode 100644
index 000000000000..0ef4af93a1f6
--- /dev/null
+++ b/sw/source/core/uibase/inc/navmgr.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_NAVMGR_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_NAVMGR_HXX
+
+#include <vector>
+
+#include <boost/shared_ptr.hpp>
+
+#include "swtypes.hxx"
+
+class SwWrtShell;
+struct SwPosition;
+class SwUnoCrsr;
+
+class SwNavigationMgr
+{
+private:
+ /*
+ * List of entries in the navigation history
+ * Entries are SwUnoCrsr because thos gets corrected automatically
+ * when nodes are deleted.
+ *
+ * The navigation history behaves as a stack, to which items are added when we jump to a new position
+ * (e.g. click a link, or double click an entry from the navigator).
+ * Every use of the back/forward buttons results in moving the stack pointer within the navigation history
+ */
+ typedef ::std::vector< ::boost::shared_ptr<SwUnoCrsr> > Stack_t;
+ Stack_t m_entries;
+ Stack_t::size_type m_nCurrent; /* Current position within the navigation history */
+ SwWrtShell & m_rMyShell; /* The active shell within which the navigation occurs */
+
+ void GotoSwPosition(const SwPosition &rPos);
+
+public:
+ /* Constructor that initializes the shell to the current shell */
+ SwNavigationMgr( SwWrtShell & rShell );
+ /* Can we go back in the history ? */
+ bool backEnabled() ;
+ /* Can we go forward in the history ? */
+ bool forwardEnabled();
+ /* The method that is called when we click the back button */
+ void goBack() ;
+ /* The method that is called when we click the forward button */
+ void goForward() ;
+ /* The method that adds the position pPos to the navigation history */
+ bool addEntry(const SwPosition& rPos);
+};
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/navsh.hxx b/sw/source/core/uibase/inc/navsh.hxx
new file mode 100644
index 000000000000..d05983a3948c
--- /dev/null
+++ b/sw/source/core/uibase/inc/navsh.hxx
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_NAVSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_NAVSH_HXX
+
+#include "frmsh.hxx"
+
+class SfxItemSet;
+
+class SwNavigationShell: public SwBaseShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_NAVIGATIONSHELL)
+
+ SwNavigationShell(SwView &rView);
+
+ void GetState(SfxItemSet &);
+ void Execute(SfxRequest &);
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/num.hxx b/sw/source/core/uibase/inc/num.hxx
new file mode 100644
index 000000000000..67d107588265
--- /dev/null
+++ b/sw/source/core/uibase/inc/num.hxx
@@ -0,0 +1,166 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_NUM_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_NUM_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/menubtn.hxx>
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/layout.hxx>
+#include <svtools/stdctrl.hxx>
+#include <vcl/button.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/edit.hxx>
+#include <svx/stddlg.hxx>
+#include <numprevw.hxx>
+#include "numrule.hxx"
+
+class SwWrtShell;
+class SvxBrushItem;
+class SwOutlineTabDialog;
+
+struct SwBmpItemInfo
+{
+ SvxBrushItem* pBrushItem;
+ sal_uInt16 nItemId;
+};
+
+#define NUM_PAGETYPE_BULLET 0
+#define NUM_PAGETYPE_SINGLENUM 1
+#define NUM_PAGETYPE_NUM 2
+#define NUM_PAGETYPE_BMP 3
+#define PAGETYPE_USER_START 10
+
+class SwNumPositionTabPage : public SfxTabPage
+{
+ ListBox* m_pLevelLB;
+ VclFrame* m_pPositionFrame;
+
+ // former set of controls shown for numbering rules containing list level
+ // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_WIDTH_AND_POSITION
+ FixedText* m_pDistBorderFT;
+ MetricField* m_pDistBorderMF;
+ CheckBox* m_pRelativeCB;
+ FixedText* m_pIndentFT;
+ MetricField* m_pIndentMF;
+ FixedText* m_pDistNumFT;
+ MetricField* m_pDistNumMF;
+ FixedText* m_pAlignFT;
+ ListBox* m_pAlignLB;
+
+ // new set of controls shown for numbering rules containing list level
+ // attributes in SvxNumberFormat::SvxNumPositionAndSpaceMode == LABEL_ALIGNMENT
+ FixedText* m_pLabelFollowedByFT;
+ ListBox* m_pLabelFollowedByLB;
+ FixedText* m_pListtabFT;
+ MetricField* m_pListtabMF;
+ FixedText* m_pAlign2FT;
+ ListBox* m_pAlign2LB;
+ FixedText* m_pAlignedAtFT;
+ MetricField* m_pAlignedAtMF;
+ FixedText* m_pIndentAtFT;
+ MetricField* m_pIndentAtMF;
+
+ PushButton* m_pStandardPB;
+
+ NumberingPreview* m_pPreviewWIN;
+
+ SwNumRule* pActNum;
+ SwNumRule* pSaveNum;
+ SwWrtShell* pWrtSh;
+
+ SwOutlineTabDialog* pOutlineDlg;
+ sal_uInt16 nActNumLvl;
+
+ sal_Bool bModified : 1;
+ sal_Bool bPreset : 1;
+ sal_Bool bInInintControl : 1; // work around modify-error; should be resolved from 391 on
+ bool bLabelAlignmentPosAndSpaceModeActive;
+
+ void InitControls();
+
+ DECL_LINK( LevelHdl, ListBox * );
+ DECL_LINK(EditModifyHdl, void *);
+ DECL_LINK( DistanceHdl, MetricField * );
+ DECL_LINK( RelativeHdl, CheckBox * );
+ DECL_LINK(StandardHdl, void *);
+
+ void InitPosAndSpaceMode();
+ void ShowControlsDependingOnPosAndSpaceMode();
+
+ DECL_LINK(LabelFollowedByHdl_Impl, void *);
+ DECL_LINK( ListtabPosHdl_Impl, MetricField* );
+ DECL_LINK( AlignAtHdl_Impl, MetricField* );
+ DECL_LINK( IndentAtHdl_Impl, MetricField* );
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+
+ SwNumPositionTabPage(Window* pParent,
+ const SfxItemSet& rSet);
+ ~SwNumPositionTabPage();
+
+ virtual void ActivatePage(const SfxItemSet& rSet);
+ virtual int DeactivatePage(SfxItemSet *pSet);
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+
+ void SetOutlineTabDialog(SwOutlineTabDialog* pDlg){pOutlineDlg = pDlg;}
+ void SetWrtShell(SwWrtShell* pSh);
+#ifdef DBG_UTIL
+ void SetModified(sal_Bool bRepaint = sal_True);
+#else
+ void SetModified(sal_Bool bRepaint = sal_True)
+ { bModified = sal_True;
+ if(bRepaint)
+ {
+ m_pPreviewWIN->SetLevel(nActNumLvl);
+ m_pPreviewWIN->Invalidate();
+ }
+ }
+#endif
+};
+
+class SwSvxNumBulletTabDialog : public SfxTabDialog
+{
+ SwWrtShell& rWrtSh;
+ sal_uInt16 m_nSingleNumPageId;
+ sal_uInt16 m_nBulletPageId;
+ sal_uInt16 m_nOptionsPageId;
+ sal_uInt16 m_nPositionPageId;
+
+ protected:
+ virtual short Ok();
+ virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage);
+ DECL_LINK(RemoveNumberingHdl, void *);
+ public:
+ SwSvxNumBulletTabDialog(Window* pParent,
+ const SfxItemSet* pSwItemSet,
+ SwWrtShell &);
+ ~SwSvxNumBulletTabDialog();
+};
+#endif // INCLUDED_SW_SOURCE_UI_INC_NUM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/numberingtypelistbox.hxx b/sw/source/core/uibase/inc/numberingtypelistbox.hxx
new file mode 100644
index 000000000000..661252fb8e84
--- /dev/null
+++ b/sw/source/core/uibase/inc/numberingtypelistbox.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_NUMBERINGTYPELISTBOX_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_NUMBERINGTYPELISTBOX_HXX
+
+#include <vcl/lstbox.hxx>
+#include "swdllapi.h"
+
+#define INSERT_NUM_TYPE_NO_NUMBERING 0x01
+#define INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING 0x02
+#define INSERT_NUM_TYPE_BITMAP 0x04
+#define INSERT_NUM_TYPE_BULLET 0x08
+#define INSERT_NUM_EXTENDED_TYPES 0x10
+
+struct SwNumberingTypeListBox_Impl;
+
+class SW_DLLPUBLIC SwNumberingTypeListBox : public ListBox
+{
+ SwNumberingTypeListBox_Impl* pImpl;
+
+public:
+ SwNumberingTypeListBox( Window* pWin, WinBits nStyle = WB_BORDER );
+ ~SwNumberingTypeListBox();
+
+ virtual bool set_property(const OString &rKey, const OString &rValue);
+
+ void Reload(sal_uInt16 nTypeFlags);
+
+ sal_Int16 GetSelectedNumberingType();
+ sal_Bool SelectNumberingType(sal_Int16 nType);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/numfmtlb.hxx b/sw/source/core/uibase/inc/numfmtlb.hxx
new file mode 100644
index 000000000000..d6facd3da9b5
--- /dev/null
+++ b/sw/source/core/uibase/inc/numfmtlb.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_NUMFMTLB_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_NUMFMTLB_HXX
+
+#include <vcl/lstbox.hxx>
+#include <svl/zforlist.hxx>
+#include "swdllapi.h"
+
+class SwView;
+
+class SW_DLLPUBLIC NumFormatListBox : public ListBox
+{
+ short nCurrFormatType;
+ sal_uInt16 nStdEntry;
+ sal_Bool bOneArea;
+ sal_uLong nDefFormat;
+ SwView* pVw;
+ SvNumberFormatter* pOwnFormatter;
+ LanguageType eCurLanguage;
+ sal_Bool bShowLanguageControl; //determine whether the language control has
+ //to be shown in the number format dialog
+ sal_Bool bUseAutomaticLanguage;//determine whether language is automatically assigned
+
+ SAL_DLLPRIVATE DECL_LINK( SelectHdl, ListBox * );
+
+ SAL_DLLPRIVATE double GetDefValue(const short nFormatType) const;
+ SAL_DLLPRIVATE void Init(short nFormatType, sal_Bool bUsrFmts);
+ SAL_DLLPRIVATE SwView* GetView();
+
+public:
+ NumFormatListBox(Window* pWin, WinBits nStyle);
+
+ ~NumFormatListBox();
+
+ void Clear();
+
+ inline void SetOneArea(sal_Bool bOnlyOne = sal_True) { bOneArea = bOnlyOne; }
+
+ void SetFormatType(const short nFormatType);
+ inline short GetFormatType() const { return nCurrFormatType; }
+ void SetDefFormat(const sal_uLong nDefFmt);
+ sal_uLong GetFormat() const;
+
+ inline LanguageType GetCurLanguage() const { return eCurLanguage;}
+ void SetLanguage(LanguageType eSet) { eCurLanguage = eSet;}
+
+ void SetAutomaticLanguage(sal_Bool bSet){bUseAutomaticLanguage = bSet;}
+ sal_Bool IsAutomaticLanguage()const {return bUseAutomaticLanguage;}
+
+ void SetShowLanguageControl(sal_Bool bSet){bShowLanguageControl = bSet;}
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/numpara.hxx b/sw/source/core/uibase/inc/numpara.hxx
new file mode 100644
index 000000000000..71602d8fc33c
--- /dev/null
+++ b/sw/source/core/uibase/inc/numpara.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_NUMPARA_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_NUMPARA_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/field.hxx>
+#include <vcl/button.hxx>
+
+/* --- class SwParagraphNumTabPage ----------------------------------------
+ with this TabPage numbering settings at the paragraph / paragraph style
+ are performed.
+
+ ---------------------------------------------------------------------------*/
+class SwParagraphNumTabPage : public SfxTabPage
+{
+ VclHBox* m_pOutlineStartBX;
+ ListBox* m_pOutlineLvLB;
+
+ VclHBox* m_pNumberStyleBX;
+ ListBox* m_pNumberStyleLB;
+
+ TriStateBox* m_pNewStartCB;
+ VclHBox* m_pNewStartBX;
+ TriStateBox* m_pNewStartNumberCB;
+ NumericField* m_pNewStartNF;
+
+ VclFrame* m_pCountParaFram;
+ TriStateBox* m_pCountParaCB;
+ TriStateBox* m_pRestartParaCountCB;
+
+ VclHBox* m_pRestartBX;
+ NumericField* m_pRestartNF;
+
+ // --> OD 2008-04-14 #outlinelevel#
+ const OUString msOutlineNumbering;
+
+ sal_Bool bModified : 1;
+ sal_Bool bCurNumrule : 1;
+
+ DECL_LINK(NewStartHdl_Impl, void *);
+ DECL_LINK( StyleHdl_Impl, ListBox* );
+ DECL_LINK(LineCountHdl_Impl, void *);
+
+protected:
+ SwParagraphNumTabPage(Window* pParent, const SfxItemSet& rSet );
+ void aCountParaFL();
+
+public:
+ ~SwParagraphNumTabPage();
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rSet );
+ static sal_uInt16* GetRanges();
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+
+ void EnableNewStart();
+ void DisableOutline();
+ void DisableNumbering();
+
+ ListBox& GetStyleBox() {return *m_pNumberStyleLB;};
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/numprevw.hxx b/sw/source/core/uibase/inc/numprevw.hxx
new file mode 100644
index 000000000000..71374d899261
--- /dev/null
+++ b/sw/source/core/uibase/inc/numprevw.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_NUMPREVW_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_NUMPREVW_HXX
+
+#include <vcl/window.hxx>
+
+class SwNumRule;
+namespace rtl { class OUString; }
+
+class NumberingPreview : public Window
+{
+ const SwNumRule* pActNum;
+ Font aStdFont;
+ long nPageWidth;
+ const OUString* pOutlineNames;
+ sal_Bool bPosition;
+ sal_uInt16 nActLevel;
+
+ protected:
+ virtual void Paint( const Rectangle& rRect );
+
+ public:
+ NumberingPreview(Window* pParent, const ResId& rResId)
+ : Window(pParent, rResId),
+ pActNum(0),nPageWidth(0), pOutlineNames(0),
+ bPosition(sal_False), nActLevel(USHRT_MAX)
+ {
+ }
+
+ NumberingPreview(Window* pParent)
+ : Window(pParent)
+ , pActNum(0),nPageWidth(0), pOutlineNames(0),
+ bPosition(sal_False), nActLevel(USHRT_MAX)
+ {
+ }
+
+ ~NumberingPreview();
+
+ void SetNumRule(const SwNumRule* pNum)
+ {pActNum = pNum; Invalidate();};
+ void SetPageWidth(long nPgWidth)
+ {nPageWidth = nPgWidth;}
+ void SetOutlineNames(const OUString* pNames)
+ {pOutlineNames = pNames;}
+ void SetPositionMode()
+ { bPosition = sal_True;}
+ void SetLevel(sal_uInt16 nSet) {nActLevel = nSet;}
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/olesh.hxx b/sw/source/core/uibase/inc/olesh.hxx
new file mode 100644
index 000000000000..f9b6108a8edf
--- /dev/null
+++ b/sw/source/core/uibase/inc/olesh.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_OLESH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_OLESH_HXX
+
+#include "frmsh.hxx"
+
+class SwOleShell: public SwFrameShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_OLESHELL)
+
+ SwOleShell(SwView &rView);
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/olmenu.hxx b/sw/source/core/uibase/inc/olmenu.hxx
new file mode 100644
index 000000000000..288413d5d746
--- /dev/null
+++ b/sw/source/core/uibase/inc/olmenu.hxx
@@ -0,0 +1,91 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_OLMENU_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_OLMENU_HXX
+
+#include <com/sun/star/linguistic2/XDictionary.hpp>
+#include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
+#include <com/sun/star/linguistic2/ProofreadingResult.hpp>
+#include <com/sun/star/uno/Sequence.h>
+
+#include <rtl/ustring.hxx>
+#include <vcl/image.hxx>
+#include <vcl/menu.hxx>
+
+#include <map>
+#include <vector>
+
+class SwWrtShell;
+
+class SW_DLLPUBLIC SwSpellPopup : public PopupMenu
+{
+ SwWrtShell* m_pSh;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XDictionary > > m_aDics;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellAlternatives > m_xSpellAlt;
+
+ ::com::sun::star::linguistic2::ProofreadingResult m_xGrammarResult;
+ sal_Int32 m_nGrammarError;
+
+ ::com::sun::star::uno::Sequence< OUString > m_aSuggestions;
+ OUString m_sExplanationLink;
+
+ LanguageType m_nCheckedLanguage;
+ LanguageType m_nGuessLangWord;
+ LanguageType m_nGuessLangPara;
+
+ std::map< sal_Int16, OUString > m_aLangTable_Text;
+ std::map< sal_Int16, OUString > m_aLangTable_Paragraph;
+// std::map< sal_Int16, OUString > aLangTable_Document;
+
+ OUString m_aDicNameSingle;
+ bool m_bGrammarResults; // show grammar results? Or show spellcheck results?
+
+ Image m_aInfo16;
+
+ void fillLangPopupMenu( PopupMenu *pPopupMenu, sal_uInt16 nLangStart,
+ ::com::sun::star::uno::Sequence< OUString > aSeq, SwWrtShell* pWrtSh,
+ std::map< sal_Int16, OUString > &rLangTable );
+
+ using PopupMenu::Execute;
+
+ /// Checks if any of the redline menu items should be hidden.
+ void checkRedline();
+
+public:
+ SwSpellPopup( SwWrtShell *pWrtSh,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XSpellAlternatives > &xAlt,
+ const OUString & rParaText );
+
+ SwSpellPopup( SwWrtShell *pWrtSh,
+ const ::com::sun::star::linguistic2::ProofreadingResult &rResult,
+ sal_Int32 nErrorInResult,
+ const ::com::sun::star::uno::Sequence< OUString > &rSuggestions,
+ const OUString & rParaText );
+
+ sal_uInt16 Execute( const Rectangle& rPopupPos, Window* pWin );
+ void Execute( sal_uInt16 nId );
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/optcomp.hxx b/sw/source/core/uibase/inc/optcomp.hxx
new file mode 100644
index 000000000000..afe29931d1d2
--- /dev/null
+++ b/sw/source/core/uibase/inc/optcomp.hxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_OPTCOMP_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_OPTCOMP_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/layout.hxx>
+#include <vcl/lstbox.hxx>
+#include <unotools/compatibility.hxx>
+#include <svx/checklbx.hxx>
+#include "rtl/ustring.hxx"
+
+// class SwCompatibilityOptPage ------------------------------------------
+class SwWrtShell;
+struct SwCompatibilityOptPage_Impl;
+
+class SwCompatibilityOptPage : public SfxTabPage
+{
+private:
+ // controls
+ VclFrame* m_pMain;
+ ListBox* m_pFormattingLB;
+ SvxCheckListBox* m_pOptionsLB;
+ PushButton* m_pDefaultPB;
+ // config item
+ SvtCompatibilityOptions m_aConfigItem;
+ // text of the user entry
+ OUString m_sUserEntry;
+ // shell of the current document
+ SwWrtShell* m_pWrtShell;
+ // impl object
+ SwCompatibilityOptPage_Impl* m_pImpl;
+ // saved options after "Reset"; used in "FillItemSet" for comparison
+ sal_uLong m_nSavedOptions;
+
+ // handler
+ DECL_LINK(SelectHdl, void *);
+ DECL_LINK(UseAsDefaultHdl, void *);
+
+ // private methods
+ void InitControls( const SfxItemSet& rSet );
+ void SetCurrentOptions( sal_uLong nOptions );
+ sal_uLong GetDocumentOptions() const;
+ void WriteOptions();
+
+public:
+ SwCompatibilityOptPage( Window* pParent, const SfxItemSet& rSet );
+ ~SwCompatibilityOptPage();
+
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/optload.hxx b/sw/source/core/uibase/inc/optload.hxx
new file mode 100644
index 000000000000..6013d8b8dfc3
--- /dev/null
+++ b/sw/source/core/uibase/inc/optload.hxx
@@ -0,0 +1,175 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_OPTLOAD_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_OPTLOAD_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+#include <vcl/group.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/layout.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/field.hxx>
+#include <svx/strarray.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <svx/checklbx.hxx>
+#include <swlbox.hxx>
+#include <caption.hxx>
+
+class SwFldMgr;
+class SvTreeListEntry;
+class SwWrtShell;
+
+class SwLoadOptPage : public SfxTabPage
+{
+private:
+ RadioButton* m_pAlwaysRB;
+ RadioButton* m_pRequestRB;
+ RadioButton* m_pNeverRB;
+
+ CheckBox* m_pAutoUpdateFields;
+ CheckBox* m_pAutoUpdateCharts;
+
+ ListBox* m_pMetricLB;
+ FixedText* m_pTabFT;
+ MetricField* m_pTabMF;
+ CheckBox* m_pUseSquaredPageMode;
+ CheckBox* m_pUseCharUnit;
+ Edit* m_pWordCountED;
+
+ SwWrtShell* m_pWrtShell;
+ sal_uInt16 m_nLastTab;
+ sal_Int32 m_nOldLinkMode;
+
+ DECL_LINK(MetricHdl, void *);
+
+public:
+ SwLoadOptPage(Window* pParent, const SfxItemSet& rSet);
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+};
+
+class SwCaptionOptDlg : public SfxSingleTabDialog
+{
+public:
+ SwCaptionOptDlg(Window* pParent, const SfxItemSet& rSet);
+};
+
+class CaptionComboBox : public SwComboBox
+{
+protected:
+ virtual void KeyInput( const KeyEvent& );
+
+public:
+ CaptionComboBox(Window* pParent, WinBits nStyle)
+ : SwComboBox(pParent, nStyle)
+ {}
+};
+
+class SwCaptionPreview : public Window
+{
+private:
+ OUString maText;
+ Point maDrawPos;
+public:
+ SwCaptionPreview( Window* pParent, WinBits nStyle );
+ void Init();
+ void SetPreviewText( const OUString& rText );
+ virtual void Paint( const Rectangle& rRect );
+ virtual Size GetOptimalSize() const;
+};
+
+class SwCaptionOptPage : public SfxTabPage
+{
+private:
+ SvxCheckListBox* m_pCheckLB;
+ ListBox* m_pLbCaptionOrder;
+ SwCaptionPreview* m_pPreview;
+
+ VclContainer* m_pSettingsGroup;
+ CaptionComboBox* m_pCategoryBox;
+ FixedText* m_pFormatText;
+ ListBox* m_pFormatBox;
+ //#i61007# order of captions
+ FixedText* m_pNumberingSeparatorFT;
+ Edit* m_pNumberingSeparatorED;
+ FixedText* m_pTextText;
+ Edit* m_pTextEdit;
+ ListBox* m_pPosBox;
+
+ VclContainer* m_pNumCapt;
+ ListBox* m_pLbLevel;
+ Edit* m_pEdDelim;
+
+ VclContainer* m_pCategory;
+ ListBox* m_pCharStyleLB;
+ CheckBox* m_pApplyBorderCB;
+
+ OUString m_sSWTable;
+ OUString m_sSWFrame;
+ OUString m_sSWGraphic;
+ OUString m_sOLE;
+
+ OUString m_sIllustration;
+ OUString m_sTable;
+ OUString m_sText;
+ OUString m_sDrawing;
+
+ OUString m_sBegin;
+ OUString m_sEnd;
+ OUString m_sAbove;
+ OUString m_sBelow;
+
+ OUString m_sNone;
+
+ SwFldMgr *pMgr;
+ bool bHTMLMode;
+
+ DECL_LINK(SelectHdl, void *);
+ DECL_LINK(ModifyHdl, void * = 0);
+ DECL_LINK( OrderHdl, ListBox* );
+ DECL_LINK(ShowEntryHdl, void *);
+ DECL_LINK(SaveEntryHdl, void *);
+
+ void DelUserData();
+ void SetOptions( const sal_uLong nPos,
+ const SwCapObjType eType,
+ const SvGlobalName *pOleId = 0);
+ void SaveEntry( SvTreeListEntry* pEntry );
+ void DrawSample();
+
+public:
+ SwCaptionOptPage( Window* pParent,
+ const SfxItemSet& rSet );
+ ~SwCaptionOptPage();
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/optpage.hxx b/sw/source/core/uibase/inc/optpage.hxx
new file mode 100644
index 000000000000..802b06092eed
--- /dev/null
+++ b/sw/source/core/uibase/inc/optpage.hxx
@@ -0,0 +1,439 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_OPTPAGE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_OPTPAGE_HXX
+#include <sfx2/tabdlg.hxx>
+
+#include <vcl/group.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/lstbox.hxx>
+
+#include <vcl/field.hxx>
+
+#include <vcl/fixed.hxx>
+#include <svtools/ctrlbox.hxx>
+#include <svx/fntctrl.hxx>
+#include <fontcfg.hxx>
+class SfxPrinter;
+class SwStdFontConfig;
+class SwWrtShell;
+class FontList;
+
+/*--------------------------------------------------------
+ Tools->Options->Writer->View
+ Tools->Options->Writer/Web->View
+--------------------------------------------------------- */
+class SwContentOptPage : public SfxTabPage
+{
+ CheckBox* m_pCrossCB;
+
+ CheckBox* m_pHScrollBox;
+ CheckBox* m_pVScrollBox;
+ CheckBox* m_pAnyRulerCB;
+ CheckBox* m_pHRulerCBox;
+ ListBox* m_pHMetric;
+ CheckBox* m_pVRulerCBox;
+ CheckBox* m_pVRulerRightCBox;
+ ListBox* m_pVMetric;
+ CheckBox* m_pSmoothCBox;
+
+ CheckBox* m_pGrfCB;
+ CheckBox* m_pTblCB;
+ CheckBox* m_pDrwCB;
+ CheckBox* m_pFldNameCB;
+ CheckBox* m_pPostItCB;
+
+ VclFrame* m_pSettingsFrame;
+ FixedText* m_pSettingsLabel;
+ FixedText* m_pMetricLabel;
+ ListBox* m_pMetricLB;
+
+ DECL_LINK(VertRulerHdl, CheckBox*);
+ DECL_LINK(AnyRulerHdl, CheckBox*);
+public:
+ SwContentOptPage( Window* pParent,
+ const SfxItemSet& rSet );
+ ~SwContentOptPage();
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+
+};
+
+/*--------------------------------------------------------
+ TabPage printer settings additions
+--------------------------------------------------------- */
+class SwAddPrinterTabPage : public SfxTabPage
+{
+ CheckBox* m_pGrfCB;
+ CheckBox* m_pCtrlFldCB;
+ CheckBox* m_pBackgroundCB;
+ CheckBox* m_pBlackFontCB;
+ CheckBox* m_pPrintHiddenTextCB;
+ CheckBox* m_pPrintTextPlaceholderCB;
+
+ VclFrame* m_pPagesFrame;
+ CheckBox* m_pLeftPageCB;
+ CheckBox* m_pRightPageCB;
+ CheckBox* m_pProspectCB;
+ CheckBox* m_pProspectCB_RTL;
+
+ VclFrame* m_pCommentsFrame;
+ RadioButton* m_pNoRB;
+ RadioButton* m_pOnlyRB;
+ RadioButton* m_pEndRB;
+ RadioButton* m_pEndPageRB;
+
+ CheckBox* m_pPrintEmptyPagesCB;
+ CheckBox* m_pPaperFromSetupCB;
+ ListBox* m_pFaxLB;
+
+ OUString sNone;
+
+ sal_Bool bAttrModified;
+ sal_Bool bPreview;
+
+ void Init();
+ DECL_LINK(AutoClickHdl, void *);
+ DECL_LINK(SelectHdl, void *);
+
+ SwAddPrinterTabPage( Window* pParent,
+ const SfxItemSet& rSet );
+public:
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet );
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+ void SetFax( const std::vector<OUString>& );
+ void SelectFax( const OUString& );
+ void SetPreview(sal_Bool bPrev);
+ virtual void PageCreated (SfxAllItemSet aSet);
+
+};
+
+class SwStdFontTabPage : public SfxTabPage
+{
+ FixedText* pLabelFT;
+
+ ComboBox* pStandardBox;
+ FontSizeBox* pStandardHeightLB;
+ ComboBox* pTitleBox ;
+ FontSizeBox* pTitleHeightLB;
+ ComboBox* pListBox ;
+ FontSizeBox* pListHeightLB;
+ ComboBox* pLabelBox ;
+ FontSizeBox* pLabelHeightLB;
+ ComboBox* pIdxBox ;
+ FontSizeBox* pIndexHeightLB;
+ CheckBox* pDocOnlyCB ;
+ PushButton* pStandardPB;
+
+ OUString sShellStd;
+ OUString sShellTitle;
+ OUString sShellList;
+ OUString sShellLabel;
+ OUString sShellIndex;
+
+ SfxPrinter* pPrt;
+ FontList* pFontList;
+ SwStdFontConfig* pFontConfig;
+ SwWrtShell* pWrtShell;
+ LanguageType eLanguage;
+ // only defaults were there? they were signed with the boxes
+ sal_Bool bListDefault :1;
+ sal_Bool bSetListDefault :1;
+ sal_Bool bLabelDefault :1;
+ sal_Bool bSetLabelDefault :1;
+ sal_Bool bIdxDefault :1;
+ sal_Bool bSetIdxDefault :1;
+ sal_Bool bDeletePrinter :1;
+
+ sal_Bool bListHeightDefault :1;
+ sal_Bool bSetListHeightDefault :1;
+ sal_Bool bLabelHeightDefault :1;
+ sal_Bool bSetLabelHeightDefault :1;
+ sal_Bool bIndexHeightDefault :1;
+ sal_Bool bSetIndexHeightDefault :1;
+
+ sal_uInt8 nFontGroup; //fontcfg.hxx: FONT_GROUP_[STANDARD|CJK|CTL]
+
+ OUString sScriptWestern;
+ OUString sScriptAsian;
+ OUString sScriptComplex;
+
+ DECL_LINK(StandardHdl, void *);
+ DECL_LINK( ModifyHdl, ComboBox * );
+ DECL_LINK( ModifyHeightHdl, FontSizeBox * );
+ DECL_LINK( LoseFocusHdl, ComboBox * );
+
+ SwStdFontTabPage( Window* pParent,
+ const SfxItemSet& rSet );
+ ~SwStdFontTabPage();
+
+public:
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet );
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+
+ void SetFontMode(sal_uInt8 nGroup) {nFontGroup = nGroup;}
+ virtual void PageCreated (SfxAllItemSet aSet);
+};
+
+class SwTableOptionsTabPage : public SfxTabPage
+{
+ CheckBox* pHeaderCB;
+ CheckBox* pRepeatHeaderCB;
+ CheckBox* pDontSplitCB;
+ CheckBox* pBorderCB;
+
+ CheckBox* pNumFormattingCB;
+ CheckBox* pNumFmtFormattingCB;
+ CheckBox* pNumAlignmentCB;
+
+ MetricField* pRowMoveMF;
+ MetricField* pColMoveMF;
+
+ MetricField* pRowInsertMF;
+ MetricField* pColInsertMF;
+
+ RadioButton* pFixRB;
+ RadioButton* pFixPropRB;
+ RadioButton* pVarRB;
+
+ SwWrtShell* pWrtShell;
+ sal_Bool bHTMLMode;
+
+ DECL_LINK(CheckBoxHdl, void *);
+
+ SwTableOptionsTabPage( Window* pParent,
+ const SfxItemSet& rSet );
+ ~SwTableOptionsTabPage();
+
+public:
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet );
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+
+ void SetWrtShell(SwWrtShell* pSh) {pWrtShell = pSh;}
+ virtual void PageCreated (SfxAllItemSet aSet);
+
+};
+
+/*--------------------------------------------------
+ TabPage for ShadowCrsr
+--------------------------------------------------*/
+class SwShdwCrsrOptionsTabPage : public SfxTabPage
+{
+ //nonprinting characters
+ CheckBox* m_pParaCB;
+ CheckBox* m_pSHyphCB;
+ CheckBox* m_pSpacesCB;
+ CheckBox* m_pHSpacesCB;
+ CheckBox* m_pTabCB;
+ CheckBox* m_pBreakCB;
+ CheckBox* m_pCharHiddenCB;
+ CheckBox* m_pFldHiddenCB;
+ CheckBox* m_pFldHiddenParaCB;
+
+ VclFrame* m_pDirectCursorFrame;
+ CheckBox* m_pOnOffCB;
+
+ RadioButton* m_pFillMarginRB;
+ RadioButton* m_pFillIndentRB;
+ RadioButton* m_pFillTabRB;
+ RadioButton* m_pFillSpaceRB;
+
+ VclFrame* m_pCursorProtFrame;
+ CheckBox* m_pCrsrInProtCB;
+
+ CheckBox* m_pMathBaselineAlignmentCB;
+
+ SwWrtShell * m_pWrtShell;
+
+ SwShdwCrsrOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
+ ~SwShdwCrsrOptionsTabPage();
+
+public:
+
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+
+ void SetWrtShell( SwWrtShell * pSh ) { m_pWrtShell = pSh; }
+ virtual void PageCreated( SfxAllItemSet aSet );
+};
+
+/*-----------------------------------------------------------------------
+ Description: mark preview
+ -----------------------------------------------------------------------*/
+class SwMarkPreview : public Window
+{
+ Size m_aInitialSize;
+
+ Color m_aBgCol; // background
+ Color m_aTransCol; // transparency
+ Color m_aMarkCol; // marks
+ Color m_aLineCol; // general lines
+ Color m_aShadowCol; // shadow
+ Color m_aTxtCol; // text
+ Color m_aPrintAreaCol; // frame for print area
+
+ Rectangle aPage;
+ Rectangle aLeftPagePrtArea;
+ Rectangle aRightPagePrtArea;
+
+ sal_uInt16 nMarkPos;
+
+ using OutputDevice::DrawRect;
+ void DrawRect(const Rectangle &rRect, const Color &rFillColor, const Color &rLineColor);
+
+ void Paint(const Rectangle&);
+ void PaintPage(const Rectangle &rRect);
+ void InitColors( void );
+
+protected:
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+public:
+ SwMarkPreview(Window* pParent, WinBits nWinBits);
+ virtual ~SwMarkPreview();
+
+ inline void SetColor(const Color& rCol) { m_aMarkCol = rCol; }
+ inline void SetMarkPos(sal_uInt16 nPos) { nMarkPos = nPos; }
+ virtual Size GetOptimalSize() const;
+};
+
+/*-----------------------------------------------------------------------
+ Description: redlining options
+ -----------------------------------------------------------------------*/
+class SwRedlineOptionsTabPage : public SfxTabPage
+{
+ ListBox* pInsertLB;
+ ColorListBox* pInsertColorLB;
+ SvxFontPrevWindow* pInsertedPreviewWN;
+
+ ListBox* pDeletedLB;
+ ColorListBox* pDeletedColorLB;
+ SvxFontPrevWindow* pDeletedPreviewWN;
+
+ ListBox* pChangedLB;
+ ColorListBox* pChangedColorLB;
+ SvxFontPrevWindow* pChangedPreviewWN;
+
+ ListBox* pMarkPosLB;
+ ColorListBox* pMarkColorLB;
+ SwMarkPreview* pMarkPreviewWN;
+
+ OUString sAuthor;
+ OUString sNone;
+
+ SwRedlineOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
+ ~SwRedlineOptionsTabPage();
+
+ DECL_LINK( AttribHdl, ListBox *pLB );
+ DECL_LINK(ChangedMaskPrevHdl, void * = 0);
+ DECL_LINK( ColorHdl, ColorListBox *pColorLB );
+
+ void InitFontStyle(SvxFontPrevWindow& rExampleWin);
+
+public:
+
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+};
+
+/*-------------------------------------------------------
+ TabPage test settings for SW
+--------------------------------------------------------- */
+
+#ifdef DBG_UTIL
+
+class SwTestTabPage : public SfxTabPage
+{
+public:
+ SwTestTabPage( Window* pParent,
+ const SfxItemSet& rSet );
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet );
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+
+private:
+ CheckBox* m_pTest1CBox;
+ CheckBox* m_pTest2CBox;
+ CheckBox* m_pTest3CBox;
+ CheckBox* m_pTest4CBox;
+ CheckBox* m_pTest5CBox;
+ CheckBox* m_pTest6CBox;
+ CheckBox* m_pTest7CBox;
+ CheckBox* m_pTest8CBox;
+ CheckBox* m_pTest9CBox;
+ CheckBox* m_pTest10CBox;
+
+ sal_Bool bAttrModified;
+
+ void Init();
+ DECL_LINK(AutoClickHdl, void *);
+
+};
+#endif // DBG_UTIL
+
+class SwCompareOptionsTabPage : public SfxTabPage
+{
+ RadioButton* m_pAutoRB;
+ RadioButton* m_pWordRB;
+ RadioButton* m_pCharRB;
+
+ CheckBox* m_pRsidCB;
+ CheckBox* m_pIgnoreCB;
+ NumericField* m_pLenNF;
+
+ SwCompareOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
+ ~SwCompareOptionsTabPage();
+
+ DECL_LINK(ComparisonHdl, void *);
+ DECL_LINK(IgnoreHdl, void *);
+
+public:
+
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+};
+
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/outline.hxx b/sw/source/core/uibase/inc/outline.hxx
new file mode 100644
index 000000000000..6d54f977108d
--- /dev/null
+++ b/sw/source/core/uibase/inc/outline.hxx
@@ -0,0 +1,138 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_OUTLINE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_OUTLINE_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+#include <vcl/menu.hxx>
+
+#include <vcl/button.hxx>
+#include <svtools/stdctrl.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/lstbox.hxx>
+
+#include <vcl/edit.hxx>
+
+#include <vcl/field.hxx>
+
+#include "swtypes.hxx"
+#include <numprevw.hxx>
+#include <numberingtypelistbox.hxx>
+#include "rtl/ustring.hxx"
+
+class SwWrtShell;
+class SwNumRule;
+class SwChapterNumRules;
+
+class SwOutlineTabDialog : public SfxTabDialog
+{
+ static sal_uInt16 nNumLevel;
+
+ sal_uInt16 m_nNumPosId;
+ sal_uInt16 m_nOutlineId;
+
+ OUString aCollNames[MAXLEVEL];
+
+ SwWrtShell& rWrtSh;
+ SwNumRule* pNumRule;
+ SwChapterNumRules* pChapterNumRules;
+
+ sal_Bool bModified : 1;
+
+ protected:
+ DECL_LINK(CancelHdl, void *);
+ DECL_LINK( FormHdl, Button * );
+ DECL_LINK( MenuSelectHdl, Menu * );
+
+ virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage);
+ virtual short Ok();
+
+ public:
+ SwOutlineTabDialog(Window* pParent,
+ const SfxItemSet* pSwItemSet,
+ SwWrtShell &);
+ ~SwOutlineTabDialog();
+
+ SwNumRule* GetNumRule() {return pNumRule;}
+ sal_uInt16 GetLevel(const OUString &rFmtName) const;
+ OUString* GetCollNames() {return aCollNames;}
+
+ static sal_uInt16 GetActNumLevel() {return nNumLevel;}
+ static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;}
+};
+
+class SwOutlineSettingsTabPage : public SfxTabPage
+{
+ ListBox* m_pLevelLB;
+
+ ListBox* m_pCollBox;
+ SwNumberingTypeListBox* m_pNumberBox;
+ ListBox* m_pCharFmtLB;
+ FixedText* m_pAllLevelFT;
+ NumericField* m_pAllLevelNF;
+ Edit* m_pPrefixED;
+ Edit* m_pSuffixED;
+ NumericField* m_pStartEdit;
+ NumberingPreview* m_pPreviewWIN;
+
+ OUString aNoFmtName;
+ OUString aSaveCollNames[MAXLEVEL];
+ SwWrtShell* pSh;
+ SwNumRule* pNumRule;
+ OUString* pCollNames;
+ sal_uInt16 nActLevel;
+
+ DECL_LINK( LevelHdl, ListBox * );
+ DECL_LINK( ToggleComplete, NumericField * );
+ DECL_LINK( CollSelect, ListBox * );
+ DECL_LINK(CollSelectGetFocus, void *);
+ DECL_LINK( NumberSelect, SwNumberingTypeListBox * );
+ DECL_LINK(DelimModify, void *);
+ DECL_LINK( StartModified, NumericField * );
+ DECL_LINK(CharFmtHdl, void *);
+
+ void Update();
+
+ void SetModified(){m_pPreviewWIN->Invalidate();}
+ void CheckForStartValue_Impl(sal_uInt16 nNumberingType);
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+ SwOutlineSettingsTabPage(Window* pParent, const SfxItemSet& rSet);
+ ~SwOutlineSettingsTabPage();
+
+ void SetWrtShell(SwWrtShell* pShell);
+
+ virtual void ActivatePage(const SfxItemSet& rSet);
+ virtual int DeactivatePage(SfxItemSet *pSet);
+
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/pardlg.hxx b/sw/source/core/uibase/inc/pardlg.hxx
new file mode 100644
index 000000000000..d896350cbb85
--- /dev/null
+++ b/sw/source/core/uibase/inc/pardlg.hxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_PARDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_PARDLG_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+//DialogModes:
+#define DLG_STD 0
+#define DLG_ENVELOP 2
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/pattern.hxx b/sw/source/core/uibase/inc/pattern.hxx
new file mode 100644
index 000000000000..386952247924
--- /dev/null
+++ b/sw/source/core/uibase/inc/pattern.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_PATTERN_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_PATTERN_HXX
+
+#include <sfx2/basedlgs.hxx>
+
+class Window;
+class SfxItemSet;
+
+class SwBackgroundDlg : public SfxSingleTabDialog
+{
+public:
+ SwBackgroundDlg(Window* pParent, const SfxItemSet& rSet);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/pgfnote.hxx b/sw/source/core/uibase/inc/pgfnote.hxx
new file mode 100644
index 000000000000..156607ef105d
--- /dev/null
+++ b/sw/source/core/uibase/inc/pgfnote.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_PGFNOTE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_PGFNOTE_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+#include <vcl/field.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/group.hxx>
+#include <svtools/ctrlbox.hxx>
+
+/*--------------------------------------------------------------------
+ Description: footnote settings TabPage
+ --------------------------------------------------------------------*/
+class SwFootNotePage: public SfxTabPage
+{
+public:
+ static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
+ static sal_uInt16* GetRanges();
+
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
+ virtual void Reset(const SfxItemSet &rSet);
+
+private:
+ SwFootNotePage(Window *pParent, const SfxItemSet &rSet);
+ ~SwFootNotePage();
+
+ RadioButton* m_pMaxHeightPageBtn;
+ RadioButton* m_pMaxHeightBtn;
+ MetricField* m_pMaxHeightEdit;
+ MetricField* m_pDistEdit;
+
+ ListBox* m_pLinePosBox;
+ LineListBox* m_pLineTypeBox;
+ MetricField* m_pLineWidthEdit;
+ ColorListBox* m_pLineColorBox;
+ MetricField* m_pLineLengthEdit;
+ MetricField* m_pLineDistEdit;
+
+ DECL_LINK(HeightPage, void *);
+ DECL_LINK(HeightMetric, void *);
+ DECL_LINK(HeightModify, void *);
+ DECL_LINK( LineWidthChanged_Impl, void * );
+ DECL_LINK( LineColorSelected_Impl, void * );
+
+ long lMaxHeight;
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+ virtual void ActivatePage( const SfxItemSet& rSet );
+ virtual int DeactivatePage( SfxItemSet* pSet = 0 );
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/pggrid.hxx b/sw/source/core/uibase/inc/pggrid.hxx
new file mode 100644
index 000000000000..4dfc5d22748c
--- /dev/null
+++ b/sw/source/core/uibase/inc/pggrid.hxx
@@ -0,0 +1,101 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_PGGRID_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_PGGRID_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <colex.hxx>
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <svtools/ctrlbox.hxx>
+
+/*--------------------------------------------------------------------
+ Description: TabPage Format/(Styles/)Page/Text grid
+ --------------------------------------------------------------------*/
+class SwTextGridPage: public SfxTabPage
+{
+ RadioButton* m_pNoGridRB;
+ RadioButton* m_pLinesGridRB;
+ RadioButton* m_pCharsGridRB;
+ CheckBox* m_pSnapToCharsCB;
+
+ SwPageGridExample* m_pExampleWN;
+
+ VclFrame* m_pLayoutFL;
+ NumericField* m_pLinesPerPageNF;
+ FixedText* m_pLinesRangeFT;
+
+ MetricField* m_pTextSizeMF;
+
+ FixedText* m_pCharsPerLineFT;
+ NumericField* m_pCharsPerLineNF;
+ FixedText* m_pCharsRangeFT;
+
+ FixedText* m_pCharWidthFT;
+ MetricField* m_pCharWidthMF;
+
+ FixedText* m_pRubySizeFT;
+ MetricField* m_pRubySizeMF;
+
+ CheckBox* m_pRubyBelowCB;
+
+ VclFrame* m_pDisplayFL;
+
+ CheckBox* m_pDisplayCB;
+ CheckBox* m_pPrintCB;
+ ColorListBox* m_pColorLB;
+
+ sal_Int32 m_nRubyUserValue;
+ sal_Bool m_bRubyUserValue;
+ Size m_aPageSize;
+ bool m_bVertical;
+ sal_Bool m_bSquaredMode;
+ sal_Bool m_bHRulerChanged;
+ sal_Bool m_bVRulerChanged;
+
+ SwTextGridPage(Window *pParent, const SfxItemSet &rSet);
+ ~SwTextGridPage();
+
+ void UpdatePageSize(const SfxItemSet& rSet);
+ void PutGridItem(SfxItemSet& rSet);
+ void SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 nValue );
+
+ DECL_LINK(GridTypeHdl, RadioButton*);
+ DECL_LINK(CharorLineChangedHdl, SpinField*);
+ DECL_LINK(TextSizeChangedHdl, SpinField*);
+ DECL_LINK(GridModifyHdl, void*);
+ DECL_LINK(DisplayGridHdl, void *);
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+ static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
+ static sal_uInt16* GetRanges();
+
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
+ virtual void Reset(const SfxItemSet &rSet);
+
+ virtual void ActivatePage( const SfxItemSet& rSet );
+ virtual int DeactivatePage( SfxItemSet* pSet = 0 );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/popbox.hxx b/sw/source/core/uibase/inc/popbox.hxx
new file mode 100644
index 000000000000..e085886eaa81
--- /dev/null
+++ b/sw/source/core/uibase/inc/popbox.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_POPBOX_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_POPBOX_HXX
+
+#include <vcl/toolbox.hxx>
+#include <svtools/transfer.hxx>
+
+class SwNavigationPI;
+
+class SwHelpToolBox: public ToolBox, public DropTargetHelper
+{
+ Link aDoubleClickLink;
+ Link aRightClickLink; // link gets mouse event as parameter !!!
+
+ using ToolBox::DoubleClick;
+
+protected:
+ virtual void MouseButtonDown(const MouseEvent &rEvt);
+ virtual long DoubleClick(ToolBox *);
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+
+public:
+ SwHelpToolBox(SwNavigationPI* pParent, const ResId &);
+ ~SwHelpToolBox();
+ void SetDoubleClickLink(const Link &); // inline
+ void SetRightClickLink(const Link &); // inline
+};
+
+inline void SwHelpToolBox::SetDoubleClickLink(const Link &rLink) {
+ aDoubleClickLink = rLink;
+}
+
+inline void SwHelpToolBox::SetRightClickLink(const Link &rLink) {
+ aRightClickLink = rLink;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/popup.hrc b/sw/source/core/uibase/inc/popup.hrc
new file mode 100644
index 000000000000..88ed692f644a
--- /dev/null
+++ b/sw/source/core/uibase/inc/popup.hrc
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _POPUP_HRC
+#define _POPUP_HRC
+
+#include "rcid.hrc"
+
+#define MN_TEXT_POPUPMENU (RC_POPUPS_BEGIN + 0)
+#define MN_TAB_POPUPMENU (RC_POPUPS_BEGIN + 1)
+#define MN_FRM_POPUPMENU (RC_POPUPS_BEGIN + 2)
+#define MN_DRAW_POPUPMENU (RC_POPUPS_BEGIN + 3)
+#define MN_DRWTXT_POPUPMENU (RC_POPUPS_BEGIN + 4)
+#define MN_GRF_POPUPMENU (RC_POPUPS_BEGIN + 5)
+#define MN_OLE_POPUPMENU (RC_POPUPS_BEGIN + 6)
+#define MN_PPREVIEW_POPUPMENU (RC_POPUPS_BEGIN + 7)
+#define MN_SRCVIEW_POPUPMENU (RC_POPUPS_BEGIN + 8)
+#define MN_DRAWFORM_POPUPMENU (RC_POPUPS_BEGIN + 9)
+#define MN_MEDIA_POPUPMENU (RC_POPUPS_BEGIN + 10)
+#define MN_ANNOTATION_POPUPMENU (RC_POPUPS_BEGIN + 14)
+#define MN_ANNOTATION_BUTTON (RC_POPUPS_BEGIN + 15)
+#define MN_HEADERFOOTER_BUTTON (RC_POPUPS_BEGIN + 18)
+#define MN_PAGEBREAK_BUTTON (RC_POPUPS_BEGIN + 19)
+
+#if MN_PAGEBREAK_BUTTON > RC_POPUPS_END
+
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+
+#endif // _POPUP_HRC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/prcntfld.hxx b/sw/source/core/uibase/inc/prcntfld.hxx
new file mode 100644
index 000000000000..5e9422c03082
--- /dev/null
+++ b/sw/source/core/uibase/inc/prcntfld.hxx
@@ -0,0 +1,111 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_PRCNTFLD_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_PRCNTFLD_HXX
+
+#include <vcl/field.hxx>
+#include "swdllapi.h"
+#include "uitool.hxx"
+
+//Wraps a MetricField with extra features, preferred to PercentField
+class SW_DLLPUBLIC PercentField
+{
+ MetricField* m_pField;
+
+ sal_Int64 nRefValue; // 100% value for conversion (in Twips)
+ sal_Int64 nOldMax;
+ sal_Int64 nOldMin;
+ sal_Int64 nOldSpinSize;
+ sal_Int64 nOldBaseValue;
+ sal_Int64 nLastPercent;
+ sal_Int64 nLastValue;
+ sal_uInt16 nOldDigits;
+ FieldUnit eOldUnit;
+ bool bLockAutoCalculation; //prevent recalcution of percent values when the
+ //reference value is changed
+
+ SAL_DLLPRIVATE sal_Int64 ImpPower10(sal_uInt16 n);
+
+public:
+
+ PercentField();
+ void set(MetricField *pField);
+ const MetricField* get() const { return m_pField; }
+ MetricField* get() { return m_pField; }
+ void SetUpHdl(const Link& rLink) { m_pField->SetUpHdl(rLink); }
+ void SetDownHdl(const Link& rLink) { m_pField->SetDownHdl(rLink); }
+ void SetModifyHdl(const Link& rLink) { m_pField->SetModifyHdl(rLink); }
+ void SetLoseFocusHdl(const Link& rLink) { m_pField->SetLoseFocusHdl(rLink); }
+ void SetMetric(FieldUnit eUnit) { ::SetMetric(*m_pField, eUnit); }
+ void Enable(bool bEnable = true, bool bChild = true) { m_pField->Enable(bEnable, bChild); }
+ void Disable(bool bChild = true) { m_pField->Disable(bChild); }
+ bool HasFocus() const { return m_pField->HasFocus(); }
+ void SetAccessibleName(const OUString& rName) { m_pField->SetAccessibleName(rName); }
+ void SetText(const OUString& rStr) { m_pField->SetText(rStr); }
+ void SaveValue() { m_pField->SaveValue(); }
+ void ClearModifyFlag() { m_pField->ClearModifyFlag(); }
+ OUString GetSavedValue() const { return m_pField->GetSavedValue(); }
+ OUString GetText() const { return m_pField->GetText(); }
+ void SetMetricFieldMin(sal_Int64 nNewMin) { m_pField->SetMin(nNewMin); }
+ void SetMetricFieldMax(sal_Int64 nNewMax) { m_pField->SetMax(nNewMax); }
+
+ void SetValue(sal_Int64 nNewValue, FieldUnit eInUnit = FUNIT_NONE) { m_pField->SetValue(nNewValue, eInUnit); }
+
+ void SetLast(sal_Int64 nNewLast) { m_pField->SetLast(nNewLast); }
+
+ void SetPrcntValue(sal_Int64 nNewValue, FieldUnit eInUnit = FUNIT_NONE);
+
+ void SetUserValue(sal_Int64 nNewValue, FieldUnit eInUnit = FUNIT_NONE);
+
+ void SetBaseValue(sal_Int64 nNewValue, FieldUnit eInUnit = FUNIT_NONE);
+
+ sal_Int64 GetValue(FieldUnit eOutUnit = FUNIT_NONE);
+
+ bool IsValueModified();
+
+ void SetMax(sal_Int64 nNewMax, FieldUnit eInUnit = FUNIT_NONE);
+
+ void SetMin(sal_Int64 nNewMin, FieldUnit eInUnit = FUNIT_NONE);
+
+ sal_Int64 GetMin() const { return m_pField->GetMin(); }
+ sal_Int64 GetMax() const { return m_pField->GetMax(); }
+
+ sal_Int64 NormalizePercent(sal_Int64 nValue);
+ sal_Int64 DenormalizePercent(sal_Int64 nValue);
+
+ sal_Int64 Normalize( sal_Int64 nValue ) const { return m_pField->Normalize(nValue); }
+ sal_Int64 Denormalize( sal_Int64 nValue ) const { return m_pField->Denormalize(nValue); }
+
+ void SetRefValue(sal_Int64 nValue);
+ sal_Int64 GetRefValue() const { return nRefValue; }
+ sal_Int64 GetRealValue(FieldUnit eOutUnit = FUNIT_NONE);
+
+ sal_Int64 Convert(sal_Int64 nValue, FieldUnit eInUnit, FieldUnit eOutUnit);
+
+ void ShowPercent(bool bPercent);
+
+ sal_uInt16 GetOldDigits() const {return nOldDigits;}
+
+ void LockAutoCalculation(bool bLock) {bLockAutoCalculation = bLock;}
+ bool IsAutoCalculationLocked() const {return bLockAutoCalculation;}
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_PRCNTFLD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/pview.hxx b/sw/source/core/uibase/inc/pview.hxx
new file mode 100644
index 000000000000..de42c7930541
--- /dev/null
+++ b/sw/source/core/uibase/inc/pview.hxx
@@ -0,0 +1,301 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_PVIEW_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_PVIEW_HXX
+
+#include <tools/link.hxx>
+#include <vcl/window.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/viewfac.hxx>
+#include <sfx2/viewsh.hxx>
+#include <sfx2/zoomitem.hxx>
+#include "swdllapi.h"
+#include "shellid.hxx"
+
+class SwViewOption;
+class SwDocShell;
+class SwScrollbar;
+class SwViewShell;
+class SwPagePreview;
+class ImageButton;
+class Button;
+class SwRect;
+class DataChangedEvent;
+class CommandEvent;
+class SvtAccessibilityOptions;
+class SwPagePreviewLayout;
+
+// Delete member <mnVirtPage> and its accessor
+class SwPagePreviewWin : public Window
+{
+ SwViewShell* mpViewShell;
+ sal_uInt16 mnSttPage;
+ sal_uInt8 mnRow, mnCol;
+ Size maPxWinSize;
+ Fraction maScale;
+ SwPagePreview& mrView;
+ bool mbCalcScaleForPreviewLayout;
+ Rectangle maPaintedPreviewDocRect;
+ SwPagePreviewLayout* mpPgPreviewLayout;
+
+ void SetPagePreview( sal_uInt8 nRow, sal_uInt8 nCol );
+
+ using Window::Scroll;
+
+public:
+ SwPagePreviewWin( Window* pParent, SwPagePreview& rView );
+ ~SwPagePreviewWin();
+
+ // calls SwViewShell::Paint
+ virtual void Paint( const Rectangle& rRect );
+ virtual void KeyInput( const KeyEvent & );
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void MouseButtonDown(const MouseEvent& rMEvt);
+ virtual void DataChanged( const DataChangedEvent& );
+
+ void SetViewShell( SwViewShell* pShell );
+
+ SwViewShell* GetViewShell() const { return mpViewShell; }
+
+ sal_uInt8 GetRow() const { return mnRow; }
+ void SetRow( sal_uInt8 n ) { if( n ) mnRow = n; }
+
+ sal_uInt8 GetCol() const { return mnCol; }
+ void SetCol( sal_uInt8 n ) { if( n ) mnCol = n; }
+
+ sal_uInt16 GetSttPage() const { return mnSttPage; }
+ void SetSttPage( sal_uInt16 n ) { mnSttPage = n; }
+
+ /** get selected page number of document preview
+
+ @return selected page number
+ */
+ sal_uInt16 SelectedPage() const;
+
+ /** set selected page number in document preview
+
+ @param _nSelectedPageNum
+ input parameter - physical page number of page that will be the selected one.
+ */
+ void SetSelectedPage( sal_uInt16 _nSelectedPageNum );
+
+ // If we only have one column we do not have a oth page
+ sal_uInt16 GetDefSttPage() const { return 1 == mnCol ? 1 : 0; }
+
+ void CalcWish( sal_uInt8 nNewRow, sal_uInt8 nNewCol );
+
+ const Size& GetWinSize() const { return maPxWinSize; }
+ void SetWinSize( const Size& rNewSize );
+
+ // Add <MV_SELPAGE>, <MV_SCROLL>
+ enum MoveMode{ MV_CALC, MV_PAGE_UP, MV_PAGE_DOWN, MV_DOC_STT, MV_DOC_END,
+ MV_SELPAGE, MV_SCROLL, MV_NEWWINSIZE };
+ int MovePage( int eMoveMode );
+
+ // Create the status bar's string
+ OUString GetStatusStr( sal_uInt16 nPageCount ) const;
+
+ void RepaintCoreRect( const SwRect& rRect );
+
+ /** Method to adjust preview to a new zoom factor
+ paint of preview is prepared for a new zoom factor
+ Zoom type has also been considered.
+ Thus, add new parameter <_eZoomType>
+ */
+ void AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor,
+ const SvxZoomType _eZoomType );
+
+ const Rectangle& GetPaintedPreviewDocRect() const
+ {
+ return maPaintedPreviewDocRect;
+ }
+
+ void Scroll(long nXMove, long nYMove, sal_uInt16 nFlags = 0);
+
+ /** Method to enable/disable book preview
+ @param _bBookPreview
+ input parameter - boolean indicating, if book preview mode has to
+ switch on <sal_True> or of <sal_False>
+
+ @return boolean indicating, if book preview mode has changed.
+ */
+ bool SetBookPreviewMode( const bool _bBookPreview );
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>
+ CreateAccessible();
+ virtual void SwitchView();
+};
+
+/**
+ * View of a document
+ */
+class SW_DLLPUBLIC SwPagePreview: public SfxViewShell
+{
+ // ViewWindow and handle to core
+ // current dispatcher shell
+ SwPagePreviewWin* pViewWin;
+ //viewdata of the previous SwView and the new crsrposition
+ OUString sSwViewData;
+ //and the new cursor position if the user double click in the PagePreview
+ OUString sNewCrsrPos;
+ // to support keyboard the number of the page to go to can be set too
+ sal_uInt16 nNewPage;
+ // visible range
+ OUString sPageStr;
+ Size aDocSz;
+ Rectangle aVisArea;
+
+ // MDI control elements
+ SwScrollbar *pHScrollbar;
+ SwScrollbar *pVScrollbar;
+ bool mbHScrollbarEnabled;
+ bool mbVScrollbarEnabled;
+ ImageButton *pPageUpBtn,
+ *pPageDownBtn;
+ // dummy window for filling the lower right edge when both scrollbars are active
+ Window *pScrollFill;
+
+ sal_uInt16 mnPageCount;
+ sal_Bool bNormalPrint;
+
+ // New members to reset design mode at draw view for form shell on switching
+ // back from writer page preview to normal view.
+ sal_Bool mbResetFormDesignMode:1;
+ sal_Bool mbFormDesignModeToReset:1;
+
+ SAL_DLLPRIVATE void Init(const SwViewOption* = 0);
+ SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
+
+ SAL_DLLPRIVATE int _CreateScrollbar( sal_Bool bHori );
+ SAL_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
+ SAL_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
+ SAL_DLLPRIVATE DECL_LINK( BtnPage, Button * );
+ SAL_DLLPRIVATE bool ChgPage( int eMvMode, int bUpdateScrollbar = sal_True );
+
+ SAL_DLLPRIVATE virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
+ SAL_DLLPRIVATE virtual sal_uInt16 SetPrinter( SfxPrinter *pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
+ SAL_DLLPRIVATE virtual bool HasPrintOptionsPage() const;
+ SAL_DLLPRIVATE virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent,
+ const SfxItemSet &rOptions );
+
+ SAL_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner );
+
+ /** Helper method to execute SfxRequest FN_PAGE_UP and FN_PAGE_DOWN
+
+ @param _bPgUp
+ input parameter - boolean that indicates, if FN_PAGE_UP or FN_PAGE_DOWN
+ has to be executed.
+
+ @param _pReq
+ optional input parameter - pointer to the <SfxRequest> instance, if existing.
+ */
+ SAL_DLLPRIVATE void _ExecPgUpAndPgDown( const bool _bPgUp,
+ SfxRequest* _pReq = 0 );
+
+protected:
+ virtual void InnerResizePixel( const Point &rOfs, const Size &rSize );
+ virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
+
+ void SetZoom(SvxZoomType eSet, sal_uInt16 nFactor);
+
+public:
+ SFX_DECL_VIEWFACTORY(SwPagePreview);
+ SFX_DECL_INTERFACE(SW_PAGEPREVIEW)
+ TYPEINFO();
+
+ inline Window* GetFrameWindow() const { return &(GetViewFrame())->GetWindow(); }
+ inline SwViewShell* GetViewShell() const { return pViewWin->GetViewShell(); }
+ inline const Rectangle& GetVisArea() const { return aVisArea; }
+ inline void GrabFocusViewWin() { pViewWin->GrabFocus(); }
+ inline void RepaintCoreRect( const SwRect& rRect )
+ { pViewWin->RepaintCoreRect( rRect ); }
+
+ void DocSzChgd(const Size& rNewSize);
+ const Size& GetDocSz() const { return aDocSz; }
+
+ virtual void SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
+
+ inline void AdjustEditWin();
+
+ void ScrollViewSzChg();
+ void ScrollDocSzChg();
+ void ShowHScrollbar(sal_Bool bShow);
+ void ShowVScrollbar(sal_Bool bShow);
+ void EnableHScrollbar(bool bEnable);
+ void EnableVScrollbar(bool bEnable);
+
+ sal_uInt16 GetPageCount() const { return mnPageCount; }
+ sal_uInt16 GetSelectedPage() const {return pViewWin->SelectedPage();}
+
+ sal_Bool HandleWheelCommands( const CommandEvent& );
+
+ OUString GetPrevSwViewData() const { return sSwViewData; }
+ void SetNewCrsrPos( const OUString& rStr ) { sNewCrsrPos = rStr; }
+ const OUString& GetNewCrsrPos() const { return sNewCrsrPos; }
+
+ sal_uInt16 GetNewPage() const {return nNewPage;}
+ void SetNewPage(sal_uInt16 nSet) {nNewPage = nSet;}
+
+ // Handler
+ void Execute(SfxRequest&);
+ void GetState(SfxItemSet&);
+ void StateUndo(SfxItemSet&);
+
+ SwDocShell* GetDocShell();
+
+ // apply Accessiblity options
+ void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
+
+ // Inline method to request values of new members
+ // <mbResetFormDesignMode> and <mbFormDesignModeToReset>
+ inline sal_Bool ResetFormDesignMode() const
+ {
+ return mbResetFormDesignMode;
+ }
+
+ inline sal_Bool FormDesignModeToReset() const
+ {
+ return mbFormDesignModeToReset;
+ }
+
+ /** Adjust position of vertical scrollbar
+
+ Currently used, if the complete preview layout rows fit into to the given
+ window, if a new page is selected and this page is visible.
+
+ @param _nNewThumbPos
+ input parameter - new position, which will be assigned to the vertical
+ scrollbar.
+ */
+ void SetVScrollbarThumbPos( const sal_uInt16 _nNewThumbPos );
+
+ SwPagePreview( SfxViewFrame* pFrame, SfxViewShell* );
+ ~SwPagePreview();
+};
+
+// ----------------- inline methods ----------------------
+inline void SwPagePreview::AdjustEditWin()
+{
+ OuterResizePixel( Point(), GetFrameWindow()->GetOutputSizePixel() );
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/redline_tmpl.hrc b/sw/source/core/uibase/inc/redline_tmpl.hrc
new file mode 100644
index 000000000000..42717089947b
--- /dev/null
+++ b/sw/source/core/uibase/inc/redline_tmpl.hrc
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include "cmdid.h"
+
+#define MN_EDIT_REDLINE \
+ MenuItem \
+ { \
+ Identifier = FN_REDLINE_ACCEPT_DIRECT; \
+ HelpId = CMD_FN_REDLINE_ACCEPT_DIRECT ; \
+ Text [ en-US ] = "Accept Change" ; \
+ }; \
+ MenuItem \
+ { \
+ Identifier = FN_REDLINE_REJECT_DIRECT ; \
+ HelpId = CMD_FN_REDLINE_REJECT_DIRECT ; \
+ Text [ en-US ] = "Reject Change" ; \
+ }; \
+ MenuItem \
+ { \
+ Identifier = FN_REDLINE_NEXT_CHANGE; \
+ HelpId = CMD_FN_REDLINE_NEXT_CHANGE ; \
+ Text [ en-US ] = "Next Change" ; \
+ }; \
+ MenuItem \
+ { \
+ Identifier = FN_REDLINE_PREV_CHANGE; \
+ HelpId = CMD_FN_REDLINE_PREV_CHANGE ; \
+ Text [ en-US ] = "Previous Change" ; \
+ };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/redlndlg.hxx b/sw/source/core/uibase/inc/redlndlg.hxx
new file mode 100644
index 000000000000..2ee42bdef5c6
--- /dev/null
+++ b/sw/source/core/uibase/inc/redlndlg.hxx
@@ -0,0 +1,162 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_REDLNDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_REDLNDLG_HXX
+#include "swdllapi.h"
+#include "chldwrap.hxx"
+#include <redline.hxx>
+#include <tools/datetime.hxx>
+#include <vcl/msgbox.hxx>
+#include <svl/eitem.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/dispatch.hxx>
+#include <svx/ctredlin.hxx>
+#include <svx/postattr.hxx>
+#include <boost/ptr_container/ptr_vector.hpp>
+#include <o3tl/sorted_vector.hxx>
+
+class SwChildWinWrapper;
+
+struct SwRedlineDataChild
+{
+ const SwRedlineData* pChild; // link to original stacked data
+ const SwRedlineDataChild* pNext; // link to stacked data
+ SvTreeListEntry* pTLBChild; // corresponding TreeListBox entry
+};
+
+struct SwRedlineDataParent
+{
+ const SwRedlineData* pData; // RedlineDataPtr
+ const SwRedlineDataChild* pNext; // link to stacked data
+ SvTreeListEntry* pTLBParent; // corresponding TreeListBox entry
+ OUString sComment; // redline comment
+
+ inline sal_Bool operator==( const SwRedlineDataParent& rObj ) const
+ { return (pData && pData->GetSeqNo() == rObj.pData->GetSeqNo()); }
+ inline sal_Bool operator< ( const SwRedlineDataParent& rObj ) const
+ { return (pData && pData->GetSeqNo() < rObj.pData->GetSeqNo()); }
+};
+
+typedef boost::ptr_vector<SwRedlineDataParent> SwRedlineDataParentArr;
+
+class SwRedlineDataParentSortArr : public o3tl::sorted_vector<SwRedlineDataParent*, o3tl::less_ptr_to<SwRedlineDataParent> > {};
+
+typedef SwRedlineDataChild* SwRedlineDataChildPtr;
+typedef boost::ptr_vector<SwRedlineDataChild> SwRedlineDataChildArr;
+
+typedef SvTreeListEntry* SvLBoxEntryPtr;
+typedef std::vector<SvLBoxEntryPtr> SvLBoxEntryArr;
+
+class SW_DLLPUBLIC SwRedlineAcceptDlg
+{
+ Dialog* pParentDlg;
+ SwRedlineDataParentArr aRedlineParents;
+ SwRedlineDataChildArr aRedlineChildren;
+ SwRedlineDataParentSortArr aUsedSeqNo;
+ SvxAcceptChgCtr aTabPagesCTRL;
+ PopupMenu aPopup;
+ Timer aDeselectTimer;
+ Timer aSelectTimer;
+ OUString sInserted;
+ OUString sDeleted;
+ OUString sFormated;
+ OUString sTableChgd;
+ OUString sFmtCollSet;
+ OUString sFilterAction;
+ OUString sAutoFormat;
+ SvxTPView* pTPView;
+ SvxRedlinTable* pTable; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
+ Link aOldSelectHdl;
+ Link aOldDeselectHdl;
+ sal_Bool bOnlyFormatedRedlines;
+ sal_Bool bHasReadonlySel;
+ sal_Bool bRedlnAutoFmt;
+
+ // prevent update dialog data during longer operations (cf #102657#)
+ bool bInhibitActivate;
+
+ SAL_DLLPRIVATE DECL_LINK( AcceptHdl, void* );
+ SAL_DLLPRIVATE DECL_LINK( AcceptAllHdl, void* );
+ SAL_DLLPRIVATE DECL_LINK( RejectHdl, void* );
+ SAL_DLLPRIVATE DECL_LINK( RejectAllHdl, void* );
+ SAL_DLLPRIVATE DECL_LINK( UndoHdl, void* );
+ SAL_DLLPRIVATE DECL_LINK( DeselectHdl, void* );
+ SAL_DLLPRIVATE DECL_LINK( SelectHdl, void* );
+ SAL_DLLPRIVATE DECL_LINK( GotoHdl, void* );
+ SAL_DLLPRIVATE DECL_LINK( CommandHdl, void* );
+
+ SAL_DLLPRIVATE sal_uInt16 CalcDiff(sal_uInt16 nStart, sal_Bool bChild);
+ SAL_DLLPRIVATE void InsertChildren(SwRedlineDataParent *pParent, const SwRangeRedline& rRedln, const sal_uInt16 nAutoFmt);
+ SAL_DLLPRIVATE void InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd = USHRT_MAX);
+ SAL_DLLPRIVATE void RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd);
+ SAL_DLLPRIVATE void InitAuthors();
+
+ SAL_DLLPRIVATE OUString GetRedlineText(const SwRangeRedline& rRedln, DateTime &rDateTime, sal_uInt16 nStack = 0);
+ SAL_DLLPRIVATE OUString GetActionText(const SwRangeRedline& rRedln, sal_uInt16 nStack = 0);
+ SAL_DLLPRIVATE sal_uInt16 GetRedlinePos( const SvTreeListEntry& rEntry) const;
+
+public:
+ SwRedlineAcceptDlg(Dialog *pParent, sal_Bool bAutoFmt = sal_False);
+ virtual ~SwRedlineAcceptDlg();
+
+ DECL_LINK( FilterChangedHdl, void *pDummy = 0 );
+
+ inline SvxAcceptChgCtr* GetChgCtrl() { return &aTabPagesCTRL; }
+ inline sal_Bool HasRedlineAutoFmt() const { return bRedlnAutoFmt; }
+
+ void Init(sal_uInt16 nStart = 0);
+ void CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept );
+
+ void Initialize(const OUString &rExtraData);
+ void FillInfo(OUString &rExtraData) const;
+
+ virtual void Activate();
+};
+
+class SwModelessRedlineAcceptDlg : public SfxModelessDialog
+{
+ SwRedlineAcceptDlg* pImplDlg;
+ SwChildWinWrapper* pChildWin;
+
+public:
+ SwModelessRedlineAcceptDlg(SfxBindings*, SwChildWinWrapper*, Window *pParent);
+ ~SwModelessRedlineAcceptDlg();
+
+ virtual void Activate();
+ virtual void FillInfo(SfxChildWinInfo&) const;
+ void Initialize (SfxChildWinInfo* pInfo);
+};
+
+class SwRedlineAcceptChild : public SwChildWinWrapper
+{
+public:
+ SwRedlineAcceptChild( Window* ,
+ sal_uInt16 nId,
+ SfxBindings*,
+ SfxChildWinInfo* );
+
+ SFX_DECL_CHILDWINDOW_WITHID( SwRedlineAcceptChild );
+
+ virtual sal_Bool ReInitDlg(SwDocShell *pDocSh);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/regionsw.hxx b/sw/source/core/uibase/inc/regionsw.hxx
new file mode 100644
index 000000000000..44a9fa642684
--- /dev/null
+++ b/sw/source/core/uibase/inc/regionsw.hxx
@@ -0,0 +1,303 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_REGIONSW_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_REGIONSW_HXX
+
+#include <hintids.hxx>
+#include <vcl/field.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/combobox.hxx>
+#include <vcl/group.hxx>
+#include <vcl/layout.hxx>
+#include <svtools/treelistbox.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <editeng/brushitem.hxx>
+
+#include <condedit.hxx>
+#include <section.hxx>
+#include <fmtclds.hxx>
+#include <fmtftntx.hxx>
+#include <fmtclbl.hxx>
+#include <numberingtypelistbox.hxx>
+#include <editeng/frmdiritem.hxx>
+#include <vcl/image.hxx>
+#include <svx/paraprev.hxx>
+#include <editeng/lrspitem.hxx>
+
+#include <boost/ptr_container/ptr_set.hpp>
+
+class SwWrtShell;
+
+namespace sfx2
+{
+ class DocumentInserter;
+ class FileDialogHelper;
+}
+
+/*************************************************************************
+ dialog "edit regions"
+*************************************************************************/
+class SectRepr;
+typedef SectRepr* SectReprPtr;
+typedef boost::ptr_set<SectRepr> SectReprArr;
+
+class SwEditRegionDlg : public SfxModalDialog
+{
+ Edit* m_pCurName;
+ SvTreeListBox* m_pTree;
+
+ TriStateBox* m_pFileCB;
+ CheckBox* m_pDDECB;
+ VclContainer* m_pDDEFrame;
+ FixedText* m_pFileNameFT;
+ FixedText* m_pDDECommandFT;
+ Edit* m_pFileNameED;
+ PushButton* m_pFilePB;
+ FixedText* m_pSubRegionFT;
+ ComboBox* m_pSubRegionED;
+ bool m_bSubRegionsFilled;
+
+ TriStateBox* m_pProtectCB;
+ CheckBox* m_pPasswdCB;
+ PushButton* m_pPasswdPB;
+
+ TriStateBox* m_pHideCB;
+ FixedText* m_pConditionFT;
+ ConditionEdit* m_pConditionED;
+
+ // #114856# edit in readonly sections
+ TriStateBox* m_pEditInReadonlyCB;
+
+ OKButton* m_pOK;
+ PushButton* m_pOptionsPB;
+ PushButton* m_pDismiss;
+ ImageList aImageIL;
+
+ SwWrtShell& rSh;
+ SectReprArr aSectReprArr;
+ const SwSection* pCurrSect;
+ sfx2::DocumentInserter* m_pDocInserter;
+ Window* m_pOldDefDlgParent;
+
+ sal_Bool bDontCheckPasswd :1;
+ sal_Bool bWeb :1;
+
+ Image BuildBitmap(sal_Bool bProtect,sal_Bool bHidden);
+
+ void RecurseList( const SwSectionFmt* pFmt, SvTreeListEntry* pEntry);
+ sal_uInt16 FindArrPos(const SwSectionFmt* pFmt);
+
+ DECL_LINK( GetFirstEntryHdl, SvTreeListBox * );
+ DECL_LINK( DeselectHdl, SvTreeListBox * );
+
+ DECL_LINK(OkHdl, void *);
+ DECL_LINK(NameEditHdl, void *);
+ DECL_LINK( ConditionEditHdl, Edit * );
+
+ DECL_LINK( ChangePasswdHdl, Button * );
+ DECL_LINK( ChangeProtectHdl, TriStateBox * );
+ DECL_LINK( ChangeHideHdl, TriStateBox * );
+ // #114856# edit in readonly sections
+ DECL_LINK( ChangeEditInReadonlyHdl, TriStateBox * );
+ DECL_LINK(ChangeDismissHdl, void *);
+ DECL_LINK( UseFileHdl, CheckBox* );
+ DECL_LINK(FileSearchHdl, void *);
+ DECL_LINK(OptionsHdl, void *);
+ DECL_LINK( FileNameHdl, Edit* );
+ DECL_LINK( DDEHdl, CheckBox* );
+ DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
+ DECL_LINK( SubRegionEventHdl, VclWindowEvent * );
+
+ sal_Bool CheckPasswd(CheckBox* pBox = 0);
+
+public:
+ SwEditRegionDlg( Window* pParent, SwWrtShell& rWrtSh );
+ virtual ~SwEditRegionDlg();
+
+ void SelectSection(const OUString& rSectionName);
+
+};
+
+/*************************************************************************
+ dialog "insert region"
+*************************************************************************/
+class SwInsertSectionTabPage : public SfxTabPage
+{
+ ComboBox* m_pCurName;
+
+ CheckBox* m_pFileCB;
+ CheckBox* m_pDDECB;
+ FixedText* m_pDDECommandFT;
+ FixedText* m_pFileNameFT;
+ Edit* m_pFileNameED;
+ PushButton* m_pFilePB;
+ FixedText* m_pSubRegionFT;
+ ComboBox* m_pSubRegionED;
+
+ CheckBox* m_pProtectCB;
+ CheckBox* m_pPasswdCB;
+ PushButton* m_pPasswdPB;
+
+ CheckBox* m_pHideCB;
+ FixedText* m_pConditionFT;
+ ConditionEdit* m_pConditionED;
+
+ // #114856# edit in readonly sections
+ CheckBox* m_pEditInReadonlyCB;
+
+ OUString m_sFileName;
+ OUString m_sFilterName;
+ OUString m_sFilePasswd;
+
+ ::com::sun::star::uno::Sequence <sal_Int8 > m_aNewPasswd;
+ SwWrtShell* m_pWrtSh;
+ sfx2::DocumentInserter* m_pDocInserter;
+ Window* m_pOldDefDlgParent;
+
+ DECL_LINK( ChangeHideHdl, CheckBox * );
+ // #114856# edit in readonly sections
+ DECL_LINK(ChangeEditInReadonlyHdl, void *);
+ DECL_LINK( ChangeProtectHdl, CheckBox * );
+ DECL_LINK( ChangePasswdHdl, Button * );
+ DECL_LINK(NameEditHdl, void *);
+ DECL_LINK( UseFileHdl, CheckBox* );
+ DECL_LINK(FileSearchHdl, void *);
+ DECL_LINK( DDEHdl, CheckBox* );
+ DECL_LINK( DlgClosedHdl, sfx2::FileDialogHelper* );
+
+public:
+ SwInsertSectionTabPage(Window *pParent, const SfxItemSet &rAttrSet);
+ virtual ~SwInsertSectionTabPage();
+
+ void SetWrtShell(SwWrtShell& rSh);
+
+ virtual sal_Bool FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+};
+
+class SwSectionFtnEndTabPage : public SfxTabPage
+{
+ CheckBox* pFtnNtAtTextEndCB;
+
+ CheckBox* pFtnNtNumCB;
+ FixedText* pFtnOffsetLbl;
+ NumericField* pFtnOffsetFld;
+
+ CheckBox* pFtnNtNumFmtCB;
+ FixedText* pFtnPrefixFT;
+ Edit* pFtnPrefixED;
+ SwNumberingTypeListBox* pFtnNumViewBox;
+ FixedText* pFtnSuffixFT;
+ Edit* pFtnSuffixED;
+
+ CheckBox* pEndNtAtTextEndCB;
+
+ CheckBox* pEndNtNumCB;
+ FixedText* pEndOffsetLbl;
+ NumericField* pEndOffsetFld;
+
+ CheckBox* pEndNtNumFmtCB;
+ FixedText* pEndPrefixFT;
+ Edit* pEndPrefixED;
+ SwNumberingTypeListBox* pEndNumViewBox;
+ FixedText* pEndSuffixFT;
+ Edit* pEndSuffixED;
+
+ DECL_LINK( FootEndHdl, CheckBox * );
+ void ResetState( sal_Bool bFtn, const SwFmtFtnEndAtTxtEnd& );
+
+public:
+ SwSectionFtnEndTabPage( Window *pParent, const SfxItemSet &rAttrSet );
+ virtual ~SwSectionFtnEndTabPage();
+
+ virtual sal_Bool FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+};
+
+class SwSectionIndentTabPage : public SfxTabPage
+{
+ MetricField* m_pBeforeMF;
+ MetricField* m_pAfterMF;
+ SvxParaPrevWindow* m_pPreviewWin;
+
+ DECL_LINK(IndentModifyHdl, void *);
+public:
+ SwSectionIndentTabPage( Window *pParent, const SfxItemSet &rAttrSet );
+ virtual ~SwSectionIndentTabPage();
+
+ virtual sal_Bool FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+
+ void SetWrtShell(SwWrtShell& rSh);
+};
+
+class SwInsertSectionTabDialog : public SfxTabDialog
+{
+ SwWrtShell& rWrtSh;
+ ::std::auto_ptr<SwSectionData> m_pSectionData;
+
+ sal_uInt16 m_nSectionPageId;
+ sal_uInt16 m_nColumnPageId;
+ sal_uInt16 m_nBackPageId;
+ sal_uInt16 m_nNotePageId;
+ sal_uInt16 m_nIndentPage;
+
+protected:
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
+ virtual short Ok();
+public:
+ SwInsertSectionTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
+ virtual ~SwInsertSectionTabDialog();
+
+ void SetSectionData(SwSectionData const& rSect);
+ SwSectionData * GetSectionData() { return m_pSectionData.get(); }
+};
+
+class SwSectionPropertyTabDialog : public SfxTabDialog
+{
+ SwWrtShell& rWrtSh;
+
+ sal_uInt16 m_nColumnPageId;
+ sal_uInt16 m_nBackPageId;
+ sal_uInt16 m_nNotePageId;
+ sal_uInt16 m_nIndentPage;
+
+protected:
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
+public:
+ SwSectionPropertyTabDialog(Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh);
+ virtual ~SwSectionPropertyTabDialog();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/ribbar.hrc b/sw/source/core/uibase/inc/ribbar.hrc
new file mode 100644
index 000000000000..296b61d4b28c
--- /dev/null
+++ b/sw/source/core/uibase/inc/ribbar.hrc
@@ -0,0 +1,104 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef _RIBBAR_HRC
+#define _RIBBAR_HRC
+
+#include "rcid.hrc"
+
+#define MN_FORM1 1 // Defines fuer NumNames-Popup
+#define MN_FORMBASE MN_FORM1
+#define MN_FORM2 2
+#define MN_FORM3 3
+#define MN_FORM4 4
+#define MN_FORM5 5
+
+#define CB_FORMAT (RC_RIBBAR_BEGIN +1)
+#define CB_SIZE (RC_RIBBAR_BEGIN +3)
+#define RID_TBX_FORMULA (RC_RIBBAR_BEGIN +6)
+#define FT_POS (RC_RIBBAR_BEGIN +7)
+#define STR_TBL_FORMULA (RC_RIBBAR_BEGIN +9)
+
+#define RID_DRAW_WIN (RC_RIBBAR_BEGIN + 18)
+#define RID_CNTRLR_WIN (RC_RIBBAR_BEGIN + 19)
+#define RID_ALIGNMENT_WIN (RC_RIBBAR_BEGIN + 20)
+
+//Resourcen fuer Inputwin (Rechenleiste)
+#define MN_CALC_POPUP (RC_RIBBAR_BEGIN + 22)
+
+#define RID_INSERT_FIELD_CTRL (RC_RIBBAR_BEGIN + 26)
+#define RID_SCROLL_NAVIGATION_WIN (RC_RIBBAR_BEGIN + 30)
+#define RID_PVIEW_ZOOM_LB (RC_RIBBAR_BEGIN + 31)
+
+#define STR_IMGBTN_START (RC_RIBBAR_BEGIN + 31)
+
+#define STR_IMGBTN_NEXT_DOWN (STR_IMGBTN_START + 0)
+#define STR_IMGBTN_PREV_DOWN (STR_IMGBTN_START + 1)
+#define STR_IMGBTN_TBL_DOWN (STR_IMGBTN_START + 2)
+#define STR_IMGBTN_FRM_DOWN (STR_IMGBTN_START + 3)
+#define STR_IMGBTN_PGE_DOWN (STR_IMGBTN_START + 4)
+#define STR_IMGBTN_DRW_DOWN (STR_IMGBTN_START + 5)
+#define STR_IMGBTN_CTRL_DOWN (STR_IMGBTN_START + 6)
+#define STR_IMGBTN_REG_DOWN (STR_IMGBTN_START + 7)
+#define STR_IMGBTN_BKM_DOWN (STR_IMGBTN_START + 8)
+#define STR_IMGBTN_GRF_DOWN (STR_IMGBTN_START + 9)
+#define STR_IMGBTN_OLE_DOWN (STR_IMGBTN_START +10)
+#define STR_IMGBTN_OUTL_DOWN (STR_IMGBTN_START +11)
+#define STR_IMGBTN_SEL_DOWN (STR_IMGBTN_START +12)
+#define STR_IMGBTN_FTN_DOWN (STR_IMGBTN_START +13)
+#define STR_IMGBTN_MARK_DOWN (STR_IMGBTN_START +14)
+#define STR_IMGBTN_POSTIT_DOWN (STR_IMGBTN_START +15)
+#define STR_IMGBTN_SRCH_REP_DOWN (STR_IMGBTN_START +16)
+#define STR_IMGBTN_INDEX_ENTRY_DOWN (STR_IMGBTN_START +17)
+#define STR_IMGBTN_TBLFML_DOWN (STR_IMGBTN_START +18)
+#define STR_IMGBTN_TBLFML_ERR_DOWN (STR_IMGBTN_START +19)
+
+#define STR_IMGBTN_NEXT_UP (STR_IMGBTN_START +20)
+#define STR_IMGBTN_PREV_UP (STR_IMGBTN_START +21)
+#define STR_IMGBTN_TBL_UP (STR_IMGBTN_START +22)
+#define STR_IMGBTN_FRM_UP (STR_IMGBTN_START +23)
+#define STR_IMGBTN_PGE_UP (STR_IMGBTN_START +24)
+#define STR_IMGBTN_DRW_UP (STR_IMGBTN_START +25)
+#define STR_IMGBTN_CTRL_UP (STR_IMGBTN_START +26)
+#define STR_IMGBTN_REG_UP (STR_IMGBTN_START +27)
+#define STR_IMGBTN_BKM_UP (STR_IMGBTN_START +28)
+#define STR_IMGBTN_GRF_UP (STR_IMGBTN_START +29)
+#define STR_IMGBTN_OLE_UP (STR_IMGBTN_START +30)
+#define STR_IMGBTN_OUTL_UP (STR_IMGBTN_START +31)
+#define STR_IMGBTN_SEL_UP (STR_IMGBTN_START +32)
+#define STR_IMGBTN_FTN_UP (STR_IMGBTN_START +33)
+#define STR_IMGBTN_MARK_UP (STR_IMGBTN_START +34)
+#define STR_IMGBTN_POSTIT_UP (STR_IMGBTN_START +35)
+#define STR_IMGBTN_SRCH_REP_UP (STR_IMGBTN_START +36)
+#define STR_IMGBTN_INDEX_ENTRY_UP (STR_IMGBTN_START +37)
+#define STR_IMGBTN_TBLFML_UP (STR_IMGBTN_START +38)
+#define STR_IMGBTN_TBLFML_ERR_UP (STR_IMGBTN_START +39)
+
+#define BTN_NAVI (STR_IMGBTN_START +40)
+
+#define MN_ANCHOR_POPUP (STR_IMGBTN_START +41)
+
+#define RC_RIBBAR_ACT_END MN_ANCHOR_POPUP
+
+#if RC_RIBBAR_ACT_END > RC_RIBBAR_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/rowht.hxx b/sw/source/core/uibase/inc/rowht.hxx
new file mode 100644
index 000000000000..022c1d2940f2
--- /dev/null
+++ b/sw/source/core/uibase/inc/rowht.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_ROWHT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_ROWHT_HXX
+
+#include <svx/stddlg.hxx>
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
+
+class SwWrtShell;
+
+class SwTableHeightDlg : public SvxStandardDialog
+{
+ MetricField* m_pHeightEdit;
+ CheckBox* m_pAutoHeightCB;
+ SwWrtShell &rSh;
+
+protected:
+ virtual void Apply();
+
+public:
+ SwTableHeightDlg( Window *pParent, SwWrtShell &rS );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/scroll.hxx b/sw/source/core/uibase/inc/scroll.hxx
new file mode 100644
index 000000000000..ba0f66b33398
--- /dev/null
+++ b/sw/source/core/uibase/inc/scroll.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SCROLL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SCROLL_HXX
+#include <vcl/scrbar.hxx>
+
+class SwScrollbar: public ScrollBar
+{
+ Size aDocSz;
+ sal_Bool bHori :1; // horizontal = salTrue, otherwise vertical
+ sal_Bool bAuto :1; // for scrolling mode
+ sal_Bool bVisible :1; // show/hide should only set this flag
+ sal_Bool bSizeSet :1; // was the size already set?
+
+ void AutoShow();
+
+ using Window::Hide;
+ using Window::IsVisible;
+
+public:
+
+ void ExtendedShow( sal_Bool bVisible = sal_True );
+ void Hide() { Show( false ); }
+ void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize );
+ sal_Bool IsVisible(sal_Bool bReal) const { return bReal ? ScrollBar::IsVisible() : bVisible; }
+
+ // changing of document size
+ void DocSzChgd(const Size &rNewSize);
+ // changing of visible region
+ void ViewPortChgd(const Rectangle &rRectangle);
+ // what is it??
+ sal_Bool IsHoriScroll() const { return bHori; }
+
+ void SetAuto(sal_Bool bSet);
+ sal_Bool IsAuto() { return bAuto;}
+
+ SwScrollbar(Window *pParent, sal_Bool bHori = sal_True );
+ ~SwScrollbar();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/selglos.hxx b/sw/source/core/uibase/inc/selglos.hxx
new file mode 100644
index 000000000000..734c098fea88
--- /dev/null
+++ b/sw/source/core/uibase/inc/selglos.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SELGLOS_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SELGLOS_HXX
+
+#include <vcl/dialog.hxx>
+
+#include <vcl/lstbox.hxx>
+#include <vcl/fixed.hxx>
+
+#include <vcl/button.hxx>
+
+class SwSelGlossaryDlg : public ModalDialog
+{
+protected:
+ ListBox* m_pGlosBox;
+
+ DECL_LINK(DoubleClickHdl, ListBox*);
+public:
+ SwSelGlossaryDlg(Window * pParent, const OUString &rShortName);
+ void InsertGlos(const OUString &rRegion, const OUString &rGlosName)
+ {
+ const OUString aTmp = rRegion + ":" + rGlosName;
+ m_pGlosBox->InsertEntry(aTmp);
+ }
+ sal_uInt16 GetSelectedIdx() const
+ {
+ return m_pGlosBox->GetSelectEntryPos();
+ }
+ void SelectEntryPos(sal_uInt16 nIdx)
+ {
+ m_pGlosBox->SelectEntryPos(nIdx);
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/sharedconnection.hxx b/sw/source/core/uibase/inc/sharedconnection.hxx
new file mode 100644
index 000000000000..cf279b6e50b3
--- /dev/null
+++ b/sw/source/core/uibase/inc/sharedconnection.hxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SHAREDCONNECTION_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SHAREDCONNECTION_HXX
+
+#include <unotools/sharedunocomponent.hxx>
+#include <com/sun/star/sdbc/XConnection.hpp>
+
+typedef ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XConnection > SharedConnection;
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_SHAREDCONNECTION_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/shdwcrsr.hxx b/sw/source/core/uibase/inc/shdwcrsr.hxx
new file mode 100644
index 000000000000..5fb1d9684162
--- /dev/null
+++ b/sw/source/core/uibase/inc/shdwcrsr.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SHDWCRSR_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SHDWCRSR_HXX
+
+#include <tools/gen.hxx>
+#include <tools/color.hxx>
+#include <limits.h>
+
+class Window;
+
+class SwShadowCursor
+{
+ Window* pWin;
+ Color aCol;
+ Point aOldPt;
+ long nOldHeight;
+ sal_uInt16 nOldMode;
+
+ void DrawTri( const Point& rPt, long nHeight, bool bLeft );
+ void DrawCrsr( const Point& rPt, long nHeight, sal_uInt16 nMode );
+
+public:
+ SwShadowCursor( Window& rWin, const Color& rCol )
+ : pWin( &rWin ), aCol( rCol ), nOldHeight(0), nOldMode( USHRT_MAX ) {}
+ ~SwShadowCursor();
+
+ void SetPos( const Point& rPt, long nHeight, sal_uInt16 nMode );
+
+ void Paint();
+
+ const Point& GetPoint() const { return aOldPt; }
+ long GetHeight() const { return nOldHeight; }
+ sal_uInt16 GetMode() const { return nOldMode; }
+
+ Rectangle GetRect() const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/shells.hrc b/sw/source/core/uibase/inc/shells.hrc
new file mode 100644
index 000000000000..4070dd2c8764
--- /dev/null
+++ b/sw/source/core/uibase/inc/shells.hrc
@@ -0,0 +1,100 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SHELLS_HRC
+#define _SHELLS_HRC
+
+#include "rcid.hrc"
+
+#define STR_GRFILTER_OPENERROR (RC_SHELLS_BEGIN + 1)
+#define STR_GRFILTER_IOERROR (RC_SHELLS_BEGIN + 2)
+#define STR_GRFILTER_FORMATERROR (RC_SHELLS_BEGIN + 3)
+#define STR_GRFILTER_VERSIONERROR (RC_SHELLS_BEGIN + 4)
+#define STR_GRFILTER_FILTERERROR (RC_SHELLS_BEGIN + 5)
+#define STR_GRFILTER_TOOBIG (RC_SHELLS_BEGIN + 6)
+#define STR_INSERT_GRAPHIC (RC_SHELLS_BEGIN + 7)
+#define STR_NO_ADDRESSBOOK (RC_SHELLS_BEGIN + 10)
+#define STR_REDLINE_COMMENT (RC_SHELLS_BEGIN + 11)
+#define STR_REDLINE_INSERTED (RC_SHELLS_BEGIN + 12)
+#define STR_REDLINE_DELETED (RC_SHELLS_BEGIN + 13)
+#define STR_REDLINE_FMTCOLLSET (RC_SHELLS_BEGIN + 14)
+
+#define RID_TEXT_TOOLBOX (RC_SHELLS_BEGIN + 15)
+#define RID_TABLE_TOOLBOX (RC_SHELLS_BEGIN + 16)
+#define RID_FRAME_TOOLBOX (RC_SHELLS_BEGIN + 17)
+#define RID_GRAFIK_TOOLBOX (RC_SHELLS_BEGIN + 18)
+#define RID_DRAW_TOOLBOX (RC_SHELLS_BEGIN + 19)
+#define RID_DRAW_TEXT_TOOLBOX (RC_SHELLS_BEGIN + 20)
+#define RID_NUM_TOOLBOX (RC_SHELLS_BEGIN + 21)
+#define RID_OLE_TOOLBOX (RC_SHELLS_BEGIN + 22)
+#define RID_TOOLS_TOOLBOX (RC_SHELLS_BEGIN + 23)
+
+#define STR_SHELLNAME_TEXT (RC_SHELLS_BEGIN + 24)
+#define STR_SHELLNAME_TABLE (RC_SHELLS_BEGIN + 25)
+#define STR_SHELLNAME_FRAME (RC_SHELLS_BEGIN + 26)
+#define STR_SHELLNAME_GRAPHIC (RC_SHELLS_BEGIN + 27)
+#define STR_SHELLNAME_OBJECT (RC_SHELLS_BEGIN + 28)
+#define STR_SHELLNAME_LIST (RC_SHELLS_BEGIN + 29)
+#define STR_SHELLNAME_DRAW (RC_SHELLS_BEGIN + 30)
+#define STR_SHELLNAME_DRAW_TEXT (RC_SHELLS_BEGIN + 31)
+#define STR_SHELLNAME_MEDIA (RC_SHELLS_BEGIN + 32)
+
+
+#define RID_BEZIER_TOOLBOX (RC_SHELLS_BEGIN + 33)
+#define STR_SHELLNAME_BEZIER (RC_SHELLS_BEGIN + 34)
+
+#define STR_SWBG_PARAGRAPH (RC_SHELLS_BEGIN + 37)
+#define STR_SWBG_GRAPHIC (RC_SHELLS_BEGIN + 38)
+#define STR_SWBG_OLE (RC_SHELLS_BEGIN + 39)
+#define STR_SWBG_FRAME (RC_SHELLS_BEGIN + 40)
+#define STR_SWBG_TABLE (RC_SHELLS_BEGIN + 41)
+#define STR_SWBG_TABLE_ROW (RC_SHELLS_BEGIN + 42)
+#define STR_SWBG_TABLE_CELL (RC_SHELLS_BEGIN + 43)
+#define STR_SWBG_PAGE (RC_SHELLS_BEGIN + 44)
+#define STR_SWBG_HEADER (RC_SHELLS_BEGIN + 45)
+#define STR_SWBG_FOOTER (RC_SHELLS_BEGIN + 46)
+
+#define STR_SHELLNAME_DRAWFORM (RC_SHELLS_BEGIN + 48)
+ // FREE
+
+#define STR_REDLINE_FORMATED (RC_SHELLS_BEGIN + 50)
+#define STR_REDLINE_TABLECHG (RC_SHELLS_BEGIN + 51)
+
+#define STR_REDLINE_TITLE (RC_SHELLS_BEGIN + 52)
+#define STR_REDLINE_MSG (RC_SHELLS_BEGIN + 53)
+#define STR_REDLINE_ACCEPT_ALL (RC_SHELLS_BEGIN + 54)
+#define STR_REDLINE_REJECT_ALL (RC_SHELLS_BEGIN + 55)
+#define STR_REDLINE_EDIT (RC_SHELLS_BEGIN + 56)
+#define STR_REDLINE_AUTOFMT (RC_SHELLS_BEGIN + 57)
+
+#define RID_MODULE_TOOLBOX (RC_SHELLS_BEGIN + 60)
+
+#define RID_MEDIA_TOOLBOX (RC_SHELLS_BEGIN + 61)
+
+#define STR_SHELLNAME_NAVIGATION (RC_SHELLS_BEGIN + 62)
+
+#define SHELLS_ACT_END STR_SHELLNAME_NAVIGATION
+
+#if SHELLS_ACT_END > RC_SHELLS_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/splittbl.hxx b/sw/source/core/uibase/inc/splittbl.hxx
new file mode 100644
index 000000000000..522f1d65cab4
--- /dev/null
+++ b/sw/source/core/uibase/inc/splittbl.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SPLITTBL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SPLITTBL_HXX
+
+#include <svx/stddlg.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
+
+class SwWrtShell;
+
+class SwSplitTblDlg : public SvxStandardDialog
+{
+ RadioButton* mpCntntCopyRB;
+ RadioButton* mpBoxAttrCopyWithParaRB ;
+ RadioButton* mpBoxAttrCopyNoParaRB ;
+ RadioButton* mpBorderCopyRB;
+
+ SwWrtShell &rShell;
+ sal_uInt16 m_nSplit;
+
+protected:
+ virtual void Apply();
+
+public:
+ SwSplitTblDlg( Window *pParent, SwWrtShell &rSh );
+
+ sal_uInt16 GetSplitMode() const { return m_nSplit; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/srcedtw.hxx b/sw/source/core/uibase/inc/srcedtw.hxx
new file mode 100644
index 000000000000..c490dc4d6193
--- /dev/null
+++ b/sw/source/core/uibase/inc/srcedtw.hxx
@@ -0,0 +1,157 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SRCEDTW_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SRCEDTW_HXX
+
+#include <vcl/window.hxx>
+#include <svl/lstner.hxx>
+#include <vcl/timer.hxx>
+
+#include <vcl/xtextedt.hxx>
+#include <set>
+
+namespace com { namespace sun { namespace star { namespace beans {
+ class XMultiPropertySet;
+} } } }
+
+class ScrollBar;
+class SwSrcView;
+class SwSrcEditWindow;
+class TextEngine;
+class ExtTextView;
+class DataChangedEvent;
+
+class TextViewOutWin : public Window
+{
+ ExtTextView* pTextView;
+
+protected:
+ virtual void Paint( const Rectangle& );
+ virtual void KeyInput( const KeyEvent& rKeyEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void DataChanged( const DataChangedEvent& );
+
+public:
+ TextViewOutWin(Window* pParent, WinBits nBits) :
+ Window(pParent, nBits), pTextView(0){}
+
+ void SetTextView( ExtTextView* pView ) {pTextView = pView;}
+
+};
+
+typedef std::set<sal_uInt16> SyntaxLineSet;
+
+class SwSrcEditWindow : public Window, public SfxListener
+{
+private:
+ class ChangesListener;
+ friend class ChangesListener;
+ ExtTextView* pTextView;
+ ExtTextEngine* pTextEngine;
+
+ TextViewOutWin* pOutWin;
+ ScrollBar *pHScrollbar,
+ *pVScrollbar;
+
+ SwSrcView* pSrcView;
+
+ rtl::Reference< ChangesListener > listener_;
+ osl::Mutex mutex_;
+ com::sun::star::uno::Reference< com::sun::star::beans::XMultiPropertySet >
+ notifier_;
+
+ long nCurTextWidth;
+ sal_uInt16 nStartLine;
+ rtl_TextEncoding eSourceEncoding;
+ sal_Bool bReadonly;
+ sal_Bool bDoSyntaxHighlight;
+ sal_Bool bHighlighting;
+
+ Timer aSyntaxIdleTimer;
+ SyntaxLineSet aSyntaxLineTable;
+
+ void ImpDoHighlight( const OUString& rSource, sal_uInt16 nLineOff );
+
+ using OutputDevice::SetFont;
+ void SetFont();
+
+ DECL_LINK( SyntaxTimerHdl, Timer * );
+ DECL_LINK( TimeoutHdl, Timer * );
+
+ using Window::Notify;
+ using Window::Invalidate;
+
+protected:
+
+ virtual void Resize();
+ virtual void DataChanged( const DataChangedEvent& );
+ virtual void GetFocus();
+// virtual void LoseFocus();
+
+ void CreateTextEngine();
+ void DoSyntaxHighlight( sal_uInt16 nPara );
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ DECL_LINK(ScrollHdl, ScrollBar*);
+
+public:
+ SwSrcEditWindow( Window* pParent, SwSrcView* pParentView );
+ ~SwSrcEditWindow();
+
+ void SetScrollBarRanges();
+ void InitScrollBars();
+ void Read(SvStream& rInput) { pTextEngine->Read(rInput); }
+ void Write(SvStream& rOutput) { pTextEngine->Write(rOutput); }
+
+ ExtTextView* GetTextView()
+ {return pTextView;}
+ TextEngine* GetTextEngine()
+ {return pTextEngine;}
+ SwSrcView* GetSrcView() {return pSrcView;}
+
+ TextViewOutWin* GetOutWin() {return pOutWin;}
+
+ virtual void Invalidate( sal_uInt16 nFlags = 0 );
+
+ void ClearModifyFlag()
+ { pTextEngine->SetModified(false); }
+ sal_Bool IsModified() const
+ { return pTextEngine->IsModified();}
+ void CreateScrollbars();
+
+ void SetReadonly(sal_Bool bSet){bReadonly = bSet;}
+ sal_Bool IsReadonly(){return bReadonly;}
+
+ void DoDelayedSyntaxHighlight( sal_uInt16 nPara );
+
+ void SetStartLine(sal_uInt16 nLine){nStartLine = nLine;}
+
+ virtual void Command( const CommandEvent& rCEvt );
+ void HandleWheelCommand( const CommandEvent& rCEvt );
+
+ void SetTextEncoding(rtl_TextEncoding eEncoding);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/srcview.hxx b/sw/source/core/uibase/inc/srcview.hxx
new file mode 100644
index 000000000000..ba91f8732278
--- /dev/null
+++ b/sw/source/core/uibase/inc/srcview.hxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SRCVIEW_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SRCVIEW_HXX
+
+#include <sfx2/viewfac.hxx>
+#include <sfx2/viewsh.hxx>
+#include <vcl/outdev.hxx>
+
+#include "srcedtw.hxx"
+#include "shellid.hxx"
+
+class SwDocShell;
+class SvxSearchItem;
+class SfxMedium;
+
+class SwSrcView: public SfxViewShell
+{
+ SwSrcEditWindow aEditWin;
+
+ SvxSearchItem* pSearchItem;
+
+ sal_Bool bSourceSaved :1;
+ rtl_TextEncoding eLoadEncoding;
+ void Init();
+
+ // for read-only switching
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+protected:
+ sal_uInt16 StartSearchAndReplace(const SvxSearchItem& rItem,
+ sal_Bool bFromStart,
+ sal_Bool bApi,
+ sal_Bool bRecursive = sal_False);
+
+public:
+
+ SFX_DECL_VIEWFACTORY(SwSrcView);
+ SFX_DECL_INTERFACE(SW_SRC_VIEWSHELL)
+ TYPEINFO();
+
+ SwSrcView(SfxViewFrame* pFrame, SfxViewShell*);
+
+ ~SwSrcView();
+
+ SwDocShell* GetDocShell();
+ SwSrcEditWindow& GetEditWin() {return aEditWin;}
+ void SaveContent(const OUString& rTmpFile);
+ void SaveContentTo(SfxMedium& rMed);
+
+ sal_Bool IsModified() {return aEditWin.IsModified();}
+
+ void Execute(SfxRequest&);
+ void GetState(SfxItemSet&);
+
+ SvxSearchItem* GetSearchItem();
+ void SetSearchItem( const SvxSearchItem& rItem );
+
+ void Load(SwDocShell* pDocShell);
+
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNew, sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false );
+ virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
+
+ sal_Int32 PrintSource( OutputDevice *pOutDev, sal_Int32 nPage, bool bCalcNumPagesOnly );
+
+ void SourceSaved() {bSourceSaved = sal_True;}
+ sal_Bool HasSourceSaved() const {return bSourceSaved;}
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/srtdlg.hxx b/sw/source/core/uibase/inc/srtdlg.hxx
new file mode 100644
index 000000000000..90fc60ab165a
--- /dev/null
+++ b/sw/source/core/uibase/inc/srtdlg.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SRTDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SRTDLG_HXX
+
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
+#include <vcl/field.hxx>
+#include <vcl/lstbox.hxx>
+#include <svx/stddlg.hxx>
+#include <svx/langbox.hxx>
+
+class SwWrtShell;
+class CollatorResource;
+
+class SwSortDlg : public SvxStandardDialog
+{
+ FixedText* m_pColLbl;
+ FixedText* m_pTypLbl;
+
+ CheckBox* m_pKeyCB1;
+ NumericField* m_pColEdt1;
+ ListBox* m_pTypDLB1;
+ RadioButton* m_pSortUp1RB;
+ RadioButton* m_pSortDn1RB;
+
+ CheckBox* m_pKeyCB2;
+ NumericField* m_pColEdt2;
+ ListBox* m_pTypDLB2;
+ RadioButton* m_pSortUp2RB;
+ RadioButton* m_pSortDn2RB;
+
+ CheckBox* m_pKeyCB3;
+ NumericField* m_pColEdt3;
+ ListBox* m_pTypDLB3;
+ RadioButton* m_pSortUp3RB;
+ RadioButton* m_pSortDn3RB;
+
+ RadioButton* m_pColumnRB;
+ RadioButton* m_pRowRB;
+
+ RadioButton* m_pDelimTabRB;
+ RadioButton* m_pDelimFreeRB;
+ Edit* m_pDelimEdt;
+ PushButton* m_pDelimPB;
+
+ SvxLanguageBox* m_pLangLB;
+
+ CheckBox* m_pCaseCB;
+
+ OUString aColTxt;
+ OUString aRowTxt;
+ OUString aNumericTxt;
+
+ SwWrtShell &rSh;
+ CollatorResource* pColRes;
+
+ sal_uInt16 nX;
+ sal_uInt16 nY;
+
+ virtual void Apply();
+ sal_Unicode GetDelimChar() const;
+
+ DECL_LINK( CheckHdl, CheckBox * );
+ DECL_LINK( DelimHdl, RadioButton* );
+ DECL_LINK( LanguageHdl, ListBox* );
+ DECL_LINK(DelimCharHdl, void *);
+
+public:
+ SwSortDlg(Window * pParent, SwWrtShell &rSh);
+ ~SwSortDlg();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/stmenu.hxx b/sw/source/core/uibase/inc/stmenu.hxx
new file mode 100644
index 000000000000..4d7737142370
--- /dev/null
+++ b/sw/source/core/uibase/inc/stmenu.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+// SMARTTAGS
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_STMENU_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_STMENU_HXX
+
+#include <vcl/menu.hxx>
+
+#include <vector>
+#include <com/sun/star/smarttags/XSmartTagAction.hpp>
+
+#include <com/sun/star/container/XStringKeyMap.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+
+class SwView;
+
+/** Class: SwSmartTagPopup
+
+ This class contains the implementation of the smarttag popup
+ menu that is opened if a user clicks on an underlined word.
+
+ The menu is built in the constructor and the actions for each
+ menu entry are invoked in the excute-method.
+*/
+
+class SwSmartTagPopup : public PopupMenu
+{
+ SwView* mpSwView;
+ com::sun::star::uno::Reference< com::sun::star::text::XTextRange > mxTextRange;
+
+ struct InvokeAction
+ {
+ com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > mxAction;
+ com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > mxSmartTagProperties;
+ sal_uInt32 mnActionID;
+ InvokeAction( com::sun::star::uno::Reference< com::sun::star::smarttags::XSmartTagAction > xAction,
+ com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xSmartTagProperties,
+ sal_uInt32 nActionID ) : mxAction( xAction ), mxSmartTagProperties( xSmartTagProperties ), mnActionID( nActionID ) {}
+ };
+
+ std::vector< InvokeAction > maInvokeActions;
+
+ using PopupMenu::Execute;
+
+public:
+ SwSmartTagPopup( SwView* _pSwView,
+ ::com::sun::star::uno::Sequence< 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 > xTextRange );
+
+ sal_uInt16 Execute( const Rectangle& rPopupPos, Window* pWin );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swcont.hxx b/sw/source/core/uibase/inc/swcont.hxx
new file mode 100644
index 000000000000..4c9294907b79
--- /dev/null
+++ b/sw/source/core/uibase/inc/swcont.hxx
@@ -0,0 +1,99 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWCONT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWCONT_HXX
+
+#include <rtl/ustring.hxx>
+
+class SwContentType;
+
+// synchronize order and number with ResIds!!
+#define CONTENT_TYPE_OUTLINE 0
+#define CONTENT_TYPE_TABLE 1
+#define CONTENT_TYPE_FRAME 2
+#define CONTENT_TYPE_GRAPHIC 3
+#define CONTENT_TYPE_OLE 4
+#define CONTENT_TYPE_BOOKMARK 5
+#define CONTENT_TYPE_REGION 6
+#define CONTENT_TYPE_URLFIELD 7
+#define CONTENT_TYPE_REFERENCE 8
+#define CONTENT_TYPE_INDEX 9
+#define CONTENT_TYPE_POSTIT 10
+#define CONTENT_TYPE_DRAWOBJECT 11
+#define CONTENT_TYPE_MAX CONTENT_TYPE_DRAWOBJECT +1
+
+// types for global document
+#define GLOBAL_CONTENT_TEXT 102
+
+// strings for context menus
+#define CONTEXT_COUNT 12
+#define GLOBAL_CONTEXT_COUNT 14
+
+// modes for Drag 'n Drop
+#define REGION_MODE_NONE 0
+#define REGION_MODE_LINK 1
+#define REGION_MODE_EMBEDDED 2
+
+//mini rtti
+class SwTypeNumber
+{
+ sal_uInt8 nTypeId;
+
+ public:
+ SwTypeNumber(sal_uInt8 nId) :nTypeId(nId){}
+ virtual ~SwTypeNumber();
+
+ sal_uInt8 GetTypeId() const;
+};
+
+class SwContent : public SwTypeNumber
+{
+ const SwContentType* pParent;
+ OUString sContentName;
+ long nYPosition;
+ sal_Bool bInvisible;
+public:
+ SwContent(const SwContentType* pCnt, const OUString& rName, long nYPos );
+
+ virtual sal_Bool IsProtect() const;
+ const SwContentType* GetParent() const {return pParent;}
+ const OUString& GetName() const {return sContentName;}
+ int operator==(const SwContent& /*rCont*/) const
+ {
+ // they're never equal, otherwise they'd fall out of the array
+ return sal_False;
+ }
+ bool operator<(const SwContent& rCont) const
+ {
+ // at first sort by position and then by name
+ return nYPosition != rCont.nYPosition ?
+ nYPosition < rCont.nYPosition :
+ sContentName < rCont.sContentName;
+ }
+
+ long GetYPos() const {return nYPosition;}
+
+ sal_Bool IsInvisible() const {return bInvisible;}
+ void SetInvisible(){ bInvisible = sal_True;}
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swdtflvr.hxx b/sw/source/core/uibase/inc/swdtflvr.hxx
new file mode 100644
index 000000000000..d68a9daac07a
--- /dev/null
+++ b/sw/source/core/uibase/inc/swdtflvr.hxx
@@ -0,0 +1,213 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWDTFLVR_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWDTFLVR_HXX
+
+#include <sfx2/objsh.hxx>
+
+#include <svtools/transfer.hxx>
+#include <vcl/graph.hxx>
+#include <sfx2/lnkbase.hxx>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+
+class Graphic;
+class ImageMap;
+class INetBookmark;
+class INetImage;
+class SwDoc;
+class SwDocFac;
+class SwTextBlocks;
+class SwWrtShell;
+class SvxClipboardFmtItem;
+class SwViewShell;
+class SwView_Impl;
+
+typedef sal_uInt16 TransferBufferType;
+namespace nsTransferBufferType
+{
+ const sal_uInt16 TRNSFR_NONE = 0x0000;
+ const sal_uInt16 TRNSFR_DOCUMENT = 0x0001;
+ const sal_uInt16 TRNSFR_DOCUMENT_WORD = 0x0002;
+ const sal_uInt16 TRNSFR_GRAPHIC = 0x0004;
+ const sal_uInt16 TRNSFR_TABELLE = 0x0008;
+ const sal_uInt16 TRNSFR_DDELINK = 0x0010;
+ const sal_uInt16 TRNSFR_OLE = 0x0020;
+ const sal_uInt16 TRNSFR_INETFLD = 0x0040;
+ const sal_uInt16 TRNSFR_DRAWING = 0x0081; // drawing is internal too!
+}
+
+class SW_DLLPUBLIC SwTransferable : public TransferableHelper
+{
+ friend class SwView_Impl;
+ SfxObjectShellLock aDocShellRef;
+ TransferableDataHelper aOleData;
+ TransferableObjectDescriptor aObjDesc;
+ ::sfx2::SvBaseLinkRef refDdeLink;
+
+ SwWrtShell *pWrtShell;
+ /* #96392# Added pCreatorView to distinguish SwFrameShell from
+ SwWrtShell. */
+ const SwViewShell *pCreatorView;
+ SwDocFac *pClpDocFac;
+ Graphic *pClpGraphic, *pClpBitmap, *pOrigGrf;
+ INetBookmark *pBkmk; // URL and description!
+ ImageMap *pImageMap;
+ INetImage *pTargetURL;
+
+ TransferBufferType eBufferType;
+
+ sal_Bool bOldIdle :1; //D&D Idle flag from the viewsettings
+ sal_Bool bCleanUp :1; //D&D cleanup after Drop (not by internal Drop)
+
+ // helper methods for the copy
+ css::uno::Reference < css::embed::XEmbeddedObject > FindOLEObj( sal_Int64& nAspect ) const;
+ const Graphic* FindOLEReplacementGraphic() const;
+ void DeleteSelection();
+
+ // helper methods for the paste
+ static SwTransferable* GetSwTransferable( const TransferableDataHelper& rData );
+ static void SetSelInShell( SwWrtShell& , sal_Bool , const Point* );
+ static sal_Bool _CheckForURLOrLNKFile( TransferableDataHelper& rData,
+ OUString& rFileName, OUString* pTitle = 0 );
+ static bool _TestAllowedFormat( const TransferableDataHelper& rData,
+ sal_uLong nFormat, sal_uInt16 nDestination );
+
+ static bool _PasteFileContent( TransferableDataHelper&,
+ SwWrtShell& rSh, sal_uLong nFmt, sal_Bool bMsg );
+ static bool _PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
+ sal_uLong nFmt, sal_uInt8 nActionFlags, sal_Bool bMsg );
+ static bool _PasteTargetURL( TransferableDataHelper& rData, SwWrtShell& rSh,
+ sal_uInt16 nAction, const Point* pPt, sal_Bool bInsertGRF );
+
+ static bool _PasteDDE( TransferableDataHelper& rData, SwWrtShell& rWrtShell,
+ sal_Bool bReReadGrf, sal_Bool bMsg );
+
+ static bool _PasteSdrFormat( TransferableDataHelper& rData,
+ SwWrtShell& rSh, sal_uInt16 nAction,
+ const Point* pPt, sal_uInt8 nActionFlags, bool bNeedToSelectBeforePaste);
+
+ static bool _PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
+ sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt,
+ sal_uInt8 nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste);
+
+ static bool _PasteImageMap( TransferableDataHelper& rData,
+ SwWrtShell& rSh );
+
+ static bool _PasteAsHyperlink( TransferableDataHelper& rData,
+ SwWrtShell& rSh, sal_uLong nFmt );
+
+ static bool _PasteFileName( TransferableDataHelper& rData,
+ SwWrtShell& rSh, sal_uLong nFmt, sal_uInt16 nAction,
+ const Point* pPt, sal_uInt8 nActionFlags, sal_Bool bMsg, bool * graphicInserted );
+
+ static bool _PasteDBData( TransferableDataHelper& rData, SwWrtShell& rSh,
+ sal_uLong nFmt, sal_Bool bLink, const Point* pDragPt,
+ sal_Bool bMsg );
+
+ static bool _PasteFileList( TransferableDataHelper& rData,
+ SwWrtShell& rSh, sal_Bool bLink,
+ const Point* pPt, sal_Bool bMsg );
+
+ bool PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, sal_Bool bMove,
+ sal_Bool bIsXSelection );
+ bool PrivatePaste( SwWrtShell& rShell );
+
+ void SetDataForDragAndDrop( const Point& rSttPos );
+
+ // not available
+ SwTransferable();
+ SwTransferable( const SwTransferable& );
+ SwTransferable& operator=( const SwTransferable& );
+
+protected:
+ virtual void AddSupportedFormats();
+ virtual sal_Bool GetData( const css::datatransfer::DataFlavor& rFlavor );
+ virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm,
+ void* pUserObject,
+ sal_uInt32 nUserObjectId,
+ const css::datatransfer::DataFlavor& rFlavor );
+ virtual void DragFinished( sal_Int8 nDropAction );
+ virtual void ObjectReleased();
+
+ using TransferableHelper::StartDrag;
+
+public:
+ SwTransferable( SwWrtShell& );
+ virtual ~SwTransferable();
+
+ static sal_uInt16 GetSotDestination( const SwWrtShell& rSh, const Point* = 0 );
+
+ // set properties on the document, like PageMargin, VisArea.
+ // And set real Size
+ static void InitOle( SfxObjectShell* pDoc, SwDoc& rDoc );
+
+ // copy - methods and helper methods for the copy
+ int Cut();
+ int Copy( sal_Bool bIsCut = sal_False );
+ int PrepareForCopy( sal_Bool bIsCut = sal_False );
+ int CalculateAndCopy(); // special for Calculator
+ int CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr );
+
+ // remove the DDE-Link format promise
+ void RemoveDDELinkFormat( const Window& rWin );
+
+ // paste - methods and helper methods for the paste
+ static sal_Bool IsPaste( const SwWrtShell&, const TransferableDataHelper& );
+ static bool Paste( SwWrtShell&, TransferableDataHelper& );
+ static bool PasteData( TransferableDataHelper& rData,
+ SwWrtShell& rSh, sal_uInt16 nAction, sal_uLong nFormat,
+ sal_uInt16 nDestination, sal_Bool bIsPasteFmt,
+ sal_Bool bIsDefault,
+ const Point* pDDPos = 0, sal_Int8 nDropAction = 0,
+ sal_Bool bPasteSelection = sal_False );
+
+ static sal_Bool IsPasteSpecial( const SwWrtShell& rWrtShell,
+ const TransferableDataHelper& );
+ static bool PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& );
+ static bool PasteSpecial( SwWrtShell& rSh, TransferableDataHelper&, sal_uLong& rFormatUsed );
+ static bool PasteFormat( SwWrtShell& rSh, TransferableDataHelper& rData,
+ sal_uLong nFormat );
+
+ static void FillClipFmtItem( const SwWrtShell& rSh,
+ const TransferableDataHelper& rData,
+ SvxClipboardFmtItem & rToFill );
+
+ // Interfaces for Drag & Drop
+ void StartDrag( Window* pWin, const Point& rPos );
+
+ SwWrtShell* GetShell() { return pWrtShell; }
+ void SetCleanUp( sal_Bool bFlag ) { bCleanUp = bFlag; }
+
+ // Interfaces for Selection
+ /* #96392# Added pCreator to distinguish SwFrameShell from SwWrtShell. */
+ static void CreateSelection( SwWrtShell & rSh,
+ const SwViewShell * pCreator = NULL );
+ static void ClearSelection( SwWrtShell& rSh,
+ const SwViewShell * pCreator = NULL );
+
+ // the related SwView is being closed and the SwTransferable is invalid now
+ void Invalidate() {pWrtShell = 0;}
+ static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+
+ virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) throw( css::uno::RuntimeException, std::exception );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swlbox.hxx b/sw/source/core/uibase/inc/swlbox.hxx
new file mode 100644
index 000000000000..49ac2b096892
--- /dev/null
+++ b/sw/source/core/uibase/inc/swlbox.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWLBOX_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWLBOX_HXX
+
+#include <vcl/lstbox.hxx>
+#include <vcl/combobox.hxx>
+#include "swdllapi.h"
+#include <boost/ptr_container/ptr_vector.hpp>
+
+class SwBoxEntry;
+class Window;
+
+typedef boost::ptr_vector<SwBoxEntry> SwEntryLst;
+
+/*--------------------------------------------------------------------
+ Description: SwBoxEntry
+ --------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwBoxEntry
+{
+ friend class SwComboBox;
+
+ sal_Bool bModified : 1;
+ sal_Bool bNew : 1;
+
+ OUString aName;
+ sal_Int32 nId;
+
+public:
+ SwBoxEntry(const OUString& aName, sal_Int32 nId=0);
+ SwBoxEntry(const SwBoxEntry& rOrg);
+ SwBoxEntry();
+
+ const OUString& GetName() const { return aName;}
+};
+
+/*--------------------------------------------------------------------
+ Description: for combo boxes
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC SwComboBox : public ComboBox
+{
+ SwEntryLst aEntryLst;
+ SwEntryLst aDelEntryLst;
+ SwBoxEntry aDefault;
+
+ SAL_DLLPRIVATE void InitComboBox();
+ SAL_DLLPRIVATE void InsertSorted(SwBoxEntry* pEntry);
+ SAL_DLLPRIVATE void Init();
+
+public:
+
+ SwComboBox(Window* pParent, WinBits nStyle);
+ ~SwComboBox();
+
+ void InsertSwEntry(const SwBoxEntry&);
+ virtual sal_Int32 InsertEntry(const OUString& rStr, sal_Int32 = 0) SAL_OVERRIDE;
+
+ virtual void RemoveEntryAt(sal_Int32 nPos) SAL_OVERRIDE;
+
+ sal_Int32 GetSwEntryPos(const SwBoxEntry& rEntry) const;
+ const SwBoxEntry& GetSwEntry(sal_Int32) const;
+
+ sal_Int32 GetRemovedCount() const;
+ const SwBoxEntry& GetRemovedEntry(sal_Int32 nPos) const;
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_SWLBOX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swmessdialog.hxx b/sw/source/core/uibase/inc/swmessdialog.hxx
new file mode 100644
index 000000000000..1937e3723058
--- /dev/null
+++ b/sw/source/core/uibase/inc/swmessdialog.hxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <vcl/dialog.hxx>
+
+class Edit;
+class FixedImage;
+class OKButton;
+class VclMultiLineEdit;
+
+class SwMessageAndEditDialog : public ModalDialog
+{
+protected:
+ OKButton* m_pOKPB;
+ FixedImage* m_pImageIM;
+ VclMultiLineEdit* m_pPrimaryMessage;
+ VclMultiLineEdit* m_pSecondaryMessage;
+ Edit* m_pEdit;
+public:
+ SwMessageAndEditDialog(Window* pParent, const OString& rID,
+ const OUString& rUIXMLDescription);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swmodalredlineacceptdlg.hxx b/sw/source/core/uibase/inc/swmodalredlineacceptdlg.hxx
new file mode 100644
index 000000000000..8c38330b83d8
--- /dev/null
+++ b/sw/source/core/uibase/inc/swmodalredlineacceptdlg.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWMODALREDLINEACCEPTDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWMODALREDLINEACCEPTDLG_HXX
+#include "chldwrap.hxx"
+#include <sfx2/basedlgs.hxx>
+
+class SwRedlineAcceptDlg;
+
+class SwModalRedlineAcceptDlg : public SfxModalDialog
+{
+ SwRedlineAcceptDlg* pImplDlg;
+
+public:
+ SwModalRedlineAcceptDlg(Window *pParent);
+ ~SwModalRedlineAcceptDlg();
+
+ void AcceptAll( sal_Bool bAccept );
+ virtual void Activate();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swrenamexnameddlg.hxx b/sw/source/core/uibase/inc/swrenamexnameddlg.hxx
new file mode 100644
index 000000000000..1dfc4f2597a4
--- /dev/null
+++ b/sw/source/core/uibase/inc/swrenamexnameddlg.hxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWRENAMEXNAMEDDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWRENAMEXNAMEDDLG_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/button.hxx>
+#include <actctrl.hxx>
+#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>
+
+class SwRenameXNamedDlg : public ModalDialog
+{
+ NoSpaceEdit* m_pNewNameED;
+ OKButton* m_pOk;
+
+ OUString m_sRemoveWarning;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xSecondAccess;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xThirdAccess;
+
+ DECL_LINK(OkHdl, void *);
+ DECL_LINK(ModifyHdl, NoSpaceEdit*);
+
+public:
+ SwRenameXNamedDlg( Window* pParent,
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > & xNamed,
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xNameAccess );
+
+ void SetForbiddenChars(const OUString& rSet)
+ {
+ m_pNewNameED->SetForbiddenChars(rSet);
+ }
+
+ void SetAlternativeAccess(
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xSecond,
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xThird )
+ {
+ xSecondAccess = xSecond;
+ xThirdAccess = xThird;
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swruler.hxx b/sw/source/core/uibase/inc/swruler.hxx
new file mode 100644
index 000000000000..aebf0b97396d
--- /dev/null
+++ b/sw/source/core/uibase/inc/swruler.hxx
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWRULER_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWRULER_HXX
+
+#include <svx/ruler.hxx>
+
+class SwViewShell;
+class View;
+class Window;
+class SwEditWin;
+
+/**
+ * An horizontal ruler with a control for comment panel visibility fo Writer.
+ *
+ * The comment control only appears when the document has comments already.
+ */
+class SwCommentRuler
+ : public SvxRuler
+{
+public:
+ SwCommentRuler (
+ SwViewShell* pViewSh,
+ Window* pParent,
+ SwEditWin* pWin,
+ sal_uInt16 nRulerFlags,
+ SfxBindings& rBindings,
+ WinBits nWinStyle);
+ virtual ~SwCommentRuler ();
+
+ /**
+ * Paint the ruler.
+ * \param rRect ignored
+ */
+ virtual void Paint( const Rectangle& rRect );
+
+protected:
+ SwViewShell * mpViewShell; //< Shell to check if there is any comments on doc and their visibility
+ SwEditWin * mpSwWin; //< Used to get SwView to change the SideBar visibility
+ bool mbIsHighlighted; //< If comment control is highlighted (mouse is over it)
+ Timer maFadeTimer; //< Timer for high/'low'light fading
+ int mnFadeRate; //< From 0 to 100. 0 means not highlighted.
+ VirtualDevice maVirDev; //< VirtualDevice of this window. Just for convenience.
+
+ /**
+ * Callback function to handle a mouse button down event.
+ *
+ * When on comment control, it toggles the comment panel visibility.
+ */
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ /**
+ * Callback function to handle a mouse move event.
+ *
+ * When on comment control, it let the control responsive by highlighting.
+ */
+ virtual void MouseMove(const MouseEvent& rMEvt);
+ /**
+ * Callback function to handle a context menu call (mouse right button click).
+ *
+ * When on comment control, it does not do anything.
+ */
+ virtual void Command( const CommandEvent& rCEvt );
+ /**
+ * Update the view.
+ *
+ * Update the ruler appearance according to the document view and
+ * current cursor position.
+ */
+ virtual void Update();
+
+ /**
+ * Get the rectangle area that should be used to draw the comment control.
+ *
+ * It is horizontally aligned to the SideBar panel.
+ * \return The area where the comment control is.
+ */
+ Rectangle GetCommentControlRegion();
+
+ /**
+ * Paint the comment control on VirtualDevice.
+ */
+ void DrawCommentControl();
+ /**
+ * Draw a little horizontal arrow tip on VirtualDevice.
+ * \param nX left coordinate of arrow
+ * \param nY top coordinate of arrow
+ * \param Color arrow color
+ * \param bPointRight if arrow should point to right. Otherwise, it will point left.
+ */
+ void ImplDrawArrow(long nX, long nY, const Color& rColor, bool bPointRight);
+
+ /**
+ * Update the tooltip text.
+ */
+ void UpdateCommentHelpText();
+
+ /**
+ * Get the proper color between two options, according to current status.
+ *
+ * The return color can be one of the given colors, or a merged one.
+ * It depends on highlight fadind status.
+ *
+ * \param rHighColor color used to highlight status
+ * \param rLowColor color used to normal status
+ * \return The proper color to used in moment
+ */
+ Color GetFadedColor(const Color &rHighColor, const Color &rLowColor);
+
+ /// Fade timer callback.
+ DECL_LINK(FadeHandler, void *);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swtablerep.hxx b/sw/source/core/uibase/inc/swtablerep.hxx
new file mode 100644
index 000000000000..7f92bc0bc26b
--- /dev/null
+++ b/sw/source/core/uibase/inc/swtablerep.hxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWTABLEREP_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWTABLEREP_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include "swdllapi.h"
+#include "swtypes.hxx"
+
+class SwTabCols;
+struct TColumn;
+class SW_DLLPUBLIC SwTableRep
+{
+ TColumn* pTColumns;
+
+ SwTwips nTblWidth;
+ SwTwips nSpace;
+ SwTwips nLeftSpace;
+ SwTwips nRightSpace;
+ sal_uInt16 nAlign;
+ sal_uInt16 nColCount;
+ sal_uInt16 nAllCols;
+ sal_uInt16 nWidthPercent;
+ sal_Bool bLineSelected : 1;
+ sal_Bool bWidthChanged : 1;
+ sal_Bool bColsChanged : 1;
+
+public:
+ SwTableRep( const SwTabCols& rTabCol );
+ ~SwTableRep();
+
+ sal_Bool FillTabCols( SwTabCols& rTabCol ) const;
+
+ SwTwips GetLeftSpace() const {return nLeftSpace;}
+ void SetLeftSpace(SwTwips nSet) {nLeftSpace = nSet;}
+
+ SwTwips GetRightSpace() const {return nRightSpace;}
+ void SetRightSpace(SwTwips nSet) {nRightSpace = nSet;}
+
+ SwTwips GetWidth() const {return nTblWidth;}
+ void SetWidth(SwTwips nSet) {nTblWidth = nSet;}
+
+ sal_uInt16 GetWidthPercent() const {return nWidthPercent;}
+ void SetWidthPercent(sal_uInt16 nSet) {nWidthPercent = nSet;}
+
+ sal_uInt16 GetAlign() const {return nAlign;}
+ void SetAlign(sal_uInt16 nSet) {nAlign = nSet;}
+
+ sal_uInt16 GetColCount() const {return nColCount;}
+ sal_uInt16 GetAllColCount() const {return nAllCols;}
+
+ sal_Bool HasColsChanged() const {return bColsChanged;}
+ void SetColsChanged() {bColsChanged = sal_True;}
+
+ sal_Bool HasWidthChanged() const {return bWidthChanged;}
+ void SetWidthChanged() {bWidthChanged = sal_True;}
+
+ sal_Bool IsLineSelected() const {return bLineSelected;}
+ void SetLineSelected(sal_Bool bSet) {bLineSelected = bSet;}
+
+ SwTwips GetSpace() const { return nSpace;}
+ void SetSpace(SwTwips nSet) {nSpace = nSet;}
+
+ TColumn* GetColumns() const {return pTColumns;}
+};
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swuiccoll.hxx b/sw/source/core/uibase/inc/swuiccoll.hxx
new file mode 100644
index 000000000000..d63d7ee99243
--- /dev/null
+++ b/sw/source/core/uibase/inc/swuiccoll.hxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWUICCOLL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWUICCOLL_HXX
+
+#include <tools/resary.hxx>
+
+class SwWrtShell;
+class SwFmt;
+
+class SwCondCollPage : public SfxTabPage
+{
+ CheckBox* m_pConditionCB;
+
+ FixedText* m_pContextFT;
+ FixedText* m_pUsedFT;
+ SvTabListBox* m_pTbLinks;
+
+ FixedText* m_pStyleFT;
+ ListBox* m_pStyleLB;
+ ListBox* m_pFilterLB;
+
+ PushButton* m_pRemovePB;
+ PushButton* m_pAssignPB;
+
+ std::vector<OUString> m_aStrArr;
+
+ SwWrtShell &rSh;
+ const CommandStruct*pCmds;
+ SwFmt* pFmt;
+
+ sal_Bool bNewTemplate;
+
+ SwCondCollPage(Window *pParent, const SfxItemSet &rSet);
+ virtual ~SwCondCollPage();
+
+ virtual int DeactivatePage(SfxItemSet *pSet);
+
+ DECL_LINK( OnOffHdl, CheckBox* );
+ DECL_LINK( AssignRemoveHdl, PushButton*);
+ DECL_LINK( SelectHdl, ListBox* );
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+
+ static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
+ static sal_uInt16* GetRanges();
+
+ virtual sal_Bool FillItemSet( SfxItemSet &rSet);
+ virtual void Reset (const SfxItemSet &rSet);
+
+ void SetCollection( SwFmt* pFormat, sal_Bool bNew );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swuicnttab.hxx b/sw/source/core/uibase/inc/swuicnttab.hxx
new file mode 100644
index 000000000000..1986936f86f3
--- /dev/null
+++ b/sw/source/core/uibase/inc/swuicnttab.hxx
@@ -0,0 +1,497 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWUICNTTAB_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWUICNTTAB_HXX
+
+#include <svx/stddlg.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/edit.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/field.hxx>
+#include <vcl/lstbox.hxx>
+#include <sfx2/tabdlg.hxx>
+
+#include "tox.hxx"
+#include <toxmgr.hxx>
+#include <svx/checklbx.hxx>
+#include <svtools/treelistbox.hxx>
+#include <vcl/menubtn.hxx>
+#include <svx/langbox.hxx>
+#include <cnttab.hxx>
+#include <vector>
+
+class SwWrtShell;
+class SwTOXMgr;
+namespace com{namespace sun{namespace star{
+ namespace text{
+ class XTextSection;
+ class XDocumentIndex;
+ }
+}}}
+
+struct SwIndexSections_Impl
+{
+ com::sun::star::uno::Reference< com::sun::star::text::XTextSection > xContainerSection;
+ com::sun::star::uno::Reference< com::sun::star::text::XDocumentIndex > xDocumentIndex;
+};
+
+class SwOneExampleFrame;
+
+struct SwIndexSections_Impl;
+
+class SwMultiTOXTabDialog : public SfxTabDialog
+{
+ Window* m_pExampleContainerWIN;
+ CheckBox* m_pShowExampleCB;
+ SwTOXMgr* pMgr;
+ SwWrtShell& rSh;
+
+ sal_uInt16 m_nSelectId;
+ sal_uInt16 m_nStylesId;
+ sal_uInt16 m_nColumnId;
+ sal_uInt16 m_nBackGroundId;
+ sal_uInt16 m_nEntriesId;
+
+ SwOneExampleFrame* pExampleFrame;
+
+ SwTOXDescription** pDescArr;
+ SwForm** pFormArr;
+ SwIndexSections_Impl** pxIndexSectionsArr;
+
+ SwTOXBase* pParamTOXBase;
+
+ CurTOXType eCurrentTOXType;
+
+ OUString sUserDefinedIndex;
+ sal_uInt16 nTypeCount;
+ sal_uInt16 nInitialTOXType;
+
+ sal_Bool bEditTOX;
+ sal_Bool bExampleCreated;
+ sal_Bool bGlobalFlag;
+
+ virtual short Ok();
+ SwTOXDescription* CreateTOXDescFromTOXBase(const SwTOXBase*pCurTOX);
+
+ DECL_LINK(CreateExample_Hdl, void*);
+ DECL_LINK(ShowPreviewHdl, void*);
+
+public:
+ SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet,
+ SwWrtShell &rShell,
+ SwTOXBase* pCurTOX, sal_uInt16 nToxType = USHRT_MAX,
+ sal_Bool bGlobal = sal_False);
+ ~SwMultiTOXTabDialog();
+
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
+
+ SwForm* GetForm(CurTOXType eType);
+
+ CurTOXType GetCurrentTOXType() const { return eCurrentTOXType;}
+ void SetCurrentTOXType(CurTOXType eSet)
+ {
+ eCurrentTOXType = eSet;
+ }
+
+ void UpdateExample();
+ sal_Bool IsTOXEditMode() const { return bEditTOX;}
+
+ SwWrtShell& GetWrtShell() {return rSh;}
+
+ SwTOXDescription& GetTOXDescription(CurTOXType eTOXTypes);
+ void CreateOrUpdateExample(
+ TOXTypes nTOXIndex, sal_uInt16 nPage = 0, sal_uInt16 nCurLevel = USHRT_MAX);
+
+ static sal_Bool IsNoNum(SwWrtShell& rSh, const OUString& rName);
+};
+
+class IndexEntryResource;
+class IndexEntrySupplierWrapper;
+
+class SwTOXSelectTabPage : public SfxTabPage
+{
+ Edit* m_pTitleED;
+ FixedText* m_pTypeFT;
+ ListBox* m_pTypeLB;
+ CheckBox* m_pReadOnlyCB;
+
+ VclContainer* m_pAreaFrame;
+ ListBox* m_pAreaLB;
+ FixedText* m_pLevelFT; //content, user
+ NumericField* m_pLevelNF; //content, user
+
+ //content
+ VclContainer* m_pCreateFrame; // content, user, illustration
+ CheckBox* m_pFromHeadingsCB;
+ CheckBox* m_pAddStylesCB;
+ PushButton* m_pAddStylesPB;
+ //user
+ CheckBox* m_pFromTablesCB;
+ CheckBox* m_pFromFramesCB;
+ CheckBox* m_pFromGraphicsCB;
+ CheckBox* m_pFromOLECB;
+ CheckBox* m_pLevelFromChapterCB;
+
+ //illustration + table
+ RadioButton* m_pFromCaptionsRB;
+ RadioButton* m_pFromObjectNamesRB;
+
+ //illustration and tables
+ FixedText* m_pCaptionSequenceFT;
+ ListBox* m_pCaptionSequenceLB;
+ FixedText* m_pDisplayTypeFT;
+ ListBox* m_pDisplayTypeLB;
+
+ //all but illustration and table
+ CheckBox* m_pTOXMarksCB;
+
+ //index only
+ VclContainer* m_pIdxOptionsFrame;
+ CheckBox* m_pCollectSameCB;
+ CheckBox* m_pUseFFCB;
+ CheckBox* m_pUseDashCB;
+ CheckBox* m_pCaseSensitiveCB;
+ CheckBox* m_pInitialCapsCB;
+ CheckBox* m_pKeyAsEntryCB;
+ CheckBox* m_pFromFileCB;
+ MenuButton* m_pAutoMarkPB;
+
+ // object only
+ SwOLENames aFromNames;
+ SvxCheckListBox* m_pFromObjCLB;
+ VclContainer* m_pFromObjFrame;
+
+ CheckBox* m_pSequenceCB;
+ ListBox* m_pBracketLB;
+ VclContainer* m_pAuthorityFrame;
+
+ //all
+ VclContainer* m_pSortFrame;
+ SvxLanguageBox* m_pLanguageLB;
+ ListBox* m_pSortAlgorithmLB;
+
+ IndexEntryResource* pIndexRes;
+
+ OUString aStyleArr[MAXLEVEL];
+ OUString sAutoMarkURL;
+ OUString sAutoMarkType;
+ OUString sAddStyleUser;
+ OUString sAddStyleContent;
+
+ const IndexEntrySupplierWrapper* pIndexEntryWrapper;
+
+ bool m_bWaitingInitialSettings;
+
+ DECL_LINK(TOXTypeHdl, ListBox* );
+ DECL_LINK(AddStylesHdl, PushButton* );
+ DECL_LINK(MenuEnableHdl, Menu*);
+ DECL_LINK(MenuExecuteHdl, Menu*);
+ DECL_LINK(LanguageHdl, ListBox*);
+
+ DECL_LINK(CheckBoxHdl, CheckBox* );
+ DECL_LINK(RadioButtonHdl, void *);
+ DECL_LINK(ModifyHdl, void*);
+
+ void ApplyTOXDescription();
+ void FillTOXDescription();
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+ SwTOXSelectTabPage(Window* pParent, const SfxItemSet& rAttrSet);
+ ~SwTOXSelectTabPage();
+
+ virtual sal_Bool FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+
+ virtual void ActivatePage( const SfxItemSet& );
+ virtual int DeactivatePage( SfxItemSet* pSet = 0 );
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+
+ void SelectType(TOXTypes eSet); //preset TOXType, GlobalDoc
+ void SetWrtShell(SwWrtShell& rSh);
+};
+
+class SwTOXEdit;
+class SwTOXButton;
+class SwTOXEntryTabPage;
+
+class SwTokenWindow : public VclHBox, public VclBuilderContainer
+{
+ typedef std::vector<Control*>::iterator ctrl_iterator;
+ typedef std::vector<Control*>::const_iterator ctrl_const_iterator;
+ typedef std::vector<Control*>::reverse_iterator ctrl_reverse_iterator;
+ typedef std::vector<Control*>::const_reverse_iterator ctrl_const_reverse_iterator;
+
+ Button* m_pLeftScrollWin;
+ Window* m_pCtrlParentWin;
+ Button* m_pRightScrollWin;
+ std::vector<Control*> aControlList;
+ SwForm* pForm;
+ sal_uInt16 nLevel;
+ bool bValid;
+ OUString aButtonTexts[TOKEN_END]; // Text of the buttons
+ OUString aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons
+ OUString sCharStyle;
+ Link aButtonSelectedHdl;
+ Control* pActiveCtrl;
+ Link aModifyHdl;
+ OUString accessibleName;
+ OUString sAdditionalAccnameString1;
+ OUString sAdditionalAccnameString2;
+ OUString sAdditionalAccnameString3;
+
+ SwTOXEntryTabPage* m_pParent;
+
+ DECL_LINK(EditResize, Edit*);
+ DECL_LINK(NextItemHdl, SwTOXEdit* );
+ DECL_LINK(TbxFocusHdl, SwTOXEdit* );
+ DECL_LINK(NextItemBtnHdl, SwTOXButton* );
+ DECL_LINK(TbxFocusBtnHdl, SwTOXButton* );
+ DECL_LINK(ScrollHdl, ImageButton* );
+
+ void SetActiveControl(Control* pSet);
+
+ Control* InsertItem(const OUString& rText, const SwFormToken& aToken);
+ void AdjustPositions();
+ void AdjustScrolling();
+ void MoveControls(long nOffset);
+
+public:
+ SwTokenWindow(Window* pParent);
+ ~SwTokenWindow();
+
+ void SetTabPage(SwTOXEntryTabPage *pParent) { m_pParent = pParent; }
+
+ void SetForm(SwForm& rForm, sal_uInt16 nLevel);
+ sal_uInt16 GetLastLevel()const {return nLevel;};
+
+ sal_Bool IsValid() const {return bValid;}
+
+ void SetInvalid() {bValid = false;}
+
+ OUString GetPattern() const;
+
+ void SetButtonSelectedHdl(const Link& rLink)
+ { aButtonSelectedHdl = rLink;}
+
+ void SetModifyHdl(const Link& rLink){aModifyHdl = rLink;}
+
+ Control* GetActiveControl()
+ { return pActiveCtrl;}
+
+ void InsertAtSelection(const OUString& rText, const SwFormToken& aToken);
+ void RemoveControl(SwTOXButton* pDel, sal_Bool bInternalCall = sal_False);
+
+ sal_Bool Contains(FormTokenType) const;
+
+ sal_Bool DetermineLinkStart();
+
+ //helper for pattern buttons and edits
+ sal_Bool CreateQuickHelp(Control* pCtrl,
+ const SwFormToken& rToken, const HelpEvent& );
+
+ virtual void GetFocus();
+ virtual void setAllocation(const Size &rAllocation);
+ void SetFocus2theAllBtn();
+private:
+ sal_uInt32 GetControlIndex(FormTokenType eType) const;
+};
+
+class SwTOXEntryTabPage;
+
+class SwIdxTreeListBox : public SvTreeListBox
+{
+ SwTOXEntryTabPage* pParent;
+
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+public:
+ SwIdxTreeListBox(Window* pPar, WinBits nStyle);
+ void SetTabPage(SwTOXEntryTabPage* pPar) { pParent = pPar; }
+};
+
+class SwTOXEntryTabPage : public SfxTabPage
+{
+ FixedText* m_pLevelFT;
+ SwIdxTreeListBox* m_pLevelLB;
+
+ SwTokenWindow* m_pTokenWIN;
+
+ PushButton* m_pAllLevelsPB;
+
+ PushButton* m_pEntryNoPB;
+ PushButton* m_pEntryPB;
+ PushButton* m_pTabPB;
+ PushButton* m_pChapterInfoPB;
+ PushButton* m_pPageNoPB;
+ PushButton* m_pHyperLinkPB;
+
+ ListBox* m_pAuthFieldsLB;
+ PushButton* m_pAuthInsertPB;
+ PushButton* m_pAuthRemovePB;
+
+ ListBox* m_pCharStyleLB; // character style of the current token
+ PushButton* m_pEditStylePB;
+
+ FixedText* m_pChapterEntryFT;
+ ListBox* m_pChapterEntryLB; // type of chapter info
+
+ FixedText* m_pNumberFormatFT;
+ ListBox* m_pNumberFormatLB; //!< format for numbering (E#)
+
+ FixedText* m_pEntryOutlineLevelFT; //!< Fixed text, for i53420
+ NumericField* m_pEntryOutlineLevelNF; //!< level to evaluate outline level to, for i53420
+
+ FixedText* m_pFillCharFT;
+ ComboBox* m_pFillCharCB; // fill char for tab stop
+
+ FixedText* m_pTabPosFT;
+ MetricField* m_pTabPosMF; // tab stop position
+ CheckBox* m_pAutoRightCB;
+
+ VclContainer* m_pFormatFrame;
+ FixedText* m_pMainEntryStyleFT;
+ ListBox* m_pMainEntryStyleLB; // character style of main entries in indexes
+ CheckBox* m_pAlphaDelimCB;
+ CheckBox* m_pCommaSeparatedCB;
+ CheckBox* m_pRelToStyleCB; // position relative to the right margin of the para style
+
+ VclContainer* m_pSortingFrame;
+ RadioButton* m_pSortDocPosRB;
+ RadioButton* m_pSortContentRB;
+
+ VclContainer* m_pSortKeyFrame;
+ ListBox* m_pFirstKeyLB;
+ RadioButton* m_pFirstSortUpRB;
+ RadioButton* m_pFirstSortDownRB;
+
+ ListBox* m_pSecondKeyLB;
+ RadioButton* m_pSecondSortUpRB;
+ RadioButton* m_pSecondSortDownRB;
+
+ ListBox* m_pThirdKeyLB;
+ RadioButton* m_pThirdSortUpRB;
+ RadioButton* m_pThirdSortDownRB;
+
+ OUString sDelimStr;
+ OUString sLevelStr;
+ OUString sAuthTypeStr;
+
+ OUString sNoCharStyle;
+ OUString sNoCharSortKey;
+ SwForm* m_pCurrentForm;
+
+ CurTOXType aLastTOXType;
+ bool bInLevelHdl;
+
+ DECL_LINK(StyleSelectHdl, ListBox*);
+ DECL_LINK(EditStyleHdl, PushButton*);
+ DECL_LINK(InsertTokenHdl, PushButton*);
+ DECL_LINK(LevelHdl, SvTreeListBox*);
+ DECL_LINK(AutoRightHdl, CheckBox*);
+ DECL_LINK(TokenSelectedHdl, SwFormToken*);
+ DECL_LINK(TabPosHdl, MetricField*);
+ DECL_LINK(FillCharHdl, ComboBox*);
+ DECL_LINK(RemoveInsertAuthHdl, PushButton*);
+ DECL_LINK(SortKeyHdl, RadioButton*);
+ DECL_LINK(ChapterInfoHdl, ListBox*);
+ DECL_LINK(ChapterInfoOutlineHdl, NumericField*);
+ DECL_LINK(NumberFormatHdl, ListBox*);
+
+ DECL_LINK(AllLevelsHdl, void *);
+
+ void EnableButtons();
+ void WriteBackLevel();
+ void UpdateDescriptor();
+ DECL_LINK(ModifyHdl, void*);
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+ SwTOXEntryTabPage(Window* pParent, const SfxItemSet& rAttrSet);
+ ~SwTOXEntryTabPage();
+
+ virtual sal_Bool FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+ virtual void ActivatePage( const SfxItemSet& );
+ virtual int DeactivatePage( SfxItemSet* pSet = 0 );
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+ void SetWrtShell(SwWrtShell& rSh);
+
+ OUString GetLevelHelp(sal_uInt16 nLevel) const;
+
+ void PreTokenButtonRemoved(const SwFormToken& rToken);
+ void SetFocus2theAllBtn();
+ virtual bool Notify( NotifyEvent& rNEvt );
+};
+
+class SwTOXStylesTabPage : public SfxTabPage
+{
+ ListBox* m_pLevelLB;
+ PushButton* m_pAssignBT;
+ ListBox* m_pParaLayLB;
+ PushButton* m_pStdBT;
+ PushButton* m_pEditStyleBT;
+
+ SwForm* m_pCurrentForm;
+
+ DECL_LINK( EditStyleHdl, Button *);
+ DECL_LINK(StdHdl, void *);
+ DECL_LINK(EnableSelectHdl, void *);
+ DECL_LINK(DoubleClickHdl, void *);
+ DECL_LINK(AssignHdl, void *);
+ void Modify();
+
+ SwForm& GetForm()
+ {
+ SwMultiTOXTabDialog* pDlg = (SwMultiTOXTabDialog*)GetTabDialog();
+ return *pDlg->GetForm(pDlg->GetCurrentTOXType());
+ }
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+ SwTOXStylesTabPage(Window* pParent, const SfxItemSet& rAttrSet);
+ ~SwTOXStylesTabPage();
+
+ virtual sal_Bool FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+
+ virtual void ActivatePage( const SfxItemSet& );
+ virtual int DeactivatePage( SfxItemSet* pSet = 0 );
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_SWUICNTTAB_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swuiidxmrk.hxx b/sw/source/core/uibase/inc/swuiidxmrk.hxx
new file mode 100644
index 000000000000..e552586e353b
--- /dev/null
+++ b/sw/source/core/uibase/inc/swuiidxmrk.hxx
@@ -0,0 +1,253 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWUIIDXMRK_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWUIIDXMRK_HXX
+
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <sfx2/basedlgs.hxx>
+
+#include <svx/stddlg.hxx>
+
+#include <vcl/button.hxx>
+#include <vcl/combobox.hxx>
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/group.hxx>
+#include <vcl/layout.hxx>
+#include <vcl/lstbox.hxx>
+
+#include <sfx2/childwin.hxx>
+#include "toxe.hxx"
+#include <svtools/stdctrl.hxx>
+#include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
+
+class SwWrtShell;
+class SwTOXMgr;
+class SwTOXMark;
+/*--------------------------------------------------------------------
+ Description: insert mark for index entry
+ --------------------------------------------------------------------*/
+class SwIndexMarkFloatDlg;
+class SwIndexMarkModalDlg;
+
+class SwIndexMarkPane
+{
+ Dialog& m_rDialog;
+
+ friend class SwIndexMarkFloatDlg;
+ friend class SwIndexMarkModalDlg;
+ VclFrame* m_pFrame;
+ FixedText* m_pTypeFT;
+ ListBox* m_pTypeDCB;
+ PushButton* m_pNewBT;
+
+ Edit* m_pEntryED;
+ FixedText* m_pPhoneticFT0;
+ Edit* m_pPhoneticED0;
+
+ FixedText* m_pKey1FT;
+ ComboBox* m_pKey1DCB;
+ FixedText* m_pPhoneticFT1;
+ Edit* m_pPhoneticED1;
+
+ FixedText* m_pKey2FT;
+ ComboBox* m_pKey2DCB;
+ FixedText* m_pPhoneticFT2;
+ Edit* m_pPhoneticED2;
+
+ FixedText* m_pLevelFT;
+ NumericField* m_pLevelNF;
+ CheckBox* m_pMainEntryCB;
+ CheckBox* m_pApplyToAllCB;
+ CheckBox* m_pSearchCaseSensitiveCB;
+ CheckBox* m_pSearchCaseWordOnlyCB;
+
+ PushButton* m_pOKBT;
+ CloseButton* m_pCloseBT;
+ PushButton* m_pDelBT;
+
+ PushButton* m_pPrevSameBT;
+ PushButton* m_pNextSameBT;
+ PushButton* m_pPrevBT;
+ PushButton* m_pNextBT;
+
+ OUString aOrgStr;
+ sal_Bool bDel;
+ sal_Bool bNewMark;
+ sal_Bool bSelected;
+
+ sal_Bool bPhoneticED0_ChangedByUser;
+ sal_Bool bPhoneticED1_ChangedByUser;
+ sal_Bool bPhoneticED2_ChangedByUser;
+ LanguageType nLangForPhoneticReading; //Language of current text used for phonetic reading proposal
+ sal_Bool bIsPhoneticReadingEnabled; //this value states whether phonetic reading is enabled in principle dependent of global cjk settings and language of current entry
+ com::sun::star::uno::Reference< com::sun::star::i18n::XExtendedIndexEntrySupplier >
+ xExtendedIndexEntrySupplier;
+
+ SwTOXMgr* pTOXMgr;
+ SwWrtShell* pSh;
+
+ void Apply();
+ void InitControls();
+ void InsertMark();
+ void UpdateMark();
+
+ DECL_LINK( InsertHdl, Button * );
+ DECL_LINK(CloseHdl, void *);
+ DECL_LINK(DelHdl, void *);
+ DECL_LINK(NextHdl, void *);
+ DECL_LINK(NextSameHdl, void *);
+ DECL_LINK(PrevHdl, void *);
+ DECL_LINK(PrevSameHdl, void *);
+ DECL_LINK( ModifyHdl, ListBox* pBox = 0 );
+ DECL_LINK( KeyDCBModifyHdl, ComboBox * );
+ DECL_LINK(NewUserIdxHdl, void *);
+ DECL_LINK( SearchTypeHdl, CheckBox*);
+ DECL_LINK( PhoneticEDModifyHdl, Edit * );
+
+ //this method updates the values from 'nLangForPhoneticReading' and 'bIsPhoneticReadingEnabled'
+ //it needs to be called ones if this dialog is opened to create a new entry (in InitControls),
+ //or otherwise it has to be called for each changed TOXMark (in UpdateDialog)
+ void UpdateLanguageDependenciesForPhoneticReading();
+ OUString GetDefaultPhoneticReading( const OUString& rText );
+
+ void UpdateKeyBoxes();
+
+ void UpdateDialog();
+ void InsertUpdate();
+
+ void Activate();
+
+public:
+
+ SwIndexMarkPane(Dialog &rDialog,
+ sal_Bool bNewDlg,
+ SwWrtShell& rWrtShell);
+
+ Dialog &GetDialog() { return m_rDialog; }
+
+ ~SwIndexMarkPane();
+
+ void ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark = 0);
+ sal_Bool IsTOXType(const OUString& rName)
+ {return LISTBOX_ENTRY_NOTFOUND != m_pTypeDCB->GetEntryPos(rName);}
+};
+
+class SwIndexMarkFloatDlg : public SfxModelessDialog
+{
+ SwIndexMarkPane m_aContent;
+ virtual void Activate();
+ public:
+ SwIndexMarkFloatDlg( SfxBindings* pBindings,
+ SfxChildWindow* pChild,
+ Window *pParent,
+ SfxChildWinInfo* pInfo,
+ sal_Bool bNew=sal_True);
+ void ReInitDlg(SwWrtShell& rWrtShell);
+};
+
+class SwIndexMarkModalDlg : public SvxStandardDialog
+{
+ SwIndexMarkPane m_aContent;
+public:
+ SwIndexMarkModalDlg(Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark);
+
+ virtual void Apply();
+ void ReInitDlg(SwWrtShell& rWrtShell);
+};
+
+class SwAuthMarkModalDlg;
+
+class SwAuthorMarkPane
+{
+ Dialog& m_rDialog;
+
+ static sal_Bool bIsFromComponent;
+
+ friend class SwAuthMarkModalDlg;
+ friend class SwAuthMarkFloatDlg;
+
+ RadioButton* m_pFromComponentRB;
+ RadioButton* m_pFromDocContentRB;
+ FixedText* m_pAuthorFI;
+ FixedText* m_pTitleFI;
+ Edit* m_pEntryED;
+ ListBox* m_pEntryLB;
+
+ PushButton* m_pActionBT;
+ CloseButton* m_pCloseBT;
+ PushButton* m_pCreateEntryPB;
+ PushButton* m_pEditEntryPB;
+
+ sal_Bool bNewEntry;
+ sal_Bool bBibAccessInitialized;
+
+ SwWrtShell* pSh;
+
+ OUString m_sColumnTitles[AUTH_FIELD_END];
+ OUString m_sFields[AUTH_FIELD_END];
+
+ OUString m_sCreatedEntry[AUTH_FIELD_END];
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xBibAccess;
+
+ DECL_LINK(InsertHdl, void *);
+ DECL_LINK(CloseHdl, void *);
+ DECL_LINK(CreateEntryHdl, PushButton*);
+ DECL_LINK(CompEntryHdl, ListBox*);
+ DECL_LINK(ChangeSourceHdl, RadioButton*);
+ DECL_LINK(IsEntryAllowedHdl, Edit*);
+ DECL_LINK(EditModifyHdl, Edit*);
+
+ void InitControls();
+ void Activate();
+public:
+
+ SwAuthorMarkPane( Dialog &rDialog,
+ sal_Bool bNew=sal_True);
+
+ void ReInitDlg(SwWrtShell& rWrtShell);
+};
+
+class SwAuthMarkFloatDlg : public SfxModelessDialog
+{
+ SwAuthorMarkPane m_aContent;
+ virtual void Activate();
+ public:
+ SwAuthMarkFloatDlg( SfxBindings* pBindings,
+ SfxChildWindow* pChild,
+ Window *pParent,
+ SfxChildWinInfo* pInfo,
+ sal_Bool bNew=sal_True);
+ void ReInitDlg(SwWrtShell& rWrtShell);
+};
+
+class SwAuthMarkModalDlg : public SvxStandardDialog
+{
+ SwAuthorMarkPane m_aContent;
+public:
+ SwAuthMarkModalDlg(Window *pParent, SwWrtShell& rSh);
+
+ virtual void Apply();
+ void ReInitDlg(SwWrtShell& rWrtShell);
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_SWUIIDXMRK_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swuipardlg.hxx b/sw/source/core/uibase/inc/swuipardlg.hxx
new file mode 100644
index 000000000000..103cc99deb53
--- /dev/null
+++ b/sw/source/core/uibase/inc/swuipardlg.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWUIPARDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWUIPARDLG_HXX
+#include "pardlg.hxx"
+
+class SwParaDlg: public SfxTabDialog
+{
+ SwView& rView;
+ sal_uInt16 nHtmlMode;
+ sal_uInt8 nDlgMode;
+ sal_Bool bDrawParaDlg;
+
+ sal_uInt16 m_nParaStd;
+ sal_uInt16 m_nParaAlign;
+ sal_uInt16 m_nParaExt;
+ sal_uInt16 m_nParaNumPara;
+ sal_uInt16 m_nParaDrpCps;
+ sal_uInt16 m_nParaBckGrnd;
+ sal_uInt16 m_nParaBorder;
+
+ void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
+
+public:
+ SwParaDlg( Window *pParent,
+ SwView& rVw,
+ const SfxItemSet&,
+ sal_uInt8 nDialogMode,
+ const OUString *pCollName = 0,
+ sal_Bool bDraw = sal_False,
+ OString sDefPage = OString());
+ ~SwParaDlg();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swvset.hxx b/sw/source/core/uibase/inc/swvset.hxx
new file mode 100644
index 000000000000..10b71577f1d2
--- /dev/null
+++ b/sw/source/core/uibase/inc/swvset.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWVSET_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWVSET_HXX
+#include <svx/numvset.hxx>
+
+class SwRulerValueSet : public SvxBmpNumValueSet
+{
+public:
+ SwRulerValueSet(Window* pParent, WinBits nWinStyle);
+ ~SwRulerValueSet();
+ virtual void UserDraw( const UserDrawEvent& rUDEvt );
+};
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/swwrtshitem.hxx b/sw/source/core/uibase/inc/swwrtshitem.hxx
new file mode 100644
index 000000000000..ba498ea7c41f
--- /dev/null
+++ b/sw/source/core/uibase/inc/swwrtshitem.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SWWRTSHITEM_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SWWRTSHITEM_HXX
+#include <svl/poolitem.hxx>
+#include "swdllapi.h"
+
+class SwWrtShell;
+
+class SW_DLLPUBLIC SwWrtShellItem: public SfxPoolItem
+{
+ SwWrtShell* pWrtSh;
+
+public:
+ TYPEINFO();
+ SwWrtShellItem();
+ SwWrtShellItem( sal_uInt16 nWhich , SwWrtShell* pWrtSh);
+ SwWrtShellItem( const SwWrtShellItem& );
+
+ virtual bool operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ SwWrtShell* GetValue() const { return pWrtSh; }
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/syncbtn.hxx b/sw/source/core/uibase/inc/syncbtn.hxx
new file mode 100644
index 000000000000..468821ff2b58
--- /dev/null
+++ b/sw/source/core/uibase/inc/syncbtn.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_SYNCBTN_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_SYNCBTN_HXX
+#include <sfx2/childwin.hxx>
+
+#ifdef _SYNCDLG
+#include <sfx2/basedlgs.hxx>
+
+#include <vcl/button.hxx>
+
+class SwSyncBtnDlg : public SfxFloatingWindow
+{
+ PushButton aSyncBtn;
+
+ DECL_LINK( BtnHdl, void* );
+
+public:
+ SwSyncBtnDlg(SfxBindings*, SfxChildWindow*, Window *pParent);
+ ~SwSyncBtnDlg();
+};
+#endif
+
+class SwSyncChildWin : public SfxChildWindow
+{
+public:
+ SwSyncChildWin( Window* ,
+ sal_uInt16 nId,
+ SfxBindings*,
+ SfxChildWinInfo* );
+
+ SFX_DECL_CHILDWINDOW( SwSyncChildWin );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/table.hrc b/sw/source/core/uibase/inc/table.hrc
new file mode 100644
index 000000000000..6f7635bd4d36
--- /dev/null
+++ b/sw/source/core/uibase/inc/table.hrc
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "rcid.hrc"
+
+#define DLG_ROW_HEIGHT (RC_TABLE_BEGIN + 4)
+
+
+#define MSG_ERR_TABLE_MERGE (RC_TABLE_BEGIN + 7)
+
+
+
+#define MSG_WRONG_TABLENAME (RC_TABLE_BEGIN + 13)
+
+#define TABLE_ACT_END MSG_WRONG_TABLENAME
+
+#if TABLE_ACT_END > RC_TABLE_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/tabledlg.hxx b/sw/source/core/uibase/inc/tabledlg.hxx
new file mode 100644
index 000000000000..d18be07670dc
--- /dev/null
+++ b/sw/source/core/uibase/inc/tabledlg.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TABLEDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TABLEDLG_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+#include "swtypes.hxx"
+#include "swtablerep.hxx"
+
+class SwWrtShell;
+struct TColumn;
+
+/*-------------------------------------------------------
+ table dialog
+--------------------------------------------------------- */
+class SwTableTabDlg : public SfxTabDialog
+{
+ SwWrtShell* pShell;
+ sal_uInt16 m_nHtmlMode;
+ sal_uInt16 m_nTextFlowId;
+ sal_uInt16 m_nBackgroundId;
+ sal_uInt16 m_nBorderId;
+
+ virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
+public:
+ SwTableTabDlg( Window* pParent, SfxItemPool& Pool,
+ const SfxItemSet* pItemSet, SwWrtShell* pSh );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/tablemgr.hxx b/sw/source/core/uibase/inc/tablemgr.hxx
new file mode 100644
index 000000000000..4144b9b9aa09
--- /dev/null
+++ b/sw/source/core/uibase/inc/tablemgr.hxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TABLEMGR_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TABLEMGR_HXX
+
+#include "swdllapi.h"
+#include "swtypes.hxx"
+#include "tabcol.hxx"
+
+class SwFrmFmt;
+class SwWrtShell;
+class Window;
+class SwFlyFrmFmt;
+
+namespace com { namespace sun { namespace star {
+ namespace frame {
+ class XModel; }
+ namespace chart2 {
+ namespace data {
+ class XDataProvider; } }
+}}}
+
+const SwTwips lAutoWidth = INVALID_TWIPS;
+const char cParaDelim = 0x0a;
+
+class SW_DLLPUBLIC SwTableFUNC
+{
+ SwFrmFmt *pFmt;
+ SwWrtShell *pSh;
+ sal_Bool bCopy;
+ SwTabCols aCols;
+
+private:
+ SAL_DLLPRIVATE int GetRightSeparator(int nNum) const;
+
+public:
+ inline SwTableFUNC(SwFrmFmt &);
+ SwTableFUNC(SwWrtShell *pShell, sal_Bool bCopyFmt = sal_False);
+ ~SwTableFUNC();
+
+ void InitTabCols();
+ void ColWidthDlg(Window *pParent );
+ SwTwips GetColWidth(sal_uInt16 nNum) const;
+ SwTwips GetMaxColWidth(sal_uInt16 nNum) const;
+ void SetColWidth(sal_uInt16 nNum, SwTwips nWidth );
+ sal_uInt16 GetColCount() const;
+ sal_uInt16 GetCurColNum() const;
+
+ sal_Bool IsTableSelected() const { return pFmt != 0; }
+
+ const SwFrmFmt *GetTableFmt() const { return pFmt; }
+
+ SwWrtShell* GetShell() const { return pSh; }
+
+ // @deprecated
+ void UpdateChart();
+
+ /// @return the XModel of the newly inserted chart if successful
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
+ InsertChart( ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > &rxDataProvider, sal_Bool bFillWithData, const OUString &rCellRange, SwFlyFrmFmt** ppFlyFrmFmt = 0 );
+};
+
+inline SwTableFUNC::SwTableFUNC(SwFrmFmt &rFmt) :
+ pFmt(&rFmt),
+ pSh(0),
+ bCopy(sal_False)
+{
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/tabsh.hxx b/sw/source/core/uibase/inc/tabsh.hxx
new file mode 100644
index 000000000000..8e37947b7cf5
--- /dev/null
+++ b/sw/source/core/uibase/inc/tabsh.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TABSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TABSH_HXX
+
+#include "basesh.hxx"
+#include "swdllapi.h"
+
+class SfxItemSet;
+class SwWrtShell;
+
+SW_DLLPUBLIC void ItemSetToTableParam( const SfxItemSet& rSet, SwWrtShell &rSh );
+
+extern const sal_uInt16 aUITableAttrRange[];
+SW_DLLPUBLIC const sal_uInt16* SwuiGetUITableAttrRange();
+
+class SwTableShell: public SwBaseShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_TABSHELL)
+ TYPEINFO();
+
+ void Execute(SfxRequest &);
+ void GetState(SfxItemSet &);
+ void GetFrmBorderState(SfxItemSet &rSet);
+ void GetLineStyleState(SfxItemSet &rSet);
+ void ExecTableStyle(SfxRequest& rReq);
+
+ void ExecNumberFormat(SfxRequest& rReq);
+
+ SwTableShell(SwView &rView);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/tautofmt.hxx b/sw/source/core/uibase/inc/tautofmt.hxx
new file mode 100644
index 000000000000..5aac7016a944
--- /dev/null
+++ b/sw/source/core/uibase/inc/tautofmt.hxx
@@ -0,0 +1,91 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TAUTOFMT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TAUTOFMT_HXX
+#include <sfx2/basedlgs.hxx>
+
+#include <vcl/fixed.hxx>
+
+#include <vcl/lstbox.hxx>
+
+#include <vcl/button.hxx>
+
+#include <vcl/morebtn.hxx>
+
+#include <vcl/virdev.hxx>
+
+class SwTableAutoFmt;
+class AutoFmtPreview;
+class SwTableAutoFmtTbl;
+class SwWrtShell;
+
+enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE };
+
+class SwAutoFormatDlg : public SfxModalDialog
+{
+ ListBox* m_pLbFormat;
+ VclContainer* m_pFormatting;
+ CheckBox* m_pBtnNumFormat;
+ CheckBox* m_pBtnBorder;
+ CheckBox* m_pBtnFont;
+ CheckBox* m_pBtnPattern;
+ CheckBox* m_pBtnAlignment;
+ OKButton* m_pBtnOk;
+ CancelButton* m_pBtnCancel;
+ PushButton* m_pBtnAdd;
+ PushButton* m_pBtnRemove;
+ PushButton* m_pBtnRename;
+ OUString aStrTitle;
+ OUString aStrLabel;
+ OUString aStrClose;
+ OUString aStrDelTitle;
+ OUString aStrDelMsg;
+ OUString aStrRenameTitle;
+ OUString aStrInvalidFmt;
+ AutoFmtPreview* m_pWndPreview;
+
+ SwWrtShell* pShell;
+ SwTableAutoFmtTbl* pTableTbl;
+ sal_uInt8 nIndex;
+ sal_uInt8 nDfltStylePos;
+ sal_Bool bCoreDataChanged : 1;
+ sal_Bool bSetAutoFmt : 1;
+
+ void Init( const SwTableAutoFmt* pSelFmt );
+ void UpdateChecks( const SwTableAutoFmt&, sal_Bool bEnableBtn );
+
+ DECL_LINK( CheckHdl, Button * );
+ DECL_LINK(OkHdl, void *);
+ DECL_LINK( AddHdl, void * );
+ DECL_LINK( RemoveHdl, void * );
+ DECL_LINK( RenameHdl, void * );
+ DECL_LINK( SelFmtHdl, void * );
+
+public:
+ SwAutoFormatDlg( Window* pParent, SwWrtShell* pShell,
+ sal_Bool bSetAutoFmt = sal_True,
+ const SwTableAutoFmt* pSelFmt = 0 );
+ virtual ~SwAutoFormatDlg();
+
+ void FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const;
+};
+
+#endif // SW_AUTOFMT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/tblctrl.hxx b/sw/source/core/uibase/inc/tblctrl.hxx
new file mode 100644
index 000000000000..fbf66057e2ae
--- /dev/null
+++ b/sw/source/core/uibase/inc/tblctrl.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TBLCTRL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TBLCTRL_HXX
+
+#include <sfx2/tbxctrl.hxx>
+
+class SwTableOptimizeCtrl : public SfxToolBoxControl
+{
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SwTableOptimizeCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ ~SwTableOptimizeCtrl();
+
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/tblnumfm.hxx b/sw/source/core/uibase/inc/tblnumfm.hxx
new file mode 100644
index 000000000000..ad8b9999f56c
--- /dev/null
+++ b/sw/source/core/uibase/inc/tblnumfm.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TBLNUMFM_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TBLNUMFM_HXX
+
+#include <sfx2/basedlgs.hxx>
+
+class Window;
+class SfxItemSet;
+
+class SwNumFmtDlg : public SfxSingleTabDialog
+{
+public:
+ SwNumFmtDlg(Window* pParent, const SfxItemSet& rSet);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/tbxanchr.hxx b/sw/source/core/uibase/inc/tbxanchr.hxx
new file mode 100644
index 000000000000..96eed47f58d5
--- /dev/null
+++ b/sw/source/core/uibase/inc/tbxanchr.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TBXANCHR_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TBXANCHR_HXX
+
+#include <sfx2/tbxctrl.hxx>
+
+class SwTbxAnchor : public SfxToolBoxControl
+{
+ sal_uInt16 nActAnchorId;
+
+public:
+
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void Click();
+ virtual SfxPopupWindow* CreatePopupWindow();
+
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ ~SwTbxAnchor();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/textsh.hxx b/sw/source/core/uibase/inc/textsh.hxx
new file mode 100644
index 000000000000..e9e00baeb535
--- /dev/null
+++ b/sw/source/core/uibase/inc/textsh.hxx
@@ -0,0 +1,83 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TEXTSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TEXTSH_HXX
+
+#include <basesh.hxx>
+#include <unotools/caserotate.hxx>
+
+class AbstractSvxPostItDialog;
+class SwFldMgr;
+class SvxHyperlinkItem;
+
+class SwTextShell: public SwBaseShell
+{
+ SwFldMgr* pPostItFldMgr;
+ RotateTransliteration m_aRotateCase;
+
+ void InsertSymbol( SfxRequest& );
+ void InsertHyperlink(const SvxHyperlinkItem& rHlnkItem);
+ bool InsertMediaDlg( SfxRequest& );
+
+public:
+ SFX_DECL_INTERFACE(SW_TEXTSHELL)
+ TYPEINFO();
+
+ DECL_LINK( RedlineNextHdl, AbstractSvxPostItDialog * );
+ DECL_LINK( RedlinePrevHdl, AbstractSvxPostItDialog * );
+
+ void Execute(SfxRequest &);
+ void GetState(SfxItemSet &);
+
+ void ExecInsert(SfxRequest &);
+ void StateInsert(SfxItemSet&);
+ void ExecDelete(SfxRequest &);
+ void ExecEnterNum(SfxRequest &);
+ void ExecBasicMove(SfxRequest &);
+ void ExecMove(SfxRequest &);
+ void ExecMovePage(SfxRequest &);
+ void ExecMoveCol(SfxRequest &);
+ void ExecMoveLingu(SfxRequest &);
+ void ExecMoveMisc(SfxRequest &);
+ void ExecField(SfxRequest &rReq);
+ void ExecSetNumber(SfxRequest &);
+ void StateField(SfxItemSet &);
+ void ExecIdx(SfxRequest &);
+ void GetIdxState(SfxItemSet &);
+ void ExecGlossary(SfxRequest &);
+
+ void ExecCharAttr(SfxRequest &);
+ void ExecCharAttrArgs(SfxRequest &);
+ void ExecParaAttr(SfxRequest &);
+ void ExecParaAttrArgs(SfxRequest &);
+ void ExecAttr(SfxRequest &);
+ void ExecDB(SfxRequest &);
+ void ExecTransliteration(SfxRequest &);
+ void ExecRotateTransliteration(SfxRequest &);
+
+ void GetAttrState(SfxItemSet &);
+
+ SwTextShell(SwView &rView);
+ virtual ~SwTextShell();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/titlepage.hxx b/sw/source/core/uibase/inc/titlepage.hxx
new file mode 100644
index 000000000000..3031e3112ef9
--- /dev/null
+++ b/sw/source/core/uibase/inc/titlepage.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TITLEPAGE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TITLEPAGE_HXX
+
+#include <sfx2/basedlgs.hxx>
+#include <vcl/button.hxx>
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <numberingtypelistbox.hxx>
+
+class Window;
+class SwWrtShell;
+class SwPageDesc;
+
+class SwTitlePageDlg : public SfxModalDialog
+{
+private:
+ RadioButton* m_pUseExistingPagesRB;
+ NumericField* m_pPageCountNF;
+
+ RadioButton* m_pDocumentStartRB;
+ RadioButton* m_pPageStartRB;
+ NumericField* m_pPageStartNF;
+
+ CheckBox* m_pRestartNumberingCB;
+ NumericField* m_pRestartNumberingNF;
+ CheckBox* m_pSetPageNumberCB;
+ NumericField* m_pSetPageNumberNF;
+
+ ListBox* m_pPagePropertiesLB;
+ PushButton* m_pPagePropertiesPB;
+
+ OKButton* m_pOkPB;
+
+ SwWrtShell *mpSh;
+
+ const SwFmtPageDesc *mpPageFmtDesc;
+
+ SwPageDesc *mpTitleDesc;
+ const SwPageDesc *mpIndexDesc;
+ const SwPageDesc *mpNormalDesc;
+
+ void FillList();
+
+ sal_uInt16 GetInsertPosition() const;
+
+ DECL_LINK(OKHdl, void *);
+ DECL_LINK(EditHdl, void *);
+ DECL_LINK(RestartNumberingHdl, void *);
+ DECL_LINK(SetPageNumberHdl, void *);
+ DECL_LINK(UpHdl, void *);
+ DECL_LINK(DownHdl, void *);
+ DECL_LINK(StartPageHdl, void *);
+public:
+ SwTitlePageDlg( Window *pParent );
+ ~SwTitlePageDlg();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/tmpdlg.hxx b/sw/source/core/uibase/inc/tmpdlg.hxx
new file mode 100644
index 000000000000..ac990146c80d
--- /dev/null
+++ b/sw/source/core/uibase/inc/tmpdlg.hxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TMPDLG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TMPDLG_HXX
+
+#include <sfx2/styledlg.hxx>
+
+class SfxItemSet;
+class SwWrtShell;
+
+/*--------------------------------------------------------------------
+ Description: the tab dialog carrier of TabPages
+ --------------------------------------------------------------------*/
+class SwTemplateDlg: public SfxStyleDialog
+{
+
+ sal_uInt16 nType;
+ sal_uInt16 nHtmlMode;
+ SwWrtShell* pWrtShell;
+ sal_Bool bNewStyle;
+
+ DECL_LINK( NumOptionsHdl, PushButton* );
+
+ sal_uInt16 m_nIndentsId;
+ sal_uInt16 m_nAlignId;
+ sal_uInt16 m_nTextFlowId;
+ sal_uInt16 m_nAsianTypo;
+ sal_uInt16 m_nFontId;
+ sal_uInt16 m_nFontEffectId;
+ sal_uInt16 m_nPositionId;
+ sal_uInt16 m_nAsianLayoutId;
+ sal_uInt16 m_nTabId;
+ sal_uInt16 m_nOutlineId;
+ sal_uInt16 m_nDropCapsId;
+ sal_uInt16 m_nBackgroundId;
+ sal_uInt16 m_nBorderId;
+ sal_uInt16 m_nConditionId;
+ sal_uInt16 m_nTypeId;
+ sal_uInt16 m_nOptionsId;
+ sal_uInt16 m_nWrapId;
+ sal_uInt16 m_nColumnId;
+ sal_uInt16 m_nMacroId;
+ sal_uInt16 m_nHeaderId;
+ sal_uInt16 m_nFooterId;
+ sal_uInt16 m_nPageId;
+ sal_uInt16 m_nFootNoteId;
+ sal_uInt16 m_nTextGridId;
+ sal_uInt16 m_nSingleId;
+ sal_uInt16 m_nBulletId;
+ sal_uInt16 m_nNumId;
+ sal_uInt16 m_nBmpId;
+ sal_uInt16 m_nNumOptId;
+ sal_uInt16 m_nNumPosId;
+
+public:
+ // @param sPage
+ // Identifies name of page to open at by default
+ SwTemplateDlg( Window* pParent,
+ SfxStyleSheetBase& rBase,
+ sal_uInt16 nRegion,
+ OString sPage = OString(),
+ SwWrtShell* pActShell = 0,
+ bool bNew = false );
+
+ const SfxItemSet* GetRefreshedSet();
+
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
+ virtual short Ok();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/tmplctrl.hxx b/sw/source/core/uibase/inc/tmplctrl.hxx
new file mode 100644
index 000000000000..9deea7c83496
--- /dev/null
+++ b/sw/source/core/uibase/inc/tmplctrl.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TMPLCTRL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TMPLCTRL_HXX
+
+#include <sfx2/stbitem.hxx>
+
+// class BookmarkToolBoxControl -------------------------------------------
+class SwTemplateControl : public SfxStatusBarControl
+{
+protected:
+ virtual void Command( const CommandEvent& rCEvt );
+public:
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void Paint( const UserDrawEvent& rEvt );
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SwTemplateControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
+ ~SwTemplateControl();
+
+private:
+ OUString sTemplate;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/toolbox.hrc b/sw/source/core/uibase/inc/toolbox.hrc
new file mode 100644
index 000000000000..e65caf2bbcb3
--- /dev/null
+++ b/sw/source/core/uibase/inc/toolbox.hrc
@@ -0,0 +1,553 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef _TOOLBOX_HRC
+#define _TOOLBOX_HRC
+#include "shells.hrc"
+#include "globals.hrc"
+#include "cmdid.h"
+#define MN_FONT\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_CHAR_FONT;\
+ HelpID = SID_ATTR_CHAR_FONT;\
+ };\
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; \
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_CHAR_FONTHEIGHT ; \
+ HelpID = SID_ATTR_CHAR_FONTHEIGHT ; \
+ };\
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+
+#define MN_TEXT1( HIDE )\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_CHAR_WEIGHT ; \
+ HelpID = SID_ATTR_CHAR_WEIGHT ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_CHAR_POSTURE ; \
+ HelpID = SID_ATTR_CHAR_POSTURE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_CHAR_UNDERLINE ; \
+ HelpID = SID_ATTR_CHAR_UNDERLINE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_CHAR_OVERLINE ; \
+ HelpID = SID_ATTR_CHAR_OVERLINE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_SET_SUPER_SCRIPT;\
+ HelpID = FN_SET_SUPER_SCRIPT;\
+ Hide = HIDE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_SET_SUB_SCRIPT;\
+ HelpID = FN_SET_SUB_SCRIPT;\
+ Hide = HIDE;\
+ };\
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_ADJUST_LEFT ; \
+ HelpID = SID_ATTR_PARA_ADJUST_LEFT ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_ADJUST_CENTER ; \
+ HelpID = SID_ATTR_PARA_ADJUST_CENTER ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_ADJUST_RIGHT ; \
+ HelpID = SID_ATTR_PARA_ADJUST_RIGHT ; \
+ RadioCheck = TRUE ; \
+ };\
+
+#define MN_TEXT1_RTL( HIDE )\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_CHAR_WEIGHT ; \
+ HelpID = SID_ATTR_CHAR_WEIGHT ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_CHAR_POSTURE ; \
+ HelpID = SID_ATTR_CHAR_POSTURE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_CHAR_UNDERLINE ; \
+ HelpID = SID_ATTR_CHAR_UNDERLINE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_CHAR_OVERLINE ; \
+ HelpID = SID_ATTR_CHAR_OVERLINE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_SET_SUPER_SCRIPT;\
+ HelpID = FN_SET_SUPER_SCRIPT;\
+ Hide = HIDE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_SET_SUB_SCRIPT;\
+ HelpID = FN_SET_SUB_SCRIPT;\
+ Hide = HIDE;\
+ };\
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_ADJUST_RIGHT ; \
+ HelpID = SID_ATTR_PARA_ADJUST_RIGHT ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_ADJUST_CENTER ; \
+ HelpID = SID_ATTR_PARA_ADJUST_CENTER ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_ADJUST_LEFT ; \
+ HelpID = SID_ATTR_PARA_ADJUST_LEFT ; \
+ RadioCheck = TRUE ; \
+ };\
+
+#define MN_TEXT1_BLOCK \
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \
+ HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \
+ RadioCheck = TRUE ; \
+ };\
+
+#define MN_TEXT_LINESPACE \
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_LINESPACE_10;\
+ HelpID = SID_ATTR_PARA_LINESPACE_10;\
+ RadioCheck = TRUE;\
+ Hide = TRUE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_LINESPACE_15;\
+ HelpID = SID_ATTR_PARA_LINESPACE_15;\
+ RadioCheck = TRUE;\
+ Hide = TRUE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_LINESPACE_20;\
+ HelpID = SID_ATTR_PARA_LINESPACE_20;\
+ RadioCheck = TRUE;\
+ Hide = TRUE;\
+ };\
+
+#define MN_TEXT_LTR_RTL \
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;\
+ HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;\
+ RadioCheck = TRUE;\
+ Hide = TRUE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;\
+ HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;\
+ RadioCheck = TRUE;\
+ Hide = TRUE;\
+ };\
+
+#define MN_TEXT_RTL_LTR \
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_RIGHT_TO_LEFT;\
+ HelpID = SID_ATTR_PARA_RIGHT_TO_LEFT;\
+ RadioCheck = TRUE;\
+ Hide = TRUE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_PARA_LEFT_TO_RIGHT;\
+ HelpID = SID_ATTR_PARA_LEFT_TO_RIGHT;\
+ RadioCheck = TRUE;\
+ Hide = TRUE;\
+ };\
+
+#define MN_TEXT2\
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_NUM_NUMBERING_ON ; \
+ HelpID = FN_NUM_NUMBERING_ON ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_NUM_BULLET_ON ; \
+ HelpID = FN_NUM_BULLET_ON ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_DEC_INDENT ; \
+ HelpId = SID_DEC_INDENT ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_INC_INDENT ; \
+ HelpId = SID_INC_INDENT ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_GROW_FONT_SIZE;\
+ HelpID = FN_GROW_FONT_SIZE;\
+ Hide = TRUE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_SHRINK_FONT_SIZE;\
+ HelpID = FN_SHRINK_FONT_SIZE;\
+ Hide = TRUE;\
+ };\
+
+#define MN_BACKGROUND_COLOR\
+ ToolBoxItem\
+ {\
+ ITEM_TOOLBAR_BACKGROUND_COLOR\
+ };
+
+#define MN_TEXT_BACKGROUND \
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ ITEM_TOOLBAR_ATTR_CHAR_COLOR\
+ Identifier = SID_ATTR_CHAR_COLOR2 ; \
+ Command = ".uno:FontColor"; \
+ DropDown = TRUE ;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_ATTR_CHAR_COLOR_BACKGROUND ; \
+ HelpID = SID_ATTR_CHAR_COLOR_BACKGROUND ; \
+ DropDown = TRUE ;\
+ };\
+ ToolBoxItem\
+ {\
+ ITEM_TOOLBAR_BACKGROUND_COLOR\
+ Text [ en-US ] = "Paragraph Background" ; \
+ };
+
+#define MN_TEXT_DIALOGS(HIDE)\
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_SELECTALL;\
+ HelpId = SID_SELECTALL;\
+ Hide = HIDE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_CHAR_DLG;\
+ HelpId = SID_CHAR_DLG;\
+ Hide = HIDE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_PARA_DLG;\
+ HelpId = SID_PARA_DLG;\
+ Hide = HIDE;\
+ };
+
+
+#define MN_TEMPLATE\
+ ToolBoxItem\
+ {\
+ ITEM_TOOLBAR_TEMPLATE_APPLY\
+ };\
+ ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; };
+
+#define MN_FRAME_WRAP\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_NOWRAP ; \
+ HelpID = FN_FRAME_NOWRAP ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_WRAP ; \
+ HelpID = FN_FRAME_WRAP ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_WRAP_IDEAL ; \
+ HelpID = FN_FRAME_WRAP_IDEAL ; \
+ RadioCheck = TRUE ; \
+ Hide = TRUE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_WRAP_LEFT ; \
+ HelpID = FN_FRAME_WRAP_LEFT ; \
+ RadioCheck = TRUE ; \
+ Hide = TRUE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_WRAP_RIGHT ; \
+ HelpID = FN_FRAME_WRAP_RIGHT ; \
+ RadioCheck = TRUE ; \
+ Hide = TRUE;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_WRAPTHRU ; \
+ HelpID = FN_FRAME_WRAPTHRU ; \
+ RadioCheck = TRUE ; \
+ };
+
+#define MN_FRAME_WRAP_WEB\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_NOWRAP ; \
+ HelpID = FN_FRAME_NOWRAP ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_WRAP_LEFT ; \
+ HelpID = FN_FRAME_WRAP_LEFT ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_WRAP_RIGHT ; \
+ HelpID = FN_FRAME_WRAP_RIGHT ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_IMAP ; \
+ HelpID = SID_IMAP ; \
+ RadioCheck = TRUE ; \
+ };
+
+#define MN_CONTOUR\
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_WRAP_CONTOUR ; \
+ HelpID = FN_FRAME_WRAP_CONTOUR ; \
+ Hide = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_CONTOUR_DLG ; \
+ HelpID = SID_CONTOUR_DLG ; \
+ Hide = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_IMAP ; \
+ HelpID = SID_IMAP ; \
+ Hide = TRUE ; \
+ };
+
+
+#define MN_FRAME1\
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_ALIGN_HORZ_LEFT ; \
+ HelpID = FN_FRAME_ALIGN_HORZ_LEFT ; \
+ RadioCheck = TRUE ; \
+ };
+
+#define MN_FRAME2\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_ALIGN_HORZ_CENTER ; \
+ HelpID = FN_FRAME_ALIGN_HORZ_CENTER ; \
+ RadioCheck = TRUE ; \
+ };
+
+#define MN_FRAME3\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_ALIGN_HORZ_RIGHT ; \
+ HelpID = FN_FRAME_ALIGN_HORZ_RIGHT ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_ALIGN_VERT_TOP ; \
+ HelpID = FN_FRAME_ALIGN_VERT_TOP ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_ALIGN_VERT_CENTER ; \
+ HelpID = FN_FRAME_ALIGN_VERT_CENTER ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FRAME_ALIGN_VERT_BOTTOM ; \
+ HelpID = FN_FRAME_ALIGN_VERT_BOTTOM ; \
+ RadioCheck = TRUE ; \
+ };\
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR ; \
+ };
+
+#define MN_LAYER\
+ ToolBoxItem\
+ {\
+ Identifier = SID_FRAME_TO_TOP ; \
+ HelpID = SID_FRAME_TO_TOP ; \
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_FRAME_TO_BOTTOM ; \
+ HelpID = SID_FRAME_TO_BOTTOM ; \
+ };
+
+#define MN_LINESTYLE\
+ ToolBoxItem\
+ {\
+ ITEM_TOOLBAR_ATTR_BORDER\
+ };\
+ ToolBoxItem\
+ {\
+ ITEM_TOOLBAR_FRAME_LINESTYLE\
+ };\
+ ToolBoxItem\
+ {\
+ ITEM_TOOLBAR_FRAME_LINECOLOR\
+ };
+
+#define MN_ATTRIBUTES_FRAME\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FORMAT_FRAME_DLG ; \
+ HelpID = FN_FORMAT_FRAME_DLG ; \
+ };
+
+#define MN_ATTRIBUTES_GRAFIK\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FORMAT_FRAME_DLG;\
+ HelpID = FN_FORMAT_GRAFIC_DLG;\
+ Text [ en-US ] = "Image Properties";\
+ };
+
+
+#define MN_ATTRIBUTES_OLE\
+ ToolBoxItem\
+ {\
+ Identifier = FN_FORMAT_FRAME_DLG;\
+ HelpID = FN_FORMAT_FRAME_DLG;\
+ Text [ en-US ] = "Object Properties";\
+ };
+
+#define MN_GRID(hide)\
+ ToolBoxItem\
+ {\
+ Type = TOOLBOXITEM_SEPARATOR;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_GRID_VISIBLE;\
+ HelpID = SID_GRID_VISIBLE;\
+ hide;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_GRID_USE;\
+ HelpID = SID_GRID_USE;\
+ hide;\
+ };\
+ ToolBoxItem\
+ {\
+ Identifier = SID_HELPLINES_MOVE;\
+ HelpID = SID_HELPLINES_MOVE;\
+ hide;\
+ };
+
+
+
+#endif // _TOOLBOX_HRC
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/toxmgr.hxx b/sw/source/core/uibase/inc/toxmgr.hxx
new file mode 100644
index 000000000000..86b2d7f5ecc5
--- /dev/null
+++ b/sw/source/core/uibase/inc/toxmgr.hxx
@@ -0,0 +1,310 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_TOXMGR_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_TOXMGR_HXX
+
+#include "swdllapi.h"
+#include "tox.hxx"
+#include <authfld.hxx>
+
+class SwWrtShell;
+class SwForm;
+
+/*--------------------------------------------------------------------
+ Description: manager for directory functionality
+ --------------------------------------------------------------------*/
+//one single method will be sufficient to insert AND upate indexes
+class SW_DLLPUBLIC SwTOXDescription
+{
+ TOXTypes eTOXType;
+ OUString aStyleNames[MAXLEVEL];
+ OUString sSequenceName;
+ OUString sMainEntryCharStyle;
+ OUString sAutoMarkURL;
+ OUString* pTitle;
+ OUString* pTOUName;
+ SwForm* pForm;
+ sal_uInt16 nContent;
+ sal_uInt16 nIndexOptions;
+ sal_uInt16 nOLEOptions;
+ LanguageType eLanguage;
+ OUString sSortAlgorithm;
+
+ OUString sAuthBrackets;
+ SwCaptionDisplay eCaptionDisplay;
+ SwTOXSortKey eSortKey1;
+ SwTOXSortKey eSortKey2;
+ SwTOXSortKey eSortKey3;
+ sal_uInt8 nLevel;
+ sal_Bool bFromObjectNames : 1;
+ sal_Bool bFromChapter : 1;
+ sal_Bool bReadonly: 1;
+ sal_Bool bLevelFromChapter : 1;
+ sal_Bool bIsAuthSequence :1;
+ sal_Bool bSortByDocument :1;
+
+ //TODO: TemplateNames
+ //const String* pTemplateName = 0, ???
+
+ // forbidden and not implemented.
+ SwTOXDescription();
+ SwTOXDescription(SwTOXDescription&);
+ SwTOXDescription & operator= (SwTOXDescription&);
+
+public:
+ // single argument ctors shall be explicit.
+ explicit SwTOXDescription(TOXTypes eType) :
+ eTOXType(eType),
+ pTitle(0),
+ pTOUName(0),
+ pForm(0),
+ nContent(nsSwTOXElement::TOX_MARK | nsSwTOXElement::TOX_OUTLINELEVEL),
+ nIndexOptions(nsSwTOIOptions::TOI_SAME_ENTRY|nsSwTOIOptions::TOI_FF|nsSwTOIOptions::TOI_CASE_SENSITIVE),
+ nOLEOptions(0),
+ eLanguage((LanguageType)::GetAppLanguage()),
+ eCaptionDisplay(CAPTION_COMPLETE),
+ nLevel(MAXLEVEL),
+ bFromObjectNames(sal_False),
+ bFromChapter(sal_False),
+ bReadonly(sal_True),
+ bLevelFromChapter(sal_False),
+ bIsAuthSequence(sal_False),
+ bSortByDocument(sal_True)
+ {}
+ ~SwTOXDescription()
+ {
+ delete pTitle;
+ delete pForm;
+ delete pTOUName;
+ }
+
+ void SetTOXType(TOXTypes eSet) { eTOXType = eSet;}
+ TOXTypes GetTOXType() const { return eTOXType;}
+
+ const OUString& GetStyleNames(sal_uInt16 nLvl) const
+ {return aStyleNames[nLvl];}
+ void SetStyleNames(const OUString& rSet, sal_uInt16 nLvl)
+ {aStyleNames[nLvl] = rSet; }
+
+ const OUString& GetAutoMarkURL() const { return sAutoMarkURL;}
+ void SetAutoMarkURL(const OUString& rSet) {sAutoMarkURL = rSet;}
+
+ void SetTitle(const OUString& pSet) {delete pTitle; pTitle = new OUString(pSet);}
+ const OUString* GetTitle() const {return pTitle; }
+
+ void SetTOUName(const OUString& pSet) {delete pTOUName; pTOUName = new OUString(pSet);}
+ const OUString* GetTOUName() const {return pTOUName; }
+
+ void SetForm(const SwForm& rSet) {delete pForm; pForm = new SwForm(rSet);}
+ const SwForm* GetForm() const {return pForm;}
+
+ void SetContentOptions(sal_uInt16 nSet) { nContent = nSet;}
+ sal_uInt16 GetContentOptions() const { return nContent;}
+
+ void SetIndexOptions(sal_uInt16 nSet) { nIndexOptions = nSet;}
+ sal_uInt16 GetIndexOptions() const { return nIndexOptions;}
+
+ const OUString& GetMainEntryCharStyle() const {return sMainEntryCharStyle;}
+ void SetMainEntryCharStyle(const OUString& rSet) {sMainEntryCharStyle = rSet;}
+
+ void SetLevel(sal_uInt8 nSet) {nLevel = nSet;}
+ sal_uInt8 GetLevel()const {return nLevel; }
+
+ void SetCreateFromObjectNames(sal_Bool bSet) { bFromObjectNames = bSet;}
+ sal_Bool IsCreateFromObjectNames() const {return bFromObjectNames;}
+
+ const OUString& GetSequenceName() const {return sSequenceName;}
+ void SetSequenceName(const OUString& rSet) {sSequenceName = rSet;}
+
+ SwCaptionDisplay GetCaptionDisplay() const { return eCaptionDisplay;}
+ void SetCaptionDisplay(SwCaptionDisplay eSet) {eCaptionDisplay = eSet;}
+
+ void SetFromChapter(sal_Bool bSet) { bFromChapter = bSet;}
+ sal_Bool IsFromChapter() const {return bFromChapter;}
+
+ void SetReadonly(sal_Bool bSet){bReadonly = bSet;}
+ sal_Bool IsReadonly() const {return bReadonly;}
+
+ sal_uInt16 GetOLEOptions() const {return nOLEOptions;}
+ void SetOLEOptions(sal_uInt16 nOpt) {nOLEOptions = nOpt;}
+
+ sal_Bool IsLevelFromChapter() const {return bLevelFromChapter;}
+ void SetLevelFromChapter(sal_Bool bSet) {bLevelFromChapter = bSet;}
+
+ OUString GetAuthBrackets() const {return sAuthBrackets;}
+ void SetAuthBrackets(const OUString& rSet) {sAuthBrackets = rSet;}
+
+ sal_Bool IsAuthSequence() const {return bIsAuthSequence;}
+ void SetAuthSequence(sal_Bool bSet){bIsAuthSequence = bSet;}
+
+ sal_Bool IsSortByDocument()const {return bSortByDocument ;}
+ void SetSortByDocument(sal_Bool bSet) {bSortByDocument = bSet;}
+
+ void SetSortKeys(SwTOXSortKey eKey1,
+ SwTOXSortKey eKey2,
+ SwTOXSortKey eKey3);
+
+ SwTOXSortKey GetSortKey1() const {return eSortKey1;}
+ SwTOXSortKey GetSortKey2() const {return eSortKey2;}
+ SwTOXSortKey GetSortKey3() const {return eSortKey3;}
+
+ LanguageType GetLanguage() const {return eLanguage;}
+ void SetLanguage(LanguageType nLang) {eLanguage = nLang;}
+
+ const OUString& GetSortAlgorithm()const {return sSortAlgorithm;}
+ void SetSortAlgorithm(const OUString& rSet) {sSortAlgorithm = rSet;}
+
+ void ApplyTo(SwTOXBase& rTOXBase);
+
+};
+
+class SwTOXMarkDescription
+{
+ TOXTypes eTOXType;
+ int nLevel;
+ sal_Bool bMainEntry;
+
+ OUString* pPrimKey;
+ OUString* pSecKey;
+ OUString* pAltStr;
+ OUString* pTOUName;
+
+ OUString* pPhoneticReadingOfAltStr;
+ OUString* pPhoneticReadingOfPrimKey;
+ OUString* pPhoneticReadingOfSecKey;
+
+ // forbidden and not implemented.
+ SwTOXMarkDescription();
+ SwTOXMarkDescription(SwTOXMarkDescription&);
+ SwTOXMarkDescription & operator= (SwTOXMarkDescription&);
+
+public:
+ // single argument ctors shall be explicit.
+ explicit SwTOXMarkDescription(TOXTypes eType) :
+ eTOXType(eType),
+ nLevel(0),
+ bMainEntry(sal_False),
+ pPrimKey(0),
+ pSecKey(0),
+ pAltStr(0),
+ pTOUName(0),
+ pPhoneticReadingOfAltStr(0),
+ pPhoneticReadingOfPrimKey(0),
+ pPhoneticReadingOfSecKey(0)
+ {
+ }
+ ~SwTOXMarkDescription()
+ {
+ delete pPrimKey;
+ delete pSecKey;
+ delete pAltStr;
+ delete pTOUName;
+ delete pPhoneticReadingOfAltStr;
+ delete pPhoneticReadingOfPrimKey;
+ delete pPhoneticReadingOfSecKey;
+ }
+
+ TOXTypes GetTOXType()const {return eTOXType;}
+
+ void SetLevel(int nSet) {nLevel = nSet;}
+ int GetLevel() const {return nLevel;}
+
+ void SetMainEntry(sal_Bool bSet) {bMainEntry = bSet;}
+ sal_Bool IsMainEntry() const {return bMainEntry;}
+
+ void SetPrimKey(const OUString& rSet)
+ {delete pPrimKey; pPrimKey = new OUString(rSet);}
+ const OUString* GetPrimKey() const {return pPrimKey;}
+
+ void SetSecKey(const OUString& rSet)
+ {delete pSecKey; pSecKey = new OUString(rSet);}
+ const OUString* GetSecKey() const { return pSecKey; }
+
+ void SetAltStr(const OUString& rSet)
+ {delete pAltStr; pAltStr = new OUString(rSet);}
+ const OUString* GetAltStr() const { return pAltStr; }
+
+ void SetTOUName(const OUString& rSet)
+ {delete pTOUName; pTOUName = new OUString(rSet);}
+ const OUString* GetTOUName() const {return pTOUName;}
+
+ void SetPhoneticReadingOfAltStr(const OUString& rSet)
+ {delete pPhoneticReadingOfAltStr; pPhoneticReadingOfAltStr = new OUString(rSet);}
+ const OUString* GetPhoneticReadingOfAltStr() const { return pPhoneticReadingOfAltStr; }
+
+ void SetPhoneticReadingOfPrimKey(const OUString& rSet)
+ {delete pPhoneticReadingOfPrimKey; pPhoneticReadingOfPrimKey = new OUString(rSet);}
+ const OUString* GetPhoneticReadingOfPrimKey() const { return pPhoneticReadingOfPrimKey; }
+
+ void SetPhoneticReadingOfSecKey(const OUString& rSet)
+ {delete pPhoneticReadingOfSecKey; pPhoneticReadingOfSecKey = new OUString(rSet);}
+ const OUString* GetPhoneticReadingOfSecKey() const { return pPhoneticReadingOfSecKey; }
+};
+
+class SW_DLLPUBLIC SwTOXMgr
+{
+ SwWrtShell* pSh;
+ SwTOXMark* pCurTOXMark;
+ SwTOXMarks aCurMarks;
+
+ SAL_DLLPRIVATE sal_uInt16 GetUserTypeID(const OUString& rStr);
+
+public:
+ // single argument ctors shall be explicit.
+ explicit SwTOXMgr(SwWrtShell* pShell);
+
+ // methods for directory marks
+
+ void InsertTOXMark(const SwTOXMarkDescription& rDesc);
+
+ void UpdateTOXMark(const SwTOXMarkDescription& rDesc);
+
+ void DeleteTOXMark();
+ void NextTOXMark(sal_Bool bSame=sal_False);
+ void PrevTOXMark(sal_Bool bSame=sal_False);
+
+ // get current TOXmarks
+ sal_uInt16 GetTOXMarks();
+ sal_uInt16 GetTOXMarkCount();
+ SwTOXMark* GetTOXMark(sal_uInt16 nId);
+ SwTOXMark* GetCurTOXMark();
+ void SetCurTOXMark(sal_uInt16 nId);
+
+ // methods for directories
+
+ sal_Bool UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = 0, const SfxItemSet* pSet = 0);
+
+ const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const;
+ const SwTOXBase* GetCurTOX();
+
+};
+
+/*--------------------------------------------------------------------
+ Description: inlines
+ --------------------------------------------------------------------*/
+inline sal_uInt16 SwTOXMgr::GetTOXMarkCount()
+ { return aCurMarks.size(); }
+
+inline SwTOXMark* SwTOXMgr::GetCurTOXMark()
+ { return pCurTOXMark; }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/uiborder.hxx b/sw/source/core/uibase/inc/uiborder.hxx
new file mode 100644
index 000000000000..78adaeb7846d
--- /dev/null
+++ b/sw/source/core/uibase/inc/uiborder.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef _UIBORDER_HXX
+#define _UIBORDER_HXX
+
+#include <sfx2/basedlgs.hxx>
+class Window;
+class SfxItemSet;
+
+class SwBorderDlg : public SfxSingleTabDialog
+{
+public:
+
+ // nType may be:
+ // SW_BORDER_MODE_PARA
+ // SW_BORDER_MODE_TABLE
+ // SW_BORDER_MODE_FRAME
+
+ SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType);
+ ~SwBorderDlg();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/uiitems.hxx b/sw/source/core/uibase/inc/uiitems.hxx
new file mode 100644
index 000000000000..033adf755882
--- /dev/null
+++ b/sw/source/core/uibase/inc/uiitems.hxx
@@ -0,0 +1,119 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_UIITEMS_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_UIITEMS_HXX
+
+#include <svl/intitem.hxx>
+#include "swdllapi.h"
+#include "cmdid.h"
+#include "pagedesc.hxx"
+
+class SwNumRule;
+class IntlWrapper;
+class SwPaM;
+
+/*--------------------------------------------------------------------
+ Description: container for FootNote
+ --------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwPageFtnInfoItem : public SfxPoolItem
+{
+ SwPageFtnInfo aFtnInfo;
+
+public:
+
+ SwPageFtnInfoItem(const sal_uInt16 nId, SwPageFtnInfo& rInfo);
+ SwPageFtnInfoItem(const SwPageFtnInfoItem& rItem );
+ ~SwPageFtnInfoItem();
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual bool operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ OUString &rText,
+ const IntlWrapper* pIntl = 0 ) const;
+
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+
+ SwPageFtnInfo& GetPageFtnInfo() { return aFtnInfo; }
+ const SwPageFtnInfo& GetPageFtnInfo() const { return aFtnInfo; }
+ void SetPageFtnInfo(SwPageFtnInfo& rInf) { aFtnInfo = rInf; }
+};
+
+class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem
+{
+ void* pMisc;
+
+public:
+ SwPtrItem( const sal_uInt16 nId = FN_PARAM_GRF_DIALOG, void* pPtr = 0);
+ SwPtrItem( const SwPtrItem& rItem );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual bool operator==( const SfxPoolItem& ) const;
+
+ void SetValue(void * pPtr) { pMisc= pPtr; }
+ void* GetValue() const { return pMisc; }
+};
+
+class SW_DLLPUBLIC SwUINumRuleItem : public SfxPoolItem
+{
+ SwNumRule* pRule;
+
+public:
+ SwUINumRuleItem( const SwNumRule& rRule, const sal_uInt16 = FN_PARAM_ACT_NUMBER);
+ SwUINumRuleItem( const SwUINumRuleItem& rItem );
+ virtual ~SwUINumRuleItem();
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual bool operator==( const SfxPoolItem& ) const;
+
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+
+ const SwNumRule* GetNumRule() const { return pRule; }
+ SwNumRule* GetNumRule() { return pRule; }
+};
+
+class SwBackgroundDestinationItem : public SfxUInt16Item
+{
+public:
+ SwBackgroundDestinationItem(sal_uInt16 nWhich, sal_uInt16 nValue);
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+};
+
+class SW_DLLPUBLIC SwPaMItem : public SfxPoolItem
+{
+ SwPaM* m_pPaM;
+
+public:
+ SwPaMItem( const sal_uInt16 nId = FN_PARAM_PAM, SwPaM* pPaM = NULL);
+ SwPaMItem( const SwPaMItem& rItem );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual bool operator==( const SfxPoolItem& ) const;
+
+ void SetValue(SwPaM * pPaM) { m_pPaM= pPaM; }
+ SwPaM* GetValue() const { return m_pPaM; }
+};
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_UIITEMS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/uinums.hxx b/sw/source/core/uibase/inc/uinums.hxx
new file mode 100644
index 000000000000..a474dbd88bd1
--- /dev/null
+++ b/sw/source/core/uibase/inc/uinums.hxx
@@ -0,0 +1,123 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_UINUMS_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_UINUMS_HXX
+
+#include <numrule.hxx>
+#include "swdllapi.h"
+#include <boost/ptr_container/ptr_vector.hpp>
+
+class SfxPoolItem;
+class SwWrtShell;
+class SvStream;
+
+#define MAX_NUM_RULES 9
+
+typedef boost::ptr_vector<SfxPoolItem> _SwNumFmtsAttrs;
+
+class SW_DLLPUBLIC SwNumRulesWithName
+{
+ OUString maName;
+ // the NumRule's formats _have_ to be independent of a document
+ // (They should always be there!)
+ class SAL_DLLPRIVATE _SwNumFmtGlobal
+ {
+ SwNumFmt aFmt;
+ OUString sCharFmtName;
+ sal_uInt16 nCharPoolId;
+ _SwNumFmtsAttrs aItems;
+
+ _SwNumFmtGlobal& operator=( const _SwNumFmtGlobal& );
+
+ public:
+ _SwNumFmtGlobal( const SwNumFmt& rFmt );
+ _SwNumFmtGlobal( const _SwNumFmtGlobal& );
+ _SwNumFmtGlobal( SvStream&, sal_uInt16 nVersion );
+ ~_SwNumFmtGlobal();
+
+ void Store( SvStream& );
+ void ChgNumFmt( SwWrtShell& rSh, SwNumFmt& rChg ) const;
+ };
+
+ _SwNumFmtGlobal* aFmts[ MAXLEVEL ];
+
+protected:
+ void SetName(const OUString& rSet) {maName = rSet;}
+
+public:
+ SwNumRulesWithName(const SwNumRule &, const OUString &);
+ SwNumRulesWithName( const SwNumRulesWithName & );
+ SwNumRulesWithName(SvStream &, sal_uInt16 nVersion);
+ ~SwNumRulesWithName();
+
+ const SwNumRulesWithName &operator=(const SwNumRulesWithName &);
+
+ const OUString& GetName() const { return maName; }
+ void MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const;
+
+ void Store( SvStream& );
+};
+
+class SwBaseNumRules
+{
+public:
+ enum { nMaxRules = MAX_NUM_RULES }; // currently 9 defined forms
+protected:
+ SwNumRulesWithName *pNumRules[ MAX_NUM_RULES ];
+ OUString sFileName;
+ sal_uInt16 nVersion;
+ sal_Bool bModified;
+
+ virtual int Load(SvStream&);
+ virtual sal_Bool Store(SvStream&);
+
+ void Init();
+
+public:
+ SwBaseNumRules(const OUString& rFileName);
+ virtual ~SwBaseNumRules();
+
+ inline const SwNumRulesWithName* GetRules(sal_uInt16 nIdx) const;
+ virtual void ApplyNumRules(
+ const SwNumRulesWithName &rCopy,
+ sal_uInt16 nIdx);
+
+};
+
+class SwChapterNumRules : public SwBaseNumRules
+{
+
+public:
+ SwChapterNumRules();
+ virtual ~SwChapterNumRules();
+
+ virtual void ApplyNumRules( const SwNumRulesWithName &rCopy,
+ sal_uInt16 nIdx);
+};
+
+// INLINE METHODE --------------------------------------------------------
+inline const SwNumRulesWithName *SwBaseNumRules::GetRules(sal_uInt16 nIdx) const
+{
+ OSL_ENSURE(nIdx < nMaxRules, "Array der NumRules ueberindiziert.");
+ return pNumRules[nIdx];
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/uitool.hxx b/sw/source/core/uibase/inc/uitool.hxx
new file mode 100644
index 000000000000..211af6f33f11
--- /dev/null
+++ b/sw/source/core/uibase/inc/uitool.hxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_UITOOL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_UITOOL_HXX
+
+#include <tools/wintypes.hxx>
+#include <vcl/field.hxx>
+#include <swtypes.hxx>
+#include "swdllapi.h"
+
+class MetricFormatter;
+class SfxItemSet;
+class SwPageDesc;
+class SvxTabStopItem;
+class SwWrtShell;
+class ListBox;
+class SwDocShell;
+class SwFrmFmt;
+class SwTabCols;
+class DateTime;
+class SfxViewFrame;
+
+// switch a metric
+SW_DLLPUBLIC void SetMetric(MetricFormatter& rCtrl, FieldUnit eUnit);
+
+// fill BoxInfo attribute
+SW_DLLPUBLIC void PrepareBoxInfo(SfxItemSet& rSet, const SwWrtShell& rSh);
+
+// Modes for attribute conversion
+#define CONV_ATTR_STD 1 // Standard character dialog
+#define CONV_ATTR_ENV 2 // Character dialog opened from envelope dialog
+
+/**
+ * Convert character specific attributes to general ones used by tab pages.
+ *
+ * @param[in,out] rSet the set in which character attributes are stored
+ * @param[in] nMode specify the dialog which will be called after conversion
+**/
+SW_DLLPUBLIC void ConvertAttrCharToGen(SfxItemSet& rSet, const sal_uInt8 nMode);
+
+/**
+ * Convert general attributes to the corresponding character attributes.
+ * This method is used after executed a character dialog.
+ *
+ * @param[in,out] rSet the set in which character attributes are stored
+ * @param[in] nMode specify the dialog which was called before
+**/
+SW_DLLPUBLIC void ConvertAttrGenToChar(SfxItemSet& rSet, const sal_uInt8 nMode);
+
+// SfxItemSets <-> PageDesc
+void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc );
+void PageDescToItemSet( const SwPageDesc& rPageDesc, SfxItemSet& rSet);
+
+// fill tabs with default tabs
+SW_DLLPUBLIC void MakeDefTabs(SwTwips nDefDist, SvxTabStopItem& rTabs);
+
+// erase DefaultTabs from TabStopArray
+//void EraseDefTabs(SvxTabStopItem& rTabs);
+
+// determine space between 1st and 2nd element
+SW_DLLPUBLIC sal_uInt16 GetTabDist(const SvxTabStopItem& rTabs);
+
+// determine whether a Sfx-PageDesc combination exists in the set
+// and set this in the set and delete the transport items
+// (PageBreak & PageModel) from the set
+void SwToSfxPageDescAttr( SfxItemSet& rSet );
+void SfxToSwPageDescAttr( const SwWrtShell& rShell, SfxItemSet& rSet );
+
+SW_DLLPUBLIC FieldUnit GetDfltMetric(sal_Bool bWeb);
+void SetDfltMetric(FieldUnit eMetric, sal_Bool bWeb);
+
+SW_DLLPUBLIC sal_Bool HasCharUnit( sal_Bool bWeb );
+void SetApplyCharUnit(sal_Bool bApplyChar, sal_Bool bWeb);
+
+// ListBox mit allen Zeichenvorlagen fuellen - ausser Standard!
+SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted = false, bool bWithDefault = false);
+
+//inserts a string sorted into a ListBox,
+SW_DLLPUBLIC sal_uInt16 InsertStringSorted(const OUString& rEntry, ListBox& rToFill, sal_uInt16 nOffset);
+
+// Get table width and alignement
+SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent,
+ SwWrtShell* pSh );
+
+OUString GetAppLangDateTimeString( const DateTime& );
+
+// search for a command string withing the menu structure and execute it
+// at the dispatcher if there is one, if executed return true
+bool ExecuteMenuCommand( PopupMenu& rMenu, SfxViewFrame& rViewFrame, sal_uInt16 nId );
+
+#endif // INCLUDED_SW_SOURCE_UI_INC_UITOOL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/uivwimp.hxx b/sw/source/core/uibase/inc/uivwimp.hxx
new file mode 100644
index 000000000000..075dbf626708
--- /dev/null
+++ b/sw/source/core/uibase/inc/uivwimp.hxx
@@ -0,0 +1,173 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_UIVWIMP_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_UIVWIMP_HXX
+
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <view.hxx>
+
+#include <sfx2/objsh.hxx>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/weakref.hxx>
+
+class SwXTextView;
+class SfxRequest;
+class SwTransferable;
+class SfxRequest;
+
+namespace sfx2 { class DocumentInserter; }
+namespace com{ namespace sun{ namespace star {
+ namespace frame {
+ class XDispatchProviderInterceptor;
+ }
+ namespace lang {
+ class XUnoTunnel;
+ }
+}}}
+
+class SwScannerEventListener : public ::cppu::WeakImplHelper1<
+ ::com::sun::star::lang::XEventListener >
+{
+ SwView* pView;
+
+public:
+
+ SwScannerEventListener( SwView& rView ) : pView( &rView ) {}
+ virtual ~SwScannerEventListener();
+
+ // XEventListener
+ virtual void SAL_CALL disposing(
+ const ::com::sun::star::lang::EventObject& rEventObject ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+
+ void ViewDestroyed() { pView = 0; }
+};
+
+// --------------------------- Clipboard EventListener ------------------
+class SwClipboardChangeListener : public ::cppu::WeakImplHelper1<
+ ::com::sun::star::datatransfer::clipboard::XClipboardListener >
+{
+ SwView* pView;
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& rEventObject )
+ throw ( com::sun::star::uno::RuntimeException, std::exception );
+
+ // XClipboardListener
+ virtual void SAL_CALL changedContents( const ::com::sun::star::datatransfer::clipboard::ClipboardEvent& rEventObject )
+ throw (com::sun::star::uno::RuntimeException,
+ std::exception);
+
+public:
+ SwClipboardChangeListener( SwView& rView ) : pView( &rView ) {}
+ virtual ~SwClipboardChangeListener();
+
+ void ViewDestroyed() { pView = 0; }
+
+ void AddRemoveListener( sal_Bool bAdd );
+};
+
+class SwMailMergeConfigItem;
+
+class SwView_Impl
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > xScanEvtLstnr;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > xClipEvtLstnr;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > xDisProvInterceptor;
+ ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier > *pxXTextView; // UNO object
+ com::sun::star::uno::WeakReference< com::sun::star::lang::XUnoTunnel > xTransferable;
+
+ // temporary document for printing text of selection / multi selection
+ // in PDF export.
+ SfxObjectShellLock xTmpSelDocSh;
+
+ SwView* pView;
+ SwScannerEventListener* pScanEvtLstnr;
+ SwClipboardChangeListener* pClipEvtLstnr;
+ ShellModes eShellMode;
+
+ SwMailMergeConfigItem* pConfigItem;
+ sal_uInt16 nMailMergeRestartPage;
+ sal_Bool bMailMergeSourceView;
+
+ sfx2::DocumentInserter* m_pDocInserter;
+ SfxRequest* m_pRequest;
+ sal_Int16 m_nParam;
+
+ Point m_aEditingPosition;
+ bool m_bSelectObject;
+ bool m_bEditingPositionSet;
+
+public:
+ SwView_Impl(SwView* pShell);
+ ~SwView_Impl();
+
+ void SetShellMode(ShellModes eSet);
+
+ ::com::sun::star::view::XSelectionSupplier* GetUNOObject();
+ SwXTextView* GetUNOObject_Impl();
+ void Invalidate();
+
+ ShellModes GetShellMode() {return eShellMode;}
+
+ void ExecuteScan(SfxRequest& rReq);
+ SwScannerEventListener& GetScannerEventListener();
+
+ void AddClipboardListener();
+
+ SfxObjectShellLock& GetTmpSelectionDoc() { return xTmpSelDocSh; }
+
+ void AddTransferable(SwTransferable& rTransferable);
+
+ void SetMailMergeConfigItem(SwMailMergeConfigItem* pItem,
+ sal_uInt16 nRestart, sal_Bool bIsSource)
+ { pConfigItem = pItem;
+ nMailMergeRestartPage = nRestart;
+ bMailMergeSourceView = bIsSource;
+ }
+ SwMailMergeConfigItem* GetMailMergeConfigItem() {return pConfigItem;}
+ sal_uInt16 GetMailMergeRestartPage() const {return nMailMergeRestartPage;}
+ sal_Bool IsMailMergeSourceView() const { return bMailMergeSourceView; }
+
+ //#i33307# restore editing position
+ void SetRestorePosition(const Point& rCrsrPos, bool bSelectObj)
+ {
+ m_aEditingPosition = rCrsrPos;
+ m_bSelectObject = bSelectObj;
+ m_bEditingPositionSet = true;
+ }
+ bool GetRestorePosition(Point& rCrsrPos, bool& rbSelectObj)
+ {
+ rCrsrPos = m_aEditingPosition;
+ rbSelectObj = m_bSelectObject;
+ return m_bEditingPositionSet;
+ }
+
+ void StartDocumentInserter( const OUString& rFactory, const Link& rEndDialogHdl );
+ SfxMedium* CreateMedium();
+ void InitRequest( const SfxRequest& rRequest );
+
+ inline SfxRequest* GetRequest() const { return m_pRequest; }
+ inline sal_Int16 GetParam() const { return m_nParam; }
+ inline void SetParam( sal_Int16 nParam ) { m_nParam = nParam; }
+};
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/unoatxt.hxx b/sw/source/core/uibase/inc/unoatxt.hxx
new file mode 100644
index 000000000000..3a27de5d55e7
--- /dev/null
+++ b/sw/source/core/uibase/inc/unoatxt.hxx
@@ -0,0 +1,283 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_UNOATXT_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_UNOATXT_HXX
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/document/XEventsSupplier.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/text/XAutoTextGroup.hpp>
+#include <com/sun/star/text/XAutoTextEntry.hpp>
+#include <com/sun/star/text/XAutoTextContainer2.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <svl/itemprop.hxx>
+#include <svl/lstner.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase5.hxx>
+#include <cppuhelper/implbase6.hxx>
+#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::WeakImplHelper2
+<
+ ::com::sun::star::text::XAutoTextContainer2,
+ ::com::sun::star::lang::XServiceInfo
+>
+{
+ 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, std::exception);
+ 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, std::exception );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL hasByName(const OUString& Name) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+
+ //XAutoTextContainer
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextGroup > SAL_CALL insertNewByName(const OUString& aGroupName) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual void SAL_CALL removeByName(const OUString& aGroupName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XServiceInfo
+ virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+};
+
+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;
+ OUString sName;
+ OUString 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 OUString& rName, SwGlossaries* pGloss);
+
+ 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, std::exception);
+
+ //XAutoTextGroup
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getTitles(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual void SAL_CALL renameByName(const OUString& aElementName, const OUString& aNewElementName, const OUString& aNewElementTitle) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XAutoTextEntry > SAL_CALL insertNewByName(const OUString& aName, const 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, std::exception );
+ virtual void SAL_CALL removeByName(const OUString& aEntryName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XNamed
+ virtual OUString SAL_CALL getName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual void SAL_CALL setName(const OUString& Name_) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ 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, std::exception );
+
+ //XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL hasByName(const OUString& Name) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+
+ //XServiceInfo
+ virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setPropertyValue( const 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, std::exception);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL addPropertyChangeListener( const 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, std::exception);
+ virtual void SAL_CALL removePropertyChangeListener( const 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, std::exception);
+ virtual void SAL_CALL addVetoableChangeListener( const 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, std::exception);
+ virtual void SAL_CALL removeVetoableChangeListener( const 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, std::exception);
+
+ void Invalidate();
+};
+
+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;
+ OUString sGroupName;
+ OUString 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 OUString& rGroupName, const OUString& 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, std::exception);
+
+ //XText
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ 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, std::exception );
+ virtual void SAL_CALL insertString(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange, const OUString& aString, sal_Bool bAbsorb) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ 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, std::exception );
+ 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, std::exception );
+ 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, std::exception);
+
+ //XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual OUString SAL_CALL getString(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual void SAL_CALL setString(const OUString& aString) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XAutoTextEntry
+ virtual void SAL_CALL applyTo(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xRange)throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XServiceInfo
+ virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ // XEventsSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents( ) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ void Invalidate() {pGlossaries = 0;}
+ const SwGlossaries* GetGlossaries() { return pGlossaries; }
+ const OUString& GetGroupName() {return sGroupName;}
+ const OUString& GetEntryName() {return sEntryName;}
+};
+
+/** Implement the XNameAccess for the AutoText events */
+class SwAutoTextEventDescriptor : public SvBaseEventDescriptor
+{
+ OUString sSwAutoTextEventDescriptor;
+
+ SwXAutoTextEntry& rAutoTextEntry;
+
+ using SvBaseEventDescriptor::replaceByName;
+ using SvBaseEventDescriptor::getByName;
+
+public:
+ SwAutoTextEventDescriptor( SwXAutoTextEntry& rAutoText );
+
+ ~SwAutoTextEventDescriptor();
+
+ virtual OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+protected:
+
+ virtual void replaceByName(
+ const sal_uInt16 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 sal_uInt16 nEvent ) /// item ID of event
+ throw(
+ ::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/unodispatch.hxx b/sw/source/core/uibase/inc/unodispatch.hxx
new file mode 100644
index 000000000000..f5992c1e0465
--- /dev/null
+++ b/sw/source/core/uibase/inc/unodispatch.hxx
@@ -0,0 +1,128 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_UNODISPATCH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_UNODISPATCH_HXX
+
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <list>
+#include <comphelper/solarmutex.hxx>
+#include <osl/mutex.hxx>
+
+class SwView;
+
+class SwXDispatchProviderInterceptor : public cppu::WeakImplHelper3
+<
+ ::com::sun::star::frame::XDispatchProviderInterceptor,
+ ::com::sun::star::lang::XEventListener,
+ ::com::sun::star::lang::XUnoTunnel
+>
+{
+ class DispatchMutexLock_Impl
+ {
+ //::osl::MutexGuard aGuard; #102295# solar mutex has to be used currently
+ osl::Guard< comphelper::SolarMutex > aGuard;
+ DispatchMutexLock_Impl();
+ public:
+ DispatchMutexLock_Impl(SwXDispatchProviderInterceptor&);
+ ~DispatchMutexLock_Impl();
+ };
+ friend class DispatchMutexLock_Impl;
+
+// ::osl::Mutex m_aMutex;#102295# solar mutex has to be used currently
+
+ // the component which's dispatches we're intercepting
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterception> m_xIntercepted;
+
+ // chaining
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> m_xSlaveDispatcher;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider> m_xMasterDispatcher;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch> m_xDispatch;
+
+ SwView* m_pView;
+
+public:
+ SwXDispatchProviderInterceptor(SwView& rView);
+ ~SwXDispatchProviderInterceptor();
+
+ //XDispatchProvider
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( const ::com::sun::star::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+
+ //XDispatchProviderInterceptor
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider( ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setSlaveDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewDispatchProvider ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider( ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setMasterDispatchProvider( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& xNewSupplier ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+
+ //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, std::exception);
+
+ // view destroyed
+ void Invalidate();
+};
+
+struct StatusStruct_Impl
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener> xListener;
+ ::com::sun::star::util::URL aURL;
+};
+typedef std::list< StatusStruct_Impl > StatusListenerList;
+class SwXDispatch : public cppu::WeakImplHelper2
+<
+ ::com::sun::star::frame::XDispatch,
+ ::com::sun::star::view::XSelectionChangeListener
+>
+{
+ SwView* m_pView;
+ StatusListenerList m_aListenerList;
+ sal_Bool m_bOldEnable;
+ sal_Bool m_bListenerAdded;
+public:
+ SwXDispatch(SwView& rView);
+ ~SwXDispatch();
+
+ virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs )
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL addStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& xControl, const ::com::sun::star::util::URL& aURL ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+
+ //XSelectionChangeListener
+ virtual void SAL_CALL selectionChanged( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+
+ //XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+
+ static const sal_Char* GetDBChangeURL();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/unomailmerge.hxx b/sw/source/core/uibase/inc/unomailmerge.hxx
new file mode 100644
index 000000000000..211c2cbfe41b
--- /dev/null
+++ b/sw/source/core/uibase/inc/unomailmerge.hxx
@@ -0,0 +1,191 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_UNOMAILMERGE_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_UNOMAILMERGE_HXX
+
+#include <cppuhelper/implbase6.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <unotools/configitem.hxx>
+
+#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 <com/sun/star/util/XCancellable.hpp>
+#include <svl/itemprop.hxx>
+#include <sfx2/objsh.hxx>
+
+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;
+ }
+
+}}}
+
+// uses templates from <cppuhelper/interfacecontainer.h>
+// and <unotools/configitem.hxx>
+
+// helper function call class
+struct PropHashType_Impl
+{
+ size_t operator()(const sal_Int32 &s) const { return s; }
+};
+
+typedef cppu::OMultiTypeInterfaceContainerHelperVar
+ <
+ sal_Int32,
+ PropHashType_Impl
+ > OPropertyListenerContainerHelper;
+
+class SwNewDBMgr;
+class MailMergeExecuteFinalizer;
+
+class SwXMailMerge :
+ public cppu::WeakImplHelper6
+ <
+ com::sun::star::task::XJob,
+ com::sun::star::util::XCancellable,
+ com::sun::star::beans::XPropertySet,
+ com::sun::star::text::XMailMergeBroadcaster,
+ com::sun::star::lang::XComponent,
+ com::sun::star::lang::XServiceInfo
+ >
+{
+ friend class MailMergeExecuteFinalizer;
+
+ cppu::OInterfaceContainerHelper aEvtListeners;
+ cppu::OInterfaceContainerHelper aMergeListeners;
+ OPropertyListenerContainerHelper aPropListeners;
+
+ const SfxItemPropertySet* pPropSet;
+
+ SfxObjectShellRef xDocSh; // the document
+
+ OUString 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;
+ OUString aDataSourceName;
+ OUString aDataCommand;
+ OUString aFilter;
+ OUString aDocumentURL;
+ OUString aOutputURL;
+ OUString aFileNamePrefix;
+ sal_Int32 nDataCommandType;
+ sal_Int16 nOutputType;
+ sal_Bool bEscapeProcessing;
+ sal_Bool bSinglePrintJobs;
+ sal_Bool bFileNameFromColumn;
+
+ OUString sInServerPassword;
+ OUString sOutServerPassword;
+ OUString sSubject;
+ OUString sAddressFromColumn;
+ OUString sMailBody;
+ OUString sAttachmentName;
+ OUString sAttachmentFilter;
+ com::sun::star::uno::Sequence< OUString > aCopiesTo;
+ com::sun::star::uno::Sequence< OUString > aBlindCopiesTo;
+ sal_Bool bSendAsHTML;
+ sal_Bool bSendAsAttachment;
+
+ com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aPrintSettings;
+
+ sal_Bool bSaveAsSingleFile;
+ OUString sSaveFilter;
+ OUString sSaveFilterOptions;
+ com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSaveFilterData;
+
+ sal_Bool bDisposing;
+ SwNewDBMgr *m_pMgr;
+
+ 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,
+ std::exception);
+
+ // XCancellable
+ virtual void SAL_CALL cancel() throw (com::sun::star::uno::RuntimeException, std::exception);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setPropertyValue( const 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, std::exception);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL addPropertyChangeListener( const 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, std::exception);
+ virtual void SAL_CALL removePropertyChangeListener( const 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, std::exception);
+ virtual void SAL_CALL addVetoableChangeListener( const 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, std::exception);
+ virtual void SAL_CALL removeVetoableChangeListener( const 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, std::exception);
+
+ // XMailMergeBroadcaster
+ virtual void SAL_CALL addMailMergeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XMailMergeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL removeMailMergeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XMailMergeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+
+ // XComponent
+ virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+};
+
+extern com::sun::star::uno::Sequence< OUString > SAL_CALL SwXMailMerge_getSupportedServiceNames() throw();
+extern 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
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/unomod.hxx b/sw/source/core/uibase/inc/unomod.hxx
new file mode 100644
index 000000000000..1d1c8823eb7c
--- /dev/null
+++ b/sw/source/core/uibase/inc/unomod.hxx
@@ -0,0 +1,161 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_UNOMOD_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_UNOMOD_HXX
+
+#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>
+#include <cppuhelper/implbase3.hxx>
+#include <comphelper/ChainablePropertySet.hxx>
+#include <comphelper/SettingsHelper.hxx>
+#include <usrpref.hxx>
+
+class SwView;
+class SwViewOption;
+class SwPrintData;
+class SwDoc;
+
+::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::WeakImplHelper3
+<
+ ::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, std::exception );
+
+ //XPrintSettings
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getPrintSettings(void)
+ throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XServiceInfo
+ virtual OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName)
+ throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void)
+ throw( ::com::sun::star::uno::RuntimeException, std::exception );
+};
+
+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 OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName)
+ throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void)
+ throw( ::com::sun::star::uno::RuntimeException, std::exception );
+};
+
+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 OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ sal_Bool IsValid() const {return bObjectValid;}
+ void Invalidate() {bObjectValid = sal_False;}
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/unotools.hxx b/sw/source/core/uibase/inc/unotools.hxx
new file mode 100644
index 000000000000..0b85820a62bb
--- /dev/null
+++ b/sw/source/core/uibase/inc/unotools.hxx
@@ -0,0 +1,121 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_UNOTOOLS_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_UNOTOOLS_HXX
+
+#include <vcl/button.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/layout.hxx>
+#include <actctrl.hxx>
+#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 <tools/resary.hxx>
+#include "swdllapi.h"
+
+class SwOneExampleFrame;
+
+class SwFrmCtrlWindow : public VclEventBox
+{
+ SwOneExampleFrame* pExampleFrame;
+public:
+ SwFrmCtrlWindow(Window* pParent, SwOneExampleFrame* pFrame);
+
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual Size GetOptimalSize() const;
+ virtual void Resize();
+};
+
+class MenuResource : public Resource
+{
+ ResStringArray aMenuArray;
+
+public:
+ MenuResource(const ResId& rResId);
+
+ ResStringArray& GetMenuArray() {return aMenuArray;}
+};
+
+#define EX_SHOW_ONLINE_LAYOUT 0x001
+
+// hard zoom value
+#define EX_SHOW_BUSINESS_CARDS 0x02
+//don't modify page size
+#define EX_SHOW_DEFAULT_PAGE 0x04
+
+class SwView;
+
+class SW_DLLPUBLIC SwOneExampleFrame
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > _xControl;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > _xModel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > _xController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > _xCursor;
+
+ SwFrmCtrlWindow aTopWindow;
+ Timer aLoadedTimer;
+ Link aInitializedLink;
+
+ MenuResource aMenuRes;
+ OUString sArgumentURL;
+
+ SwView* pModuleView;
+
+ sal_uInt32 nStyleFlags;
+
+ sal_Bool bIsInitialized;
+ sal_Bool bServiceAvailable;
+
+ static bool bShowServiceNotAvailableMessage;
+
+ SAL_DLLPRIVATE DECL_LINK( TimeoutHdl, Timer* );
+ SAL_DLLPRIVATE DECL_LINK( PopupHdl, Menu* );
+
+ SAL_DLLPRIVATE void CreateControl();
+ SAL_DLLPRIVATE void DisposeControl();
+
+public:
+ SwOneExampleFrame(Window& rWin,
+ sal_uInt32 nStyleFlags = EX_SHOW_ONLINE_LAYOUT,
+ const Link* pInitalizedLink = 0,
+ OUString* pURL = 0);
+ ~SwOneExampleFrame();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > & GetControl() {return _xControl; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & GetModel() {return _xModel;}
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > & GetController() {return _xController;}
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > & GetTextCursor() {return _xCursor;}
+
+ void ClearDocument( sal_Bool bStartTimer = sal_False );
+
+ sal_Bool IsInitialized() const {return bIsInitialized;}
+ sal_Bool IsServiceAvailable() const {return bServiceAvailable;}
+
+ void CreatePopup(const Point& rPt);
+
+ static void CreateErrorMessage(Window* pParent);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/unotxvw.hxx b/sw/source/core/uibase/inc/unotxvw.hxx
new file mode 100644
index 000000000000..76f370ca1eba
--- /dev/null
+++ b/sw/source/core/uibase/inc/unotxvw.hxx
@@ -0,0 +1,338 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_UNOTXVW_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_UNOTXVW_HXX
+#include <sfx2/sfxbasecontroller.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XRubySelection.hpp>
+#include <com/sun/star/view/XFormLayerAccess.hpp>
+#include <com/sun/star/view/XScreenCursor.hpp>
+#include <com/sun/star/view/XViewSettingsSupplier.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/view/XLineCursor.hpp>
+#include <com/sun/star/view/XViewCursor.hpp>
+#include <com/sun/star/text/XPageCursor.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/lang/XServiceInfo.hpp>
+#include <com/sun/star/datatransfer/XTransferableSupplier.hpp>
+#include <cppuhelper/implbase8.hxx>
+#include <svl/itemprop.hxx>
+#include "calbck.hxx"
+#include "TextCursorHelper.hxx"
+#include <comphelper/uno3.hxx>
+
+#include <sfx2/objsh.hxx>
+
+class SdrObject;
+class SwView;
+
+class SwXTextView :
+ public ::com::sun::star::view::XSelectionSupplier,
+ public ::com::sun::star::lang::XServiceInfo,
+ public ::com::sun::star::view::XFormLayerAccess,
+ public ::com::sun::star::text::XTextViewCursorSupplier,
+ public ::com::sun::star::text::XRubySelection,
+ public ::com::sun::star::view::XViewSettingsSupplier,
+ public ::com::sun::star::beans::XPropertySet,
+ public ::com::sun::star::datatransfer::XTransferableSupplier,
+ public SfxBaseController
+{
+ ::cppu::OInterfaceContainerHelper m_SelChangedListeners;
+
+ SwView* m_pView;
+ const SfxItemPropertySet* m_pPropSet; // property map for SwXTextView properties
+ // (not related to pxViewSettings!)
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxViewSettings;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextViewCursor > * pxTextViewCursor;
+
+ SdrObject* GetControl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & Model,
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& xToFill );
+
+protected:
+ virtual ~SwXTextView();
+public:
+ SwXTextView(SwView* pSwView);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ 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, std::exception);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+
+ //XSelectionSupplier
+ virtual ::com::sun::star::uno::Any SAL_CALL getSelection()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual sal_Bool SAL_CALL select(const ::com::sun::star::uno::Any& rInterface)
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL addSelectionChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener > & xListener) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual void SAL_CALL removeSelectionChangeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener > & xListener) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ // XFormLayerAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > SAL_CALL getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& Form ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual ::sal_Bool SAL_CALL isFormDesignMode( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setFormDesignMode( ::sal_Bool DesignMode ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+
+ // XControlAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > SAL_CALL getControl(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > & Model) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XTextViewCursorSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextViewCursor > SAL_CALL getViewCursor(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XViewSettings
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getViewSettings(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XRubySelection
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > > SAL_CALL getRubyList( sal_Bool bAutomatic )
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+
+ virtual void SAL_CALL setRubyList(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > >& RubyList, sal_Bool bAutomatic )
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setPropertyValue( const 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, std::exception);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName )
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL addPropertyChangeListener( const 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, std::exception);
+ virtual void SAL_CALL removePropertyChangeListener( const 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, std::exception);
+ virtual void SAL_CALL addVetoableChangeListener( const 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, std::exception);
+ virtual void SAL_CALL removeVetoableChangeListener( const 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, std::exception);
+
+ //XServiceInfo
+ virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XTransferableSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getTransferable( )
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL insertTransferable( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTrans ) throw (::com::sun::star::datatransfer::UnsupportedFlavorException, ::com::sun::star::uno::RuntimeException, std::exception);
+
+ void NotifySelChanged();
+ void NotifyDBChanged();
+
+ SwView* GetView() {return m_pView;}
+ void Invalidate();
+
+ // temporary document used for PDF export of selections/multi-selections
+ SfxObjectShellLock BuildTmpSelectionDoc();
+};
+
+typedef cppu::WeakImplHelper8<
+ ::com::sun::star::text::XTextViewCursor,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::text::XPageCursor,
+ ::com::sun::star::view::XScreenCursor,
+ ::com::sun::star::view::XViewCursor,
+ ::com::sun::star::view::XLineCursor,
+ ::com::sun::star::beans::XPropertySet,
+ ::com::sun::star::beans::XPropertyState
+ > SwXTextViewCursor_Base;
+
+class SwXTextViewCursor : public SwXTextViewCursor_Base,
+public SwClient,
+public OTextCursorHelper
+{
+ SwView* m_pView;
+ const SfxItemPropertySet* m_pPropSet;
+protected:
+ sal_Bool IsTextSelection( sal_Bool bAllowTables = sal_True ) const;
+ virtual ~SwXTextViewCursor();
+public:
+ SwXTextViewCursor(SwView* pVw);
+
+ DECLARE_XINTERFACE()
+
+ //XTextViewCursor
+ virtual sal_Bool SAL_CALL isVisible(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual void SAL_CALL setVisible(sal_Bool bVisible) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::awt::Point SAL_CALL getPosition(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ //XTextCursor - neu
+ virtual void SAL_CALL collapseToStart()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL collapseToEnd()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual sal_Bool SAL_CALL isCollapsed()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual sal_Bool SAL_CALL goLeft( sal_Int16 nCount, sal_Bool bExpand )
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual sal_Bool SAL_CALL goRight( sal_Int16 nCount, sal_Bool bExpand )
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL gotoStart( sal_Bool bExpand )
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL gotoEnd( sal_Bool bExpand )
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ 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,
+ std::exception);
+
+ //XPageCursor
+ virtual sal_Bool SAL_CALL jumpToFirstPage()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual sal_Bool SAL_CALL jumpToLastPage()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual sal_Bool SAL_CALL jumpToPage(sal_Int16 nPage) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL jumpToNextPage(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL jumpToPreviousPage(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL jumpToEndOfPage(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL jumpToStartOfPage(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Int16 SAL_CALL getPage()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+
+ //XTextRange
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual OUString SAL_CALL getString()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL setString(const OUString& aString)
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+
+ //XScreenCursor
+ virtual sal_Bool SAL_CALL screenDown()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual sal_Bool SAL_CALL screenUp()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+
+ //XViewCursor
+ virtual sal_Bool SAL_CALL goDown(sal_Int16 nCount, sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual sal_Bool SAL_CALL goUp(sal_Int16 nCount, sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+
+ //XLineCursor
+ virtual sal_Bool SAL_CALL isAtStartOfLine()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual sal_Bool SAL_CALL isAtEndOfLine()
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL gotoEndOfLine(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL gotoStartOfLine(sal_Bool bExpand)
+ throw (::com::sun::star::uno::RuntimeException,
+ std::exception);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception);
+ virtual void SAL_CALL setPropertyValue( const 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,
+ std::exception);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName )
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL addPropertyChangeListener( const 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, std::exception);
+ virtual void SAL_CALL removePropertyChangeListener( const 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, std::exception);
+ virtual void SAL_CALL addVetoableChangeListener( const 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, std::exception);
+ virtual void SAL_CALL removeVetoableChangeListener( const 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, std::exception);
+
+ //XPropertyState
+ virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName )
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< OUString >& aPropertyName )
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName )
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName )
+ throw (::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException,
+ std::exception);
+
+ //XServiceInfo
+ virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+ virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException, std::exception );
+
+ 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, std::exception);
+
+ void Invalidate(){m_pView = 0;}
+
+ // ITextCursorHelper
+ virtual const SwPaM* GetPaM() const;
+ virtual SwPaM* GetPaM();
+ virtual const SwDoc* GetDoc() const;
+ virtual SwDoc* GetDoc();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/usrpref.hxx b/sw/source/core/uibase/inc/usrpref.hxx
new file mode 100644
index 000000000000..9169166c5a6b
--- /dev/null
+++ b/sw/source/core/uibase/inc/usrpref.hxx
@@ -0,0 +1,276 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_USRPREF_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_USRPREF_HXX
+
+#include <unotools/configitem.hxx>
+#include <fldupde.hxx>
+#include "viewopt.hxx"
+#include <tools/fldunit.hxx>
+
+class SwMasterUsrPref;
+
+class SwContentViewConfig : public utl::ConfigItem
+{
+ SwMasterUsrPref& rParent;
+ sal_Bool bWeb;
+
+ com::sun::star::uno::Sequence<OUString> GetPropertyNames();
+ public:
+ SwContentViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
+ ~SwContentViewConfig();
+
+ // utl::ConfigItem
+ virtual void Notify( const com::sun::star::uno::Sequence< OUString > &rPropertyNames );
+ virtual void Commit();
+
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+
+class SwLayoutViewConfig : public utl::ConfigItem
+{
+ SwMasterUsrPref& rParent;
+ sal_Bool bWeb;
+
+ com::sun::star::uno::Sequence<OUString> GetPropertyNames();
+ public:
+ SwLayoutViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
+ ~SwLayoutViewConfig();
+
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+ virtual void Commit();
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+
+class SwGridConfig : public utl::ConfigItem
+{
+ SwMasterUsrPref& rParent;
+
+ com::sun::star::uno::Sequence<OUString> GetPropertyNames();
+ public:
+ SwGridConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
+ ~SwGridConfig();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+
+class SwCursorConfig : public utl::ConfigItem
+{
+ SwMasterUsrPref& rParent;
+
+ com::sun::star::uno::Sequence<OUString> GetPropertyNames();
+ public:
+ SwCursorConfig(SwMasterUsrPref& rParent);
+ ~SwCursorConfig();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+
+class SwWebColorConfig : public utl::ConfigItem
+{
+ SwMasterUsrPref& rParent;
+ com::sun::star::uno::Sequence<OUString> aPropNames;
+
+ public:
+ SwWebColorConfig(SwMasterUsrPref& rParent);
+ ~SwWebColorConfig();
+
+ virtual void Commit();
+ virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
+ void Load();
+ void SetModified(){ConfigItem::SetModified();}
+};
+
+class SwMasterUsrPref : public SwViewOption
+{
+ friend class SwContentViewConfig;
+ friend class SwLayoutViewConfig;
+ friend class SwGridConfig;
+ friend class SwCursorConfig;
+ friend class SwWebColorConfig;
+
+ SwFldUpdateFlags eFldUpdateFlags; //udpate of fields and charts
+ sal_Int32 nLinkUpdateMode;
+ FieldUnit eUserMetric;
+ FieldUnit eHScrollMetric;
+ sal_Bool bIsHScrollMetricSet;
+ FieldUnit eVScrollMetric;
+ sal_Bool bIsVScrollMetricSet;
+
+ sal_Int32 nDefTab; //default tab stop distance
+
+ sal_Bool bIsSquaredPageMode; //default page mode for text grid
+ sal_Bool bIsAlignMathObjectsToBaseline;
+
+ SwContentViewConfig aContentConfig;
+ SwLayoutViewConfig aLayoutConfig;
+ SwGridConfig aGridConfig;
+ SwCursorConfig aCursorConfig;
+ SwWebColorConfig* pWebColorConfig;
+
+ sal_Bool bApplyCharUnit; // apply_char_unit
+public:
+ SwMasterUsrPref(sal_Bool bWeb);
+ ~SwMasterUsrPref();
+
+ void SetUsrPref(const SwViewOption &rCopy);
+
+ void Commit()
+ {
+ aContentConfig.Commit();
+ aLayoutConfig.Commit();
+ aGridConfig.Commit();
+ aCursorConfig.Commit();
+ if(pWebColorConfig)
+ pWebColorConfig->Commit();
+ }
+ void SetModified()
+ {
+ aContentConfig.SetModified();
+ aLayoutConfig.SetModified();
+ aGridConfig.SetModified();
+ aCursorConfig.SetModified();
+ if(pWebColorConfig)
+ pWebColorConfig->SetModified();
+ }
+
+ void SetUpdateLinkMode(sal_Int32 nSet, sal_Bool bNoModify = sal_False)
+ {
+ nLinkUpdateMode = nSet;
+ if(!bNoModify)
+ aContentConfig.SetModified();
+ }
+ sal_Int32 GetUpdateLinkMode() const {return nLinkUpdateMode; }
+
+ void SetUpdateFields(sal_Bool bSet, sal_Bool bNoModify = sal_False)
+ {
+ if(bSet && eFldUpdateFlags == AUTOUPD_OFF)
+ {
+ eFldUpdateFlags = AUTOUPD_FIELD_ONLY;
+ if(!bNoModify)
+ aContentConfig.SetModified();
+ }
+ else if(!bSet)
+ {
+ eFldUpdateFlags = AUTOUPD_OFF;
+ if(!bNoModify)
+ aContentConfig.SetModified();
+ }
+ };
+ sal_Bool IsUpdateFields()const {return eFldUpdateFlags != AUTOUPD_OFF; }
+
+ SwFldUpdateFlags GetFldUpdateFlags()const {return eFldUpdateFlags;}
+ void SetFldUpdateFlags(SwFldUpdateFlags eSet, sal_Bool bNoModify = sal_False)
+ {
+ eFldUpdateFlags = eSet;
+ if(!bNoModify)
+ aContentConfig.SetModified();
+ }
+
+ void SetUpdateCharts(sal_Bool bSet, sal_Bool bNoModify = sal_False)
+ {
+ if(bSet)
+ {
+ eFldUpdateFlags = AUTOUPD_FIELD_AND_CHARTS;
+ if(!bNoModify)
+ aContentConfig.SetModified();
+ }
+ else if(eFldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS)
+ {
+ eFldUpdateFlags = AUTOUPD_FIELD_ONLY;
+ if(!bNoModify)
+ aContentConfig.SetModified();
+ }
+ };
+ sal_Bool IsUpdateCharts()const {return eFldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS; }
+
+ FieldUnit GetMetric() const { return eUserMetric;}
+ void SetMetric(FieldUnit eSet, sal_Bool bNoModify = sal_False)
+ {
+ eUserMetric = eSet;
+ if(!bNoModify)
+ aLayoutConfig.SetModified();
+ }
+
+ sal_Bool IsHScrollMetric()const {return bIsHScrollMetricSet;}
+ FieldUnit GetHScrollMetric() const { return bIsHScrollMetricSet ? eHScrollMetric : eUserMetric;}
+ void SetHScrollMetric(FieldUnit eSet, sal_Bool bNoModify = sal_False)
+ {
+ eHScrollMetric = eSet; bIsHScrollMetricSet = sal_True;
+ if(!bNoModify)
+ aLayoutConfig.SetModified();
+ }
+
+ sal_Bool IsVScrollMetric()const {return bIsVScrollMetricSet;}
+ FieldUnit GetVScrollMetric() const { return bIsVScrollMetricSet ? eVScrollMetric : eUserMetric;}
+ void SetVScrollMetric(FieldUnit eSet, sal_Bool bNoModify = sal_False)
+ {
+ eVScrollMetric = eSet; bIsVScrollMetricSet = sal_True;
+ if(!bNoModify)
+ aLayoutConfig.SetModified();
+ }
+
+ sal_Bool IsApplyCharUnit() const
+ {
+ return bApplyCharUnit;
+ }
+ void SetApplyCharUnit(sal_Bool bSet, sal_Bool bNoModify = sal_False)
+ {
+ bApplyCharUnit = bSet;
+ if(!bNoModify)
+ aLayoutConfig.SetModified();
+ }
+
+ sal_Int32 GetDefTab() const { return nDefTab;}
+ void SetDefTab( sal_Int32 nSet, sal_Bool bNoModify = sal_False )
+ {
+ nDefTab = nSet;
+ if(!bNoModify)
+ aLayoutConfig.SetModified();
+ }
+
+ //default page mode for text grid
+ sal_Bool IsSquaredPageMode() const {return bIsSquaredPageMode;}
+ void SetDefaultPageMode( sal_Bool bVal, sal_Bool bNoModify = sal_False )
+ {
+ bIsSquaredPageMode = bVal;
+ if(!bNoModify)
+ aLayoutConfig.SetModified();
+ }
+
+ sal_Bool IsAlignMathObjectsToBaseline() const { return bIsAlignMathObjectsToBaseline; }
+ void SetAlignMathObjectsToBaseline( sal_Bool bVal, sal_Bool bNoModify = sal_False )
+ {
+ bIsAlignMathObjectsToBaseline = bVal;
+ if(!bNoModify)
+ aLayoutConfig.SetModified();
+ }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/utlui.hrc b/sw/source/core/uibase/inc/utlui.hrc
new file mode 100644
index 000000000000..774a0b868231
--- /dev/null
+++ b/sw/source/core/uibase/inc/utlui.hrc
@@ -0,0 +1,189 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _UTLUI_HRC
+#define _UTLUI_HRC
+
+#include "rcid.hrc"
+
+
+#define RID_SW_SHELLRES (RC_UTLUI_BEGIN + 1)
+#define RID_STR_SYSTEM (RC_UTLUI_BEGIN + 2)
+
+
+
+// Strings in NumberFormatter-Listbox
+#define STR_DEFINE_NUMBERFORMAT (RC_UTLUI_BEGIN + 4)
+// hyperlink status bar control
+#define STR_HYPERCTRL_SEL (RC_UTLUI_BEGIN + 5)
+#define STR_HYPERCTRL_HYP (RC_UTLUI_BEGIN + 6)
+
+// names of content types (RC_UTLUI_BEGIN + 7)
+#define STR_CONTENT_TYPE_FIRST (RC_UTLUI_BEGIN + 8)
+#define STR_CONTENT_TYPE_OUTLINE STR_CONTENT_TYPE_FIRST
+#define STR_CONTENT_TYPE_TABLE (RC_UTLUI_BEGIN + 9)
+#define STR_CONTENT_TYPE_FRAME (RC_UTLUI_BEGIN + 10)
+#define STR_CONTENT_TYPE_GRAPHIC (RC_UTLUI_BEGIN + 11)
+#define STR_CONTENT_TYPE_OLE (RC_UTLUI_BEGIN + 12)
+#define STR_CONTENT_TYPE_BOOKMARK (RC_UTLUI_BEGIN + 13)
+#define STR_CONTENT_TYPE_REGION (RC_UTLUI_BEGIN + 14)
+#define STR_CONTENT_TYPE_URLFIELD (RC_UTLUI_BEGIN + 15)
+#define STR_CONTENT_TYPE_REFERENCE (RC_UTLUI_BEGIN + 16)
+#define STR_CONTENT_TYPE_INDEX (RC_UTLUI_BEGIN + 17)
+#define STR_CONTENT_TYPE_POSTIT (RC_UTLUI_BEGIN + 18)
+#define STR_CONTENT_TYPE_DRAWOBJECT (RC_UTLUI_BEGIN + 19)
+#define STR_CONTENT_END (RC_UTLUI_BEGIN + 19)
+
+#define STR_CONTENT_TYPE_SINGLE_FIRST (STR_CONTENT_END + 1)
+#define STR_CONTENT_TYPE_SINGLE_OUTLINE (STR_CONTENT_TYPE_SINGLE_FIRST + 0)
+#define STR_CONTENT_TYPE_SINGLE_TABLE (STR_CONTENT_TYPE_SINGLE_FIRST + 1)
+#define STR_CONTENT_TYPE_SINGLE_FRAME (STR_CONTENT_TYPE_SINGLE_FIRST + 2)
+#define STR_CONTENT_TYPE_SINGLE_GRAPHIC (STR_CONTENT_TYPE_SINGLE_FIRST + 3)
+#define STR_CONTENT_TYPE_SINGLE_OLE (STR_CONTENT_TYPE_SINGLE_FIRST + 4)
+#define STR_CONTENT_TYPE_SINGLE_BOOKMARK (STR_CONTENT_TYPE_SINGLE_FIRST + 5)
+#define STR_CONTENT_TYPE_SINGLE_REGION (STR_CONTENT_TYPE_SINGLE_FIRST + 6)
+#define STR_CONTENT_TYPE_SINGLE_URLFIELD (STR_CONTENT_TYPE_SINGLE_FIRST + 7)
+#define STR_CONTENT_TYPE_SINGLE_REFERENCE (STR_CONTENT_TYPE_SINGLE_FIRST + 8)
+#define STR_CONTENT_TYPE_SINGLE_INDEX (STR_CONTENT_TYPE_SINGLE_FIRST + 9)
+#define STR_CONTENT_TYPE_SINGLE_POSTIT (STR_CONTENT_TYPE_SINGLE_FIRST + 10)
+#define STR_CONTENT_TYPE_SINGLE_DRAWOBJECT (STR_CONTENT_TYPE_SINGLE_FIRST + 11)
+#define STR_CONTENT_SINGLE_END STR_CONTENT_TYPE_SINGLE_DRAWOBJECT
+
+#define FLD_DOCINFO_BEGIN STR_CONTENT_SINGLE_END
+#define FLD_DOCINFO_TITEL FLD_DOCINFO_BEGIN
+#define FLD_DOCINFO_THEMA (FLD_DOCINFO_BEGIN + 1)
+#define FLD_DOCINFO_KEYS (FLD_DOCINFO_BEGIN + 2)
+#define FLD_DOCINFO_COMMENT (FLD_DOCINFO_BEGIN + 3)
+#define FLD_DOCINFO_CREATE (FLD_DOCINFO_BEGIN + 4)
+#define FLD_DOCINFO_CHANGE (FLD_DOCINFO_BEGIN + 5)
+#define FLD_DOCINFO_PRINT (FLD_DOCINFO_BEGIN + 6)
+#define FLD_DOCINFO_DOCNO (FLD_DOCINFO_BEGIN + 7)
+#define FLD_DOCINFO_EDIT (FLD_DOCINFO_BEGIN + 8)
+#define FLD_DOCINFO_END (FLD_DOCINFO_BEGIN + 9)
+
+#define STR_SERVICE_UNAVAILABLE (FLD_DOCINFO_END + 1)
+
+#define STR_AUTH_TYPE_START (FLD_DOCINFO_END + 2)
+#define STR_AUTH_TYPE_ARTICLE (STR_AUTH_TYPE_START + 0)
+#define STR_AUTH_TYPE_BOOK (STR_AUTH_TYPE_START + 1)
+#define STR_AUTH_TYPE_BOOKLET (STR_AUTH_TYPE_START + 2)
+#define STR_AUTH_TYPE_CONFERENCE (STR_AUTH_TYPE_START + 3)
+#define STR_AUTH_TYPE_INBOOK (STR_AUTH_TYPE_START + 4)
+#define STR_AUTH_TYPE_INCOLLECTION (STR_AUTH_TYPE_START + 5)
+#define STR_AUTH_TYPE_INPROCEEDINGS (STR_AUTH_TYPE_START + 6)
+#define STR_AUTH_TYPE_JOURNAL (STR_AUTH_TYPE_START + 7)
+#define STR_AUTH_TYPE_MANUAL (STR_AUTH_TYPE_START + 8)
+#define STR_AUTH_TYPE_MASTERSTHESIS (STR_AUTH_TYPE_START + 9)
+#define STR_AUTH_TYPE_MISC (STR_AUTH_TYPE_START + 10)
+#define STR_AUTH_TYPE_PHDTHESIS (STR_AUTH_TYPE_START + 11)
+#define STR_AUTH_TYPE_PROCEEDINGS (STR_AUTH_TYPE_START + 12)
+#define STR_AUTH_TYPE_TECHREPORT (STR_AUTH_TYPE_START + 13)
+#define STR_AUTH_TYPE_UNPUBLISHED (STR_AUTH_TYPE_START + 14)
+#define STR_AUTH_TYPE_EMAIL (STR_AUTH_TYPE_START + 15)
+#define STR_AUTH_TYPE_WWW (STR_AUTH_TYPE_START + 16)
+#define STR_AUTH_TYPE_CUSTOM1 (STR_AUTH_TYPE_START + 17)
+#define STR_AUTH_TYPE_CUSTOM2 (STR_AUTH_TYPE_START + 18)
+#define STR_AUTH_TYPE_CUSTOM3 (STR_AUTH_TYPE_START + 19)
+#define STR_AUTH_TYPE_CUSTOM4 (STR_AUTH_TYPE_START + 20)
+#define STR_AUTH_TYPE_CUSTOM5 (STR_AUTH_TYPE_START + 21)
+#define STR_AUTH_TYPE_END (STR_AUTH_TYPE_CUSTOM5)
+
+#define STR_AUTH_FIELD_START (STR_AUTH_TYPE_END + 1)
+#define STR_AUTH_FIELD_IDENTIFIER (STR_AUTH_FIELD_START + 0)
+#define STR_AUTH_FIELD_AUTHORITY_TYPE (STR_AUTH_FIELD_START + 1)
+#define STR_AUTH_FIELD_ADDRESS (STR_AUTH_FIELD_START + 2)
+#define STR_AUTH_FIELD_ANNOTE (STR_AUTH_FIELD_START + 3)
+#define STR_AUTH_FIELD_AUTHOR (STR_AUTH_FIELD_START + 4)
+#define STR_AUTH_FIELD_BOOKTITLE (STR_AUTH_FIELD_START + 5)
+#define STR_AUTH_FIELD_CHAPTER (STR_AUTH_FIELD_START + 6)
+#define STR_AUTH_FIELD_EDITION (STR_AUTH_FIELD_START + 7)
+#define STR_AUTH_FIELD_EDITOR (STR_AUTH_FIELD_START + 8)
+#define STR_AUTH_FIELD_HOWPUBLISHED (STR_AUTH_FIELD_START + 9)
+#define STR_AUTH_FIELD_INSTITUTION (STR_AUTH_FIELD_START + 10)
+#define STR_AUTH_FIELD_JOURNAL (STR_AUTH_FIELD_START + 11)
+#define STR_AUTH_FIELD_MONTH (STR_AUTH_FIELD_START + 12)
+#define STR_AUTH_FIELD_NOTE (STR_AUTH_FIELD_START + 13)
+#define STR_AUTH_FIELD_NUMBER (STR_AUTH_FIELD_START + 14)
+#define STR_AUTH_FIELD_ORGANIZATIONS (STR_AUTH_FIELD_START + 15)
+#define STR_AUTH_FIELD_PAGES (STR_AUTH_FIELD_START + 16)
+#define STR_AUTH_FIELD_PUBLISHER (STR_AUTH_FIELD_START + 17)
+#define STR_AUTH_FIELD_SCHOOL (STR_AUTH_FIELD_START + 18)
+#define STR_AUTH_FIELD_SERIES (STR_AUTH_FIELD_START + 19)
+#define STR_AUTH_FIELD_TITLE (STR_AUTH_FIELD_START + 20)
+#define STR_AUTH_FIELD_TYPE (STR_AUTH_FIELD_START + 21)
+#define STR_AUTH_FIELD_VOLUME (STR_AUTH_FIELD_START + 22)
+#define STR_AUTH_FIELD_YEAR (STR_AUTH_FIELD_START + 23)
+#define STR_AUTH_FIELD_URL (STR_AUTH_FIELD_START + 24)
+#define STR_AUTH_FIELD_CUSTOM1 (STR_AUTH_FIELD_START + 25)
+#define STR_AUTH_FIELD_CUSTOM2 (STR_AUTH_FIELD_START + 26)
+#define STR_AUTH_FIELD_CUSTOM3 (STR_AUTH_FIELD_START + 27)
+#define STR_AUTH_FIELD_CUSTOM4 (STR_AUTH_FIELD_START + 28)
+#define STR_AUTH_FIELD_CUSTOM5 (STR_AUTH_FIELD_START + 29)
+#define STR_AUTH_FIELD_ISBN (STR_AUTH_FIELD_START + 30)
+#define STR_AUTH_FIELD_END (STR_AUTH_FIELD_ISBN)
+
+
+#define RES_FRMEX_MENU (STR_AUTH_FIELD_END + 1)
+
+#define DLG_NAVIGATION_PI (RC_UTLUI_BEGIN + 1)
+#define DLG_GLOSSARY_DECIDE_DLG (RC_UTLUI_BEGIN + 3)
+
+#define IMG_NAVI_ENTRYBMP (RC_UTLUI_BEGIN + 4)
+#define ILIST_DB_DLG (RC_UTLUI_BEGIN + 6)
+
+#define IMG_VIEWLAYOUT_AUTOMATIC (RC_UTLUI_BEGIN + 12)
+#define IMG_VIEWLAYOUT_AUTOMATIC_ACTIVE (RC_UTLUI_BEGIN + 13)
+#define IMG_VIEWLAYOUT_BOOKMODE (RC_UTLUI_BEGIN + 14)
+#define IMG_VIEWLAYOUT_BOOKMODE_ACTIVE (RC_UTLUI_BEGIN + 15)
+#define IMG_VIEWLAYOUT_SINGLECOLUMN (RC_UTLUI_BEGIN + 16)
+#define IMG_VIEWLAYOUT_SINGLECOLUMN_ACTIVE (RC_UTLUI_BEGIN + 17)
+#define IMG_PAGE_BREAK (RC_UTLUI_BEGIN + 18)
+
+
+//local ids of the Database ImageLists
+#define IMG_COLLAPSE 18002 /*RID_SVXIMG_COLLAPSEDNODE*/
+#define IMG_EXPAND 18003 /*RID_SVXIMG_EXPANDEDNODE*/
+#define IMG_DB 1
+#define IMG_DBTABLE 2
+#define IMG_DBQUERY 3
+
+#define UTLUI_ACT_END RES_FRMEX_MENU
+
+#if UTLUI_ACT_END > RC_UTLUI_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#define STR_IDXEXAMPLE_IDXTXT_BEGIN RC_IDXTXT_BEGIN
+#define STR_IDXEXAMPLE_IDXTXT_HEADING1 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 1)
+#define STR_IDXEXAMPLE_IDXTXT_ENTRY1 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 2)
+#define STR_IDXEXAMPLE_IDXTXT_HEADING11 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 3)
+#define STR_IDXEXAMPLE_IDXTXT_ENTRY11 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 4)
+#define STR_IDXEXAMPLE_IDXTXT_HEADING12 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 5)
+#define STR_IDXEXAMPLE_IDXTXT_ENTRY12 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 6)
+#define STR_IDXEXAMPLE_IDXTXT_TABLE1 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 7)
+#define STR_IDXEXAMPLE_IDXTXT_IMAGE1 (STR_IDXEXAMPLE_IDXTXT_BEGIN + 8)
+#define STR_IDXEXAMPLE_IDXTXT_END STR_IDXEXAMPLE_IDXTXT_IMAGE1
+
+#if STR_IDXEXAMPLE_IDXTXT_END > RC_IDXTXT_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/view.hxx b/sw/source/core/uibase/inc/view.hxx
new file mode 100644
index 000000000000..91733d3da373
--- /dev/null
+++ b/sw/source/core/uibase/inc/view.hxx
@@ -0,0 +1,689 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_VIEW_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_VIEW_HXX
+
+#include <vcl/timer.hxx>
+#include <vcl/field.hxx>
+#include <vcl/floatwin.hxx>
+#include <svtools/htmlcfg.hxx>
+#include <sfx2/viewfac.hxx>
+#include <sfx2/viewsh.hxx>
+#include <sfx2/objsh.hxx>
+#include <editeng/svxenum.hxx>
+#include <sfx2/zoomitem.hxx>
+#include <svx/svxids.hrc>
+#include <editeng/editstat.hxx>
+#include "swdllapi.h"
+#include <swtypes.hxx>
+#include <shellid.hxx>
+#include <IMark.hxx>
+
+class Button;
+class ImageButton;
+class SwTxtFmtColl;
+class SwPageDesc;
+class SwFrmFmt;
+class SwCharFmt;
+class SwNumRule;
+class SwGlossaryHdl;
+class SwDrawBase;
+class SvxRuler;
+class SvxLRSpaceItem;
+class SwDocShell;
+class SwScrollbar;
+class SvBorder;
+class Ruler;
+class SvxSearchItem;
+class SearchAttrItemList;
+class SvxSearchDialog;
+class SdrView;
+class Dialog;
+class SdrObject;
+class SdrPageView;
+class SwHlpImageButton;
+class SwView;
+class SwEditWin;
+class SwWrtShell;
+class SwView_Impl;
+struct SwSearchOptions;
+class FmFormShell;
+class CommandEvent;
+class InsCaptionOpt;
+class SvGlobalName;
+class SvtAccessibilityOptions;
+class SwTransferable;
+class SwMailMergeConfigItem;
+class SwTxtNode; // #i23726#
+class SwFormatClipboard;
+struct SwConversionArgs;
+class Graphic;
+class GraphicFilter;
+class SwPostItMgr;
+
+namespace com{ namespace sun { namespace star {
+ namespace view{ class XSelectionSupplier; }
+}}}
+namespace sfx2 { class FileDialogHelper; }
+
+const long nLeftOfst = -370;
+const long nScrollX = 30;
+const long nScrollY = 30;
+
+#define MINZOOM 20
+#define MAXZOOM 600
+
+#define MAX_MARKS 5
+
+#define CHILDWIN_LABEL 1
+#define CHILDWIN_MAILMERGE 2
+
+enum ShellModes
+{
+ SHELL_MODE_TEXT,
+ SHELL_MODE_FRAME,
+ SHELL_MODE_GRAPHIC,
+ SHELL_MODE_OBJECT,
+ SHELL_MODE_DRAW,
+ SHELL_MODE_DRAW_CTRL,
+ SHELL_MODE_DRAW_FORM,
+ SHELL_MODE_DRAWTEXT,
+ SHELL_MODE_BEZIER,
+ SHELL_MODE_LIST_TEXT,
+ SHELL_MODE_TABLE_TEXT,
+ SHELL_MODE_TABLE_LIST_TEXT,
+ SHELL_MODE_MEDIA,
+ SHELL_MODE_EXTRUDED_CUSTOMSHAPE,
+ SHELL_MODE_FONTWORK,
+ SHELL_MODE_POSTIT,
+ SHELL_MODE_NAVIGATION
+};
+
+/*--------------------------------------------------------------------
+ Description: apply a template
+ --------------------------------------------------------------------*/
+struct SwApplyTemplate
+{
+ union
+ {
+ SwTxtFmtColl* pTxtColl;
+ SwPageDesc* pPageDesc;
+ SwFrmFmt* pFrmFmt;
+ SwCharFmt* pCharFmt;
+ SwNumRule* pNumRule;
+ } aColl;
+
+ int eType;
+ sal_uInt16 nColor;
+ SwFormatClipboard* m_pFormatClipboard;
+ bool bUndo;
+
+ SwApplyTemplate() :
+ eType(0),
+ nColor(0),
+ m_pFormatClipboard(0),
+ bUndo(false)
+ {
+ aColl.pTxtColl = 0;
+ }
+};
+
+/*--------------------------------------------------------------------
+ Description: view of a document
+ --------------------------------------------------------------------*/
+class SW_DLLPUBLIC SwView: public SfxViewShell
+{
+ friend class SwHHCWrapper;
+ friend class SwHyphWrapper;
+ friend class SwView_Impl;
+ friend class SwClipboardChangeListener;
+
+ // search & replace
+ static SvxSearchDialog *m_pSrchDlg;
+ static SvxSearchItem *m_pSrchItem;
+
+ static sal_uInt16 m_nInsertCtrlState;
+ static sal_uInt16 m_nWebInsertCtrlState;
+ static sal_uInt16 m_nInsertObjectCtrlState;
+ static sal_uInt16 m_nInsertFieldCtrlState;
+ static sal_uInt16 m_nMoveType; // for buttons below the scrollbar (viewmdi)
+ static sal_Int32 m_nActMark; // current jump mark for unknown mark
+
+ static bool m_bExtra;
+ static sal_Bool m_bFound;
+ static bool m_bJustOpened;
+
+ static SearchAttrItemList* m_pSrchList;
+ static SearchAttrItemList* m_pReplList;
+
+ SvxHtmlOptions m_aHTMLOpt;
+ Timer m_aTimer; // for delayed ChgLnks during an action
+ OUString m_aPageStr; // status view, current page
+ OUString m_sSwViewData,
+ //and the new cursor position if the user double click in the PagePreview
+ m_sNewCrsrPos;
+ // to support keyboard the number of the page to go to can be set too
+ sal_uInt16 m_nNewPage;
+
+ sal_uInt16 m_nOldPageNum;
+ OUString m_sOldSectionName;
+
+ Point m_aTabColFromDocPos; // moving table colmns out of the document
+ SwTxtNode * m_pNumRuleNodeFromDoc; // Moving indent of numrule #i23726#
+
+ Size m_aDocSz; // current document size
+ Rectangle m_aVisArea; // visible region
+
+ SwEditWin *m_pEditWin;
+ SwWrtShell *m_pWrtShell;
+
+ SfxShell *m_pShell; // current SubShell at the dispatcher
+ FmFormShell *m_pFormShell; // DB-FormShell
+
+ SwView_Impl *m_pViewImpl; // Impl-data for UNO + Basic
+
+ SwScrollbar *m_pHScrollbar, // MDI control elements
+ *m_pVScrollbar;
+
+ bool m_bHScrollbarEnabled;
+ bool m_bVScrollbarEnabled;
+
+ Window *m_pScrollFill; // dummy window for filling the lower right edge
+ // when both scrollbars are active
+
+ SvxRuler *m_pHRuler,
+ *m_pVRuler;
+ ImageButton *m_pTogglePageBtn;
+
+ SwHlpImageButton *m_pPageUpBtn,
+ *m_pPageDownBtn;
+
+ SwGlossaryHdl *m_pGlosHdl; // handle text block
+ SwDrawBase *m_pDrawActual;
+
+ const SwFrmFmt *m_pLastTableFormat;
+
+ SwFormatClipboard *m_pFormatClipboard; //holds data for format paintbrush
+
+ SwPostItMgr *m_pPostItMgr;
+
+ int m_nSelectionType;
+ FloatingWindow *m_pFieldPopup;
+
+ static const int m_nMASTERENUMCOMMANDS = 6;
+
+ OUString m_aCurrShapeEnumCommand[ m_nMASTERENUMCOMMANDS ];
+
+ sal_uInt16 m_nPageCnt;
+
+ // current draw mode
+ sal_uInt16 m_nDrawSfxId;
+ OUString m_sDrawCustom; //some drawing types are marked with strings!
+ sal_uInt16 m_nFormSfxId;
+ sal_uInt16 m_nLastPasteDestination;
+
+ // save the border distance status from SwView::StateTabWin to re-use it in SwView::ExecTabWin()
+ sal_uInt16 m_nLeftBorderDistance;
+ sal_uInt16 m_nRightBorderDistance;
+
+ bool m_bWheelScrollInProgress;
+
+ sal_Bool m_bCenterCrsr : 1,
+ m_bTopCrsr : 1,
+ m_bAlwaysShowSel : 1,
+ m_bTabColFromDoc : 1,
+ m_bNumIndentFromDoc : 1, // #i23726#
+ m_bTabRowFromDoc : 1,
+ m_bSetTabColFromDoc : 1 ,
+ m_bSetTabRowFromDoc : 1,
+ m_bAttrChgNotified : 1,
+ m_bAttrChgNotifiedWithRegistrations : 1,
+ m_bVerbsActive : 1,
+ m_bDrawRotate : 1,
+ m_bDrawSelMode : 1,
+ m_bShowAtResize : 1,
+ m_bInOuterResizePixel : 1,
+ m_bInInnerResizePixel : 1,
+ m_bPasteState : 1,
+ m_bPasteSpecialState : 1,
+ m_bInMailMerge : 1,
+ m_bInDtor : 1, //detect destructor to prevent creating of sub shells while closing
+ m_bOldShellWasPagePreview : 1,
+ m_bIsPreviewDoubleClick : 1, // #i114045#
+ m_bMakeSelectionVisible : 1, // transport the bookmark selection
+ m_bAnnotationMode; ///< The real cursor position is inside an annotation.
+
+ // methods for searching
+ // set search context
+ SAL_DLLPRIVATE sal_Bool SearchAndWrap(sal_Bool bApi = sal_False);
+ SAL_DLLPRIVATE sal_Bool SearchAll(sal_uInt16* pFound = 0);
+ SAL_DLLPRIVATE sal_uLong FUNC_Search( const SwSearchOptions& rOptions );
+ SAL_DLLPRIVATE void Replace();
+
+ bool IsDocumentBorder();
+
+ SAL_DLLPRIVATE bool IsTextTool() const;
+
+ // create control elements
+ SAL_DLLPRIVATE void CreateBtns();
+ SAL_DLLPRIVATE DECL_LINK( BtnPage, Button * );
+
+ SAL_DLLPRIVATE DECL_LINK( TimeoutHdl, void* );
+ SAL_DLLPRIVATE DECL_LINK( UpdatePercentHdl, GraphicFilter* );
+
+ SAL_DLLPRIVATE DECL_LINK( FieldPopupModeEndHdl, void* );
+
+ inline long GetXScroll() const;
+ inline long GetYScroll() const;
+ SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const;
+ SAL_DLLPRIVATE void CalcPt( Point* pPt,const Rectangle& rRect,
+ sal_uInt16 nRangeX = USHRT_MAX,
+ sal_uInt16 nRangeY = USHRT_MAX);
+
+ SAL_DLLPRIVATE sal_Bool GetPageScrollUpOffset(SwTwips& rOff) const;
+ SAL_DLLPRIVATE sal_Bool GetPageScrollDownOffset(SwTwips& rOff) const;
+
+ // scrollbar movements
+ SAL_DLLPRIVATE long PageUp();
+ SAL_DLLPRIVATE long PageDown();
+ SAL_DLLPRIVATE long PageUpCrsr(sal_Bool bSelect);
+ SAL_DLLPRIVATE long PageDownCrsr(sal_Bool bSelect);
+ SAL_DLLPRIVATE long PhyPageUp();
+ SAL_DLLPRIVATE long PhyPageDown();
+
+ SAL_DLLPRIVATE int _CreateScrollbar( sal_Bool bHori );
+ SAL_DLLPRIVATE DECL_LINK( ScrollHdl, SwScrollbar * );
+ SAL_DLLPRIVATE DECL_LINK( EndScrollHdl, SwScrollbar * );
+ SAL_DLLPRIVATE sal_Bool UpdateScrollbars();
+ SAL_DLLPRIVATE DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
+ SAL_DLLPRIVATE void CalcVisArea( const Size &rPixelSz );
+
+ SAL_DLLPRIVATE void CreatePageButtons(sal_Bool bShow);
+
+ // linguistics functions
+ SAL_DLLPRIVATE void HyphenateDocument();
+ SAL_DLLPRIVATE sal_Bool IsDrawTextHyphenate();
+ SAL_DLLPRIVATE void HyphenateDrawText();
+ SAL_DLLPRIVATE void StartThesaurus();
+
+ // text conversion
+ SAL_DLLPRIVATE void StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
+
+ // used for spell checking and text conversion
+ SAL_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, bool bStartDone,
+ bool bEndDone, SwConversionArgs *pConvArgs = 0 );
+ SAL_DLLPRIVATE void SpellEnd( SwConversionArgs *pConvArgs = 0 );
+
+ SAL_DLLPRIVATE void HyphStart( SvxSpellArea eSpell );
+ SAL_DLLPRIVATE sal_Bool CheckSpecialCntnt();
+ SAL_DLLPRIVATE void SpellKontext(sal_Bool bOn = sal_True)
+ { m_bCenterCrsr = bOn; m_bAlwaysShowSel = bOn; }
+
+ // methods for printing
+ SAL_DLLPRIVATE virtual SfxPrinter* GetPrinter( sal_Bool bCreate = sal_False );
+ SAL_DLLPRIVATE virtual bool HasPrintOptionsPage() const;
+ SAL_DLLPRIVATE virtual SfxTabPage* CreatePrintOptionsPage( Window* pParent,
+ const SfxItemSet& rSet);
+ // for readonly switching
+ SAL_DLLPRIVATE virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ SAL_DLLPRIVATE void _CheckReadonlyState();
+ SAL_DLLPRIVATE void _CheckReadonlySelection();
+
+ // method for rotating PageDesc
+ SAL_DLLPRIVATE void SwapPageMargin(const SwPageDesc&, SvxLRSpaceItem& rLR);
+
+ SAL_DLLPRIVATE void _SetZoom( const Size &rEditSz,
+ SvxZoomType eZoomType,
+ short nFactor = 100,
+ sal_Bool bViewOnly = sal_False);
+ SAL_DLLPRIVATE void CalcAndSetBorderPixel( SvBorder &rToFill, sal_Bool bInner );
+
+ SAL_DLLPRIVATE void ShowAtResize();
+
+ SAL_DLLPRIVATE virtual void Move();
+
+ SAL_DLLPRIVATE void DocumentStatsChanged();
+
+public: // #i123922# Needs to be called from a 2nd place now as a helper method
+ SAL_DLLPRIVATE sal_Bool InsertGraphicDlg( SfxRequest& );
+
+protected:
+
+ SwView_Impl* GetViewImpl() {return m_pViewImpl;}
+
+ void ImpSetVerb( int nSelType );
+
+ int GetSelectionType() const { return m_nSelectionType; }
+ void SetSelectionType(int nSet) { m_nSelectionType = nSet;}
+
+ // for SwWebView
+ void SetShell( SfxShell* pS ) { m_pShell = pS; }
+ void SetFormShell( FmFormShell* pSh ) { m_pFormShell = pSh; }
+
+ virtual void SelectShell();
+
+ virtual void Activate(sal_Bool);
+ virtual void Deactivate(sal_Bool);
+ virtual void InnerResizePixel( const Point &rOfs, const Size &rSize );
+ virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
+
+ void SetImageButtonColor(Color& rColor);
+
+ const SwFrmFmt* GetLastTblFrmFmt() const {return m_pLastTableFormat;}
+ void SetLastTblFrmFmt(const SwFrmFmt* pSet) {m_pLastTableFormat = pSet;}
+
+ // form letter execution
+ void GenerateFormLetter(sal_Bool bUseCurrentDocument);
+
+ using SfxShell::GetDispatcher;
+
+public:
+
+ SFX_DECL_VIEWFACTORY(SwView);
+ SFX_DECL_INTERFACE(SW_VIEWSHELL)
+ TYPEINFO();
+
+ SfxDispatcher &GetDispatcher();
+
+ void GotFocus() const;
+ virtual SdrView* GetDrawView() const;
+ virtual sal_Bool HasUIFeature( sal_uInt32 nFeature );
+ virtual void ShowCursor( bool bOn = true );
+ virtual ErrCode DoVerb( long nVerb );
+
+ virtual sal_uInt16 SetPrinter( SfxPrinter* pNew,
+ sal_uInt16 nDiff = SFX_PRINTER_ALL, bool bIsAPI=false);
+ ShellModes GetShellMode();
+
+ com::sun::star::view::XSelectionSupplier* GetUNOObject();
+
+ OUString GetSelectionTextParam( bool bCompleteWords,
+ bool bEraseTrail );
+ virtual sal_Bool HasSelection( sal_Bool bText ) const;
+ virtual OUString GetSelectionText( bool bCompleteWords = false );
+ virtual bool PrepareClose( sal_Bool bUI = sal_True ) SAL_OVERRIDE;
+ virtual void MarginChanged();
+
+ // replace word/selection with text from the thesaurus
+ // (this code has special handling for "in word" character)
+ void InsertThesaurusSynonym( const OUString &rSynonmText, const OUString &rLookUpText, bool bValidSelection );
+ bool IsValidSelectionForThesaurus() const;
+ OUString GetThesaurusLookUpText( bool bSelection ) const;
+
+ // immediately switch shell -> for GetSelectionObject
+ void StopShellTimer();
+
+ inline SwWrtShell& GetWrtShell () const { return *m_pWrtShell; }
+ inline SwWrtShell* GetWrtShellPtr() const { return m_pWrtShell; }
+
+ inline SwEditWin &GetEditWin() { return *m_pEditWin; }
+ inline const SwEditWin &GetEditWin () const { return *m_pEditWin; }
+
+#if defined WNT || defined UNX
+ void ScannerEventHdl( const ::com::sun::star::lang::EventObject& rEventObject );
+#endif
+
+ // hand the handler for text blocks to the shell; create if applicable
+ SwGlossaryHdl* GetGlosHdl();
+
+ inline const Rectangle& GetVisArea() const { return m_aVisArea; }
+
+ sal_Bool IsScroll(const Rectangle& rRect) const;
+ void Scroll( const Rectangle& rRect,
+ sal_uInt16 nRangeX = USHRT_MAX,
+ sal_uInt16 nRangeY = USHRT_MAX);
+
+ long SetVScrollMax(long lMax);
+ long SetHScrollMax(long lMax);
+
+ void SpellError(LanguageType eLang);
+ sal_Bool ExecSpellPopup( const Point& rPt );
+ void ExecFieldPopup( const Point& rPt, sw::mark::IFieldmark *fieldBM );
+
+ // SMARTTAGS
+ sal_Bool ExecSmartTagPopup( const Point& rPt );
+
+ DECL_LINK( OnlineSpellCallback, SpellCallbackInfo*);
+ sal_Bool ExecDrwTxtSpellPopup(const Point& rPt);
+
+ void SetTabColFromDocPos( const Point &rPt ) { m_aTabColFromDocPos = rPt; }
+ void SetTabColFromDoc( sal_Bool b ) { m_bTabColFromDoc = b; }
+ sal_Bool IsTabColFromDoc() const { return m_bTabColFromDoc; }
+ void SetTabRowFromDoc( sal_Bool b ) { m_bTabRowFromDoc = b; }
+ sal_Bool IsTabRowFromDoc() const { return m_bTabRowFromDoc; }
+
+ // -> #i23726#
+ void SetNumRuleNodeFromDoc( SwTxtNode * pNumRuleNode )
+ { m_pNumRuleNodeFromDoc = pNumRuleNode; }
+ void SetNumIndentFromDoc(sal_Bool b) { m_bNumIndentFromDoc = b; }
+ sal_Bool IsNumIndentFromDoc() const { return NULL != m_pNumRuleNodeFromDoc; }
+ // <- #i23726#
+
+ void DocSzChgd( const Size& rNewSize );
+ const Size& GetDocSz() const { return m_aDocSz; }
+ virtual void SetVisArea( const Rectangle&, sal_Bool bUpdateScrollbar = sal_True);
+ void SetVisArea( const Point&, sal_Bool bUpdateScrollbar = sal_True);
+ void CheckVisArea();
+
+ void RecheckBrowseMode();
+ static SvxSearchDialog* GetSearchDialog();
+
+ static sal_uInt16 GetMoveType();
+ static void SetMoveType(sal_uInt16 nSet);
+ DECL_STATIC_LINK( SwView, MoveNavigationHdl, bool* ); // #i75416#
+ static void SetActMark(sal_Int32 nSet);
+
+ sal_Bool HandleWheelCommands( const CommandEvent& );
+
+ // insert frames
+ void InsFrmMode(sal_uInt16 nCols);
+
+ void SetZoom( SvxZoomType eZoomType, short nFactor = 100, sal_Bool bViewOnly = sal_False);
+ virtual void SetZoomFactor( const Fraction &rX, const Fraction & );
+
+ void SetViewLayout( sal_uInt16 nColumns, bool bBookMode, sal_Bool bViewOnly = sal_False );
+
+ void ShowHScrollbar(sal_Bool bShow);
+ sal_Bool IsHScrollbarVisible()const;
+
+ void ShowVScrollbar(sal_Bool bShow);
+ sal_Bool IsVScrollbarVisible()const;
+
+ void EnableHScrollbar(bool bEnable);
+ void EnableVScrollbar(bool bEnable);
+
+ int CreateVRuler();
+ int KillVRuler();
+ int CreateTab();
+ int KillTab();
+
+ bool StatVRuler() const { return ((Window*)m_pVRuler)->IsVisible(); }
+ void ChangeVRulerMetric(FieldUnit eUnit);
+ void GetVRulerMetric(FieldUnit& rToFill) const;
+
+ bool StatTab() const { return ((Window*)m_pHRuler)->IsVisible(); }
+ SvxRuler& GetHRuler() { return *m_pHRuler; }
+ SvxRuler& GetVRuler() { return *m_pVRuler; }
+ void InvalidateRulerPos();
+ void ChangeTabMetric(FieldUnit eUnit);
+ void GetHRulerMetric(FieldUnit& rToFill) const;
+
+ // Handler
+ void Execute(SfxRequest&);
+ void ExecPageMove(SfxRequest&);
+ void ExecStyle(SfxRequest&);
+ void ExecLingu(SfxRequest&);
+ void ExecDataBase(SfxRequest&);
+ void ExecDlg(SfxRequest&);
+ void ExecDlgExt(SfxRequest&);
+ void ExecDBDlg(SfxRequest &);
+ void ExecColl(SfxRequest&);
+ void ExecutePrint(SfxRequest&);
+ void ExecDraw(SfxRequest&);
+ void ExecTabWin(SfxRequest&);
+ void ExecuteStatusLine(SfxRequest&);
+ DECL_LINK( ExecRulerClick, Ruler * );
+ void ExecSearch(SfxRequest&, sal_Bool bNoMessage = sal_False);
+ void ExecViewOptions(SfxRequest &);
+
+ void StateViewOptions(SfxItemSet &);
+ void StateSearch(SfxItemSet &);
+ void GetState(SfxItemSet&);
+ void StateStatusLine(SfxItemSet&);
+
+ // functions for drawing
+ void SetDrawFuncPtr(SwDrawBase* pFuncPtr);
+ inline SwDrawBase* GetDrawFuncPtr(/*sal_Bool bBuf = sal_False*/) const { return m_pDrawActual; }
+ void GetDrawState(SfxItemSet &rSet);
+ void ExitDraw();
+ inline sal_Bool IsDrawRotate() { return m_bDrawRotate; }
+ inline void FlipDrawRotate() { m_bDrawRotate = !m_bDrawRotate; }
+ inline sal_Bool IsDrawSelMode() { return m_bDrawSelMode; }
+ void SetSelDrawSlot();
+ inline void FlipDrawSelMode() { m_bDrawSelMode = !m_bDrawSelMode; }
+ void NoRotate(); // turn off rotate mode
+ sal_Bool EnterDrawTextMode(const Point& aDocPos);
+ void LeaveDrawCreate() { m_nDrawSfxId = m_nFormSfxId = USHRT_MAX; m_sDrawCustom = "";}
+ sal_Bool IsDrawMode() { return (m_nDrawSfxId != USHRT_MAX || m_nFormSfxId != USHRT_MAX); }
+ bool IsFormMode() const;
+ bool IsBezierEditMode();
+ bool AreOnlyFormsSelected() const;
+ sal_Bool HasDrwObj(SdrObject *pSdrObj) const;
+ sal_Bool HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const;
+ sal_Bool BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL,
+ Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
+
+ void StateTabWin(SfxItemSet&);
+
+ // attributes have changed
+ DECL_LINK( AttrChangedNotify, void* );
+
+ // form control has been activated
+ DECL_LINK( FormControlActivated, void* );
+
+ // edit links
+ void EditLinkDlg();
+ void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId = 0);
+ void InsertCaption(const InsCaptionOpt *pOpt);
+
+ // Async call by Core
+ void UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUString& rPgStr);
+
+ OUString GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUString& rPgStr);
+
+ // hand over Shell
+ SfxShell *GetCurShell() { return m_pShell; }
+ SwDocShell *GetDocShell();
+ inline const SwDocShell *GetDocShell() const;
+ inline FmFormShell *GetFormShell() { return m_pFormShell; }
+ inline const FmFormShell *GetFormShell() const { return m_pFormShell; }
+
+ // so that in the SubShells' DTors m_pShell can be reset if applicable
+ void ResetSubShell() { m_pShell = 0; }
+
+ virtual void WriteUserData(OUString &, bool bBrowse = false);
+ virtual void ReadUserData(const OUString &, bool bBrowse = false);
+ virtual void ReadUserDataSequence ( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
+ virtual void WriteUserDataSequence ( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse );
+
+ void SetCrsrAtTop( sal_Bool bFlag, sal_Bool bCenter = sal_False )
+ { m_bTopCrsr = bFlag, m_bCenterCrsr = bCenter; }
+ sal_Bool IsCrsrAtTop() const { return m_bTopCrsr; }
+ sal_Bool IsCrsrAtCenter() const { return m_bCenterCrsr; }
+
+ bool JumpToSwMark( const OUString& rMark );
+
+ long InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName,
+ const OUString& rFilterName, sal_Int16 nVersion = 0 );
+
+ void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem );
+ long InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion );
+ DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper * );
+
+ // status methods for clipboard.
+ // Status changes now notified from the clipboard.
+ sal_Bool IsPasteAllowed();
+ sal_Bool IsPasteSpecialAllowed();
+
+ // Enable mail merge - mail merge field dialog enabled
+ void EnableMailMerge(sal_Bool bEnable = sal_True);
+ //apply Accessiblity options
+ void ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOptions);
+
+ SwView(SfxViewFrame* pFrame, SfxViewShell*);
+ ~SwView();
+
+ void NotifyDBChanged();
+
+ SfxObjectShellLock CreateTmpSelectionDoc();
+
+ void AddTransferable(SwTransferable& rTransferable);
+
+ // store MailMerge data while "Back to Mail Merge Wizard" FloatingWindow is active
+ // or to support printing
+ void SetMailMergeConfigItem(SwMailMergeConfigItem* pConfigItem, sal_uInt16 nRestart, sal_Bool bIsSource);
+ SwMailMergeConfigItem* GetMailMergeConfigItem();
+ sal_uInt16 GetMailMergeRestartPage() const;
+ sal_Bool IsMailMergeSourceView() const;
+
+ void ExecFormatPaintbrush(SfxRequest &);
+ void StateFormatPaintbrush(SfxItemSet &);
+
+ //public fuer D&D
+ int InsertGraphic( const OUString &rPath, const OUString &rFilter,
+ sal_Bool bLink = sal_True, GraphicFilter *pFlt = 0,
+ Graphic* pPreviewGrf = 0,
+ sal_Bool bRule = sal_False );
+
+ void ExecuteScan( SfxRequest& rReq );
+
+ SwPostItMgr* GetPostItMgr() { return m_pPostItMgr;}
+ const SwPostItMgr* GetPostItMgr() const { return m_pPostItMgr;}
+
+ // exhibition hack (MA,MBA)
+ void SelectShellForDrop();
+
+ void UpdateDocStats();
+ /// Where is the real cursor: in the annotation or in the main document?
+ void SetAnnotationMode(bool bMode);
+};
+
+// ----------------- inline Methoden ----------------------
+inline long SwView::GetXScroll() const
+{
+ return m_aVisArea.GetWidth() * nScrollX / 100L;
+}
+
+inline long SwView::GetYScroll() const
+{
+ return m_aVisArea.GetHeight() * nScrollY / 100L;
+}
+
+inline const SwDocShell *SwView::GetDocShell() const
+{
+ return ((SwView*)this)->GetDocShell();
+}
+
+SfxTabPage* CreatePrintOptionsPage( Window *pParent,
+ const SfxItemSet &rOptions,
+ sal_Bool bPreview);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/viewlayoutctrl.hxx b/sw/source/core/uibase/inc/viewlayoutctrl.hxx
new file mode 100644
index 000000000000..10648cd36671
--- /dev/null
+++ b/sw/source/core/uibase/inc/viewlayoutctrl.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_VIEWLAYOUTCTRL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_VIEWLAYOUTCTRL_HXX
+
+#include <sfx2/stbitem.hxx>
+
+// class SwViewLayoutControl ----------------------------------------------
+class SwViewLayoutControl : public SfxStatusBarControl
+{
+private:
+
+ struct SwViewLayoutControl_Impl;
+ SwViewLayoutControl_Impl* mpImpl;
+
+public:
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SwViewLayoutControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
+ ~SwViewLayoutControl();
+
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void Paint( const UserDrawEvent& rEvt );
+ virtual sal_Bool MouseButtonDown( const MouseEvent & );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/web.hrc b/sw/source/core/uibase/inc/web.hrc
new file mode 100644
index 000000000000..aef47e9d2bb1
--- /dev/null
+++ b/sw/source/core/uibase/inc/web.hrc
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _WEB_HRC
+#define _WEB_HRC
+
+#include "rcid.hrc"
+
+#define RID_WEBTOOLS_TOOLBOX (RC_WEB_BEGIN + 2)
+#define RID_WEBTEXT_TOOLBOX (RC_WEB_BEGIN + 3)
+#define STR_HUMAN_SWWEBDOC_NAME (RC_WEB_BEGIN + 4)
+#define STR_WRITER_WEBDOC_FULLTYPE_40 (RC_WEB_BEGIN + 5)
+#define STR_SHELLNAME_WEBTEXT (RC_WEB_BEGIN + 6)
+#define STR_SHELLNAME_WEBFRAME (RC_WEB_BEGIN + 7)
+#define RID_WEBFRAME_TOOLBOX (RC_WEB_BEGIN + 8)
+#define STR_WRITER_WEBDOC_FULLTYPE_50 (RC_WEB_BEGIN + 9)
+#define RID_WEBGRAPHIC_TOOLBOX (RC_WEB_BEGIN + 10)
+#define RID_WEBOLE_TOOLBOX (RC_WEB_BEGIN + 11)
+#define STR_WRITER_WEBDOC_FULLTYPE (RC_WEB_BEGIN + 12)
+
+
+
+#define WEB_ACT_END STR_WRITER_WEBDOC_FULLTYPE
+
+#if WEB_ACT_END > RC_WEB_END
+#error Resource-Id Ueberlauf in #file, #line
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wformsh.hxx b/sw/source/core/uibase/inc/wformsh.hxx
new file mode 100644
index 000000000000..aac9f9f69c94
--- /dev/null
+++ b/sw/source/core/uibase/inc/wformsh.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WFORMSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WFORMSH_HXX
+
+#include "drformsh.hxx"
+
+class SwWebDrawFormShell : public SwDrawFormShell
+{
+public:
+ SwWebDrawFormShell(SwView &rShell);
+ virtual ~SwWebDrawFormShell();
+
+ SFX_DECL_INTERFACE(SW_WEBDRAWFORMSHELL)
+ TYPEINFO();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wfrmsh.hxx b/sw/source/core/uibase/inc/wfrmsh.hxx
new file mode 100644
index 000000000000..68f7edcab86b
--- /dev/null
+++ b/sw/source/core/uibase/inc/wfrmsh.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WFRMSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WFRMSH_HXX
+
+#include "frmsh.hxx"
+
+class SwWebFrameShell: public SwFrameShell
+{
+
+public:
+ SFX_DECL_INTERFACE(SW_WEBFRAMESHELL)
+ TYPEINFO();
+
+ SwWebFrameShell(SwView &rView);
+ virtual ~SwWebFrameShell();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wgrfsh.hxx b/sw/source/core/uibase/inc/wgrfsh.hxx
new file mode 100644
index 000000000000..45682ac74554
--- /dev/null
+++ b/sw/source/core/uibase/inc/wgrfsh.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WGRFSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WGRFSH_HXX
+
+#include "grfsh.hxx"
+
+class SwWebGrfShell: public SwGrfShell
+{
+public:
+ SwWebGrfShell(SwView &rShell);
+ virtual ~SwWebGrfShell();
+
+ SFX_DECL_INTERFACE(SW_WEBGRFSHELL)
+ TYPEINFO();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wlistsh.hxx b/sw/source/core/uibase/inc/wlistsh.hxx
new file mode 100644
index 000000000000..3df943966885
--- /dev/null
+++ b/sw/source/core/uibase/inc/wlistsh.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WLISTSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WLISTSH_HXX
+
+#include "listsh.hxx"
+
+class SwWebListShell: public SwListShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_WEBLISTSHELL)
+ TYPEINFO();
+
+ virtual ~SwWebListShell();
+ SwWebListShell(SwView &rView);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wolesh.hxx b/sw/source/core/uibase/inc/wolesh.hxx
new file mode 100644
index 000000000000..bf9dcad60718
--- /dev/null
+++ b/sw/source/core/uibase/inc/wolesh.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WOLESH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WOLESH_HXX
+
+#include "olesh.hxx"
+
+class SwWebOleShell: public SwOleShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_WEBOLESHELL)
+
+ virtual ~SwWebOleShell();
+ SwWebOleShell(SwView &rView);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wordcountctrl.hxx b/sw/source/core/uibase/inc/wordcountctrl.hxx
new file mode 100644
index 000000000000..9026d2a676e9
--- /dev/null
+++ b/sw/source/core/uibase/inc/wordcountctrl.hxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WORDCOUNTCTRL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WORDCOUNTCTRL_HXX
+
+#include <sfx2/stbitem.hxx>
+
+/**
+Word count status bar control for Writer.
+
+@remarks This is a simple status bar control of type SfxStringItem, and it has no custom
+logic whatsoever. The actual updating of the word count string happens in
+SwView::StateStatusLine (see sw/source/ui/uiview/view2.cxx).
+*/
+class SwWordCountStatusBarControl : public SfxStatusBarControl
+{
+public:
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SwWordCountStatusBarControl(sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb);
+ ~SwWordCountStatusBarControl();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wordcountdialog.hxx b/sw/source/core/uibase/inc/wordcountdialog.hxx
new file mode 100644
index 000000000000..3bebd69f4967
--- /dev/null
+++ b/sw/source/core/uibase/inc/wordcountdialog.hxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WORDCOUNTDIALOG_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WORDCOUNTDIALOG_HXX
+#include <sfx2/basedlgs.hxx>
+#include <svtools/stdctrl.hxx>
+#include <vcl/layout.hxx>
+#include <vcl/button.hxx>
+struct SwDocStat;
+#include <sfx2/childwin.hxx>
+#include "swabstdlg.hxx"
+
+class SwWordCountFloatDlg : public SfxModelessDialog
+{
+ virtual void Activate();
+ void SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc);
+ void showCJK(bool bShowCJK);
+
+ FixedText* m_pCurrentWordFT;
+ FixedText* m_pCurrentCharacterFT;
+ FixedText* m_pCurrentCharacterExcludingSpacesFT;
+ FixedText* m_pCurrentCjkcharsFT;
+
+ FixedText* m_pDocWordFT;
+ FixedText* m_pDocCharacterFT;
+ FixedText* m_pDocCharacterExcludingSpacesFT;
+ FixedText* m_pDocCjkcharsFT;
+
+ FixedText* m_pCjkcharsLabelFT;
+
+ CloseButton* m_pClosePB;
+
+ DECL_LINK( CloseHdl, void* );
+public:
+ SwWordCountFloatDlg( SfxBindings* pBindings,
+ SfxChildWindow* pChild,
+ Window *pParent,
+ SfxChildWinInfo* pInfo);
+ ~SwWordCountFloatDlg();
+ void UpdateCounts();
+
+ void SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat);
+};
+
+class SwWordCountWrapper : public SfxChildWindow
+{
+ AbstractSwWordCountFloatDlg* pAbstDlg;
+protected:
+ SwWordCountWrapper( Window *pParentWindow,
+ sal_uInt16 nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW_WITHID(SwWordCountWrapper);
+
+public:
+ void UpdateCounts();
+ void SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/workctrl.hxx b/sw/source/core/uibase/inc/workctrl.hxx
new file mode 100644
index 000000000000..eef6332e01db
--- /dev/null
+++ b/sw/source/core/uibase/inc/workctrl.hxx
@@ -0,0 +1,185 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WORKCTRL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WORKCTRL_HXX
+
+#include <sfx2/tbxctrl.hxx>
+#include <vcl/toolbox.hxx>
+#include <svtools/stdctrl.hxx>
+#include <vcl/button.hxx>
+
+class PopupMenu;
+class SwView;
+
+// double entry! hrc and hxx
+// these Ids say what the buttons below the scrollbar are doing
+#define NID_START 20000
+#define NID_NEXT 20000
+#define NID_PREV 20001
+#define NID_TBL 20002
+#define NID_FRM 20003
+#define NID_PGE 20004
+#define NID_DRW 20005
+#define NID_CTRL 20006
+#define NID_REG 20007
+#define NID_BKM 20008
+#define NID_GRF 20009
+#define NID_OLE 20010
+#define NID_OUTL 20011
+#define NID_SEL 20012
+#define NID_FTN 20013
+#define NID_MARK 20014
+#define NID_POSTIT 20015
+#define NID_SRCH_REP 20016
+#define NID_INDEX_ENTRY 20017
+#define NID_TABLE_FORMULA 20018
+#define NID_TABLE_FORMULA_ERROR 20019
+#define NID_COUNT 20
+
+class SwTbxInsertCtrl : public SfxToolBoxControl
+{
+ sal_uInt16 nLastSlotId;
+
+ using SfxToolBoxControl::Select;
+ virtual void Select( sal_Bool bMod1 = sal_False );
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SwTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ ~SwTbxInsertCtrl();
+
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+ virtual void StateChanged( sal_uInt16 nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState );
+
+ virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException, std::exception);
+};
+
+class SwTbxAutoTextCtrl : public SfxToolBoxControl
+{
+ PopupMenu* pPopup;
+ SwView* pView;
+
+ void DelPopup();
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SwTbxAutoTextCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ virtual ~SwTbxAutoTextCtrl();
+
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+ virtual void StateChanged( sal_uInt16 nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState );
+
+ DECL_LINK(PopupHdl, PopupMenu*);
+};
+
+class SwTbxFieldCtrl : public SfxToolBoxControl
+{
+ PopupMenu* pPopup;
+ SwView* pView;
+
+ void DelPopup();
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SwTbxFieldCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ virtual ~SwTbxFieldCtrl();
+
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+ virtual void StateChanged( sal_uInt16 nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState );
+
+ DECL_LINK(PopupHdl, PopupMenu*);
+};
+
+class SwScrollNaviToolBox : public ToolBox
+{
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+
+ public:
+ SwScrollNaviToolBox(Window* pParent, WinBits nWinStyle ) :
+ ToolBox(pParent, nWinStyle ) {}
+};
+
+class SwScrollNaviPopup : public SfxPopupWindow
+{
+ SwScrollNaviToolBox aToolBox;
+ FixedLine aSeparator;
+ FixedInfo aInfoField;
+ ImageList aIList;
+
+ OUString sQuickHelp[2 * NID_COUNT];
+
+ void ApplyImageList();
+
+ using Window::GetQuickHelpText;
+
+protected:
+ DECL_LINK(SelectHdl, ToolBox*);
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+public:
+ SwScrollNaviPopup( sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window *pParent );
+ ~SwScrollNaviPopup();
+
+ static OUString GetQuickHelpText(sal_Bool bNext);
+
+ virtual SfxPopupWindow* Clone() const;
+ void GrabFocus(){aToolBox.GrabFocus();}
+};
+
+// ImageButtons have to set the HelpText themselves if needed
+
+class SwHlpImageButton : public ImageButton
+{
+ sal_Bool bUp;
+ public:
+ SwHlpImageButton(Window* pParent, const ResId& rResId, sal_Bool bUpBtn) :
+ ImageButton(pParent, rResId), bUp(bUpBtn){}
+
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+
+};
+
+class SwPreviewZoomControl : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SwPreviewZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ ~SwPreviewZoomControl();
+
+ virtual void StateChanged( sal_uInt16 nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState );
+
+ virtual Window* CreateItemWindow( Window *pParent );
+};
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wrap.hxx b/sw/source/core/uibase/inc/wrap.hxx
new file mode 100644
index 000000000000..322b0530a749
--- /dev/null
+++ b/sw/source/core/uibase/inc/wrap.hxx
@@ -0,0 +1,117 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WRAP_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WRAP_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/field.hxx>
+
+class Window;
+class SfxItemSet;
+class SwWrtShell;
+
+class SwWrapDlg : public SfxSingleTabDialog
+{
+ SwWrtShell* pWrtShell;
+
+public:
+ SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode);
+
+ SwWrtShell* GetWrtShell() { return pWrtShell; }
+};
+
+/*--------------------------------------------------------------------
+ Description: circulation TabPage
+ --------------------------------------------------------------------*/
+
+class SwWrapTabPage: public SfxTabPage
+{
+ // WRAPPING
+ RadioButton* m_pNoWrapRB;
+ RadioButton* m_pWrapLeftRB;
+ RadioButton* m_pWrapRightRB;
+ RadioButton* m_pWrapParallelRB;
+ RadioButton* m_pWrapThroughRB;
+ RadioButton* m_pIdealWrapRB;
+
+ // MARGIN
+ MetricField* m_pLeftMarginED;
+ MetricField* m_pRightMarginED;
+ MetricField* m_pTopMarginED;
+ MetricField* m_pBottomMarginED;
+
+ // OPTIONS
+ CheckBox* m_pWrapAnchorOnlyCB;
+ CheckBox* m_pWrapTransparentCB;
+ CheckBox* m_pWrapOutlineCB;
+ CheckBox* m_pWrapOutsideCB;
+
+ sal_uInt16 nOldLeftMargin;
+ sal_uInt16 nOldRightMargin;
+ sal_uInt16 nOldUpperMargin;
+ sal_uInt16 nOldLowerMargin;
+
+ RndStdIds nAnchorId;
+ sal_uInt16 nHtmlMode;
+
+ Size aFrmSize;
+ SwWrtShell* pWrtSh;
+
+ sal_Bool bFormat;
+ sal_Bool bNew;
+ sal_Bool bHtmlMode;
+ sal_Bool bDrawMode;
+ sal_Bool bContourImage;
+
+ SwWrapTabPage(Window *pParent, const SfxItemSet &rSet);
+ ~SwWrapTabPage();
+
+ void ApplyImageList();
+ void EnableModes(const SfxItemSet& rSet);
+ virtual void ActivatePage(const SfxItemSet& rSet);
+ virtual int DeactivatePage(SfxItemSet *pSet);
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ DECL_LINK( RangeModifyHdl, MetricField * );
+ DECL_LINK( WrapTypeHdl, RadioButton * );
+ DECL_LINK(ContourHdl, void *);
+
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+
+public:
+
+ static SfxTabPage *Create(Window *pParent, const SfxItemSet &rSet);
+
+ virtual sal_Bool FillItemSet(SfxItemSet &rSet);
+ virtual void Reset(const SfxItemSet &rSet);
+
+ static sal_uInt16* GetRanges();
+ inline void SetNewFrame(sal_Bool bNewFrame) { bNew = bNewFrame; }
+ inline void SetFormatUsed(sal_Bool bFmt, sal_Bool bDrw) { bFormat = bFmt;
+ bDrawMode = bDrw; }
+ inline void SetShell(SwWrtShell* pSh) { pWrtSh = pSh; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wrtsh.hxx b/sw/source/core/uibase/inc/wrtsh.hxx
new file mode 100644
index 000000000000..fbcdecaecf19
--- /dev/null
+++ b/sw/source/core/uibase/inc/wrtsh.hxx
@@ -0,0 +1,646 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WRTSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WRTSH_HXX
+
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include "swdllapi.h"
+#include <fesh.hxx>
+#include <sortopt.hxx>
+#include <swurl.hxx>
+#include <IMark.hxx>
+#include "navmgr.hxx"
+#include <boost/optional.hpp>
+
+class Window;
+class SbxArray;
+class SwDoc;
+class SwViewOption;
+class SwFlyFrmAttrMgr;
+class SwField;
+class SwTOXBase;
+class SwView;
+class SvGlobalName;
+class SwInputFieldList;
+class SwSectionData;
+class Timer;
+class SvxMacro;
+class SwFmtINetFmt;
+class SvxAutoCorrect;
+class NaviContentBookmark;
+struct SwCallMouseEvent;
+class SfxStringListItem;
+
+namespace com { namespace sun { namespace star { namespace util {
+ struct SearchOptions;
+} } } }
+
+typedef sal_Int32 SelectionType;
+namespace nsSelectionType
+{
+ const SelectionType SEL_TXT = CNT_TXT; // text, never frames too 0x0001
+ const SelectionType SEL_GRF = CNT_GRF; // graphic 0x0002
+ const SelectionType SEL_OLE = CNT_OLE; // OLE 0x0010
+ const SelectionType SEL_FRM = 0x000020; // frame, no content type
+ const SelectionType SEL_NUM = 0x000040; // NumList
+ const SelectionType SEL_TBL = 0x000080; // cursor is in table
+ const SelectionType SEL_TBL_CELLS = 0x000100; // table cells are selected
+ const SelectionType SEL_DRW = 0x000200; // drawing objects (rectangle, circle...)
+ const SelectionType SEL_DRW_TXT = 0x000400; // draw-textobjects in edit mode
+ const SelectionType SEL_BEZ = 0x000800; // edit ornament objects
+ const SelectionType SEL_DRW_FORM = 0x001000; // drawing objects: DB-Forms
+ const SelectionType SEL_FOC_FRM_CTRL = 0x002000; // a form control is focused. Neither set nor evaluated by the SwWrtShell itself, only by it's clients.
+ const SelectionType SEL_MEDIA = 0x004000; // Media object
+ const SelectionType SEL_EXTRUDED_CUSTOMSHAPE = 0x008000; // extruded custom shape
+ const SelectionType SEL_FONTWORK = 0x010000; // fontwork
+ const SelectionType SEL_POSTIT = 0x020000; //annotation
+}
+
+/** Used by the UI to modify the document model.
+
+Eg. the Insert() method will take the current cursor position, insert the
+string, and take care of undo etc.
+*/
+class SW_DLLPUBLIC SwWrtShell: public SwFEShell
+{
+private:
+ using SwCrsrShell::Left;
+ using SwCrsrShell::Right;
+ using SwCrsrShell::Up;
+ using SwCrsrShell::Down;
+ using SwCrsrShell::LeftMargin;
+ using SwCrsrShell::RightMargin;
+ using SwCrsrShell::SelectTxtAttr;
+ using SwCrsrShell::GotoPage;
+ using SwFEShell::InsertObject;
+ using SwEditShell::AutoCorrect;
+ using SwCrsrShell::GotoMark;
+
+ typedef long (SwWrtShell::*SELECTFUNC)(const Point *, sal_Bool bProp );
+
+ SELECTFUNC fnDrag;
+ SELECTFUNC fnSetCrsr;
+ SELECTFUNC fnEndDrag;
+ SELECTFUNC fnKillSel;
+
+public:
+
+ using SwEditShell::Insert;
+
+ long SetCursor (const Point* pPt, bool bProp) { return (this->*fnSetCrsr)(pPt, bProp); }
+ long Drag (const Point* pPt, bool bProp) { return (this->*fnDrag)(pPt, bProp); }
+ long EndDrag (const Point* pPt, bool bProp) { return (this->*fnEndDrag)(pPt, bProp); }
+ long KillSelection(const Point* pPt, bool bProp) { return (this->*fnKillSel)(pPt, bProp); }
+
+ // reset all selections
+ long ResetSelect( const Point *, sal_Bool );
+
+ // resets the cursorstack after movement with PageUp/-Down if a stack is built up
+ inline void ResetCursorStack();
+ SelectionType GetSelectionType() const;
+
+ bool IsModePushed() const { return 0 != pModeStack; }
+ void PushMode();
+ void PopMode();
+
+ void SttSelect();
+ void EndSelect();
+ sal_Bool IsInSelect() const { return bInSelect; }
+ void SetInSelect(sal_Bool bSel = sal_True) { bInSelect = bSel; }
+ // is there a text- or frameselection?
+ sal_Bool HasSelection() const { return SwCrsrShell::HasSelection() ||
+ IsMultiSelection() || IsSelFrmMode() || IsObjSelected(); }
+ sal_Bool Pop( sal_Bool bOldCrsr = sal_True );
+
+ void EnterStdMode();
+ bool IsStdMode() const { return !bExtMode && !bAddMode && !bBlockMode; }
+
+ void EnterExtMode();
+ void LeaveExtMode();
+ bool ToggleExtMode();
+ sal_Bool IsExtMode() const { return bExtMode; }
+
+ void EnterAddMode();
+ void LeaveAddMode();
+ bool ToggleAddMode();
+ sal_Bool IsAddMode() const { return bAddMode; }
+
+ void EnterBlockMode();
+ void LeaveBlockMode();
+ bool ToggleBlockMode();
+ bool IsBlockMode() const { return bBlockMode; }
+
+ void SetInsMode( sal_Bool bOn = sal_True );
+ void ToggleInsMode() { SetInsMode( !bIns ); }
+ sal_Bool IsInsMode() const { return bIns; }
+ void SetRedlineModeAndCheckInsMode( sal_uInt16 eMode );
+
+ void EnterSelFrmMode(const Point *pStartDrag = 0);
+ void LeaveSelFrmMode();
+ sal_Bool IsSelFrmMode() const { return bLayoutMode; }
+ // reset selection of frames
+ void UnSelectFrm();
+
+ void Invalidate();
+
+ // select table cells for editing of formulas in the ribbonbar
+ inline void SelTblCells( const Link &rLink, sal_Bool bMark = sal_True );
+ inline void EndSelTblCells();
+
+ // leave per word or per line selection mode. Is usually called in MB-Up.
+ bool IsExtSel() const { return bSelWrd || bSelLn; }
+
+ // query whether the active fnDrag pointer is set to BeginDrag
+ // is needed for MouseMove to work around bugs 55592/55931
+ inline bool Is_FnDragEQBeginDrag() const;
+
+ // base requests
+ sal_Bool IsInWrd() { return IsInWord(); }
+ sal_Bool IsSttWrd() { return IsStartWord(); }
+ sal_Bool IsEndWrd();
+ bool IsSttOfPara() const { return IsSttPara(); }
+ bool IsEndOfPara() const { return IsEndPara(); }
+
+ // select word / sentense
+ sal_Bool SelNearestWrd();
+ sal_Bool SelWrd (const Point * = 0, sal_Bool bProp=sal_False );
+ // #i32329# Enhanced selection
+ void SelSentence (const Point * = 0, sal_Bool bProp=sal_False );
+ void SelPara (const Point * = 0, sal_Bool bProp=sal_False );
+ long SelAll();
+
+ // basecursortravelling
+typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
+ sal_Bool SimpleMove( FNSimpleMove, sal_Bool bSelect );
+
+ sal_Bool Left ( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual = sal_False );
+ sal_Bool Right ( sal_uInt16 nMode, sal_Bool bSelect,
+ sal_uInt16 nCount, sal_Bool bBasicCall, sal_Bool bVisual = sal_False );
+ sal_Bool Up ( sal_Bool bSelect = sal_False, sal_uInt16 nCount = 1,
+ sal_Bool bBasicCall = sal_False );
+ sal_Bool Down ( sal_Bool bSelect = sal_False, sal_uInt16 nCount = 1,
+ sal_Bool bBasicCall = sal_False );
+ sal_Bool NxtWrd ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); }
+ sal_Bool PrvWrd ( sal_Bool bSelect = sal_False ) { return SimpleMove( &SwWrtShell::_PrvWrd, bSelect ); }
+
+ sal_Bool LeftMargin ( sal_Bool bSelect, sal_Bool bBasicCall );
+ sal_Bool RightMargin( sal_Bool bSelect, sal_Bool bBasicCall );
+
+ sal_Bool SttDoc ( sal_Bool bSelect = sal_False );
+ sal_Bool EndDoc ( sal_Bool bSelect = sal_False );
+
+ sal_Bool SttNxtPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPrvPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndNxtPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPrvPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPg ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPg ( sal_Bool bSelect = sal_False );
+ sal_Bool SttPara ( sal_Bool bSelect = sal_False );
+ sal_Bool EndPara ( sal_Bool bSelect = sal_False );
+ sal_Bool FwdPara ( sal_Bool bSelect = sal_False )
+ { return SimpleMove( &SwWrtShell::_FwdPara, bSelect ); }
+ sal_Bool BwdPara ( sal_Bool bSelect = sal_False )
+ { return SimpleMove( &SwWrtShell::_BwdPara, bSelect ); }
+ sal_Bool FwdSentence( sal_Bool bSelect = sal_False )
+ { return SimpleMove( &SwWrtShell::_FwdSentence, bSelect ); }
+ sal_Bool BwdSentence( sal_Bool bSelect = sal_False )
+ { return SimpleMove( &SwWrtShell::_BwdSentence, bSelect ); }
+
+ // #i20126# Enhanced table selection
+ sal_Bool SelectTableRowCol( const Point& rPt, const Point* pEnd = 0, bool bRowDrag = false );
+ sal_Bool SelectTableRow();
+ sal_Bool SelectTableCol();
+ sal_Bool SelectTableCell();
+
+ sal_Bool SelectTxtAttr( sal_uInt16 nWhich, const SwTxtAttr* pAttr = 0 );
+
+ // per column jumps
+ sal_Bool StartOfColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool StartOfNextColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfNextColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool StartOfPrevColumn ( sal_Bool bSelect = sal_False );
+ sal_Bool EndOfPrevColumn ( sal_Bool bSelect = sal_False );
+
+ // set the cursor to page "nPage" at the beginning
+ // additionally to a identically named implementation in crsrsh.hxx
+ // here all existing selections are being reset before setting the
+ // cursor
+ sal_Bool GotoPage( sal_uInt16 nPage, sal_Bool bRecord );
+
+ // setting the cursor; remember the old position for turning back
+ DECL_LINK( ExecFlyMac, void * );
+
+ sal_Bool PageCrsr(SwTwips lOffset, sal_Bool bSelect);
+
+ // update fields
+ void UpdateInputFlds( SwInputFieldList* pLst = 0 );
+
+ void NoEdit(bool bHideCrsr = true);
+ void Edit();
+
+ sal_Bool IsRetainSelection() const { return mbRetainSelection; }
+ void SetRetainSelection( sal_Bool bRet ) { mbRetainSelection = bRet; }
+
+ // change current data base and notify
+ void ChgDBData(const SwDBData& SwDBData);
+
+ // delete
+ long DelToEndOfLine();
+ long DelToStartOfLine();
+ long DelLine();
+ long DelLeft();
+
+ // also deletes the frame or sets the cursor in the frame when bDelFrm == sal_False
+ long DelRight();
+ long DelToEndOfPara();
+ long DelToStartOfPara();
+ long DelToEndOfSentence();
+ long DelToStartOfSentence();
+ long DelNxtWord();
+ long DelPrvWord();
+
+ // checks whether a word selection exists.
+ // According to the rules for intelligent Cut / Paste
+ // surrounding spaces are cut out.
+ // returns type of word selection (see enum)
+ enum word {
+ NO_WORD = 0,
+ WORD_SPACE_BEFORE = 1,
+ WORD_SPACE_AFTER = 2,
+ WORD_NO_SPACE = 3
+ };
+ int IntelligentCut(int nSelectionType, sal_Bool bCut = sal_True);
+
+ // edit
+ void Insert(SwField &);
+ void Insert(const OUString &);
+ // graphic
+ void Insert( const OUString &rPath, const OUString &rFilter,
+ const Graphic &, SwFlyFrmAttrMgr * = 0,
+ sal_Bool bRule = sal_False );
+
+ void InsertByWord( const OUString & );
+ void InsertPageBreak(const OUString *pPageDesc = 0, ::boost::optional<sal_uInt16> pPgNum = boost::none );
+ void InsertLineBreak();
+ void InsertColumnBreak();
+ void InsertFootnote(const OUString &, sal_Bool bEndNote = sal_False, sal_Bool bEdit = sal_True );
+ void SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True );
+ bool CanInsert();
+
+ // indexes
+ void InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
+ sal_Bool UpdateTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
+
+ // numbering and bullets
+ /**
+ Turns on numbering or bullets.
+
+ @param bNum sal_True: turn on numbering
+ sal_False: turn on bullets
+ */
+ void NumOrBulletOn(sal_Bool bNum); // #i29560#
+ void NumOrBulletOff(); // #i29560#
+ void NumOn();
+ void BulletOn();
+
+ //OLE
+ void InsertObject( /*SvInPlaceObjectRef *pObj, */ // != 0 for clipboard
+ const svt::EmbeddedObjectRef&,
+ SvGlobalName *pName = 0, // != 0 create object accordingly
+ sal_Bool bActivate = sal_True,
+ sal_uInt16 nSlotId = 0); // SlotId for dialog
+
+ sal_Bool InsertOleObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrmFmt **pFlyFrmFmt = 0 );
+ void LaunchOLEObj( long nVerb = 0 ); // start server
+ virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset );
+ virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
+ const SwRect *pFlyPrtRect = 0,
+ const SwRect *pFlyFrmRect = 0,
+ const bool bNoTxtFrmPrtAreaChanged = false );
+ virtual void ConnectObj( svt::EmbeddedObjectRef& xIPObj, const SwRect &rPrt,
+ const SwRect &rFrm );
+
+ // styles and formats
+
+ // enum tells when should happen when the style was not found
+ enum GetStyle { GETSTYLE_NOCREATE, // create none
+ GETSTYLE_CREATESOME, // if on PoolId create mapt
+ GETSTYLE_CREATEANY }; // return standard if applicable
+
+ SwTxtFmtColl* GetParaStyle(const OUString &rCollName,
+ GetStyle eCreate = GETSTYLE_NOCREATE);
+ SwCharFmt* GetCharStyle(const OUString &rFmtName,
+ GetStyle eCreate = GETSTYLE_NOCREATE);
+ SwFrmFmt* GetTblStyle(const OUString &rFmtName);
+
+ void SetPageStyle(const OUString &rCollName);
+
+ OUString GetCurPageStyle( const sal_Bool bCalcFrm = sal_True ) const;
+
+ // change current style using the attributes in effect
+ void QuickUpdateStyle();
+
+ enum DoType { UNDO, REDO, REPEAT };
+
+ void Do( DoType eDoType, sal_uInt16 nCnt = 1 );
+ OUString GetDoString( DoType eDoType ) const;
+ OUString GetRepeatString() const;
+ sal_uInt16 GetDoStrings( DoType eDoType, SfxStringListItem& rStrLstItem ) const;
+
+ // search and replace
+ sal_uLong SearchPattern(const com::sun::star::util::SearchOptions& rSearchOpt,
+ sal_Bool bSearchInNotes,
+ SwDocPositions eStart, SwDocPositions eEnde,
+ FindRanges eFlags = FND_IN_BODY,
+ int bReplace = sal_False );
+
+ sal_uLong SearchTempl (const OUString &rTempl,
+ SwDocPositions eStart, SwDocPositions eEnde,
+ FindRanges eFlags = FND_IN_BODY,
+ const OUString* pReplTempl = 0 );
+
+ sal_uLong SearchAttr (const SfxItemSet& rFindSet,
+ sal_Bool bNoColls,
+ SwDocPositions eStart,SwDocPositions eEnde,
+ FindRanges eFlags = FND_IN_BODY,
+ const com::sun::star::util::SearchOptions* pSearchOpt = 0,
+ const SfxItemSet* pReplaceSet = 0);
+
+ void AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar = ' ' );
+
+ // action ahead of cursor movement
+ // resets selection if applicable, triggers timer and GCAttr()
+ void MoveCrsr( sal_Bool bWithSelect = sal_False );
+
+ // update input fields
+ sal_Bool StartInputFldDlg(SwField*, sal_Bool bNextButton, Window* pParentWin = 0, OString* pWindowState = 0);
+ // update DropDown fields
+ sal_Bool StartDropDownFldDlg(SwField*, sal_Bool bNextButton, OString* pWindowState = 0);
+
+ //"Handler" for changes at DrawView - for controls.
+ virtual void DrawSelChanged( );
+
+ // jump to bookmark and set the "selctions-flags" correctly again
+ sal_Bool GotoMark( const ::sw::mark::IMark* const pMark );
+ sal_Bool GotoMark( const ::sw::mark::IMark* const pMark, sal_Bool bSelect, sal_Bool bStart );
+ sal_Bool GotoMark( const OUString& rName );
+ sal_Bool GoNextBookmark(); // sal_True when there still was one
+ sal_Bool GoPrevBookmark();
+
+ bool GotoFieldmark(::sw::mark::IFieldmark const * const pMark);
+
+ sal_Bool GotoField( const SwFmtFld& rFld );
+
+ // jump to the next / previous hyperlink - inside text and also
+ // on graphics
+ bool SelectNextPrevHyperlink( bool bNext = true );
+
+ // determine corresponding SwView
+ const SwView& GetView() const { return rView; }
+ SwView& GetView() { return rView; }
+
+ // Because nobody else is doing it, here is a ExecMacro()
+ void ExecMacro( const SvxMacro& rMacro, OUString* pRet = 0, SbxArray* pArgs = 0 );
+ // call into the dark Basic/JavaScript
+ sal_uInt16 CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent,
+ bool bCheckPtr = false, SbxArray* pArgs = 0,
+ const Link* pCallBack = 0 );
+
+ // a click at the given field. the cursor is on it.
+ // execute the predefined actions.
+ void ClickToField( const SwField& rFld );
+ void ClickToINetAttr( const SwFmtINetFmt& rItem, sal_uInt16 nFilter = URLLOAD_NOFILTER );
+ bool ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter = URLLOAD_NOFILTER );
+ inline bool IsInClickToEdit() const ;
+
+ // if a URL-Button is selected, return its URL; otherwise an empty string
+ bool GetURLFromButton( OUString& rURL, OUString& rDescr ) const;
+
+ void NavigatorPaste( const NaviContentBookmark& rBkmk,
+ const sal_uInt16 nAction );
+
+ virtual void ApplyViewOptions( const SwViewOption &rOpt );
+ virtual void SetReadonlyOption( sal_Bool bSet );
+
+ // automatic update of styles
+ void AutoUpdateFrame(SwFrmFmt* pFmt, const SfxItemSet& rStyleSet);
+ void AutoUpdatePara(SwTxtFmtColl* pColl, const SfxItemSet& rStyleSet, SwPaM* pPaM = NULL );
+
+ // link for inserting ranges via Drag&Drop/Clipboard
+ DECL_STATIC_LINK( SwWrtShell, InsertRegionDialog, SwSectionData* );
+
+ // ctor, the first one is a kind of a controlled copy ctor for more views of a document
+ SwWrtShell( SwWrtShell&, Window *pWin, SwView &rShell);
+ SwWrtShell( SwDoc& rDoc, Window *pWin, SwView &rShell,
+ const SwViewOption *pViewOpt = 0);
+ virtual ~SwWrtShell();
+
+ bool TryRemoveIndent(); // #i23725#
+
+ OUString GetSelDescr() const;
+
+ SwNavigationMgr& GetNavigationMgr();
+ void addCurrentPosition();
+ sal_Bool GotoFly( const OUString& rName, FlyCntType eType = FLYCNTTYPE_ALL,
+ sal_Bool bSelFrame = sal_True );
+ bool GotoINetAttr( const SwTxtINetFmt& rAttr );
+ void GotoOutline( sal_uInt16 nIdx );
+ bool GotoOutline( const OUString& rName );
+ bool GotoRegion( const OUString& rName );
+ sal_Bool GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType = 0,
+ sal_uInt16 nSeqNo = 0 );
+ sal_Bool GotoNextTOXBase( const OUString* pName = 0);
+ bool GotoTable( const OUString& rName );
+ sal_Bool GotoFld( const SwFmtFld& rFld );
+ const SwRangeRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False);
+
+ void ChangeHeaderOrFooter(const OUString& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning);
+ virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow );
+
+private:
+
+ SAL_DLLPRIVATE void OpenMark();
+ SAL_DLLPRIVATE void CloseMark( bool bOkFlag );
+
+ struct ModeStack
+ {
+ ModeStack *pNext;
+ sal_Bool bAdd,
+ bBlock,
+ bExt,
+ bIns;
+ ModeStack(ModeStack *pNextMode, sal_Bool _bIns, sal_Bool _bExt, sal_Bool _bAdd, sal_Bool _bBlock):
+ pNext(pNextMode),
+ bAdd(_bAdd),
+ bBlock(_bBlock),
+ bExt(_bExt),
+ bIns(_bIns)
+ {}
+ } *pModeStack;
+
+ // carry cursor along when PageUp / -Down
+ enum PageMove
+ {
+ MV_NO,
+ MV_PAGE_UP,
+ MV_PAGE_DOWN
+ } ePageMove;
+
+ struct CrsrStack
+ {
+ Point aDocPos;
+ CrsrStack *pNext;
+ sal_Bool bValidCurPos : 1;
+ sal_Bool bIsFrmSel : 1;
+ SwTwips lOffset;
+
+ CrsrStack( sal_Bool bValid, sal_Bool bFrmSel, const Point &rDocPos,
+ SwTwips lOff, CrsrStack *pN )
+ : aDocPos(rDocPos),
+ pNext(pN),
+ bValidCurPos( bValid ),
+ bIsFrmSel( bFrmSel ),
+ lOffset(lOff)
+ {
+
+ }
+
+ } *pCrsrStack;
+
+ SwView &rView;
+ SwNavigationMgr aNavigationMgr;
+
+ Point aDest;
+ bool bDestOnStack;
+ bool HasCrsrStack() const { return 0 != pCrsrStack; }
+ SAL_DLLPRIVATE sal_Bool PushCrsr(SwTwips lOffset, sal_Bool bSelect);
+ SAL_DLLPRIVATE sal_Bool PopCrsr(sal_Bool bUpdate, sal_Bool bSelect = sal_False);
+
+ // take END cursor along when PageUp / -Down
+ SAL_DLLPRIVATE bool _SttWrd();
+ SAL_DLLPRIVATE bool _EndWrd();
+ SAL_DLLPRIVATE sal_Bool _NxtWrd();
+ SAL_DLLPRIVATE sal_Bool _PrvWrd();
+ // #i92468#
+ SAL_DLLPRIVATE sal_Bool _NxtWrdForDelete();
+ SAL_DLLPRIVATE sal_Bool _PrvWrdForDelete();
+ SAL_DLLPRIVATE sal_Bool _FwdSentence();
+ SAL_DLLPRIVATE sal_Bool _BwdSentence();
+ sal_Bool _FwdPara();
+ SAL_DLLPRIVATE sal_Bool _BwdPara();
+
+ // selections
+ sal_Bool bIns :1;
+ sal_Bool bInSelect :1;
+ sal_Bool bExtMode :1;
+ sal_Bool bAddMode :1;
+ sal_Bool bBlockMode :1;
+ sal_Bool bLayoutMode :1;
+ sal_Bool bCopy :1;
+ sal_Bool bSelWrd :1;
+ sal_Bool bSelLn :1;
+ bool bIsInClickToEdit:1;
+ sal_Bool bClearMark :1; // don't delete selection for ChartAutoPilot
+ sal_Bool mbRetainSelection :1; // Do not remove selections
+
+ Point aStart;
+ Link aSelTblLink;
+
+ // resets the cursor stack after movement by PageUp/-Down
+ SAL_DLLPRIVATE void _ResetCursorStack();
+
+ SAL_DLLPRIVATE void SttDragDrop(Timer *);
+
+ using SwCrsrShell::SetCrsr;
+ SAL_DLLPRIVATE long SetCrsr(const Point *, sal_Bool bProp=sal_False );
+
+ SAL_DLLPRIVATE long SetCrsrKillSel(const Point *, sal_Bool bProp=sal_False );
+
+ SAL_DLLPRIVATE long StdSelect(const Point *, sal_Bool bProp=sal_False );
+ SAL_DLLPRIVATE long BeginDrag(const Point *, sal_Bool bProp=sal_False );
+ SAL_DLLPRIVATE long Drag(const Point *, sal_Bool bProp=sal_False );
+ SAL_DLLPRIVATE long EndDrag(const Point *, sal_Bool bProp=sal_False );
+
+ SAL_DLLPRIVATE long ExtSelWrd(const Point *, sal_Bool bProp=sal_False );
+ SAL_DLLPRIVATE long ExtSelLn(const Point *, sal_Bool bProp=sal_False );
+
+ // move text from Drag and Drop; Point is destination for all selections.
+ SAL_DLLPRIVATE long MoveText(const Point *, sal_Bool bProp=sal_False );
+
+ SAL_DLLPRIVATE long BeginFrmDrag(const Point *, sal_Bool bProp=sal_False );
+
+ // after SSize/Move of a frame update; Point is destination.
+ SAL_DLLPRIVATE long UpdateLayoutFrm(const Point *, sal_Bool bProp=sal_False );
+
+ SAL_DLLPRIVATE long SttLeaveSelect(const Point *, sal_Bool bProp=sal_False );
+ SAL_DLLPRIVATE long AddLeaveSelect(const Point *, sal_Bool bProp=sal_False );
+ SAL_DLLPRIVATE long Ignore(const Point *, sal_Bool bProp=sal_False );
+
+ SAL_DLLPRIVATE void LeaveExtSel() { bSelWrd = bSelLn = sal_False;}
+
+ SAL_DLLPRIVATE sal_Bool GoStart(sal_Bool KeepArea = sal_False, sal_Bool * = 0,
+ sal_Bool bSelect = sal_False, sal_Bool bDontMoveRegion = sal_False);
+ SAL_DLLPRIVATE sal_Bool GoEnd(sal_Bool KeepArea = sal_False, sal_Bool * = 0);
+
+ enum BookMarkMove
+ {
+ BOOKMARK_INDEX,
+ BOOKMARK_NEXT,
+ BOOKMARK_PREV,
+ BOOKMARK_LAST_LAST_ENTRY
+ };
+
+ SAL_DLLPRIVATE sal_Bool MoveBookMark(BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark=NULL);
+};
+
+inline void SwWrtShell::ResetCursorStack()
+{
+ if ( HasCrsrStack() )
+ _ResetCursorStack();
+}
+
+inline void SwWrtShell::SelTblCells(const Link &rLink, sal_Bool bMark )
+{
+ SetSelTblCells( sal_True );
+ bClearMark = bMark;
+ aSelTblLink = rLink;
+}
+inline void SwWrtShell::EndSelTblCells()
+{
+ SetSelTblCells( sal_False );
+ bClearMark = sal_True;
+}
+
+inline bool SwWrtShell::IsInClickToEdit() const { return bIsInClickToEdit; }
+
+inline bool SwWrtShell::Is_FnDragEQBeginDrag() const
+{
+#ifdef __GNUC__
+ SELECTFUNC fnTmp = &SwWrtShell::BeginDrag;
+ return fnDrag == fnTmp;
+#else
+ return fnDrag == &SwWrtShell::BeginDrag;
+#endif
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wtabsh.hxx b/sw/source/core/uibase/inc/wtabsh.hxx
new file mode 100644
index 000000000000..64f25bcb4ed4
--- /dev/null
+++ b/sw/source/core/uibase/inc/wtabsh.hxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WTABSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WTABSH_HXX
+
+#include "tabsh.hxx"
+
+class SwWebTableShell: public SwTableShell
+{
+public:
+ SFX_DECL_INTERFACE(SW_WEBTABSHELL)
+ TYPEINFO();
+
+ virtual ~SwWebTableShell();
+ SwWebTableShell(SwView &rView);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wtextsh.hxx b/sw/source/core/uibase/inc/wtextsh.hxx
new file mode 100644
index 000000000000..3a236f7ce307
--- /dev/null
+++ b/sw/source/core/uibase/inc/wtextsh.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WTEXTSH_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WTEXTSH_HXX
+
+#include "textsh.hxx"
+
+class SwWebTextShell: public SwTextShell
+{
+
+public:
+ SFX_DECL_INTERFACE(SW_WEBTEXTSHELL)
+ TYPEINFO();
+
+ SwWebTextShell(SwView &rView);
+ virtual ~SwWebTextShell();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/wview.hxx b/sw/source/core/uibase/inc/wview.hxx
new file mode 100644
index 000000000000..873f7a720648
--- /dev/null
+++ b/sw/source/core/uibase/inc/wview.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_WVIEW_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_WVIEW_HXX
+
+#include "swdllapi.h"
+#include "view.hxx"
+
+class SW_DLLPUBLIC SwWebView: public SwView
+{
+protected:
+ virtual void SelectShell();
+public:
+
+ SFX_DECL_VIEWFACTORY(SwWebView);
+ SFX_DECL_INTERFACE(SW_WEBVIEWSHELL)
+ TYPEINFO();
+
+ SwWebView(SfxViewFrame* pFrame, SfxViewShell*);
+ ~SwWebView();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/uibase/inc/zoomctrl.hxx b/sw/source/core/uibase/inc/zoomctrl.hxx
new file mode 100644
index 000000000000..89818fdf4f72
--- /dev/null
+++ b/sw/source/core/uibase/inc/zoomctrl.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_SW_SOURCE_UI_INC_ZOOMCTRL_HXX
+#define INCLUDED_SW_SOURCE_UI_INC_ZOOMCTRL_HXX
+
+#include <svx/zoomctrl.hxx>
+
+class SwZoomControl : public SvxZoomStatusBarControl
+{
+private:
+ OUString sPreviewZoom;
+public:
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void Paint( const UserDrawEvent& rEvt );
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SwZoomControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
+ ~SwZoomControl();
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */