summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/inc')
-rw-r--r--sc/source/ui/inc/AccessibilityHints.hxx97
-rw-r--r--sc/source/ui/inc/AccessibleCell.hxx173
-rw-r--r--sc/source/ui/inc/AccessibleCellBase.hxx153
-rw-r--r--sc/source/ui/inc/AccessibleContextBase.hxx344
-rw-r--r--sc/source/ui/inc/AccessibleCsvControl.hxx666
-rw-r--r--sc/source/ui/inc/AccessibleDataPilotControl.hxx145
-rw-r--r--sc/source/ui/inc/AccessibleDocument.hxx328
-rw-r--r--sc/source/ui/inc/AccessibleDocumentBase.hxx50
-rw-r--r--sc/source/ui/inc/AccessibleDocumentPagePreview.hxx159
-rw-r--r--sc/source/ui/inc/AccessibleEditObject.hxx178
-rw-r--r--sc/source/ui/inc/AccessiblePageHeader.hxx111
-rw-r--r--sc/source/ui/inc/AccessiblePageHeaderArea.hxx138
-rw-r--r--sc/source/ui/inc/AccessiblePreviewCell.hxx121
-rw-r--r--sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx152
-rw-r--r--sc/source/ui/inc/AccessiblePreviewTable.hxx182
-rw-r--r--sc/source/ui/inc/AccessibleSpreadsheet.hxx289
-rw-r--r--sc/source/ui/inc/AccessibleTableBase.hxx298
-rw-r--r--sc/source/ui/inc/AccessibleText.hxx359
-rw-r--r--sc/source/ui/inc/ChartRangeSelectionListener.hxx79
-rw-r--r--sc/source/ui/inc/DrawModelBroadcaster.hxx59
-rw-r--r--sc/source/ui/inc/IAnyRefDialog.hxx64
-rw-r--r--sc/source/ui/inc/ScDevChart.hxx84
-rw-r--r--sc/source/ui/inc/acredlin.hrc75
-rw-r--r--sc/source/ui/inc/acredlin.hxx264
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx281
-rw-r--r--sc/source/ui/inc/areasave.hxx84
-rw-r--r--sc/source/ui/inc/areasdlg.hxx108
-rw-r--r--sc/source/ui/inc/asciiopt.hxx211
-rw-r--r--sc/source/ui/inc/attrdlg.hrc51
-rw-r--r--sc/source/ui/inc/attrdlg.hxx69
-rw-r--r--sc/source/ui/inc/auditsh.hxx59
-rw-r--r--sc/source/ui/inc/autofmt.hxx210
-rw-r--r--sc/source/ui/inc/autostyl.hxx68
-rw-r--r--sc/source/ui/inc/cbutton.hxx84
-rw-r--r--sc/source/ui/inc/cellsh.hxx106
-rw-r--r--sc/source/ui/inc/chartsh.hxx52
-rw-r--r--sc/source/ui/inc/client.hxx64
-rw-r--r--sc/source/ui/inc/colrowba.hxx110
-rw-r--r--sc/source/ui/inc/condfrmt.hrc73
-rw-r--r--sc/source/ui/inc/condfrmt.hxx155
-rw-r--r--sc/source/ui/inc/conflictsdlg.hrc43
-rw-r--r--sc/source/ui/inc/conflictsdlg.hxx216
-rw-r--r--sc/source/ui/inc/consdlg.hxx136
-rw-r--r--sc/source/ui/inc/content.hxx169
-rw-r--r--sc/source/ui/inc/corodlg.hxx81
-rw-r--r--sc/source/ui/inc/crdlg.hxx66
-rw-r--r--sc/source/ui/inc/crnrdlg.hrc46
-rw-r--r--sc/source/ui/inc/crnrdlg.hxx112
-rw-r--r--sc/source/ui/inc/csvcontrol.hxx432
-rw-r--r--sc/source/ui/inc/csvgrid.hxx358
-rw-r--r--sc/source/ui/inc/csvruler.hxx200
-rw-r--r--sc/source/ui/inc/csvsplits.hxx103
-rw-r--r--sc/source/ui/inc/csvtablebox.hxx161
-rw-r--r--sc/source/ui/inc/dapidata.hxx72
-rw-r--r--sc/source/ui/inc/dapitype.hxx95
-rw-r--r--sc/source/ui/inc/dbdocfun.hxx124
-rw-r--r--sc/source/ui/inc/dbfunc.hxx136
-rw-r--r--sc/source/ui/inc/dbnamdlg.hrc51
-rw-r--r--sc/source/ui/inc/dbnamdlg.hxx127
-rw-r--r--sc/source/ui/inc/delcldlg.hxx64
-rw-r--r--sc/source/ui/inc/delcodlg.hxx74
-rw-r--r--sc/source/ui/inc/docfunc.hxx189
-rw-r--r--sc/source/ui/inc/docsh.hxx468
-rw-r--r--sc/source/ui/inc/dpcontrol.hrc40
-rw-r--r--sc/source/ui/inc/dpcontrol.hxx363
-rw-r--r--sc/source/ui/inc/dpgroupdlg.hxx172
-rw-r--r--sc/source/ui/inc/drawsh.hxx94
-rw-r--r--sc/source/ui/inc/drawutil.hxx51
-rw-r--r--sc/source/ui/inc/drawview.hxx151
-rw-r--r--sc/source/ui/inc/drformsh.hxx55
-rw-r--r--sc/source/ui/inc/drtxtob.hxx89
-rw-r--r--sc/source/ui/inc/drwtrans.hxx110
-rw-r--r--sc/source/ui/inc/dwfunctr.hxx158
-rw-r--r--sc/source/ui/inc/editable.hxx86
-rw-r--r--sc/source/ui/inc/editfield.hxx50
-rw-r--r--sc/source/ui/inc/editsh.hxx86
-rw-r--r--sc/source/ui/inc/expftext.hxx45
-rwxr-xr-xsc/source/ui/inc/fieldwnd.hxx220
-rw-r--r--sc/source/ui/inc/filldlg.hxx144
-rw-r--r--sc/source/ui/inc/filtdlg.hxx267
-rw-r--r--sc/source/ui/inc/filter.hrc82
-rw-r--r--sc/source/ui/inc/foptmgr.hxx121
-rw-r--r--sc/source/ui/inc/formatsh.hxx79
-rw-r--r--sc/source/ui/inc/formdata.hxx66
-rw-r--r--sc/source/ui/inc/formula.hxx138
-rw-r--r--sc/source/ui/inc/fuconarc.hxx62
-rw-r--r--sc/source/ui/inc/fuconcustomshape.hxx61
-rw-r--r--sc/source/ui/inc/fuconpol.hxx63
-rw-r--r--sc/source/ui/inc/fuconrec.hxx62
-rw-r--r--sc/source/ui/inc/fuconstr.hxx67
-rw-r--r--sc/source/ui/inc/fuconuno.hxx67
-rw-r--r--sc/source/ui/inc/fudraw.hxx77
-rw-r--r--sc/source/ui/inc/fuedipo.hxx60
-rw-r--r--sc/source/ui/inc/fuinsert.hxx85
-rw-r--r--sc/source/ui/inc/fumark.hxx74
-rw-r--r--sc/source/ui/inc/funcpage.hxx128
-rw-r--r--sc/source/ui/inc/funcutl.hxx198
-rw-r--r--sc/source/ui/inc/fupoor.hxx136
-rw-r--r--sc/source/ui/inc/fusel.hxx81
-rw-r--r--sc/source/ui/inc/futext.hxx81
-rw-r--r--sc/source/ui/inc/graphsh.hxx57
-rw-r--r--sc/source/ui/inc/gridmerg.hxx64
-rw-r--r--sc/source/ui/inc/gridwin.hxx426
-rw-r--r--sc/source/ui/inc/groupdlg.hxx61
-rw-r--r--sc/source/ui/inc/hdrcont.hxx141
-rw-r--r--sc/source/ui/inc/hfedtdlg.hxx56
-rw-r--r--sc/source/ui/inc/highred.hrc71
-rw-r--r--sc/source/ui/inc/highred.hxx124
-rw-r--r--sc/source/ui/inc/hintwin.hxx54
-rw-r--r--sc/source/ui/inc/hiranges.hxx64
-rw-r--r--sc/source/ui/inc/imoptdlg.hxx108
-rw-r--r--sc/source/ui/inc/impex.hxx191
-rw-r--r--sc/source/ui/inc/inputhdl.hxx296
-rw-r--r--sc/source/ui/inc/inputwin.hxx228
-rw-r--r--sc/source/ui/inc/inscldlg.hxx62
-rw-r--r--sc/source/ui/inc/inscodlg.hxx122
-rw-r--r--sc/source/ui/inc/instbdlg.hrc52
-rw-r--r--sc/source/ui/inc/instbdlg.hxx136
-rw-r--r--sc/source/ui/inc/invmerge.hxx61
-rw-r--r--sc/source/ui/inc/lbseldlg.hxx70
-rw-r--r--sc/source/ui/inc/linkarea.hrc42
-rw-r--r--sc/source/ui/inc/linkarea.hxx106
-rw-r--r--sc/source/ui/inc/lnktrans.hxx53
-rw-r--r--sc/source/ui/inc/makefile.mk26
-rw-r--r--sc/source/ui/inc/mediash.hxx54
-rw-r--r--sc/source/ui/inc/miscdlgs.hrc188
-rw-r--r--sc/source/ui/inc/msgpool.hxx78
-rw-r--r--sc/source/ui/inc/mtrindlg.hxx76
-rw-r--r--sc/source/ui/inc/mvtabdlg.hxx79
-rw-r--r--sc/source/ui/inc/namecrea.hxx59
-rw-r--r--sc/source/ui/inc/namedlg.hrc52
-rw-r--r--sc/source/ui/inc/namedlg.hxx123
-rw-r--r--sc/source/ui/inc/namepast.hxx62
-rw-r--r--sc/source/ui/inc/navcitem.hxx55
-rw-r--r--sc/source/ui/inc/navipi.hxx366
-rw-r--r--sc/source/ui/inc/navsett.hxx59
-rw-r--r--sc/source/ui/inc/notemark.hxx80
-rw-r--r--sc/source/ui/inc/oleobjsh.hxx52
-rw-r--r--sc/source/ui/inc/olinefun.hxx68
-rw-r--r--sc/source/ui/inc/olinewin.hxx244
-rw-r--r--sc/source/ui/inc/opredlin.hrc38
-rw-r--r--sc/source/ui/inc/opredlin.hxx86
-rw-r--r--sc/source/ui/inc/optdlg.hrc192
-rw-r--r--sc/source/ui/inc/optload.hrc40
-rw-r--r--sc/source/ui/inc/optload.hxx68
-rw-r--r--sc/source/ui/inc/optsolver.hrc98
-rw-r--r--sc/source/ui/inc/optsolver.hxx264
-rw-r--r--sc/source/ui/inc/output.hxx272
-rw-r--r--sc/source/ui/inc/pagedata.hxx95
-rw-r--r--sc/source/ui/inc/parawin.hxx171
-rw-r--r--sc/source/ui/inc/pfiltdlg.hxx145
-rw-r--r--sc/source/ui/inc/pfuncache.hxx125
-rw-r--r--sc/source/ui/inc/pgbrksh.hxx53
-rw-r--r--sc/source/ui/inc/pivotsh.hxx61
-rw-r--r--sc/source/ui/inc/pntlock.hxx67
-rw-r--r--sc/source/ui/inc/popmenu.hxx53
-rw-r--r--sc/source/ui/inc/preview.hxx168
-rw-r--r--sc/source/ui/inc/prevloc.hxx157
-rw-r--r--sc/source/ui/inc/prevwsh.hxx137
-rw-r--r--sc/source/ui/inc/printfun.hxx368
-rw-r--r--sc/source/ui/inc/privsplt.hxx86
-rw-r--r--sc/source/ui/inc/protectiondlg.hrc44
-rw-r--r--sc/source/ui/inc/protectiondlg.hxx82
-rw-r--r--sc/source/ui/inc/pvfundlg.hxx244
-rw-r--r--sc/source/ui/inc/pvlaydlg.hxx239
-rw-r--r--sc/source/ui/inc/redcom.hxx70
-rw-r--r--sc/source/ui/inc/reffact.hxx122
-rw-r--r--sc/source/ui/inc/refundo.hxx69
-rw-r--r--sc/source/ui/inc/retypepassdlg.hrc71
-rw-r--r--sc/source/ui/inc/retypepassdlg.hxx174
-rw-r--r--sc/source/ui/inc/rfindlst.hxx75
-rw-r--r--sc/source/ui/inc/scendlg.hxx80
-rw-r--r--sc/source/ui/inc/scui_def.hxx57
-rw-r--r--sc/source/ui/inc/scuiasciiopt.hxx147
-rw-r--r--sc/source/ui/inc/scuiautofmt.hxx88
-rw-r--r--sc/source/ui/inc/scuiimoptdlg.hxx78
-rw-r--r--sc/source/ui/inc/scuitphfedit.hxx165
-rw-r--r--sc/source/ui/inc/select.hxx127
-rw-r--r--sc/source/ui/inc/selectionstate.hxx79
-rw-r--r--sc/source/ui/inc/seltrans.hxx81
-rw-r--r--sc/source/ui/inc/servobj.hxx76
-rw-r--r--sc/source/ui/inc/sharedocdlg.hrc44
-rw-r--r--sc/source/ui/inc/sharedocdlg.hxx76
-rw-r--r--sc/source/ui/inc/shtabdlg.hxx75
-rw-r--r--sc/source/ui/inc/simpref.hrc37
-rw-r--r--sc/source/ui/inc/simpref.hxx122
-rw-r--r--sc/source/ui/inc/sizedev.hxx55
-rw-r--r--sc/source/ui/inc/solveroptions.hrc47
-rw-r--r--sc/source/ui/inc/solveroptions.hxx123
-rw-r--r--sc/source/ui/inc/solverutil.hxx50
-rw-r--r--sc/source/ui/inc/solvrdlg.hrc46
-rw-r--r--sc/source/ui/inc/solvrdlg.hxx109
-rw-r--r--sc/source/ui/inc/sortdlg.hrc90
-rw-r--r--sc/source/ui/inc/sortdlg.hxx87
-rw-r--r--sc/source/ui/inc/spelldialog.hxx103
-rw-r--r--sc/source/ui/inc/spelleng.hxx169
-rw-r--r--sc/source/ui/inc/spellparam.hxx87
-rw-r--r--sc/source/ui/inc/strindlg.hxx66
-rw-r--r--sc/source/ui/inc/styledlg.hrc39
-rw-r--r--sc/source/ui/inc/styledlg.hxx59
-rw-r--r--sc/source/ui/inc/submenu.hrc68
-rw-r--r--sc/source/ui/inc/subtdlg.hrc64
-rw-r--r--sc/source/ui/inc/subtdlg.hxx56
-rw-r--r--sc/source/ui/inc/tabbgcolordlg.hxx78
-rw-r--r--sc/source/ui/inc/tabcont.hxx87
-rw-r--r--sc/source/ui/inc/tabopdlg.hrc50
-rw-r--r--sc/source/ui/inc/tabopdlg.hxx114
-rw-r--r--sc/source/ui/inc/tabpages.hxx83
-rw-r--r--sc/source/ui/inc/tabpopsh.hxx53
-rw-r--r--sc/source/ui/inc/tabsplit.hxx60
-rw-r--r--sc/source/ui/inc/tabview.hxx533
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx442
-rw-r--r--sc/source/ui/inc/target.hxx52
-rw-r--r--sc/source/ui/inc/tbinsert.hrc32
-rw-r--r--sc/source/ui/inc/tbinsert.hxx88
-rw-r--r--sc/source/ui/inc/tbzoomsliderctrl.hxx87
-rw-r--r--sc/source/ui/inc/textdlgs.hxx72
-rw-r--r--sc/source/ui/inc/textimportoptions.hrc42
-rw-r--r--sc/source/ui/inc/textimportoptions.hxx76
-rw-r--r--sc/source/ui/inc/tpcalc.hxx102
-rw-r--r--sc/source/ui/inc/tphf.hxx103
-rw-r--r--sc/source/ui/inc/tphfedit.hxx239
-rw-r--r--sc/source/ui/inc/tpprint.hxx56
-rw-r--r--sc/source/ui/inc/tpsort.hxx222
-rw-r--r--sc/source/ui/inc/tpstat.hxx65
-rw-r--r--sc/source/ui/inc/tpsubt.hxx188
-rw-r--r--sc/source/ui/inc/tptable.hxx115
-rw-r--r--sc/source/ui/inc/tpusrlst.hxx117
-rw-r--r--sc/source/ui/inc/tpview.hxx171
-rw-r--r--sc/source/ui/inc/transobj.hxx115
-rw-r--r--sc/source/ui/inc/ui_pch.hxx332
-rw-r--r--sc/source/ui/inc/uiitems.hxx378
-rw-r--r--sc/source/ui/inc/undobase.hxx171
-rw-r--r--sc/source/ui/inc/undoblk.hxx988
-rw-r--r--sc/source/ui/inc/undocell.hxx366
-rw-r--r--sc/source/ui/inc/undodat.hxx535
-rw-r--r--sc/source/ui/inc/undodraw.hxx63
-rw-r--r--sc/source/ui/inc/undoolk.hxx44
-rw-r--r--sc/source/ui/inc/undostyl.hxx117
-rw-r--r--sc/source/ui/inc/undotab.hxx543
-rw-r--r--sc/source/ui/inc/undoutil.hxx66
-rw-r--r--sc/source/ui/inc/validate.hrc88
-rw-r--r--sc/source/ui/inc/validate.hxx347
-rw-r--r--sc/source/ui/inc/viewdata.hxx557
-rw-r--r--sc/source/ui/inc/viewfunc.hxx369
-rw-r--r--sc/source/ui/inc/viewutil.hxx116
-rw-r--r--sc/source/ui/inc/warnbox.hxx74
247 files changed, 33391 insertions, 0 deletions
diff --git a/sc/source/ui/inc/AccessibilityHints.hxx b/sc/source/ui/inc/AccessibilityHints.hxx
new file mode 100644
index 000000000000..8d966a78fa7f
--- /dev/null
+++ b/sc/source/ui/inc/AccessibilityHints.hxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_ACCESSIBILITYHINTS_HXX
+#define SC_ACCESSIBILITYHINTS_HXX
+
+#include "viewdata.hxx"
+#include <com/sun/star/uno/XInterface.hpp>
+#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
+
+#define SC_HINT_ACC_SIMPLE_START SFX_HINT_USER00
+#define SC_HINT_ACC_TABLECHANGED SC_HINT_ACC_SIMPLE_START + 1
+#define SC_HINT_ACC_CURSORCHANGED SC_HINT_ACC_SIMPLE_START + 2
+#define SC_HINT_ACC_VISAREACHANGED SC_HINT_ACC_SIMPLE_START + 3
+#define SC_HINT_ACC_ENTEREDITMODE SC_HINT_ACC_SIMPLE_START + 4
+#define SC_HINT_ACC_LEAVEEDITMODE SC_HINT_ACC_SIMPLE_START + 5
+#define SC_HINT_ACC_MAKEDRAWLAYER SC_HINT_ACC_SIMPLE_START + 6
+#define SC_HINT_ACC_WINDOWRESIZED SC_HINT_ACC_SIMPLE_START + 7
+
+class ScAccWinFocusLostHint : public SfxHint
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ xOldAccessible;
+public:
+ TYPEINFO();
+ ScAccWinFocusLostHint(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xOld );
+ ~ScAccWinFocusLostHint();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ GetOldAccessible() const { return xOldAccessible; }
+};
+
+class ScAccWinFocusGotHint : public SfxHint
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ xNewAccessible;
+public:
+ TYPEINFO();
+ ScAccWinFocusGotHint(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xNew );
+ ~ScAccWinFocusGotHint();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ GetNewAccessible() const { return xNewAccessible; }
+};
+
+class ScAccGridWinFocusLostHint : public ScAccWinFocusLostHint
+{
+ ScSplitPos eOldGridWin;
+public:
+ TYPEINFO();
+ ScAccGridWinFocusLostHint( ScSplitPos eOldGridWin,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xOld );
+ ~ScAccGridWinFocusLostHint();
+
+ ScSplitPos GetOldGridWin() const { return eOldGridWin; }
+};
+
+class ScAccGridWinFocusGotHint : public ScAccWinFocusGotHint
+{
+ ScSplitPos eNewGridWin;
+public:
+ TYPEINFO();
+ ScAccGridWinFocusGotHint( ScSplitPos eNewGridWin,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xNew );
+ ~ScAccGridWinFocusGotHint();
+
+ ScSplitPos GetNewGridWin() const { return eNewGridWin; }
+};
+
+#endif
diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx
new file mode 100644
index 000000000000..38dfdc483886
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleCell.hxx
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLECELL_HXX
+#define _SC_ACCESSIBLECELL_HXX
+
+#include "AccessibleCellBase.hxx"
+#include "global.hxx"
+#include "viewdata.hxx"
+#include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
+#include <unotools/accessiblerelationsethelper.hxx>
+#include <editeng/AccessibleStaticTextBase.hxx>
+#include <comphelper/uno3.hxx>
+
+class ScTabViewShell;
+class ScAccessibleDocument;
+
+/** @descr
+ This base class provides an implementation of the
+ <code>AccessibleCell</code> service.
+*/
+class ScAccessibleCell
+ : public ScAccessibleCellBase,
+ public accessibility::AccessibleStaticTextBase
+{
+public:
+ //===== internal ========================================================
+ ScAccessibleCell(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ ScTabViewShell* pViewShell,
+ ScAddress& rCellAddress,
+ sal_Int32 nIndex,
+ ScSplitPos eSplitPos,
+ ScAccessibleDocument* pAccDoc);
+
+ virtual void Init();
+
+ using ScAccessibleCellBase::disposing;
+ virtual void SAL_CALL disposing();
+
+protected:
+ virtual ~ScAccessibleCell();
+
+ using ScAccessibleCellBase::IsDefunc;
+
+public:
+ ///===== XInterface =====================================================
+
+ DECLARE_XINTERFACE()
+
+ ///===== XTypeProvider ===================================================
+
+ DECLARE_XTYPEPROVIDER()
+
+ ///===== XAccessibleComponent ============================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ SAL_CALL getAccessibleAtPoint(
+ const ::com::sun::star::awt::Point& rPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL grabFocus( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ /// Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+public:
+ ///===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ // is overloaded to calculate this on demand
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or NULL if index is invalid.
+ // is overloaded to calculate this on demand
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild(sal_Int32 nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Return the set of current states.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
+ getAccessibleRelationSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ ScTabViewShell* mpViewShell;
+ ScAccessibleDocument* mpAccDoc;
+
+ ScSplitPos meSplitPos;
+
+ sal_Bool IsDefunc(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+ virtual sal_Bool IsEditable(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+ sal_Bool IsOpaque(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+ sal_Bool IsSelected();
+
+ ScDocument* GetDocument(ScTabViewShell* mpViewShell);
+
+ ::std::auto_ptr< SvxEditSource > CreateEditSource(ScTabViewShell* pViewShell, ScAddress aCell, ScSplitPos eSplitPos);
+
+ void FillDependends(utl::AccessibleRelationSetHelper* pRelationSet);
+ void FillPrecedents(utl::AccessibleRelationSetHelper* pRelationSet);
+ void AddRelation(const ScAddress& rCell,
+ const sal_uInt16 aRelationType,
+ ::utl::AccessibleRelationSetHelper* pRelationSet);
+ void AddRelation(const ScRange& rRange,
+ const sal_uInt16 aRelationType,
+ ::utl::AccessibleRelationSetHelper* pRelationSet);
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessibleCellBase.hxx b/sc/source/ui/inc/AccessibleCellBase.hxx
new file mode 100644
index 000000000000..2bcef463480d
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleCellBase.hxx
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLECELLBASE_HXX
+#define _SC_ACCESSIBLECELLBASE_HXX
+
+#include "AccessibleContextBase.hxx"
+#include "global.hxx"
+#include "address.hxx"
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+class ScTabViewShell;
+
+typedef cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleValue>
+ ScAccessibleCellBaseImpl;
+
+class ScAccessibleCellBase
+ : public ScAccessibleContextBase,
+ public ScAccessibleCellBaseImpl
+{
+public:
+ //===== internal ========================================================
+ ScAccessibleCellBase(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ ScDocument* pDoc,
+ const ScAddress& rCellAddress,
+ sal_Int32 nIndex);
+protected:
+ virtual ~ScAccessibleCellBase();
+public:
+
+ ///===== XInterface =====================================================
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ ::com::sun::star::uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL acquire() throw ();
+
+ virtual void SAL_CALL release() throw ();
+
+ ///===== XAccessibleComponent ============================================
+
+ virtual sal_Bool SAL_CALL isVisible( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getForeground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getBackground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleContext ==============================================
+
+ /// Return this objects index among the parents children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleIndexInParent(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleDescription(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+public:
+ ///===== XAccessibleValue ================================================
+
+ virtual ::com::sun::star::uno::Any SAL_CALL
+ getCurrentValue( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL
+ setCurrentValue( const ::com::sun::star::uno::Any& aNumber )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL
+ getMaximumValue( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL
+ getMinimumValue( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XTypeProvider ===================================================
+
+ /// returns the possible types
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
+ getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ ScAddress maCellAddress;
+
+ ScDocument* mpDoc;
+
+ sal_Int32 mnIndex;
+
+private:
+ virtual sal_Bool IsEditable(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+};
+
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx
new file mode 100644
index 000000000000..ecfeff96af39
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleContextBase.hxx
@@ -0,0 +1,344 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLECONTEXTBASE_HXX
+#define _SC_ACCESSIBLECONTEXTBASE_HXX
+
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_IllegalAccessibleComponentStateException_HPP_
+#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
+#endif
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <cppuhelper/weak.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/lang/XServiceName.hpp>
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
+#include <vos/mutex.hxx>
+#include <cppuhelper/interfacecontainer.h>
+
+
+#include <svl/lstner.hxx>
+#include <cppuhelper/compbase5.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <comphelper/servicehelper.hxx>
+#include <comphelper/broadcasthelper.hxx>
+
+class Rectangle;
+
+/** @descr
+ This base class provides an implementation of the
+ <code>AccessibleContext</code> service.
+*/
+
+typedef cppu::WeakAggComponentImplHelper5<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::lang::XServiceInfo
+ > ScAccessibleContextBaseWeakImpl;
+
+typedef cppu::ImplHelper1<
+ ::com::sun::star::accessibility::XAccessibleEventListener
+ > ScAccessibleContextBaseImplEvent;
+
+class ScAccessibleContextBase
+ : public comphelper::OBaseMutex,
+ public ScAccessibleContextBaseWeakImpl,
+ public ScAccessibleContextBaseImplEvent,
+ public SfxListener
+{
+public:
+ //===== internal ========================================================
+ ScAccessibleContextBase(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ const sal_Int16 aRole);
+
+ virtual void Init();
+ virtual void SAL_CALL disposing();
+protected:
+ virtual ~ScAccessibleContextBase(void);
+public:
+ using WeakAggComponentImplHelperBase::addEventListener;
+ using WeakAggComponentImplHelperBase::removeEventListener;
+
+ ///===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ ///===== XInterface =====================================================
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ ::com::sun::star::uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL acquire() throw ();
+
+ virtual void SAL_CALL release() throw ();
+
+ ///===== XAccessible =====================================================
+
+ /// Return the XAccessibleContext.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext> SAL_CALL
+ getAccessibleContext(void) throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleComponent ============================================
+
+ virtual sal_Bool SAL_CALL containsPoint(
+ const ::com::sun::star::awt::Point& rPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ SAL_CALL getAccessibleAtPoint(
+ const ::com::sun::star::awt::Point& rPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL isShowing( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL isVisible( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL grabFocus( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getForeground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getBackground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount(void) throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or NULL if index is invalid.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild(sal_Int32 nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Return a reference to the parent.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleParent(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this objects index among the parents children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleIndexInParent(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this object's role.
+ virtual sal_Int16 SAL_CALL
+ getAccessibleRole(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleDescription(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return NULL to indicate that an empty relation set.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
+ getAccessibleRelationSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the set of current states.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return the parents locale or throw exception if this object has no
+ parent yet/anymore.
+ */
+ virtual ::com::sun::star::lang::Locale SAL_CALL
+ getLocale(void)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::accessibility::IllegalAccessibleComponentStateException);
+
+ ///===== XAccessibleEventBroadcaster =====================================
+
+ /** Add listener that is informed of future changes of name,
+ description and so on events.
+ */
+ virtual void SAL_CALL
+ addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener>& xListener)
+ throw (com::sun::star::uno::RuntimeException);
+
+ // Remove an existing event listener.
+ virtual void SAL_CALL
+ removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener>& xListener)
+ throw (com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleEventListener ========================================
+
+ virtual void SAL_CALL
+ disposing( const ::com::sun::star::lang::EventObject& Source )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL
+ notifyEvent(
+ const ::com::sun::star::accessibility::AccessibleEventObject& aEvent )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Return whether the specified service is supported by this class.
+ */
+ virtual sal_Bool SAL_CALL
+ supportsService(const ::rtl::OUString& sServiceName)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services. In this case that is just
+ the AccessibleContext and Accessible service.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XTypeProvider ===================================================
+
+ /// returns the possible types
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
+ getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleDescription(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+public:
+ /// Calls all Listener to tell they the change.
+ void
+ CommitChange(const com::sun::star::accessibility::AccessibleEventObject& rEvent) const;
+
+ /// change the name and call the listener to tell they the change
+ void
+ ChangeName();
+
+protected:
+ /// Calls all FocusListener to tell they that the focus is gained.
+ void CommitFocusGained() const;
+
+ /// Calls all FocusListener to tell they that the focus is lost.
+ void CommitFocusLost() const;
+
+ sal_Bool IsDefunc() const { return rBHelper.bDisposed; }
+
+ virtual void IsObjectValid() const
+ throw (::com::sun::star::lang::DisposedException);
+
+ /// Use this method to set initial Name without notification
+ void SetName(const rtl::OUString& rName) { msName = rName; }
+ /// Use this method to set initial Description without notification
+ void SetDescription(const rtl::OUString& rDesc) { msDescription = rDesc; }
+
+ /// Reference to the parent object.
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> mxParent;
+
+private:
+ /** Description of this object. This is not a constant because it can
+ be set from the outside. Furthermore, it changes according the the
+ draw page's display mode.
+ */
+ ::rtl::OUString msDescription;
+
+ /** Name of this object. It changes according the the draw page's
+ display mode.
+ */
+ ::rtl::OUString msName;
+
+ /// client id in the AccessibleEventNotifier queue
+ sal_uInt32 mnClientId;
+
+ /** This is the role of this object.
+ */
+ sal_Int16 maRole;
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx
new file mode 100644
index 000000000000..14f48b51efc1
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleCsvControl.hxx
@@ -0,0 +1,666 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// ============================================================================
+
+#ifndef _SC_ACCESSIBLECSVCONTROL_HXX
+#define _SC_ACCESSIBLECSVCONTROL_HXX
+
+#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <tools/gen.hxx>
+#include <tools/string.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <editeng/AccessibleStaticTextBase.hxx>
+#include <comphelper/uno3.hxx>
+#include "AccessibleContextBase.hxx"
+
+
+// ============================================================================
+
+class ScCsvControl;
+namespace utl { class AccessibleStateSetHelper; }
+
+/** Accessible base class used for CSV controls. */
+class ScAccessibleCsvControl : public ScAccessibleContextBase
+{
+protected:
+ typedef ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > XAccessibleRef;
+ typedef ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet > XAccessibleRelationSetRef;
+ typedef ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet > XAccessibleStateSetRef;
+
+ typedef ::com::sun::star::awt::Point AwtPoint;
+ typedef ::com::sun::star::awt::Size AwtSize;
+ typedef ::com::sun::star::awt::Rectangle AwtRectangle;
+
+private:
+ ScCsvControl* mpControl; /// Pointer to the VCL control.
+
+public:
+ explicit ScAccessibleCsvControl(
+ const XAccessibleRef& rxParent,
+ ScCsvControl& rControl,
+ sal_uInt16 nRole );
+ virtual ~ScAccessibleCsvControl();
+
+ using ScAccessibleContextBase::disposing;
+ virtual void SAL_CALL disposing();
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** Returns the child at the specified point (cell returns NULL). */
+ virtual XAccessibleRef SAL_CALL getAccessibleAtPoint( const AwtPoint& rPoint )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns true, if the control is visible. */
+ virtual sal_Bool SAL_CALL isVisible() throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Sets the focus to this control. */
+ virtual void SAL_CALL grabFocus() throw( ::com::sun::star::uno::RuntimeException );
+
+ // events -----------------------------------------------------------------
+public:
+ /** Sends a GetFocus or LoseFocus event to all listeners. */
+ virtual void SendFocusEvent( bool bFocused );
+ /** Sends a caret changed event to all listeners. */
+ virtual void SendCaretEvent();
+ /** Sends a visible area changed event to all listeners. */
+ virtual void SendVisibleEvent();
+ /** Sends a selection changed event to all listeners. */
+ virtual void SendSelectionEvent();
+ /** Sends a table model changed event for changed cell contents to all listeners. */
+ virtual void SendTableUpdateEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows );
+ /** Sends a table model changed event for an inserted column to all listeners. */
+ virtual void SendInsertColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn );
+ /** Sends a table model changed event for a removed column to all listeners. */
+ virtual void SendRemoveColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn );
+
+ // helpers ----------------------------------------------------------------
+protected:
+ /** Returns this object's current bounding box relative to the desktop. */
+ virtual Rectangle GetBoundingBoxOnScreen() const throw( ::com::sun::star::uno::RuntimeException );
+ /** Returns this object's current bounding box relative to the parent object. */
+ virtual Rectangle GetBoundingBox() const throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Creates a new UUID in rSeq, if it is empty. Locks mutex internally. */
+ void getUuid( ::com::sun::star::uno::Sequence< sal_Int8 >& rSeq );
+
+ /** Returns whether the object is alive. Must be called with locked mutex. */
+ inline bool implIsAlive() const { return !rBHelper.bDisposed && !rBHelper.bInDispose && mpControl; }
+ /** Throws an exception, if the object is disposed/disposing or any pointer
+ is missing. Should be used with locked mutex! */
+ void ensureAlive() const throw( ::com::sun::star::lang::DisposedException );
+
+ /** Returns the VCL control. Assumes a living object. */
+ ScCsvControl& implGetControl() const;
+
+ /** Returns the first child of rxParentObj, which has the role nRole. */
+ XAccessibleRef implGetChildByRole( const XAccessibleRef& rxParentObj, sal_uInt16 nRole )
+ throw( ::com::sun::star::uno::RuntimeException );
+ /** Creates a StateSetHelper and fills it with DEFUNC, OPAQUE, ENABLED, SHOWING and VISIBLE. */
+ ::utl::AccessibleStateSetHelper* implCreateStateSet();
+
+ /** Disposes the object. This is a helper called from destructors only. */
+ void implDispose();
+
+ /** Converts the control-relative position to an absolute screen position. */
+ Point implGetAbsPos( const Point& rPos ) const;
+};
+
+
+// ============================================================================
+
+class ScCsvRuler;
+
+typedef ::cppu::ImplHelper1<
+ ::com::sun::star::accessibility::XAccessibleText >
+ ScAccessibleCsvRulerImpl;
+
+/** Accessible class representing the CSV ruler control. */
+class ScAccessibleCsvRuler : public ScAccessibleCsvControl, public ScAccessibleCsvRulerImpl
+{
+protected:
+ typedef ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > PropertyValueSeq;
+
+private:
+ ::rtl::OUStringBuffer maBuffer; /// Contains the text representation of the ruler.
+
+public:
+ explicit ScAccessibleCsvRuler( ScCsvRuler& rRuler );
+ virtual ~ScAccessibleCsvRuler();
+
+ // XAccessibleComponent -----------------------------------------------------
+
+ virtual sal_Int32 SAL_CALL getForeground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getBackground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext -----------------------------------------------------
+
+ /** Returns the child count (the ruler does not have children). */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Throws an exception (the ruler does not have childern). */
+ virtual XAccessibleRef SAL_CALL getAccessibleChild( sal_Int32 nIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the relation to the grid control. */
+ virtual XAccessibleRelationSetRef SAL_CALL getAccessibleRelationSet()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the current set of states. */
+ virtual XAccessibleStateSetRef SAL_CALL getAccessibleStateSet()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleText --------------------------------------------------------
+
+ /** Return the position of the caret. */
+ virtual sal_Int32 SAL_CALL getCaretPosition() throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Sets the position of the caret. */
+ virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the specified character. */
+ virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the attributes of the specified character. */
+ virtual PropertyValueSeq SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aRequestedAttributes )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the screen coordinates of the specified character. */
+ virtual AwtRectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the count of characters. */
+ virtual sal_Int32 SAL_CALL getCharacterCount() throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the character index at the specified coordinate (object's coordinate system). */
+ virtual sal_Int32 SAL_CALL getIndexAtPoint( const AwtPoint& rPoint )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the selected text (ruler returns empty string). */
+ virtual ::rtl::OUString SAL_CALL getSelectedText() throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the start index of the selection (ruler returns -1). */
+ virtual sal_Int32 SAL_CALL getSelectionStart() throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the end index of the selection (ruler returns -1). */
+ virtual sal_Int32 SAL_CALL getSelectionEnd() throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Selects a part of the text (ruler does nothing). */
+ virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the entire text. */
+ virtual ::rtl::OUString SAL_CALL getText() throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the specified range [Start,End) of the text. */
+ virtual ::rtl::OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the specified text portion. */
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ /** Copies the specified text range into the clipboard (ruler does nothing). */
+ virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ // XInterface -------------------------------------------------------------
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL acquire() throw();
+
+ virtual void SAL_CALL release() throw();
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** Returns an identifier for the implementation of this object. */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ // XTypeProvider ----------------------------------------------------------
+
+ /** Returns a sequence with all supported interface types. */
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns an implementation ID. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ // events -----------------------------------------------------------------
+public:
+ /** Sends a caret changed event to all listeners. */
+ virtual void SendCaretEvent();
+
+ // helpers ----------------------------------------------------------------
+private:
+ /** Returns this object's name. */
+ virtual ::rtl::OUString SAL_CALL createAccessibleName()
+ throw( ::com::sun::star::uno::RuntimeException );
+ /** Returns this object's description. */
+ virtual ::rtl::OUString SAL_CALL createAccessibleDescription()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Throws an exception, if the specified character position is invalid (outside 0..len-1). */
+ void ensureValidIndex( sal_Int32 nIndex ) const
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** Throws an exception, if the specified character position is invalid (outside 0..len). */
+ void ensureValidIndexWithEnd( sal_Int32 nIndex ) const
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** Throws an exception, if the specified character range [Start,End) is invalid.
+ @descr If Start>End, swaps Start and End before checking. */
+ void ensureValidRange( sal_Int32& rnStartIndex, sal_Int32& rnEndIndex ) const
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** Returns the VCL ruler control. Assumes a living object. */
+ ScCsvRuler& implGetRuler() const;
+
+ /** Builds the entire string buffer. */
+ void constructStringBuffer() throw( ::com::sun::star::uno::RuntimeException );
+ /** Returns the character count of the text. */
+ sal_Int32 implGetTextLength() const;
+
+ /** Returns true, if the character at the specified index has a split. */
+ bool implHasSplit( sal_Int32 nApiPos );
+
+ /** Returns the first character index with equal formatting as at nApiPos. */
+ sal_Int32 implGetFirstEqualFormatted( sal_Int32 nApiPos );
+ /** Returns the last character index with equal formatting as at nApiPos. */
+ sal_Int32 implGetLastEqualFormatted( sal_Int32 nApiPos );
+};
+
+
+// ============================================================================
+
+class ScCsvGrid;
+
+typedef ::cppu::ImplHelper2<
+ ::com::sun::star::accessibility::XAccessibleTable,
+ ::com::sun::star::accessibility::XAccessibleSelection >
+ ScAccessibleCsvGridImpl;
+
+/** Accessible class representing the CSV grid control. */
+class ScAccessibleCsvGrid : public ScAccessibleCsvControl, public ScAccessibleCsvGridImpl
+{
+protected:
+ typedef ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleTable > XAccessibleTableRef;
+
+public:
+ explicit ScAccessibleCsvGrid( ScCsvGrid& rGrid );
+ virtual ~ScAccessibleCsvGrid();
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** Returns the cell at the specified point. */
+ virtual XAccessibleRef SAL_CALL getAccessibleAtPoint( const AwtPoint& rPoint )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int32 SAL_CALL getForeground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getBackground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext -----------------------------------------------------
+
+ /** Returns the child count (count of cells in the table). */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the specified child cell. */
+ virtual XAccessibleRef SAL_CALL getAccessibleChild( sal_Int32 nIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the relation to the ruler control. */
+ virtual XAccessibleRelationSetRef SAL_CALL getAccessibleRelationSet()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the current set of states. */
+ virtual XAccessibleStateSetRef SAL_CALL getAccessibleStateSet()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleTable -------------------------------------------------------
+
+ /** Returns the number of rows in the table. */
+ virtual sal_Int32 SAL_CALL getAccessibleRowCount()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the number of columns in the table. */
+ virtual sal_Int32 SAL_CALL getAccessibleColumnCount()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the description of the specified row in the table. */
+ virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the description text of the specified column in the table. */
+ virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the number of rows occupied at a specified row and column.
+ @descr Returns always 1 (Merged cells not supported). */
+ virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the number of rows occupied at a specified row and column.
+ @descr Returns always 1 (Merged cells not supported). */
+ virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the row headers as an AccessibleTable. */
+ virtual XAccessibleTableRef SAL_CALL getAccessibleRowHeaders()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the column headers as an AccessibleTable. */
+ virtual XAccessibleTableRef SAL_CALL getAccessibleColumnHeaders()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the selected rows as a sequence. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the selected columns as a sequence. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns true, if the specified row is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns true, if the specified column is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the accessible cell object at the specified position. */
+ virtual XAccessibleRef SAL_CALL getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the caption object of the table. */
+ virtual XAccessibleRef SAL_CALL getAccessibleCaption()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the summary description object of the table. */
+ virtual XAccessibleRef SAL_CALL getAccessibleSummary()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns true, if the cell at a specified position is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the child index of the cell at the specified position. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the row index of the specified child. */
+ virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the column index of the specified child. */
+ virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ // XAccessibleSelection ---------------------------------------------------
+
+ /** Selects the specified child (selects the entire column or the entire table). */
+ virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns true, if the specified child is selected. */
+ virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Deselects all cells. */
+ virtual void SAL_CALL clearAccessibleSelection()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Selects all cells. */
+ virtual void SAL_CALL selectAllAccessibleChildren()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the count of selected children. */
+ virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the child with the specified index in all selected children. */
+ virtual XAccessibleRef SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Deselects the child with the specified index in all selected children. */
+ virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ // XInterface -------------------------------------------------------------
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual void SAL_CALL acquire() throw();
+
+ virtual void SAL_CALL release() throw();
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** Returns an identifier for the implementation of this object. */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ // XTypeProvider ----------------------------------------------------------
+
+ /** Returns a sequence with all supported interface types. */
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns an implementation ID. */
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ // events -----------------------------------------------------------------
+public:
+ /** Sends a GetFocus or LoseFocus event to all listeners. */
+ virtual void SendFocusEvent( bool bFocused );
+ /** Sends a table model changed event for changed cell contents to all listeners. */
+ virtual void SendTableUpdateEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows );
+ /** Sends a table model changed event for an inserted column to all listeners. */
+ virtual void SendInsertColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn );
+ /** Sends a table model changed event for a removed column to all listeners. */
+ virtual void SendRemoveColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn );
+
+ // helpers ----------------------------------------------------------------
+private:
+ /** Returns this object's name. */
+ virtual ::rtl::OUString SAL_CALL createAccessibleName()
+ throw( ::com::sun::star::uno::RuntimeException );
+ /** Returns this object's description. */
+ virtual ::rtl::OUString SAL_CALL createAccessibleDescription()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Throws an exception, if nIndex is not a valid child index. */
+ void ensureValidIndex( sal_Int32 nIndex ) const
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException );
+ /** Throws an exception, if the specified position is invalid. */
+ void ensureValidPosition( sal_Int32 nRow, sal_Int32 nColumn ) const
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** Returns the VCL grid control. Assumes a living object. */
+ ScCsvGrid& implGetGrid() const;
+
+ /** Returns true, if the specified column (including header) is selected. */
+ bool implIsColumnSelected( sal_Int32 nColumn ) const;
+ /** Selects the specified column (including header). */
+ void implSelectColumn( sal_Int32 nColumn, bool bSelect );
+
+ /** Returns the count of visible rows in the table (including header). */
+ sal_Int32 implGetRowCount() const;
+ /** Returns the total column count in the table (including header). */
+ sal_Int32 implGetColumnCount() const;
+ /** Returns the count of selected columns in the table. */
+ sal_Int32 implGetSelColumnCount() const;
+ /** Returns the total cell count in the table (including header). */
+ inline sal_Int32 implGetCellCount() const { return implGetRowCount() * implGetColumnCount(); }
+
+ /** Returns the row index from cell index (including header). */
+ inline sal_Int32 implGetRow( sal_Int32 nIndex ) const { return nIndex / implGetColumnCount(); }
+ /** Returns the column index from cell index (including header). */
+ inline sal_Int32 implGetColumn( sal_Int32 nIndex ) const { return nIndex % implGetColumnCount(); }
+ /** Returns the absolute column index of the nSelColumn-th selected column. */
+ sal_Int32 implGetSelColumn( sal_Int32 nSelColumn ) const;
+ /** Returns the child index from cell position (including header). */
+ inline sal_Int32 implGetIndex( sal_Int32 nRow, sal_Int32 nColumn ) const { return nRow * implGetColumnCount() + nColumn; }
+
+ /** Returns the contents of the specified cell (including header). Indexes must be valid. */
+ String implGetCellText( sal_Int32 nRow, sal_Int32 nColumn ) const;
+ /** Creates a new accessible object of the specified cell. Indexes must be valid. */
+ ScAccessibleCsvControl* implCreateCellObj( sal_Int32 nRow, sal_Int32 nColumn ) const;
+};
+
+
+// ============================================================================
+
+/** Accessible class representing a cell of the CSV grid control. */
+class ScAccessibleCsvCell : public ScAccessibleCsvControl, public accessibility::AccessibleStaticTextBase
+{
+protected:
+ typedef ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > PropertyValueSeq;
+ typedef ::std::auto_ptr< SvxEditSource > SvxEditSourcePtr;
+
+private:
+ String maCellText; /// The text contents of this cell.
+ sal_Int32 mnLine; /// The grid line index (core index).
+ sal_uInt32 mnColumn; /// The grid column index (core index).
+ sal_Int32 mnIndex; /// The index of the cell in the table.
+
+public:
+ explicit ScAccessibleCsvCell(
+ ScCsvGrid& rGrid,
+ const String& rCellText,
+ sal_Int32 nRow, sal_Int32 nColumn );
+ virtual ~ScAccessibleCsvCell();
+
+ using ScAccessibleCsvControl::disposing;
+ virtual void SAL_CALL disposing();
+
+ // XAccessibleComponent ---------------------------------------------------
+
+ /** Sets the focus to the column of this cell. */
+ virtual void SAL_CALL grabFocus() throw( ::com::sun::star::uno::RuntimeException );
+
+ virtual sal_Int32 SAL_CALL getForeground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getBackground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleContext -----------------------------------------------------
+
+ /** Returns the child count. */
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the specified child. */
+ virtual XAccessibleRef SAL_CALL getAccessibleChild( sal_Int32 nIndex )
+ throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the index of this cell in the table. */
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the relation to the ruler control. */
+ virtual XAccessibleRelationSetRef SAL_CALL getAccessibleRelationSet()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the current set of states. */
+ virtual XAccessibleStateSetRef SAL_CALL getAccessibleStateSet()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ // XInterface -------------------------------------------------------------
+
+ DECLARE_XINTERFACE()
+
+ // XTypeProvider ----------------------------------------------------------
+
+ DECLARE_XTYPEPROVIDER()
+
+ // XServiceInfo -----------------------------------------------------------
+
+ /** Returns an identifier for the implementation of this object. */
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ // helpers ----------------------------------------------------------------
+protected:
+ /** Returns this object's current bounding box relative to the desktop. */
+ virtual Rectangle GetBoundingBoxOnScreen() const throw( ::com::sun::star::uno::RuntimeException );
+ /** Returns this object's current bounding box relative to the parent object. */
+ virtual Rectangle GetBoundingBox() const throw( ::com::sun::star::uno::RuntimeException );
+
+private:
+ /** Returns this object's name. */
+ virtual ::rtl::OUString SAL_CALL createAccessibleName()
+ throw( ::com::sun::star::uno::RuntimeException );
+ /** Returns this object's description. */
+ virtual ::rtl::OUString SAL_CALL createAccessibleDescription()
+ throw( ::com::sun::star::uno::RuntimeException );
+
+ /** Returns the VCL grid control. Assumes a living object. */
+ ScCsvGrid& implGetGrid() const;
+ /** Returns the pixel position of the cell (rel. to parent), regardless of visibility. */
+ Point implGetRealPos() const;
+ /** Returns the width of the character count */
+ sal_uInt32 implCalcPixelWidth(sal_uInt32 nChars) const;
+ /** Returns the pixel size of the cell, regardless of visibility. */
+ Size implGetRealSize() const;
+ /** Returns the bounding box of the cell relative in the table. */
+ Rectangle implGetBoundingBox() const;
+
+ /** Creates the edit source the text helper needs. */
+ ::std::auto_ptr< SvxEditSource > implCreateEditSource();
+};
+
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/AccessibleDataPilotControl.hxx b/sc/source/ui/inc/AccessibleDataPilotControl.hxx
new file mode 100644
index 000000000000..c86d598b6e9c
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleDataPilotControl.hxx
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLEDATAPILOTCONTROL_HXX
+#define _SC_ACCESSIBLEDATAPILOTCONTROL_HXX
+
+#include "AccessibleContextBase.hxx"
+
+class ScDPFieldWindow;
+class ScAccessibleDataPilotButton;
+
+class ScAccessibleDataPilotControl
+ : public ScAccessibleContextBase
+{
+public:
+ //===== internal ========================================================
+ ScAccessibleDataPilotControl(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ ScDPFieldWindow* pDPFieldWindow);
+
+ virtual void Init();
+
+ using ScAccessibleContextBase::disposing;
+ virtual void SAL_CALL disposing();
+
+ void AddField(sal_Int32 nNewIndex);
+ void RemoveField(sal_Int32 nOldIndex);
+ void FieldFocusChange(sal_Int32 nOldIndex, sal_Int32 nNewIndex);
+ void FieldNameChange(sal_Int32 nIndex);
+ void GotFocus();
+ void LostFocus();
+protected:
+ virtual ~ScAccessibleDataPilotControl(void);
+public:
+ ///===== XAccessibleComponent ============================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ SAL_CALL getAccessibleAtPoint(
+ const ::com::sun::star::awt::Point& rPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL isVisible( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL grabFocus( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getForeground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getBackground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount(void) throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or NULL if index is invalid.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild(sal_Int32 nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Return the set of current states.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XTypeProvider ===================================================
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleDescription(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ ScDPFieldWindow* mpDPFieldWindow;
+ struct AccessibleWeak
+ {
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > xWeakAcc;
+ ScAccessibleDataPilotButton* pAcc;
+ AccessibleWeak() : pAcc(NULL) {}
+ };
+ ::std::vector< AccessibleWeak > maChildren;
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx
new file mode 100644
index 000000000000..2ec612e0865b
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleDocument.hxx
@@ -0,0 +1,328 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLEDOCUMENT_HXX
+#define _SC_ACCESSIBLEDOCUMENT_HXX
+
+#include "AccessibleDocumentBase.hxx"
+#include "viewdata.hxx"
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <svx/IAccessibleViewForwarder.hxx>
+
+class ScTabViewShell;
+class ScAccessibleSpreadsheet;
+class ScChildrenShapes;
+class ScAccessibleEditObject;
+
+namespace accessibility
+{
+ class AccessibleShape;
+}
+namespace utl
+{
+ class AccessibleRelationSetHelper;
+}
+
+/** @descr
+ This base class provides an implementation of the
+ <code>AccessibleContext</code> service.
+*/
+
+typedef cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleSelection,
+ ::com::sun::star::view::XSelectionChangeListener >
+ ScAccessibleDocumentImpl;
+
+class ScAccessibleDocument
+ : public ScAccessibleDocumentBase,
+ public ScAccessibleDocumentImpl,
+ public accessibility::IAccessibleViewForwarder
+{
+public:
+ //===== internal ========================================================
+ ScAccessibleDocument(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ ScTabViewShell* pViewShell,
+ ScSplitPos eSplitPos);
+
+ virtual void Init();
+
+
+ DECL_LINK( WindowChildEventListener, VclSimpleEvent* );
+protected:
+ virtual ~ScAccessibleDocument(void);
+
+ using ScAccessibleDocumentBase::IsDefunc;
+
+public:
+
+ virtual void SAL_CALL disposing();
+
+ ///===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ ///===== XInterface =====================================================
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ ::com::sun::star::uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL acquire() throw ();
+
+ virtual void SAL_CALL release() throw ();
+
+ ///===== XAccessibleComponent ============================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ SAL_CALL getAccessibleAtPoint(
+ const ::com::sun::star::awt::Point& rPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL grabFocus( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or NULL if index is invalid.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild(sal_Int32 nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Return the set of current states.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleSelection ===========================================
+
+ virtual void SAL_CALL
+ selectAccessibleChild( sal_Int32 nChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL
+ isAccessibleChildSelected( sal_Int32 nChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL
+ clearAccessibleSelection( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL
+ selectAllAccessibleChildren( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL
+ getSelectedAccessibleChildCount( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL
+ deselectAccessibleChild( sal_Int32 nChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ ///===== XSelectionListener =============================================
+
+ virtual void SAL_CALL selectionChanged( const ::com::sun::star::lang::EventObject& aEvent )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XServiceInfo ===================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XTypeProvider ===================================================
+
+ /// returns the possible types
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
+ getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== IAccessibleViewForwarder ========================================
+
+ /** This method informs you about the state of the forwarder. Do not
+ use it when the returned value is <false/>.
+
+ @return
+ Return <true/> if the view forwarder is valid and <false/> else.
+ */
+ virtual sal_Bool IsValid (void) const;
+
+ /** Returns the area of the underlying document that is visible in the
+ * corresponding window.
+
+ @return
+ The rectangle of the visible part of the document. The values
+ are, contrary to the base class, in internal coordinates.
+ */
+ virtual Rectangle GetVisibleArea() const;
+
+ /** Transform the specified point from internal coordinates to an
+ absolute screen position.
+
+ @param rPoint
+ Point in internal coordinates.
+
+ @return
+ The same point but in screen coordinates relative to the upper
+ left corner of the (current) screen.
+ */
+ virtual Point LogicToPixel (const Point& rPoint) const;
+
+ /** Transform the specified size from internal coordinates to a screen
+ * oriented pixel size.
+
+ @param rSize
+ Size in internal coordinates.
+
+ @return
+ The same size but in screen coordinates.
+ */
+ virtual Size LogicToPixel (const Size& rSize) const;
+
+ /** Transform the specified point from absolute screen coordinates to
+ internal coordinates.
+
+ @param rPoint
+ Point in screen coordinates relative to the upper left corner of
+ the (current) screen.
+
+ @return
+ The same point but in internal coordinates.
+ */
+ virtual Point PixelToLogic (const Point& rPoint) const;
+
+ /** Transform the specified size from screen coordinates to internal
+ coordinates.
+
+ @param rSize
+ Size in screen coordinates.
+
+ @return
+ The same size but in internal coordinates.
+ */
+ virtual Size PixelToLogic (const Size& rSize) const;
+
+ ///======== internal =====================================================
+
+ utl::AccessibleRelationSetHelper* GetRelationSet(const ScAddress* pAddress) const;
+
+ ::com::sun::star::uno::Reference
+ < ::com::sun::star::accessibility::XAccessible >
+ GetAccessibleSpreadsheet();
+
+protected:
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleDescription(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ ScTabViewShell* mpViewShell;
+ ScSplitPos meSplitPos;
+ ScAccessibleSpreadsheet* mpAccessibleSpreadsheet;
+ ScChildrenShapes* mpChildrenShapes;
+ ScAccessibleEditObject* mpTempAccEdit;
+ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> mxTempAcc;
+ Rectangle maVisArea;
+ sal_Bool mbCompleteSheetSelected;
+
+public:
+ SCTAB getVisibleTable() const; // use it in ScChildrenShapes
+
+private:
+ void FreeAccessibleSpreadsheet();
+
+ sal_Bool IsTableSelected() const;
+
+ sal_Bool IsDefunc(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+ sal_Bool IsEditable(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+
+ void AddChild(const com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible>& xAcc, sal_Bool bFireEvent);
+ void RemoveChild(const com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible>& xAcc, sal_Bool bFireEvent);
+
+ rtl::OUString GetCurrentCellName() const;
+ rtl::OUString GetCurrentCellDescription() const;
+
+ Rectangle GetVisibleArea_Impl() const;
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessibleDocumentBase.hxx b/sc/source/ui/inc/AccessibleDocumentBase.hxx
new file mode 100644
index 000000000000..fc76a8d771cf
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleDocumentBase.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLEDOCUMENTBASE_HXX
+#define _SC_ACCESSIBLEDOCUMENTBASE_HXX
+
+#ifndef _SC_ACCESSIBLE_CONTEXT_BASE_HXX
+#include "AccessibleContextBase.hxx"
+#endif
+
+class ScAccessibleDocumentBase
+ : public ScAccessibleContextBase
+{
+public:
+ //===== internal ========================================================
+ ScAccessibleDocumentBase(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent);
+protected:
+ virtual ~ScAccessibleDocumentBase (void);
+};
+
+
+#endif
+
diff --git a/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
new file mode 100644
index 000000000000..8ce9050c6094
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleDocumentPagePreview.hxx
@@ -0,0 +1,159 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX
+#define _SC_ACCESSIBLEDOCUMENTPAGEPREVIEW_HXX
+
+#include "AccessibleDocumentBase.hxx"
+
+class ScPreviewShell;
+class ScNotesChilds;
+class ScShapeChilds;
+class ScAccessiblePreviewTable;
+class ScAccessiblePageHeader;
+
+class ScAccessibleDocumentPagePreview
+ : public ScAccessibleDocumentBase
+{
+public:
+ //===== internal ========================================================
+ ScAccessibleDocumentPagePreview(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ ScPreviewShell* pViewShell );
+protected:
+ virtual ~ScAccessibleDocumentPagePreview(void);
+
+ using ScAccessibleDocumentBase::IsDefunc;
+
+public:
+ using ScAccessibleContextBase::disposing;
+
+ virtual void SAL_CALL disposing();
+
+ ///===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ ///===== XAccessibleComponent ============================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ SAL_CALL getAccessibleAtPoint(
+ const ::com::sun::star::awt::Point& rPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL grabFocus( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or NULL if index is invalid.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild(sal_Int32 nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Return the set of current states.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XTypeProvider ===================================================
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== internal ========================================================
+
+//UNUSED2009-05 com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible >
+//UNUSED2009-05 GetCurrentAccessibleTable();
+
+//UNUSED2009-05 void ChildCountChanged();
+
+protected:
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleDescription(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+public: // needed in ScShapeChilds
+ /// Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ /// Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ ScPreviewShell* mpViewShell;
+ ScNotesChilds* mpNotesChilds;
+ ScShapeChilds* mpShapeChilds;
+ ScAccessiblePreviewTable* mpTable;
+ ScAccessiblePageHeader* mpHeader;
+ ScAccessiblePageHeader* mpFooter;
+
+ sal_Bool IsDefunc(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+
+ ScNotesChilds* GetNotesChilds();
+ ScShapeChilds* GetShapeChilds();
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx b/sc/source/ui/inc/AccessibleEditObject.hxx
new file mode 100644
index 000000000000..55bb92f13424
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleEditObject.hxx
@@ -0,0 +1,178 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLEEDITOBJECT_HXX
+#define _SC_ACCESSIBLEEDITOBJECT_HXX
+
+#include "AccessibleContextBase.hxx"
+
+namespace accessibility
+{
+ class AccessibleTextHelper;
+}
+class EditView;
+class Window;
+
+enum EditObjectType
+{
+ CellInEditMode,
+ EditLine,
+ EditControl
+};
+
+/** @descr
+ This base class provides an implementation of the
+ <code>AccessibleCell</code> service.
+*/
+class ScAccessibleEditObject
+ : public ScAccessibleContextBase
+{
+public:
+ //===== internal ========================================================
+ ScAccessibleEditObject(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ EditView* pEditView, Window* pWin, const rtl::OUString& rName,
+ const rtl::OUString& rDescription, EditObjectType eObjectType);
+
+protected:
+ virtual ~ScAccessibleEditObject();
+
+ using ScAccessibleContextBase::IsDefunc;
+
+public:
+ using ScAccessibleContextBase::addEventListener;
+ using ScAccessibleContextBase::removeEventListener;
+ using ScAccessibleContextBase::disposing;
+
+ virtual void SAL_CALL disposing();
+
+ virtual void LostFocus();
+
+ virtual void GotFocus();
+
+ ///===== XAccessibleComponent ============================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ SAL_CALL getAccessibleAtPoint(
+ const ::com::sun::star::awt::Point& rPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ /// Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+public:
+ ///===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ // is overloaded to calculate this on demand
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or NULL if index is invalid.
+ // is overloaded to calculate this on demand
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild(sal_Int32 nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Return the set of current states.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleDescription(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+public:
+ ///===== XAccessibleEventBroadcaster =====================================
+
+ /** Add listener that is informed of future changes of name,
+ description and so on events.
+ */
+ virtual void SAL_CALL
+ addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener>& xListener)
+ throw (com::sun::star::uno::RuntimeException);
+
+ // Remove an existing event listener.
+ virtual void SAL_CALL
+ removeEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener>& xListener)
+ throw (com::sun::star::uno::RuntimeException);
+
+ ///===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XTypeProvider ===================================================
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ accessibility::AccessibleTextHelper* mpTextHelper;
+ EditView* mpEditView;
+ Window* mpWindow;
+ EditObjectType meObjectType;
+ sal_Bool mbHasFocus;
+
+ sal_Bool IsDefunc(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+
+ void CreateTextHelper();
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessiblePageHeader.hxx b/sc/source/ui/inc/AccessiblePageHeader.hxx
new file mode 100644
index 000000000000..1e28670419a4
--- /dev/null
+++ b/sc/source/ui/inc/AccessiblePageHeader.hxx
@@ -0,0 +1,111 @@
+ /*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLEPAGEHEADER_HXX
+#define _SC_ACCESSIBLEPAGEHEADER_HXX
+
+#include "AccessibleContextBase.hxx"
+#include <editeng/svxenum.hxx>
+
+class ScPreviewShell;
+class EditTextObject;
+class ScAccessiblePageHeaderArea;
+class ScPreviewShell;
+
+class ScAccessiblePageHeader : public ScAccessibleContextBase
+{
+public:
+ ScAccessiblePageHeader( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ ScPreviewShell* pViewShell, sal_Bool bHeader, sal_Int32 nIndex );
+
+protected:
+ virtual ~ScAccessiblePageHeader();
+
+ using ScAccessibleContextBase::IsDefunc;
+
+public:
+ using ScAccessibleContextBase::disposing;
+ virtual void SAL_CALL disposing();
+
+ //===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ //===== XAccessibleComponent ============================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleContext ==============================================
+
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 i )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
+ getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XServiceInfo ====================================================
+
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
+ throw(::com::sun::star::uno::RuntimeException);
+
+ //===== internal ========================================================
+ void SetCurrentIndexInParent(sal_Int32 nNew) { mnIndex = nNew; }
+
+protected:
+ virtual ::rtl::OUString SAL_CALL createAccessibleDescription(void) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException);
+ virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ ScPreviewShell* mpViewShell;
+ sal_Int32 mnIndex;
+ sal_Bool mbHeader;
+ typedef std::vector< ScAccessiblePageHeaderArea* > ScHFAreas;
+ ScHFAreas maAreas;
+ sal_Int32 mnChildCount;
+
+ sal_Bool IsDefunc(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+
+ void AddChild(const EditTextObject* pArea, sal_uInt32 nIndex, SvxAdjust eAdjust);
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessiblePageHeaderArea.hxx b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx
new file mode 100644
index 000000000000..dbf7c126b617
--- /dev/null
+++ b/sc/source/ui/inc/AccessiblePageHeaderArea.hxx
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLEPAGEHEADERAREA_HXX
+#define _SC_ACCESSIBLEPAGEHEADERAREA_HXX
+
+#ifndef _SC_ACCESSIBLE_CONTEXT_BASE_HXX
+#include "AccessibleContextBase.hxx"
+#endif
+#include <editeng/svxenum.hxx>
+
+class EditTextObject;
+namespace accessibility
+{
+ class AccessibleTextHelper;
+}
+class ScPreviewShell;
+
+class ScAccessiblePageHeaderArea
+ : public ScAccessibleContextBase
+{
+public:
+ //===== internal ========================================================
+ ScAccessiblePageHeaderArea(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ ScPreviewShell* pViewShell,
+ const EditTextObject* pEditObj,
+ sal_Bool bHeader,
+ SvxAdjust eAdjust);
+protected:
+ virtual ~ScAccessiblePageHeaderArea (void);
+public:
+ const EditTextObject* GetEditTextObject() const { return mpEditObj; }
+
+ using ScAccessibleContextBase::disposing;
+ virtual void SAL_CALL disposing();
+
+ ///===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ ///===== XAccessibleComponent ============================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ SAL_CALL getAccessibleAtPoint(
+ const ::com::sun::star::awt::Point& rPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ // is overloaded to calculate this on demand
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or NULL if index is invalid.
+ // is overloaded to calculate this on demand
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild(sal_Int32 nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Return the set of current states.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services. In this case that is just
+ the AccessibleContext and Accessible service.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XTypeProvider ===================================================
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual ::rtl::OUString SAL_CALL createAccessibleDescription(void) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException);
+ virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ EditTextObject* mpEditObj;
+ accessibility::AccessibleTextHelper* mpTextHelper;
+ ScPreviewShell* mpViewShell;
+ sal_Bool mbHeader;
+ SvxAdjust meAdjust;
+
+ void CreateTextHelper();
+};
+
+
+#endif
+
diff --git a/sc/source/ui/inc/AccessiblePreviewCell.hxx b/sc/source/ui/inc/AccessiblePreviewCell.hxx
new file mode 100644
index 000000000000..47a2be3b6713
--- /dev/null
+++ b/sc/source/ui/inc/AccessiblePreviewCell.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLEPREVIEWCELL_HXX
+#define _SC_ACCESSIBLEPREVIEWCELL_HXX
+
+#include "AccessibleCellBase.hxx"
+
+class ScPreviewShell;
+
+namespace accessibility
+{
+ class AccessibleTextHelper;
+}
+
+class ScAccessiblePreviewCell : public ScAccessibleCellBase
+{
+public:
+ //===== internal ========================================================
+ ScAccessiblePreviewCell(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ ScPreviewShell* pViewShell, /* const */ ScAddress& rCellAddress, sal_Int32 nIndex );
+
+protected:
+ virtual ~ScAccessiblePreviewCell();
+
+ using ScAccessibleCellBase::IsDefunc;
+
+public:
+ using ScAccessibleCellBase::disposing;
+ virtual void SAL_CALL disposing();
+
+ ///===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ //===== XAccessibleComponent ============================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleContext ==============================================
+
+ // overloaded to calculate this on demand
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 i )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
+ getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XServiceInfo ====================================================
+
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
+ throw(::com::sun::star::uno::RuntimeException);
+
+ ///===== XTypeProvider ===================================================
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException);
+ virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ ScPreviewShell* mpViewShell;
+
+ accessibility::AccessibleTextHelper* mpTextHelper;
+
+ sal_Bool IsDefunc(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+ virtual sal_Bool IsEditable(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+ sal_Bool IsOpaque(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+
+ void CreateTextHelper();
+
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx
new file mode 100644
index 000000000000..520abe7c53c3
--- /dev/null
+++ b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx
@@ -0,0 +1,152 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLEPREVIEWHEADERCELL_HXX
+#define _SC_ACCESSIBLEPREVIEWHEADERCELL_HXX
+
+#include "AccessibleContextBase.hxx"
+#include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#include <tools/gen.hxx>
+#include "global.hxx"
+#include "address.hxx"
+#include <cppuhelper/implbase1.hxx>
+
+class ScPreviewShell;
+class ScPreviewTableInfo;
+namespace accessibility {
+ class AccessibleTextHelper;
+}
+
+typedef cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleValue>
+ ScAccessiblePreviewHeaderCellImpl;
+
+class ScAccessiblePreviewHeaderCell :
+ public ScAccessibleContextBase,
+ public ScAccessiblePreviewHeaderCellImpl
+{
+public:
+ ScAccessiblePreviewHeaderCell( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ ScPreviewShell* pViewShell,
+ const ScAddress& rCellPos, sal_Bool bIsColHdr, sal_Bool bIsRowHdr,
+ sal_Int32 nIndex );
+
+protected:
+ virtual ~ScAccessiblePreviewHeaderCell();
+
+ using ScAccessibleContextBase::IsDefunc;
+
+public:
+ using ScAccessibleContextBase::disposing;
+ virtual void SAL_CALL disposing();
+
+ //===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ ///===== XInterface =====================================================
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ ::com::sun::star::uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL acquire() throw ();
+
+ virtual void SAL_CALL release() throw ();
+
+ //===== XAccessibleValue ================================================
+
+ virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setCurrentValue( const ::com::sun::star::uno::Any& aNumber )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue() throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleComponent ============================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleContext ==============================================
+
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 i )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
+ getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XServiceInfo ====================================================
+
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
+ throw(::com::sun::star::uno::RuntimeException);
+
+ ///===== XTypeProvider ===================================================
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
+ getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual ::rtl::OUString SAL_CALL createAccessibleDescription(void) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException);
+ virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ ScPreviewShell* mpViewShell;
+ accessibility::AccessibleTextHelper* mpTextHelper;
+ sal_Int32 mnIndex;
+ ScAddress maCellPos;
+ sal_Bool mbColumnHeader;
+ sal_Bool mbRowHeader;
+ mutable ScPreviewTableInfo* mpTableInfo;
+
+ sal_Bool IsDefunc(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+
+ void CreateTextHelper();
+ void FillTableInfo() const;
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessiblePreviewTable.hxx b/sc/source/ui/inc/AccessiblePreviewTable.hxx
new file mode 100644
index 000000000000..6d9ae3c3025f
--- /dev/null
+++ b/sc/source/ui/inc/AccessiblePreviewTable.hxx
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLEPREVIEWTABLE_HXX
+#define _SC_ACCESSIBLEPREVIEWTABLE_HXX
+
+#include "AccessibleContextBase.hxx"
+#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+class ScPreviewShell;
+class ScPreviewTableInfo;
+
+typedef cppu::ImplHelper1< ::com::sun::star::accessibility::XAccessibleTable>
+ ScAccessiblePreviewTableImpl;
+
+class ScAccessiblePreviewTable :
+ public ScAccessibleContextBase,
+ public ScAccessiblePreviewTableImpl
+{
+public:
+ ScAccessiblePreviewTable( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ ScPreviewShell* pViewShell, sal_Int32 nIndex );
+
+protected:
+ virtual ~ScAccessiblePreviewTable();
+
+ using ScAccessibleContextBase::IsDefunc;
+
+public:
+ using ScAccessibleContextBase::disposing;
+ virtual void SAL_CALL disposing();
+
+ //===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ ///===== XInterface =====================================================
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ ::com::sun::star::uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL acquire() throw ();
+
+ virtual void SAL_CALL release() throw ();
+
+ //===== XAccessibleTable ================================================
+
+ virtual sal_Int32 SAL_CALL getAccessibleRowCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleColumnCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleRowDescription( sal_Int32 nRow )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleRowHeaders() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleColumnHeaders() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleRows()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getSelectedAccessibleColumns()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleRowSelected( sal_Int32 nRow )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCaption() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleSummary() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleRow( sal_Int32 nChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleColumn( sal_Int32 nChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleComponent ============================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus() throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XAccessibleContext ==============================================
+
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 i )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
+ getAccessibleStateSet() throw (::com::sun::star::uno::RuntimeException);
+
+ //===== XServiceInfo ====================================================
+
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
+ throw(::com::sun::star::uno::RuntimeException);
+
+ //===== XTypeProvider ===================================================
+
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
+ getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
+ throw(::com::sun::star::uno::RuntimeException);
+
+ //===== internal ========================================================
+ void SetCurrentIndexInParent(sal_Int32 nNew) { mnIndex = nNew; }
+
+protected:
+ virtual ::rtl::OUString SAL_CALL createAccessibleDescription(void) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL createAccessibleName(void) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual Rectangle GetBoundingBoxOnScreen(void) const throw(::com::sun::star::uno::RuntimeException);
+ virtual Rectangle GetBoundingBox(void) const throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ ScPreviewShell* mpViewShell;
+ sal_Int32 mnIndex;
+ mutable ScPreviewTableInfo* mpTableInfo;
+
+ sal_Bool IsDefunc(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+
+ void FillTableInfo() const;
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
new file mode 100644
index 000000000000..87447285dea2
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
@@ -0,0 +1,289 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLESPREADSHEET_HXX
+#define _SC_ACCESSIBLESPREADSHEET_HXX
+
+#include "AccessibleTableBase.hxx"
+#include "viewdata.hxx"
+
+#include <vector>
+
+class ScMyAddress : public ScAddress
+{
+public:
+ ScMyAddress() : ScAddress() {}
+ ScMyAddress(SCCOL nColP, SCROW nRowP, SCTAB nTabP) : ScAddress(nColP, nRowP, nTabP) {}
+ ScMyAddress(const ScAddress& rAddress) : ScAddress(rAddress) {}
+
+ sal_Bool operator< ( const ScMyAddress& rAddress ) const
+ {
+ if( Row() != rAddress.Row() )
+ return (Row() < rAddress.Row());
+ else
+ return (Col() < rAddress.Col());
+ }
+};
+
+class ScTabViewShell;
+class ScAccessibleDocument;
+class ScAccessibleCell;
+
+/** @descr
+ This base class provides an implementation of the
+ <code>AccessibleTable</code> service.
+*/
+class ScAccessibleSpreadsheet
+ : public ScAccessibleTableBase
+{
+public:
+ //===== internal ========================================================
+ ScAccessibleSpreadsheet(
+ ScAccessibleDocument* pAccDoc,
+ ScTabViewShell* pViewShell,
+ SCTAB nTab,
+ ScSplitPos eSplitPos);
+protected:
+ ScAccessibleSpreadsheet(
+ ScAccessibleSpreadsheet& rParent,
+ const ScRange& rRange );
+
+ virtual ~ScAccessibleSpreadsheet();
+
+ void ConstructScAccessibleSpreadsheet(
+ ScAccessibleDocument* pAccDoc,
+ ScTabViewShell* pViewShell,
+ SCTAB nTab,
+ ScSplitPos eSplitPos);
+
+ using ScAccessibleTableBase::IsDefunc;
+
+public:
+ using ScAccessibleTableBase::addEventListener;
+ using ScAccessibleTableBase::disposing;
+
+ virtual void SAL_CALL disposing();
+
+ void CompleteSelectionChanged(sal_Bool bNewState);
+
+ virtual void LostFocus();
+
+ virtual void GotFocus();
+
+ void BoundingBoxChanged();
+
+ void VisAreaChanged();
+
+ ///===== SfxListener =====================================================
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ ///===== XAccessibleTable ================================================
+
+ /// Returns the row headers as an AccessibleTable.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleRowHeaders( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns the column headers as an AccessibleTable.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleColumnHeaders( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns the selected rows in a table.
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleRows( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns the selected columns in a table.
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleColumns( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns a boolean value indicating whether the specified row is selected.
+ virtual sal_Bool SAL_CALL
+ isAccessibleRowSelected( sal_Int32 nRow )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Returns a boolean value indicating whether the specified column is selected.
+ virtual sal_Bool SAL_CALL
+ isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Returns the Accessible at a specified row and column in the table.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ ScAccessibleCell* GetAccessibleCellAt(sal_Int32 nRow, sal_Int32 nColumn);
+
+ /// Returns a boolean value indicating whether the accessible at a specified row and column is selected.
+ virtual sal_Bool SAL_CALL
+ isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ ///===== XAccessibleComponent ============================================
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
+ SAL_CALL getAccessibleAtPoint(
+ const ::com::sun::star::awt::Point& rPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL grabFocus( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getForeground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL getBackground( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleContext ==============================================
+
+ /// Return NULL to indicate that an empty relation set.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
+ getAccessibleRelationSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the set of current states.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleSelection ===========================================
+
+ virtual void SAL_CALL
+ selectAccessibleChild( sal_Int32 nChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL
+ clearAccessibleSelection( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL
+ selectAllAccessibleChildren( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL
+ getSelectedAccessibleChildCount( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL
+ deselectAccessibleChild( sal_Int32 nChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ ///===== XServiceInfo ====================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a list of all supported services.
+ */
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
+ getSupportedServiceNames(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XTypeProvider ===================================================
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleEventBroadcaster =====================================
+
+ /** Add listener that is informed of future changes of name,
+ description and so on events.
+ */
+ virtual void SAL_CALL
+ addEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleEventListener>& xListener)
+ throw (com::sun::star::uno::RuntimeException);
+
+protected:
+ /// Return the object's current bounding box relative to the desktop.
+ virtual Rectangle GetBoundingBoxOnScreen(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current bounding box relative to the parent object.
+ virtual Rectangle GetBoundingBox(void) const
+ throw (::com::sun::star::uno::RuntimeException);
+private:
+ ScTabViewShell* mpViewShell;
+ ScRangeList* mpMarkedRanges;
+ std::vector<ScMyAddress>* mpSortedMarkedCells;
+ ScAccessibleDocument* mpAccDoc;
+ ScAccessibleCell* mpAccCell;
+ Rectangle maVisCells;
+ ScSplitPos meSplitPos;
+ ScAddress maActiveCell;
+ SCTAB mnTab;
+ sal_Bool mbIsSpreadsheet;
+ sal_Bool mbHasSelection;
+ sal_Bool mbDelIns;
+ sal_Bool mbIsFocusSend;
+
+ sal_Bool IsDefunc(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+ sal_Bool IsEditable(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet>& rxParentStates);
+ sal_Bool IsFocused();
+ sal_Bool IsCompleteSheetSelected();
+
+ void SelectCell(sal_Int32 nRow, sal_Int32 nCol, sal_Bool bDeselect);
+ void CreateSortedMarkedCells();
+ void AddMarkedRange(const ScRange& rRange);
+
+ ScDocument* GetDocument(ScTabViewShell* pViewShell);
+ Rectangle GetVisArea(ScTabViewShell* pViewShell, ScSplitPos eSplitPos);
+ Rectangle GetVisCells(const Rectangle& rVisArea);
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessibleTableBase.hxx b/sc/source/ui/inc/AccessibleTableBase.hxx
new file mode 100644
index 000000000000..017ef4dfca3f
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleTableBase.hxx
@@ -0,0 +1,298 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef _SC_ACCESSIBLETABLEBASE_HXX
+#define _SC_ACCESSIBLETABLEBASE_HXX
+
+#include "AccessibleContextBase.hxx"
+#include "global.hxx"
+#include "address.hxx"
+#include <com/sun/star/accessibility/XAccessibleTable.hpp>
+#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <cppuhelper/implbase2.hxx>
+
+class ScTabViewShell;
+
+/** @descr
+ This base class provides an implementation of the
+ <code>AccessibleTable</code> service.
+*/
+
+typedef cppu::ImplHelper2< ::com::sun::star::accessibility::XAccessibleTable,
+ ::com::sun::star::accessibility::XAccessibleSelection>
+ ScAccessibleTableBaseImpl;
+
+class ScAccessibleTableBase :
+ public ScAccessibleContextBase,
+ public ScAccessibleTableBaseImpl
+{
+public:
+ //===== internal ========================================================
+ ScAccessibleTableBase(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent,
+ ScDocument* pDoc,
+ const ScRange& rRange);
+protected:
+ virtual ~ScAccessibleTableBase();
+public:
+
+ using ScAccessibleContextBase::disposing;
+ virtual void SAL_CALL disposing();
+
+ ///===== XInterface =====================================================
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
+ ::com::sun::star::uno::Type const & rType )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL acquire() throw ();
+
+ virtual void SAL_CALL release() throw ();
+
+ ///===== XAccessibleTable ================================================
+
+ /// Returns the number of rows in the table.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleRowCount( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns the number of columns in the table.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleColumnCount( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns the description of the specified row in the table.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleRowDescription( sal_Int32 nRow )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Returns the description text of the specified column in the table.
+ virtual ::rtl::OUString SAL_CALL
+ getAccessibleColumnDescription( sal_Int32 nColumn )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /** Returns the number of rows occupied by the Accessible at a specified row and column in the table.
+ Returns 1 if it is only a cell and the number of rows the cell is merged if the cell is a merged cell.
+ */
+ virtual sal_Int32 SAL_CALL
+ getAccessibleRowExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /** Returns the number of columns occupied by the Accessible at a specified row and column in the table.
+ Returns 1 if it is only a cell and the number of columns the cell is merged if the cell is a merged cell.
+ */
+ virtual sal_Int32 SAL_CALL
+ getAccessibleColumnExtentAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Returns the row headers as an AccessibleTable.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleRowHeaders( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns the column headers as an AccessibleTable.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleTable > SAL_CALL
+ getAccessibleColumnHeaders( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns the selected rows in a table.
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleRows( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns the selected columns in a table.
+ virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL
+ getSelectedAccessibleColumns( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns a boolean value indicating whether the specified row is selected.
+ virtual sal_Bool SAL_CALL
+ isAccessibleRowSelected( sal_Int32 nRow )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Returns a boolean value indicating whether the specified column is selected.
+ virtual sal_Bool SAL_CALL
+ isAccessibleColumnSelected( sal_Int32 nColumn )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Returns the Accessible at a specified row and column in the table.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCellAt( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Returns the caption for the table.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleCaption( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns the summary description of the table.
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleSummary( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Returns a boolean value indicating whether the accessible at a specified row and column is selected.
+ virtual sal_Bool SAL_CALL
+ isAccessibleSelected( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ ///===== XAccessibleExtendedTable ========================================
+
+ /// Returns the index of the cell on the given position.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Returns the row number of an index in the table.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleRow( sal_Int32 nChildIndex )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ /// Returns the column number of an index in the table.
+ virtual sal_Int32 SAL_CALL
+ getAccessibleColumn( sal_Int32 nChildIndex )
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+ //===== XAccessibleContext ==============================================
+
+ /// Return the number of currently visible children.
+ // is overloaded to calculate this on demand
+ virtual sal_Int32 SAL_CALL
+ getAccessibleChildCount(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the specified child or NULL if index is invalid.
+ // is overloaded to calculate this on demand
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
+ getAccessibleChild(sal_Int32 nIndex)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::lang::IndexOutOfBoundsException);
+
+protected:
+ /// Return this object's description.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleDescription(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the object's current name.
+ virtual ::rtl::OUString SAL_CALL
+ createAccessibleName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+public:
+ /// Return NULL to indicate that an empty relation set.
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleRelationSet> SAL_CALL
+ getAccessibleRelationSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /// Return the set of current states.
+ // perhaps sometimes to be implemented
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL
+ getAccessibleStateSet(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XAccessibleSelection ===========================================
+
+ virtual void SAL_CALL
+ selectAccessibleChild( sal_Int32 nChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Bool SAL_CALL
+ isAccessibleChildSelected( sal_Int32 nChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL
+ clearAccessibleSelection( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL
+ selectAllAccessibleChildren( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 SAL_CALL
+ getSelectedAccessibleChildCount( )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL
+ deselectAccessibleChild( sal_Int32 nSelectedChildIndex )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ ///===== XServiceInfo ===================================================
+
+ /** Returns an identifier for the implementation of this object.
+ */
+ virtual ::rtl::OUString SAL_CALL
+ getImplementationName(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+ ///===== XTypeProvider ===================================================
+
+ /// returns the possible types
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
+ getTypes()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ /** Returns a implementation id.
+ */
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL
+ getImplementationId(void)
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ /// contains the range of the table, because it could be a subrange of the complete table
+ ScRange maRange;
+
+ ScDocument* mpDoc;
+
+ void CommitTableModelChange(sal_Int32 nStartRow, sal_Int32 nStartCol, sal_Int32 nEndRow, sal_Int32 nEndCol, sal_uInt16 nId);
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx
new file mode 100644
index 000000000000..0a61280a574a
--- /dev/null
+++ b/sc/source/ui/inc/AccessibleText.hxx
@@ -0,0 +1,359 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SC_ACCESSIBLETEXT_HXX
+#define _SC_ACCESSIBLETEXT_HXX
+
+#include "textuno.hxx"
+#include "global.hxx"
+#include "viewdata.hxx"
+#include <editeng/svxenum.hxx>
+
+#include <memory>
+
+class ScDocShell;
+class ScViewForwarder;
+class ScEditObjectViewForwarder;
+class ScPreviewViewForwarder;
+class ScEditViewForwarder;
+class ScPreviewShell;
+class EditTextObject;
+class ScCsvViewForwarder;
+class ScAccessibleCell;
+
+
+// ============================================================================
+
+class ScAccessibleTextData : public SfxListener
+{
+public:
+ ScAccessibleTextData() {}
+ virtual ~ScAccessibleTextData() {}
+
+ virtual ScAccessibleTextData* Clone() const = 0;
+
+ virtual void Notify( SfxBroadcaster& /* rBC */, const SfxHint& /* rHint */ ) {}
+
+ virtual SvxTextForwarder* GetTextForwarder() = 0;
+ virtual SvxViewForwarder* GetViewForwarder() = 0;
+ virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate ) = 0;
+ virtual SfxBroadcaster& GetBroadcaster() const { return maBroadcaster; }
+
+ virtual void UpdateData() = 0;
+ virtual void SetDoUpdate(sal_Bool bValue) = 0;
+ virtual sal_Bool IsDirty() const = 0;
+
+private:
+ mutable SfxBroadcaster maBroadcaster;
+
+ // prevent the using of this method of the base class
+ ScSharedCellEditSource* GetOriginalSource() { return NULL; }
+};
+
+
+// ============================================================================
+
+class ScAccessibleCellBaseTextData : public ScAccessibleTextData,
+ public ScCellTextData
+{
+public:
+ ScAccessibleCellBaseTextData(ScDocShell* pDocShellP,
+ const ScAddress& rP)
+ : ScCellTextData(pDocShellP, rP) {}
+ virtual ~ScAccessibleCellBaseTextData() {}
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { ScCellTextData::Notify(rBC, rHint); }
+
+ virtual void UpdateData() { ScCellTextData::UpdateData(); }
+ virtual void SetDoUpdate(sal_Bool bValue) { ScCellTextData::SetDoUpdate(bValue); }
+ virtual sal_Bool IsDirty() const { return ScCellTextData::IsDirty(); }
+};
+
+
+// ============================================================================
+
+// ScAccessibleCellTextData: shared data between sub objects of a accessible cell text object
+
+class ScAccessibleCellTextData : public ScAccessibleCellBaseTextData
+{
+public:
+ ScAccessibleCellTextData(ScTabViewShell* pViewShell,
+ const ScAddress& rP, ScSplitPos eSplitPos, ScAccessibleCell* pAccCell);
+ virtual ~ScAccessibleCellTextData();
+
+ virtual ScAccessibleTextData* Clone() const;
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ virtual SvxTextForwarder* GetTextForwarder();
+ virtual SvxViewForwarder* GetViewForwarder();
+ virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate );
+
+ DECL_LINK( NotifyHdl, EENotify* );
+protected:
+ virtual void GetCellText(const ScAddress& rCellPos, String& rText);
+private:
+ ScViewForwarder* mpViewForwarder;
+ ScEditViewForwarder* mpEditViewForwarder;
+ ScTabViewShell* mpViewShell;
+ ScSplitPos meSplitPos;
+ sal_Bool mbViewEditEngine;
+ ScAccessibleCell* mpAccessibleCell;
+
+ // prevent the using of this method of the base class
+ ScSharedCellEditSource* GetOriginalSource() { return NULL; }
+
+ using ScAccessibleCellBaseTextData::GetDocShell;
+ ScDocShell* GetDocShell(ScTabViewShell* pViewShell);
+};
+
+
+// ============================================================================
+
+class ScAccessibleEditObjectTextData : public ScAccessibleTextData
+{
+public:
+ ScAccessibleEditObjectTextData(EditView* pEditView, Window* pWin);
+ virtual ~ScAccessibleEditObjectTextData();
+
+ virtual ScAccessibleTextData* Clone() const;
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ virtual SvxTextForwarder* GetTextForwarder();
+ virtual SvxViewForwarder* GetViewForwarder();
+ virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate );
+
+ virtual void UpdateData() { }
+ virtual void SetDoUpdate(sal_Bool /* bValue */) { }
+ virtual sal_Bool IsDirty() const { return sal_False; }
+
+ DECL_LINK( NotifyHdl, EENotify* );
+protected:
+ ScEditObjectViewForwarder* mpViewForwarder;
+ ScEditViewForwarder* mpEditViewForwarder;
+ EditView* mpEditView;
+ EditEngine* mpEditEngine;
+ SvxEditEngineForwarder* mpForwarder;
+ Window* mpWindow;
+};
+
+
+// ============================================================================
+
+class ScAccessibleEditLineTextData : public ScAccessibleEditObjectTextData
+{
+public:
+ ScAccessibleEditLineTextData(EditView* pEditView, Window* pWin);
+ virtual ~ScAccessibleEditLineTextData();
+
+ virtual ScAccessibleTextData* Clone() const;
+
+ virtual SvxTextForwarder* GetTextForwarder();
+ virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate );
+
+ void Dispose();
+ void TextChanged();
+ void StartEdit();
+ void EndEdit();
+private:
+ void ResetEditMode();
+
+ sal_Bool mbEditEngineCreated;
+};
+
+
+// ============================================================================
+
+class ScAccessiblePreviewCellTextData : public ScAccessibleCellBaseTextData
+{
+public:
+ ScAccessiblePreviewCellTextData(ScPreviewShell* pViewShell,
+ const ScAddress& rP);
+ virtual ~ScAccessiblePreviewCellTextData();
+
+ virtual ScAccessibleTextData* Clone() const;
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ virtual SvxTextForwarder* GetTextForwarder();
+ virtual SvxViewForwarder* GetViewForwarder();
+ virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool /* bCreate */ ) { return NULL; }
+
+//UNUSED2008-05 DECL_LINK( NotifyHdl, EENotify* );
+private:
+ ScPreviewViewForwarder* mpViewForwarder;
+ ScPreviewShell* mpViewShell;
+
+ // prevent the using of this method of the base class
+ ScSharedCellEditSource* GetOriginalSource() { return NULL; }
+
+ using ScAccessibleCellBaseTextData::GetDocShell;
+ ScDocShell* GetDocShell(ScPreviewShell* pViewShell);
+};
+
+
+// ============================================================================
+
+class ScAccessiblePreviewHeaderCellTextData : public ScAccessibleCellBaseTextData
+{
+public:
+ ScAccessiblePreviewHeaderCellTextData(ScPreviewShell* pViewShell,
+ const String& rText, const ScAddress& rP, sal_Bool bColHeader, sal_Bool bRowHeader);
+ virtual ~ScAccessiblePreviewHeaderCellTextData();
+
+ virtual ScAccessibleTextData* Clone() const;
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ virtual SvxTextForwarder* GetTextForwarder();
+ virtual SvxViewForwarder* GetViewForwarder();
+ virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool /* bCreate */ ) { return NULL; }
+
+//UNUSED2008-05 DECL_LINK( NotifyHdl, EENotify* );
+private:
+ ScPreviewViewForwarder* mpViewForwarder;
+ ScPreviewShell* mpViewShell;
+ String maText;
+ sal_Bool mbColHeader;
+ sal_Bool mbRowHeader;
+
+ // prevent the using of this method of the base class
+ ScSharedCellEditSource* GetOriginalSource() { return NULL; }
+
+ using ScAccessibleCellBaseTextData::GetDocShell;
+ ScDocShell* GetDocShell(ScPreviewShell* pViewShell);
+};
+
+
+// ============================================================================
+
+class ScAccessibleHeaderTextData : public ScAccessibleTextData
+{
+public:
+ ScAccessibleHeaderTextData(ScPreviewShell* pViewShell,
+ const EditTextObject* pEditObj, sal_Bool bHeader, SvxAdjust eAdjust);
+ virtual ~ScAccessibleHeaderTextData();
+
+ virtual ScAccessibleTextData* Clone() const;
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ virtual SvxTextForwarder* GetTextForwarder();
+ virtual SvxViewForwarder* GetViewForwarder();
+ virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool /* bCreate */ ) { return NULL; }
+
+ virtual void UpdateData() { }
+ virtual void SetDoUpdate(sal_Bool /* bValue */) { }
+ virtual sal_Bool IsDirty() const { return sal_False; }
+private:
+ ScPreviewViewForwarder* mpViewForwarder;
+ ScPreviewShell* mpViewShell;
+ ScEditEngineDefaulter* mpEditEngine;
+ SvxEditEngineForwarder* mpForwarder;
+ ScDocShell* mpDocSh;
+ const EditTextObject* mpEditObj;
+ sal_Bool mbHeader;
+ sal_Bool mbDataValid;
+ SvxAdjust meAdjust;
+};
+
+
+// ============================================================================
+
+class ScAccessibleNoteTextData : public ScAccessibleTextData
+{
+public:
+ ScAccessibleNoteTextData(ScPreviewShell* pViewShell,
+ const String& sText, const ScAddress& aCellPos, sal_Bool bMarkNote);
+ virtual ~ScAccessibleNoteTextData();
+
+ virtual ScAccessibleTextData* Clone() const;
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ virtual SvxTextForwarder* GetTextForwarder();
+ virtual SvxViewForwarder* GetViewForwarder();
+ virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool /* bCreate */ ) { return NULL; }
+
+ virtual void UpdateData() { }
+ virtual void SetDoUpdate(sal_Bool /* bValue */) { }
+ virtual sal_Bool IsDirty() const { return sal_False; }
+private:
+ ScPreviewViewForwarder* mpViewForwarder;
+ ScPreviewShell* mpViewShell;
+ ScEditEngineDefaulter* mpEditEngine;
+ SvxEditEngineForwarder* mpForwarder;
+ ScDocShell* mpDocSh;
+ String msText;
+ ScAddress maCellPos;
+ sal_Bool mbMarkNote;
+ sal_Bool mbDataValid;
+};
+
+
+// ============================================================================
+
+class ScAccessibleCsvTextData : public ScAccessibleTextData
+{
+private:
+ typedef ::std::auto_ptr< SvxTextForwarder > TextForwarderPtr;
+ typedef ::std::auto_ptr< ScCsvViewForwarder > ViewForwarderPtr;
+
+ Window* mpWindow;
+ EditEngine* mpEditEngine;
+ TextForwarderPtr mpTextForwarder;
+ ViewForwarderPtr mpViewForwarder;
+ String maCellText;
+ Rectangle maBoundBox;
+ Size maCellSize;
+
+public:
+ explicit ScAccessibleCsvTextData(
+ Window* pWindow,
+ EditEngine* pEditEngine,
+ const String& rCellText,
+ const Rectangle& rBoundBox,
+ const Size& rCellSize );
+ virtual ~ScAccessibleCsvTextData();
+
+ virtual ScAccessibleTextData* Clone() const;
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ virtual SvxTextForwarder* GetTextForwarder();
+ virtual SvxViewForwarder* GetViewForwarder();
+ virtual SvxEditViewForwarder* GetEditViewForwarder( sal_Bool bCreate );
+
+ virtual void UpdateData() {}
+ virtual void SetDoUpdate( sal_Bool /* bValue */ ) {}
+ virtual sal_Bool IsDirty() const { return sal_False; }
+};
+
+
+// ============================================================================
+
+#endif
diff --git a/sc/source/ui/inc/ChartRangeSelectionListener.hxx b/sc/source/ui/inc/ChartRangeSelectionListener.hxx
new file mode 100644
index 000000000000..65c725da5675
--- /dev/null
+++ b/sc/source/ui/inc/ChartRangeSelectionListener.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SC_CHARTRANGESELECTIONLISTENER_HXX
+#define SC_CHARTRANGESELECTIONLISTENER_HXX
+
+#include <cppuhelper/compbase2.hxx>
+#include <comphelper/broadcasthelper.hxx>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
+class ScTabViewShell;
+
+typedef ::cppu::WeakComponentImplHelper2<
+ ::com::sun::star::view::XSelectionChangeListener,
+ ::com::sun::star::lang::XServiceInfo >
+ ScChartRangeSelectionListener_Base;
+
+class ScChartRangeSelectionListener :
+ public comphelper::OBaseMutex,
+ public ScChartRangeSelectionListener_Base
+{
+public:
+ explicit ScChartRangeSelectionListener( ScTabViewShell * pViewShell );
+ virtual ~ScChartRangeSelectionListener();
+
+protected:
+ // ____ XSelectionChangeListener ____
+ virtual void SAL_CALL selectionChanged(
+ const ::com::sun::star::lang::EventObject& aEvent )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XEventListener (base of XSelectionChangeListener) ____
+ virtual void SAL_CALL disposing(
+ const ::com::sun::star::lang::EventObject& Source )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ WeakComponentImplHelperBase ____
+ // is called when dispose() is called at this component
+ virtual void SAL_CALL disposing();
+
+ // ____ XServiceInfo ____
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& ServiceName )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ ScTabViewShell * m_pViewShell;
+};
+
+// SC_CHARTRANGESELECTIONLISTENER_HXX
+#endif
diff --git a/sc/source/ui/inc/DrawModelBroadcaster.hxx b/sc/source/ui/inc/DrawModelBroadcaster.hxx
new file mode 100644
index 000000000000..045e9bc86f41
--- /dev/null
+++ b/sc/source/ui/inc/DrawModelBroadcaster.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SC_DRAWMODELBROADCASTER_HXX
+#define _SC_DRAWMODELBROADCASTER_HXX
+
+
+#include <svl/lstner.hxx>
+#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/document/XEventBroadcaster.hpp>
+
+class SdrModel;
+
+class ScDrawModelBroadcaster : public SfxListener,
+ public ::cppu::WeakImplHelper1< com::sun::star::document::XEventBroadcaster >
+{
+ mutable ::osl::Mutex maListenerMutex;
+ ::cppu::OInterfaceContainerHelper maEventListeners;
+ SdrModel *mpDrawModel;
+
+public:
+
+ ScDrawModelBroadcaster( SdrModel *pDrawModel );
+ virtual ~ScDrawModelBroadcaster();
+
+ virtual void SAL_CALL addEventListener( const com::sun::star::uno::Reference< com::sun::star::document::XEventListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const com::sun::star::uno::Reference< com::sun::star::document::XEventListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+};
+
+#endif
diff --git a/sc/source/ui/inc/IAnyRefDialog.hxx b/sc/source/ui/inc/IAnyRefDialog.hxx
new file mode 100644
index 000000000000..70731ac8a1f7
--- /dev/null
+++ b/sc/source/ui/inc/IAnyRefDialog.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SC_IANYREFDIALOG_HXX_INCLUDED
+#define SC_IANYREFDIALOG_HXX_INCLUDED
+
+#include <formula/IControlReferenceHandler.hxx>
+
+class ScRange;
+class ScDocument;
+class ScTabViewShell;
+class SfxObjectShell;
+namespace formula
+{
+ class RefEdit;
+ class RefButton;
+}
+class SAL_NO_VTABLE IAnyRefDialog : public formula::IControlReferenceHandler
+{
+public:
+ virtual ~IAnyRefDialog(){}
+
+ //virtual void ShowReference(const String& _sRef) = 0;
+ //virtual void HideReference( BOOL bDoneRefMode = TRUE ) = 0;
+ //virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) = 0;
+ //virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) = 0;
+
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0;
+ virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL ) = 0;
+ virtual void RefInputDone( BOOL bForced = FALSE ) = 0;
+ virtual BOOL IsTableLocked() const = 0;
+ virtual BOOL IsRefInputMode() const = 0;
+
+ virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const = 0;
+ virtual void AddRefEntry() = 0;
+ virtual void SetActive() = 0;
+ virtual void ViewShellChanged( ScTabViewShell* pScViewShell ) = 0;
+};
+
+#endif // SC_IANYREFDIALOG_HXX_INCLUDED
diff --git a/sc/source/ui/inc/ScDevChart.hxx b/sc/source/ui/inc/ScDevChart.hxx
new file mode 100644
index 000000000000..a08a89da0570
--- /dev/null
+++ b/sc/source/ui/inc/ScDevChart.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef INCLUDED_DEVCHARTCONFIG_HXX
+#define INCLUDED_DEVCHARTCONFIG_HXX
+
+#include <unotools/configitem.hxx>
+
+namespace ScDevChart
+{
+
+class DevChartConfigItem : public ::utl::ConfigItem
+{
+public:
+ DevChartConfigItem() :
+ ConfigItem( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Internal" )),
+ CONFIG_MODE_IMMEDIATE_UPDATE )
+ {}
+
+ bool UseDevelopmentChart();
+};
+
+bool DevChartConfigItem::UseDevelopmentChart()
+{
+ bool bResult = false;
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames( 1 );
+ aNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DevelopmentChart" ));
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aResult( GetProperties( aNames ));
+
+ OSL_ASSERT( aResult.getLength());
+ aResult[0] >>= bResult;
+
+ return bResult;
+}
+
+/** States whether the new chart implementation or the old one should be used.
+ If <TRUE/> is returned the newly developed chart (chart2) should be used.
+ If <FALSE/> is returned, the old chart (sch) should be used.
+
+ Config-Item: Office.Common/Internal:DevelopmentChart
+
+ This function (the complete header) is only for a transitional period. It
+ will be deprecated after the new chart is definitely integrated into the
+ product.
+ */
+bool UseDevChart()
+{
+// static DevChartConfigItem aCfgItem;
+// return aCfgItem.UseDevelopmentChart();
+
+ // ignore configuration
+ //@todo: get rid of this class
+ return true;
+}
+
+} // namespace ScDevChart
+
+// INCLUDED_DEVCHARTCONFIG_HXX
+#endif
diff --git a/sc/source/ui/inc/acredlin.hrc b/sc/source/ui/inc/acredlin.hrc
new file mode 100644
index 000000000000..b21676ee6ae9
--- /dev/null
+++ b/sc/source/ui/inc/acredlin.hrc
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc" // -> RID_SCDLG_CHANGES
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_HELP 5
+//
+#define CTR_REDLINING 10
+#define TP_FILTER 11
+#define TP_VIEW 12
+
+
+#define FT_ASSIGN 14
+#define ED_ASSIGN 15
+#define RB_ASSIGN 16
+
+
+#define STR_INSERT_COLS 20
+#define STR_INSERT_ROWS 21
+#define STR_INSERT_TABS 22
+#define STR_DELETE_COLS 23
+#define STR_DELETE_ROWS 24
+#define STR_DELETE_TABS 25
+#define STR_MOVE 26
+#define STR_CONTENT 27
+#define STR_REJECT 28
+#define STR_ACCEPTED 29
+#define STR_REJECTED 30
+#define STR_NO_ENTRY 31
+#define STR_CONTENT_WITH_CHILD 32
+#define STR_CHILD_CONTENT 33
+#define STR_CHILD_ORGCONTENT 34
+#define STR_EMPTY 35
+// Bitmaps
+#define BMP_STR_CLOSE 41
+#define BMP_STR_OPEN 42
+#define BMP_STR_END 43
+#define BMP_STR_ERROR 44
+
+#define SC_CHANGES_COMMENT 49
+#define SC_SUB_SORT 50
+#define SC_SORT_ACTION 51
+#define SC_SORT_POSITION 52
+#define SC_SORT_AUTHOR 53
+#define SC_SORT_DATE 54
+#define SC_SORT_COMMENT 55
+
+//
+
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
new file mode 100644
index 000000000000..a077129c374c
--- /dev/null
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -0,0 +1,264 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_ACREDLIN_HXX
+#define SC_ACREDLIN_HXX
+
+#ifndef _MOREBTN_HXX //autogen
+#include <vcl/morebtn.hxx>
+#endif
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#include <svtools/headbar.hxx>
+#include <svtools/svtabbx.hxx>
+
+
+#include "rangenam.hxx"
+#include "anyrefdg.hxx"
+#include <vcl/lstbox.hxx>
+
+#ifndef _SVX_ACREDLIN_HXX
+#include <svx/ctredlin.hxx>
+#endif
+#include <svx/simptabl.hxx>
+
+#ifndef _SVARRAY_HXX
+#define _SVARRAY_HXX
+#include <svl/svarray.hxx>
+#endif
+#include "chgtrack.hxx"
+#include "chgviset.hxx"
+#include <vcl/timer.hxx>
+
+class ScViewData;
+class ScDocument;
+
+#define FLT_DATE_BEFORE 0
+#define FLT_DATE_SINCE 1
+#define FLT_DATE_EQUAL 2
+#define FLT_DATE_NOTEQUAL 3
+#define FLT_DATE_BETWEEN 4
+#define FLT_DATE_SAVE 5
+
+
+class ScViewEntryPtr
+{
+private:
+ String* pAction;
+ String* pPos;
+ String* pAuthor;
+ String* pDate;
+ String* pComment;
+ void* pData;
+
+public:
+
+ String* GetpAction() {return pAction; }
+ String* GetpPos() {return pPos; }
+ String* GetpAuthor() {return pAuthor; }
+ String* GetpDate() {return pDate; }
+ String* GetpComment() {return pComment;}
+ void* GetpData() {return pData; }
+
+ void SetpAction (String* pString) {pAction= pString;}
+ void SetpPos (String* pString) {pPos = pString;}
+ void SetpAuthor (String* pString) {pAuthor= pString;}
+ void SetpDate (String* pString) {pDate = pString;}
+ void SetpComment(String* pString) {pComment=pString;}
+ void SetpData (void* pdata) {pData =pdata;}
+};
+
+class ScViewEntryPtrList
+{
+ ScViewEntryPtrList* pNext;
+ ScViewEntryPtrList* pLast;
+
+ ScViewEntryPtr* pData;
+};
+
+
+class ScRedlinData : public RedlinData
+{
+public:
+
+ ScRedlinData();
+ ~ScRedlinData();
+ SCTAB nTable;
+ SCCOL nCol;
+ SCROW nRow;
+ ULONG nActionNo;
+ ULONG nInfo;
+ BOOL bIsRejectable;
+ BOOL bIsAcceptable;
+};
+
+typedef long LExpNum;
+
+//@ Expand-Entrys nicht eindeutig, daher gestrichen
+//DECLARE_TABLE( ScChgTrackExps, LExpNum)
+//==================================================================
+
+class ScAcceptChgDlg : public SfxModelessDialog
+{
+private:
+
+ Timer aSelectionTimer;
+ Timer aReOpenTimer;
+ SvxAcceptChgCtr aAcceptChgCtr;
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ ScRangeName aLocalRangeName;
+ Selection theCurSel;
+ SvxTPFilter* pTPFilter;
+ SvxTPView* pTPView;
+ SvxRedlinTable* pTheView; // PB 2006/02/02 #i48648 now SvHeaderTabListBox
+ Size MinSize;
+ ScRangeList aRangeList;
+ ScChangeViewSettings aChangeViewSet;
+ String aStrInsertCols;
+ String aStrInsertRows;
+ String aStrInsertTabs;
+ String aStrDeleteCols;
+ String aStrDeleteRows;
+ String aStrDeleteTabs;
+ String aStrMove;
+ String aStrContent;
+ String aStrReject;
+ String aUnknown;
+ String aStrAllAccepted;
+ String aStrAllRejected;
+ String aStrNoEntry;
+ String aStrContentWithChild;
+ String aStrChildContent;
+ String aStrChildOrgContent;
+ String aStrEmpty;
+ ULONG nAcceptCount;
+ ULONG nRejectCount;
+ BOOL bAcceptEnableFlag;
+ BOOL bRejectEnableFlag;
+ BOOL bNeedsUpdate;
+ BOOL bIgnoreMsg;
+ BOOL bNoSelection;
+ BOOL bHasFilterEntry;
+ BOOL bUseColor;
+ //ScChgTrackExps aExpandArray;
+
+ void Init();
+ void InitFilter();
+//UNUSED2008-05 void SetMyStaticData();
+
+ DECL_LINK( FilterHandle, SvxTPFilter* );
+ DECL_LINK( RefHandle, SvxTPFilter* );
+ DECL_LINK( FilterModified, SvxTPFilter* );
+ DECL_LINK( MinSizeHandle, SvxAcceptChgCtr*);
+ DECL_LINK( RejectHandle, SvxTPView*);
+ DECL_LINK( AcceptHandle, SvxTPView*);
+ DECL_LINK( RejectAllHandle, SvxTPView*);
+ DECL_LINK( AcceptAllHandle, SvxTPView*);
+ DECL_LINK( ExpandingHandle, SvxRedlinTable*);
+ DECL_LINK( SelectHandle, SvxRedlinTable*);
+ DECL_LINK( RefInfoHandle, String*);
+
+ DECL_LINK( UpdateSelectionHdl, Timer*);
+ DECL_LINK( ChgTrackModHdl, ScChangeTrack*);
+ DECL_LINK( CommandHdl, Control*);
+ DECL_LINK( ReOpenTimerHdl, Timer*);
+ DECL_LINK( ColCompareHdl, SvSortData*);
+
+
+
+protected:
+
+ virtual void Resize();
+ virtual BOOL Close();
+
+ void RejectFiltered();
+ void AcceptFiltered();
+
+ BOOL IsValidAction(const ScChangeAction* pScChangeAction);
+
+ String* MakeTypeString(ScChangeActionType eType);
+
+ SvLBoxEntry* InsertChangeAction(const ScChangeAction* pScChangeAction,ScChangeActionState eState,
+ SvLBoxEntry* pParent=NULL,BOOL bDelMaster=FALSE,
+ BOOL bDisabled=FALSE,ULONG nPos=LIST_APPEND);
+
+ SvLBoxEntry* InsertFilteredAction(const ScChangeAction* pScChangeAction,ScChangeActionState eState,
+ SvLBoxEntry* pParent=NULL,BOOL bDelMaster=FALSE,
+ BOOL bDisabled=FALSE,ULONG nPos=LIST_APPEND);
+
+
+ SvLBoxEntry* InsertChangeActionContent(const ScChangeActionContent* pScChangeAction,
+ SvLBoxEntry* pParent,ULONG nSpecial);
+
+ void GetDependents( const ScChangeAction* pScChangeAction,
+ ScChangeActionTable& aActionTable,
+ SvLBoxEntry* pEntry);
+
+ BOOL InsertContentChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent);
+
+ BOOL InsertAcceptedORejected(SvLBoxEntry* pParent);
+
+ BOOL InsertDeletedChilds(const ScChangeAction *pChangeAction, ScChangeActionTable* pActionTable,
+ SvLBoxEntry* pParent);
+
+ BOOL InsertChilds(ScChangeActionTable* pActionTable,SvLBoxEntry* pParent);
+
+ void AppendChanges(ScChangeTrack* pChanges,ULONG nStartAction, ULONG nEndAction,
+ ULONG nPos=LIST_APPEND);
+
+ void RemoveEntrys(ULONG nStartAction,ULONG nEndAction);
+ void UpdateEntrys(ScChangeTrack* pChgTrack, ULONG nStartAction,ULONG nEndAction);
+
+ void UpdateView();
+ void ClearView();
+
+ BOOL Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
+ SvLBoxEntry* pEntry, BOOL bFilter=FALSE);
+
+public:
+ ScAcceptChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScViewData* ptrViewData);
+
+ ~ScAcceptChgDlg();
+
+ void ReInit(ScViewData* ptrViewData);
+
+ virtual long PreNotify( NotifyEvent& rNEvt );
+
+ void Initialize (SfxChildWinInfo* pInfo);
+ virtual void FillInfo(SfxChildWinInfo&) const;
+
+};
+
+
+#endif // SC_NAMEDLG_HXX
+
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
new file mode 100644
index 000000000000..0e7560fe0c50
--- /dev/null
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -0,0 +1,281 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_ANYREFDG_HXX
+#define SC_ANYREFDG_HXX
+
+#ifndef _IMAGEBTN_HXX
+#include <vcl/imagebtn.hxx>
+#endif
+#ifndef _EDIT_HXX
+#include <vcl/edit.hxx>
+#endif
+#ifndef _ACCEL_HXX
+#include <vcl/accel.hxx>
+#endif
+#include <sfx2/basedlgs.hxx>
+#include "address.hxx"
+#include "cell.hxx"
+#include "compiler.hxx"
+#include "formula/funcutl.hxx"
+#include "IAnyRefDialog.hxx"
+#include "scresid.hxx"
+#include <memory>
+
+class SfxObjectShell;
+class ScRange;
+class ScDocument;
+class ScTabViewShell;
+//The class of ScAnyRefDlg is rewritten by PengYunQuan for Validity Cell Range Picker
+//class ScAnyRefDlg;
+class ScRefHandler;
+class ScRangeList;
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+class SfxShell;
+#include "scmod.hxx"
+
+typedef formula::RefButton ScRefButton;
+typedef formula::RefEdit ScRefEdit;
+//-->Added by PengYunQuan for Validity Cell Range Picker
+class ScFormulaReferenceHelper
+{
+ IAnyRefDialog* m_pDlg;
+ ::std::auto_ptr<ScFormulaCell> pRefCell;
+ ::std::auto_ptr<ScCompiler> pRefComp;
+ formula::RefEdit* pRefEdit; // aktives Eingabefeld
+ formula::RefButton* pRefBtn; // Button dazu
+ Window* m_pWindow;
+ SfxBindings* m_pBindings;
+ ::std::auto_ptr<Accelerator>
+ pAccel; // fuer Enter/Escape
+ BOOL* pHiddenMarks; // Merkfeld fuer versteckte Controls
+ SCTAB nRefTab; // used for ShowReference
+
+ String sOldDialogText; // Originaltitel des Dialogfensters
+ Size aOldDialogSize; // Originalgroesse Dialogfenster
+ Point aOldEditPos; // Originalposition des Eingabefeldes
+ Size aOldEditSize; // Originalgroesse des Eingabefeldes
+ Point aOldButtonPos; // Originalpositiuon des Buttons
+
+ BOOL bEnableColorRef;
+ BOOL bHighLightRef;
+ BOOL bAccInserted;
+
+ DECL_LINK( AccelSelectHdl, Accelerator* );
+
+public:
+ ScFormulaReferenceHelper(IAnyRefDialog* _pDlg,SfxBindings* _pBindings);
+ ~ScFormulaReferenceHelper();
+
+ void ShowSimpleReference( const XubString& rStr );
+ void ShowFormulaReference( const XubString& rStr );
+ bool ParseWithNames( ScRangeList& rRanges, const String& rStr, ScDocument* pDoc );
+ void Init();
+
+ void ShowReference( const XubString& rStr );
+ void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+ void HideReference( BOOL bDoneRefMode = TRUE );
+ void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+ void RefInputDone( BOOL bForced = FALSE );
+ void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+
+ inline void SetWindow(Window* _pWindow) { m_pWindow = _pWindow; }
+ BOOL DoClose( USHORT nId );
+ void SetDispatcherLock( BOOL bLock );
+ void EnableSpreadsheets( BOOL bFlag = TRUE, BOOL bChilds = TRUE );
+ void ViewShellChanged( ScTabViewShell* pScViewShell );
+
+ static void enableInput(BOOL _bInput);
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+protected:
+ Window * GetWindow(){ return m_pWindow; }
+public:
+ bool CanInputStart( const ScRefEdit *pEdit ){ return !!pEdit; }
+ bool CanInputDone( BOOL bForced ){ return pRefEdit && (bForced || !pRefBtn); }
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+};
+//============================================================================
+
+//The class of ScAnyRefDlg is rewritten by PengYunQuan for Validity Cell Range Picker
+class SC_DLLPUBLIC ScRefHandler : //public SfxModelessDialog,
+ public IAnyRefDialog
+{
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+ Window & m_rWindow;
+ bool m_bInRefMode;
+public:
+ operator Window *(){ return &m_rWindow; }
+ Window * operator ->() { return static_cast<Window *>(*this); }
+ template<class,bool> friend class ScRefHdlrImplBase;
+//-->Added by PengYunQuan for Validity Cell Range Picker
+ friend class formula::RefButton;
+ friend class formula::RefEdit;
+
+private:
+ ScFormulaReferenceHelper
+ m_aHelper;
+ SfxBindings* pMyBindings;
+
+ Window* pActiveWin;
+ Timer aTimer;
+ String aDocName; // document on which the dialog was opened
+
+ DECL_LINK( UpdateFocusHdl, Timer* );
+
+
+protected:
+ virtual BOOL DoClose( USHORT nId );
+
+ void SetDispatcherLock( BOOL bLock );
+
+ //Overwrite TWindow will implemented by ScRefHdlrImplBase
+ //virtual long PreNotify( NotifyEvent& rNEvt );
+
+ virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+ virtual void RefInputDone( BOOL bForced = FALSE );
+ void ShowSimpleReference( const XubString& rStr );
+ void ShowFormulaReference( const XubString& rStr );
+
+ bool ParseWithNames( ScRangeList& rRanges, const String& rStr, ScDocument* pDoc );
+
+public:
+ ScRefHandler( Window &rWindow, SfxBindings* pB/*, SfxChildWindow* pCW,
+ Window* pParent, USHORT nResId*/, bool bBindRef );
+ virtual ~ScRefHandler();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0;
+ virtual void AddRefEntry();
+
+ virtual BOOL IsRefInputMode() const;
+ virtual BOOL IsTableLocked() const;
+ virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const;
+
+ virtual void ShowReference( const XubString& rStr );
+ virtual void HideReference( BOOL bDoneRefMode = TRUE );
+
+ virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+ virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+
+ virtual void ViewShellChanged( ScTabViewShell* pScViewShell );
+ void SwitchToDocument();
+ //SfxBindings& GetBindings();
+
+ virtual void SetActive() = 0;
+// virtual BOOL Close();
+ //Overwrite TWindow will implemented by ScRefHdlrImplBase
+ //virtual void StateChanged( StateChangedType nStateChange );
+
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+public:
+ bool EnterRefMode();
+ bool LeaveRefMode();
+ inline bool CanInputStart( const ScRefEdit *pEdit );
+ inline bool CanInputDone( BOOL bForced );
+//-->Added by PengYunQuan for Validity Cell Range Picker
+};
+
+
+//============================================================================
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+template< class TWindow, bool bBindRef = true >
+class ScRefHdlrImplBase:public TWindow, public ScRefHandler
+{
+public:
+ //Overwrite TWindow
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual void StateChanged( StateChangedType nStateChange );
+
+private:
+ template<class TBindings, class TChildWindow, class TParentWindow, class TResId>
+ ScRefHdlrImplBase( TBindings* pB, TChildWindow* pCW,
+ TParentWindow* pParent, TResId nResId);
+
+ template<class TParentWindow, class TResId, class TArg>
+ ScRefHdlrImplBase( TParentWindow* pParent, TResId nResId, const TArg &rArg, SfxBindings *pB = NULL );
+
+ ~ScRefHdlrImplBase();
+
+ template<class, class, bool> friend struct ScRefHdlrImpl;
+};
+
+template<class TWindow, bool bBindRef>
+template<class TBindings, class TChildWindow, class TParentWindow, class TResId>
+ScRefHdlrImplBase<TWindow, bBindRef>::ScRefHdlrImplBase( TBindings* pB, TChildWindow* pCW,
+ TParentWindow* pParent, TResId nResId):TWindow(pB, pCW, pParent, ScResId(static_cast<USHORT>( nResId ) ) ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
+
+template<class TWindow, bool bBindRef >
+template<class TParentWindow, class TResId, class TArg>
+ScRefHdlrImplBase<TWindow,bBindRef>::ScRefHdlrImplBase( TParentWindow* pParent, TResId nResIdP, const TArg &rArg, SfxBindings *pB /*= NULL*/ )
+:TWindow( pParent, ScResId(static_cast<USHORT>( nResIdP )), rArg ), ScRefHandler( *static_cast<TWindow*>(this), pB, bBindRef ){}
+
+template<class TWindow, bool bBindRef >
+ScRefHdlrImplBase<TWindow,bBindRef>::~ScRefHdlrImplBase(){}
+
+//============================================================================
+template<class TDerived, class TBase, bool bBindRef = true>
+struct ScRefHdlrImpl: ScRefHdlrImplBase<TBase, bBindRef >
+{
+ enum { UNKNOWN_SLOTID = 0U, SLOTID = UNKNOWN_SLOTID };
+
+ template<class T1, class T2, class T3, class T4>
+ ScRefHdlrImpl( const T1 & rt1, const T2 & rt2, const T3 & rt3, const T4 & rt4 ):ScRefHdlrImplBase<TBase, bBindRef >(rt1, rt2, rt3, rt4 )
+ {
+ SC_MOD()->RegisterRefWindow( static_cast<USHORT>( static_cast<TDerived*>(this)->SLOTID ), this );
+ }
+
+ ~ScRefHdlrImpl()
+ {
+ SC_MOD()->UnregisterRefWindow( static_cast<USHORT>( static_cast<TDerived*>(this)->SLOTID ), this );
+ }
+};
+//============================================================================
+struct ScAnyRefDlg : ::ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog>
+{
+ template<class T1, class T2, class T3, class T4>
+ ScAnyRefDlg( const T1 & rt1, const T2 & rt2, const T3 & rt3, const T4 & rt4 ):ScRefHdlrImpl< ScAnyRefDlg, SfxModelessDialog>(rt1, rt2, rt3, rt4){}
+};
+//============================================================================
+
+inline bool ScRefHandler::CanInputStart( const ScRefEdit *pEdit )
+{
+ return m_aHelper.CanInputStart( pEdit );
+}
+
+inline bool ScRefHandler::CanInputDone( BOOL bForced )
+{
+ return m_aHelper.CanInputDone( bForced );
+}
+
+template <> SC_DLLPUBLIC void ScRefHdlrImplBase<SfxModelessDialog,true>::StateChanged( StateChangedType nStateChange );
+template <> SC_DLLPUBLIC long ScRefHdlrImplBase<SfxModelessDialog,true>::PreNotify( NotifyEvent& rNEvt );
+#include <sfx2/tabdlg.hxx>
+template <> SC_DLLPUBLIC void ScRefHdlrImplBase<SfxTabDialog,false>::StateChanged( StateChangedType nStateChange );
+template <> SC_DLLPUBLIC long ScRefHdlrImplBase<SfxTabDialog,false>::PreNotify( NotifyEvent& rNEvt );
+
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+#endif // SC_ANYREFDG_HXX
+
diff --git a/sc/source/ui/inc/areasave.hxx b/sc/source/ui/inc/areasave.hxx
new file mode 100644
index 000000000000..608f95a3bb51
--- /dev/null
+++ b/sc/source/ui/inc/areasave.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_AREASAVE_HXX
+#define SC_AREASAVE_HXX
+
+#include "collect.hxx"
+#include "global.hxx"
+#include "address.hxx"
+
+class ScDocument;
+class ScAreaLink;
+
+
+class ScAreaLinkSaver : public ScDataObject
+{
+private:
+ String aFileName;
+ String aFilterName;
+ String aOptions;
+ String aSourceArea;
+ ScRange aDestArea;
+ ULONG nRefresh;
+
+public:
+ ScAreaLinkSaver( const ScAreaLink& rSource );
+ ScAreaLinkSaver( const ScAreaLinkSaver& rCopy );
+ virtual ~ScAreaLinkSaver();
+
+ virtual ScDataObject* Clone() const;
+
+ BOOL IsEqual( const ScAreaLink& rCompare ) const;
+ BOOL IsEqualSource( const ScAreaLink& rCompare ) const;
+
+ void WriteToLink( ScAreaLink& rLink ) const;
+ void InsertNewLink( ScDocument* pDoc ) const;
+};
+
+
+class ScAreaLinkSaveCollection : public ScCollection
+{
+public:
+ ScAreaLinkSaveCollection();
+ ScAreaLinkSaveCollection( const ScAreaLinkSaveCollection& rCopy );
+ virtual ~ScAreaLinkSaveCollection();
+
+ virtual ScDataObject* Clone() const;
+
+ ScAreaLinkSaver* operator[](USHORT nIndex) const {return (ScAreaLinkSaver*)At(nIndex);}
+
+ BOOL IsEqual( const ScDocument* pDoc ) const;
+ void Restore( ScDocument* pDoc ) const;
+
+ // returns NULL if empty
+ static ScAreaLinkSaveCollection* CreateFromDoc( const ScDocument* pDoc );
+};
+
+
+#endif
+
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
new file mode 100644
index 000000000000..08c6e3cf0a91
--- /dev/null
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_AREASDLG_HXX
+#define SC_AREASDLG_HXX
+
+#include "address.hxx"
+
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#include <anyrefdg.hxx>
+
+class ScDocument;
+class ScViewData;
+class ScRangeUtil;
+class ScRangeItem;
+
+
+//============================================================================
+
+class ScPrintAreasDlg : public ScAnyRefDlg
+{
+public:
+ ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent );
+ ~ScPrintAreasDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+ virtual void AddRefEntry();
+
+ virtual BOOL IsTableLocked() const;
+
+ virtual void SetActive();
+ virtual void Deactivate();
+ virtual BOOL Close();
+
+private:
+ ListBox aLbPrintArea;
+ FixedLine aFlPrintArea;
+ formula::RefEdit aEdPrintArea;
+ formula::RefButton aRbPrintArea;
+
+ ListBox aLbRepeatRow;
+ FixedLine aFlRepeatRow;
+ formula::RefEdit aEdRepeatRow;
+ formula::RefButton aRbRepeatRow;
+
+ ListBox aLbRepeatCol;
+ FixedLine aFlRepeatCol;
+ formula::RefEdit aEdRepeatCol;
+ formula::RefButton aRbRepeatCol;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ BOOL bDlgLostFocus;
+ formula::RefEdit* pRefInputEdit;
+ ScDocument* pDoc;
+ ScViewData* pViewData;
+ SCTAB nCurTab;
+
+#ifdef _AREASDLG_CXX
+private:
+ void Impl_Reset();
+ BOOL Impl_CheckRefStrings();
+ void Impl_FillLists();
+ BOOL Impl_GetItem( Edit* pEd, SfxStringItem& rItem );
+
+ // Handler:
+ DECL_LINK( Impl_SelectHdl, ListBox* );
+ DECL_LINK( Impl_ModifyHdl, formula::RefEdit* );
+ DECL_LINK( Impl_BtnHdl, PushButton* );
+ DECL_LINK( Impl_GetFocusHdl, Control* );
+#endif
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/asciiopt.hxx b/sc/source/ui/inc/asciiopt.hxx
new file mode 100644
index 000000000000..a5c7a2b554b4
--- /dev/null
+++ b/sc/source/ui/inc/asciiopt.hxx
@@ -0,0 +1,211 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// ============================================================================
+
+#ifndef SC_ASCIIOPT_HXX
+#define SC_ASCIIOPT_HXX
+
+#include <tools/string.hxx>
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+#ifndef _FIELD_HXX //autogen
+#include <vcl/field.hxx>
+#endif
+#include <tools/stream.hxx>
+#include <svx/txencbox.hxx>
+#include "csvtablebox.hxx"
+#include "i18npool/lang.h"
+
+// ============================================================================
+
+class ScAsciiOptions
+{
+private:
+ BOOL bFixedLen;
+ String aFieldSeps;
+ BOOL bMergeFieldSeps;
+ bool bQuotedFieldAsText;
+ bool bDetectSpecialNumber;
+ sal_Unicode cTextSep;
+ CharSet eCharSet;
+ LanguageType eLang;
+ BOOL bCharSetSystem;
+ long nStartRow;
+ USHORT nInfoCount;
+ xub_StrLen* pColStart; //! TODO replace with vector
+ BYTE* pColFormat; //! TODO replace with vector
+
+public:
+ ScAsciiOptions();
+ ScAsciiOptions(const ScAsciiOptions& rOpt);
+ ~ScAsciiOptions();
+
+ static const sal_Unicode cDefaultTextSep = '"';
+
+ ScAsciiOptions& operator=( const ScAsciiOptions& rCpy );
+
+ BOOL operator==( const ScAsciiOptions& rCmp ) const;
+
+ void ReadFromString( const String& rString );
+ String WriteToString() const;
+
+ void InterpretColumnList( const String& rString );
+
+ CharSet GetCharSet() const { return eCharSet; }
+ BOOL GetCharSetSystem() const { return bCharSetSystem; }
+ const String& GetFieldSeps() const { return aFieldSeps; }
+ BOOL IsMergeSeps() const { return bMergeFieldSeps; }
+ bool IsQuotedAsText() const { return bQuotedFieldAsText; }
+ bool IsDetectSpecialNumber() const { return bDetectSpecialNumber; }
+ sal_Unicode GetTextSep() const { return cTextSep; }
+ BOOL IsFixedLen() const { return bFixedLen; }
+ USHORT GetInfoCount() const { return nInfoCount; }
+ const xub_StrLen* GetColStart() const { return pColStart; }
+ const BYTE* GetColFormat() const { return pColFormat; }
+ long GetStartRow() const { return nStartRow; }
+ LanguageType GetLanguage() const { return eLang; }
+
+ void SetCharSet( CharSet eNew ) { eCharSet = eNew; }
+ void SetCharSetSystem( BOOL bSet ) { bCharSetSystem = bSet; }
+ void SetFixedLen( BOOL bSet ) { bFixedLen = bSet; }
+ void SetFieldSeps( const String& rStr ) { aFieldSeps = rStr; }
+ void SetMergeSeps( BOOL bSet ) { bMergeFieldSeps = bSet; }
+ void SetQuotedAsText(bool bSet) { bQuotedFieldAsText = bSet; }
+ void SetDetectSpecialNumber(bool bSet) { bDetectSpecialNumber = bSet; }
+ void SetTextSep( sal_Unicode c ) { cTextSep = c; }
+ void SetStartRow( long nRow) { nStartRow= nRow; }
+ void SetLanguage(LanguageType e) { eLang = e; }
+
+ void SetColInfo( USHORT nCount, const xub_StrLen* pStart, const BYTE* pFormat );
+ void SetColumnInfo( const ScCsvExpDataVec& rDataVec );
+};
+
+
+//CHINA001 // ============================================================================
+//CHINA001
+//CHINA001 class ScImportAsciiDlg : public ModalDialog
+//CHINA001 {
+//CHINA001 SvStream* pDatStream;
+//CHINA001 ULONG* pRowPosArray;
+//CHINA001 ULONG* pRowPosArrayUnicode;
+//CHINA001 USHORT nArrayEndPos;
+//CHINA001 USHORT nArrayEndPosUnicode;
+//CHINA001 ULONG nStreamPos;
+//CHINA001 ULONG nStreamPosUnicode;
+//CHINA001 BOOL bVFlag;
+//CHINA001
+//CHINA001 FixedLine aFlFieldOpt;
+//CHINA001 FixedText aFtCharSet;
+//CHINA001 SvxTextEncodingBox aLbCharSet;
+//CHINA001
+//CHINA001 FixedText aFtRow;
+//CHINA001 NumericField aNfRow;
+//CHINA001
+//CHINA001 FixedLine aFlSepOpt;
+//CHINA001 RadioButton aRbFixed;
+//CHINA001 RadioButton aRbSeparated;
+//CHINA001
+//CHINA001 CheckBox aCkbTab;
+//CHINA001 CheckBox aCkbSemicolon;
+//CHINA001 CheckBox aCkbComma;
+//CHINA001 CheckBox aCkbSpace;
+//CHINA001 CheckBox aCkbOther;
+//CHINA001 Edit aEdOther;
+//CHINA001 CheckBox aCkbAsOnce;
+//CHINA001 FixedText aFtTextSep;
+//CHINA001 ComboBox aCbTextSep;
+//CHINA001
+//CHINA001 FixedLine aFlWidth;
+//CHINA001 FixedText aFtType;
+//CHINA001 ListBox aLbType;
+//CHINA001
+//CHINA001 ScCsvTableBox maTableBox;
+//CHINA001
+//CHINA001 OKButton aBtnOk;
+//CHINA001 CancelButton aBtnCancel;
+//CHINA001 HelpButton aBtnHelp;
+//CHINA001
+//CHINA001 String aCharSetUser;
+//CHINA001 String aColumnUser;
+//CHINA001 String aFldSepList;
+//CHINA001 String aTextSepList;
+//CHINA001
+//CHINA001 // aPreviewLine contains the byte string as read from the file
+//CHINA001 ByteString aPreviewLine[ CSV_PREVIEW_LINES ];
+//CHINA001 // same for Unicode
+//CHINA001 String aPreviewLineUnicode[ CSV_PREVIEW_LINES ];
+//CHINA001
+//CHINA001 CharSet meCharSet; /// Selected char set.
+//CHINA001 bool mbCharSetSystem; /// Is System char set selected?
+//CHINA001
+//CHINA001 public:
+//CHINA001 ScImportAsciiDlg(
+//CHINA001 Window* pParent, String aDatName,
+//CHINA001 SvStream* pInStream, sal_Unicode cSep = '\t' );
+//CHINA001 ~ScImportAsciiDlg();
+//CHINA001
+//CHINA001 void GetOptions( ScAsciiOptions& rOpt );
+//CHINA001
+//CHINA001 private:
+//CHINA001 /** Sets the selected char set data to meCharSet and mbCharSetSystem. */
+//CHINA001 void SetSelectedCharSet();
+//CHINA001 /** Returns all separator characters in a string. */
+//CHINA001 String GetSeparators() const;
+//CHINA001
+//CHINA001 /** Enables or disables all separator checkboxes and edit fields. */
+//CHINA001 void SetupSeparatorCtrls();
+//CHINA001
+//CHINA001 void UpdateVertical( bool bSwitchToFromUnicode = false );
+//CHINA001
+//CHINA001 DECL_LINK( CharSetHdl, SvxTextEncodingBox* );
+//CHINA001 DECL_LINK( FirstRowHdl, NumericField* );
+//CHINA001 DECL_LINK( RbSepFixHdl, RadioButton* );
+//CHINA001 DECL_LINK( SeparatorHdl, Control* );
+//CHINA001 DECL_LINK( LbColTypeHdl, ListBox* );
+//CHINA001 DECL_LINK( UpdateTextHdl, ScCsvTableBox* );
+//CHINA001 DECL_LINK( ColTypeHdl, ScCsvTableBox* );
+//CHINA001 };
+//CHINA001
+//CHINA001
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/attrdlg.hrc b/sc/source/ui/inc/attrdlg.hrc
new file mode 100644
index 000000000000..f43c1cb30b86
--- /dev/null
+++ b/sc/source/ui/inc/attrdlg.hrc
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc" // -> SC_DLG_ATTR
+
+#define TP_NUMBER 1
+#define TP_FONT 2
+#define TP_ALIGNMENT 3
+#define TP_BORDER 4
+#define TP_BACKGROUND 5
+#define TP_PROTECTION 6
+#define TP_FONTEFF 7
+#define TP_ASIAN 8
+
+//================================================
+// Zellschutz-TabPage:
+
+#define BTN_PROTECTED 1
+#define BTN_HIDE_FORMULAR 2
+#define BTN_HIDE_ALL 3
+#define FT_HINT 4
+#define FL_PROTECTION 5
+#define BTN_HIDE_PRINT 6
+#define FT_HINT2 7
+#define FL_PRINT 8
+
+
diff --git a/sc/source/ui/inc/attrdlg.hxx b/sc/source/ui/inc/attrdlg.hxx
new file mode 100644
index 000000000000..752ee01ddd62
--- /dev/null
+++ b/sc/source/ui/inc/attrdlg.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_ATTRDLG_HXX
+#define SC_ATTRDLG_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+class Window;
+class SfxViewFrame;
+class SfxItemSet;
+
+#ifndef LAYOUT_SFX_TABDIALOG_BROKEN
+#define LAYOUT_SFX_TABDIALOG_BROKEN 1
+#endif /* !LAYOUT_SFX_TABDIALOG_BROKEN */
+
+#if !LAYOUT_SFX_TABDIALOG_BROKEN
+#include <sfx2/layout.hxx>
+#include <layout/layout-pre.hxx>
+#endif
+
+//==================================================================
+
+class ScAttrDlg : public SfxTabDialog
+{
+public:
+ ScAttrDlg( SfxViewFrame* pFrame,
+ Window* pParent,
+ const SfxItemSet* pCellAttrs );
+ ~ScAttrDlg();
+
+protected:
+ virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage );
+
+private:
+ DECL_LINK( OkHandler, void* ); // fuer DoppelClick-Beenden in TabPages
+};
+
+#if !LAYOUT_SFX_TABDIALOG_BROKEN
+#include <layout/layout-post.hxx>
+#endif
+
+#endif // SC_ATTRDLG_HXX
+
+
diff --git a/sc/source/ui/inc/auditsh.hxx b/sc/source/ui/inc/auditsh.hxx
new file mode 100644
index 000000000000..75059f4f88cc
--- /dev/null
+++ b/sc/source/ui/inc/auditsh.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_AUDITSH_HXX
+#define SC_AUDITSH_HXX
+
+#include <sfx2/shell.hxx>
+#include <sfx2/module.hxx>
+
+#include "shellids.hxx"
+
+class ScViewData;
+
+class ScAuditingShell : public SfxShell
+{
+private:
+ ScViewData* pViewData;
+ USHORT nFunction;
+
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_AUDITING_SHELL)
+
+ ScAuditingShell(ScViewData* pData);
+ ~ScAuditingShell();
+
+ void Execute(SfxRequest& rReq);
+ void GetState(SfxItemSet& rSet);
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx
new file mode 100644
index 000000000000..52a033c202b2
--- /dev/null
+++ b/sc/source/ui/inc/autofmt.hxx
@@ -0,0 +1,210 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_AUTOFMT_HXX
+#define SC_AUTOFMT_HXX
+
+#ifndef _VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+#ifndef SV_FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#ifndef SV_LSTBOX_HXX
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef SV_MOREBTN_HXX
+#include <vcl/morebtn.hxx>
+#endif
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#include <svtools/scriptedtext.hxx>
+#include <svx/framelinkarray.hxx>
+#include "scdllapi.h"
+
+//------------------------------------------------------------------------
+
+class ScAutoFormat;
+class ScAutoFormatData;
+class SvxBoxItem;
+class SvxLineItem;
+class ScAutoFmtPreview; // s.u.
+class SvNumberFormatter;
+class ScDocument;
+
+//------------------------------------------------------------------------
+
+enum AutoFmtLine { TOP_LINE, BOTTOM_LINE, LEFT_LINE, RIGHT_LINE };
+
+//========================================================================
+
+//CHINA001 class ScAutoFormatDlg : public ModalDialog
+//CHINA001 {
+//CHINA001 public:
+//CHINA001 ScAutoFormatDlg( Window* pParent,
+//CHINA001 ScAutoFormat* pAutoFormat,
+//CHINA001 const ScAutoFormatData* pSelFormatData,
+//CHINA001 ScDocument* pDoc );
+//CHINA001 ~ScAutoFormatDlg();
+//CHINA001
+//CHINA001 USHORT GetIndex() const { return nIndex; }
+//CHINA001 String GetCurrFormatName();
+//CHINA001
+//CHINA001 private:
+//CHINA001 FixedLine aFlFormat;
+//CHINA001 ListBox aLbFormat;
+//CHINA001 ScAutoFmtPreview* pWndPreview;
+//CHINA001 OKButton aBtnOk;
+//CHINA001 CancelButton aBtnCancel;
+//CHINA001 HelpButton aBtnHelp;
+//CHINA001 PushButton aBtnAdd;
+//CHINA001 PushButton aBtnRemove;
+//CHINA001 MoreButton aBtnMore;
+//CHINA001 FixedLine aFlFormatting;
+//CHINA001 CheckBox aBtnNumFormat;
+//CHINA001 CheckBox aBtnBorder;
+//CHINA001 CheckBox aBtnFont;
+//CHINA001 CheckBox aBtnPattern;
+//CHINA001 CheckBox aBtnAlignment;
+//CHINA001 CheckBox aBtnAdjust;
+//CHINA001 PushButton aBtnRename;
+//CHINA001 String aStrTitle;
+//CHINA001 String aStrLabel;
+//CHINA001 String aStrClose;
+//CHINA001 String aStrDelTitle;
+//CHINA001 String aStrDelMsg;
+//CHINA001 String aStrRename;
+//CHINA001
+//CHINA001 //------------------------
+//CHINA001 ScAutoFormat* pFormat;
+//CHINA001 const ScAutoFormatData* pSelFmtData;
+//CHINA001 USHORT nIndex;
+//CHINA001 BOOL bCoreDataChanged;
+//CHINA001 BOOL bFmtInserted;
+//CHINA001
+//CHINA001 void Init ();
+//CHINA001 void UpdateChecks ();
+//CHINA001 //------------------------
+//CHINA001 DECL_LINK( CheckHdl, Button * );
+//CHINA001 DECL_LINK( AddHdl, void * );
+//CHINA001 DECL_LINK( RemoveHdl, void * );
+//CHINA001 DECL_LINK( SelFmtHdl, void * );
+//CHINA001 DECL_LINK( CloseHdl, PushButton * );
+//CHINA001 DECL_LINK( DblClkHdl, void * );
+//CHINA001 DECL_LINK( RenameHdl, void *);
+//CHINA001
+//CHINA001 };
+//CHINA001
+//========================================================================
+
+class SC_DLLPUBLIC ScAutoFmtPreview : public Window
+{
+public:
+ ScAutoFmtPreview( Window* pParent, const ResId& rRes, ScDocument* pDoc );
+ ~ScAutoFmtPreview();
+
+ void NotifyChange( ScAutoFormatData* pNewData );
+
+protected:
+ virtual void Paint( const Rectangle& rRect );
+
+private:
+ ScAutoFormatData* pCurData;
+ VirtualDevice aVD;
+ SvtScriptedTextHelper aScriptedText;
+ ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > xBreakIter;
+ BOOL bFitWidth;
+ svx::frame::Array maArray; /// Implementation to draw the frame borders.
+ bool mbRTL;
+ Size aPrvSize;
+ long mnLabelColWidth;
+ long mnDataColWidth1;
+ long mnDataColWidth2;
+ long mnRowHeight;
+ const String aStrJan;
+ const String aStrFeb;
+ const String aStrMar;
+ const String aStrNorth;
+ const String aStrMid;
+ const String aStrSouth;
+ const String aStrSum;
+ SvNumberFormatter* pNumFmt;
+ //-------------------------------------------
+ SC_DLLPRIVATE void Init ();
+ SC_DLLPRIVATE void DoPaint ( const Rectangle& rRect );
+ SC_DLLPRIVATE void CalcCellArray ( BOOL bFitWidth );
+ SC_DLLPRIVATE void CalcLineMap ();
+ SC_DLLPRIVATE void PaintCells ();
+
+/* Usage of type size_t instead of SCCOL/SCROW is correct here - used in
+ conjunction with class svx::frame::Array (svx/framelinkarray.hxx), which
+ expects size_t coordinates. */
+
+ SC_DLLPRIVATE USHORT GetFormatIndex( size_t nCol, size_t nRow ) const;
+ SC_DLLPRIVATE const SvxBoxItem& GetBoxItem( size_t nCol, size_t nRow ) const;
+ SC_DLLPRIVATE const SvxLineItem& GetDiagItem( size_t nCol, size_t nRow, bool bTLBR ) const;
+
+ SC_DLLPRIVATE void DrawString( size_t nCol, size_t nRow );
+ SC_DLLPRIVATE void DrawStrings();
+ SC_DLLPRIVATE void DrawBackground();
+
+ SC_DLLPRIVATE void MakeFonts ( USHORT nIndex,
+ Font& rFont,
+ Font& rCJKFont,
+ Font& rCTLFont );
+
+ SC_DLLPRIVATE String MakeNumberString( String cellString, BOOL bAddDec );
+ SC_DLLPRIVATE void DrawFrameLine ( const SvxBorderLine& rLineD,
+ Point from,
+ Point to,
+ BOOL bHorizontal,
+ const SvxBorderLine& rLineLT,
+ const SvxBorderLine& rLineL,
+ const SvxBorderLine& rLineLB,
+ const SvxBorderLine& rLineRT,
+ const SvxBorderLine& rLineR,
+ const SvxBorderLine& rLineRB );
+ SC_DLLPRIVATE void CheckPriority ( USHORT nCurLine,
+ AutoFmtLine eLine,
+ SvxBorderLine& rLine );
+ SC_DLLPRIVATE void GetLines ( USHORT nIndex, AutoFmtLine eLine,
+ SvxBorderLine& rLineD,
+ SvxBorderLine& rLineLT,
+ SvxBorderLine& rLineL,
+ SvxBorderLine& rLineLB,
+ SvxBorderLine& rLineRT,
+ SvxBorderLine& rLineR,
+ SvxBorderLine& rLineRB );
+};
+
+#endif // SC_AUTOFMT_HXX
+
+
diff --git a/sc/source/ui/inc/autostyl.hxx b/sc/source/ui/inc/autostyl.hxx
new file mode 100644
index 000000000000..5540ecf87aac
--- /dev/null
+++ b/sc/source/ui/inc/autostyl.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_AUTOSTYL_HXX
+#define SC_AUTOSTYL_HXX
+
+#include <vcl/timer.hxx>
+#include <tools/list.hxx>
+#include <tools/string.hxx>
+
+class ScDocShell;
+class ScRange;
+
+class ScAutoStyleList
+{
+private:
+ ScDocShell* pDocSh;
+ Timer aTimer;
+ Timer aInitTimer;
+ ULONG nTimerStart;
+ List aEntries;
+ List aInitials;
+
+ void ExecuteEntries();
+ void AdjustEntries(ULONG nDiff);
+ void StartTimer(ULONG nNow);
+ DECL_LINK( TimerHdl, Timer* );
+ DECL_LINK( InitHdl, Timer* );
+
+public:
+ ScAutoStyleList(ScDocShell* pShell);
+ ~ScAutoStyleList();
+
+ void AddInitial( const ScRange& rRange, const String& rStyle1,
+ ULONG nTimeout, const String& rStyle2 );
+ void AddEntry( ULONG nTimeout, const ScRange& rRange, const String& rStyle );
+
+ void ExecuteAllNow();
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx
new file mode 100644
index 000000000000..8de5dafe7768
--- /dev/null
+++ b/sc/source/ui/inc/cbutton.hxx
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+//------------------------------------------------------------------
+
+#ifndef SC_CBUTTON_HXX
+#define SC_CBUTTON_HXX
+
+#include <tools/gen.hxx>
+#include <tools/color.hxx>
+
+class OutputDevice;
+
+
+//==================================================================
+
+class ScDDComboBoxButton
+{
+public:
+ ScDDComboBoxButton( OutputDevice* pOutputDevice );
+ ~ScDDComboBoxButton();
+
+ void SetOutputDevice( OutputDevice* pOutputDevice );
+
+ void Draw( const Point& rAt,
+ const Size& rSize,
+ BOOL bState,
+ BOOL bBtnIn = FALSE );
+
+ void Draw( const Point& rAt,
+ BOOL bState,
+ BOOL bBtnIn = FALSE )
+ { Draw( rAt, aBtnSize, bState, bBtnIn ); }
+
+ void Draw( BOOL bState,
+ BOOL bBtnIn = FALSE )
+ { Draw( aBtnPos, aBtnSize, bState, bBtnIn ); }
+
+ void SetOptSizePixel();
+
+ void SetPosPixel( const Point& rNewPos ) { aBtnPos = rNewPos; }
+ Point GetPosPixel() const { return aBtnPos; }
+
+ void SetSizePixel( const Size& rNewSize ) { aBtnSize = rNewSize; }
+ Size GetSizePixel() const { return aBtnSize; }
+
+private:
+ void ImpDrawArrow( const Rectangle& rRect,
+ BOOL bState );
+
+protected:
+ OutputDevice* pOut;
+ Point aBtnPos;
+ Size aBtnSize;
+};
+
+
+#endif // SC_CBUTTON_HXX
+
+
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
new file mode 100644
index 000000000000..563e18d96656
--- /dev/null
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_CELLSH_HXX
+#define SC_CELLSH_HXX
+
+#include <sfx2/shell.hxx>
+#include "shellids.hxx"
+#include <sfx2/module.hxx>
+#include <svx/svdmark.hxx>
+#include <tools/link.hxx>
+#include "formatsh.hxx"
+
+class SvxClipboardFmtItem;
+class TransferableDataHelper;
+class TransferableClipboardListener;
+class AbstractScLinkedAreaDlg;
+class ScTabViewShell;
+
+struct CellShell_Impl
+{
+ TransferableClipboardListener* m_pClipEvtLstnr;
+ AbstractScLinkedAreaDlg* m_pLinkedDlg;
+ SfxRequest* m_pRequest;
+
+ CellShell_Impl() :
+ m_pClipEvtLstnr( NULL ),
+ m_pLinkedDlg( NULL ),
+ m_pRequest( NULL ) {}
+};
+
+class ScCellShell: public ScFormatShell
+{
+private:
+ CellShell_Impl* pImpl;
+ BOOL bPastePossible;
+
+ void GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats );
+ void ExecuteExternalSource(
+ const String& _rFile, const String& _rFilter, const String& _rOptions,
+ const String& _rSource, ULONG _nRefresh, SfxRequest& _rRequest );
+
+ DECL_LINK( ClipboardChanged, TransferableDataHelper* );
+ DECL_LINK( DialogClosed, AbstractScLinkedAreaDlg* );
+
+public:
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_CELL_SHELL)
+
+ ScCellShell(ScViewData* pData);
+ virtual ~ScCellShell();
+
+ void Execute(SfxRequest &);
+ void GetState(SfxItemSet &);
+
+ void ExecuteEdit( SfxRequest& rReq );
+ void ExecuteTrans( SfxRequest& rReq );
+
+ void GetBlockState( SfxItemSet& rSet );
+ void GetCellState( SfxItemSet& rSet );
+
+ void ExecuteDB( SfxRequest& rReq );
+ void GetDBState( SfxItemSet& rSet );
+
+ void ExecImageMap(SfxRequest& rReq); // ImageMap
+ void GetImageMapState(SfxItemSet& rSet);
+
+ void GetClipState( SfxItemSet& rSet );
+ void GetHLinkState( SfxItemSet& rSet );
+
+ void ExecuteCursor( SfxRequest& rReq );
+ void ExecuteCursorSel( SfxRequest& rReq );
+ void ExecutePage( SfxRequest& rReq );
+ void ExecutePageSel( SfxRequest& rReq );
+ void ExecuteMove( SfxRequest& rReq );
+ void GetStateCursor( SfxItemSet& rSet );
+
+ static void PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTabViewShell, bool bShowDialog );
+};
+
+#endif
diff --git a/sc/source/ui/inc/chartsh.hxx b/sc/source/ui/inc/chartsh.hxx
new file mode 100644
index 000000000000..95efd03f3b76
--- /dev/null
+++ b/sc/source/ui/inc/chartsh.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef CHARTSH_HXX
+#define CHARTSH_HXX
+
+#include <sfx2/shell.hxx>
+#include "shellids.hxx"
+#include <sfx2/module.hxx>
+#include <svx/svdmark.hxx>
+
+class ScViewData;
+
+#include "drawsh.hxx"
+
+class ScChartShell: public ScDrawShell
+{
+public:
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_CHART_SHELL)
+
+ ScChartShell(ScViewData* pData);
+ virtual ~ScChartShell();
+
+};
+
+#endif
diff --git a/sc/source/ui/inc/client.hxx b/sc/source/ui/inc/client.hxx
new file mode 100644
index 000000000000..1b13ee224d77
--- /dev/null
+++ b/sc/source/ui/inc/client.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_CLIENT_HXX
+#define SC_CLIENT_HXX
+
+#ifndef _SFX_CLIENTSH_HXX //autogen
+#include <sfx2/ipclient.hxx>
+#endif
+
+class ScDocument;
+class ScTabViewShell;
+class SdrOle2Obj;
+class SdrGrafObj;
+class SdrModel;
+
+class ScClient : public SfxInPlaceClient
+{
+private:
+ SdrModel* pModel;
+ SdrGrafObj* pGrafEdit;
+
+ virtual void ObjectAreaChanged();
+ virtual void RequestNewObjectArea( Rectangle& );
+ virtual void ViewChanged();
+ virtual void MakeVisible();
+
+public:
+ ScClient( ScTabViewShell* pViewShell, Window* pDraw, SdrModel* pSdrModel, SdrOle2Obj* pObj );
+ virtual ~ScClient();
+
+ SdrGrafObj* GetGrafEdit() const { return pGrafEdit; }
+ void SetGrafEdit(SdrGrafObj* pNew) { pGrafEdit = pNew; }
+ SdrOle2Obj* GetDrawObj();
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/colrowba.hxx b/sc/source/ui/inc/colrowba.hxx
new file mode 100644
index 000000000000..587412defea2
--- /dev/null
+++ b/sc/source/ui/inc/colrowba.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_COLROWBAR_HXX
+#define SC_COLROWBAR_HXX
+
+#include "hdrcont.hxx"
+#include "viewdata.hxx"
+
+class ScHeaderFunctionSet;
+class ScHeaderSelectionEngine;
+
+// ---------------------------------------------------------------------------
+
+
+class ScColBar : public ScHeaderControl
+{
+ ScViewData* pViewData;
+ ScHSplitPos eWhich;
+ ScHeaderFunctionSet* pFuncSet;
+ ScHeaderSelectionEngine* pSelEngine;
+
+public:
+ ScColBar( Window* pParent, ScViewData* pData, ScHSplitPos eWhichPos,
+ ScHeaderFunctionSet* pFunc, ScHeaderSelectionEngine* pEng );
+ ~ScColBar();
+
+ virtual SCCOLROW GetPos();
+ virtual USHORT GetEntrySize( SCCOLROW nEntryNo );
+ virtual String GetEntryText( SCCOLROW nEntryNo );
+
+ virtual BOOL IsLayoutRTL(); // only for columns
+
+ virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewSize );
+ virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd );
+
+ virtual void SetMarking( BOOL bSet );
+ virtual void SelectWindow();
+ virtual BOOL IsDisabled();
+ virtual BOOL ResizeAllowed();
+
+ virtual void DrawInvert( long nDragPos );
+
+ virtual String GetDragHelp( long nVal );
+
+ BOOL UseNumericHeader() const;
+};
+
+
+class ScRowBar : public ScHeaderControl
+{
+ ScViewData* pViewData;
+ ScVSplitPos eWhich;
+ ScHeaderFunctionSet* pFuncSet;
+ ScHeaderSelectionEngine* pSelEngine;
+
+public:
+ ScRowBar( Window* pParent, ScViewData* pData, ScVSplitPos eWhichPos,
+ ScHeaderFunctionSet* pFunc, ScHeaderSelectionEngine* pEng );
+ ~ScRowBar();
+
+ virtual SCCOLROW GetPos();
+ virtual USHORT GetEntrySize( SCCOLROW nEntryNo );
+ virtual String GetEntryText( SCCOLROW nEntryNo );
+
+ virtual BOOL IsMirrored(); // only for columns
+ virtual SCROW GetHiddenCount( SCROW nEntryNo ); // only for columns
+
+ virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewSize );
+ virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd );
+
+ virtual void SetMarking( BOOL bSet );
+ virtual void SelectWindow();
+ virtual BOOL IsDisabled();
+ virtual BOOL ResizeAllowed();
+
+ virtual void DrawInvert( long nDragPos );
+
+ virtual String GetDragHelp( long nVal );
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/condfrmt.hrc b/sc/source/ui/inc/condfrmt.hrc
new file mode 100644
index 000000000000..099d82b2fa85
--- /dev/null
+++ b/sc/source/ui/inc/condfrmt.hrc
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc" // ->RID_SCDLG_SOLVER
+
+#define CBX_COND1 1
+#define LB_COND1_1 2
+#define LB_COND1_2 3
+#define EDT_COND1_1 4
+#define RB_COND1_1 5
+#define FT_COND1_AND 6
+#define EDT_COND1_2 7
+#define RB_COND1_2 8
+#define FT_COND1_TEMPLATE 9
+#define LB_COND1_TEMPLATE 10
+
+#define CBX_COND2 11
+#define LB_COND2_1 12
+#define LB_COND2_2 13
+#define EDT_COND2_1 14
+#define RB_COND2_1 15
+#define FT_COND2_AND 16
+#define EDT_COND2_2 17
+#define RB_COND2_2 18
+#define FT_COND2_TEMPLATE 19
+#define LB_COND2_TEMPLATE 20
+
+#define CBX_COND3 21
+#define LB_COND3_1 22
+#define LB_COND3_2 23
+#define EDT_COND3_1 24
+#define RB_COND3_1 25
+#define FT_COND3_AND 26
+#define EDT_COND3_2 27
+#define RB_COND3_2 28
+#define FT_COND3_TEMPLATE 29
+#define LB_COND3_TEMPLATE 30
+
+#define FL_SEP1 41
+#define FL_SEP2 42
+
+#define BTN_OK 31
+#define BTN_CANCEL 32
+#define BTN_HELP 33
+
+#define BTN_COND1_NEW 34
+#define BTN_COND2_NEW 35
+#define BTN_COND3_NEW 36
+
diff --git a/sc/source/ui/inc/condfrmt.hxx b/sc/source/ui/inc/condfrmt.hxx
new file mode 100644
index 000000000000..ecd4c529d57a
--- /dev/null
+++ b/sc/source/ui/inc/condfrmt.hxx
@@ -0,0 +1,155 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef SC_CONDFRMT_HXX_
+#define SC_CONDFRMT_HXX_
+
+#include "anyrefdg.hxx"
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+
+
+class ScDocument;
+class ScConditionalFormat;
+
+
+//============================================================================
+// class ScConditionalFormat
+//
+// Dialog zum Festlegen von bedingten Formaten
+
+class ScConditionalFormatDlg : public ScAnyRefDlg
+{
+public:
+ ScConditionalFormatDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScDocument* pCurDoc,
+ const ScConditionalFormat* pCurrentFormat );
+ ~ScConditionalFormatDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+ virtual void AddRefEntry();
+ virtual BOOL IsRefInputMode() const;
+ virtual void SetActive();
+ virtual BOOL Close();
+
+private:
+ CheckBox aCbxCond1;
+ ListBox aLbCond11;
+ ListBox aLbCond12;
+ formula::RefEdit aEdtCond11;
+ formula::RefButton aRbCond11;
+ FixedText aFtCond1And;
+ formula::RefEdit aEdtCond12;
+ formula::RefButton aRbCond12;
+ FixedText aFtCond1Template;
+ ListBox aLbCond1Template;
+ PushButton aBtnNew1;
+ FixedLine aFlSep1;
+
+ CheckBox aCbxCond2;
+ ListBox aLbCond21;
+ ListBox aLbCond22;
+ formula::RefEdit aEdtCond21;
+ formula::RefButton aRbCond21;
+ FixedText aFtCond2And;
+ formula::RefEdit aEdtCond22;
+ formula::RefButton aRbCond22;
+ FixedText aFtCond2Template;
+ ListBox aLbCond2Template;
+ PushButton aBtnNew2;
+ FixedLine aFlSep2;
+
+ CheckBox aCbxCond3;
+ ListBox aLbCond31;
+ ListBox aLbCond32;
+ formula::RefEdit aEdtCond31;
+ formula::RefButton aRbCond31;
+ FixedText aFtCond3And;
+ formula::RefEdit aEdtCond32;
+ formula::RefButton aRbCond32;
+ FixedText aFtCond3Template;
+ ListBox aLbCond3Template;
+ PushButton aBtnNew3;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ Point aCond1Pos1;
+ Point aCond1Pos2;
+ Point aRBtn1Pos1;
+ Point aRBtn1Pos2;
+ Size aCond1Size1;
+ Size aCond1Size2;
+ Size aCond1Size3;
+
+ Point aCond2Pos1;
+ Point aCond2Pos2;
+ Point aRBtn2Pos1;
+ Point aRBtn2Pos2;
+ Size aCond2Size1;
+ Size aCond2Size2;
+ Size aCond2Size3;
+
+ Point aCond3Pos1;
+ Point aCond3Pos2;
+ Point aRBtn3Pos1;
+ Point aRBtn3Pos2;
+ Size aCond3Size1;
+ Size aCond3Size2;
+ Size aCond3Size3;
+
+ formula::RefEdit* pEdActive;
+ BOOL bDlgLostFocus;
+ ScDocument* pDoc;
+
+#ifdef _CONDFRMT_CXX
+ void GetConditionalFormat( ScConditionalFormat& rCndFmt );
+
+ DECL_LINK( ClickCond1Hdl, void * );
+ DECL_LINK( ChangeCond11Hdl, void * );
+ DECL_LINK( ChangeCond12Hdl, void * );
+
+ DECL_LINK( ClickCond2Hdl, void * );
+ DECL_LINK( ChangeCond21Hdl, void * );
+ DECL_LINK( ChangeCond22Hdl, void * );
+
+ DECL_LINK( ClickCond3Hdl, void * );
+ DECL_LINK( ChangeCond31Hdl, void * );
+ DECL_LINK( ChangeCond32Hdl, void * );
+
+ DECL_LINK( GetFocusHdl, Control* );
+ DECL_LINK( LoseFocusHdl, Control* );
+ DECL_LINK( BtnHdl, PushButton* );
+ DECL_LINK( NewBtnHdl, PushButton* );
+#endif // _CONDFRMT_CXX
+};
+
+#endif // SC_CONDFRMT_HXX_
+
+
diff --git a/sc/source/ui/inc/conflictsdlg.hrc b/sc/source/ui/inc/conflictsdlg.hrc
new file mode 100644
index 000000000000..7935a6ee21d7
--- /dev/null
+++ b/sc/source/ui/inc/conflictsdlg.hrc
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <sc.hrc>
+
+#define FT_CONFLICTS 1
+#define LB_CONFLICTS 2
+#define BTN_KEEPMINE 3
+#define BTN_KEEPOTHER 4
+#define FL_CONFLICTS 5
+#define BTN_KEEPALLMINE 6
+#define BTN_KEEPALLOTHERS 7
+#define BTN_CANCEL 8
+#define BTN_HELP 9
+
+#define STR_TITLE_CONFLICT 1
+#define STR_TITLE_AUTHOR 2
+#define STR_TITLE_DATE 3
+#define STR_UNKNOWN_USER 4
diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx
new file mode 100644
index 000000000000..faeecb370c78
--- /dev/null
+++ b/sc/source/ui/inc/conflictsdlg.hxx
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_CONFLICTSDLG_HXX
+#define SC_CONFLICTSDLG_HXX
+
+#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <svx/ctredlin.hxx>
+
+#include "chgtrack.hxx"
+#include "docsh.hxx"
+
+class ScViewData;
+
+
+//=============================================================================
+
+enum ScConflictAction
+{
+ SC_CONFLICT_ACTION_NONE,
+ SC_CONFLICT_ACTION_KEEP_MINE,
+ SC_CONFLICT_ACTION_KEEP_OTHER
+};
+
+typedef ::std::vector< ULONG > ScChangeActionList;
+
+
+//=============================================================================
+// struct ScConflictsListEntry
+//=============================================================================
+
+struct ScConflictsListEntry
+{
+ ScConflictAction meConflictAction;
+ ScChangeActionList maSharedActions;
+ ScChangeActionList maOwnActions;
+
+ bool HasSharedAction( ULONG nSharedAction ) const;
+ bool HasOwnAction( ULONG nOwnAction ) const;
+};
+
+
+//=============================================================================
+
+typedef ::std::vector< ScConflictsListEntry > ScConflictsList;
+
+
+//=============================================================================
+// class ScConflictsListHelper
+//=============================================================================
+
+class ScConflictsListHelper
+{
+private:
+ static void Transform_Impl( ScChangeActionList& rActionList, ScChangeActionMergeMap* pMergeMap );
+
+public:
+//UNUSED2008-05 static bool HasSharedAction( ScConflictsList& rConflictsList, ULONG nSharedAction );
+ static bool HasOwnAction( ScConflictsList& rConflictsList, ULONG nOwnAction );
+
+ static ScConflictsListEntry* GetSharedActionEntry( ScConflictsList& rConflictsList, ULONG nSharedAction );
+ static ScConflictsListEntry* GetOwnActionEntry( ScConflictsList& rConflictsList, ULONG nOwnAction );
+
+ static void TransformConflictsList( ScConflictsList& rConflictsList,
+ ScChangeActionMergeMap* pSharedMap, ScChangeActionMergeMap* pOwnMap );
+};
+
+
+//=============================================================================
+// class ScConflictsFinder
+//=============================================================================
+
+class ScConflictsFinder
+{
+private:
+ ScChangeTrack* mpTrack;
+ ULONG mnStartShared;
+ ULONG mnEndShared;
+ ULONG mnStartOwn;
+ ULONG mnEndOwn;
+ ScConflictsList& mrConflictsList;
+
+ static bool DoActionsIntersect( const ScChangeAction* pAction1, const ScChangeAction* pAction2 );
+ ScConflictsListEntry* GetIntersectingEntry( const ScChangeAction* pAction ) const;
+ ScConflictsListEntry* GetEntry( ULONG nSharedAction, const ScChangeActionList& rOwnActions );
+
+public:
+ ScConflictsFinder( ScChangeTrack* pTrack, ULONG nStartShared, ULONG nEndShared,
+ ULONG nStartOwn, ULONG nEndOwn, ScConflictsList& rConflictsList );
+ virtual ~ScConflictsFinder();
+
+ bool Find();
+};
+
+
+//=============================================================================
+// class ScConflictsResolver
+//=============================================================================
+
+class ScConflictsResolver
+{
+private:
+ ScChangeTrack* mpTrack;
+ ScConflictsList& mrConflictsList;
+
+public:
+ ScConflictsResolver( ScChangeTrack* pTrack, ScConflictsList& rConflictsList );
+ virtual ~ScConflictsResolver();
+
+ void HandleAction( ScChangeAction* pAction, bool bIsSharedAction,
+ bool bHandleContentAction, bool bHandleNonContentAction );
+};
+
+
+//=============================================================================
+// class ScConflictsListBox
+//=============================================================================
+
+class ScConflictsListBox: public SvxRedlinTable
+{
+private:
+
+public:
+//UNUSED2008-05 ScConflictsListBox( Window* pParent, WinBits nBits = WB_BORDER );
+ ScConflictsListBox( Window* pParent, const ResId& rResId );
+ ~ScConflictsListBox();
+
+//UNUSED2008-05 ULONG GetRootEntryPos( const SvLBoxEntry* pRootEntry ) const;
+};
+
+//=============================================================================
+// class ScConflictsDlg
+//=============================================================================
+
+class ScConflictsDlg : public ModalDialog
+{
+private:
+ FixedText maFtConflicts;
+ ScConflictsListBox maLbConflicts;
+ PushButton maBtnKeepMine;
+ PushButton maBtnKeepOther;
+ FixedLine maFlConflicts;
+ PushButton maBtnKeepAllMine;
+ PushButton maBtnKeepAllOthers;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+
+ String maStrTitleConflict;
+ String maStrTitleAuthor;
+ String maStrTitleDate;
+ String maStrUnknownUser;
+
+ ScViewData* mpViewData;
+ ScDocument* mpOwnDoc;
+ ScChangeTrack* mpOwnTrack;
+ ScDocument* mpSharedDoc;
+ ScChangeTrack* mpSharedTrack;
+ ScConflictsList& mrConflictsList;
+ Size maDialogSize;
+
+ Timer maSelectionTimer;
+ bool mbInSelectHdl;
+ bool mbInDeselectHdl;
+
+ String GetConflictString( const ScConflictsListEntry& rConflictEntry );
+ String GetActionString( const ScChangeAction* pAction, ScDocument* pDoc );
+ void HandleListBoxSelection( bool bSelectHandle );
+
+ void SetConflictAction( SvLBoxEntry* pRootEntry, ScConflictAction eConflictAction );
+ void KeepHandler( bool bMine );
+ void KeepAllHandler( bool bMine );
+
+ DECL_LINK( SelectHandle, SvxRedlinTable* );
+ DECL_LINK( DeselectHandle, SvxRedlinTable* );
+ DECL_LINK( UpdateSelectionHdl, Timer* );
+ DECL_LINK( KeepMineHandle, void* );
+ DECL_LINK( KeepOtherHandle, void* );
+ DECL_LINK( KeepAllMineHandle, void* );
+ DECL_LINK( KeepAllOthersHandle, void* );
+
+public:
+ ScConflictsDlg( Window* pParent, ScViewData* pViewData, ScDocument* pSharedDoc, ScConflictsList& rConflictsList );
+ ~ScConflictsDlg();
+
+ virtual void Resize();
+ void UpdateView();
+};
+
+#endif
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
new file mode 100644
index 000000000000..e82e2619cce0
--- /dev/null
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_CONSDLG_HXX
+#define SC_CONSDLG_HXX
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _MOREBTN_HXX //autogen
+#include <vcl/morebtn.hxx>
+#endif
+#include "global.hxx"
+#include "anyrefdg.hxx"
+
+class ScViewData;
+class ScDocument;
+class ScRangeUtil;
+class ScAreaData;
+
+
+//============================================================================
+
+class ScConsolidateDlg : public ScAnyRefDlg
+{
+public:
+ ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ const SfxItemSet& rArgSet );
+ ~ScConsolidateDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+
+ virtual BOOL IsRefInputMode() const { return TRUE; }
+ virtual void SetActive();
+
+ virtual BOOL Close();
+
+protected:
+ virtual void Deactivate();
+
+private:
+ FixedText aFtFunc;
+ ListBox aLbFunc;
+
+ FixedText aFtConsAreas;
+ MultiListBox aLbConsAreas;
+
+ ListBox aLbDataArea;
+ FixedText aFtDataArea;
+ formula::RefEdit aEdDataArea;
+ formula::RefButton aRbDataArea;
+
+ ListBox aLbDestArea;
+ FixedText aFtDestArea;
+ formula::RefEdit aEdDestArea;
+ formula::RefButton aRbDestArea;
+
+ FixedLine aFlConsBy;
+ CheckBox aBtnByRow;
+ CheckBox aBtnByCol;
+
+ FixedLine aFlSep;
+ FixedLine aFlOptions;
+ CheckBox aBtnRefs;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ PushButton aBtnAdd;
+ PushButton aBtnRemove;
+ MoreButton aBtnMore;
+
+ String aStrUndefined;
+
+ ScConsolidateParam theConsData;
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ ScRangeUtil* pRangeUtil;
+ ScAreaData* pAreaData;
+ USHORT nAreaDataCount;
+ USHORT nWhichCons;
+
+ formula::RefEdit* pRefInputEdit;
+ BOOL bDlgLostFocus;
+
+#ifdef _CONSDLG_CXX
+private:
+ void Init ();
+ void FillAreaLists ();
+ BOOL VerifyEdit ( formula::RefEdit* pEd );
+
+ DECL_LINK( OkHdl, void* );
+ DECL_LINK( ClickHdl, PushButton* );
+ DECL_LINK( GetFocusHdl, Control* );
+ DECL_LINK( ModifyHdl, formula::RefEdit* );
+ DECL_LINK( SelectHdl, ListBox* );
+
+ ScSubTotalFunc LbPosToFunc( USHORT nPos );
+ USHORT FuncToLbPos( ScSubTotalFunc eFunc );
+#endif // _CONSDLG_CXX
+};
+
+
+
+#endif // SC_CONSDLG_HXX
+
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
new file mode 100644
index 000000000000..b7d4d292c406
--- /dev/null
+++ b/sc/source/ui/inc/content.hxx
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_CONTENT_HXX
+#define SC_CONTENT_HXX
+
+#include <svtools/svtreebx.hxx>
+#include "global.hxx"
+#include "address.hxx"
+#include <tools/solar.h>
+
+class ScNavigatorDlg;
+class ScNavigatorSettings;
+class ScDocument;
+class ScDocShell;
+class ScAreaLink;
+
+#define SC_CONTENT_ROOT 0
+#define SC_CONTENT_TABLE 1
+#define SC_CONTENT_RANGENAME 2
+#define SC_CONTENT_DBAREA 3
+#define SC_CONTENT_GRAPHIC 4
+#define SC_CONTENT_OLEOBJECT 5
+#define SC_CONTENT_NOTE 6
+#define SC_CONTENT_AREALINK 7
+#define SC_CONTENT_DRAWING 8
+#define SC_CONTENT_COUNT 9
+
+const ULONG SC_CONTENT_NOCHILD = ~0UL;
+
+//
+// TreeListBox fuer Inhalte
+//
+
+class ScContentTree : public SvTreeListBox
+{
+ ScNavigatorDlg* pParentWindow;
+ ImageList aEntryImages;
+ ImageList aHCEntryImages;
+ SvLBoxEntry* pRootNodes[SC_CONTENT_COUNT];
+ USHORT nRootType; // als Root eingestellt
+ String aManualDoc; // im Navigator umgeschaltet (Title)
+ BOOL bHiddenDoc; // verstecktes aktiv?
+ String aHiddenName; // URL zum Laden
+ String aHiddenTitle; // fuer Anzeige
+ ScDocument* pHiddenDocument; // temporaer
+
+ USHORT pPosList[SC_CONTENT_COUNT]; // fuer die Reihenfolge
+
+ static BOOL bIsInDrag; // static, falls der Navigator im ExecuteDrag geloescht wird
+
+ ScDocShell* GetManualOrCurrent();
+
+ void InitRoot(USHORT nType);
+ void ClearType(USHORT nType);
+ void ClearAll();
+ void InsertContent( USHORT nType, const String& rValue );
+ void GetDrawNames( USHORT nType );
+
+ void GetTableNames();
+ void GetAreaNames();
+ void GetDbNames();
+ void GetLinkNames();
+ void GetGraphicNames();
+ void GetOleNames();
+ void GetDrawingNames();
+ void GetNoteStrings();
+
+ static bool IsPartOfType( USHORT nContentType, USHORT nObjIdentifier );
+
+ BOOL DrawNamesChanged( USHORT nType );
+ BOOL NoteStringsChanged();
+
+ ScAddress GetNotePos( ULONG nIndex );
+ const ScAreaLink* GetLink( ULONG nIndex );
+
+ /** Returns the indexes of the specified listbox entry.
+ @param rnRootIndex Root index of specified entry is returned.
+ @param rnChildIndex Index of the entry inside its root is returned (or SC_CONTENT_NOCHILD if entry is root).
+ @param pEntry The entry to examine. */
+ void GetEntryIndexes( USHORT& rnRootIndex, ULONG& rnChildIndex, SvLBoxEntry* pEntry ) const;
+
+ /** Returns the child index of the specified listbox entry.
+ @param pEntry The entry to examine or NULL for the selected entry.
+ @return Index of the entry inside its root or SC_CONTENT_NOCHILD if entry is root. */
+ ULONG GetChildIndex( SvLBoxEntry* pEntry ) const;
+
+ void DoDrag();
+//UNUSED2008-05 void AdjustTitle();
+
+ ScDocument* GetSourceDocument();
+
+ DECL_LINK( ContentDoubleClickHdl, ScContentTree* );
+ DECL_STATIC_LINK( ScContentTree, ExecDragHdl, void* );
+
+protected:
+// virtual BOOL Drop( const DropEvent& rEvt );
+// virtual BOOL QueryDrop( DropEvent& rEvt );
+
+ using SvTreeListBox::ExecuteDrop;
+
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+ virtual void DragFinished( sal_Int8 nAction );
+
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+
+public:
+ ScContentTree( Window* pParent, const ResId& rResId );
+ ~ScContentTree();
+
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void KeyInput( const KeyEvent& rKEvt );
+
+ void InitWindowBits( BOOL bButtons );
+
+ void Refresh( USHORT nType = 0 );
+
+ void ToggleRoot();
+ void SetRootType( USHORT nNew );
+ USHORT GetRootType() const { return nRootType; }
+
+ void ActiveDocChanged();
+ void ResetManualDoc();
+ void SetManualDoc(const String& rName);
+ BOOL LoadFile(const String& rUrl);
+ void SelectDoc(const String& rName);
+
+ const String& GetHiddenTitle() const { return aHiddenTitle; }
+
+ /** Applies the navigator settings to the listbox. */
+ void ApplySettings();
+ /** Stores the current listbox state in the navigator settings. */
+ void StoreSettings() const;
+
+ static BOOL IsInDrag() { return bIsInDrag; }
+};
+
+
+
+
+#endif // SC_NAVIPI_HXX
+
diff --git a/sc/source/ui/inc/corodlg.hxx b/sc/source/ui/inc/corodlg.hxx
new file mode 100644
index 000000000000..424326565619
--- /dev/null
+++ b/sc/source/ui/inc/corodlg.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_CORODLG_HXX
+#define SC_CORODLG_HXX
+
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+
+#include "sc.hrc"
+#include "scresid.hxx"
+
+//------------------------------------------------------------------------
+
+class ScColRowLabelDlg : public ModalDialog
+{
+public:
+ ScColRowLabelDlg( Window* pParent,
+ BOOL bCol = FALSE,
+ BOOL bRow = FALSE )
+ : ModalDialog( pParent, ScResId( RID_SCDLG_CHARTCOLROW ) ),
+ aFlColRow ( this, ScResId(6) ),
+ aBtnRow ( this, ScResId(2) ),
+ aBtnCol ( this, ScResId(1) ),
+ aBtnOk ( this, ScResId(3) ),
+ aBtnCancel ( this, ScResId(4) ),
+ aBtnHelp ( this, ScResId(5) )
+ {
+ FreeResource();
+ aBtnCol.Check( bCol );
+ aBtnRow.Check( bRow );
+ }
+
+ BOOL IsCol() { return aBtnCol.IsChecked(); }
+ BOOL IsRow() { return aBtnRow.IsChecked(); }
+
+private:
+ FixedLine aFlColRow;
+ CheckBox aBtnRow;
+ CheckBox aBtnCol;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+};
+
+
+#endif
+
+
+
diff --git a/sc/source/ui/inc/crdlg.hxx b/sc/source/ui/inc/crdlg.hxx
new file mode 100644
index 000000000000..20dd79f359ad
--- /dev/null
+++ b/sc/source/ui/inc/crdlg.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_CRDLG_HXX
+#define SC_CRDLG_HXX
+
+
+#include <vcl/dialog.hxx>
+#include <vcl/imagebtn.hxx>
+#include <vcl/fixed.hxx>
+#include "scui_def.hxx" //CHINA001
+
+//CHINA001 #define SCRET_COLS 0x42
+//CHINA001 #define SCRET_ROWS 0x43
+
+//------------------------------------------------------------------------
+
+class ScColOrRowDlg : public ModalDialog
+{
+public:
+ ScColOrRowDlg( Window* pParent,
+ const String& rStrTitle,
+ const String& rStrLabel,
+ BOOL bColDefault = TRUE );
+ ~ScColOrRowDlg();
+
+private:
+ FixedLine aFlFrame;
+ RadioButton aBtnRows;
+ RadioButton aBtnCols;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ DECL_LINK( OkHdl, OKButton * );
+};
+
+
+#endif
+
+
+
diff --git a/sc/source/ui/inc/crnrdlg.hrc b/sc/source/ui/inc/crnrdlg.hrc
new file mode 100644
index 000000000000..1d27531f9bc1
--- /dev/null
+++ b/sc/source/ui/inc/crnrdlg.hrc
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc" // -> RID_SCDLG_COLROWNAMERANGES
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_ADD 3
+#define BTN_REMOVE 4
+#define BTN_HELP 5
+//
+#define LB_RANGE 11
+//
+#define FL_ASSIGN 12
+#define ED_AREA 13
+#define RB_AREA 14
+#define BTN_COLHEAD 15
+#define BTN_ROWHEAD 16
+#define ED_DATA 17
+#define RB_DATA 18
+#define FT_DATA_LABEL 19
+//
diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx
new file mode 100644
index 000000000000..e45ff4403633
--- /dev/null
+++ b/sc/source/ui/inc/crnrdlg.hxx
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_CRNRDLG_HXX
+#define SC_CRNRDLG_HXX
+
+#include "anyrefdg.hxx"
+#include "rangelst.hxx"
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+
+#include <hash_map>
+
+class ScViewData;
+class ScDocument;
+
+
+//============================================================================
+
+class ScColRowNameRangesDlg : public ScAnyRefDlg
+{
+public:
+ ScColRowNameRangesDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScViewData* ptrViewData );
+ ~ScColRowNameRangesDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+
+ virtual BOOL IsRefInputMode() const;
+ virtual void SetActive();
+ virtual BOOL Close();
+
+private:
+ FixedLine aFlAssign;
+ ListBox aLbRange;
+
+ formula::RefEdit aEdAssign;
+ formula::RefButton aRbAssign;
+ RadioButton aBtnColHead;
+ RadioButton aBtnRowHead;
+ FixedText aFtAssign2;
+ formula::RefEdit aEdAssign2;
+ formula::RefButton aRbAssign2;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ PushButton aBtnAdd;
+ PushButton aBtnRemove;
+
+ ScRange theCurArea;
+ ScRange theCurData;
+
+ ScRangePairListRef xColNameRanges;
+ ScRangePairListRef xRowNameRanges;
+
+ typedef ::std::hash_map< String, ScRange, ScStringHashCode, ::std::equal_to<String> > NameRangeMap;
+ NameRangeMap aRangeMap;
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ formula::RefEdit* pEdActive;
+ BOOL bDlgLostFocus;
+
+#ifdef _CRNRDLG_CXX
+private:
+ void Init ();
+ void UpdateNames ();
+ void UpdateRangeData ( const ScRange& rRange, BOOL bColName );
+ void SetColRowData( const ScRange& rLabelRange,BOOL bRef=FALSE);
+ void AdjustColRowData( const ScRange& rDataRange,BOOL bRef=FALSE);
+ DECL_LINK( CancelBtnHdl, void * );
+ DECL_LINK( OkBtnHdl, void * );
+ DECL_LINK( AddBtnHdl, void * );
+ DECL_LINK( RemoveBtnHdl, void * );
+ DECL_LINK( Range1SelectHdl, void * );
+ DECL_LINK( Range1DataModifyHdl, void * );
+ DECL_LINK( ColClickHdl, void * );
+ DECL_LINK( RowClickHdl, void * );
+ DECL_LINK( Range2DataModifyHdl, void * );
+ DECL_LINK( GetFocusHdl, Control* );
+ DECL_LINK( LoseFocusHdl, Control* );
+#endif
+};
+
+
+
+#endif // SC_CRNRDLG_HXX
+
diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx
new file mode 100644
index 000000000000..c38abfb83598
--- /dev/null
+++ b/sc/source/ui/inc/csvcontrol.hxx
@@ -0,0 +1,432 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// ============================================================================
+
+#ifndef _SC_CSVCONTROL_HXX
+#define _SC_CSVCONTROL_HXX
+
+#include <vcl/ctrl.hxx>
+#include "scdllapi.h"
+#include "global.hxx"
+#include "address.hxx"
+#include "csvsplits.hxx"
+#include <com/sun/star/uno/Reference.hxx>
+
+
+class ScAccessibleCsvControl;
+namespace com { namespace sun { namespace star { namespace accessibility {
+ class XAccessible;
+} } } }
+
+
+// ============================================================================
+
+/** Minimum character count for a column in separators mode. */
+const sal_Int32 CSV_MINCOLWIDTH = 8;
+/** Maximum length of a cell string. */
+const xub_StrLen CSV_MAXSTRLEN = 0x7FFF;
+/** Transparency for header color of selected columns. */
+const sal_uInt16 CSV_HDR_TRANSPARENCY = 85;
+/** Minimum distance to border for auto scroll. */
+const sal_Int32 CSV_SCROLL_DIST = 3;
+
+//! TODO make string array dynamic
+const sal_Int32 CSV_PREVIEW_LINES = 32; // maximum count of preview lines
+/** Maximum count of columns. */
+const sal_Int32 CSV_MAXCOLCOUNT = MAXCOLCOUNT;
+
+/** Default column data type. */
+const sal_Int32 CSV_TYPE_DEFAULT = 0;
+/** Multi selection with different types. */
+const sal_Int32 CSV_TYPE_MULTI = -1;
+/** No column selected. */
+const sal_Int32 CSV_TYPE_NOSELECTION = -2;
+
+// External used column types.
+const sal_uInt8 SC_COL_STANDARD = 1;
+const sal_uInt8 SC_COL_TEXT = 2;
+const sal_uInt8 SC_COL_MDY = 3;
+const sal_uInt8 SC_COL_DMY = 4;
+const sal_uInt8 SC_COL_YMD = 5;
+const sal_uInt8 SC_COL_SKIP = 9;
+const sal_uInt8 SC_COL_ENGLISH = 10;
+
+
+// ============================================================================
+
+/** Exported data of a column (data used in the dialog). */
+struct ScCsvExpData
+{
+ xub_StrLen mnIndex; /// Index of a column.
+ sal_uInt8 mnType; /// External type of the column.
+
+ inline ScCsvExpData() : mnIndex( 0 ), mnType( SC_COL_STANDARD ) {}
+ inline ScCsvExpData( xub_StrLen nIndex, sal_uInt8 nType ) :
+ mnIndex( nIndex ), mnType( nType ) {}
+};
+
+typedef ::std::vector< ScCsvExpData > ScCsvExpDataVec;
+
+
+// ============================================================================
+
+/** Specifies which element should be used to perform an action. */
+enum ScMoveMode
+{
+ MOVE_NONE, /// No action.
+ MOVE_FIRST, /// First element in current context.
+ MOVE_LAST, /// Last element in current context.
+ MOVE_PREV, /// Predecessor of current element in current context.
+ MOVE_NEXT, /// Successor of current element in current context.
+ MOVE_PREVPAGE, /// Previous page relative to current context.
+ MOVE_NEXTPAGE /// Next page relative to current context.
+};
+
+
+// ============================================================================
+
+/** Flags for comparison of old and new control layout data. */
+typedef sal_uInt32 ScCsvDiff;
+
+const ScCsvDiff CSV_DIFF_EQUAL = 0x00000000;
+const ScCsvDiff CSV_DIFF_POSCOUNT = 0x00000001;
+const ScCsvDiff CSV_DIFF_POSOFFSET = 0x00000002;
+const ScCsvDiff CSV_DIFF_HDRWIDTH = 0x00000004;
+const ScCsvDiff CSV_DIFF_CHARWIDTH = 0x00000008;
+const ScCsvDiff CSV_DIFF_LINECOUNT = 0x00000010;
+const ScCsvDiff CSV_DIFF_LINEOFFSET = 0x00000020;
+const ScCsvDiff CSV_DIFF_HDRHEIGHT = 0x00000040;
+const ScCsvDiff CSV_DIFF_LINEHEIGHT = 0x00000080;
+const ScCsvDiff CSV_DIFF_RULERCURSOR = 0x00000100;
+const ScCsvDiff CSV_DIFF_GRIDCURSOR = 0x00000200;
+
+const ScCsvDiff CSV_DIFF_HORIZONTAL = CSV_DIFF_POSCOUNT | CSV_DIFF_POSOFFSET | CSV_DIFF_HDRWIDTH | CSV_DIFF_CHARWIDTH;
+const ScCsvDiff CSV_DIFF_VERTICAL = CSV_DIFF_LINECOUNT | CSV_DIFF_LINEOFFSET | CSV_DIFF_HDRHEIGHT | CSV_DIFF_LINEHEIGHT;
+const ScCsvDiff CSV_DIFF_CURSOR = CSV_DIFF_RULERCURSOR | CSV_DIFF_GRIDCURSOR;
+
+
+// ----------------------------------------------------------------------------
+
+/** A structure containing all layout data valid for both ruler and data grid
+ (i.e. scroll position or column width). */
+struct ScCsvLayoutData
+{
+ // horizontal settings
+ sal_Int32 mnPosCount; /// Number of positions.
+ sal_Int32 mnPosOffset; /// Horizontal scroll offset.
+
+ sal_Int32 mnWinWidth; /// Width of ruler and data grid.
+ sal_Int32 mnHdrWidth; /// Width of the header column.
+ sal_Int32 mnCharWidth; /// Pixel width of one character.
+
+ // vertical settings
+ sal_Int32 mnLineCount; /// Number of data lines.
+ sal_Int32 mnLineOffset; /// Index of first visible line (0-based).
+
+ sal_Int32 mnWinHeight; /// Height of entire data grid (incl. header).
+ sal_Int32 mnHdrHeight; /// Height of the header line.
+ sal_Int32 mnLineHeight; /// Height of a data line.
+
+ // cursor settings
+ sal_Int32 mnPosCursor; /// Position of ruler cursor.
+ sal_Int32 mnColCursor; /// Position of grid column cursor.
+
+ mutable sal_Int32 mnNoRepaint; /// >0 = no repaint.
+ bool mbAppRTL; /// true = application in RTL mode.
+
+ explicit ScCsvLayoutData();
+
+ /** Returns differences to rData.
+ @descr For each difference the appropriate bit is set in the returned value. */
+ ScCsvDiff GetDiff( const ScCsvLayoutData& rData ) const;
+};
+
+inline bool operator==( const ScCsvLayoutData& rData1, const ScCsvLayoutData& rData2 )
+{
+ return rData1.GetDiff( rData2 ) == CSV_DIFF_EQUAL;
+}
+
+inline bool operator!=( const ScCsvLayoutData& rData1, const ScCsvLayoutData& rData2 )
+{
+ return !(rData1 == rData2);
+}
+
+
+// ============================================================================
+
+/** Enumeration of possible commands to change any settings of the CSV controls.
+ @descr Controls have to send commands instead of changing their settings directly.
+ This helps to keep the different controls consistent to each other.
+ A command can contain 0 to 2 sal_Int32 parameters. In the description of each
+ command the required parameters are swown in brackets. [-] means no parameter. */
+enum ScCsvCmdType
+{
+ // misc
+ CSVCMD_NONE, /// No command. [-]
+ CSVCMD_REPAINT, /// Repaint all controls. [-]
+
+ // modify horizontal dimensions
+ CSVCMD_SETPOSCOUNT, /// Change position/column count. [character count]
+ CSVCMD_SETPOSOFFSET, /// Change position offset (scroll pos). [position]
+ CSVCMD_SETHDRWIDTH, /// Change width of the header column. [width in pixel]
+ CSVCMD_SETCHARWIDTH, /// Change character pixel width. [width in pixel]
+
+ // modify vertical dimensions
+ CSVCMD_SETLINECOUNT, /// Change number of data lines. [line count]
+ CSVCMD_SETLINEOFFSET, /// Change first visible line. [line index]
+ CSVCMD_SETHDRHEIGHT, /// Change height of top header line. [height in pixel]
+ CSVCMD_SETLINEHEIGHT, /// Change data line pixel height. [height in pixel}
+
+ // cursors/positions
+ CSVCMD_MOVERULERCURSOR, /// Move ruler cursor to new position. [position]
+ CSVCMD_MOVEGRIDCURSOR, /// Move data grid cursor to new column. [position]
+ CSVCMD_MAKEPOSVISIBLE, /// Move to make passed position visible (for mouse tracking). [position]
+
+ // table contents
+ CSVCMD_NEWCELLTEXTS, /// Recalculate splits and cell texts. [-]
+ CSVCMD_UPDATECELLTEXTS, /// Update cell texts with current split settings. [-]
+ CSVCMD_SETCOLUMNTYPE, /// Change data type of selected columns. [column type]
+ CSVCMD_EXPORTCOLUMNTYPE, /// Send selected column type to external controls. [-]
+ CSVCMD_SETFIRSTIMPORTLINE, /// Set number of first imported line. [line index]
+
+ // splits
+ CSVCMD_INSERTSPLIT, /// Insert a split. [position]
+ CSVCMD_REMOVESPLIT, /// Remove a split. [position]
+ CSVCMD_TOGGLESPLIT, /// Inserts or removes a split. [position]
+ CSVCMD_MOVESPLIT, /// Move a split. [old position, new position]
+ CSVCMD_REMOVEALLSPLITS /// Remove all splits. [-]
+};
+
+
+// ----------------------------------------------------------------------------
+
+/** Data for a CSV control command. The stored position data is aways character based,
+ it's never a column index (required for internal consistency). */
+class ScCsvCmd
+{
+private:
+ ScCsvCmdType meType; /// The command.
+ sal_Int32 mnParam1; /// First parameter.
+ sal_Int32 mnParam2; /// Second parameter.
+
+public:
+ inline explicit ScCsvCmd() : meType( CSVCMD_NONE ),
+ mnParam1( CSV_POS_INVALID ), mnParam2( CSV_POS_INVALID ) {}
+
+ inline void Set( ScCsvCmdType eType, sal_Int32 nParam1, sal_Int32 nParam2 );
+
+ inline ScCsvCmdType GetType() const { return meType; }
+ inline sal_Int32 GetParam1() const { return mnParam1; }
+ inline sal_Int32 GetParam2() const { return mnParam2; }
+};
+
+inline void ScCsvCmd::Set( ScCsvCmdType eType, sal_Int32 nParam1, sal_Int32 nParam2 )
+{
+ meType = eType; mnParam1 = nParam1; mnParam2 = nParam2;
+}
+
+
+// ============================================================================
+
+/** Base class for the CSV ruler and the data grid control. Implements command handling. */
+class SC_DLLPUBLIC ScCsvControl : public Control
+{
+protected:
+ typedef ::std::vector< String > StringVec;
+ typedef ::std::vector< StringVec > StringVecVec;
+
+ typedef ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > XAccessibleRef;
+
+private:
+ Link maCmdHdl; /// External command handler.
+ ScCsvCmd maCmd; /// Data of last command.
+ const ScCsvLayoutData& mrData; /// Shared layout data.
+
+ XAccessibleRef mxAccessible; /// The accessible object of the control.
+ ScAccessibleCsvControl* mpAccessible; /// Pointer to the accessible implementation object.
+ bool mbValidGfx; /// Content of virtual devices valid?
+
+ // ------------------------------------------------------------------------
+public:
+ explicit ScCsvControl( ScCsvControl& rParent );
+ explicit ScCsvControl( Window* pParent, const ScCsvLayoutData& rData, WinBits nStyle = 0 );
+ explicit ScCsvControl( Window* pParent, const ScCsvLayoutData& rData, const ResId& rResId );
+ virtual ~ScCsvControl();
+
+ // event handling ---------------------------------------------------------
+
+ virtual void GetFocus();
+ virtual void LoseFocus();
+
+ /** Sends a GetFocus or LoseFocus event to the accessibility object. */
+ void AccSendFocusEvent( bool bFocused );
+ /** Sends a caret changed event to the accessibility object. */
+ void AccSendCaretEvent();
+ /** Sends a visible area changed event to the accessibility object. */
+ void AccSendVisibleEvent();
+ /** Sends a selection changed event to the accessibility object. */
+ void AccSendSelectionEvent();
+ /** Sends a table model changed event for changed cell contents to the accessibility object. */
+ void AccSendTableUpdateEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn, bool bAllRows = true );
+ /** Sends a table model changed event for an inserted column to the accessibility object. */
+ void AccSendInsertColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn );
+ /** Sends a table model changed event for a removed column to the accessibility object. */
+ void AccSendRemoveColumnEvent( sal_uInt32 nFirstColumn, sal_uInt32 nLastColumn );
+
+ // repaint helpers --------------------------------------------------------
+
+ /** Sets the graphic invalid (next Redraw() will not use cached graphic). */
+ inline void InvalidateGfx() { mbValidGfx = false; }
+ /** Sets the graphic valid (next Redraw() will use cached graphic). */
+ inline void ValidateGfx() { mbValidGfx = true; }
+ /** Returns true, if cached graphic is valid. */
+ inline bool IsValidGfx() const { return mbValidGfx; }
+
+ /** Repaints all controls.
+ @param bInvalidate true = invalidates graphics of this control (not all). */
+ void Repaint( bool bInvalidate = false );
+ /** Increases no-repaint counter (controls do not repaint until the last EnableRepaint()). */
+ void DisableRepaint();
+ /** Decreases no-repaint counter and repaints if counter reaches 0.
+ @param bInvalidate true = invalidates graphics of this control (not all). */
+ void EnableRepaint( bool bInvalidate = false );
+ /** Returns true, if controls will not repaint. */
+ inline bool IsNoRepaint() const { return mrData.mnNoRepaint > 0; }
+
+ // command handling -------------------------------------------------------
+
+ /** Sets a new command handler. */
+ inline void SetCmdHdl( const Link& rHdl ) { maCmdHdl = rHdl; }
+ /** Returns the current command handler. */
+ inline const Link& GetCmdHdl() const { return maCmdHdl; }
+ /** Returns data of the last command. */
+ inline const ScCsvCmd& GetCmd() const { return maCmd; }
+
+ /** Executes a command by calling command handler. */
+ void Execute(
+ ScCsvCmdType eType,
+ sal_Int32 nParam1 = CSV_POS_INVALID,
+ sal_Int32 nParam2 = CSV_POS_INVALID );
+
+ // layout helpers ---------------------------------------------------------
+
+ /** Returns a reference to the current layout data. */
+ inline const ScCsvLayoutData& GetLayoutData() const { return mrData; }
+ /** Returns true, if the Right-to-Left layout mode is active. */
+ inline bool IsRTL() const { return mrData.mbAppRTL; }
+
+ /** Returns the number of available positions. */
+ inline sal_Int32 GetPosCount() const { return mrData.mnPosCount; }
+ /** Returns the number of visible positions. */
+ sal_Int32 GetVisPosCount() const;
+ /** Returns the first visible position. */
+ inline sal_Int32 GetFirstVisPos() const { return mrData.mnPosOffset; }
+ /** Returns the last visible position. */
+ inline sal_Int32 GetLastVisPos() const { return GetFirstVisPos() + GetVisPosCount(); }
+ /** Returns highest possible position for first visible character. */
+ sal_Int32 GetMaxPosOffset() const;
+
+ /** Returns true, if it is allowed to set a split at nPos. */
+ bool IsValidSplitPos( sal_Int32 nPos ) const;
+ /** Returns true, if nPos is an allowed AND visible split position. */
+ bool IsVisibleSplitPos( sal_Int32 nPos ) const;
+
+ /** Returns the width of the header column. */
+ inline sal_Int32 GetHdrWidth() const { return mrData.mnHdrWidth; }
+ /** Returns the width of one character column. */
+ inline sal_Int32 GetCharWidth() const { return mrData.mnCharWidth; }
+ /** Returns the start position of the header column. */
+ sal_Int32 GetHdrX() const;
+ /** Returns the X position of the first pixel of the data area. */
+ sal_Int32 GetFirstX() const;
+ /** Returns the X position of the last pixel of the data area. */
+ sal_Int32 GetLastX() const;
+ /** Returns output X coordinate of the specified position. */
+ sal_Int32 GetX( sal_Int32 nPos ) const;
+ /** Returns position from output coordinate. */
+ sal_Int32 GetPosFromX( sal_Int32 nX ) const;
+
+ /** Returns the number of data lines. */
+ inline sal_Int32 GetLineCount() const { return mrData.mnLineCount; }
+ /** Returns the number of visible lines (including partly visible bottom line). */
+ sal_Int32 GetVisLineCount() const;
+ /** Returns index of first visible line. */
+ inline sal_Int32 GetFirstVisLine() const { return mrData.mnLineOffset; }
+ /** Returns index of last visible line. */
+ sal_Int32 GetLastVisLine() const;
+ /** Returns highest possible index for first line. */
+ sal_Int32 GetMaxLineOffset() const;
+
+ /** Returns true, if nLine is a valid line index. */
+ bool IsValidLine( sal_Int32 nLine ) const;
+ /** Returns true, if nLine is a valid and visible line index. */
+ bool IsVisibleLine( sal_Int32 nLine ) const;
+
+ /** Returns the height of the header line. */
+ inline sal_Int32 GetHdrHeight() const { return mrData.mnHdrHeight; }
+ /** Returns the height of one line. */
+ inline sal_Int32 GetLineHeight() const { return mrData.mnLineHeight; }
+ /** Returns output Y coordinate of the specified line. */
+ sal_Int32 GetY( sal_Int32 nLine ) const;
+ /** Returns line index from output coordinate. */
+ sal_Int32 GetLineFromY( sal_Int32 nY ) const;
+
+ /** Returns the ruler cursor position. */
+ inline sal_Int32 GetRulerCursorPos() const { return mrData.mnPosCursor; }
+ /** Returns the data grid cursor position (not column index!). */
+ inline sal_Int32 GetGridCursorPos() const { return mrData.mnColCursor; }
+
+ // static helpers ---------------------------------------------------------
+
+ /** Inverts a rectangle in the specified output device. */
+ static void ImplInvertRect( OutputDevice& rOutDev, const Rectangle& rRect );
+
+ /** Returns direction code for the keys LEFT, RIGHT, HOME, END.
+ @param bHomeEnd false = ignore HOME and END key. */
+ static ScMoveMode GetHorzDirection( sal_uInt16 nCode, bool bHomeEnd );
+ /** Returns direction code for the keys UP, DOWN, HOME, END, PAGE UP, PAGE DOWN.
+ @param bHomeEnd false = ignore HOME and END key. */
+ static ScMoveMode GetVertDirection( sal_uInt16 nCode, bool bHomeEnd );
+
+ // accessibility ----------------------------------------------------------
+public:
+ /** Creates and returns the accessible object of this control. Do not overwrite in
+ derived classes, use ImplCreateAccessible() instead. */
+ virtual XAccessibleRef CreateAccessible();
+
+protected:
+ /** Derived classes create a new accessible object here. */
+ virtual ScAccessibleCsvControl* ImplCreateAccessible() = 0;
+};
+
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx
new file mode 100644
index 000000000000..fb6d687533e6
--- /dev/null
+++ b/sc/source/ui/inc/csvgrid.hxx
@@ -0,0 +1,358 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// ============================================================================
+
+#ifndef _SC_CSVGRID_HXX
+#define _SC_CSVGRID_HXX
+
+#include <vcl/virdev.hxx>
+#include <vcl/menu.hxx>
+#include <unotools/options.hxx>
+
+#include <vector>
+#include <memory>
+#include "scdllapi.h"
+#include "csvcontrol.hxx"
+#include "csvsplits.hxx"
+
+
+// ----------------------------------------------------------------------------
+
+namespace svtools { class ColorConfig; }
+class EditEngine;
+class ScEditEngineDefaulter;
+class ScAsciiOptions;
+class ScAccessibleCsvControl;
+
+
+// ============================================================================
+
+const sal_uInt8 CSV_COLFLAG_NONE = 0x00; /// Nothing set.
+const sal_uInt8 CSV_COLFLAG_SELECT = 0x01; /// Column is selected.
+
+const sal_uInt32 CSV_COLUMN_INVALID = CSV_VEC_NOTFOUND;
+
+
+// ----------------------------------------------------------------------------
+
+/** This struct contains the state of one table column. */
+struct ScCsvColState
+{
+ sal_Int32 mnType; /// Data type.
+ sal_uInt8 mnFlags; /// Flags (i.e. selection state).
+
+ inline explicit ScCsvColState(
+ sal_Int32 nType = CSV_TYPE_DEFAULT,
+ sal_uInt8 nFlags = CSV_COLFLAG_NONE ) :
+ mnType( nType ), mnFlags( nFlags ) {}
+
+ inline bool IsSelected() const;
+ inline void Select( bool bSel );
+};
+
+inline bool ScCsvColState::IsSelected() const
+{
+ return (mnFlags & CSV_COLFLAG_SELECT) != 0;
+}
+
+inline void ScCsvColState::Select( bool bSel )
+{
+ if( bSel ) mnFlags |= CSV_COLFLAG_SELECT; else mnFlags &= ~CSV_COLFLAG_SELECT;
+}
+
+
+// ----------------------------------------------------------------------------
+
+typedef ::std::vector< ScCsvColState > ScCsvColStateVec;
+
+
+// ============================================================================
+
+/** A data grid control for the CSV import dialog. The design of this control
+ simulates a Calc spreadsheet with row and column headers. */
+class SC_DLLPUBLIC ScCsvGrid : public ScCsvControl, public utl::ConfigurationListener
+{
+private:
+ typedef ::std::auto_ptr< ScEditEngineDefaulter > ScEditEnginePtr;
+
+ VirtualDevice maBackgrDev; /// Grid background, headers, cell texts.
+ VirtualDevice maGridDev; /// Data grid with selection and cursor.
+ PopupMenu maPopup; /// Popup menu for column types.
+
+ ::svtools::ColorConfig& mrColorConfig; /// Application color configuration.
+ Color maBackColor; /// Cell background color.
+ Color maGridColor; /// Table grid color.
+ Color maGridPBColor; /// Grid color for "first imported line" delimiter.
+ Color maAppBackColor; /// Background color for unused area.
+ Color maTextColor; /// Text color for data area.
+ Color maHeaderBackColor; /// Background color for headers.
+ Color maHeaderGridColor; /// Grid color for headers.
+ Color maHeaderTextColor; /// Text color for headers.
+ Color maSelectColor; /// Header color of selected columns.
+
+ ScEditEnginePtr mpEditEngine; /// For drawing cell texts.
+ Font maHeaderFont; /// Font for column and row headers.
+ Font maMonoFont; /// Monospace font for data cells.
+ Size maWinSize; /// Size of the control.
+ Size maEdEngSize; /// Paper size for edit engine.
+
+ ScCsvSplits maSplits; /// Vector with split positions.
+ ScCsvColStateVec maColStates; /// State of each column.
+ StringVec maTypeNames; /// UI names of data types.
+ StringVecVec maTexts; /// 2D-vector for cell texts.
+
+ sal_Int32 mnFirstImpLine; /// First imported line (0-based).
+ sal_uInt32 mnRecentSelCol; /// Index of most recently selected column.
+ sal_uInt32 mnMTCurrCol; /// Current column of mouse tracking.
+ bool mbMTSelecting; /// Mouse tracking: true = select, false = deselect.
+
+ // ------------------------------------------------------------------------
+public:
+ explicit ScCsvGrid( ScCsvControl& rParent );
+ virtual ~ScCsvGrid();
+
+ // common grid handling ---------------------------------------------------
+public:
+ /** Updates layout data dependent from the control's state. */
+ void UpdateLayoutData();
+ /** Updates X coordinate of first visible position dependent from line numbers. */
+ void UpdateOffsetX();
+ /** Apply current layout data to the grid control. */
+ void ApplyLayout( const ScCsvLayoutData& rOldData );
+ /** Sets the number of the first imported line (for visual feedback). nLine is 0-based! */
+ void SetFirstImportedLine( sal_Int32 nLine );
+
+ /** Finds a column position nearest to nPos which does not cause scrolling the visible area. */
+ sal_Int32 GetNoScrollCol( sal_Int32 nPos ) const;
+
+private:
+ /** Reads colors from system settings. */
+ SC_DLLPRIVATE void InitColors();
+ /** Initializes all font settings. */
+ SC_DLLPRIVATE void InitFonts();
+ /** Initializes all data dependent from the control's size. */
+ SC_DLLPRIVATE void InitSizeData();
+
+ // split handling ---------------------------------------------------------
+public:
+ /** Inserts a split. */
+ void InsertSplit( sal_Int32 nPos );
+ /** Removes a split. */
+ void RemoveSplit( sal_Int32 nPos );
+ /** Inserts a new or removes an existing split. */
+ void MoveSplit( sal_Int32 nPos, sal_Int32 nNewPos );
+ /** Removes all splits. */
+ void RemoveAllSplits();
+ /** Removes all splits and inserts the splits from rSplits. */
+ void SetSplits( const ScCsvSplits& rSplits );
+
+private:
+ /** Inserts a split and adjusts column data. */
+ SC_DLLPRIVATE bool ImplInsertSplit( sal_Int32 nPos );
+ /** Removes a split and adjusts column data. */
+ SC_DLLPRIVATE bool ImplRemoveSplit( sal_Int32 nPos );
+ /** Clears the split array and re-inserts boundary splits. */
+ SC_DLLPRIVATE void ImplClearSplits();
+
+ // columns/column types ---------------------------------------------------
+public:
+ /** Returns the number of columns. */
+ inline sal_uInt32 GetColumnCount() const { return maColStates.size(); }
+ /** Returns the index of the first visible column. */
+ sal_uInt32 GetFirstVisColumn() const;
+ /** Returns the index of the last visible column. */
+ sal_uInt32 GetLastVisColumn() const;
+
+ /** Returns true, if nColIndex points to an existing column. */
+ bool IsValidColumn( sal_uInt32 nColIndex ) const;
+ /** Returns true, if column with index nColIndex is (at least partly) visible. */
+ bool IsVisibleColumn( sal_uInt32 nColIndex ) const;
+
+ /** Returns X coordinate of the specified column. */
+ sal_Int32 GetColumnX( sal_uInt32 nColIndex ) const;
+ /** Returns column index from output coordinate. */
+ sal_uInt32 GetColumnFromX( sal_Int32 nX ) const;
+
+ /** Returns start position of the column with the specified index. */
+ inline sal_Int32 GetColumnPos( sal_uInt32 nColIndex ) const { return maSplits[ nColIndex ]; }
+ /** Returns column index from position. A split counts to its following column. */
+ sal_uInt32 GetColumnFromPos( sal_Int32 nPos ) const;
+ /** Returns the character width of the column with the specified index. */
+ sal_Int32 GetColumnWidth( sal_uInt32 nColIndex ) const;
+
+ /** Returns the vector with the states of all columns. */
+ inline const ScCsvColStateVec& GetColumnStates() const { return maColStates; }
+ /** Sets all column states to the values in the passed vector. */
+ void SetColumnStates( const ScCsvColStateVec& rColStates );
+ /** Returns the data type of the selected columns. */
+ sal_Int32 GetSelColumnType() const;
+ /** Changes the data type of all selected columns. */
+ void SetSelColumnType( sal_Int32 nType );
+ /** Sets new UI data type names. */
+ void SetTypeNames( const StringVec& rTypeNames );
+ /** Returns the UI type name of the specified column. */
+ const String& GetColumnTypeName( sal_uInt32 nColIndex ) const;
+
+ /** Fills the options object with column data for separators mode. */
+ void FillColumnDataSep( ScAsciiOptions& rOptions ) const;
+ /** Fills the options object with column data for fixed width mode. */
+ void FillColumnDataFix( ScAsciiOptions& rOptions ) const;
+
+private:
+ /** Returns the data type of the specified column. */
+ SC_DLLPRIVATE sal_Int32 GetColumnType( sal_uInt32 nColIndex ) const;
+ /** Returns the data type of the specified column. */
+ SC_DLLPRIVATE void SetColumnType( sal_uInt32 nColIndex, sal_Int32 nColType );
+
+ /** Scrolls data grid vertically. */
+ SC_DLLPRIVATE void ScrollVertRel( ScMoveMode eDir );
+ /** Executes the data type popup menu. */
+ SC_DLLPRIVATE void ExecutePopup( const Point& rPos );
+
+ // selection handling -----------------------------------------------------
+public:
+ /** Returns true, if the specified column is selected. */
+ bool IsSelected( sal_uInt32 nColIndex ) const;
+ /** Returns index of the first selected column. */
+ sal_uInt32 GetFirstSelected() const;
+ /** Returns index of the first selected column really after nFromIndex. */
+ sal_uInt32 GetNextSelected( sal_uInt32 nFromIndex ) const;
+ /** Returns true, if at least one column is selected. */
+ inline bool HasSelection() const { return GetFirstSelected() != CSV_COLUMN_INVALID; }
+
+ /** Selects or deselects the specified column. */
+ void Select( sal_uInt32 nColIndex, bool bSelect = true );
+ /** Toggles selection of the specified column. */
+ void ToggleSelect( sal_uInt32 nColIndex );
+ /** Selects or deselects the specified column range. */
+ void SelectRange( sal_uInt32 nColIndex1, sal_uInt32 nColIndex2, bool bSelect = true );
+ /** Selects or deselects all columns. */
+ void SelectAll( bool bSelect = true );
+
+ /** Returns index of the focused column. */
+ inline sal_uInt32 GetFocusColumn() const { return GetColumnFromPos( GetGridCursorPos() ); }
+
+private:
+ /** Moves column cursor to a new position. */
+ SC_DLLPRIVATE void MoveCursor( sal_uInt32 nColIndex );
+ /** Moves column cursor to the given direction. */
+ SC_DLLPRIVATE void MoveCursorRel( ScMoveMode eDir );
+
+ /** Clears the entire selection without notify. */
+ SC_DLLPRIVATE void ImplClearSelection();
+
+ /** Executes selection action for a specific column. */
+ SC_DLLPRIVATE void DoSelectAction( sal_uInt32 nColIndex, sal_uInt16 nModifier );
+
+ // cell contents ----------------------------------------------------------
+public:
+ /** Fills all cells of a line with the passed text (separators mode). */
+ void ImplSetTextLineSep(
+ sal_Int32 nLine, const String& rTextLine,
+ const String& rSepChars, sal_Unicode cTextSep, bool bMergeSep );
+ /** Fills all cells of a line with the passed text (fixed width mode). */
+ void ImplSetTextLineFix( sal_Int32 nLine, const String& rTextLine );
+
+ /** Returns the text of the specified cell. */
+ const String& GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const;
+
+ // event handling ---------------------------------------------------------
+protected:
+ virtual void Resize();
+ virtual void GetFocus();
+ virtual void LoseFocus();
+
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void Tracking( const TrackingEvent& rTEvt );
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, sal_uInt32 );
+
+ // painting ---------------------------------------------------------------
+protected:
+ virtual void Paint( const Rectangle& );
+
+public:
+ /** Redraws the entire data grid. */
+ void ImplRedraw();
+ /** Returns a pointer to the used edit engine. */
+ EditEngine* GetEditEngine();
+
+private:
+ /** Returns the width of the control. */
+ inline sal_Int32 GetWidth() const { return maWinSize.Width(); }
+ /** Returns the height of the control. */
+ inline sal_Int32 GetHeight() const { return maWinSize.Height(); }
+
+ /** Sets a clip region in the specified output device for the specified column. */
+ SC_DLLPRIVATE void ImplSetColumnClipRegion( OutputDevice& rOutDev, sal_uInt32 nColIndex );
+ /** Draws the header of the specified column to the specified output device. */
+ SC_DLLPRIVATE void ImplDrawColumnHeader( OutputDevice& rOutDev, sal_uInt32 nColIndex, Color aFillColor );
+
+ /** Draws the text at the specified position to maBackgrDev. */
+ SC_DLLPRIVATE void ImplDrawCellText( const Point& rPos, const String& rText );
+ /** Draws the "first imported line" separator to maBackgrDev (or erases, if bSet is false). */
+ SC_DLLPRIVATE void ImplDrawFirstLineSep( bool bSet );
+ /** Draws the column with index nColIndex to maBackgrDev. */
+ SC_DLLPRIVATE void ImplDrawColumnBackgr( sal_uInt32 nColIndex );
+ /** Draws the row headers column to maBackgrDev. */
+ SC_DLLPRIVATE void ImplDrawRowHeaders();
+ /** Draws all columns and the row headers column to maBackgrDev. */
+ SC_DLLPRIVATE void ImplDrawBackgrDev();
+
+ /** Draws the column with index nColIndex with its selection state to maGridDev. */
+ SC_DLLPRIVATE void ImplDrawColumnSelection( sal_uInt32 nColIndex );
+ /** Draws all columns with selection and cursor to maGridDev. */
+ SC_DLLPRIVATE void ImplDrawGridDev();
+
+ /** Redraws the entire column (background and selection). */
+ SC_DLLPRIVATE void ImplDrawColumn( sal_uInt32 nColIndex );
+
+ /** Optimized drawing: Scrolls horizontally and redraws only missing parts. */
+ SC_DLLPRIVATE void ImplDrawHorzScrolled( sal_Int32 nOldPos );
+
+ /** Inverts the cursor bar at the specified position in maGridDev. */
+ SC_DLLPRIVATE void ImplInvertCursor( sal_Int32 nPos );
+
+ /** Draws directly tracking rectangle to the column with the specified index. */
+ SC_DLLPRIVATE void ImplDrawTrackingRect( sal_uInt32 nColIndex );
+
+ // accessibility ----------------------------------------------------------
+protected:
+ /** Creates a new accessible object. */
+ virtual ScAccessibleCsvControl* ImplCreateAccessible();
+};
+
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx
new file mode 100644
index 000000000000..52be4b4ebd8c
--- /dev/null
+++ b/sc/source/ui/inc/csvruler.hxx
@@ -0,0 +1,200 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// ============================================================================
+
+#ifndef _SC_CSVRULER_HXX
+#define _SC_CSVRULER_HXX
+
+#include <vcl/virdev.hxx>
+#include "csvcontrol.hxx"
+#include "csvsplits.hxx"
+#include "scdllapi.h"
+
+class ScAccessibleCsvControl;
+
+
+// ============================================================================
+
+/** A ruler control for the CSV import dialog. Supports setting and moving
+ splits (which divide lines of data into several columns). */
+class SC_DLLPUBLIC ScCsvRuler : public ScCsvControl
+{
+private:
+ VirtualDevice maBackgrDev; /// Ruler background, scaling.
+ VirtualDevice maRulerDev; /// Ruler with splits and cursor.
+
+ Color maBackColor; /// Background color.
+ Color maActiveColor; /// Color for active part of ruler.
+ Color maTextColor; /// Text and scale color.
+ Color maSplitColor; /// Split area color.
+
+ ScCsvSplits maSplits; /// Vector with split positions.
+ ScCsvSplits maOldSplits; /// Old state for cancellation.
+
+ sal_Int32 mnPosCursorLast; /// Last valid position of cursor.
+ sal_Int32 mnPosMTStart; /// Start position of mouse tracking.
+ sal_Int32 mnPosMTCurr; /// Current position of mouse tracking.
+ bool mbPosMTMoved; /// Tracking: Anytime moved to another position?
+
+ Size maWinSize; /// Size of the control.
+ Rectangle maActiveRect; /// The active area of the ruler.
+ sal_Int32 mnSplitSize; /// Size of a split circle.
+
+ // ------------------------------------------------------------------------
+public:
+ explicit ScCsvRuler( ScCsvControl& rParent );
+ ~ScCsvRuler();
+
+ // common ruler handling --------------------------------------------------
+public:
+ using Window::SetPosSizePixel;
+ /** Sets position and size of the ruler. The height is calculated internally. */
+ virtual void SetPosSizePixel(
+ long nX, long nY,
+ long nWidth, long nHeight,
+ USHORT nFlags = WINDOW_POSSIZE_ALL );
+
+ /** Apply current layout data to the ruler. */
+ void ApplyLayout( const ScCsvLayoutData& rOldData );
+
+private:
+ /** Reads colors from system settings. */
+ SC_DLLPRIVATE void InitColors();
+ /** Initializes all data dependent from the control's size. */
+ SC_DLLPRIVATE void InitSizeData();
+
+ /** Moves cursor to a new position.
+ @param bScroll TRUE = The method may scroll the ruler. */
+ SC_DLLPRIVATE void MoveCursor( sal_Int32 nPos, bool bScroll = true );
+ /** Moves cursor to the given direction. */
+ SC_DLLPRIVATE void MoveCursorRel( ScMoveMode eDir );
+ /** Sets cursor to an existing split, according to eDir. */
+ SC_DLLPRIVATE void MoveCursorToSplit( ScMoveMode eDir );
+ /** Scrolls data grid vertically. */
+ SC_DLLPRIVATE void ScrollVertRel( ScMoveMode eDir );
+
+ // split handling ---------------------------------------------------------
+public:
+ /** Returns the split array. */
+ inline const ScCsvSplits& GetSplits() const { return maSplits; }
+ /** Returns the number of splits. */
+ inline sal_uInt32 GetSplitCount() const
+ { return maSplits.Count(); }
+ /** Returns the position of the specified split. */
+ inline sal_Int32 GetSplitPos( sal_uInt32 nIndex ) const
+ { return maSplits[ nIndex ]; }
+ /** Finds a position nearest to nPos which does not cause scrolling the visible area. */
+ sal_Int32 GetNoScrollPos( sal_Int32 nPos ) const;
+
+ /** Returns true if at position nPos is a split. */
+ inline bool HasSplit( sal_Int32 nPos ) const { return maSplits.HasSplit( nPos ); }
+ /** Inserts a split. */
+ void InsertSplit( sal_Int32 nPos );
+ /** Removes a split. */
+ void RemoveSplit( sal_Int32 nPos );
+ /** Moves a split from nPos to nNewPos. */
+ void MoveSplit( sal_Int32 nPos, sal_Int32 nNewPos );
+ /** Removes all splits of the ruler. */
+ void RemoveAllSplits();
+
+private:
+ /** Finds next position without a split. */
+ SC_DLLPRIVATE sal_Int32 FindEmptyPos( sal_Int32 nPos, ScMoveMode eDir ) const;
+
+ /** Moves split and cursor to nNewPos and commits event. */
+ SC_DLLPRIVATE void MoveCurrSplit( sal_Int32 nNewPos );
+ /** Moves split and cursor to the given direction and commits event. */
+ SC_DLLPRIVATE void MoveCurrSplitRel( ScMoveMode eDir );
+
+ // event handling ---------------------------------------------------------
+protected:
+ virtual void Resize();
+ virtual void GetFocus();
+ virtual void LoseFocus();
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void Tracking( const TrackingEvent& rTEvt );
+
+ virtual void KeyInput( const KeyEvent& rKEvt );
+
+private:
+ /** Starts tracking at the specified position. */
+ SC_DLLPRIVATE void StartMouseTracking( sal_Int32 nPos );
+ /** Moves tracking to a new position. */
+ SC_DLLPRIVATE void MoveMouseTracking( sal_Int32 nPos );
+ /** Applies tracking action for the current tracking position.
+ @param bApply TRUE = apply action, FALSE = cancel action. */
+ SC_DLLPRIVATE void EndMouseTracking( bool bApply );
+
+ // painting ---------------------------------------------------------------
+protected:
+ virtual void Paint( const Rectangle& );
+
+public:
+ /** Redraws the entire ruler. */
+ void ImplRedraw();
+
+private:
+ /** Returns the width of the control. */
+ inline sal_Int32 GetWidth() const { return maWinSize.Width(); }
+ /** Returns the height of the control. */
+ inline sal_Int32 GetHeight() const { return maWinSize.Height(); }
+
+ /** Draws the background and active area to maBackgrDev (only the given X range). */
+ SC_DLLPRIVATE void ImplDrawArea( sal_Int32 nPosX, sal_Int32 nWidth );
+ /** Draws the entire ruler background with scaling to maBackgrDev. */
+ SC_DLLPRIVATE void ImplDrawBackgrDev();
+
+ /** Draws a split to maRulerDev. */
+ SC_DLLPRIVATE void ImplDrawSplit( sal_Int32 nPos );
+ /** Erases a split from maRulerDev. */
+ SC_DLLPRIVATE void ImplEraseSplit( sal_Int32 nPos );
+ /** Draws the ruler background, all splits and the cursor to maRulerDev. */
+ SC_DLLPRIVATE void ImplDrawRulerDev();
+
+ /** Inverts the cursor bar at the specified position in maRulerDev. */
+ SC_DLLPRIVATE void ImplInvertCursor( sal_Int32 nPos );
+ /** Draws directly tracking rectangle to the column with the specified index. */
+ SC_DLLPRIVATE void ImplDrawTrackingRect();
+
+ /** Sets arrow or horizontal split pointer. */
+ SC_DLLPRIVATE void ImplSetMousePointer( sal_Int32 nPos );
+
+ // accessibility ----------------------------------------------------------
+protected:
+ /** Creates a new accessible object. */
+ virtual ScAccessibleCsvControl* ImplCreateAccessible();
+};
+
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/csvsplits.hxx b/sc/source/ui/inc/csvsplits.hxx
new file mode 100644
index 000000000000..4685269936d5
--- /dev/null
+++ b/sc/source/ui/inc/csvsplits.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// ============================================================================
+
+#ifndef _SC_CSVSPLITS_HXX
+#define _SC_CSVSPLITS_HXX
+
+#include <sal/types.h>
+
+#include <vector>
+
+
+// ============================================================================
+
+/** Constant for an invalid vector index. */
+const sal_uInt32 CSV_VEC_NOTFOUND = SAL_MAX_UINT32;
+/** Constant for an invalid ruler position. */
+const sal_Int32 CSV_POS_INVALID = -1;
+
+
+// ----------------------------------------------------------------------------
+
+/** A vector of column splits that supports inserting, removing and moving splits. */
+class ScCsvSplits
+{
+private:
+ typedef ::std::vector< sal_Int32 > ScSplitVector;
+ typedef ScSplitVector::iterator iterator;
+ typedef ScSplitVector::const_iterator const_iterator;
+
+ ScSplitVector maVec; /// The split containter.
+
+public:
+ // *** access by position *** ---------------------------------------------
+
+ /** Inserts a new split at position nPos into the vector.
+ @return true = split inserted (nPos was valid and empty). */
+ bool Insert( sal_Int32 nPos );
+ /** Removes a split by position.
+ @return true = split found and removed. */
+ bool Remove( sal_Int32 nPos );
+ /** Removes a range of splits in the given position range. */
+ void RemoveRange( sal_Int32 nPosStart, sal_Int32 nPosEnd );
+ /** Removes all elements from the vector. */
+ void Clear();
+
+ /** Returns true if at position nPos is a split. */
+ bool HasSplit( sal_Int32 nPos ) const;
+
+ // *** access by index *** ------------------------------------------------
+
+ /** Searches for a split at position nPos.
+ @return the vector index of the split. */
+ sal_uInt32 GetIndex( sal_Int32 nPos ) const;
+ /** Returns index of the first split greater than or equal to nPos. */
+ sal_uInt32 LowerBound( sal_Int32 nPos ) const;
+ /** Returns index of the last split less than or equal to nPos. */
+ sal_uInt32 UpperBound( sal_Int32 nPos ) const;
+
+ /** Returns the number of splits. */
+ inline sal_uInt32 Count() const
+ { return maVec.size(); }
+ /** Returns the position of the specified split. */
+ sal_Int32 GetPos( sal_uInt32 nIndex ) const;
+ /** Returns the position of the specified split. */
+ inline sal_Int32 operator[]( sal_uInt32 nIndex ) const
+ { return GetPos( nIndex ); }
+
+private:
+ /** Returns the vector index of an iterator. */
+ sal_uInt32 GetIterIndex( const_iterator aIter ) const;
+};
+
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/csvtablebox.hxx b/sc/source/ui/inc/csvtablebox.hxx
new file mode 100644
index 000000000000..205e8b50cad1
--- /dev/null
+++ b/sc/source/ui/inc/csvtablebox.hxx
@@ -0,0 +1,161 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// ============================================================================
+
+#ifndef _SC_CSVTABLEBOX_HXX
+#define _SC_CSVTABLEBOX_HXX
+
+#include <vcl/ctrl.hxx>
+#include <vcl/scrbar.hxx>
+#include "scdllapi.h"
+#include "csvcontrol.hxx"
+#include "csvruler.hxx"
+#include "csvgrid.hxx"
+
+
+class ListBox;
+class ScAsciiOptions;
+
+
+/* ============================================================================
+Position: Positions between the characters (the dots in the ruler).
+Character: The characters (the range from one position to the next).
+Split: Positions which contain a split to divide characters into groups (columns).
+Column: The range between two splits.
+============================================================================ */
+
+/** The control in the CSV import dialog that contains a ruler and a data grid
+ to visualize and modify the current import settings. */
+class SC_DLLPUBLIC ScCsvTableBox : public ScCsvControl
+{
+private:
+ ScCsvLayoutData maData; /// Current layout data of the controls.
+
+ ScCsvRuler maRuler; /// The ruler for fixed width mode.
+ ScCsvGrid maGrid; /// Calc-like data table for fixed width mode.
+ ScrollBar maHScroll; /// Horizontal scroll bar.
+ ScrollBar maVScroll; /// Vertical scroll bar.
+ ScrollBarBox maScrollBox; /// For the bottom right edge.
+
+ Link maUpdateTextHdl; /// Updates all cell texts.
+ Link maColTypeHdl; /// Handler for exporting the column type.
+
+ ScCsvColStateVec maFixColStates; /// Column states in fixed width mode.
+ ScCsvColStateVec maSepColStates; /// Column states in separators mode.
+
+ sal_Int32 mnFixedWidth; /// Cached total width for fixed width mode.
+
+ bool mbFixedMode; /// false = Separators, true = Fixed width.
+
+ // ------------------------------------------------------------------------
+public:
+//UNUSED2009-05 explicit ScCsvTableBox( Window* pParent );
+ explicit ScCsvTableBox( Window* pParent, const ResId& rResId );
+
+ // common table box handling ----------------------------------------------
+public:
+ /** Sets the control to separators mode. */
+ void SetSeparatorsMode();
+ /** Sets the control to fixed width mode. */
+ void SetFixedWidthMode();
+
+private:
+ /** Initialisation on construction. */
+ SC_DLLPRIVATE void Init();
+ /** Initializes the children controls (pos/size, scroll bars, ...). */
+ SC_DLLPRIVATE void InitControls();
+ /** Initializes size and position data of horizontal scrollbar. */
+ SC_DLLPRIVATE void InitHScrollBar();
+ /** Initializes size and position data of vertical scrollbar. */
+ SC_DLLPRIVATE void InitVScrollBar();
+
+ /** Calculates and sets valid position offset nearest to nPos. */
+ SC_DLLPRIVATE inline void ImplSetPosOffset( sal_Int32 nPos )
+ { maData.mnPosOffset = Max( Min( nPos, GetMaxPosOffset() ), sal_Int32( 0 ) ); }
+ /** Calculates and sets valid line offset nearest to nLine. */
+ SC_DLLPRIVATE inline void ImplSetLineOffset( sal_Int32 nLine )
+ { maData.mnLineOffset = Max( Min( nLine, GetMaxLineOffset() ), sal_Int32( 0 ) ); }
+ /** Moves controls (not cursors!) so that nPos becomes visible. */
+ SC_DLLPRIVATE void MakePosVisible( sal_Int32 nPos );
+
+ // cell contents ----------------------------------------------------------
+public:
+ /** Fills all cells of all lines with the passed texts (Unicode strings). */
+ void SetUniStrings(
+ const String* pTextLines, const String& rSepChars,
+ sal_Unicode cTextSep, bool bMergeSep );
+//UNUSED2009-05 /** Fills all cells of all lines with the passed texts (ByteStrings). */
+//UNUSED2009-05 void SetByteStrings(
+//UNUSED2009-05 const ByteString* pLineTexts, CharSet eCharSet,
+//UNUSED2009-05 const String& rSepChars, sal_Unicode cTextSep, bool bMergeSep );
+
+ // column settings --------------------------------------------------------
+public:
+ /** Reads UI strings for data types from the list box. */
+ void InitTypes( const ListBox& rListBox );
+ /** Returns the data type of the selected columns. */
+ inline sal_Int32 GetSelColumnType() const { return maGrid.GetSelColumnType(); }
+
+ /** Fills the options object with current column data. */
+ void FillColumnData( ScAsciiOptions& rOptions ) const;
+
+ // event handling ---------------------------------------------------------
+public:
+ /** Sets a new handler for "update cell texts" requests. */
+ inline void SetUpdateTextHdl( const Link& rHdl ) { maUpdateTextHdl = rHdl; }
+ /** Returns the handler for "update cell texts" requests. */
+ inline const Link& GetUpdateTextHdl() const { return maUpdateTextHdl; }
+ /** Sets a new handler for "column selection changed" events. */
+ inline void SetColTypeHdl( const Link& rHdl ) { maColTypeHdl = rHdl; }
+ /** Returns the handler for "column selection changed" events. */
+ inline const Link& GetColTypeHdl() const { return maColTypeHdl; }
+
+protected:
+ virtual void Resize();
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+private:
+ SC_DLLPRIVATE DECL_LINK( CsvCmdHdl, ScCsvControl* );
+ SC_DLLPRIVATE DECL_LINK( ScrollHdl, ScrollBar* );
+ SC_DLLPRIVATE DECL_LINK( ScrollEndHdl, ScrollBar* );
+
+ // accessibility ----------------------------------------------------------
+public:
+ /** Creates and returns the accessible object of this control. */
+ virtual XAccessibleRef CreateAccessible();
+
+protected:
+ /** Creates a new accessible object. */
+ virtual ScAccessibleCsvControl* ImplCreateAccessible();
+};
+
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/dapidata.hxx b/sc/source/ui/inc/dapidata.hxx
new file mode 100644
index 000000000000..13d7e91bdceb
--- /dev/null
+++ b/sc/source/ui/inc/dapidata.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DAPIDATA_HXX
+#define SC_DAPIDATA_HXX
+
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/combobox.hxx>
+
+//------------------------------------------------------------------------
+
+struct ScImportSourceDesc;
+
+
+class ScDataPilotDatabaseDlg : public ModalDialog
+{
+private:
+ FixedLine aFlFrame;
+ FixedText aFtDatabase;
+ ListBox aLbDatabase;
+ FixedText aFtObject;
+ ComboBox aCbObject;
+ FixedText aFtType;
+ ListBox aLbType;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ void FillObjects();
+
+ DECL_LINK( SelectHdl, ListBox* );
+
+public:
+ ScDataPilotDatabaseDlg( Window* pParent );
+ ~ScDataPilotDatabaseDlg();
+
+ void GetValues( ScImportSourceDesc& rDesc );
+};
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/dapitype.hxx b/sc/source/ui/inc/dapitype.hxx
new file mode 100644
index 000000000000..07659b1dbc59
--- /dev/null
+++ b/sc/source/ui/inc/dapitype.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DAPITYPE_HXX
+#define SC_DAPITYPE_HXX
+
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/dialog.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+//------------------------------------------------------------------------
+
+class ScDataPilotSourceTypeDlg : public ModalDialog
+{
+private:
+ FixedLine aFlFrame;
+ RadioButton aBtnSelection;
+ RadioButton aBtnDatabase;
+ RadioButton aBtnExternal;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+public:
+ ScDataPilotSourceTypeDlg( Window* pParent, BOOL bEnableExternal );
+ ~ScDataPilotSourceTypeDlg();
+
+ BOOL IsDatabase() const;
+ BOOL IsExternal() const;
+};
+
+
+class ScDataPilotServiceDlg : public ModalDialog
+{
+private:
+ FixedLine aFlFrame;
+ FixedText aFtService;
+ ListBox aLbService;
+ FixedText aFtSource;
+ Edit aEdSource;
+ FixedText aFtName;
+ Edit aEdName;
+ FixedText aFtUser;
+ Edit aEdUser;
+ FixedText aFtPasswd;
+ Edit aEdPasswd;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+public:
+ ScDataPilotServiceDlg( Window* pParent,
+ const com::sun::star::uno::Sequence<rtl::OUString>& rServices );
+ ~ScDataPilotServiceDlg();
+
+ String GetServiceName() const;
+ String GetParSource() const;
+ String GetParName() const;
+ String GetParUser() const;
+ String GetParPass() const;
+};
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/dbdocfun.hxx b/sc/source/ui/inc/dbdocfun.hxx
new file mode 100644
index 000000000000..efdd29b44738
--- /dev/null
+++ b/sc/source/ui/inc/dbdocfun.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DBDOCFUN_HXX
+#define SC_DBDOCFUN_HXX
+
+#include "address.hxx"
+#include <tools/solar.h>
+#include <com/sun/star/uno/Sequence.hxx>
+
+class String;
+
+struct ScImportParam;
+struct ScQueryParam;
+struct ScSortParam;
+struct ScSubTotalParam;
+
+class SfxViewFrame;
+class SbaSelectionList;
+class ScDBData;
+class ScDocShell;
+class ScAddress;
+class ScRange;
+class ScDPObject;
+
+namespace com { namespace sun { namespace star {
+ namespace beans {
+ struct PropertyValue;
+ }
+ namespace sdbc {
+ class XResultSet;
+ }
+} } }
+
+// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------
+class SbaSelectionList: public List , public SvRefBase
+{
+public:
+ SbaSelectionList():
+ List(CONTAINER_MAXBLOCKSIZE,100,100){}
+};
+
+SV_DECL_IMPL_REF(SbaSelectionList)
+
+
+class ScDBDocFunc
+{
+friend class ScDBFunc;
+
+private:
+ ScDocShell& rDocShell;
+
+public:
+ ScDBDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {}
+ ~ScDBDocFunc() {}
+
+ void UpdateImport( const String& rTarget, const String& rDBName,
+ const String& rTableName, const String& rStatement,
+ BOOL bNative, BYTE nType,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::sdbc::XResultSet >& xResultSet,
+ const SbaSelectionList* pSelection );
+
+ BOOL DoImport( SCTAB nTab, const ScImportParam& rParam,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::sdbc::XResultSet >& xResultSet,
+ const SbaSelectionList* pSelection, BOOL bRecord,
+ BOOL bAddrInsert = FALSE );
+
+ BOOL DoImportUno( const ScAddress& rPos,
+ const com::sun::star::uno::Sequence<
+ com::sun::star::beans::PropertyValue>& aArgs );
+
+ static void ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFrame );
+
+ BOOL Sort( SCTAB nTab, const ScSortParam& rSortParam,
+ BOOL bRecord, BOOL bPaint, BOOL bApi );
+
+ SC_DLLPUBLIC BOOL Query( SCTAB nTab, const ScQueryParam& rQueryParam,
+ const ScRange* pAdvSource, BOOL bRecord, BOOL bApi );
+
+ BOOL DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam,
+ const ScSortParam* pForceNewSort,
+ BOOL bRecord, BOOL bApi );
+
+ BOOL AddDBRange( const String& rName, const ScRange& rRange, BOOL bApi );
+ BOOL DeleteDBRange( const String& rName, BOOL bApi );
+ BOOL RenameDBRange( const String& rOld, const String& rNew, BOOL bApi );
+ BOOL ModifyDBData( const ScDBData& rNewData, BOOL bApi ); // Name unveraendert
+
+ BOOL RepeatDB( const String& rDBName, BOOL bRecord, BOOL bApi );
+
+ BOOL DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
+ BOOL bRecord, BOOL bApi, BOOL bAllowMove = FALSE );
+};
+
+
+
+#endif
diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx
new file mode 100644
index 000000000000..baadae0a64dc
--- /dev/null
+++ b/sc/source/ui/inc/dbfunc.hxx
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DBFUNC_HXX
+#define SC_DBFUNC_HXX
+
+#include "viewfunc.hxx"
+
+namespace com { namespace sun { namespace star { namespace sheet {
+ struct DataPilotFieldFilter;
+}}}}
+
+struct ScSortParam;
+struct ScQueryParam;
+class ScDBData;
+class ScDBCollection;
+class ScDPObject;
+class ScDPSaveData;
+class ScStrCollection;
+struct ScDPNumGroupInfo;
+
+// ---------------------------------------------------------------------------
+
+class ScDBFunc : public ScViewFunc
+{
+private:
+ void GetSelectedMemberList( ScStrCollection& rEntries, long& rDimension );
+
+public:
+ ScDBFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
+//UNUSED2008-05 ScDBFunc( Window* pParent, const ScDBFunc& rDBFunc, ScTabViewShell* pViewShell );
+ virtual ~ScDBFunc();
+
+ // nur UISort wiederholt bei Bedarf die Teilergebnisse
+
+ void UISort( const ScSortParam& rSortParam,
+ BOOL bRecord = TRUE );
+
+ void Sort( const ScSortParam& rSortParam,
+ BOOL bRecord = TRUE, BOOL bPaint = TRUE );
+ SC_DLLPUBLIC void Query( const ScQueryParam& rQueryParam,
+ const ScRange* pAdvSource, BOOL bRecord );
+ void DoSubTotals( const ScSubTotalParam& rParam, BOOL bRecord = TRUE,
+ const ScSortParam* pForceNewSort = NULL );
+
+ void ToggleAutoFilter();
+ void HideAutoFilter();
+
+ void RepeatDB( BOOL bRecord = TRUE );
+
+ BOOL ImportData( const ScImportParam& rParam, BOOL bRecord = TRUE );
+
+ void GotoDBArea( const String& rDBName );
+
+ // DB-Bereich vom Cursor
+ ScDBData* GetDBData( BOOL bMarkArea = TRUE, ScGetDBMode eMode = SC_DB_MAKE, ScGetDBSelection eSel = SC_DBSEL_KEEP );
+
+ void NotifyCloseDbNameDlg( const ScDBCollection& rNewColl, const List& rDelAreaList );
+
+ void Consolidate( const ScConsolidateParam& rParam, BOOL bRecord = TRUE );
+
+ bool MakePivotTable( const ScDPSaveData& rData, const ScRange& rDest, BOOL bNewTable,
+ const ScDPObject& rSource, BOOL bApi = FALSE );
+ void DeletePivotTable();
+ // Wang Xu Ming -- 2009-6-17
+ // DataPilot Migration
+ ULONG RecalcPivotTable();
+ // End Comments
+ BOOL HasSelectionForDateGroup( ScDPNumGroupInfo& rOldInfo, sal_Int32& rParts );
+ BOOL HasSelectionForNumGroup( ScDPNumGroupInfo& rOldInfo );
+ void GroupDataPilot();
+ void DateGroupDataPilot( const ScDPNumGroupInfo& rInfo, sal_Int32 nParts );
+ void NumGroupDataPilot( const ScDPNumGroupInfo& rInfo );
+ void UngroupDataPilot();
+ void DataPilotInput( const ScAddress& rPos, const String& rString );
+
+ bool DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = NULL );
+ BOOL DataPilotMove( const ScRange& rSource, const ScAddress& rDest );
+
+ BOOL HasSelectionForDrillDown( USHORT& rOrientation );
+ void SetDataPilotDetails( BOOL bShow, const String* pNewDimensionName = NULL );
+
+ void ShowDataPilotSourceData( ScDPObject& rDPObj,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::DataPilotFieldFilter >& rFilters );
+
+ void MakeOutline( BOOL bColumns, BOOL bRecord = TRUE );
+ void RemoveOutline( BOOL bColumns, BOOL bRecord = TRUE );
+ void RemoveAllOutlines( BOOL bRecord = TRUE );
+ void TestRemoveOutline( BOOL& rCol, BOOL& rRow );
+
+ void AutoOutline( BOOL bRecord = TRUE );
+
+ void SelectLevel( BOOL bColumns, USHORT nLevel,
+ BOOL bRecord = TRUE, BOOL bPaint = TRUE );
+ void ShowOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry,
+ BOOL bRecord = TRUE, BOOL bPaint = TRUE );
+ void HideOutline( BOOL bColumns, USHORT nLevel, USHORT nEntry,
+ BOOL bRecord = TRUE, BOOL bPaint = TRUE );
+
+ void ShowMarkedOutlines( BOOL bRecord = TRUE );
+ void HideMarkedOutlines( BOOL bRecord = TRUE );
+ BOOL OutlinePossible(BOOL bHide);
+
+ void UpdateCharts(BOOL bAllCharts = FALSE); // Default: am Cursor
+
+ static USHORT DoUpdateCharts( const ScAddress& rPos, ScDocument* pDoc, BOOL bAllCharts );
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/dbnamdlg.hrc b/sc/source/ui/inc/dbnamdlg.hrc
new file mode 100644
index 000000000000..fd0205e3bbed
--- /dev/null
+++ b/sc/source/ui/inc/dbnamdlg.hrc
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc" // -> RID_SCDLG_DBNAMES
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_ADD 3
+#define BTN_REMOVE 4
+#define BTN_HELP 5
+#define FL_NAME 10
+#define ED_NAME 11
+#define FL_ASSIGN 12
+#define ED_DBAREA 13
+#define RB_DBAREA 14
+#define FL_OPTIONS 20
+#define BTN_HEADER 21
+#define BTN_SIZE 22
+#define BTN_FORMAT 23
+#define BTN_STRIPDATA 24
+#define FT_SOURCE 25
+#define FT_OPERATIONS 26
+#define STR_ADD 30
+#define STR_MODIFY 31
+#define STR_DB_INVALID 32
+#define BTN_MORE 33
+
diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx
new file mode 100644
index 000000000000..cd878c651d6c
--- /dev/null
+++ b/sc/source/ui/inc/dbnamdlg.hxx
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DBNAMDLG_HXX
+#define SC_DBNAMDLG_HXX
+
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+
+#ifndef _MOREBTN_HXX //autogen
+#include <vcl/morebtn.hxx>
+#endif
+#include "anyrefdg.hxx"
+#include "dbcolect.hxx"
+#include "expftext.hxx"
+
+class ScViewData;
+class ScDocument;
+
+
+//============================================================================
+
+class ScDbNameDlg : public ScAnyRefDlg
+{
+public:
+ ScDbNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScViewData* ptrViewData );
+ ~ScDbNameDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+
+ virtual BOOL IsRefInputMode() const;
+ virtual void SetActive();
+ virtual BOOL Close();
+
+private:
+ FixedLine aFlName;
+ ComboBox aEdName;
+
+ FixedLine aFlAssign;
+ formula::RefEdit aEdAssign;
+ formula::RefButton aRbAssign;
+
+ FixedLine aFlOptions;
+ CheckBox aBtnHeader;
+ CheckBox aBtnDoSize;
+ CheckBox aBtnKeepFmt;
+ CheckBox aBtnStripData;
+ ScExpandedFixedText aFTSource; //@18.09.97 erweiterter FixedText
+ FixedText aFTOperations;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ PushButton aBtnAdd;
+ PushButton aBtnRemove;
+ MoreButton aBtnMore;
+
+ BOOL bSaved;
+
+
+ const String aStrAdd; // "Hinzufuegen"
+ const String aStrModify; // "Aendern"
+ const String aStrNoName; // "unbenannt"
+ const String aStrInvalid;
+
+ String aStrSource;
+ String aStrOperations;
+
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ BOOL bRefInputMode;
+ ScAddress::Details aAddrDetails;
+
+ ScDBCollection aLocalDbCol;
+ ScRange theCurArea;
+ List aRemoveList;
+
+#ifdef _DBNAMDLG_CXX
+private:
+ void Init();
+ void UpdateNames();
+ void UpdateDBData( const String& rStrName );
+ void SetInfoStrings( const ScDBData* pDBData );
+
+ DECL_LINK( CancelBtnHdl, void * );
+ DECL_LINK( OkBtnHdl, void * );
+ DECL_LINK( AddBtnHdl, void * );
+ DECL_LINK( RemoveBtnHdl, void * );
+ DECL_LINK( NameModifyHdl, void * );
+ DECL_LINK( AssModifyHdl, void * );
+#endif
+};
+
+
+
+#endif // SC_DBNAMDLG_HXX
+
diff --git a/sc/source/ui/inc/delcldlg.hxx b/sc/source/ui/inc/delcldlg.hxx
new file mode 100644
index 000000000000..e1a816e78c0f
--- /dev/null
+++ b/sc/source/ui/inc/delcldlg.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DELCLDLG_HXX
+#define SC_DELCLDLG_HXX
+
+
+#include <vcl/dialog.hxx>
+#include <vcl/imagebtn.hxx>
+#include <vcl/fixed.hxx>
+
+
+#include "global.hxx"
+
+//------------------------------------------------------------------------
+
+class ScDeleteCellDlg : public ModalDialog
+{
+private:
+ FixedLine aFlFrame;
+ RadioButton aBtnCellsUp;
+ RadioButton aBtnCellsLeft;
+ RadioButton aBtnDelRows;
+ RadioButton aBtnDelCols;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+
+public:
+ ScDeleteCellDlg( Window* pParent, BOOL bDisallowCellMove = FALSE );
+ ~ScDeleteCellDlg();
+
+ DelCellCmd GetDelCellCmd() const;
+};
+
+
+#endif // SC_DELCLDLG_HXX
+
+
diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx
new file mode 100644
index 000000000000..8773b9c78f3a
--- /dev/null
+++ b/sc/source/ui/inc/delcodlg.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DELCODLG_HXX
+#define SC_DELCODLG_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/imagebtn.hxx>
+#include "global.hxx"
+
+//------------------------------------------------------------------------
+
+class ScDeleteContentsDlg : public ModalDialog
+{
+private:
+ FixedLine aFlFrame;
+ CheckBox aBtnDelAll;
+ CheckBox aBtnDelStrings;
+ CheckBox aBtnDelNumbers;
+ CheckBox aBtnDelDateTime;
+ CheckBox aBtnDelFormulas;
+ CheckBox aBtnDelNotes;
+ CheckBox aBtnDelAttrs;
+ CheckBox aBtnDelObjects;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ BOOL bObjectsDisabled;
+
+ static BOOL bPreviousAllCheck;
+ static USHORT nPreviousChecks;
+
+ void DisableChecks( BOOL bDelAllChecked = TRUE );
+ DECL_LINK( DelAllHdl, void * );
+
+public:
+ ScDeleteContentsDlg( Window* pParent,
+ USHORT nCheckDefaults = 0 );
+ ~ScDeleteContentsDlg();
+ void DisableObjects();
+
+ USHORT GetDelContentsCmdBits() const;
+};
+
+
+#endif // SC_DELCODLG_HXX
+
+
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
new file mode 100644
index 000000000000..c92cc082986d
--- /dev/null
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DOCFUNC_HXX
+#define SC_DOCFUNC_HXX
+
+#include <tools/link.hxx>
+#include "global.hxx"
+#include "formula/grammar.hxx"
+#include "tabbgcolor.hxx"
+
+class ScEditEngineDefaulter;
+class SdrUndoAction;
+class ScAddress;
+class ScDocShell;
+class ScMarkData;
+class ScPatternAttr;
+class ScRange;
+class ScRangeName;
+class ScBaseCell;
+class ScTokenArray;
+struct ScTabOpParam;
+class ScTableProtection;
+
+// ---------------------------------------------------------------------------
+
+class ScDocFunc
+{
+private:
+ ScDocShell& rDocShell;
+
+ BOOL AdjustRowHeight( const ScRange& rRange, BOOL bPaint = TRUE );
+ void CreateOneName( ScRangeName& rList,
+ SCCOL nPosX, SCROW nPosY, SCTAB nTab,
+ SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
+ BOOL& rCancel, BOOL bApi );
+ void NotifyInputHandler( const ScAddress& rPos );
+
+public:
+ ScDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {}
+ ~ScDocFunc() {}
+
+ DECL_LINK( NotifyDrawUndo, SdrUndoAction* );
+
+ BOOL DetectiveAddPred(const ScAddress& rPos);
+ BOOL DetectiveDelPred(const ScAddress& rPos);
+ BOOL DetectiveAddSucc(const ScAddress& rPos);
+ BOOL DetectiveDelSucc(const ScAddress& rPos);
+ BOOL DetectiveAddError(const ScAddress& rPos);
+ BOOL DetectiveMarkInvalid(SCTAB nTab);
+ BOOL DetectiveDelAll(SCTAB nTab);
+ BOOL DetectiveRefresh(BOOL bAutomatic = FALSE);
+
+ BOOL DeleteContents( const ScMarkData& rMark, USHORT nFlags,
+ BOOL bRecord, BOOL bApi );
+
+ BOOL TransliterateText( const ScMarkData& rMark, sal_Int32 nType,
+ BOOL bRecord, BOOL bApi );
+
+ BOOL SetNormalString( const ScAddress& rPos, const String& rText, BOOL bApi );
+ BOOL PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, BOOL bApi );
+ BOOL PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
+ BOOL bInterpret, BOOL bApi );
+ BOOL SetCellText( const ScAddress& rPos, const String& rText,
+ BOOL bInterpret, BOOL bEnglish, BOOL bApi,
+ const String& rFormulaNmsp,
+ const formula::FormulaGrammar::Grammar eGrammar );
+
+ // creates a new cell for use with PutCell
+ ScBaseCell* InterpretEnglishString( const ScAddress& rPos, const String& rText,
+ const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar );
+
+ bool ShowNote( const ScAddress& rPos, bool bShow = true );
+ inline bool HideNote( const ScAddress& rPos ) { return ShowNote( rPos, false ); }
+
+ bool SetNoteText( const ScAddress& rPos, const String& rNoteText, BOOL bApi );
+ bool ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate, BOOL bApi );
+
+ BOOL ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern,
+ BOOL bRecord, BOOL bApi );
+ BOOL ApplyStyle( const ScMarkData& rMark, const String& rStyleName,
+ BOOL bRecord, BOOL bApi );
+
+ BOOL InsertCells( const ScRange& rRange,const ScMarkData* pTabMark,
+ InsCellCmd eCmd, BOOL bRecord, BOOL bApi,
+ BOOL bPartOfPaste = FALSE );
+ BOOL DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
+ DelCellCmd eCmd, BOOL bRecord, BOOL bApi );
+
+ BOOL MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
+ BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi );
+
+ BOOL InsertTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi );
+ BOOL RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi );
+ BOOL DeleteTable( SCTAB nTab, BOOL bRecord, BOOL bApi );
+
+ bool SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi );
+ bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi );
+
+ BOOL SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi );
+
+ BOOL SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL bApi );
+
+//UNUSED2009-05 BOOL SetGrammar( formula::FormulaGrammar::Grammar eGrammar );
+
+ SC_DLLPUBLIC BOOL SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
+ SCTAB nTab, ScSizeMode eMode, USHORT nSizeTwips,
+ BOOL bRecord, BOOL bApi );
+
+ BOOL InsertPageBreak( BOOL bColumn, const ScAddress& rPos,
+ BOOL bRecord, BOOL bSetModified, BOOL bApi );
+ BOOL RemovePageBreak( BOOL bColumn, const ScAddress& rPos,
+ BOOL bRecord, BOOL bSetModified, BOOL bApi );
+
+ void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect );
+
+ BOOL Protect( SCTAB nTab, const String& rPassword, BOOL bApi );
+ BOOL Unprotect( SCTAB nTab, const String& rPassword, BOOL bApi );
+
+ BOOL ClearItems( const ScMarkData& rMark, const USHORT* pWhich, BOOL bApi );
+ BOOL ChangeIndent( const ScMarkData& rMark, BOOL bIncrement, BOOL bApi );
+ BOOL AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
+ USHORT nFormatNo, BOOL bRecord, BOOL bApi );
+
+ BOOL EnterMatrix( const ScRange& rRange, const ScMarkData* pTabMark,
+ const ScTokenArray* pTokenArray,
+ const String& rString, BOOL bApi, BOOL bEnglish,
+ const String& rFormulaNmsp,
+ const formula::FormulaGrammar::Grammar );
+
+ BOOL TabOp( const ScRange& rRange, const ScMarkData* pTabMark,
+ const ScTabOpParam& rParam, BOOL bRecord, BOOL bApi );
+
+ BOOL FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
+ FillDir eDir, BOOL bRecord, BOOL bApi );
+ BOOL FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
+ FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
+ double fStart, double fStep, double fMax,
+ BOOL bRecord, BOOL bApi );
+ // FillAuto: rRange wird von Source-Range auf Dest-Range angepasst
+ BOOL FillAuto( ScRange& rRange, const ScMarkData* pTabMark,
+ FillDir eDir, ULONG nCount, BOOL bRecord, BOOL bApi );
+
+ BOOL ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, BOOL bApi );
+
+ BOOL MergeCells( const ScRange& rRange, BOOL bContents,
+ BOOL bRecord, BOOL bApi );
+ BOOL UnmergeCells( const ScRange& rRange, BOOL bRecord, BOOL bApi );
+
+ BOOL SetNewRangeNames( ScRangeName* pNewRanges, BOOL bApi ); // takes ownership of pNewRanges
+ BOOL ModifyRangeNames( const ScRangeName& rNewRanges, BOOL bApi );
+
+ BOOL CreateNames( const ScRange& rRange, USHORT nFlags, BOOL bApi );
+ BOOL InsertNameList( const ScAddress& rStartPos, BOOL bApi );
+
+ BOOL InsertAreaLink( const String& rFile, const String& rFilter,
+ const String& rOptions, const String& rSource,
+ const ScRange& rDestRange, ULONG nRefresh,
+ BOOL bFitBlock, BOOL bApi );
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
new file mode 100644
index 000000000000..19147cfaf61f
--- /dev/null
+++ b/sc/source/ui/inc/docsh.hxx
@@ -0,0 +1,468 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DOCSHELL_HXX
+#define SC_DOCSHELL_HXX
+
+
+#include <sfx2/objsh.hxx>
+
+#include <sfx2/docfac.hxx>
+#include <sfx2/sfxmodelfactory.hxx>
+#include <sfx2/viewsh.hxx>
+
+#include "scdllapi.h"
+#include "scdll.hxx"
+#include "document.hxx"
+#include "shellids.hxx"
+#include "refreshtimer.hxx"
+
+#include <hash_map>
+
+class ScEditEngineDefaulter;
+class FontList;
+class PrintDialog;
+class SfxStyleSheetBasePool;
+class SfxStyleSheetHint;
+struct ChartSelectionInfo;
+class INetURLObject;
+
+class ScPaintItem;
+class ScViewData;
+class ScDocFunc;
+class ScDrawLayer;
+class ScTabViewShell;
+class ScSbxDocHelper;
+class ScAutoStyleList;
+class ScRange;
+class ScMarkData;
+class ScPaintLockData;
+class ScJobSetup;
+class ScChangeAction;
+class VirtualDevice;
+class ScImportOptions;
+class ScDocShellModificator;
+class ScOptSolverSave;
+class ScSheetSaveData;
+
+namespace sfx2 { class FileDialogHelper; }
+struct DocShell_Impl;
+
+typedef ::std::hash_map< ULONG, ULONG > ScChangeActionMergeMap;
+
+//==================================================================
+
+//enum ScDBFormat { SC_FORMAT_SDF, SC_FORMAT_DBF };
+
+ // Extra-Flags fuer Repaint
+#define SC_PF_LINES 1
+#define SC_PF_TESTMERGE 2
+#define SC_PF_WHOLEROWS 4
+
+class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
+{
+ static const sal_Char __FAR_DATA pStarCalcDoc[];
+ static const sal_Char __FAR_DATA pStyleName[];
+
+ ScDocument aDocument;
+
+ String aDdeTextFmt;
+ String aConvFilterName; //@ #BugId 54198
+
+ double nPrtToScreenFactor;
+//! FontList* pFontList;
+ DocShell_Impl* pImpl;
+ ScDocFunc* pDocFunc;
+
+ //SfxObjectCreateMode eShellMode;
+
+ BOOL bIsInplace; // wird von der View gesetzt
+ BOOL bHeaderOn;
+ BOOL bFooterOn;
+ BOOL bNoInformLost;
+ BOOL bIsEmpty;
+ BOOL bIsInUndo;
+ BOOL bDocumentModifiedPending;
+ USHORT nDocumentLock;
+ sal_Int16 nCanUpdate; // stores the UpdateDocMode from loading a document till update links
+ BOOL bUpdateEnabled;
+
+ ScDBData* pOldAutoDBRange;
+
+ ScSbxDocHelper* pDocHelper;
+
+ ScAutoStyleList* pAutoStyleList;
+ ScPaintLockData* pPaintLockData;
+ ScJobSetup* pOldJobSetup;
+ ScOptSolverSave* pSolverSaveData;
+ ScSheetSaveData* pSheetSaveData;
+
+ ScDocShellModificator* pModificator; // #109979#; is used to load XML (created in BeforeXMLLoading and destroyed in AfterXMLLoading)
+
+ SC_DLLPRIVATE void InitItems();
+ SC_DLLPRIVATE void DoEnterHandler();
+ SC_DLLPRIVATE void InitOptions(bool bForLoading);
+ SC_DLLPRIVATE void ResetDrawObjectShell();
+
+ // SUNWS needs a forward declared friend, otherwise types and members
+ // of the outer class are not accessible.
+ class PrepareSaveGuard;
+ friend class ScDocShell::PrepareSaveGuard;
+ /** Do things that need to be done before saving to our own format and
+ necessary clean ups in dtor. */
+ class PrepareSaveGuard
+ {
+ public:
+ explicit PrepareSaveGuard( ScDocShell & rDocShell );
+ ~PrepareSaveGuard();
+ private:
+ ScDocShell & mrDocShell;
+ };
+
+ SC_DLLPRIVATE BOOL LoadXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
+ SC_DLLPRIVATE BOOL SaveXML( SfxMedium* pMedium, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
+ SC_DLLPRIVATE SCTAB GetSaveTab();
+
+ SC_DLLPRIVATE ULONG DBaseImport( const String& rFullFileName, CharSet eCharSet,
+ BOOL bSimpleColWidth[MAXCOLCOUNT] );
+ SC_DLLPRIVATE ULONG DBaseExport( const String& rFullFileName, CharSet eCharSet,
+ BOOL& bHasMemo );
+
+ SC_DLLPRIVATE static BOOL MoveFile( const INetURLObject& rSource, const INetURLObject& rDest );
+ SC_DLLPRIVATE static BOOL KillFile( const INetURLObject& rURL );
+ SC_DLLPRIVATE static BOOL IsDocument( const INetURLObject& rURL );
+
+ SC_DLLPRIVATE void LockPaint_Impl(BOOL bDoc);
+ SC_DLLPRIVATE void UnlockPaint_Impl(BOOL bDoc);
+ SC_DLLPRIVATE void LockDocument_Impl(USHORT nNew);
+ SC_DLLPRIVATE void UnlockDocument_Impl(USHORT nNew);
+
+ SC_DLLPRIVATE void EnableSharedSettings( bool bEnable );
+ SC_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > LoadSharedDocument();
+
+ SC_DLLPRIVATE void UseSheetSaveEntries();
+
+protected:
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+public:
+ TYPEINFO();
+
+ SFX_DECL_INTERFACE(SCID_DOC_SHELL)
+ SFX_DECL_OBJECTFACTORY();
+
+ ScDocShell( const ScDocShell& rDocShell );
+ ScDocShell( const sal_uInt64 i_nSfxCreationFlags = SFXMODEL_EMBEDDED_OBJECT );
+ ~ScDocShell();
+
+ using SotObject::GetInterface;
+ using SfxShell::Activate; // with BOOL bMDI
+ using SfxShell::Deactivate; // with BOOL bMDI
+ using SfxObjectShell::Print; // print styles
+
+ virtual void Activate();
+ virtual void Deactivate();
+
+ virtual SfxUndoManager* GetUndoManager();
+
+ virtual void FillClass( SvGlobalName * pClassName,
+ sal_uInt32 * pFormat,
+ String * pAppName,
+ String * pFullTypeName,
+ String * pShortTypeName,
+ sal_Int32 nFileFormat,
+ sal_Bool bTemplate = sal_False ) const;
+
+ virtual BOOL InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& );
+ virtual BOOL Load( SfxMedium& rMedium );
+ virtual BOOL LoadFrom( SfxMedium& rMedium );
+ virtual BOOL ConvertFrom( SfxMedium &rMedium );
+ virtual BOOL Save();
+ virtual BOOL SaveAs( SfxMedium& rMedium );
+ virtual BOOL ConvertTo( SfxMedium &rMedium );
+ virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ virtual void PrepareReload();
+ virtual BOOL IsInformationLost();
+ virtual void LoadStyles( SfxObjectShell &rSource );
+ virtual BOOL Insert( SfxObjectShell &rSource,
+ USHORT nSourceIdx1, USHORT nSourceIdx2, USHORT nSourceIdx3,
+ USHORT &nIdx1, USHORT &nIdx2, USHORT &nIdx3, USHORT &rIdxDeleted );
+
+ virtual BOOL SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& ); // SfxInPlaceObject
+ virtual BOOL DoSaveCompleted( SfxMedium * pNewStor); // SfxObjectShell
+ virtual sal_Bool QuerySlotExecutable( USHORT nSlotId );
+
+ virtual void Draw( OutputDevice *, const JobSetup & rSetup,
+ USHORT nAspect = ASPECT_CONTENT );
+
+ virtual void SetVisArea( const Rectangle & rVisArea );
+
+ using SfxObjectShell::GetVisArea;
+ virtual Rectangle GetVisArea( USHORT nAspect ) const;
+
+ virtual Printer* GetDocumentPrinter();
+
+ virtual void SetModified( BOOL = TRUE );
+
+ void SetVisAreaOrSize( const Rectangle& rVisArea, BOOL bModifyStart );
+
+ virtual SfxDocumentInfoDialog* CreateDocumentInfoDialog( Window *pParent,
+ const SfxItemSet &rSet );
+
+ void GetDocStat( ScDocStat& rDocStat );
+
+ ScDocument* GetDocument() { return &aDocument; }
+ ScDocFunc& GetDocFunc() { return *pDocFunc; }
+
+ SfxPrinter* GetPrinter( BOOL bCreateIfNotExist = TRUE );
+ USHORT SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL );
+
+ void UpdateFontList();
+
+ String CreateObjectName( const String& rPrefix );
+
+ ScDrawLayer* MakeDrawLayer();
+
+ void AsciiSave( SvStream& rStream, const ScImportOptions& rOpt );
+
+ void GetSbxState( SfxItemSet &rSet );
+ void GetDrawObjState( SfxItemSet &rSet );
+
+ void Execute( SfxRequest& rReq );
+ void GetState( SfxItemSet &rSet );
+ void ExecutePageStyle ( SfxViewShell& rCaller, SfxRequest& rReq, SCTAB nCurTab );
+ void GetStatePageStyle( SfxViewShell& rCaller, SfxItemSet& rSet, SCTAB nCurTab );
+
+ void CompareDocument( ScDocument& rOtherDoc );
+ void MergeDocument( ScDocument& rOtherDoc, bool bShared = false, bool bCheckDuplicates = false, ULONG nOffset = 0, ScChangeActionMergeMap* pMergeMap = NULL, bool bInverseMap = false );
+ bool MergeSharedDocument( ScDocShell* pSharedDocShell );
+
+ ScChangeAction* GetChangeAction( const ScAddress& rPos );
+ void SetChangeComment( ScChangeAction* pAction, const String& rComment );
+ void ExecuteChangeCommentDialog( ScChangeAction* pAction, Window* pParent,BOOL bPrevNext=TRUE );
+ /// Protect/unprotect ChangeTrack and return <TRUE/> if
+ /// protection was successfully changed.
+ /// If bJustQueryIfProtected==TRUE protection is not
+ /// changed and <TRUE/> is returned if not protected or
+ /// password was entered correctly.
+ BOOL ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQueryIfProtected = FALSE );
+
+ void SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages );
+ BOOL AdjustPrintZoom( const ScRange& rRange );
+
+ void LoadStylesArgs( ScDocShell& rSource, BOOL bReplace, BOOL bCellStyles, BOOL bPageStyles );
+
+ void PageStyleModified( const String& rStyleName, BOOL bApi );
+
+ void NotifyStyle( const SfxStyleSheetHint& rHint );
+ void DoAutoStyle( const ScRange& rRange, const String& rStyle );
+
+ Window* GetActiveDialogParent();
+ void ErrorMessage( USHORT nGlobStrId );
+ BOOL IsEditable() const;
+
+ BOOL AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab );
+ void UpdateAllRowHeights( const ScMarkData* pTabMark = NULL );
+ void UpdatePendingRowHeights( SCTAB nUpdateTab, bool bBefore = false );
+
+ void RefreshPivotTables( const ScRange& rSource );
+ void DoConsolidate( const ScConsolidateParam& rParam, BOOL bRecord = TRUE );
+ void UseScenario( SCTAB nTab, const String& rName, BOOL bRecord = TRUE );
+ SCTAB MakeScenario( SCTAB nTab, const String& rName, const String& rComment,
+ const Color& rColor, USHORT nFlags,
+ ScMarkData& rMark, BOOL bRecord = TRUE );
+ void ModifyScenario( SCTAB nTab, const String& rName, const String& rComment,
+ const Color& rColor, USHORT nFlags );
+ BOOL MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRecord );
+
+ void DoRecalc( BOOL bApi );
+ void DoHardRecalc( BOOL bApi );
+
+ bool CheckPrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData,
+ bool bForceSelected, bool bIsAPI );
+ void PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData );
+ void Print( SfxProgress& rProgress, PrintDialog* pPrintDialog,
+ ScMarkData* pMarkData, Window* pDialogParent,
+ BOOL bForceSelected, BOOL bIsAPI );
+
+ void UpdateOle( const ScViewData* pViewData, BOOL bSnapSize = FALSE );
+ BOOL IsOle();
+
+ void DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
+ ScDBData* GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGetDBSelection eSel );
+ ScDBData* GetOldAutoDBRange(); // has to be deleted by caller!
+ void CancelAutoDBRange(); // called when dialog is cancelled
+
+ void UpdateLinks(); // Link-Eintraege aktuallisieren
+ BOOL ReloadTabLinks(); // Links ausfuehren (Inhalt aktualisieren)
+
+ void PostEditView( ScEditEngineDefaulter* pEditEngine, const ScAddress& rCursorPos );
+
+ void PostPaint( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, USHORT nPart,
+ USHORT nExtFlags = 0 );
+ void PostPaint( const ScRange& rRange, USHORT nPart, USHORT nExtFlags = 0 );
+
+ void PostPaintCell( SCCOL nCol, SCROW nRow, SCTAB nTab );
+ void PostPaintCell( const ScAddress& rPos );
+ void PostPaintGridAll();
+ void PostPaintExtras();
+
+ void PostDataChanged();
+
+ void UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
+ SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab );
+ void UpdatePaintExt( USHORT& rExtFlags, const ScRange& rRange );
+
+ void SetDocumentModified( BOOL bIsModified = TRUE );
+ void SetDrawModified( BOOL bIsModified = TRUE );
+
+ void LockPaint();
+ void UnlockPaint();
+ USHORT GetLockCount() const;
+ void SetLockCount(USHORT nNew);
+
+ void LockDocument();
+ void UnlockDocument();
+
+ DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
+
+ virtual SfxStyleSheetBasePool* GetStyleSheetPool();
+
+ void SetInplace( BOOL bInplace );
+ BOOL IsEmpty() const;
+ void SetEmpty(BOOL bSet);
+
+ BOOL IsInUndo() const { return bIsInUndo; }
+ void SetInUndo(BOOL bSet);
+
+ void CalcOutputFactor();
+ double GetOutputFactor() const;
+ void GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet,
+ SCTAB nCurTab,
+ BOOL& rbHeader,
+ BOOL& rbFooter );
+
+ virtual long DdeGetData( const String& rItem, const String& rMimeType,
+ ::com::sun::star::uno::Any & rValue );
+ virtual long DdeSetData( const String& rItem, const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue );
+ virtual ::sfx2::SvLinkSource* DdeCreateLinkSource( const String& rItem );
+
+ const String& GetDdeTextFmt() const { return aDdeTextFmt; }
+
+ SfxBindings* GetViewBindings();
+
+ ScTabViewShell* GetBestViewShell( BOOL bOnlyVisible = TRUE );
+ ScSbxDocHelper* GetDocHelperObject() { return pDocHelper; }
+
+ void SetDocumentModifiedPending( BOOL bVal )
+ { bDocumentModifiedPending = bVal; }
+ BOOL IsDocumentModifiedPending() const
+ { return bDocumentModifiedPending; }
+
+ BOOL IsUpdateEnabled() const
+ { return bUpdateEnabled; }
+ void SetUpdateEnabled(BOOL bValue)
+ { bUpdateEnabled = bValue; }
+
+ OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
+
+ static ScViewData* GetViewData();
+ static SCTAB GetCurTab();
+
+ static ScDocShell* GetShellByNum( USHORT nDocNo );
+ static String GetOwnFilterName();
+ static String GetHtmlFilterName();
+ static String GetWebQueryFilterName();
+ static String GetAsciiFilterName();
+ static String GetLotusFilterName();
+ static String GetDBaseFilterName();
+ static String GetDifFilterName();
+ static BOOL HasAutomaticTableName( const String& rFilter );
+
+ DECL_LINK( RefreshDBDataHdl, ScRefreshTimer* );
+
+ void BeforeXMLLoading();
+ void AfterXMLLoading(sal_Bool bRet);
+
+ virtual sal_uInt16 GetHiddenInformationState( sal_uInt16 nStates );
+
+ const ScOptSolverSave* GetSolverSaveData() const { return pSolverSaveData; } // may be null
+ void SetSolverSaveData( const ScOptSolverSave& rData );
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ sal_Bool AcceptStateUpdate() const;
+ //-->Added by PengYunQuan for Validity Cell Range Picker
+ ScSheetSaveData* GetSheetSaveData();
+
+ // passwword protection for Calc (derived from SfxObjectShell)
+ // see also: FID_CHG_RECORD, SID_CHG_PROTECT
+ virtual bool IsChangeRecording() const;
+ virtual bool HasChangeRecordProtection() const;
+ virtual void SetChangeRecording( bool bActivate );
+ virtual bool SetProtectionPassword( const String &rPassword );
+ virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash );
+};
+
+
+void UpdateAcceptChangesDialog();
+
+
+SO2_DECL_REF(ScDocShell)
+SO2_IMPL_REF(ScDocShell)
+
+
+// Vor Modifizierungen des Dokuments anlegen und danach zerstoeren.
+// Merkt sich im Ctor AutoCalcShellDisabled und IdleDisabled, schaltet sie ab
+// und stellt sie im Dtor wieder her, AutoCalcShellDisabled ggbf. auch vor
+// einem ScDocShell SetDocumentModified.
+// SetDocumentModified hierdran aufrufen statt an der ScDocShell.
+// Im Dtor wird wenn ScDocShell bDocumentModifiedPending gesetzt ist und
+// bAutoCalcShellDisabled nicht gesetzt ist ein SetDocumentModified gerufen.
+class SC_DLLPUBLIC ScDocShellModificator
+{
+ ScDocShell& rDocShell;
+ ScRefreshTimerProtector aProtector;
+ BOOL bAutoCalcShellDisabled;
+ BOOL bIdleDisabled;
+
+ // not implemented
+ ScDocShellModificator( const ScDocShellModificator& );
+ ScDocShellModificator& operator=( const ScDocShellModificator& );
+
+public:
+ ScDocShellModificator( ScDocShell& );
+ ~ScDocShellModificator();
+ void SetDocumentModified();
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/dpcontrol.hrc b/sc/source/ui/inc/dpcontrol.hrc
new file mode 100644
index 000000000000..687f999970ad
--- /dev/null
+++ b/sc/source/ui/inc/dpcontrol.hrc
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __DPCONTROL_HRC__
+#define __DPCONTROL_HRC__
+
+#include <sc.hrc>
+
+#define STR_MENU_SORT_ASC 1
+#define STR_MENU_SORT_DESC 2
+#define STR_MENU_SORT_CUSTOM 3
+#define STR_BTN_TOGGLE_ALL 4
+#define STR_BTN_SELECT_CURRENT 5
+#define STR_BTN_UNSELECT_CURRENT 6
+
+#endif
diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx
new file mode 100644
index 000000000000..25cb3e05acac
--- /dev/null
+++ b/sc/source/ui/inc/dpcontrol.hxx
@@ -0,0 +1,363 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DPCONTROL_HXX
+#define SC_DPCONTROL_HXX
+
+#include "rtl/ustring.hxx"
+#include "tools/gen.hxx"
+#include "tools/fract.hxx"
+#include "vcl/popupmenuwindow.hxx"
+#include "vcl/button.hxx"
+#include "vcl/scrbar.hxx"
+#include "vcl/timer.hxx"
+#include "svx/checklbx.hxx"
+
+#include <boost/shared_ptr.hpp>
+#include <memory>
+#include <hash_map>
+
+namespace com { namespace sun { namespace star {
+
+ namespace accessibility {
+ class XAccessible;
+ }
+
+}}}
+
+class OutputDevice;
+class Point;
+class Size;
+class StyleSettings;
+class Window;
+class ScDocument;
+class ScAccessibleFilterMenu;
+
+/**
+ * This class takes care of physically drawing field button controls inside
+ * data pilot tables.
+ */
+class ScDPFieldButton
+{
+public:
+ ScDPFieldButton(OutputDevice* pOutDev, const StyleSettings* pStyle, const Fraction* pZoomX = NULL, const Fraction* pZoomY = NULL,
+ ScDocument* pDoc = NULL);
+ ~ScDPFieldButton();
+
+ void setText(const ::rtl::OUString& rText);
+ void setBoundingBox(const Point& rPos, const Size& rSize, bool bLayoutRTL);
+ void setDrawBaseButton(bool b);
+ void setDrawPopupButton(bool b);
+ void setHasHiddenMember(bool b);
+ void setPopupPressed(bool b);
+ void setPopupLeft(bool b);
+ void draw();
+
+ void getPopupBoundingBox(Point& rPos, Size& rSize) const;
+
+private:
+ void drawPopupButton();
+
+private:
+ Point maPos;
+ Size maSize;
+ ::rtl::OUString maText;
+ Fraction maZoomX;
+ Fraction maZoomY;
+ ScDocument* mpDoc;
+ OutputDevice* mpOutDev;
+ const StyleSettings* mpStyle;
+ bool mbBaseButton;
+ bool mbPopupButton;
+ bool mbHasHiddenMember;
+ bool mbPopupPressed;
+ bool mbPopupLeft;
+};
+
+// ============================================================================
+
+class ScMenuFloatingWindow : public PopupMenuFloatingWindow
+{
+public:
+ static size_t MENU_NOT_SELECTED;
+ /**
+ * Action to perform when an event takes place. Create a sub-class of
+ * this to implement the desired action.
+ */
+ class Action
+ {
+ public:
+ virtual void execute() = 0;
+ };
+
+ explicit ScMenuFloatingWindow(Window* pParent, ScDocument* pDoc, USHORT nMenuStackLevel = 0);
+ virtual ~ScMenuFloatingWindow();
+
+ virtual void MouseMove(const MouseEvent& rMEvt);
+ virtual void MouseButtonDown(const MouseEvent& rMEvt);
+ virtual void MouseButtonUp(const MouseEvent& rMEvt);
+ virtual void KeyInput(const KeyEvent& rKEvt);
+ virtual void Paint(const Rectangle& rRect);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ void addMenuItem(const ::rtl::OUString& rText, bool bEnabled, Action* pAction);
+ ScMenuFloatingWindow* addSubMenuItem(const ::rtl::OUString& rText, bool bEnabled);
+ void setSelectedMenuItem(size_t nPos, bool bSubMenuTimer, bool bEnsureSubMenu);
+ void selectMenuItem(size_t nPos, bool bSelected, bool bSubMenuTimer);
+ void clearSelectedMenuItem();
+ ScMenuFloatingWindow* getSubMenuWindow(size_t nPos) const;
+ bool isMenuItemSelected(size_t nPos) const;
+ size_t getSelectedMenuItem() const;
+
+ void setName(const ::rtl::OUString& rName);
+ const ::rtl::OUString& getName() const;
+
+ void executeMenuItem(size_t nPos);
+ void getMenuItemPosSize(size_t nPos, Point& rPos, Size& rSize) const;
+ ScMenuFloatingWindow* getParentMenuWindow() const;
+
+protected:
+
+ void drawMenuItem(size_t nPos);
+ void drawAllMenuItems();
+ const Font& getLabelFont() const;
+
+ void queueLaunchSubMenu(size_t nPos, ScMenuFloatingWindow* pMenu);
+ void queueCloseSubMenu();
+ void launchSubMenu(bool bSetMenuPos);
+ void endSubMenu(ScMenuFloatingWindow* pSubMenu);
+
+ void fillMenuItemsToAccessible(ScAccessibleFilterMenu* pAccMenu) const;
+
+ ScDocument* getDoc();
+
+protected:
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > mxAccessible;
+
+private:
+ struct SubMenuItemData;
+ void handleMenuTimeout(SubMenuItemData* pTimer);
+
+ void resizeToFitMenuItems();
+ void highlightMenuItem(size_t nPos, bool bSelected);
+
+ size_t getEnclosingMenuItem(const Point& rPos) const;
+ size_t getSubMenuPos(ScMenuFloatingWindow* pSubMenu);
+
+ /**
+ * Fire a menu highlight event since the accessibility framework needs
+ * this to track focus on menu items.
+ */
+ void fireMenuHighlightedEvent();
+
+ /**
+ * Make sure that the specified submenu is permanently up, the submenu
+ * close timer is not active, and the correct menu item associated with
+ * the submenu is highlighted.
+ */
+ void setSubMenuFocused(ScMenuFloatingWindow* pSubMenu);
+
+ /**
+ * When a menu item of an invisible submenu is selected, we need to make
+ * sure that all its parent menu(s) are visible, with the right menu item
+ * highlighted in each of the parents. Calling this method ensures it.
+ */
+ void ensureSubMenuVisible(ScMenuFloatingWindow* pSubMenu);
+
+ /**
+ * Dismiss any visible child submenus when a menu item of a parent menu is
+ * selected.
+ */
+ void ensureSubMenuNotVisible();
+
+ /**
+ * Dismiss all visible popup menus and set focus back to the application
+ * window. This method is called e.g. when a menu action is fired.
+ */
+ void terminateAllPopupMenus();
+
+ DECL_LINK( PopupEndHdl, void* );
+
+private:
+
+ struct MenuItemData
+ {
+ ::rtl::OUString maText;
+ bool mbEnabled;
+
+ ::boost::shared_ptr<Action> mpAction;
+ ::boost::shared_ptr<ScMenuFloatingWindow> mpSubMenuWin;
+
+ MenuItemData();
+ };
+
+ ::std::vector<MenuItemData> maMenuItems;
+
+ struct SubMenuItemData
+ {
+ Timer maTimer;
+ ScMenuFloatingWindow* mpSubMenu;
+ size_t mnMenuPos;
+
+ DECL_LINK( TimeoutHdl, void* );
+
+ SubMenuItemData(ScMenuFloatingWindow* pParent);
+ void reset();
+
+ private:
+ ScMenuFloatingWindow* mpParent;
+ };
+ SubMenuItemData maOpenTimer;
+ SubMenuItemData maCloseTimer;
+
+ Font maLabelFont;
+
+ // Name of this menu window, taken from the menu item of the parent window
+ // that launches it (if this is a sub menu). If this is a top-level menu
+ // window, then this name can be anything.
+ ::rtl::OUString maName;
+
+ size_t mnSelectedMenu;
+ size_t mnClickedMenu;
+
+ ScDocument* mpDoc;
+
+ ScMenuFloatingWindow* mpParentMenu;
+ ScMenuFloatingWindow* mpActiveSubMenu;
+};
+
+// ============================================================================
+
+/**
+ * This class implements a popup window for field button, for quick access
+ * of hide-item list, and possibly more stuff related to field options.
+ */
+class ScDPFieldPopupWindow : public ScMenuFloatingWindow
+{
+public:
+ /**
+ * Extended data that the client code may need to store. Create a
+ * sub-class of this and store data there.
+ */
+ struct ExtendedData {};
+
+ explicit ScDPFieldPopupWindow(Window* pParent, ScDocument* pDoc);
+ virtual ~ScDPFieldPopupWindow();
+
+ virtual void MouseMove(const MouseEvent& rMEvt);
+ virtual long Notify(NotifyEvent& rNEvt);
+ virtual void Paint(const Rectangle& rRect);
+ virtual Window* GetPreferredKeyInputWindow();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ void setMemberSize(size_t n);
+ void addMember(const ::rtl::OUString& rName, bool bVisible);
+ void initMembers();
+
+ const Size& getWindowSize() const;
+
+ void getResult(::std::hash_map< ::rtl::OUString, bool, ::rtl::OUStringHash>& rResult);
+ void close(bool bOK);
+
+ /**
+ * Set auxiliary data that the client code might need. Note that this
+ * popup window class manages its life time; no explicit deletion of the
+ * instance is needed in the client code.
+ */
+ void setExtendedData(ExtendedData* p);
+
+ /**
+ * Get the store auxiliary data, or NULL if no such data is stored.
+ */
+ ExtendedData* getExtendedData();
+
+ void setOKAction(Action* p);
+
+private:
+ struct Member
+ {
+ ::rtl::OUString maName;
+ bool mbVisible;
+
+ Member();
+ };
+
+ class CancelButton : public ::CancelButton
+ {
+ public:
+ CancelButton(ScDPFieldPopupWindow* pParent);
+
+ virtual void Click();
+
+ private:
+ ScDPFieldPopupWindow* mpParent;
+ };
+
+ enum SectionType {
+ WHOLE, // entire window
+ LISTBOX_AREA_OUTER, // box enclosing the check box items.
+ LISTBOX_AREA_INNER, // box enclosing the check box items.
+ SINGLE_BTN_AREA, // box enclosing the single-action buttons.
+ CHECK_TOGGLE_ALL, // check box for toggling all items.
+ BTN_SINGLE_SELECT,
+ BTN_SINGLE_UNSELECT,
+ BTN_OK, // OK button
+ BTN_CANCEL, // Cancel button
+ };
+ void getSectionPosSize(Point& rPos, Size& rSize, SectionType eType) const;
+
+ void setAllMemberState(bool bSet);
+ void selectCurrentMemberOnly(bool bSet);
+ void cycleFocus(bool bReverse = false);
+
+ DECL_LINK( ButtonHdl, Button* );
+ DECL_LINK( TriStateHdl, TriStateBox* );
+ DECL_LINK( CheckHdl, SvTreeListBox* );
+
+private:
+ SvxCheckListBox maChecks;
+
+ TriStateBox maChkToggleAll;
+ ImageButton maBtnSelectSingle;
+ ImageButton maBtnUnselectSingle;
+
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+
+ ::std::vector<Window*> maTabStopCtrls;
+ size_t mnCurTabStop;
+
+ ::std::vector<Member> maMembers;
+ ::std::auto_ptr<ExtendedData> mpExtendedData;
+ ::std::auto_ptr<Action> mpOKAction;
+
+ const Size maWndSize; /// hard-coded window size.
+ TriState mePrevToggleAllState;
+};
+
+#endif
diff --git a/sc/source/ui/inc/dpgroupdlg.hxx b/sc/source/ui/inc/dpgroupdlg.hxx
new file mode 100644
index 000000000000..52f2e7c8f592
--- /dev/null
+++ b/sc/source/ui/inc/dpgroupdlg.hxx
@@ -0,0 +1,172 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DPGROUPDLG_HXX
+#define SC_DPGROUPDLG_HXX
+
+#ifndef _FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _DIALOG_HXX
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/field.hxx>
+#include <svx/checklbx.hxx>
+#include "editfield.hxx"
+#include "dpgroup.hxx"
+
+// ============================================================================
+
+class ScDPGroupEditHelper
+{
+public:
+ explicit ScDPGroupEditHelper(
+ RadioButton& rRbAuto, RadioButton& rRbMan,
+ Edit& rEdValue );
+
+ bool IsAuto() const;
+ double GetValue() const;
+ void SetValue( bool bAuto, double fValue );
+
+private:
+ virtual bool ImplGetValue( double& rfValue ) const = 0;
+ virtual void ImplSetValue( double fValue ) = 0;
+
+ DECL_LINK( ClickHdl, RadioButton* );
+
+private:
+ RadioButton& mrRbAuto;
+ RadioButton& mrRbMan;
+ Edit& mrEdValue;
+};
+
+// ----------------------------------------------------------------------------
+
+class ScDPNumGroupEditHelper : public ScDPGroupEditHelper
+{
+public:
+ explicit ScDPNumGroupEditHelper(
+ RadioButton& rRbAuto, RadioButton& rRbMan,
+ ScDoubleField& rEdValue );
+
+private:
+ virtual bool ImplGetValue( double& rfValue ) const;
+ virtual void ImplSetValue( double fValue );
+
+private:
+ ScDoubleField& mrEdValue;
+};
+
+// ----------------------------------------------------------------------------
+
+class ScDPDateGroupEditHelper : public ScDPGroupEditHelper
+{
+public:
+ explicit ScDPDateGroupEditHelper(
+ RadioButton& rRbAuto, RadioButton& rRbMan,
+ DateField& rEdValue, const Date& rNullDate );
+
+private:
+ virtual bool ImplGetValue( double& rfValue ) const;
+ virtual void ImplSetValue( double fValue );
+
+private:
+ DateField& mrEdValue;
+ Date maNullDate;
+};
+
+// ============================================================================
+// ============================================================================
+
+class ScDPNumGroupDlg : public ModalDialog
+{
+public:
+ explicit ScDPNumGroupDlg( Window* pParent, const ScDPNumGroupInfo& rInfo );
+
+ ScDPNumGroupInfo GetGroupInfo() const;
+
+private:
+ FixedLine maFlStart;
+ RadioButton maRbAutoStart;
+ RadioButton maRbManStart;
+ ScDoubleField maEdStart;
+ FixedLine maFlEnd;
+ RadioButton maRbAutoEnd;
+ RadioButton maRbManEnd;
+ ScDoubleField maEdEnd;
+ FixedLine maFlBy;
+ ScDoubleField maEdBy;
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+ ScDPNumGroupEditHelper maStartHelper;
+ ScDPNumGroupEditHelper maEndHelper;
+};
+
+// ============================================================================
+
+class ScDPDateGroupDlg : public ModalDialog
+{
+public:
+ explicit ScDPDateGroupDlg( Window* pParent, const ScDPNumGroupInfo& rInfo,
+ sal_Int32 nDatePart, const Date& rNullDate );
+
+ ScDPNumGroupInfo GetGroupInfo() const;
+ sal_Int32 GetDatePart() const;
+
+private:
+ DECL_LINK( ClickHdl, RadioButton* );
+ DECL_LINK( CheckHdl, SvxCheckListBox* );
+
+private:
+ FixedLine maFlStart;
+ RadioButton maRbAutoStart;
+ RadioButton maRbManStart;
+ DateField maEdStart;
+ FixedLine maFlEnd;
+ RadioButton maRbAutoEnd;
+ RadioButton maRbManEnd;
+ DateField maEdEnd;
+ FixedLine maFlBy;
+ RadioButton maRbNumDays;
+ RadioButton maRbUnits;
+ NumericField maEdNumDays;
+ SvxCheckListBox maLbUnits;
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+ ScDPDateGroupEditHelper maStartHelper;
+ ScDPDateGroupEditHelper maEndHelper;
+};
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx
new file mode 100644
index 000000000000..d417d1427dda
--- /dev/null
+++ b/sc/source/ui/inc/drawsh.hxx
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DRAWSH_HXX
+#define SC_DRAWSH_HXX
+
+#include <sfx2/shell.hxx>
+#include "shellids.hxx"
+#include <sfx2/module.hxx>
+#include <svx/svdmark.hxx>
+#include <tools/link.hxx>
+
+class AbstractSvxNameDialog; //CHINA001 class SvxNameDialog;
+class ScViewData;
+class ScDrawView;
+
+class ScDrawShell : public SfxShell
+{
+ ScViewData* pViewData;
+
+ DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* );
+
+#ifdef ISSUE66550_HLINK_FOR_SHAPES
+ void SetHlinkForObject( SdrObject* pObj, const rtl::OUString& rHlnk );
+#endif
+
+protected:
+ ScViewData* GetViewData() { return pViewData; }
+
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_DRAW_SHELL)
+
+ ScDrawShell(ScViewData* pData);
+ ~ScDrawShell();
+
+ void StateDisableItems( SfxItemSet &rSet );
+
+ void ExecDrawAttr(SfxRequest& rReq);
+ void GetDrawAttrState(SfxItemSet &rSet);
+ void GetAttrFuncState(SfxItemSet &rSet);
+
+ void ExecDrawFunc(SfxRequest& rReq);
+ void GetDrawFuncState(SfxItemSet &rSet);
+ void GetState(SfxItemSet &rSet);
+
+ void ExecFormText(SfxRequest& rReq); // StarFontWork
+ void GetFormTextState(SfxItemSet& rSet);
+
+ void ExecuteHLink(SfxRequest& rReq); // Hyperlink
+ void GetHLinkState(SfxItemSet& rSet);
+
+ void ExecFormatPaintbrush(SfxRequest& rReq);
+ void StateFormatPaintbrush(SfxItemSet& rSet);
+
+ void ExecuteMacroAssign( SdrObject* pObj, Window* pWin );
+ void ExecuteLineDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff );
+ void ExecuteAreaDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff );
+ void ExecuteTextAttrDlg( SfxRequest& rReq, USHORT nTabPage = 0xffff );
+
+ ScDrawView* GetDrawView();
+
+ BOOL AreAllObjectsOnLayer(USHORT nLayerNo,const SdrMarkList& rMark);
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/drawutil.hxx b/sc/source/ui/inc/drawutil.hxx
new file mode 100644
index 000000000000..67e1c0ba836f
--- /dev/null
+++ b/sc/source/ui/inc/drawutil.hxx
@@ -0,0 +1,51 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DRAWUTIL_HXX
+#define SC_DRAWUTIL_HXX
+
+#include "address.hxx"
+#include <tools/solar.h>
+
+class Fraction;
+class OutputDevice;
+class ScDocument;
+
+class ScDrawUtil
+{
+public:
+ static void CalcScale( ScDocument* pDoc, SCTAB nTab,
+ SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+ OutputDevice* pDev, const Fraction& rZoomX, const Fraction& rZoomY,
+ double nPPTX, double nPPTY,
+ Fraction& rScaleX, Fraction& rScaleY );
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
new file mode 100644
index 000000000000..fa6b03638551
--- /dev/null
+++ b/sc/source/ui/inc/drawview.hxx
@@ -0,0 +1,151 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DRAWVIEW_HXX
+#define SC_DRAWVIEW_HXX
+
+#include <svx/fmview.hxx>
+
+#include "global.hxx"
+
+namespace com { namespace sun { namespace star { namespace datatransfer { class XTransferable; } } } }
+
+class ScDocument;
+class ScViewData;
+class ScDrawObjData;
+
+class ScDrawView: public FmFormView
+{
+ ScViewData* pViewData;
+ OutputDevice* pDev; //! noetig ?
+ ScDocument* pDoc;
+ SCTAB nTab;
+ Fraction aScaleX; // Faktor fuer Drawing-MapMode
+ Fraction aScaleY;
+ SdrDropMarkerOverlay* pDropMarker;
+ SdrObject* pDropMarkObj;
+ BOOL bInConstruct;
+ //HMHBOOL bDisableHdl;
+
+ void Construct();
+ void UpdateBrowser();
+
+protected:
+ virtual void ModelHasChanged();
+
+ // add custom handles (used by other apps, e.g. AnchorPos)
+ virtual void AddCustomHdl();
+
+ void ImplClearCalcDropMarker();
+
+public:
+ ScDrawView( OutputDevice* pOut, ScViewData* pData );
+ virtual ~ScDrawView();
+
+ virtual void MarkListHasChanged();
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ virtual void DoConnect(SdrOle2Obj* pOleObj);
+
+ virtual void MakeVisible( const Rectangle& rRect, Window& rWin );
+
+ virtual void DeleteMarked();
+
+ void DrawMarks( OutputDevice* pOut ) const;
+
+ void MarkDropObj( SdrObject* pObj );
+
+ //HMHBOOL IsDisableHdl() const { return bDisableHdl; }
+
+ void SetMarkedToLayer( BYTE nLayerNo );
+
+ void InvalidateAttribs();
+ void InvalidateDrawTextAttrs();
+
+ BOOL BeginDrag( Window* pWindow, const Point& rStartPos );
+ void DoCut();
+ void DoCopy();
+
+ void GetScale( Fraction& rFractX, Fraction& rFractY ) const;
+ void RecalcScale();
+ void UpdateWorkArea();
+ SCTAB GetTab() const { return nTab; }
+
+ void CalcNormScale( Fraction& rFractX, Fraction& rFractY ) const;
+
+ void SetAnchor( ScAnchorType );
+ ScAnchorType GetAnchor() const;
+
+ void VCAddWin( Window* pWin );
+ void VCRemoveWin( Window* pWin );
+
+ void UpdateIMap( SdrObject* pObj );
+
+ USHORT GetPopupMenuId();
+ void UpdateUserViewOptions();
+
+ void SetMarkedOriginalSize();
+
+ BOOL SelectObject( const String& rName );
+//UNUSED2008-05 String GetSelectedChartName() const;
+ bool HasMarkedControl() const;
+ bool HasMarkedInternal() const;
+
+ FASTBOOL InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, ULONG nOptions=0);
+
+ /** Returns the selected object, if it is the caption object of a cell note.
+ @param ppCaptData (out-param) If not null, returns the pointer to the caption object data. */
+ SdrObject* GetMarkedNoteCaption( ScDrawObjData** ppCaptData = 0 );
+
+ /** Locks/unlocks the specified layer in the draw page.
+ Unlocked layer is required to be able to edit the contained objects. */
+ void LockCalcLayer( SdrLayerID nLayer, bool bLock = true );
+ /** Unlocks the specified layer in the draw page. */
+ inline void UnlockCalcLayer( SdrLayerID nLayer ) { LockCalcLayer( nLayer, false ); }
+
+ /** Locks/unlocks the background layer that contains background objects.
+ Unlocked layer is required to be able to edit the objects. */
+ inline void LockBackgroundLayer( bool bLock = true ) { LockCalcLayer( SC_LAYER_BACK, bLock ); }
+ /** Unlocks the background layer that contains background objects. */
+ inline void UnlockBackgroundLayer() { LockBackgroundLayer( false ); }
+
+ /** Locks/unlocks the internal layer that contains caption objects of cell notes.
+ Unlocked layer is required to be able to edit the contained objects. */
+ inline void LockInternalLayer( bool bLock = true ) { LockCalcLayer( SC_LAYER_INTERN, bLock ); }
+ /** Unlocks the internal layer that contains caption objects of cell notes. */
+ inline void UnlockInternalLayer() { LockInternalLayer( false ); }
+
+ SdrEndTextEditKind ScEndTextEdit(); // ruft SetDrawTextUndo(0)
+//UNUSED2009-05 void CaptionTextDirection(USHORT nSlot);
+ ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > CopyToTransferable();
+};
+
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/drformsh.hxx b/sc/source/ui/inc/drformsh.hxx
new file mode 100644
index 000000000000..7f7473eb7519
--- /dev/null
+++ b/sc/source/ui/inc/drformsh.hxx
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef DRFORMSH_HXX
+#define DRFORMSH_HXX
+
+#include <sfx2/shell.hxx>
+#include "shellids.hxx"
+#include <sfx2/module.hxx>
+#include <svx/svdmark.hxx>
+
+class ScViewData;
+
+
+#include "drawsh.hxx"
+
+class ScDrawFormShell: public ScDrawShell
+{
+public:
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_FORM_SHELL)
+
+ ScDrawFormShell(ScViewData* pData);
+ virtual ~ScDrawFormShell();
+
+// void Execute(SfxRequest &);
+// void GetState(SfxItemSet &);
+};
+
+#endif
diff --git a/sc/source/ui/inc/drtxtob.hxx b/sc/source/ui/inc/drtxtob.hxx
new file mode 100644
index 000000000000..5c493df2f769
--- /dev/null
+++ b/sc/source/ui/inc/drtxtob.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DRTXTOB_HXX
+#define SC_DRTXTOB_HXX
+
+#ifndef _SFX_HXX
+#endif
+
+#include <sfx2/shell.hxx>
+#include <sfx2/module.hxx>
+#include <tools/link.hxx>
+
+#include "shellids.hxx"
+
+USHORT ScGetFontWorkId(); // statt SvxFontWorkChildWindow::GetChildWindowId()
+
+class ScViewData;
+class TransferableDataHelper;
+class TransferableClipboardListener;
+
+class ScDrawTextObjectBar : public SfxShell
+{
+ ScViewData* pViewData;
+ TransferableClipboardListener* pClipEvtLstnr;
+ BOOL bPastePossible;
+
+ DECL_LINK( ClipboardChanged, TransferableDataHelper* );
+
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_DRAW_TEXT_SHELL)
+
+ ScDrawTextObjectBar(ScViewData* pData);
+ ~ScDrawTextObjectBar();
+
+ void StateDisableItems( SfxItemSet &rSet );
+
+ void Execute( SfxRequest &rReq );
+ void ExecuteTrans( SfxRequest& rReq );
+ void GetState( SfxItemSet& rSet );
+ void GetClipState( SfxItemSet& rSet );
+
+ void ExecuteAttr( SfxRequest &rReq );
+ void GetAttrState( SfxItemSet& rSet );
+ void ExecuteToggle( SfxRequest &rReq );
+
+ BOOL ExecuteCharDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet );
+ BOOL ExecuteParaDlg( const SfxItemSet& rArgs, SfxItemSet& rOutSet );
+
+ void ExecuteExtra( SfxRequest &rReq );
+ void ExecFormText(SfxRequest& rReq); // StarFontWork
+ void GetFormTextState(SfxItemSet& rSet);
+
+private:
+ void ExecuteGlobal( SfxRequest &rReq ); // von Execute gerufen fuer ganze Objekte
+ void GetGlobalClipState( SfxItemSet& rSet );
+ void ExecutePasteContents( SfxRequest &rReq );
+ BOOL IsNoteEdit();
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx
new file mode 100644
index 000000000000..9a1175d3310d
--- /dev/null
+++ b/sc/source/ui/inc/drwtrans.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_DRWTRANS_HXX
+#define SC_DRWTRANS_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <svtools/transfer.hxx>
+
+#include <sfx2/objsh.hxx>
+#include "global.hxx"
+
+
+class SdrModel;
+class ScDocShell;
+class INetBookmark;
+class SdrObject;
+class SdrView;
+class ScDrawView;
+class SdrOle2Obj;
+
+class ScDrawTransferObj : public TransferableHelper
+{
+private:
+ SdrModel* pModel;
+ TransferableDataHelper aOleData;
+ TransferableObjectDescriptor aObjDesc;
+//REMOVE SvEmbeddedObjectRef aDocShellRef;
+//REMOVE SvEmbeddedObjectRef aDrawPersistRef;
+ SfxObjectShellRef aDocShellRef;
+ SfxObjectShellRef aDrawPersistRef;
+
+ // extracted from model in ctor:
+ Size aSrcSize;
+ INetBookmark* pBookmark;
+ BOOL bGraphic;
+ BOOL bGrIsBit;
+ BOOL bOleObj;
+ // source information for drag&drop:
+ // (view is needed to handle drawing obejcts)
+ SdrView* pDragSourceView;
+ USHORT nDragSourceFlags;
+ BOOL bDragWasInternal;
+
+ sal_uInt32 nSourceDocID;
+
+
+ void InitDocShell();
+//REMOVE SvInPlaceObjectRef GetSingleObject();
+ SdrOle2Obj* GetSingleObject();
+
+public:
+ ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContainerShell,
+ const TransferableObjectDescriptor& rDesc );
+ virtual ~ScDrawTransferObj();
+
+ virtual void AddSupportedFormats();
+ virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId,
+ const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual void ObjectReleased();
+ virtual void DragFinished( sal_Int8 nDropAction );
+
+ SdrModel* GetModel() { return pModel; }
+
+ void SetDrawPersist( const SfxObjectShellRef& rRef );
+ void SetDragSource( ScDrawView* pView );
+ void SetDragSourceObj( SdrObject* pObj, SCTAB nTab );
+ void SetDragSourceFlags( USHORT nFlags );
+ void SetDragWasInternal();
+
+ SdrView* GetDragSourceView() { return pDragSourceView; }
+ USHORT GetDragSourceFlags() const { return nDragSourceFlags; }
+
+ void SetSourceDocID( sal_uInt32 nVal )
+ { nSourceDocID = nVal; }
+ sal_uInt32 GetSourceDocID() const { return nSourceDocID; }
+
+ static ScDrawTransferObj* GetOwnClipboard( Window* pUIWin );
+ virtual sal_Int64 SAL_CALL getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( com::sun::star::uno::RuntimeException );
+ static const com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx
new file mode 100644
index 000000000000..800696970fbd
--- /dev/null
+++ b/sc/source/ui/inc/dwfunctr.hxx
@@ -0,0 +1,158 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SC_DWFUNCTR_HXX
+#define _SC_DWFUNCTR_HXX
+
+#include <sfx2/childwin.hxx>
+#include <sfx2/dockwin.hxx>
+#include <svl/lstner.hxx>
+#include <svtools/stdctrl.hxx>
+
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+
+#ifndef _IMAGEBTN_HXX //autogen
+#include <vcl/imagebtn.hxx>
+#endif
+
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+#include "anyrefdg.hxx"
+#include "global.hxx" // ScAddress
+#include "privsplt.hxx"
+#include "funcdesc.hxx"
+
+#ifndef LRU_MAX
+#define LRU_MAX 10
+#endif
+/*************************************************************************
+|*
+|* Ableitung vom SfxChildWindow als "Behaelter" fuer Controller
+|*
+\************************************************************************/
+
+class ScFunctionChildWindow : public SfxChildWindow
+{
+ public:
+ ScFunctionChildWindow( Window*, USHORT, SfxBindings*,
+ SfxChildWinInfo* );
+
+ SFX_DECL_CHILDWINDOW(ScFunctionChildWindow);
+};
+
+/*************************************************************************
+|*
+|* ScFuncDockWin
+|*
+\************************************************************************/
+
+class ScFunctionDockWin : public SfxDockingWindow, public SfxListener
+{
+
+private:
+ Timer aTimer;
+ ScPrivatSplit aPrivatSplit;
+ ListBox aCatBox;
+ ListBox aFuncList;
+ ListBox aDDFuncList;
+ ListBox* pAllFuncList;
+
+ SfxChildAlignment eSfxNewAlignment;
+ SfxChildAlignment eSfxOldAlignment;
+ ImageButton aInsertButton;
+ FixedText aFiFuncDesc;
+ USHORT nLeftSlot;
+ USHORT nRightSlot;
+ ULONG nMinWidth;
+ ULONG nMinHeight;
+ Size aOldSize;
+ BOOL bSizeFlag;
+ BOOL bInit;
+ short nDockMode;
+ Point aSplitterInitPos;
+ const ScFuncDesc* pFuncDesc;
+ USHORT nArgs;
+ String** pArgArr;
+
+
+ const ScFuncDesc* aLRUList[LRU_MAX];
+
+ void UpdateFunctionList();
+ void UpdateLRUList();
+ void DoEnter(BOOL bOk); //@@ ???
+ void SetDescription();
+ void SetLeftRightSize();
+ void SetTopBottonSize();
+ void SetMyWidthLeRi(Size &aNewSize);
+ void SetMyHeightLeRi(Size &aNewSize);
+ void SetMyWidthToBo(Size &aNewSize);
+ void SetMyHeightToBo(Size &aNewSize);
+ void UseSplitterInitPos();
+
+ DECL_LINK( SetSelectionHdl, void* );
+ DECL_LINK( SelHdl, ListBox* );
+ DECL_LINK(SetSplitHdl,ScPrivatSplit*);
+ DECL_LINK( TimerHdl, Timer*);
+
+protected:
+
+ virtual BOOL Close();
+ virtual void Resize();
+ virtual void Resizing( Size& rSize );
+ virtual void SetSize();
+ virtual void ToggleFloatingMode();
+ virtual void StateChanged( StateChangedType nStateChange );
+
+
+ virtual SfxChildAlignment CheckAlignment(SfxChildAlignment,
+ SfxChildAlignment eAlign);
+
+public:
+ ScFunctionDockWin( SfxBindings* pBindings,
+ SfxChildWindow *pCW,
+ Window* pParent,
+ const ResId& rResId );
+
+ ~ScFunctionDockWin();
+
+ using SfxDockingWindow::Notify;
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ void SetSlotIDs( USHORT nLeft, USHORT nRight )
+ { nLeftSlot = nLeft; nRightSlot = nRight; }
+
+ void InitLRUList();
+
+ void Initialize (SfxChildWinInfo* pInfo);
+ virtual void FillInfo(SfxChildWinInfo&) const;
+};
+
+#endif
+
+
diff --git a/sc/source/ui/inc/editable.hxx b/sc/source/ui/inc/editable.hxx
new file mode 100644
index 000000000000..4b6e8d0596bc
--- /dev/null
+++ b/sc/source/ui/inc/editable.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_EDITABLE_HXX
+#define SC_EDITABLE_HXX
+
+#include "address.hxx"
+#include <tools/solar.h>
+
+class ScDocument;
+class ScViewFunc;
+class ScMarkData;
+class ScRange;
+
+
+class ScEditableTester
+{
+ BOOL bIsEditable;
+ BOOL bOnlyMatrix;
+
+public:
+ // no test in ctor
+ ScEditableTester();
+
+ // calls TestBlock
+ ScEditableTester( ScDocument* pDoc, SCTAB nTab,
+ SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
+
+ // calls TestSelectedBlock
+ ScEditableTester( ScDocument* pDoc,
+ SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+ const ScMarkData& rMark );
+
+ // calls TestRange
+ ScEditableTester( ScDocument* pDoc, const ScRange& rRange );
+
+ // calls TestSelection
+ ScEditableTester( ScDocument* pDoc, const ScMarkData& rMark );
+
+ // calls TestView
+ ScEditableTester( ScViewFunc* pView );
+
+ ~ScEditableTester() {}
+
+ // Several calls to the Test... methods check if *all* of the ranges
+ // are editable. For several independent checks, Reset() has to be used.
+ void TestBlock( ScDocument* pDoc, SCTAB nTab,
+ SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
+ void TestSelectedBlock( ScDocument* pDoc,
+ SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+ const ScMarkData& rMark );
+ void TestRange( ScDocument* pDoc, const ScRange& rRange );
+ void TestSelection( ScDocument* pDoc, const ScMarkData& rMark );
+ void TestView( ScViewFunc* pView );
+
+ BOOL IsEditable() const { return bIsEditable; }
+ BOOL IsFormatEditable() const { return bIsEditable || bOnlyMatrix; }
+ USHORT GetMessageId() const;
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/editfield.hxx b/sc/source/ui/inc/editfield.hxx
new file mode 100644
index 000000000000..9836e94aa215
--- /dev/null
+++ b/sc/source/ui/inc/editfield.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_EDITFIELD_HXX
+#define SC_EDITFIELD_HXX
+
+#include <vcl/field.hxx>
+
+// ============================================================================
+
+/** An edit control that contains a double precision floating-point value. */
+class ScDoubleField : public Edit
+{
+public:
+ explicit ScDoubleField( Window* pParent, const ResId& rResId );
+
+ bool GetValue( double& rfValue ) const;
+ void SetValue( double fValue,
+ sal_Int32 nDecPlaces = 12,
+ bool bEraseTrailingDecZeros = true );
+};
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/editsh.hxx b/sc/source/ui/inc/editsh.hxx
new file mode 100644
index 000000000000..ebada82a32fb
--- /dev/null
+++ b/sc/source/ui/inc/editsh.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_EDITSH_HXX
+#define SC_EDITSH_HXX
+
+#include <sfx2/shell.hxx>
+#include <sfx2/module.hxx>
+#include <tools/link.hxx>
+
+#include "shellids.hxx"
+#include <editeng/editview.hxx>
+
+class EditView;
+class ScViewData;
+class ScInputHandler;
+class SvxURLField;
+class TransferableDataHelper;
+class TransferableClipboardListener;
+
+class ScEditShell : public SfxShell
+{
+private:
+ EditView* pEditView;
+ ScViewData* pViewData;
+ TransferableClipboardListener* pClipEvtLstnr;
+ BOOL bPastePossible;
+ BOOL bIsInsertMode;
+
+ const SvxURLField* GetURLField();
+ ScInputHandler* GetMyInputHdl();
+
+ DECL_LINK( ClipboardChanged, TransferableDataHelper* );
+
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_EDIT_SHELL)
+
+ ScEditShell(EditView* pView, ScViewData* pData);
+ ~ScEditShell();
+
+ void SetEditView(EditView* pView);
+ EditView* GetEditView() {return pEditView;}
+
+ void Execute(SfxRequest& rReq);
+ void ExecuteTrans(SfxRequest& rReq);
+ void GetState(SfxItemSet &rSet);
+ void GetClipState(SfxItemSet& rSet);
+
+ void ExecuteAttr(SfxRequest& rReq);
+ void GetAttrState(SfxItemSet &rSet);
+
+ void ExecuteUndo(SfxRequest& rReq);
+ void GetUndoState(SfxItemSet &rSet);
+
+ String GetSelectionText( BOOL bWholeWord );
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/expftext.hxx b/sc/source/ui/inc/expftext.hxx
new file mode 100644
index 000000000000..170deba5b403
--- /dev/null
+++ b/sc/source/ui/inc/expftext.hxx
@@ -0,0 +1,45 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SC_EXPFTEXT_HXX
+#define _SC_EXPFTEXT_HXX
+
+#include <vcl/fixed.hxx>
+#include "scdllapi.h"
+
+class SC_DLLPUBLIC ScExpandedFixedText: public FixedText
+{
+ protected:
+
+ void RequestHelp( const HelpEvent& rHEvt );
+
+ public:
+ ScExpandedFixedText( Window* pWindow, const ResId& rResId);
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx
new file mode 100755
index 000000000000..539dbe54e275
--- /dev/null
+++ b/sc/source/ui/inc/fieldwnd.hxx
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FIELDWND_HXX
+#define SC_FIELDWND_HXX
+
+#include <vector>
+#include "address.hxx"
+#include <vcl/ctrl.hxx>
+#include <vcl/fixed.hxx>
+#include <cppuhelper/weakref.hxx>
+
+#define PAGE_SIZE 16 // count of visible fields for scrollbar
+#define LINE_SIZE 8 // count of fields per column for scrollbar
+#define MAX_FIELDS 8 // maximum count of fields for row/col/data area
+#define MAX_PAGEFIELDS 10 // maximum count of fields for page area
+
+#define OWIDTH PivotGlobal::nObjWidth
+#define OHEIGHT PivotGlobal::nObjHeight
+#define SSPACE PivotGlobal::nSelSpace
+
+class ScDPLayoutDlg;
+class ScAccessibleDataPilotControl;
+
+//===================================================================
+
+/** Type of content area. */
+enum ScDPFieldType
+{
+ TYPE_PAGE, /// Area for all page fields.
+ TYPE_ROW, /// Area for all row fields.
+ TYPE_COL, /// Area for all column fields.
+ TYPE_DATA, /// Area for all data fields.
+ TYPE_SELECT /// Selection area with all fields.
+};
+
+//-------------------------------------------------------------------
+
+/** Represents a field area in the DataPilot layout dialog. */
+class ScDPFieldWindow : public Control
+{
+private:
+ typedef ::std::pair< String, bool > FieldString; // true = text fits into button
+
+ String aName; /// name of the control, used in Accessibility
+ ScDPLayoutDlg* pDlg; /// Parent dialog.
+ Rectangle aWndRect; /// Area rectangle in pixels.
+ FixedText* pFtCaption; /// FixedText containing the name of the control.
+ Point aTextPos; /// Position of the caption text.
+ std::vector< FieldString > aFieldArr; /// String array of the field names and flags, if text fits into button.
+ ScDPFieldType eType; /// Type of this area.
+ Color aFaceColor; /// Color for dialog background.
+ Color aWinColor; /// Color for window background.
+ Color aTextColor; /// Color for text in buttons.
+ Color aWinTextColor; /// Color for text in field windows.
+ size_t nFieldSize; /// Maximum count of fields.
+ size_t nFieldSelected; /// Currently selected field.
+
+ com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > xAccessible;
+ ScAccessibleDataPilotControl* pAccessible;
+
+ /** Initilize the object. */
+ void Init();
+
+ /** Reads all needed style settings. */
+ void GetStyleSettings();
+
+ /** Draws the background. */
+ void DrawBackground( OutputDevice& rDev );
+ /** Draws a field into the specified rectangle. */
+ void DrawField(
+ OutputDevice& rDev,
+ const Rectangle& rRect,
+ FieldString& rText,
+ bool bFocus );
+
+ /** @return TRUE, if the field index is inside of the control area. */
+ bool IsValidIndex( size_t nIndex ) const;
+ /** @return TRUE, if the field with the given index exists. */
+ bool IsExistingIndex( size_t nIndex ) const;
+ /** @return TRUE, if the field with the given index exists and the text is
+ too long for the button control. */
+ bool IsShortenedText( size_t nIndex ) const;
+ /** @return The new selection index after moving to the given direction. */
+ size_t CalcNewFieldIndex( SCsCOL nDX, SCsROW nDY ) const;
+
+ /** Sets selection to the field with index nIndex. */
+ void SetSelection( size_t nIndex );
+ /** Sets selection to first field. */
+ void SetSelectionHome();
+ /** Sets selection to last field. */
+ void SetSelectionEnd();
+ /** Sets selection to new position relative to current. */
+ void MoveSelection( USHORT nKeyCode, SCsCOL nDX, SCsROW nDY );
+
+ /** Moves the selected field to nDestIndex. */
+ void MoveField( size_t nDestIndex );
+ /** Moves the selected field to the given direction. */
+ void MoveFieldRel( SCsCOL nDX, SCsROW nDY );
+
+ /** Updates the tab stop style bits. */
+ void UpdateStyle();
+
+protected:
+ virtual void Paint( const Rectangle& rRect );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void GetFocus();
+ virtual void LoseFocus();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+public:
+ ScDPFieldWindow(
+ ScDPLayoutDlg* pDialog,
+ const ResId& rResId,
+ ScDPFieldType eFieldType,
+ FixedText* pFtFieldCaption );
+ ScDPFieldWindow(
+ ScDPLayoutDlg* pDialog,
+ const ResId& rResId,
+ ScDPFieldType eFieldType,
+ const String& aName );
+ virtual ~ScDPFieldWindow();
+
+ /** Reads the FixedText's text with mnemonic and hides the FixedText. */
+ void UseMnemonic();
+
+ /** Draws the complete control. */
+ void Redraw();
+
+ /** @return The pixel position of a field (without bound check). */
+ Point GetFieldPosition( size_t nIndex ) const;
+ /** @return The pixel size of a field. */
+ Size GetFieldSize() const;
+
+ /** @return The index of the selected field. */
+ inline bool IsEmpty() const { return aFieldArr.empty(); }
+ /** @return The index of the selected field. */
+ inline size_t GetSelectedField() const { return nFieldSelected; }
+ /** @return The pixel position of the last possible field. */
+ Point GetLastPosition() const;
+
+ /** @return The count of existing fields. */
+ inline size_t GetFieldCount() const { return aFieldArr.size(); }
+ /** Inserts a field to the specified index. */
+ void AddField( const String& rText, size_t nNewIndex );
+ /** Removes a field from the specified index. */
+ void DelField( size_t nDelIndex );
+ /** Removes all fields. */
+ void ClearFields();
+ /** Changes the text on an existing field. */
+ void SetFieldText( const String& rText, size_t nIndex );
+ /** Returns the text of an existing field. */
+ const String& GetFieldText( size_t nIndex ) const;
+
+ /** Inserts a field using the specified pixel position.
+ @param rPos The coordinates to insert the field.
+ @param rnIndex The new index of the field is returned here.
+ @return TRUE, if the field has been created. */
+ bool AddField( const String& rText, const Point& rPos, size_t& rnIndex );
+ /** Calculates the field index at a specific pixel position.
+ @param rnIndex The index of the field is returned here.
+ @return TRUE, if the index value is valid. */
+ bool GetFieldIndex( const Point& rPos, size_t& rnIndex ) const;
+ /** Calculates a field index at a specific pixel position. Returns in every
+ case the index of an existing field.
+ @param rnIndex The index of the field is returned here.
+ @return TRUE, if the index value is valid. */
+ void GetExistingIndex( const Point& rPos, size_t& rnIndex );
+
+ /** Notifies this control that the offset of the first field has been changed.
+ The control has to adjust the selection to keep the same field selected
+ on scrolling with scrollbar. */
+ void ModifySelectionOffset( long nOffsetDiff );
+ /** Selects the next field. Called i.e. after moving a field from SELECT area. */
+ void SelectNext();
+
+ /** @return The name of the control without shortcut. */
+ inline String GetName() const { return aName; }
+
+ /** @return The description of the control which is used for the accessibility objects. */
+ String GetDescription() const;
+
+ /** Grabs focus and sets new selection. */
+ void GrabFocusWithSel( size_t nIndex );
+
+ /** @return The type of the FieldWindow. */
+ inline ScDPFieldType GetType() const { return eType; }
+};
+
+//===================================================================
+
+#endif // SC_FIELDWND_HXX
diff --git a/sc/source/ui/inc/filldlg.hxx b/sc/source/ui/inc/filldlg.hxx
new file mode 100644
index 000000000000..7f2fb046093c
--- /dev/null
+++ b/sc/source/ui/inc/filldlg.hxx
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FILLDLG_HXX
+#define SC_FILLDLG_HXX
+
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _EDIT_HXX //autogen
+#include <vcl/edit.hxx>
+#endif
+#include "global.hxx"
+
+class ScDocument;
+
+//----------------------------------------------------------------------------
+
+//CHINA001 #define FDS_OPT_NONE 0
+//CHINA001 #define FDS_OPT_HORZ 1
+//CHINA001 #define FDS_OPT_VERT 2
+//CHINA001
+#include "scui_def.hxx" //CHINA001
+//============================================================================
+
+class ScFillSeriesDlg : public ModalDialog
+{
+public:
+ ScFillSeriesDlg( Window* pParent,
+ ScDocument& rDocument,
+ FillDir eFillDir,
+ FillCmd eFillCmd,
+ FillDateCmd eFillDateCmd,
+ String aStartStr,
+ double fStep,
+ double fMax,
+ USHORT nPossDir );
+ ~ScFillSeriesDlg();
+
+ FillDir GetFillDir() const { return theFillDir; }
+ FillCmd GetFillCmd() const { return theFillCmd; }
+ FillDateCmd GetFillDateCmd() const { return theFillDateCmd; }
+ double GetStart() const { return fStartVal; }
+ double GetStep() const { return fIncrement; }
+ double GetMax() const { return fEndVal; }
+
+ String GetStartStr() const { return aEdStartVal.GetText(); }
+
+ void SetEdStartValEnabled(BOOL bFlag=FALSE);
+
+private:
+ FixedLine aFlDirection;
+ RadioButton aBtnDown;
+ RadioButton aBtnRight;
+ RadioButton aBtnUp;
+ RadioButton aBtnLeft;
+
+ FixedLine aFlSep1;
+ FixedLine aFlType;
+ RadioButton aBtnArithmetic;
+ RadioButton aBtnGeometric;
+ RadioButton aBtnDate;
+ RadioButton aBtnAutoFill;
+
+ FixedLine aFlSep2;
+ FixedLine aFlTimeUnit;
+ RadioButton aBtnDay;
+ RadioButton aBtnDayOfWeek;
+ RadioButton aBtnMonth;
+ RadioButton aBtnYear;
+
+ BOOL bStartValFlag;
+ FixedText aFtStartVal;
+ Edit aEdStartVal;
+ String aStartStrVal;
+
+ FixedText aFtEndVal;
+ Edit aEdEndVal;
+
+ FixedText aFtIncrement;
+ Edit aEdIncrement;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ const String errMsgInvalidVal;
+
+ //----------------------------------------------------------
+
+ ScDocument& rDoc;
+ FillDir theFillDir;
+ FillCmd theFillCmd;
+ FillDateCmd theFillDateCmd;
+ double fStartVal;
+ double fIncrement;
+ double fEndVal;
+
+#ifdef _FILLDLG_CXX
+private:
+ void Init( USHORT nPossDir );
+ BOOL CheckStartVal();
+ BOOL CheckIncrementVal();
+ BOOL CheckEndVal();
+
+ DECL_LINK( OKHdl, void * );
+ DECL_LINK( DisableHdl, Button * );
+#endif
+};
+
+
+
+#endif // SC_FILLDLG_HXX
+
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
new file mode 100644
index 000000000000..31e0e3a5d4b1
--- /dev/null
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -0,0 +1,267 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FILTDLG_HXX
+#define SC_FILTDLG_HXX
+
+#ifndef _MOREBTN_HXX //autogen
+#include <vcl/morebtn.hxx>
+#endif
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#include <svtools/stdctrl.hxx>
+#include "global.hxx" // -> ScQueryParam
+#include "address.hxx"
+#include "anyrefdg.hxx"
+
+
+//----------------------------------------------------------------------------
+
+class ScFilterOptionsMgr;
+class ScRangeData;
+class ScViewData;
+class ScDocument;
+class ScQueryItem;
+class TypedScStrCollection;
+
+//==================================================================
+// Gemeinsame Resource-Objekte:
+
+#define _COMMON_FILTER_RSCOBJS \
+ CheckBox aBtnCase; \
+ CheckBox aBtnRegExp; \
+ CheckBox aBtnHeader; \
+ CheckBox aBtnUnique; \
+ CheckBox aBtnCopyResult; \
+ ListBox aLbCopyArea; \
+ formula::RefEdit aEdCopyArea; \
+ formula::RefButton aRbCopyArea; \
+ CheckBox aBtnDestPers; \
+ FixedText aFtDbAreaLabel; \
+ FixedInfo aFtDbArea; \
+ const String aStrUndefined; \
+ const String aStrNoName; \
+ const String aStrNone;
+
+
+#define _INIT_COMMON_FILTER_RSCOBJS \
+ aBtnCase ( this, ScResId( BTN_CASE ) ), \
+ aBtnRegExp ( this, ScResId( BTN_REGEXP ) ), \
+ aBtnHeader ( this, ScResId( BTN_HEADER ) ), \
+ aBtnUnique ( this, ScResId( BTN_UNIQUE ) ), \
+ aBtnCopyResult ( this, ScResId( BTN_COPY_RESULT ) ), \
+ aLbCopyArea ( this, ScResId( LB_COPY_AREA ) ), \
+ aEdCopyArea ( this, this, ScResId( ED_COPY_AREA ) ), \
+ aRbCopyArea ( this, ScResId( RB_COPY_AREA ), &aEdCopyArea, this ), \
+ aBtnDestPers ( this, ScResId( BTN_DEST_PERS ) ), \
+ aFtDbAreaLabel ( this, ScResId( FT_DBAREA_LABEL ) ), \
+ aFtDbArea ( this, ScResId( FT_DBAREA ) ), \
+ aStrUndefined ( ScResId( SCSTR_UNDEFINED ) ), \
+ aStrNoName ( ScGlobal::GetRscString(STR_DB_NONAME) ), \
+ aStrNone ( ScResId( SCSTR_NONE ) ),
+
+
+//============================================================================
+class ScFilterDlg : public ScAnyRefDlg
+{
+public:
+ ScFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ const SfxItemSet& rArgSet );
+ ~ScFilterDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+
+ virtual BOOL IsRefInputMode() const;
+ virtual void SetActive();
+
+ virtual BOOL Close();
+ void SliderMoved();
+ USHORT GetSliderPos();
+ void RefreshEditRow( USHORT nOffset );
+
+private:
+ FixedLine aFlCriteria;
+ //----------------------------
+ ListBox aLbConnect1;
+ ListBox aLbField1;
+ ListBox aLbCond1;
+ ComboBox aEdVal1;
+ //----------------------------
+ ListBox aLbConnect2;
+ ListBox aLbField2;
+ ListBox aLbCond2;
+ ComboBox aEdVal2;
+ //----------------------------
+ ListBox aLbConnect3;
+ ListBox aLbField3;
+ ListBox aLbCond3;
+ ComboBox aEdVal3;
+ //----------------------------
+ ListBox aLbConnect4;
+ ListBox aLbField4;
+ ListBox aLbCond4;
+ ComboBox aEdVal4;
+ //----------------------------
+ FixedText aFtConnect;
+ FixedText aFtField;
+ FixedText aFtCond;
+ FixedText aFtVal;
+ FixedLine aFlSeparator;
+
+ ScrollBar aScrollBar;
+
+ FixedLine aFlOptions;
+ MoreButton aBtnMore;
+ HelpButton aBtnHelp;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+
+ _COMMON_FILTER_RSCOBJS
+
+ const String aStrEmpty;
+ const String aStrNotEmpty;
+ const String aStrRow;
+ const String aStrColumn;
+
+ ScFilterOptionsMgr* pOptionsMgr;
+
+ const USHORT nWhichQuery;
+ const ScQueryParam theQueryData;
+ ScQueryItem* pOutItem;
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ SCTAB nSrcTab;
+
+ ComboBox* aValueEdArr[4];
+ ListBox* aFieldLbArr[4];
+ ListBox* aCondLbArr[4];
+ ListBox* aConnLbArr[4];
+ bool mbHasDates[MAXQUERY];
+ BOOL bRefreshExceptQuery[MAXQUERY];
+ USHORT nFieldCount;
+ BOOL bRefInputMode;
+
+ TypedScStrCollection* pEntryLists[MAXCOLCOUNT];
+ USHORT nHeaderPos[MAXCOLCOUNT];
+
+ // Hack: RefInput-Kontrolle
+ Timer* pTimer;
+
+#ifdef _FILTDLG_CXX
+private:
+ void Init ( const SfxItemSet& rArgSet );
+ void FillFieldLists ();
+ void FillAreaList ();
+ void UpdateValueList ( USHORT nList );
+ void UpdateHdrInValueList( USHORT nList );
+ void ClearValueList ( USHORT nList );
+ USHORT GetFieldSelPos ( SCCOL nField );
+ ScQueryItem* GetOutputItem ();
+
+ // Handler:
+ DECL_LINK( LbSelectHdl, ListBox* );
+ DECL_LINK( ValModifyHdl, ComboBox* );
+ DECL_LINK( CheckBoxHdl, CheckBox* );
+ DECL_LINK( EndDlgHdl, Button* );
+ DECL_LINK( MoreClickHdl, MoreButton* );
+ DECL_LINK( ScrollHdl, ScrollBar* );
+
+ // Hack: RefInput-Kontrolle
+ DECL_LINK( TimeOutHdl, Timer* );
+#endif
+};
+
+
+//============================================================================
+class ScSpecialFilterDlg : public ScAnyRefDlg
+{
+public:
+ ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ const SfxItemSet& rArgSet );
+ ~ScSpecialFilterDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+
+ virtual BOOL IsRefInputMode() const;
+ virtual void SetActive();
+
+ virtual BOOL Close();
+
+private:
+ ListBox aLbFilterArea;
+ FixedText aFtFilterArea;
+ formula::RefEdit aEdFilterArea;
+ formula::RefButton aRbFilterArea;
+
+ FixedLine aFlOptions;
+
+ _COMMON_FILTER_RSCOBJS
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ MoreButton aBtnMore;
+
+ ScFilterOptionsMgr* pOptionsMgr;
+
+ const USHORT nWhichQuery;
+ const ScQueryParam theQueryData;
+ ScQueryItem* pOutItem;
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+
+ formula::RefEdit* pRefInputEdit;
+ BOOL bRefInputMode;
+
+ // Hack: RefInput-Kontrolle
+ Timer* pTimer;
+
+#ifdef _SFILTDLG_CXX
+private:
+ void Init( const SfxItemSet& rArgSet );
+ ScQueryItem* GetOutputItem( const ScQueryParam& rParam,
+ const ScRange& rSource );
+
+ // Handler
+ DECL_LINK( FilterAreaSelHdl, ListBox* );
+ DECL_LINK( FilterAreaModHdl, formula::RefEdit* );
+ DECL_LINK( EndDlgHdl, Button* );
+ DECL_LINK( ScrollHdl, ScrollBar* );
+
+ // Hack: RefInput-Kontrolle
+ DECL_LINK( TimeOutHdl, Timer* );
+#endif
+};
+
+
+
+#endif // SC_FILTDLG_HXX
+
diff --git a/sc/source/ui/inc/filter.hrc b/sc/source/ui/inc/filter.hrc
new file mode 100644
index 000000000000..508c5af9aab5
--- /dev/null
+++ b/sc/source/ui/inc/filter.hrc
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "sc.hrc" // -> RID_SCDLG_FILTER
+ // -> RID_SCDLG_SPEC_FILTER
+ // -> RID_SCDLG_PIVOTFILTER
+
+// allgemein
+
+#define BTN_OK 1
+#define BTN_CANCEL 1
+#define BTN_HELP 1
+#define BTN_MORE 1
+
+#define BTN_UNIQUE 1
+#define BTN_CASE 2
+#define BTN_REGEXP 3
+#define BTN_HEADER 4
+#define BTN_COPY_RESULT 5
+#define LB_COPY_AREA 6
+#define ED_COPY_AREA 7
+#define RB_COPY_AREA 8
+#define FL_OPTIONS 9
+#define FT_DBAREA_LABEL 10
+#define FT_DBAREA 11
+#define BTN_DEST_PERS 12
+
+// Filter:
+#define FT_OP 20
+#define FT_FIELD 21
+#define FT_COND 22
+#define FT_VAL 23
+#define LB_FIELD1 24
+#define LB_FIELD2 25
+#define LB_FIELD3 26
+#define LB_OP1 27
+#define LB_OP2 28
+#define LB_COND1 29
+#define LB_COND2 30
+#define LB_COND3 31
+#define ED_VAL1 32
+#define ED_VAL2 33
+#define ED_VAL3 34
+#define FL_CRITERIA 35
+#define FL_SEPARATOR 36
+#define LB_OP3 37
+#define LB_FIELD4 38
+#define LB_COND4 39
+#define ED_VAL4 40
+#define LB_SCROLL 41
+#define LB_OP4 42
+
+// Spezialfilter
+
+#define FT_CRITERIA_AREA 50
+#define LB_CRITERIA_AREA 51
+#define ED_CRITERIA_AREA 52
+#define RB_CRITERIA_AREA 53
+
diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx
new file mode 100644
index 000000000000..92e3833dff7d
--- /dev/null
+++ b/sc/source/ui/inc/foptmgr.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FOPTMGR_HXX
+#define SC_FOPTMGR_HXX
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _EDIT_HXX //autogen
+#include <vcl/edit.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+
+//----------------------------------------------------------------------------
+
+class FixedInfo;
+namespace formula
+{
+ class RefButton;
+}
+class MoreButton;
+class Dialog;
+struct ScQueryParam;
+class ScDocument;
+class ScViewData;
+
+//----------------------------------------------------------------------------
+
+class ScFilterOptionsMgr
+{
+public:
+ ScFilterOptionsMgr( Dialog* ptrDlg,
+ ScViewData* ptrViewData,
+ const ScQueryParam& refQueryData,
+ MoreButton& refBtnMore,
+ CheckBox& refBtnCase,
+ CheckBox& refBtnRegExp,
+ CheckBox& refBtnHeader,
+ CheckBox& refBtnUnique,
+ CheckBox& refBtnCopyResult,
+ CheckBox& refBtnDestPers,
+ ListBox& refLbCopyArea,
+ Edit& refEdCopyArea,
+ formula::RefButton& refRbCopyArea,
+ FixedText& refFtDbAreaLabel,
+ FixedInfo& refFtDbArea,
+ FixedLine& refFlOptions,
+ const String& refStrNoName,
+ const String& refStrUndefined );
+ ~ScFilterOptionsMgr();
+
+ BOOL VerifyPosStr ( const String& rPosStr ) const;
+
+private:
+ Dialog* pDlg;
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+
+ MoreButton& rBtnMore;
+ CheckBox& rBtnCase;
+ CheckBox& rBtnRegExp;
+ CheckBox& rBtnHeader;
+ CheckBox& rBtnUnique;
+ CheckBox& rBtnCopyResult;
+ CheckBox& rBtnDestPers;
+ ListBox& rLbCopyPos;
+ Edit& rEdCopyPos;
+ formula::RefButton& rRbCopyPos;
+ FixedText& rFtDbAreaLabel;
+ FixedInfo& rFtDbArea;
+ FixedLine& rFlOptions;
+
+ const String& rStrNoName;
+ const String& rStrUndefined;
+
+ const ScQueryParam& rQueryData;
+
+#ifdef _FOPTMGR_CXX
+private:
+ void Init();
+
+ // Handler:
+ DECL_LINK( EdPosModifyHdl, Edit* );
+ DECL_LINK( LbPosSelHdl, ListBox* );
+ DECL_LINK( BtnCopyResultHdl, CheckBox* );
+#endif
+};
+
+
+
+#endif // SC_FOPTMGR_HXX
diff --git a/sc/source/ui/inc/formatsh.hxx b/sc/source/ui/inc/formatsh.hxx
new file mode 100644
index 000000000000..e45fb99c54ef
--- /dev/null
+++ b/sc/source/ui/inc/formatsh.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FORMATSH_HXX
+#define SC_FORMATSH_HXX
+
+#include <sfx2/shell.hxx>
+#include "shellids.hxx"
+#include <sfx2/module.hxx>
+#include <svx/svdmark.hxx>
+
+class ScViewData;
+
+class ScFormatShell: public SfxShell
+{
+ ScViewData* pViewData;
+
+protected:
+
+ ScViewData* GetViewData(){return pViewData;}
+ const ScViewData* GetViewData() const {return pViewData;}
+
+public:
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_FORMAT_SHELL)
+
+ ScFormatShell(ScViewData* pData);
+ virtual ~ScFormatShell();
+
+ void ExecuteNumFormat( SfxRequest& rReq );
+ void GetNumFormatState( SfxItemSet& rSet );
+
+ void ExecuteAttr( SfxRequest& rReq );
+ void GetAttrState( SfxItemSet& rSet );
+
+ void ExecuteAlignment( SfxRequest& rReq );
+
+ void ExecuteTextAttr( SfxRequest& rReq );
+ void GetTextAttrState( SfxItemSet& rSet );
+
+ void GetAlignState( SfxItemSet& rSet );
+ void GetBorderState( SfxItemSet& rSet );
+
+ void ExecuteStyle( SfxRequest& rReq );
+ void GetStyleState( SfxItemSet& rSet );
+
+ void ExecuteTextDirection( SfxRequest& rReq );
+ void GetTextDirectionState( SfxItemSet& rSet );
+
+ void ExecFormatPaintbrush( SfxRequest& rReq );
+ void StateFormatPaintbrush( SfxItemSet& rSet );
+};
+
+#endif
diff --git a/sc/source/ui/inc/formdata.hxx b/sc/source/ui/inc/formdata.hxx
new file mode 100644
index 000000000000..72c7862a007b
--- /dev/null
+++ b/sc/source/ui/inc/formdata.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FORMDATA_HXX
+#define SC_FORMDATA_HXX
+
+#include <tools/string.hxx>
+#include <tools/gen.hxx>
+#include <formula/formdata.hxx>
+class ScInputHandler;
+class ScDocShell;
+
+//============================================================================
+
+class ScFormEditData : public formula::FormEditData
+{
+public:
+ ScFormEditData();
+ virtual ~ScFormEditData();
+
+ ScInputHandler* GetInputHandler() { return pInputHandler;}
+ ScDocShell* GetDocShell() { return pScDocShell;}
+
+ void SetInputHandler(ScInputHandler* pHdl) { pInputHandler=pHdl;}
+ void SetDocShell(ScDocShell* pSds) { pScDocShell=pSds;}
+
+
+ virtual void SaveValues();
+
+private:
+ ScFormEditData( const ScFormEditData& );
+// const ScFormEditData& operator=( const ScFormEditData& r );
+
+
+ ScInputHandler* pInputHandler;
+ ScDocShell* pScDocShell;
+};
+
+
+
+#endif // SC_CRNRDLG_HXX
+
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
new file mode 100644
index 000000000000..f863662f7cd0
--- /dev/null
+++ b/sc/source/ui/inc/formula.hxx
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FORMULA_HXX
+#define SC_FORMULA_HXX
+
+#include "anyrefdg.hxx"
+#include "global.hxx" // ScAddress
+#include <svtools/stdctrl.hxx>
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#include <vcl/group.hxx>
+#include <svtools/svmedit.hxx>
+#include <vcl/tabpage.hxx>
+
+#ifndef _SVSTDARR_STRINGS
+
+#define _SVSTDARR_STRINGS
+#include <svl/svstdarr.hxx>
+
+#endif
+#include "compiler.hxx"
+#include "cell.hxx"
+
+#include "formula/formula.hxx"
+#include "IAnyRefDialog.hxx"
+#include "anyrefdg.hxx"
+#include <formula/IFunctionDescription.hxx>
+
+class ScViewData;
+class ScDocument;
+class ScFuncDesc;
+class ScInputHandler;
+class ScDocShell;
+class SvLBoxEntry;
+
+//============================================================================
+typedef ScTabViewShell* PtrTabViewShell;
+//============================================================================
+
+class ScFormulaDlg : public formula::FormulaDlg,
+ public IAnyRefDialog,
+ public formula::IFormulaEditorHelper
+{
+ ScFormulaReferenceHelper m_aHelper;
+ ScFormulaCell* pCell;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaParser> m_xParser;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> m_xOpCodeMapper;
+
+ static ScDocument* pDoc;
+ static ScAddress aCursorPos;
+public:
+ ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
+ Window* pParent, ScViewData* pViewData ,formula::IFunctionManager* _pFunctionMgr);
+ ~ScFormulaDlg();
+
+ // IFormulaEditorHelper
+ virtual void notifyChange();
+ virtual void fill();
+ virtual bool calculateValue(const String& _sExpression,String& _rResult);
+ virtual void doClose(BOOL _bOk);
+ virtual void insertEntryToLRUList(const formula::IFunctionDescription* pDesc);
+ virtual void showReference(const String& _sFormula);
+ virtual void dispatch(BOOL _bOK,BOOL _bMartixChecked);
+ virtual void setDispatcherLock( BOOL bLock );
+ virtual void setReferenceInput(const formula::FormEditData* _pData);
+ virtual void deleteFormData();
+ virtual void clear();
+ virtual void switchBack();
+ virtual formula::FormEditData* getFormEditData() const;
+ virtual void setCurrentFormula(const String& _sReplacement);
+ virtual void setSelection(xub_StrLen _nStart,xub_StrLen _nEnd);
+ virtual void getSelection(xub_StrLen& _nStart,xub_StrLen& _nEnd) const;
+ virtual String getCurrentFormula() const;
+
+ virtual formula::IFunctionManager* getFunctionManager();
+ virtual ::std::auto_ptr<formula::FormulaTokenArray> convertToTokenArray(const ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken >& _aTokenList);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaParser> getFormulaParser() const;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> getFormulaOpCodeMapper() const;
+ virtual ::com::sun::star::table::CellAddress getReferencePosition() const;
+
+ virtual BOOL Close();
+
+ // sc::IAnyRefDialog
+ virtual void ShowReference(const String& _sRef);
+ virtual void HideReference( BOOL bDoneRefMode = TRUE );
+ virtual void SetReference( const ScRange& rRef, ScDocument* pD );
+
+ virtual void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+ virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+ virtual void RefInputDone( BOOL bForced = FALSE );
+ virtual BOOL IsTableLocked() const;
+ virtual BOOL IsRefInputMode() const;
+
+ virtual BOOL IsDocAllowed( SfxObjectShell* pDocSh ) const;
+ virtual void AddRefEntry();
+ virtual void SetActive();
+ virtual void ViewShellChanged( ScTabViewShell* pScViewShell );
+protected:
+
+ virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
+ ULONG FindFocusWin(Window *pWin);
+ void SaveLRUEntry(const ScFuncDesc* pFuncDesc);
+ void HighlightFunctionParas(const String& aFormula);
+
+ BOOL IsInputHdl(ScInputHandler* pHdl);
+ ScInputHandler* GetNextInputHandler(ScDocShell* pDocShell,PtrTabViewShell* ppViewSh);
+};
+
+
+
+#endif // SC_CRNRDLG_HXX
+
diff --git a/sc/source/ui/inc/fuconarc.hxx b/sc/source/ui/inc/fuconarc.hxx
new file mode 100644
index 000000000000..686f2a00ae5b
--- /dev/null
+++ b/sc/source/ui/inc/fuconarc.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUCONARC_HXX
+#define SC_FUCONARC_HXX
+
+#include "fuconstr.hxx"
+
+/*************************************************************************
+|*
+|* Rechteck zeichnen
+|*
+\************************************************************************/
+
+class FuConstArc : public FuConstruct
+{
+ public:
+ FuConstArc( ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+
+ virtual ~FuConstArc();
+ // Mouse- & Key-Events
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual BOOL MouseMove(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+
+ // #98185# Create default drawing objects via keyboard
+ virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle);
+};
+
+
+
+#endif // _SD_FUCONARC_HXX
+
diff --git a/sc/source/ui/inc/fuconcustomshape.hxx b/sc/source/ui/inc/fuconcustomshape.hxx
new file mode 100644
index 000000000000..e6ecbfb2e2c3
--- /dev/null
+++ b/sc/source/ui/inc/fuconcustomshape.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUCONCUSTOMSHAPE_HXX
+#define SC_FUCONCUSTOMSHAPE_HXX
+
+#include "fuconstr.hxx"
+
+class FuConstCustomShape : public FuConstruct
+{
+ rtl::OUString aCustomShape;
+
+ void SetAttributes( SdrObject* pObj );
+
+public:
+ FuConstCustomShape(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+
+ virtual ~FuConstCustomShape();
+ // Mouse- & Key-Events
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual BOOL MouseMove(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+
+ // #98185# Create default drawing objects via keyboard
+ virtual SdrObject* CreateDefaultObject( const sal_uInt16 nID, const Rectangle& rRectangle );
+
+ // #i33136#
+ virtual bool doConstructOrthogonal() const;
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/fuconpol.hxx b/sc/source/ui/inc/fuconpol.hxx
new file mode 100644
index 000000000000..3a27ffcc2f69
--- /dev/null
+++ b/sc/source/ui/inc/fuconpol.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUCONPOL_HXX
+#define SC_FUCONPOL_HXX
+
+#include "fuconstr.hxx"
+
+/*************************************************************************
+|*
+|* Basisklasse fuer alle Funktionen
+|*
+\************************************************************************/
+
+class FuConstPolygon : public FuConstruct
+{
+ Point aLastPos;
+
+ public:
+ FuConstPolygon(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+
+ virtual ~FuConstPolygon();
+ // Mouse- & Key-Events
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual BOOL MouseMove(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+
+ // #98185# Create default drawing objects via keyboard
+ virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle);
+};
+
+
+#endif // _FUCONPOL_HXX
+
diff --git a/sc/source/ui/inc/fuconrec.hxx b/sc/source/ui/inc/fuconrec.hxx
new file mode 100644
index 000000000000..fb609e4a7681
--- /dev/null
+++ b/sc/source/ui/inc/fuconrec.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUCONREC_HXX
+#define SC_FUCONREC_HXX
+
+#include "fuconstr.hxx"
+
+/*************************************************************************
+|*
+|* Rechteck zeichnen
+|*
+\************************************************************************/
+
+class FuConstRectangle : public FuConstruct
+{
+ public:
+ FuConstRectangle(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+
+ virtual ~FuConstRectangle();
+ // Mouse- & Key-Events
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual BOOL MouseMove(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+
+ // #98185# Create default drawing objects via keyboard
+ virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle);
+};
+
+
+
+#endif // _SD_FUCONREC_HXX
+
diff --git a/sc/source/ui/inc/fuconstr.hxx b/sc/source/ui/inc/fuconstr.hxx
new file mode 100644
index 000000000000..28b20c7a94df
--- /dev/null
+++ b/sc/source/ui/inc/fuconstr.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUCONSTR_HXX
+#define SC_FUCONSTR_HXX
+
+#include "fudraw.hxx"
+
+
+/************************************************************************/
+
+#define MIN_FREEHAND_DISTANCE 10
+
+
+/*************************************************************************
+|*
+|* Rechteck zeichnen
+|*
+\************************************************************************/
+
+class FuConstruct : public FuDraw
+{
+ public:
+ FuConstruct(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+
+ virtual ~FuConstruct();
+ // Mouse- & Key-Events
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual BOOL MouseMove(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual BYTE Command(const CommandEvent& rCEvt);
+
+ BOOL SimpleMouseButtonUp(const MouseEvent& rMEvt);
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+};
+
+
+
+#endif // _SD_FUCONSTR_HXX
diff --git a/sc/source/ui/inc/fuconuno.hxx b/sc/source/ui/inc/fuconuno.hxx
new file mode 100644
index 000000000000..ffe2c1e9722b
--- /dev/null
+++ b/sc/source/ui/inc/fuconuno.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUCONUNO_HXX
+#define SC_FUCONUNO_HXX
+
+#include "fuconstr.hxx"
+
+
+/*************************************************************************
+|*
+|* Control zeichnen
+|*
+\************************************************************************/
+
+class FuConstUnoControl : public FuConstruct
+{
+protected:
+ UINT32 nInventor;
+ UINT16 nIdentifier;
+
+public:
+ FuConstUnoControl(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+
+ virtual ~FuConstUnoControl();
+ // Mouse- & Key-Events
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual BOOL MouseMove(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+
+ // #98185# Create default drawing objects via keyboard
+ virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle);
+};
+
+
+
+#endif // _SD_FUCONCTL_HXX
+
diff --git a/sc/source/ui/inc/fudraw.hxx b/sc/source/ui/inc/fudraw.hxx
new file mode 100644
index 000000000000..2344ca629c2f
--- /dev/null
+++ b/sc/source/ui/inc/fudraw.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUDRAW_HXX
+#define SC_FUDRAW_HXX
+
+#include "fupoor.hxx"
+#include <vcl/pointr.hxx>
+
+/*************************************************************************
+|*
+|* Basisklasse fuer alle Drawmodul-spezifischen Funktionen
+|*
+\************************************************************************/
+
+class FuDraw : public FuPoor
+{
+ protected:
+ Pointer aNewPointer;
+ Pointer aOldPointer;
+
+ public:
+ FuDraw(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+ virtual ~FuDraw();
+
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+
+ virtual void ScrollStart();
+ virtual void ScrollEnd();
+
+ virtual void Activate();
+ virtual void Deactivate();
+
+ virtual void ForcePointer(const MouseEvent* pMEvt);
+
+ virtual BOOL MouseMove(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+
+ // #97016# II
+ virtual void SelectionHasChanged();
+
+ BOOL IsSizingOrMovingNote( const MouseEvent& rMEvt ) const;
+
+ private:
+ void DoModifiers(const MouseEvent& rMEvt);
+ void ResetModifiers();
+};
+
+
+
+#endif // _SD_FUDRAW_HXX
diff --git a/sc/source/ui/inc/fuedipo.hxx b/sc/source/ui/inc/fuedipo.hxx
new file mode 100644
index 000000000000..5138a134cc2e
--- /dev/null
+++ b/sc/source/ui/inc/fuedipo.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUEDIPO_HXX
+#define SC_FUEDIPO_HXX
+
+#include "fudraw.hxx"
+
+
+/*************************************************************************
+|*
+|* Basisklasse fuer alle Funktionen
+|*
+\************************************************************************/
+
+class FuEditPoints : public FuDraw
+{
+ public:
+ FuEditPoints(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+
+ virtual ~FuEditPoints();
+ // Mouse- & Key-Events
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual BOOL MouseMove(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+};
+
+
+
+#endif // _SD_FUEDIPO_HXX
+
diff --git a/sc/source/ui/inc/fuinsert.hxx b/sc/source/ui/inc/fuinsert.hxx
new file mode 100644
index 000000000000..4dda7cb2b5ba
--- /dev/null
+++ b/sc/source/ui/inc/fuinsert.hxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#ifndef SC_FUINSERT_HXX
+#define SC_FUINSERT_HXX
+
+#include "fupoor.hxx"
+
+class FuInsertGraphic : public FuPoor
+{
+ public:
+ FuInsertGraphic( ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+ virtual ~FuInsertGraphic();
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+};
+
+/************************************************************************/
+
+class FuInsertOLE : public FuPoor
+{
+ public:
+ FuInsertOLE( ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+ virtual ~FuInsertOLE();
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+};
+
+/************************************************************************/
+
+class FuInsertChart : public FuPoor
+{
+ public:
+ FuInsertChart( ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+ virtual ~FuInsertChart();
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+};
+
+/************************************************************************/
+
+class FuInsertMedia : public FuPoor
+{
+ public:
+ FuInsertMedia( ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+ virtual ~FuInsertMedia();
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+};
+
+#endif // _SD_FUINSERT_HXX
+
diff --git a/sc/source/ui/inc/fumark.hxx b/sc/source/ui/inc/fumark.hxx
new file mode 100644
index 000000000000..fcadc54768e8
--- /dev/null
+++ b/sc/source/ui/inc/fumark.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUMARK_HXX
+#define SC_FUMARK_HXX
+
+#include "fupoor.hxx"
+#include "rangelst.hxx" // ScRangeListRef
+
+
+/*************************************************************************
+|*
+|* Funktion zum Aufziehen eines Rechtecks
+|*
+\************************************************************************/
+
+class FuMarkRect : public FuPoor
+{
+ protected:
+ Point aBeginPos;
+ Rectangle aZoomRect;
+ BOOL bVisible;
+ BOOL bStartDrag;
+ ScRangeListRef aSourceRange;
+
+ public:
+ FuMarkRect(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+ virtual ~FuMarkRect();
+
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+
+ virtual void ScrollStart();
+ virtual void ScrollEnd();
+
+ virtual void Activate();
+ virtual void Deactivate();
+
+ virtual void ForcePointer(const MouseEvent* pMEvt);
+
+ virtual BOOL MouseMove(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual BYTE Command(const CommandEvent& rCEvt);
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/funcpage.hxx b/sc/source/ui/inc/funcpage.hxx
new file mode 100644
index 000000000000..d8b5c7796971
--- /dev/null
+++ b/sc/source/ui/inc/funcpage.hxx
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUNCPAGE_HXX
+#define SC_FUNCPAGE_HXX
+
+#include "funcutl.hxx"
+#include "global.hxx" // ScAddress
+#include <svtools/stdctrl.hxx>
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#include <vcl/group.hxx>
+#include <svtools/svmedit.hxx>
+#include <vcl/tabpage.hxx>
+
+#ifndef _SVSTDARR_STRINGS
+
+#define _SVSTDARR_STRINGS
+#include <svl/svstdarr.hxx>
+
+#endif
+#include <vcl/tabctrl.hxx>
+#include "parawin.hxx"
+#include <svtools/svtreebx.hxx>
+#include "compiler.hxx"
+#include "cell.hxx"
+
+
+class ScViewData;
+class ScFuncName_Impl;
+class ScDocument;
+class ScFuncDesc;
+
+//============================================================================
+
+#define LRU_MAX 10
+
+//============================================================================
+class ScListBox : public ListBox
+{
+protected:
+
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual long PreNotify( NotifyEvent& rNEvt );
+
+public:
+ ScListBox( Window* pParent, const ResId& rResId );
+};
+
+
+
+
+//============================================================================
+class ScFuncPage : public TabPage
+{
+private:
+
+ Link aDoubleClickLink;
+ Link aSelectionLink;
+ FixedText aFtCategory;
+ ListBox aLbCategory;
+ FixedText aFtFunction;
+ ScListBox aLbFunction;
+ ImageButton aIBFunction;
+
+ const ScFuncDesc* aLRUList[LRU_MAX];
+
+
+ DECL_LINK( SelHdl, ListBox* );
+ DECL_LINK( DblClkHdl, ListBox* );
+
+protected:
+
+ void UpdateFunctionList();
+ void InitLRUList();
+
+
+public:
+
+ ScFuncPage( Window* pParent);
+
+ void SetCategory(USHORT nCat);
+ void SetFunction(USHORT nFunc);
+ void SetFocus();
+ USHORT GetCategory();
+ USHORT GetFunction();
+ USHORT GetFunctionEntryCount();
+
+ USHORT GetFuncPos(const ScFuncDesc*);
+ const ScFuncDesc* GetFuncDesc( USHORT nPos ) const;
+ String GetSelFunctionName() const;
+
+ void SetDoubleClickHdl( const Link& rLink ) { aDoubleClickLink = rLink; }
+ const Link& GetDoubleClickHdl() const { return aDoubleClickLink; }
+
+ void SetSelectHdl( const Link& rLink ) { aSelectionLink = rLink; }
+ const Link& GetSelectHdl() const { return aSelectionLink; }
+
+};
+
+
+#endif
+
diff --git a/sc/source/ui/inc/funcutl.hxx b/sc/source/ui/inc/funcutl.hxx
new file mode 100644
index 000000000000..715c9d36a101
--- /dev/null
+++ b/sc/source/ui/inc/funcutl.hxx
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUNCUTL_HXX
+#define SC_FUNCUTL_HXX
+
+#ifndef _SCRBAR_HXX //autogen
+#include <vcl/scrbar.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#include <svtools/svmedit.hxx>
+#include "anyrefdg.hxx" // formula::RefButton
+
+
+//============================================================================
+// class ValWnd
+
+class ValWnd : public Window
+{
+public:
+ ValWnd( Window* pParent, const ResId& rId );
+
+ void SetValue( const String& rStrVal );
+
+protected:
+ virtual void Paint( const Rectangle& rRect );
+
+private:
+ String aStrValue;
+ Rectangle aRectOut;
+};
+
+
+//============================================================================
+// class ScEditBox
+
+class ScEditBox : public Control
+{
+private:
+
+ MultiLineEdit* pMEdit;
+ Link aSelChangedLink;
+ Selection aOldSel;
+ BOOL bMouseFlag;
+ DECL_LINK( ChangedHdl, ScEditBox* );
+
+protected:
+
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual void SelectionChanged();
+ virtual void Resize();
+ virtual void GetFocus();
+
+
+public:
+ ScEditBox( Window* pParent, const ResId& rResId );
+
+ ~ScEditBox();
+
+ MultiLineEdit* GetEdit() {return pMEdit;}
+
+ void SetSelChangedHdl( const Link& rLink ) { aSelChangedLink = rLink; }
+ const Link& GetSelChangedHdl() const { return aSelChangedLink; }
+
+ void UpdateOldSel();
+};
+
+
+
+//============================================================================
+// class ArgEdit
+
+class ArgEdit : public formula::RefEdit
+{
+public:
+ ArgEdit( Window* pParent, const ResId& rResId );
+
+ void Init( ArgEdit* pPrevEdit, ArgEdit* pNextEdit,
+ ScrollBar& rArgSlider, USHORT nArgCount );
+
+protected:
+ virtual void KeyInput( const KeyEvent& rKEvt );
+
+private:
+ ArgEdit* pEdPrev;
+ ArgEdit* pEdNext;
+ ScrollBar* pSlider;
+ USHORT nArgs;
+};
+
+
+//============================================================================
+// class ArgInput
+
+class ArgInput
+{
+private:
+
+ Link aFxClickLink;
+ Link aRefClickLink;
+ Link aFxFocusLink;
+ Link aRefFocusLink;
+ Link aEdFocusLink;
+ Link aEdModifyLink;
+
+ FixedText* pFtArg;
+ ImageButton* pBtnFx;
+ ArgEdit* pEdArg;
+ formula::RefButton* pRefBtn;
+
+ DECL_LINK( FxBtnClickHdl, ImageButton* );
+ DECL_LINK( RefBtnClickHdl,formula::RefButton* );
+ DECL_LINK( FxBtnFocusHdl, ImageButton* );
+ DECL_LINK( RefBtnFocusHdl,formula::RefButton* );
+ DECL_LINK( EdFocusHdl, ArgEdit* );
+ DECL_LINK( EdModifyHdl,ArgEdit* );
+
+protected:
+
+ virtual void FxClick();
+ virtual void RefClick();
+ virtual void FxFocus();
+ virtual void RefFocus();
+ virtual void EdFocus();
+ virtual void EdModify();
+
+public:
+
+ ArgInput();
+
+ void InitArgInput ( FixedText* pftArg,
+ ImageButton* pbtnFx,
+ ArgEdit* pedArg,
+ formula::RefButton* prefBtn);
+
+ void SetArgName(const String &aArg);
+ String GetArgName();
+ void SetArgNameFont(const Font&);
+
+ void SetArgVal(const String &aVal);
+ String GetArgVal();
+
+ void SetArgSelection (const Selection& rSel );
+
+ ArgEdit* GetArgEdPtr() {return pEdArg;}
+
+
+ void SetFxClickHdl( const Link& rLink ) { aFxClickLink = rLink; }
+ const Link& GetFxClickHdl() const { return aFxClickLink; }
+
+ void SetRefClickHdl( const Link& rLink ) { aRefClickLink = rLink; }
+ const Link& GetRefClickHdl() const { return aRefClickLink; }
+
+ void SetFxFocusHdl( const Link& rLink ) { aFxFocusLink = rLink; }
+ const Link& GetFxFocusHdl() const { return aFxFocusLink; }
+
+ void SetRefFocusHdl( const Link& rLink ) { aRefFocusLink = rLink; }
+ const Link& GetRefFocusHdl() const { return aRefFocusLink; }
+
+ void SetEdFocusHdl( const Link& rLink ) { aEdFocusLink = rLink; }
+ const Link& GetEdFocusHdl() const { return aEdFocusLink; }
+
+ void SetEdModifyHdl( const Link& rLink ) { aEdModifyLink = rLink; }
+ const Link& GetEdModifyHdl() const { return aEdModifyLink; }
+
+ void Hide();
+ void Show();
+
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx
new file mode 100644
index 000000000000..6d9b7ae2af5a
--- /dev/null
+++ b/sc/source/ui/inc/fupoor.hxx
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SC_FUPOOR_HXX
+#define _SC_FUPOOR_HXX
+
+#include <vcl/event.hxx>
+#include <vcl/timer.hxx>
+#include <sfx2/request.hxx>
+
+class ScDrawView;
+class ScTabViewShell;
+class Window;
+class SdrModel;
+class Dialog;
+
+// #98185# Create default drawing objects via keyboard
+class SdrObject;
+
+// Return-Werte fuer Command
+#define SC_CMD_NONE 0
+#define SC_CMD_USED 1
+#define SC_CMD_IGNORE 2
+
+/*************************************************************************
+|*
+|* Basisklasse fuer alle Funktionen
+|*
+\************************************************************************/
+
+class FuPoor
+{
+protected:
+ ScDrawView* pView;
+ ScTabViewShell* pViewShell;
+ Window* pWindow;
+ SdrModel* pDrDoc;
+
+ SfxRequest aSfxRequest;
+ Dialog* pDialog;
+
+ Timer aScrollTimer; // fuer Autoscrolling
+ DECL_LINK( ScrollHdl, Timer * );
+ void ForceScroll(const Point& aPixPos);
+
+ Timer aDragTimer; // fuer Drag&Drop
+ DECL_LINK( DragTimerHdl, Timer * );
+ DECL_LINK( DragHdl, void * );
+ BOOL bIsInDragMode;
+ Point aMDPos; // Position von MouseButtonDown
+
+ // #95491# member to hold state of the mouse buttons for creation
+ // of own MouseEvents (like in ScrollHdl)
+private:
+ sal_uInt16 mnCode;
+
+public:
+ FuPoor(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+ virtual ~FuPoor();
+
+ // #95491# see member
+ void SetMouseButtonCode(sal_uInt16 nNew) { if(nNew != mnCode) mnCode = nNew; }
+ sal_uInt16 GetMouseButtonCode() const { return mnCode; }
+
+ virtual void Paint(const Rectangle&, Window*) {}
+
+ virtual void DoCut();
+ virtual void DoCopy();
+ virtual void DoPaste();
+
+ // Mouse- & Key-Events; Returnwert=TRUE: Event wurde bearbeitet
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual BOOL MouseMove(const MouseEvent&) { return FALSE; }
+
+ // #95491# moved from inline to *.cxx
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt); // { return FALSE; }
+
+ // #95491# moved from inline to *.cxx
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt); // { return FALSE; }
+
+ virtual BYTE Command(const CommandEvent& rCEvt);
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+
+ virtual void ScrollStart() {} // diese Funktionen werden von
+ virtual void ScrollEnd() {} // ForceScroll aufgerufen
+
+ void SetWindow(Window* pWin) { pWindow = pWin; }
+
+ USHORT GetSlotID() const { return( aSfxRequest.GetSlot() ); }
+
+ BOOL IsDetectiveHit( const Point& rLogicPos );
+
+ void StopDragTimer();
+
+ // #98185# Create default drawing objects via keyboard
+ virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle);
+
+protected:
+ void ImpForceQuadratic(Rectangle& rRect);
+
+public:
+ // #i33136#
+ virtual bool doConstructOrthogonal() const;
+};
+
+
+
+#endif // _SD_FUPOOR_HXX
+
diff --git a/sc/source/ui/inc/fusel.hxx b/sc/source/ui/inc/fusel.hxx
new file mode 100644
index 000000000000..c12b5739d61c
--- /dev/null
+++ b/sc/source/ui/inc/fusel.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUSEL_HXX
+#define SC_FUSEL_HXX
+
+#ifndef _SV_HXX
+#endif
+
+#include "fudraw.hxx"
+
+//class Outliner;
+//class OutlinerView;
+class SdrPageView;
+
+
+/*************************************************************************
+|*
+|* Basisklasse fuer alle Funktionen
+|*
+\************************************************************************/
+
+class FuSelection : public FuDraw
+{
+public:
+ FuSelection(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq );
+
+ virtual ~FuSelection();
+ // Mouse- & Key-Events
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual BOOL MouseMove(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual BYTE Command(const CommandEvent& rCEvt);
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+
+ void ActivateNoteHandles(SdrObject* pObj);
+
+protected:
+// Outliner* pOutliner;
+// OutlinerView* pOutlinerView;
+ BOOL bVCAction;
+
+private:
+ BOOL TestDetective( SdrPageView* pPV, const Point& rPos ); // -> fusel2
+
+ bool IsNoteCaptionMarked() const;
+ bool IsNoteCaptionClicked( const Point& rPos ) const;
+};
+
+
+
+#endif // _SD_FUSEL_HXX
+
diff --git a/sc/source/ui/inc/futext.hxx b/sc/source/ui/inc/futext.hxx
new file mode 100644
index 000000000000..41a41b054554
--- /dev/null
+++ b/sc/source/ui/inc/futext.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_FUTEXT_HXX
+#define SC_FUTEXT_HXX
+
+#include "fuconstr.hxx"
+
+class SdrObject;
+class SdrTextObj;
+class SdrOutliner;
+
+/*************************************************************************
+|*
+|* Basisklasse fuer Textfunktionen
+|*
+\************************************************************************/
+class FuText : public FuConstruct
+{
+protected:
+// USHORT nOldObjectBar;
+ SdrTextObj* pTextObj;
+
+public:
+ FuText(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pView,
+ SdrModel* pDoc, SfxRequest& rReq);
+
+ virtual ~FuText();
+
+ virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual BOOL MouseMove(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+
+ virtual void Activate(); // Function aktivieren
+ virtual void Deactivate(); // Function deaktivieren
+
+ virtual void ForcePointer(const MouseEvent* pMEvt);
+
+ virtual void SelectionHasChanged();
+
+ void SetInEditMode( SdrObject* pObj = NULL, const Point* pMousePixel = NULL,
+ BOOL bCursorToEnd = FALSE, const KeyEvent* pInitialKey = NULL );
+ void StopEditMode(BOOL bTextDirection = FALSE);
+ void StopDragMode(SdrObject* pObject);
+
+ // #98185# Create default drawing objects via keyboard
+ virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle);
+
+private:
+ SdrOutliner* MakeOutliner();
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/graphsh.hxx b/sc/source/ui/inc/graphsh.hxx
new file mode 100644
index 000000000000..db9d04096142
--- /dev/null
+++ b/sc/source/ui/inc/graphsh.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef GRAPHSH_HXX
+#define GRAPHSH_HXX
+
+#include <sfx2/shell.hxx>
+#include "shellids.hxx"
+#include <sfx2/module.hxx>
+#include <svx/svdmark.hxx>
+
+class ScViewData;
+
+#include "drawsh.hxx"
+
+class ScGraphicShell: public ScDrawShell
+{
+public:
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_GRAPHIC_SHELL)
+
+ ScGraphicShell(ScViewData* pData);
+ virtual ~ScGraphicShell();
+
+ void Execute(SfxRequest& rReq);
+ void GetAttrState(SfxItemSet &rSet);
+
+ void ExecuteFilter(SfxRequest& rReq);
+ void GetFilterState(SfxItemSet &rSet);
+};
+
+#endif
diff --git a/sc/source/ui/inc/gridmerg.hxx b/sc/source/ui/inc/gridmerg.hxx
new file mode 100644
index 000000000000..dd656b948a6b
--- /dev/null
+++ b/sc/source/ui/inc/gridmerg.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_GRIDMERG_HXX
+#define SC_GRIDMERG_HXX
+
+#include <tools/solar.h>
+
+class OutputDevice;
+
+class ScGridMerger
+{
+private:
+ OutputDevice* pDev;
+ long nOneX;
+ long nOneY;
+ long nFixStart;
+ long nFixEnd;
+ long nVarStart;
+ long nVarDiff;
+ long nCount;
+ BOOL bVertical;
+ BOOL bOptimize;
+
+ void AddLine( long nStart, long nEnd, long nPos );
+
+public:
+ ScGridMerger( OutputDevice* pOutDev, long nOnePixelX, long nOnePixelY );
+ ~ScGridMerger();
+
+ void AddHorLine( long nX1, long nX2, long nY );
+ void AddVerLine( long nX, long nY1, long nY2 );
+ void Flush();
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
new file mode 100644
index 000000000000..a2283bf2b7de
--- /dev/null
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -0,0 +1,426 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_GRIDWIN_HXX
+#define SC_GRIDWIN_HXX
+
+#include <tools/string.hxx>
+#include <svtools/transfer.hxx>
+#include "viewutil.hxx"
+#include "viewdata.hxx"
+#include "cbutton.hxx"
+#include <svx/sdr/overlay/overlayobject.hxx>
+#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+
+#include <vector>
+#include <memory>
+#include <boost/shared_ptr.hpp>
+
+// ---------------------------------------------------------------------------
+
+struct ScTableInfo;
+class ScViewSelectionEngine;
+class ScDPObject;
+class ScDPFieldPopupWindow;
+class ScDPFieldButton;
+class ScOutputData;
+class ScFilterListBox;
+class AutoFilterPopup;
+class SdrObject;
+class SdrEditView;
+class ScNoteMarker;
+class FloatingWindow;
+class SdrHdlList;
+class ScTransferObj;
+struct SpellCallbackInfo;
+
+ // Maus-Status (nMouseStatus)
+
+#define SC_GM_NONE 0
+#define SC_GM_TABDOWN 1
+#define SC_GM_DBLDOWN 2
+#define SC_GM_FILTER 3
+#define SC_GM_IGNORE 4
+#define SC_GM_WATERUNDO 5
+#define SC_GM_URLDOWN 6
+
+ // Page-Drag-Modus
+
+#define SC_PD_NONE 0
+#define SC_PD_RANGE_L 1
+#define SC_PD_RANGE_R 2
+#define SC_PD_RANGE_T 4
+#define SC_PD_RANGE_B 8
+#define SC_PD_RANGE_TL (SC_PD_RANGE_T|SC_PD_RANGE_L)
+#define SC_PD_RANGE_TR (SC_PD_RANGE_T|SC_PD_RANGE_R)
+#define SC_PD_RANGE_BL (SC_PD_RANGE_B|SC_PD_RANGE_L)
+#define SC_PD_RANGE_BR (SC_PD_RANGE_B|SC_PD_RANGE_R)
+#define SC_PD_BREAK_H 16
+#define SC_PD_BREAK_V 32
+
+
+class ScHideTextCursor
+{
+private:
+ ScViewData* pViewData;
+ ScSplitPos eWhich;
+
+public:
+ ScHideTextCursor( ScViewData* pData, ScSplitPos eW );
+ ~ScHideTextCursor();
+};
+
+// ---------------------------------------------------------------------------
+// predefines
+namespace sdr { namespace overlay { class OverlayObjectList; }}
+
+class ScGridWindow : public Window, public DropTargetHelper, public DragSourceHelper
+{
+ // ScFilterListBox wird immer fuer Auswahlliste benutzt
+ friend class ScFilterListBox;
+
+private:
+ // #114409#
+ ::sdr::overlay::OverlayObjectList* mpOOCursors;
+ ::sdr::overlay::OverlayObjectList* mpOOSelection;
+ ::sdr::overlay::OverlayObjectList* mpOOAutoFill;
+ ::sdr::overlay::OverlayObjectList* mpOODragRect;
+ ::sdr::overlay::OverlayObjectList* mpOOHeader;
+ ::sdr::overlay::OverlayObjectList* mpOOShrink;
+
+ ::boost::shared_ptr<Rectangle> mpAutoFillRect;
+
+ /**
+ * Stores current visible column and row ranges, used to avoid expensive
+ * operations on objects that are outside visible area.
+ */
+ struct VisibleRange
+ {
+ SCCOL mnCol1;
+ SCCOL mnCol2;
+ SCROW mnRow1;
+ SCROW mnRow2;
+
+ VisibleRange();
+
+ bool isInside(SCCOL nCol, SCROW nRow) const;
+ };
+ VisibleRange maVisibleRange;
+
+private:
+ ScViewData* pViewData;
+ ScSplitPos eWhich;
+ ScHSplitPos eHWhich;
+ ScVSplitPos eVWhich;
+
+ ScNoteMarker* pNoteMarker;
+
+ ScFilterListBox* pFilterBox;
+ FloatingWindow* pFilterFloat;
+ ::std::auto_ptr<ScDPFieldPopupWindow> mpDPFieldPopup;
+ ::std::auto_ptr<ScDPFieldButton> mpFilterButton;
+
+ USHORT nCursorHideCount;
+
+ BOOL bMarking;
+
+ USHORT nButtonDown;
+ BOOL bEEMouse; // Edit-Engine hat Maus
+ BYTE nMouseStatus;
+ BYTE nNestedButtonState; // track nested button up/down calls
+
+ BOOL bDPMouse; // DataPilot-D&D (neue Pivottabellen)
+ long nDPField;
+ ScDPObject* pDragDPObj; //! name?
+
+ BOOL bRFMouse; // RangeFinder-Drag
+ BOOL bRFSize;
+ USHORT nRFIndex;
+ SCsCOL nRFAddX;
+ SCsROW nRFAddY;
+
+ USHORT nPagebreakMouse; // Pagebreak-Modus Drag
+ SCCOLROW nPagebreakBreak;
+ SCCOLROW nPagebreakPrev;
+ ScRange aPagebreakSource;
+ ScRange aPagebreakDrag;
+ BOOL bPagebreakDrawn;
+
+ BYTE nPageScript;
+
+ long nLastClickX;
+ long nLastClickY;
+
+ BOOL bDragRect;
+ SCCOL nDragStartX;
+ SCROW nDragStartY;
+ SCCOL nDragEndX;
+ SCROW nDragEndY;
+ InsCellCmd meDragInsertMode;
+
+ USHORT nCurrentPointer;
+
+ BOOL bIsInScroll;
+ BOOL bIsInPaint;
+
+ ScDDComboBoxButton aComboButton;
+
+ Point aCurMousePos;
+
+ USHORT nPaintCount;
+ Rectangle aRepaintPixel;
+ BOOL bNeedsRepaint;
+
+ BOOL bAutoMarkVisible;
+ ScAddress aAutoMarkPos;
+
+ BOOL bListValButton;
+ ScAddress aListValPos;
+
+ Rectangle aInvertRect;
+
+ DECL_LINK( PopupModeEndHdl, FloatingWindow* );
+ DECL_LINK( PopupSpellingHdl, SpellCallbackInfo* );
+
+ BOOL TestMouse( const MouseEvent& rMEvt, BOOL bAction );
+
+ BOOL DoPageFieldSelection( SCCOL nCol, SCROW nRow );
+ bool DoAutoFilterButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt );
+ void DoPushButton( SCCOL nCol, SCROW nRow, const MouseEvent& rMEvt );
+
+ void DPMouseMove( const MouseEvent& rMEvt );
+ void DPMouseButtonUp( const MouseEvent& rMEvt );
+ void DPTestMouse( const MouseEvent& rMEvt, BOOL bMove );
+
+ /**
+ * Check if the mouse click is on a field popup button.
+ *
+ * @return bool true if the field popup menu has been launched and no
+ * further mouse event handling is necessary, false otherwise.
+ */
+ bool DPTestFieldPopupArrow(const MouseEvent& rMEvt, const ScAddress& rPos, ScDPObject* pDPObj);
+ void DPLaunchFieldPopupMenu(
+ const Point& rScrPos, const Size& rScrSize, const ScAddress& rPos, ScDPObject* pDPObj);
+
+ void RFMouseMove( const MouseEvent& rMEvt, BOOL bUp );
+
+ void PagebreakMove( const MouseEvent& rMEvt, BOOL bUp );
+
+ void UpdateDragRect( BOOL bShowRange, const Rectangle& rPosRect );
+
+ BOOL IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab );
+ void ExecFilter( ULONG nSel, SCCOL nCol, SCROW nRow,
+ const String& aValue, bool bCheckForDates );
+ void FilterSelect( ULONG nSel );
+
+ void ExecDataSelect( SCCOL nCol, SCROW nRow, const String& rStr );
+
+ void ExecPageFieldSelect( SCCOL nCol, SCROW nRow, BOOL bHasSelection, const String& rStr );
+
+ BOOL HasScenarioButton( const Point& rPosPixel, ScRange& rScenRange );
+
+ BOOL DropScroll( const Point& rMousePos );
+
+ sal_Int8 AcceptPrivateDrop( const AcceptDropEvent& rEvt );
+ sal_Int8 ExecutePrivateDrop( const ExecuteDropEvent& rEvt );
+ sal_Int8 DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPosX, SCROW nDestPosY,
+ const Point& rLogicPos, sal_Int8 nDndAction );
+
+ void HandleMouseButtonDown( const MouseEvent& rMEvt );
+
+ BOOL DrawMouseButtonDown(const MouseEvent& rMEvt);
+ BOOL DrawMouseButtonUp(const MouseEvent& rMEvt);
+ BOOL DrawMouseMove(const MouseEvent& rMEvt);
+ BOOL DrawKeyInput(const KeyEvent& rKEvt);
+ BOOL DrawCommand(const CommandEvent& rCEvt);
+ BOOL DrawHasMarkedObj();
+ void DrawEndAction();
+ void DrawMarkDropObj( SdrObject* pObj );
+ SdrObject* GetEditObject();
+ BOOL IsMyModel(SdrEditView* pSdrView);
+ //void DrawStartTimer();
+
+ void DrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, ULONG nLayer );
+ void DrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* pContentDev );
+ //BOOL DrawBeforeScroll();
+ void DrawAfterScroll(/*BOOL bVal*/);
+ //void DrawMarks();
+ //BOOL NeedDrawMarks();
+ void DrawComboButton( const Point& rCellPos,
+ long nCellSizeX,
+ long nCellSizeY,
+ BOOL bArrowState,
+ BOOL bBtnIn = FALSE );
+ Rectangle GetListValButtonRect( const ScAddress& rButtonPos );
+
+ void DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, OutputDevice* pContentDev );
+
+ BOOL GetEditUrl( const Point& rPos,
+ String* pName=0, String* pUrl=0, String* pTarget=0 );
+ BOOL GetEditUrlOrError( BOOL bSpellErr, const Point& rPos,
+ String* pName=0, String* pUrl=0, String* pTarget=0 );
+
+ BOOL HitRangeFinder( const Point& rMouse, BOOL& rCorner, USHORT* pIndex = NULL,
+ SCsCOL* pAddX = NULL, SCsROW* pAddY = NULL );
+
+ USHORT HitPageBreak( const Point& rMouse, ScRange* pSource = NULL,
+ SCCOLROW* pBreak = NULL, SCCOLROW* pPrev = NULL );
+
+ void PasteSelection( const Point& rPosPixel );
+
+ void SelectForContextMenu( const Point& rPosPixel, SCsCOL nCellX, SCsROW nCellY );
+
+ void GetSelectionRects( ::std::vector< Rectangle >& rPixelRects );
+
+protected:
+ using Window::Resize;
+ virtual void Resize( const Size& rSize );
+ virtual void PrePaint();
+ virtual void Paint( const Rectangle& rRect );
+ virtual void KeyInput(const KeyEvent& rKEvt);
+ virtual void GetFocus();
+ virtual void LoseFocus();
+
+ virtual void RequestHelp( const HelpEvent& rEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+
+public:
+ ScGridWindow( Window* pParent, ScViewData* pData, ScSplitPos eWhichPos );
+ ~ScGridWindow();
+
+ // #i70788# flush and get overlay
+ ::sdr::overlay::OverlayManager* getOverlayManager();
+ void flushOverlayManager();
+
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual void Tracking( const TrackingEvent& rTEvt );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ void FakeButtonUp();
+
+ Point GetMousePosPixel() const;
+ void UpdateStatusPosSize();
+
+ void ClickExtern();
+
+ void SetPointer( const Pointer& rPointer );
+
+ void MoveMouseStatus( ScGridWindow &rDestWin );
+
+ void ScrollPixel( long nDifX, long nDifY );
+ void UpdateEditViewPos();
+
+ void UpdateFormulas();
+
+ void DoAutoFilterMenue( SCCOL nCol, SCROW nRow, BOOL bDataSelect );
+ void DoScenarioMenue( const ScRange& rScenRange );
+
+ void LaunchPageFieldMenu( SCCOL nCol, SCROW nRow );
+ void LaunchDPFieldMenu( SCCOL nCol, SCROW nRow );
+
+ ::com::sun::star::sheet::DataPilotFieldOrientation GetDPFieldOrientation( SCCOL nCol, SCROW nRow ) const;
+
+ void DrawButtons( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
+ ScTableInfo& rTabInfo, OutputDevice* pContentDev );
+
+ using Window::Draw;
+ void Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
+ ScUpdateMode eMode = SC_UPDATE_ALL );
+
+ void InvertSimple( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
+ BOOL bTestMerge = FALSE, BOOL bRepeat = FALSE );
+
+//UNUSED2008-05 void DrawDragRect( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
+
+ void CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddress);
+
+ void HideCursor();
+ void ShowCursor();
+ void DrawCursor();
+ void DrawAutoFillMark();
+ void UpdateAutoFillMark(BOOL bMarked, const ScRange& rMarkRange);
+
+ void UpdateListValPos( BOOL bVisible, const ScAddress& rPos );
+
+ BOOL ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, BOOL bKeyboard );
+ void HideNoteMarker();
+
+ MapMode GetDrawMapMode( BOOL bForce = FALSE );
+
+ void ContinueDrag();
+
+ void StopMarking();
+ void UpdateInputContext();
+
+ void CheckInverted() { if (nPaintCount) bNeedsRepaint = TRUE; }
+
+ void DoInvertRect( const Rectangle& rPixel );
+
+ void CheckNeedsRepaint();
+
+ void UpdateDPFromFieldPopupMenu();
+
+ // #114409#
+ void CursorChanged();
+ void DrawLayerCreated();
+
+ void DeleteCursorOverlay();
+ void UpdateCursorOverlay();
+ void DeleteSelectionOverlay();
+ void UpdateSelectionOverlay();
+ void DeleteAutoFillOverlay();
+ void UpdateAutoFillOverlay();
+ void DeleteDragRectOverlay();
+ void UpdateDragRectOverlay();
+ void DeleteHeaderOverlay();
+ void UpdateHeaderOverlay();
+ void DeleteShrinkOverlay();
+ void UpdateShrinkOverlay();
+ void UpdateAllOverlays();
+
+protected:
+ // #114409#
+ void ImpCreateOverlayObjects();
+ void ImpDestroyOverlayObjects();
+
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/groupdlg.hxx b/sc/source/ui/inc/groupdlg.hxx
new file mode 100644
index 000000000000..38b96f21e90e
--- /dev/null
+++ b/sc/source/ui/inc/groupdlg.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_GROUPDLG_HXX
+#define SC_GROUPDLG_HXX
+
+
+#include <vcl/dialog.hxx>
+#include <vcl/imagebtn.hxx>
+#include <vcl/fixed.hxx>
+
+//------------------------------------------------------------------------
+
+class ScGroupDlg : public ModalDialog
+{
+public:
+ ScGroupDlg( Window* pParent,
+ USHORT nResId,
+ BOOL bUnGroup = FALSE,
+ BOOL bRows = TRUE );
+ ~ScGroupDlg();
+
+ BOOL GetColsChecked() const;
+
+private:
+ FixedLine aFlFrame;
+ RadioButton aBtnRows;
+ RadioButton aBtnCols;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+};
+
+
+#endif // SC_STRINDLG_HXX
+
+
diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx
new file mode 100644
index 000000000000..ec4dd49705d1
--- /dev/null
+++ b/sc/source/ui/inc/hdrcont.hxx
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_HDRCONT_HXX
+#define SC_HDRCONT_HXX
+
+#include <vcl/window.hxx>
+#ifndef _SELENG_HXX //autogen
+#include <vcl/seleng.hxx>
+#endif
+#include "address.hxx"
+
+// ---------------------------------------------------------------------------
+
+
+#define HDR_HORIZONTAL 0
+#define HDR_VERTICAL 1
+
+#define HDR_SIZE_OPTIMUM 0xFFFF
+
+
+ // Groesse des Sliders
+#define HDR_SLIDERSIZE 2
+
+class ScHeaderControl : public Window
+{
+private:
+ SelectionEngine* pSelEngine;
+ Font aNormFont;
+ Font aBoldFont;
+ BOOL bBoldSet;
+
+ USHORT nFlags;
+ BOOL bVertical; // Vertikal = Zeilenheader
+
+ long nWidth;
+ long nSmallWidth;
+ long nBigWidth;
+
+ SCCOLROW nSize;
+
+ SCCOLROW nMarkStart;
+ SCCOLROW nMarkEnd;
+ BOOL bMarkRange;
+
+ BOOL bDragging; // Groessen aendern
+ SCCOLROW nDragNo;
+ long nDragStart;
+ long nDragPos;
+ BOOL bDragMoved;
+
+ BOOL bIgnoreMove;
+
+ long GetScrPos( SCCOLROW nEntryNo );
+ SCCOLROW GetMousePos( const MouseEvent& rMEvt, BOOL& rBorder );
+ bool IsSelectionAllowed(SCCOLROW nPos) const;
+ void ShowDragHelp();
+
+ void DoPaint( SCCOLROW nStart, SCCOLROW nEnd );
+
+ void DrawShadedRect( long nStart, long nEnd, const Color& rBaseColor );
+
+protected:
+ // von Window ueberladen
+
+ virtual void Paint( const Rectangle& rRect );
+
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void Tracking( const TrackingEvent& rTEvt );
+
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+
+ // neue Methoden
+
+ virtual SCCOLROW GetPos() = 0; // aktuelle Position (Scrolling)
+ virtual USHORT GetEntrySize( SCCOLROW nEntryNo ) = 0; // Breite / Hoehe (Pixel)
+ virtual String GetEntryText( SCCOLROW nEntryNo ) = 0;
+
+ virtual SCCOLROW GetHiddenCount( SCCOLROW nEntryNo );
+ virtual BOOL IsLayoutRTL();
+ virtual BOOL IsMirrored();
+
+ virtual void SetEntrySize( SCCOLROW nPos, USHORT nNewWidth ) = 0;
+ virtual void HideEntries( SCCOLROW nStart, SCCOLROW nEnd ) = 0;
+
+ virtual void SetMarking( BOOL bSet );
+ virtual void SelectWindow();
+ virtual BOOL IsDisabled();
+ virtual BOOL ResizeAllowed();
+ virtual String GetDragHelp( long nVal );
+
+ virtual void DrawInvert( long nDragPos );
+ virtual void Command( const CommandEvent& rCEvt );
+
+public:
+ ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEngine,
+ SCCOLROW nNewSize, USHORT nNewFlags );
+ ~ScHeaderControl();
+
+ void SetIgnoreMove(BOOL bSet) { bIgnoreMove = bSet; }
+
+ void StopMarking();
+
+ void SetMark( BOOL bNewSet, SCCOLROW nNewStart, SCCOLROW nNewEnd );
+
+ long GetWidth() const { return nWidth; }
+ long GetSmallWidth() const { return nSmallWidth; }
+ long GetBigWidth() const { return nBigWidth; }
+ void SetWidth( long nNew );
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/hfedtdlg.hxx b/sc/source/ui/inc/hfedtdlg.hxx
new file mode 100644
index 000000000000..1f1ea7242b17
--- /dev/null
+++ b/sc/source/ui/inc/hfedtdlg.hxx
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_HFEDTDLG_HXX
+#define SC_HFEDTDLG_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/pageitem.hxx>
+
+
+#include "sc.hrc"
+
+
+//==================================================================
+
+class ScHFEditDlg : public SfxTabDialog
+{
+ SvxNumType eNumType;
+public:
+ ScHFEditDlg( SfxViewFrame* pFrame,
+ Window* pParent,
+ const SfxItemSet& rCoreSet,
+ const String& rPageStyle,
+ USHORT nResId = RID_SCDLG_HFEDIT );
+
+ ~ScHFEditDlg();
+
+ virtual void PageCreated( USHORT nId, SfxTabPage& rPage );
+};
+
+
+#endif // SC_HFEDTDLG_HXX
diff --git a/sc/source/ui/inc/highred.hrc b/sc/source/ui/inc/highred.hrc
new file mode 100644
index 000000000000..426c9ba29ee2
--- /dev/null
+++ b/sc/source/ui/inc/highred.hrc
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc" // -> RID_SCDLG_CHANGES
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_HELP 5
+
+#define CB_HIGHLIGHT_ACCEPT 6
+#define CB_HIGHLIGHT_REJECT 7
+
+//
+#define FL_FILTER 10
+#define TP_FILTER 11
+#define TP_VIEW 12
+#define CB_HIGHLIGHT 13
+
+#define FT_ASSIGN 14
+#define ED_ASSIGN 15
+#define RB_ASSIGN 16
+
+
+
+
+
+
+
+#define STR_INSERT_COLS 20
+#define STR_INSERT_ROWS 21
+#define STR_INSERT_TABS 22
+#define STR_DELETE_COLS 23
+#define STR_DELETE_ROWS 24
+#define STR_DELETE_TABS 25
+#define STR_MOVE 26
+#define STR_CONTENT 27
+#define STR_REJECT 28
+
+// Bitmaps
+#define BMP_STR_CLOSE 31
+#define BMP_STR_OPEN 32
+#define BMP_STR_END 33
+#define BMP_STR_ERROR 34
+
+
+//
+
diff --git a/sc/source/ui/inc/highred.hxx b/sc/source/ui/inc/highred.hxx
new file mode 100644
index 000000000000..b500473b2071
--- /dev/null
+++ b/sc/source/ui/inc/highred.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_HIGHRED_HXX
+#define SC_HIGHRED_HXX
+
+#ifndef _MOREBTN_HXX //autogen
+#include <vcl/morebtn.hxx>
+#endif
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#include <svtools/headbar.hxx>
+#include <svtools/svtabbx.hxx>
+
+
+#include "rangenam.hxx"
+#include "anyrefdg.hxx"
+
+#ifndef _MOREBTN_HXX //autogen
+#include <vcl/morebtn.hxx>
+#endif
+#include <vcl/lstbox.hxx>
+
+#ifndef _SVX_ACREDLIN_HXX
+#include <svx/ctredlin.hxx>
+#endif
+#include <svx/simptabl.hxx>
+#include "chgtrack.hxx"
+#include "chgviset.hxx"
+
+class ScViewData;
+class ScDocument;
+
+#ifndef FLT_DATE_BEFORE
+#define FLT_DATE_BEFORE 0
+#define FLT_DATE_SINCE 1
+#define FLT_DATE_EQUAL 2
+#define FLT_DATE_NOTEQUAL 3
+#define FLT_DATE_BETWEEN 4
+#define FLT_DATE_SAVE 5
+#endif
+
+//==================================================================
+
+class ScHighlightChgDlg : public ScAnyRefDlg
+{
+private:
+
+ CheckBox aHighlightBox;
+ FixedLine aFlFilter;
+ SvxTPFilter aFilterCtr;
+ CheckBox aCbAccept;
+ CheckBox aCbReject;
+
+ OKButton aOkButton;
+ CancelButton aCancelButton;
+ HelpButton aHelpButton;
+
+ formula::RefEdit aEdAssign;
+ formula::RefButton aRbAssign;
+
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ ScRangeName aLocalRangeName;
+ Selection theCurSel;
+ Size MinSize;
+ ScRangeList aRangeList;
+ ScChangeViewSettings aChangeViewSet;
+
+ void Init();
+
+ DECL_LINK( RefHandle, SvxTPFilter* );
+ DECL_LINK(HighLightHandle, CheckBox*);
+ DECL_LINK(OKBtnHdl, PushButton*);
+
+
+protected:
+
+ virtual void RefInputDone( BOOL bForced = FALSE );
+
+public:
+ ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScViewData* ptrViewData);
+
+ ~ScHighlightChgDlg();
+
+ virtual void SetActive();
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+ virtual BOOL Close();
+ virtual BOOL IsRefInputMode() const;
+
+};
+
+
+#endif // SC_NAMEDLG_HXX
+
diff --git a/sc/source/ui/inc/hintwin.hxx b/sc/source/ui/inc/hintwin.hxx
new file mode 100644
index 000000000000..2fd9e7897ab6
--- /dev/null
+++ b/sc/source/ui/inc/hintwin.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_HINTWIN_HXX
+#define SC_HINTWIN_HXX
+
+#include <vcl/window.hxx>
+
+class ScHintWindow : public Window
+{
+private:
+ String aTitle;
+ String aMessage;
+ Point aTextStart;
+ long nTextHeight;
+ Font aTextFont;
+ Font aHeadFont;
+
+protected:
+ virtual void Paint( const Rectangle& rRect );
+
+public:
+ ScHintWindow( Window* pParent, const String& rTit, const String& rMsg );
+ ~ScHintWindow();
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/hiranges.hxx b/sc/source/ui/inc/hiranges.hxx
new file mode 100644
index 000000000000..6182d30dc96e
--- /dev/null
+++ b/sc/source/ui/inc/hiranges.hxx
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_HIRANGES_HXX
+#define SC_HIRANGES_HXX
+
+#include <tools/color.hxx>
+#include "global.hxx"
+#include "address.hxx"
+
+//==================================================================
+
+struct ScHighlightEntry
+{
+ ScRange aRef;
+ Color aColor;
+
+ ScHighlightEntry( const ScRange& rR, const Color& rC ) :
+ aRef(rR), aColor(rC) {}
+};
+
+class ScHighlightRanges
+{
+ List aEntries;
+
+public:
+ ScHighlightRanges();
+ ~ScHighlightRanges();
+
+ ULONG Count() const { return aEntries.Count(); }
+ void Insert( ScHighlightEntry* pNew ) { aEntries.Insert(pNew, LIST_APPEND); }
+ ScHighlightEntry* GetObject( ULONG nIndex ) const
+ { return (ScHighlightEntry*)aEntries.GetObject(nIndex); }
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx
new file mode 100644
index 000000000000..01e10f9a3983
--- /dev/null
+++ b/sc/source/ui/inc/imoptdlg.hxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_IMOPTDLG_HXX
+#define SC_IMOPTDLG_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/combobox.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/imagebtn.hxx>
+#include <svx/txencbox.hxx>
+#include "scdllapi.h"
+#include "global.hxx"
+
+//===================================================================
+
+class SC_DLLPUBLIC ScImportOptions
+{
+public:
+ ScImportOptions()
+ : nFieldSepCode(0), nTextSepCode(0),
+ eCharSet(RTL_TEXTENCODING_DONTKNOW), bFixedWidth(FALSE),
+ bSaveAsShown(FALSE)
+ {}
+ ScImportOptions( const String& rStr );
+
+ ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, const String& rStr )
+ : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep), aStrFont(rStr),
+ bFixedWidth(FALSE), bSaveAsShown(FALSE)
+ { eCharSet = ScGlobal::GetCharsetValue(aStrFont); }
+
+ ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc )
+ : nFieldSepCode(nFieldSep), nTextSepCode(nTextSep),
+ bFixedWidth(FALSE), bSaveAsShown(FALSE)
+ { SetTextEncoding( nEnc ); }
+
+ ScImportOptions( const ScImportOptions& rCpy )
+ : nFieldSepCode (rCpy.nFieldSepCode),
+ nTextSepCode (rCpy.nTextSepCode),
+ aStrFont (rCpy.aStrFont),
+ eCharSet (rCpy.eCharSet),
+ bFixedWidth (rCpy.bFixedWidth),
+ bSaveAsShown (rCpy.bSaveAsShown)
+ {}
+
+ ScImportOptions& operator=( const ScImportOptions& rCpy )
+ {
+ nFieldSepCode = rCpy.nFieldSepCode;
+ nTextSepCode = rCpy.nTextSepCode;
+ aStrFont = rCpy.aStrFont;
+ eCharSet = rCpy.eCharSet;
+ bFixedWidth = rCpy.bFixedWidth;
+ bSaveAsShown = rCpy.bSaveAsShown;
+ return *this;
+ }
+
+ BOOL operator==( const ScImportOptions& rCmp )
+ {
+ return
+ nFieldSepCode == rCmp.nFieldSepCode
+ && nTextSepCode == rCmp.nTextSepCode
+ && eCharSet == rCmp.eCharSet
+ && aStrFont == rCmp.aStrFont
+ && bFixedWidth == rCmp.bFixedWidth
+ && bSaveAsShown == rCmp.bSaveAsShown;
+ }
+ String BuildString() const;
+
+ void SetTextEncoding( rtl_TextEncoding nEnc );
+
+ sal_Unicode nFieldSepCode;
+ sal_Unicode nTextSepCode;
+ String aStrFont;
+ CharSet eCharSet;
+ BOOL bFixedWidth;
+ BOOL bSaveAsShown;
+};
+
+
+#endif // SC_IMOPTDLG_HXX
+
+
+
diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx
new file mode 100644
index 000000000000..86a91216edcc
--- /dev/null
+++ b/sc/source/ui/inc/impex.hxx
@@ -0,0 +1,191 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_IMPEX_HXX
+#define SC_IMPEX_HXX
+
+#include <osl/endian.h>
+#include <sot/exchange.hxx>
+#include "global.hxx"
+#include "address.hxx"
+
+class ScDocShell;
+class ScDocument;
+class SvStream;
+class SfxMedium;
+class ScAsciiOptions;
+
+struct ScExportTextOptions
+{
+ enum NewlineConversion { ToSystem, ToSpace, None };
+ ScExportTextOptions( NewlineConversion eNewlineConversion = ToSystem, sal_Unicode cSeparatorConvertTo = 0, bool bAddQuotes = false ) :
+ meNewlineConversion( eNewlineConversion ), mcSeparatorConvertTo( cSeparatorConvertTo ), mbAddQuotes( bAddQuotes ) {}
+
+ NewlineConversion meNewlineConversion;
+ sal_Unicode mcSeparatorConvertTo; // Convert separator to this character
+ bool mbAddQuotes;
+};
+
+class ScImportExport
+{
+ ScDocShell* pDocSh;
+ ScDocument* pDoc;
+ ScDocument* pUndoDoc;
+ ScRange aRange;
+ String aStreamPath;
+ String aNonConvertibleChars;
+ ULONG nSizeLimit;
+ sal_Unicode cSep; // Separator
+ sal_Unicode cStr; // String Delimiter
+ BOOL bFormulas; // Formeln im Text?
+ BOOL bIncludeFiltered; // include filtered rows? (default true)
+ BOOL bAll; // keine Selektion
+ BOOL bSingle; // Einfachselektion
+ BOOL bUndo; // Mit Undo?
+ BOOL bOverflow; // zuviele Zeilen/Spalten
+ bool mbApi;
+ ScExportTextOptions mExportTextOptions;
+
+ ScAsciiOptions* pExtOptions; // erweiterte Optionen
+
+ BOOL StartPaste(); // Protect-Check, Undo einrichten
+ void EndPaste(); // Undo/Redo-Aktionen, Repaint
+ BOOL Doc2Text( SvStream& );
+ BOOL Text2Doc( SvStream& );
+ BOOL Doc2Sylk( SvStream& );
+ BOOL Sylk2Doc( SvStream& );
+ BOOL Doc2HTML( SvStream&, const String& );
+ BOOL Doc2RTF( SvStream& );
+ BOOL Doc2Dif( SvStream& );
+ BOOL Dif2Doc( SvStream& );
+ BOOL ExtText2Doc( SvStream& ); // mit pExtOptions
+ BOOL RTF2Doc( SvStream&, const String& rBaseURL );
+ BOOL HTML2Doc( SvStream&, const String& rBaseURL );
+
+public:
+ ScImportExport( ScDocument* ); // Gesamtdokument
+ ScImportExport( ScDocument*, const String& ); // Bereichs/Zellangabe
+ ScImportExport( ScDocument*, const ScAddress& );
+ ScImportExport( ScDocument*, const ScRange& );
+ ~ScImportExport();
+
+ void SetExtOptions( const ScAsciiOptions& rOpt );
+
+ BOOL IsDoubleRef() const { return BOOL( !( bAll || bSingle ) ); }
+ BOOL IsSingleRef() const { return bSingle; }
+ BOOL IsNoRef() const { return bAll; }
+ BOOL IsRef() const { return BOOL( !bAll ); }
+
+ const ScRange& GetRange() const { return aRange; }
+
+ BOOL IsUndo() const { return bUndo; }
+ void SetUndo( BOOL b ) { bUndo = b; }
+
+ static BOOL IsFormatSupported( ULONG nFormat );
+ static const sal_Unicode* ScanNextFieldFromString( const sal_Unicode* p,
+ String& rField, sal_Unicode cStr, const sal_Unicode* pSeps, bool bMergeSeps, bool& rbIsQuoted );
+ static void WriteUnicodeOrByteString( SvStream& rStrm, const String& rString, BOOL bZero = FALSE );
+ static void WriteUnicodeOrByteEndl( SvStream& rStrm );
+ static inline BOOL IsEndianSwap( const SvStream& rStrm );
+
+ //! only if stream is only used in own (!) memory
+ static inline void SetNoEndianSwap( SvStream& rStrm );
+
+ sal_Unicode GetSeparator() const { return cSep; }
+ void SetSeparator( sal_Unicode c ) { cSep = c; }
+ sal_Unicode GetDelimiter() const { return cStr; }
+ void SetDelimiter( sal_Unicode c ) { cStr = c; }
+ BOOL IsFormulas() const { return bFormulas; }
+ void SetFormulas( BOOL b ) { bFormulas = b; }
+ BOOL IsIncludeFiltered() const { return bIncludeFiltered; }
+ void SetIncludeFiltered( BOOL b ) { bIncludeFiltered = b; }
+
+ void SetSizeLimit( ULONG nNew ) { nSizeLimit = nNew; } // momentan nur fuer Ascii
+
+ void SetStreamPath( const String& rPath ) { aStreamPath = rPath; }
+ const String& GetStreamPath() const { return aStreamPath; }
+
+ BOOL ImportString( const ::rtl::OUString&, ULONG=FORMAT_STRING );
+ BOOL ExportString( ::rtl::OUString&, ULONG=FORMAT_STRING );
+ BOOL ExportByteString( ByteString&, rtl_TextEncoding, ULONG=FORMAT_STRING );
+
+ BOOL ImportStream( SvStream&, const String& rBaseURL, ULONG=FORMAT_STRING );
+ BOOL ExportStream( SvStream&, const String& rBaseURL, ULONG=FORMAT_STRING );
+
+ BOOL ImportData( const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue );
+ BOOL ExportData( const String& rMimeType,
+ ::com::sun::star::uno::Any & rValue );
+
+ BOOL IsOverflow() const { return bOverflow; } // nach dem Importieren
+
+ const String& GetNonConvertibleChars() const { return aNonConvertibleChars; }
+
+ bool IsApi() const { return mbApi; }
+ void SetApi( bool bApi ) { mbApi = bApi; }
+ const ScExportTextOptions& GetExportTextOptions() { return mExportTextOptions; }
+ void SetExportTextOptions( const ScExportTextOptions& options ) { mExportTextOptions = options; }
+};
+
+
+// static
+inline BOOL ScImportExport::IsEndianSwap( const SvStream& rStrm )
+{
+#ifdef OSL_BIGENDIAN
+ return rStrm.GetNumberFormatInt() != NUMBERFORMAT_INT_BIGENDIAN;
+#else
+ return rStrm.GetNumberFormatInt() != NUMBERFORMAT_INT_LITTLEENDIAN;
+#endif
+}
+
+// static
+inline void ScImportExport::SetNoEndianSwap( SvStream& rStrm )
+{
+#ifdef OSL_BIGENDIAN
+ rStrm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
+#else
+ rStrm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
+#endif
+}
+
+
+// Helper class for importing clipboard strings as streams.
+class ScImportStringStream : public SvMemoryStream
+{
+public:
+ ScImportStringStream( const ::rtl::OUString rStr )
+ : SvMemoryStream( (void*)rStr.getStr(),
+ rStr.getLength() * sizeof(sal_Unicode), STREAM_READ)
+ {
+ SetStreamCharSet( RTL_TEXTENCODING_UNICODE );
+ SetEndianSwap( FALSE );
+ }
+};
+
+
+#endif
+
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
new file mode 100644
index 000000000000..61974cf7464d
--- /dev/null
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -0,0 +1,296 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_INPUTHDL_HXX
+#define SC_INPUTHDL_HXX
+
+#include "global.hxx"
+#include "address.hxx"
+#include <tools/fract.hxx>
+#include <tools/gen.hxx>
+#include <editeng/svxenum.hxx>
+
+class ScDocument;
+class ScTabView;
+class ScTabViewShell;
+class ScInputWindow;
+class ScPatternAttr;
+class EditEngine;
+class ScEditEngineDefaulter;
+class EditView;
+class EditTextObject;
+class ScInputHdlState;
+class TypedScStrCollection;
+class ScRangeFindList;
+class Timer;
+class KeyEvent;
+class CommandEvent;
+
+struct ESelection;
+
+//========================================================================
+// ScInputHandler
+//========================================================================
+
+class ScInputHandler
+{
+private:
+ ScInputWindow* pInputWin;
+
+ ScEditEngineDefaulter* pEngine; // editierte Daten in der Tabelle
+ EditView* pTableView; // aktive EditView dazu
+ EditView* pTopView; // EditView in der Eingabezeile
+
+ TypedScStrCollection* pColumnData;
+ TypedScStrCollection* pFormulaData;
+ TypedScStrCollection* pFormulaDataPara;
+ Window* pTipVisibleParent;
+ ULONG nTipVisible;
+ Window* pTipVisibleSecParent;
+ ULONG nTipVisibleSec;
+ String aManualTip;
+ String aAutoSearch;
+ USHORT nAutoPos;
+ BOOL bUseTab; // Blaettern moeglich
+
+ BOOL bTextValid; // Text noch nicht in Edit-Engine
+ String aCurrentText;
+
+ String aFormText; // fuer Funktions-Autopilot
+ xub_StrLen nFormSelStart; // Selektion fuer Funktions-Autopilot
+ xub_StrLen nFormSelEnd;
+
+ USHORT nAutoPar; // autom.parentheses than can be overwritten
+
+ ScAddress aCursorPos;
+ ScInputMode eMode;
+ BOOL bModified;
+ BOOL bSelIsRef;
+ BOOL bFormulaMode;
+ BOOL bInRangeUpdate;
+ BOOL bParenthesisShown;
+ BOOL bCreatingFuncView;
+ BOOL bInEnterHandler;
+ BOOL bCommandErrorShown;
+ BOOL bInOwnChange;
+
+ BOOL bProtected;
+ BOOL bCellHasPercentFormat;
+ ULONG nValidation;
+ SvxCellHorJustify eAttrAdjust;
+
+ Fraction aScaleX; // fuer Ref-MapMode
+ Fraction aScaleY;
+
+ ScTabViewShell* pRefViewSh;
+ ScTabViewShell* pActiveViewSh;
+
+ const ScPatternAttr* pLastPattern;
+ SfxItemSet* pEditDefaults;
+ BOOL bLastIsSymbol;
+
+ ScInputHdlState* pLastState;
+ Timer* pDelayTimer;
+
+ ScRangeFindList* pRangeFindList;
+
+ static BOOL bAutoComplete; // aus App-Optionen
+ static BOOL bOptLoaded;
+
+#ifdef _INPUTHDL_CXX
+private:
+ void UpdateActiveView();
+ void SyncViews( EditView* pSourceView = NULL );
+ BOOL StartTable( sal_Unicode cTyped, BOOL bFromCommand );
+ void RemoveSelection();
+ void UpdateFormulaMode();
+ void InvalidateAttribs();
+ void ImplCreateEditEngine();
+ DECL_LINK( DelayTimer, Timer* );
+ void GetColData();
+ void UseColData();
+ void NextAutoEntry( BOOL bBack );
+ void UpdateAdjust( sal_Unicode cTyped );
+ void GetFormulaData();
+ void UseFormulaData();
+ void NextFormulaEntry( BOOL bBack );
+ void PasteFunctionData();
+ void PasteManualTip();
+ EditView* GetFuncEditView();
+ void RemoveAdjust();
+ void RemoveRangeFinder();
+ void DeleteRangeFinder();
+ void UpdateParenthesis();
+ void UpdateAutoCorrFlag();
+ void ResetAutoPar();
+ void AutoParAdded();
+ BOOL CursorAtClosingPar();
+ void SkipClosingPar();
+ DECL_LINK( ModifyHdl, void* );
+ DECL_LINK( ShowHideTipVisibleParentListener, VclWindowEvent* );
+ DECL_LINK( ShowHideTipVisibleSecParentListener, VclWindowEvent* );
+#endif
+
+public:
+ ScInputHandler();
+ virtual ~ScInputHandler();
+
+ void SetMode( ScInputMode eNewMode );
+ BOOL IsInputMode() const { return (eMode != SC_INPUT_NONE); }
+ BOOL IsEditMode() const { return (eMode != SC_INPUT_NONE &&
+ eMode != SC_INPUT_TYPE); }
+ BOOL IsTopMode() const { return (eMode == SC_INPUT_TOP); }
+
+ const String& GetEditString();
+ const String& GetFormString() const { return aFormText; }
+
+ BOOL GetTextAndFields( ScEditEngineDefaulter& rDestEngine );
+
+ BOOL KeyInput( const KeyEvent& rKEvt, BOOL bStartEdit = FALSE );
+ void EnterHandler( BYTE nBlockMode = 0 );
+ void CancelHandler();
+ void SetReference( const ScRange& rRef, ScDocument* pDoc );
+ void AddRefEntry();
+
+ BOOL InputCommand( const CommandEvent& rCEvt, BOOL bForce );
+
+ void InsertFunction( const String& rFuncName, BOOL bAddPar = TRUE );
+ void ClearText();
+
+ void InputSelection( EditView* pView );
+ void InputChanged( EditView* pView, BOOL bFromNotify = FALSE );
+
+ void ViewShellGone(ScTabViewShell* pViewSh);
+ void SetRefViewShell(ScTabViewShell* pRefVsh) {pRefViewSh=pRefVsh;}
+
+
+ void NotifyChange( const ScInputHdlState* pState, BOOL bForce = FALSE,
+ ScTabViewShell* pSourceSh = NULL,
+ BOOL bStopEditing = TRUE);
+ void UpdateCellAdjust( SvxCellHorJustify eJust );
+
+ void ResetDelayTimer(); //BugId 54702
+
+ void HideTip();
+ void HideTipBelow();
+ void ShowTipCursor();
+ void ShowTip( const String& rText ); // am Cursor
+ void ShowTipBelow( const String& rText );
+
+ void SetRefScale( const Fraction& rX, const Fraction& rY );
+ void UpdateRefDevice();
+
+ EditView* GetActiveView();
+ EditView* GetTableView() { return pTableView; }
+ EditView* GetTopView() { return pTopView; }
+
+ BOOL DataChanging( sal_Unicode cTyped = 0, BOOL bFromCommand = FALSE );
+ void DataChanged( BOOL bFromTopNotify = FALSE );
+
+ BOOL TakesReturn() const { return ( nTipVisible != 0 ); }
+
+ void SetModified() { bModified = TRUE; }
+
+ BOOL GetSelIsRef() const { return bSelIsRef; }
+ void SetSelIsRef(BOOL bSet) { bSelIsRef = bSet; }
+
+ void ShowRefFrame();
+
+ ScRangeFindList* GetRangeFindList() { return pRangeFindList; }
+
+ void UpdateRange( USHORT nIndex, const ScRange& rNew );
+
+ // Kommunikation mit Funktionsautopilot
+ void InputGetSelection ( xub_StrLen& rStart, xub_StrLen& rEnd );
+ void InputSetSelection ( xub_StrLen nStart, xub_StrLen nEnd );
+ void InputReplaceSelection ( const String& rStr );
+ String InputGetFormulaStr ();
+
+ BOOL IsFormulaMode() const { return bFormulaMode; }
+ ScInputWindow* GetInputWindow() { return pInputWin; }
+ void SetInputWindow( ScInputWindow* pNew ) { pInputWin = pNew; }
+ void StopInputWinEngine( BOOL bAll );
+
+ BOOL IsInEnterHandler() const { return bInEnterHandler; }
+ BOOL IsInOwnChange() const { return bInOwnChange; }
+
+ BOOL IsModalMode( SfxObjectShell* pDocSh );
+
+ void ForgetLastPattern();
+
+ void UpdateSpellSettings( BOOL bFromStartTab = FALSE );
+
+ void FormulaPreview();
+
+ Size GetTextSize(); // in 1/100mm
+
+ // eigentlich private, fuer SID_INPUT_SUM public
+ void InitRangeFinder( const String& rFormula );
+
+ static void SetAutoComplete(BOOL bSet) { bAutoComplete = bSet; }
+};
+
+//========================================================================
+// ScInputHdlState
+//========================================================================
+class ScInputHdlState
+{
+ friend class ScInputHandler;
+
+public:
+ ScInputHdlState( const ScAddress& rCurPos,
+ const ScAddress& rStartPos,
+ const ScAddress& rEndPos,
+ const String& rString,
+ const EditTextObject* pData );
+ ScInputHdlState( const ScInputHdlState& rCpy );
+ ~ScInputHdlState();
+
+ ScInputHdlState& operator= ( const ScInputHdlState& r );
+ int operator==( const ScInputHdlState& r ) const;
+ int operator!=( const ScInputHdlState& r ) const
+ { return !operator==( r ); }
+
+ const ScAddress& GetPos() const { return aCursorPos; }
+ const ScAddress& GetStartPos() const { return aStartPos; }
+ const ScAddress& GetEndPos() const { return aEndPos; }
+ const String& GetString() const { return aString; }
+ const EditTextObject* GetEditData() const { return pEditData; }
+
+private:
+ ScAddress aCursorPos;
+ ScAddress aStartPos;
+ ScAddress aEndPos;
+ String aString;
+ EditTextObject* pEditData;
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
new file mode 100644
index 000000000000..236d34a8254f
--- /dev/null
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -0,0 +1,228 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_INPUTWIN_HXX
+#define SC_INPUTWIN_HXX
+
+#include <vector>
+#include <vcl/toolbox.hxx>
+#include <sfx2/childwin.hxx>
+#include <svl/lstner.hxx>
+#include <vcl/combobox.hxx>
+#include <vcl/window.hxx>
+#include <svtools/transfer.hxx>
+
+class ScEditEngineDefaulter;
+class EditView;
+struct ESelection;
+class ScInputHandler;
+class ScAccessibleEditLineTextData;
+struct EENotify;
+class ScRangeList;
+
+//========================================================================
+
+class ScTextWnd : public Window, public DragSourceHelper // edit window
+{
+public:
+ ScTextWnd( Window* pParent );
+ virtual ~ScTextWnd();
+
+ void SetTextString( const String& rString );
+ const String& GetTextString() const;
+
+ BOOL IsInputActive();
+ EditView* GetEditView();
+
+ // fuer FunktionsAutopiloten
+ void MakeDialogEditView();
+
+ void StartEditEngine();
+ void StopEditEngine( BOOL bAll );
+
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ void SetFormulaMode( BOOL bSet );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ void InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData );
+ void RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData );
+
+ DECL_LINK( NotifyHdl, EENotify* );
+
+protected:
+ virtual void Paint( const Rectangle& rRec );
+ virtual void Resize();
+
+ 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 KeyInput(const KeyEvent& rKEvt);
+ virtual void GetFocus();
+ virtual void LoseFocus();
+
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+
+ virtual String GetText() const;
+
+private:
+ void ImplInitSettings();
+ void UpdateAutoCorrFlag();
+
+private:
+ typedef ::std::vector< ScAccessibleEditLineTextData* > AccTextDataVector;
+
+ String aString;
+ Font aTextFont;
+ ScEditEngineDefaulter* pEditEngine; // erst bei Bedarf angelegt
+ EditView* pEditView;
+ AccTextDataVector maAccTextDatas; // #i105267# text datas may be cloned, remember all copies
+ BOOL bIsRTL;
+ BOOL bIsInsertMode;
+ BOOL bFormulaMode;
+
+ // #102710#; this flag should be true if a key input or a command is handled
+ // it prevents the call of InputChanged in the ModifyHandler of the EditEngine
+ BOOL bInputMode;
+};
+
+//========================================================================
+
+class ScPosWnd : public ComboBox, public SfxListener // Positionsanzeige
+{
+private:
+ String aPosStr;
+ Accelerator* pAccel;
+ ULONG nTipVisible;
+ BOOL bFormulaMode;
+ BOOL bTopHadFocus;
+
+public:
+ ScPosWnd( Window* pParent );
+ virtual ~ScPosWnd();
+
+ void SetPos( const String& rPosStr ); // angezeigter Text
+ void SetFormulaMode( BOOL bSet );
+
+protected:
+ virtual void Select();
+ virtual void Modify();
+
+ virtual long Notify( NotifyEvent& rNEvt );
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+private:
+ void FillRangeNames();
+ void FillFunctions();
+ void DoEnter();
+ void HideTip();
+
+ void ReleaseFocus_Impl();
+};
+
+//========================================================================
+
+class ScInputWindow : public ToolBox // Parent-Toolbox
+{
+public:
+ ScInputWindow( Window* pParent, SfxBindings* pBind );
+ virtual ~ScInputWindow();
+
+ virtual void Resize();
+ virtual void Select();
+
+ void SetFuncString( const String& rString, BOOL bDoEdit = TRUE );
+ void SetPosString( const String& rStr );
+ void SetTextString( const String& rString );
+
+ void SetOkCancelMode();
+ void SetSumAssignMode();
+ void EnableButtons( BOOL bEnable = TRUE );
+
+ void SetFormulaMode( BOOL bSet );
+
+ BOOL IsInputActive();
+ EditView* GetEditView();
+//UNUSED2008-05 EditView* ActivateEdit( const String& rText,
+//UNUSED2008-05 const ESelection& rSel );
+
+ void TextGrabFocus();
+ void TextInvalidate();
+ void SwitchToTextWin();
+
+ void PosGrabFocus();
+
+ // Fuer FunktionsAutopiloten
+ void MakeDialogEditView();
+
+ void StopEditEngine( BOOL bAll );
+
+ void SetInputHandler( ScInputHandler* pNew );
+
+ ScInputHandler* GetInputHandler(){ return pInputHdl;}
+
+ void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+
+protected:
+ virtual void SetText( const String& rString );
+ virtual String GetText() const;
+
+ sal_Bool UseSubTotal( ScRangeList* pRangeList ) const;
+
+private:
+ ScPosWnd aWndPos;
+ ScTextWnd aTextWindow;
+ ScInputHandler* pInputHdl;
+ SfxBindings* pBindings;
+ String aTextOk;
+ String aTextCancel;
+ String aTextSum;
+ String aTextEqual;
+ BOOL bIsOkCancelMode;
+};
+
+//==================================================================
+
+class ScInputWindowWrapper : public SfxChildWindow
+{
+public:
+ ScInputWindowWrapper( Window* pParent,
+ USHORT nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW(ScInputWindowWrapper);
+};
+
+
+#endif
+
diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx
new file mode 100644
index 000000000000..fd8c090cfd33
--- /dev/null
+++ b/sc/source/ui/inc/inscldlg.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_INSCLDLG_HXX
+#define SC_INSCLDLG_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/imagebtn.hxx>
+#include <vcl/fixed.hxx>
+
+
+#include "global.hxx"
+
+//------------------------------------------------------------------------
+
+class ScInsertCellDlg : public ModalDialog
+{
+private:
+ FixedLine aFlFrame;
+ RadioButton aBtnCellsDown;
+ RadioButton aBtnCellsRight;
+ RadioButton aBtnInsRows;
+ RadioButton aBtnInsCols;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+public:
+ ScInsertCellDlg( Window* pParent,BOOL bDisallowCellMove = FALSE );
+ ~ScInsertCellDlg();
+
+ InsCellCmd GetInsCellCmd() const;
+};
+
+
+#endif // SC_INSCLDLG_HXX
+
+
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
new file mode 100644
index 000000000000..ffdccaba6a10
--- /dev/null
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_INSCODLG_HXX
+#define SC_INSCODLG_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/imagebtn.hxx>
+#include <vcl/fixed.hxx>
+#include "global.hxx"
+
+//------------------------------------------------------------------------
+//CHINA001 #define INS_CONT_NOEMPTY 0x0100
+//CHINA001 #define INS_CONT_TRANS 0x0200
+//CHINA001 #define INS_CONT_LINK 0x0400
+//CHINA001
+//CHINA001 #define SC_CELL_SHIFT_DISABLE_DOWN 0x01
+//CHINA001 #define SC_CELL_SHIFT_DISABLE_RIGHT 0x02
+#include "scui_def.hxx"
+
+class ScInsertContentsDlg : public ModalDialog
+{
+public:
+ ScInsertContentsDlg( Window* pParent,
+ USHORT nCheckDefaults = 0,
+ const String* pStrTitle = NULL );
+ ~ScInsertContentsDlg();
+
+ USHORT GetInsContentsCmdBits() const;
+ USHORT GetFormulaCmdBits() const;
+ BOOL IsSkipEmptyCells() const {return aBtnSkipEmptyCells.IsChecked();}
+ BOOL IsTranspose() const {return aBtnTranspose.IsChecked();}
+ BOOL IsLink() const {return aBtnLink.IsChecked();}
+ InsCellCmd GetMoveMode();
+
+ void SetOtherDoc( BOOL bSet );
+ void SetFillMode( BOOL bSet );
+ void SetChangeTrack( BOOL bSet );
+ void SetCellShiftDisabled( int nDisable );
+
+private:
+ FixedLine aFlFrame;
+ CheckBox aBtnInsAll;
+ CheckBox aBtnInsStrings;
+ CheckBox aBtnInsNumbers;
+ CheckBox aBtnInsDateTime;
+ CheckBox aBtnInsFormulas;
+ CheckBox aBtnInsNotes;
+ CheckBox aBtnInsAttrs;
+ CheckBox aBtnInsObjects;
+
+ FixedLine aFlSep1;
+ FixedLine aFlOptions;
+ CheckBox aBtnSkipEmptyCells;
+ CheckBox aBtnTranspose;
+ CheckBox aBtnLink;
+
+ FixedLine aFlOperation;
+ RadioButton aRbNoOp;
+ RadioButton aRbAdd;
+ RadioButton aRbSub;
+ RadioButton aRbMul;
+ RadioButton aRbDiv;
+
+ FixedLine aFlSep2;
+ FixedLine aFlMove;
+ RadioButton aRbMoveNone;
+ RadioButton aRbMoveDown;
+ RadioButton aRbMoveRight;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ BOOL bOtherDoc;
+ BOOL bFillMode;
+ BOOL bChangeTrack;
+ BOOL bMoveDownDisabled;
+ BOOL bMoveRightDisabled;
+
+ static BOOL bPreviousAllCheck;
+ static USHORT nPreviousChecks;
+ static USHORT nPreviousChecks2;
+ static USHORT nPreviousFormulaChecks;
+ static USHORT nPreviousMoveMode; // enum InsCellCmd
+
+ void DisableChecks( BOOL bInsAllChecked = TRUE );
+ void TestModes();
+
+ // Handler
+ DECL_LINK( InsAllHdl, void* );
+ DECL_LINK( LinkBtnHdl, void* );
+};
+
+
+#endif // SC_INSCODLG_HXX
+
+
diff --git a/sc/source/ui/inc/instbdlg.hrc b/sc/source/ui/inc/instbdlg.hrc
new file mode 100644
index 000000000000..08bff85388dd
--- /dev/null
+++ b/sc/source/ui/inc/instbdlg.hrc
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <sc.hrc> // -> RID_SCDLG_INSERT_TABLE
+
+//#define RID_SCDLG_INSERT_TABLE 300
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_HELP 3
+
+#define FL_POSITION 10
+#define RB_BEFORE 11
+#define RB_BEHIND 12
+
+#define FL_TABLE 20
+#define RB_NEW 21
+#define FT_COUNT 22
+#define NF_COUNT 23
+#define FT_NAME 24
+#define ED_TABNAME 25
+#define RB_FROMFILE 26
+#define LB_TABLES 27
+#define BTN_BROWSE 28
+#define CB_LINK 29
+#define FT_PATH 30
+
+
diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx
new file mode 100644
index 000000000000..660d16b62cca
--- /dev/null
+++ b/sc/source/ui/inc/instbdlg.hxx
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_INSTBDLG_HXX
+#define SC_INSTBDLG_HXX
+
+#include "address.hxx"
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _EDIT_HXX //autogen
+#include <vcl/edit.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+
+#include <sfx2/objsh.hxx>
+#include <vcl/field.hxx>
+#include "expftext.hxx"
+
+#include <layout/layout.hxx>
+#include <layout/layout-pre.hxx>
+
+class ScViewData;
+class ScDocument;
+class ScDocShell;
+
+namespace sfx2 { class DocumentInserter; }
+namespace sfx2 { class FileDialogHelper; }
+
+//------------------------------------------------------------------------
+
+class ScInsertTableDlg : public ModalDialog
+{
+public:
+ ScInsertTableDlg( Window* pParent, ScViewData& rViewData, SCTAB nTabCount, bool bFromFile );
+ ~ScInsertTableDlg();
+
+ virtual short Execute(); // ueberladen, um Dialog-Parent zu setzen
+
+ BOOL GetTablesFromFile() { return aBtnFromFile.IsChecked(); }
+ BOOL GetTablesAsLink() { return aBtnLink.IsChecked(); }
+
+ const String* GetFirstTable( USHORT* pN = NULL );
+ const String* GetNextTable( USHORT* pN = NULL );
+ ScDocShell* GetDocShellTables() { return pDocShTables; }
+ BOOL IsTableBefore() { return aBtnBefore.IsChecked(); }
+ SCTAB GetTableCount() { return nTableCount;}
+
+private:
+ RadioButton aBtnBefore;
+ RadioButton aBtnBehind;
+ FixedLine aFlPos;
+ RadioButton aBtnNew;
+ RadioButton aBtnFromFile;
+ FixedText aFtCount;
+ NumericField aNfCount;
+ FixedText aFtName;
+ Edit aEdName;
+ MultiListBox aLbTables;
+ ScExpandedFixedText aFtPath;
+ PushButton aBtnBrowse;
+ CheckBox aBtnLink;
+ FixedLine aFlTable;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ Timer aBrowseTimer;
+ ScViewData& rViewData;
+ ScDocument& rDoc;
+ ScDocShell* pDocShTables;
+ sfx2::DocumentInserter* pDocInserter;
+ SfxObjectShellRef aDocShTablesRef;
+
+ bool bMustClose;
+ USHORT nSelTabIndex; // fuer GetFirstTable() / GetNextTable()
+ String aStrCurSelTable;
+ SCTAB nTableCount;
+
+#ifdef SC_INSTBDLG_CXX
+ void Init_Impl( bool bFromFile );
+ void SetNewTable_Impl();
+ void SetFromTo_Impl();
+ void FillTables_Impl( ScDocument* pSrcDoc );
+ void DoEnable_Impl();
+
+ DECL_LINK( BrowseHdl_Impl, PushButton* );
+ DECL_LINK( ChoiceHdl_Impl, RadioButton* );
+ DECL_LINK( SelectHdl_Impl, MultiListBox* );
+ DECL_LINK( CountHdl_Impl, NumericField* );
+ DECL_LINK( DoEnterHdl, PushButton* );
+ DECL_LINK( BrowseTimeoutHdl, Timer* );
+ DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
+#endif
+};
+
+#include <layout/layout-post.hxx>
+
+#endif // SC_INSTBDLG_HXX
+
diff --git a/sc/source/ui/inc/invmerge.hxx b/sc/source/ui/inc/invmerge.hxx
new file mode 100644
index 000000000000..49dfbc730fee
--- /dev/null
+++ b/sc/source/ui/inc/invmerge.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_INVMERGE_HXX
+#define SC_INVMERGE_HXX
+
+#include <tools/gen.hxx>
+
+#include <vector>
+
+class Window;
+
+class ScInvertMerger
+{
+private:
+ Window* pWin;
+ ::std::vector< Rectangle >* pRects;
+ Rectangle aTotalRect;
+ Rectangle aLineRect;
+
+ void FlushLine();
+ void FlushTotal();
+
+public:
+ ScInvertMerger( Window* pWindow );
+ ScInvertMerger( ::std::vector< Rectangle >* pRectangles );
+ ~ScInvertMerger();
+
+ void AddRect( const Rectangle& rRect );
+ void Flush();
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/lbseldlg.hxx b/sc/source/ui/inc/lbseldlg.hxx
new file mode 100644
index 000000000000..fa288c609070
--- /dev/null
+++ b/sc/source/ui/inc/lbseldlg.hxx
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_LBSELDLG_HXX
+#define SC_LBSELDLG_HXX
+
+
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+
+
+#include <vcl/dialog.hxx>
+
+//------------------------------------------------------------------------
+
+class ScSelEntryDlg : public ModalDialog
+{
+private:
+ FixedLine aFlLbTitle;
+ ListBox aLb;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ DECL_LINK( DblClkHdl, void * );
+
+public:
+ ScSelEntryDlg( Window* pParent,
+ USHORT nResId,
+ const String& aTitle,
+ const String& aLbTitle,
+ List& aEntryList );
+ ~ScSelEntryDlg();
+
+ String GetSelectEntry() const;
+//UNUSED2008-05 USHORT GetSelectEntryPos() const;
+};
+
+
+#endif // SC_LBSELDLG_HXX
+
+
diff --git a/sc/source/ui/inc/linkarea.hrc b/sc/source/ui/inc/linkarea.hrc
new file mode 100644
index 000000000000..bc906fdb14ad
--- /dev/null
+++ b/sc/source/ui/inc/linkarea.hrc
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <sc.hrc>
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_HELP 3
+#define FL_LOCATION 4
+#define CB_URL 5
+#define BTN_BROWSE 6
+#define FT_HINT 7
+#define FT_RANGES 8
+#define LB_RANGES 9
+#define BTN_RELOAD 10
+#define NF_DELAY 11
+#define FT_SECONDS 12
+
diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx
new file mode 100644
index 000000000000..c90e1ea47e94
--- /dev/null
+++ b/sc/source/ui/inc/linkarea.hxx
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_LINKAREA_HXX
+#define SC_LINKAREA_HXX
+
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <vcl/dialog.hxx>
+
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <svtools/stdctrl.hxx>
+#include <svtools/inettbc.hxx>
+
+//REMOVE #ifndef SO2_DECL_SVEMBEDDEDOBJECT_DEFINED
+//REMOVE #define SO2_DECL_SVEMBEDDEDOBJECT_DEFINED
+//REMOVE SO2_DECL_REF(SvEmbeddedObject)
+//REMOVE #endif
+
+namespace sfx2 { class DocumentInserter; }
+namespace sfx2 { class FileDialogHelper; }
+
+class ScDocShell;
+
+//------------------------------------------------------------------------
+
+class ScLinkedAreaDlg : public ModalDialog
+{
+private:
+ FixedLine aFlLocation;
+ SvtURLBox aCbUrl;
+ PushButton aBtnBrowse;
+ FixedInfo aTxtHint;
+ FixedText aFtRanges;
+ MultiListBox aLbRanges;
+ CheckBox aBtnReload;
+ NumericField aNfDelay;
+ FixedText aFtSeconds;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ ScDocShell* pSourceShell;
+ sfx2::DocumentInserter* pDocInserter;
+
+ SfxObjectShellRef aSourceRef;
+ ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > xSourceObject;
+
+ DECL_LINK( FileHdl, ComboBox* );
+ DECL_LINK( BrowseHdl, PushButton* );
+ DECL_LINK( RangeHdl, MultiListBox* );
+ DECL_LINK( ReloadHdl, CheckBox* );
+ DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* );
+
+ void UpdateSourceRanges();
+ void UpdateEnable();
+ void LoadDocument( const String& rFile, const String& rFilter,
+ const String& rOptions );
+
+public:
+ ScLinkedAreaDlg( Window* pParent );
+ ~ScLinkedAreaDlg();
+
+ void InitFromOldLink( const String& rFile, const String& rFilter,
+ const String& rOptions, const String& rSource,
+ ULONG nRefresh );
+
+ virtual short Execute(); // overwritten to set dialog parent
+
+ String GetURL();
+ String GetFilter(); // may be empty
+ String GetOptions(); // filter options
+ String GetSource(); // separated by ";"
+ ULONG GetRefresh(); // 0 if disabled
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/lnktrans.hxx b/sc/source/ui/inc/lnktrans.hxx
new file mode 100644
index 000000000000..7e37c6cce554
--- /dev/null
+++ b/sc/source/ui/inc/lnktrans.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_LNKTRANS_HXX
+#define SC_LNKTRANS_HXX
+
+#include <svtools/transfer.hxx>
+
+
+class ScLinkTransferObj : public TransferableHelper
+{
+private:
+ String aLinkURL;
+ String aLinkText;
+
+public:
+ ScLinkTransferObj();
+ virtual ~ScLinkTransferObj();
+
+ void SetLinkURL( const String& rURL, const String& rText );
+
+ virtual void AddSupportedFormats();
+ virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual void ObjectReleased();
+ virtual void DragFinished( sal_Int8 nDropAction );
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/makefile.mk b/sc/source/ui/inc/makefile.mk
new file mode 100644
index 000000000000..1b35ca49549d
--- /dev/null
+++ b/sc/source/ui/inc/makefile.mk
@@ -0,0 +1,26 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
diff --git a/sc/source/ui/inc/mediash.hxx b/sc/source/ui/inc/mediash.hxx
new file mode 100644
index 000000000000..e297dc11777a
--- /dev/null
+++ b/sc/source/ui/inc/mediash.hxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef MEDIASH_HXX
+#define MEDIASH_HXX
+
+#include <sfx2/shell.hxx>
+#include "shellids.hxx"
+#include <sfx2/module.hxx>
+#include <svx/svdmark.hxx>
+
+class ScViewData;
+
+#include "drawsh.hxx"
+
+class ScMediaShell: public ScDrawShell
+{
+public:
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_MEDIA_SHELL)
+
+ ScMediaShell(ScViewData* pData);
+ virtual ~ScMediaShell();
+
+ void ExecuteMedia(SfxRequest& rReq);
+ void GetMediaState(SfxItemSet &rSet);
+};
+
+#endif
diff --git a/sc/source/ui/inc/miscdlgs.hrc b/sc/source/ui/inc/miscdlgs.hrc
new file mode 100644
index 000000000000..00b1658849d6
--- /dev/null
+++ b/sc/source/ui/inc/miscdlgs.hrc
@@ -0,0 +1,188 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc" // -> RID_SCDLG_DELCELL
+ // -> RID_SCDLG_INSCELL
+ // -> RID_SCDLG_DELCONT
+ // -> RID_SCDLG_INSCONT
+ // -> RID_SCDLG_MOVETAB
+ // -> RID_SCDLG_STRINPUT
+ // -> RID_SCDLG_MTRINPUT
+ // -> RID_SCDLG_SELENTRY
+ // -> RID_SCDLG_FILLSERIES
+ // -> RID_SCDLG_AUTOFORMAT
+
+// Fuer den DesignEditor:
+/*
+#define RID_SCDLG_DELCELL 1256
+#define RID_SCDLG_INSCELL 1257
+#define RID_SCDLG_DELCONT 1258
+#define RID_SCDLG_INSCONT 1259
+#define RID_SCDLG_MOVETAB 1260
+#define RID_SCDLG_STRINPUT 1261
+#define RID_SCDLG_MTRINPUT 1262
+#define RID_SCDLG_SELENTRY 1263
+#define RID_SCDLG_FILLSERIES 1264
+#define RID_SCDLG_AUTOFORMAT 1255
+*/
+
+// allgemein
+#define BTN_OK 100
+#define BTN_CANCEL 102
+#define BTN_HELP 103
+#define BTN_MORE 104
+#define BTN_ADD 105
+#define BTN_REMOVE 106
+#define FT_LABEL 110
+#define FL_FRAME 112
+#define STR_BTN_CLOSE 200
+
+// Zellen loeschen/einfuegen Dialog
+#define BTN_CELLSUP 10
+#define BTN_CELLSDOWN 11
+#define BTN_CELLSRIGHT 12
+#define BTN_CELLSLEFT 13
+#define BTN_DELROWS 14
+#define BTN_DELCOLS 15
+#define BTN_INSROWS 16
+#define BTN_INSCOLS 17
+
+// Inhalte loeschen/einfuegen Dialog
+#define BTN_DELALL 10
+#define BTN_DELSTRINGS 11
+#define BTN_DELNUMBERS 12
+#define BTN_DELDATETIME 13
+#define BTN_DELFORMULAS 14
+#define BTN_DELATTRS 15
+#define BTN_DELNOTES 16
+#define BTN_DELOBJECTS 17
+#define BTN_INSALL 20
+#define BTN_INSSTRINGS 21
+#define BTN_INSNUMBERS 22
+#define BTN_INSDATETIME 23
+#define BTN_INSFORMULAS 24
+#define BTN_INSATTRS 25
+#define BTN_INSNOTES 26
+#define BTN_OP_NOOP 27
+#define BTN_OP_ADD 28
+#define BTN_OP_SUB 29
+#define BTN_OP_MUL 30
+#define BTN_OP_DIV 31
+#define FL_OPERATION 32
+#define BTN_SKIP_EMPTY 33
+#define BTN_TRANSPOSE 34
+#define BTN_LINK 35
+#define FL_OPTIONS 36
+#define BTN_MV_NONE 37
+#define BTN_MV_DOWN 38
+#define BTN_MV_RIGHT 39
+#define FL_MOVE 40
+#define BTN_INSOBJECTS 41
+#define FL_SEP1 51
+#define FL_SEP2 52
+
+// Tabelle einfuegen/loeschen
+#define FT_DEST 1
+#define LB_DEST 2
+#define FT_INSERT 3
+#define LB_INSERT 4
+#define BTN_COPY 5
+#define STR_NEWDOC 6
+
+// Eingabe eines Strings
+#define ED_INPUT 10
+
+// Eingabe einer Metrik
+#define ED_VALUE 1
+#define BTN_DEFVAL 1
+
+// Auswahl aus einer (String-)ListBox
+#define FL_ENTRYLIST 10
+#define LB_ENTRYLIST 11
+
+// Reihen fuellen
+#define FL_DIRECTION 1
+#define BTN_LEFT 2
+#define BTN_RIGHT 3
+#define BTN_TOP 4
+#define BTN_BOTTOM 5
+#define FL_SEP11 10
+#define FL_TYPE 11
+#define BTN_ARITHMETIC 12
+#define BTN_GEOMETRIC 13
+#define BTN_DATE 14
+#define BTN_AUTOFILL 15
+#define FL_SEP12 20
+#define FL_TIME_UNIT 21
+#define BTN_DAY 22
+#define BTN_DAY_OF_WEEK 23
+#define BTN_MONTH 24
+#define BTN_YEAR 25
+#define FT_INCREMENT 30
+#define ED_INCREMENT 39
+#define FT_END_VALUE 40
+#define ED_END_VALUES 49
+#define STR_VALERR 50
+#define FT_START_VALUE 51
+#define ED_START_VALUES 52
+
+// Autoformat
+#define LB_FORMAT 1
+#define FL_FORMAT 9
+#define WND_PREVIEW 19
+#define BTN_NUMFORMAT 20
+#define BTN_BORDER 21
+#define BTN_FONT 23
+#define BTN_PATTERN 24
+#define BTN_ALIGNMENT 25
+#define BTN_ADJUST 26
+#define BTN_RENAME 27
+#define FL_FORMATTING 29
+#define STR_ADD_TITLE 100
+#define STR_ADD_LABEL 101
+#define STR_DEL_TITLE 102
+#define STR_DEL_MSG 103
+#define STR_RENAME_TITLE 104
+ // Autoformat-Preview:
+#define STR_JAN 121
+#define STR_FEB 122
+#define STR_MAR 123
+#define STR_NORTH 124
+#define STR_MID 125
+#define STR_SOUTH 126
+#define STR_SUM 127
+
+// Gruppierung setzen/aufheben:
+#define BTN_GROUP_COLS 1
+#define BTN_GROUP_ROWS 3
+#define STR_GROUP 1
+#define STR_UNGROUP 2
+
+// Tab Bg Color
+#define TAB_BG_COLOR_CT_BORDER 1
+#define TAB_BG_COLOR_SET_BGDCOLOR 2
+
diff --git a/sc/source/ui/inc/msgpool.hxx b/sc/source/ui/inc/msgpool.hxx
new file mode 100644
index 000000000000..7bc33b3af96b
--- /dev/null
+++ b/sc/source/ui/inc/msgpool.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_MSGPOOL_HXX
+#define SC_MSGPOOL_HXX
+
+#include "scitems.hxx"
+#include <svl/srchitem.hxx>
+
+
+#include <svl/itempool.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
+
+//#include <dbitems.hxx>
+#include "uiitems.hxx"
+
+
+//------------------------------------------------------------------------
+
+class ScDocumentPool;
+
+//------------------------------------------------------------------------
+
+class ScMessagePool: public SfxItemPool
+{
+ SfxStringItem aGlobalStringItem;
+ SvxSearchItem aGlobalSearchItem;
+ ScSortItem aGlobalSortItem;
+ ScQueryItem aGlobalQueryItem;
+ ScSubTotalItem aGlobalSubTotalItem;
+ ScConsolidateItem aGlobalConsolidateItem;
+ ScPivotItem aGlobalPivotItem;
+ ScSolveItem aGlobalSolveItem;
+ ScUserListItem aGlobalUserListItem;
+
+ SfxBoolItem aPrintWarnItem;
+
+ SfxPoolItem** ppPoolDefaults;
+ ScDocumentPool* pDocPool;
+
+public:
+ ScMessagePool();
+protected:
+ virtual ~ScMessagePool();
+public:
+
+ virtual SfxMapUnit GetMetric( USHORT nWhich ) const;
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx
new file mode 100644
index 000000000000..f88f57a74e58
--- /dev/null
+++ b/sc/source/ui/inc/mtrindlg.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_MTRINDLG_HXX
+#define SC_MTRINDLG_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/field.hxx>
+#include <vcl/imagebtn.hxx>
+#include <vcl/fixed.hxx>
+
+
+//------------------------------------------------------------------------
+
+class ScMetricInputDlg : public ModalDialog
+{
+public:
+ ScMetricInputDlg( Window* pParent,
+ USHORT nResId, // Ableitung fuer jeden Dialog!
+ long nCurrent,
+ long nDefault,
+ FieldUnit eFUnit = FUNIT_MM,
+ USHORT nDecimals = 2,
+ long nMaximum = 1000,
+ long nMinimum = 0,
+ long nFirst = 1,
+ long nLast = 100 );
+ ~ScMetricInputDlg();
+
+ long GetInputValue( FieldUnit eUnit = FUNIT_TWIP ) const;
+
+private:
+ FixedText aFtEditTitle;
+ MetricField aEdValue;
+ CheckBox aBtnDefVal;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ long nDefaultValue;
+ long nCurrentValue;
+
+ void CalcPositions();
+ DECL_LINK( SetDefValHdl, CheckBox * );
+ DECL_LINK( ModifyHdl, MetricField * );
+};
+
+#endif // SC_MTRINDLG_HXX
+
+
+
+
+
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
new file mode 100644
index 000000000000..d5ce7726243f
--- /dev/null
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_MVTABDLG_HXX
+#define SC_MVTABDLG_HXX
+
+
+#include "address.hxx"
+#include <vcl/dialog.hxx>
+#include <vcl/imagebtn.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/fixed.hxx>
+
+#include <layout/layout.hxx>
+#include <layout/layout-pre.hxx>
+
+//------------------------------------------------------------------------
+
+class ScMoveTableDlg : public ModalDialog
+{
+public:
+ ScMoveTableDlg( Window* pParent );
+ ~ScMoveTableDlg();
+
+ USHORT GetSelectedDocument () const;
+ SCTAB GetSelectedTable () const;
+ BOOL GetCopyTable () const;
+ void SetCopyTable (BOOL bFlag=TRUE);
+ void EnableCopyTable (BOOL bFlag=TRUE);
+
+private:
+ FixedText aFtDoc;
+ ListBox aLbDoc;
+ FixedText aFtTable;
+ ListBox aLbTable;
+ CheckBox aBtnCopy;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ USHORT nDocument;
+ SCTAB nTable;
+ BOOL bCopyTable;
+ //--------------------------------------
+ void Init ();
+ void InitDocListBox ();
+ DECL_LINK( OkHdl, void * );
+ DECL_LINK( SelHdl, ListBox * );
+};
+
+#include <layout/layout-post.hxx>
+
+#endif // SC_MVTABDLG_HXX
+
+
diff --git a/sc/source/ui/inc/namecrea.hxx b/sc/source/ui/inc/namecrea.hxx
new file mode 100644
index 000000000000..e4e053fe0bcf
--- /dev/null
+++ b/sc/source/ui/inc/namecrea.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_NAMECREA_HXX
+#define SC_NAMECREA_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/imagebtn.hxx>
+#include <vcl/fixed.hxx>
+#include "scui_def.hxx" //CHINA001
+
+//CHINA001 #define NAME_TOP 1
+//CHINA001 #define NAME_LEFT 2
+//CHINA001 #define NAME_BOTTOM 4
+//CHINA001 #define NAME_RIGHT 8
+
+class ScNameCreateDlg : public ModalDialog
+{
+protected:
+ FixedLine aFixedLine;
+ CheckBox aTopBox;
+ CheckBox aLeftBox;
+ CheckBox aBottomBox;
+ CheckBox aRightBox;
+ OKButton aOKButton;
+ CancelButton aCancelButton;
+ HelpButton aHelpButton;
+public:
+ ScNameCreateDlg( Window * pParent, USHORT nFlags );
+
+ USHORT GetFlags() const;
+};
+
+
+#endif //SC_NAMECREA_HXX
diff --git a/sc/source/ui/inc/namedlg.hrc b/sc/source/ui/inc/namedlg.hrc
new file mode 100644
index 000000000000..b2eec6879ec3
--- /dev/null
+++ b/sc/source/ui/inc/namedlg.hrc
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc" // -> RID_SCDLG_NAMES
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_ADD 3
+#define BTN_REMOVE 4
+#define BTN_HELP 5
+#define BTN_MORE 6
+//
+#define FL_NAME 11
+#define ED_NAME 12
+#define FL_ASSIGN 13
+#define ED_ASSIGN 15
+#define RB_ASSIGN 16
+//
+#define STR_ADD 21
+#define STR_MODIFY 22
+#define STR_INVALIDSYMBOL 23
+//
+#define BTN_CRITERIA 31
+#define BTN_PRINTAREA 32
+#define BTN_COLHEADER 33
+#define BTN_ROWHEADER 34
+#define FL_TYPE 35
+
diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx
new file mode 100644
index 000000000000..b122c57a19fd
--- /dev/null
+++ b/sc/source/ui/inc/namedlg.hxx
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_NAMEDLG_HXX
+#define SC_NAMEDLG_HXX
+
+#ifndef _MOREBTN_HXX //autogen
+#include <vcl/morebtn.hxx>
+#endif
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#include <vcl/fixed.hxx>
+#include "rangenam.hxx"
+#include "anyrefdg.hxx"
+
+class ScViewData;
+class ScDocument;
+
+
+//==================================================================
+
+class ScNameDlg : public ScAnyRefDlg
+{
+private:
+ FixedLine aFlName;
+ ComboBox aEdName;
+
+ FixedLine aFlAssign;
+ formula::RefEdit aEdAssign;
+ formula::RefButton aRbAssign;
+
+ FixedLine aFlType;
+ CheckBox aBtnPrintArea;
+ CheckBox aBtnColHeader;
+ CheckBox aBtnCriteria;
+ CheckBox aBtnRowHeader;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ PushButton aBtnAdd;
+ PushButton aBtnRemove;
+ MoreButton aBtnMore;
+ BOOL bSaved;
+
+ const String aStrAdd; // "Hinzufuegen"
+ const String aStrModify; // "Aendern"
+ const String errMsgInvalidSym;
+
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ ScRangeName aLocalRangeName;
+ const ScAddress theCursorPos;
+ Selection theCurSel;
+
+#ifdef _NAMEDLG_CXX
+private:
+ void Init();
+ void UpdateChecks();
+ void UpdateNames();
+ void CalcCurTableAssign( String& aAssign, USHORT nPos );
+
+ // Handler:
+ DECL_LINK( OkBtnHdl, void * );
+ DECL_LINK( CancelBtnHdl, void * );
+ DECL_LINK( AddBtnHdl, void * );
+ DECL_LINK( RemoveBtnHdl, void * );
+ DECL_LINK( EdModifyHdl, Edit * );
+ DECL_LINK( NameSelectHdl, void * );
+ DECL_LINK( AssignGetFocusHdl, void * );
+#endif
+
+protected:
+
+ virtual void RefInputDone( BOOL bForced = FALSE );
+
+
+public:
+ ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScViewData* ptrViewData,
+ const ScAddress& aCursorPos );
+ ~ScNameDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+ virtual BOOL IsRefInputMode() const;
+
+ virtual void SetActive();
+ virtual BOOL Close();
+
+};
+
+
+
+#endif // SC_NAMEDLG_HXX
+
diff --git a/sc/source/ui/inc/namepast.hxx b/sc/source/ui/inc/namepast.hxx
new file mode 100644
index 000000000000..3286af7b81bc
--- /dev/null
+++ b/sc/source/ui/inc/namepast.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_NAMEPAST_HXX
+#define SC_NAMEPAST_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/imagebtn.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+
+#include "scui_def.hxx" //CHINA001
+//CHINA001 #define BTN_PASTE_NAME 100
+//CHINA001 #define BTN_PASTE_LIST 101
+//CHINA001
+class ScRangeName;
+
+class ScNamePasteDlg : public ModalDialog
+{
+ DECL_LINK( ButtonHdl, Button * );
+ DECL_LINK( ListSelHdl, ListBox * );
+ DECL_LINK( ListDblClickHdl, ListBox * );
+
+protected:
+ FixedText aLabelText;
+ ListBox aNameList;
+ OKButton aOKButton;
+ CancelButton aCancelButton;
+ HelpButton aHelpButton;
+ PushButton aInsListButton;
+public:
+ ScNamePasteDlg( Window * pParent, const ScRangeName* pList, BOOL bInsList=TRUE );
+
+ String GetSelectedName() const;
+};
+
+
+#endif //SC_NAMEPAST_HXX
diff --git a/sc/source/ui/inc/navcitem.hxx b/sc/source/ui/inc/navcitem.hxx
new file mode 100644
index 000000000000..b464bd6cc9ad
--- /dev/null
+++ b/sc/source/ui/inc/navcitem.hxx
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_NAVCITEM_HXX
+#define SC_NAVCITEM_HXX
+
+
+#include <sfx2/ctrlitem.hxx>
+
+
+//==================================================================
+
+class ScNavigatorDlg;
+
+class ScNavigatorControllerItem : public SfxControllerItem
+{
+public:
+ ScNavigatorControllerItem( USHORT nId,
+ ScNavigatorDlg& rDlg,
+ SfxBindings& rBindings );
+protected:
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pItem );
+
+private:
+ ScNavigatorDlg& rNavigatorDlg;
+};
+
+
+#endif // SC_NAVCITEM_HXX
+
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
new file mode 100644
index 000000000000..8d53742b6f1e
--- /dev/null
+++ b/sc/source/ui/inc/navipi.hxx
@@ -0,0 +1,366 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_NAVIPI_HXX
+#define SC_NAVIPI_HXX
+
+#include <vector>
+#include <vcl/toolbox.hxx>
+#include <vcl/field.hxx>
+#include <vcl/lstbox.hxx>
+#include <svtools/stdctrl.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/lstner.hxx>
+#include <sfx2/childwin.hxx>
+#include "content.hxx"
+#include <svtools/svmedit.hxx>
+
+
+class ScTabViewShell;
+class ScViewData;
+class ScArea;
+class ScScenarioWindow;
+class ScNavigatorControllerItem;
+class ScNavigatorDialogWrapper;
+class ScNavigatorDlg;
+class ScNavigatorSettings;
+class ScRange;
+
+//========================================================================
+
+#define SC_DROPMODE_URL 0
+#define SC_DROPMODE_LINK 1
+#define SC_DROPMODE_COPY 2
+
+enum NavListMode { NAV_LMODE_NONE = 0x4000,
+ NAV_LMODE_AREAS = 0x2000,
+ NAV_LMODE_DBAREAS = 0x1000,
+ NAV_LMODE_DOCS = 0x800,
+ NAV_LMODE_SCENARIOS = 0x400 };
+
+//========================================================================
+// class ScScenarioListBox -----------------------------------------------
+//========================================================================
+
+class ScScenarioListBox : public ListBox
+{
+public:
+ explicit ScScenarioListBox( ScScenarioWindow& rParent );
+ virtual ~ScScenarioListBox();
+
+ void UpdateEntries( List* pNewEntryList );
+
+protected:
+ virtual void Select();
+ virtual void DoubleClick();
+ virtual long Notify( NotifyEvent& rNEvt );
+
+private:
+ struct ScenarioEntry
+ {
+ String maName;
+ String maComment;
+ bool mbProtected;
+
+ inline explicit ScenarioEntry() : mbProtected( false ) {}
+ };
+ typedef ::std::vector< ScenarioEntry > ScenarioList;
+
+private:
+ const ScenarioEntry* GetSelectedEntry() const;
+
+ void ExecuteScenarioSlot( USHORT nSlotId );
+ void SelectScenario();
+ void EditScenario();
+ void DeleteScenario( bool bQueryBox );
+
+private:
+ ScScenarioWindow& mrParent;
+ ScenarioList maEntries;
+};
+
+//========================================================================
+// class ScScenarioWindow ------------------------------------------------
+//========================================================================
+class ScScenarioWindow : public Window
+{
+public:
+ ScScenarioWindow( Window* pParent,const String& aQH_List,const String& aQH_Comment);
+ ~ScScenarioWindow();
+
+ void NotifyState( const SfxPoolItem* pState );
+ void SetComment( const String& rComment )
+ { aEdComment.SetText( rComment ); }
+
+ void SetSizePixel( const Size& rNewSize );
+
+protected:
+
+ virtual void Paint( const Rectangle& rRec );
+
+private:
+ ScScenarioListBox aLbScenario;
+ MultiLineEdit aEdComment;
+};
+
+//==================================================================
+// class ColumnEdit
+//==================================================================
+class ColumnEdit : public SpinField
+{
+public:
+ ColumnEdit( ScNavigatorDlg* pParent, const ResId& rResId );
+ ~ColumnEdit();
+
+ SCCOL GetCol() { return nCol; }
+ void SetCol( SCCOL nColNo );
+
+protected:
+ virtual long Notify( NotifyEvent& rNEvt );
+ virtual void LoseFocus();
+ virtual void Up();
+ virtual void Down();
+ virtual void First();
+ virtual void Last();
+
+private:
+ ScNavigatorDlg& rDlg;
+ SCCOL nCol;
+ USHORT nKeyGroup;
+
+ void EvalText ();
+ void ExecuteCol ();
+ SCCOL AlphaToNum ( String& rStr );
+ SCCOL NumStrToAlpha ( String& rStr );
+ SCCOL NumToAlpha ( SCCOL nColNo, String& rStr );
+};
+
+
+//==================================================================
+// class RowEdit
+//==================================================================
+class RowEdit : public NumericField
+{
+public:
+ RowEdit( ScNavigatorDlg* pParent, const ResId& rResId );
+ ~RowEdit();
+
+ SCROW GetRow() { return (SCROW)GetValue(); }
+ void SetRow( SCROW nRow ){ SetValue( nRow ); }
+
+protected:
+ virtual long Notify( NotifyEvent& rNEvt );
+ virtual void LoseFocus();
+
+private:
+ ScNavigatorDlg& rDlg;
+
+ void ExecuteRow();
+};
+
+
+//==================================================================
+// class ScDocListBox
+//==================================================================
+class ScDocListBox : public ListBox
+{
+public:
+ ScDocListBox( ScNavigatorDlg* pParent, const ResId& rResId );
+ ~ScDocListBox();
+
+protected:
+ virtual void Select();
+
+private:
+ ScNavigatorDlg& rDlg;
+};
+
+
+//==================================================================
+// class CommandToolBox
+//==================================================================
+class CommandToolBox : public ToolBox
+{
+public:
+ CommandToolBox( ScNavigatorDlg* pParent, const ResId& rResId );
+ ~CommandToolBox();
+
+ void Select( USHORT nId );
+ void UpdateButtons();
+ void InitImageList();
+
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ DECL_LINK( ToolBoxDropdownClickHdl, ToolBox* );
+
+protected:
+ virtual void Select();
+ virtual void Click();
+
+private:
+ ScNavigatorDlg& rDlg;
+};
+
+//==================================================================
+// class ScNavigatorDlg
+//==================================================================
+
+class ScNavigatorDlg : public Window, public SfxListener
+{
+friend class ScNavigatorControllerItem;
+friend class ScNavigatorDialogWrapper;
+friend class ColumnEdit;
+friend class RowEdit;
+friend class ScDocListBox;
+friend class CommandToolBox;
+friend class ScContentTree;
+
+private:
+ SfxBindings& rBindings; // must be first member
+
+ ImageList aCmdImageList; // must be before aTbxCmd
+ ImageList aCmdImageListH;
+ FixedInfo aFtCol;
+ ColumnEdit aEdCol;
+ FixedInfo aFtRow;
+ RowEdit aEdRow;
+ CommandToolBox aTbxCmd;
+ ScContentTree aLbEntries;
+ ScScenarioWindow aWndScenarios;
+ ScDocListBox aLbDocuments;
+
+ Timer aContentTimer;
+
+ String aTitleBase;
+ String aStrDragMode;
+ String aStrDisplay;
+ String aStrActive;
+ String aStrNotActive;
+ String aStrHidden;
+ String aStrActiveWin;
+
+ SfxChildWindowContext* pContextWin;
+ Size aInitSize;
+ ScArea* pMarkArea;
+ ScViewData* pViewData;
+
+ long nBorderOffset;
+ long nListModeHeight;
+ long nInitListHeight;
+ NavListMode eListMode;
+ USHORT nDropMode;
+ SCCOL nCurCol;
+ SCROW nCurRow;
+ SCTAB nCurTab;
+ BOOL bFirstBig;
+
+ ScNavigatorControllerItem** ppBoundItems;
+
+ DECL_LINK( TimeHdl, Timer* );
+
+ void DoResize();
+
+ SfxBindings& GetBindings()
+ { return rBindings; }
+
+ void SetCurrentCell( SCCOL nCol, SCROW Row );
+ void SetCurrentCellStr( const String rName );
+ void SetCurrentTable( SCTAB nTab );
+ void SetCurrentTableStr( const String rName );
+ void SetCurrentObject( const String rName );
+ void SetCurrentDoc( const String& rDocName );
+
+ ScTabViewShell* GetTabViewShell() const;
+ ScNavigatorSettings* GetNavigatorSettings();
+ BOOL GetViewData();
+
+ void UpdateColumn ( const SCCOL* pCol = NULL );
+ void UpdateRow ( const SCROW* pRow = NULL );
+ void UpdateTable ( const SCTAB* pTab = NULL );
+ void UpdateAll ();
+
+ void GetDocNames(const String* pSelEntry = NULL);
+
+ void SetListMode ( NavListMode eMode, BOOL bSetSize = TRUE );
+ void ShowList ( BOOL bShow, BOOL bSetSize );
+ void ShowScenarios ( BOOL bShow, BOOL bSetSize );
+
+ void SetDropMode(USHORT nNew);
+ USHORT GetDropMode() const { return nDropMode; }
+
+ const String& GetStrDragMode() const { return aStrDragMode; }
+ const String& GetStrDisplay() const { return aStrDisplay; }
+
+ void CheckDataArea ();
+ void MarkDataArea ();
+ void UnmarkDataArea ();
+ void StartOfDataArea ();
+ void EndOfDataArea ();
+
+ static void ReleaseFocus();
+
+protected:
+ virtual void Resize();
+ virtual void Paint( const Rectangle& rRec );
+ virtual void Resizing( Size& rSize );
+
+public:
+ ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Window* pParent );
+ ~ScNavigatorDlg();
+
+ using Window::Notify;
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ void CursorPosChanged();
+
+ virtual SfxChildAlignment
+ CheckAlignment(SfxChildAlignment,SfxChildAlignment);
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+};
+
+//==================================================================
+
+class ScNavigatorDialogWrapper: public SfxChildWindowContext
+{
+public:
+ ScNavigatorDialogWrapper( Window* pParent,
+ USHORT nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOWCONTEXT(ScNavigatorDialogWrapper)
+
+ virtual void Resizing( Size& rSize );
+
+private:
+ ScNavigatorDlg* pNavigator;
+};
+
+
+
+#endif // SC_NAVIPI_HXX
+
diff --git a/sc/source/ui/inc/navsett.hxx b/sc/source/ui/inc/navsett.hxx
new file mode 100644
index 000000000000..896c64606646
--- /dev/null
+++ b/sc/source/ui/inc/navsett.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_NAVSETT_HXX
+#define SC_NAVSETT_HXX
+
+#include <tools/solar.h>
+
+#include <vector>
+
+/** Contains settings of the navigator listbox. This includes the expand state
+ of each listbox entry and the index of the selected entry and sub entry. */
+class ScNavigatorSettings
+{
+private:
+ ::std::vector< BOOL > maExpandedVec; /// Array of Booleans for expand state.
+ USHORT mnRootSelected; /// Index of selected root entry.
+ ULONG mnChildSelected; /// Index of selected child entry.
+
+public:
+ ScNavigatorSettings();
+
+ inline void SetExpanded( USHORT nIndex, BOOL bExpand ) { maExpandedVec[ nIndex ] = bExpand; }
+ inline BOOL IsExpanded( USHORT nIndex ) const { return maExpandedVec[ nIndex ]; }
+
+ inline void SetRootSelected( USHORT nIndex ) { mnRootSelected = nIndex; }
+ inline USHORT GetRootSelected() const { return mnRootSelected; }
+
+ inline void SetChildSelected( ULONG nIndex ) { mnChildSelected = nIndex; }
+ inline ULONG GetChildSelected() const { return mnChildSelected; }
+};
+
+
+#endif // SC_NAVSETT_HXX
+
diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx
new file mode 100644
index 000000000000..65e36565ceb8
--- /dev/null
+++ b/sc/source/ui/inc/notemark.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_NOTEMARK_HXX
+#define SC_NOTEMARK_HXX
+
+#ifndef _MAPMOD_HXX //autogen
+#include <vcl/mapmod.hxx>
+#endif
+#include <vcl/timer.hxx>
+#include "global.hxx"
+#include "address.hxx"
+
+class SdrModel;
+class SdrObject;
+
+class ScNoteMarker
+{
+private:
+ Window* pWindow;
+ Window* pRightWin;
+ Window* pBottomWin;
+ Window* pDiagWin;
+ ScDocument* pDoc;
+ ScAddress aDocPos;
+ String aUserText;
+ Rectangle aVisRect;
+ Timer aTimer;
+ MapMode aMapMode;
+ BOOL bLeft;
+ BOOL bByKeyboard;
+
+ Rectangle aRect;
+ SdrModel* pModel;
+ SdrObject* pObject;
+ BOOL bVisible;
+
+ DECL_LINK( TimeHdl, Timer* );
+
+public:
+ ScNoteMarker( Window* pWin, Window* pRight, Window* pBottom, Window* pDiagonal,
+ ScDocument* pD, ScAddress aPos, const String& rUser,
+ const MapMode& rMap, BOOL bLeftEdge, BOOL bForce, BOOL bKeyboard );
+ ~ScNoteMarker();
+
+ void Draw();
+ void InvalidateWin();
+
+ ScAddress GetDocPos() const { return aDocPos; }
+ BOOL IsByKeyboard() const { return bByKeyboard; }
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/oleobjsh.hxx b/sc/source/ui/inc/oleobjsh.hxx
new file mode 100644
index 000000000000..fa4f71729c97
--- /dev/null
+++ b/sc/source/ui/inc/oleobjsh.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OLEOBJSH_HXX
+#define OLEOBJSH_HXX
+
+#include <sfx2/shell.hxx>
+#include "shellids.hxx"
+#include <sfx2/module.hxx>
+#include <svx/svdmark.hxx>
+
+class ScViewData;
+
+#include "drawsh.hxx"
+
+class ScOleObjectShell: public ScDrawShell
+{
+public:
+
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_OLEOBJECT_SHELL)
+
+ ScOleObjectShell(ScViewData* pData);
+ virtual ~ScOleObjectShell();
+
+};
+
+#endif
diff --git a/sc/source/ui/inc/olinefun.hxx b/sc/source/ui/inc/olinefun.hxx
new file mode 100644
index 000000000000..444774ed2068
--- /dev/null
+++ b/sc/source/ui/inc/olinefun.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_OLINEFUN_HXX
+#define SC_OLINEFUN_HXX
+
+#include "global.hxx"
+
+class ScDocShell;
+class ScRange;
+
+
+// ---------------------------------------------------------------------------
+
+class ScOutlineDocFunc
+{
+private:
+ ScDocShell& rDocShell;
+
+public:
+ ScOutlineDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {}
+ ~ScOutlineDocFunc() {}
+
+ BOOL MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi );
+ BOOL RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL bRecord, BOOL bApi );
+ BOOL RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi );
+ BOOL AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bApi );
+
+ BOOL SelectLevel( SCTAB nTab, BOOL bColumns, USHORT nLevel,
+ BOOL bRecord, BOOL bPaint, BOOL bApi );
+
+ BOOL ShowMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi );
+ BOOL HideMarkedOutlines( const ScRange& rRange, BOOL bRecord, BOOL bApi );
+
+ BOOL ShowOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry,
+ BOOL bRecord, BOOL bPaint, BOOL bApi );
+ BOOL HideOutline( SCTAB nTab, BOOL bColumns, USHORT nLevel, USHORT nEntry,
+ BOOL bRecord, BOOL bPaint, BOOL bApi );
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/olinewin.hxx b/sc/source/ui/inc/olinewin.hxx
new file mode 100644
index 000000000000..104f9e8f11da
--- /dev/null
+++ b/sc/source/ui/inc/olinewin.hxx
@@ -0,0 +1,244 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_OLINEWIN_HXX
+#define SC_OLINEWIN_HXX
+
+#include "viewdata.hxx"
+
+class ScOutlineEntry;
+class ScOutlineArray;
+class ScOutlineTable;
+
+
+// ============================================================================
+
+enum ScOutlineMode { SC_OUTLINE_HOR, SC_OUTLINE_VER };
+
+
+// ----------------------------------------------------------------------------
+
+/** The window left of or above the spreadsheet containing the outline groups
+ and controls to expand/collapse them. */
+class ScOutlineWindow : public Window
+{
+private:
+ ScViewData& mrViewData; /// View data containing the document.
+ ScSplitPos meWhich; /// Which area in split window.
+ bool mbHoriz; /// true = Horizontal orientation.
+ bool mbMirrorEntries; /// true = mirror the order of entries (including header)
+ bool mbMirrorLevels; /// true = mirror the order of levels, including the border
+
+ ImageList* mpSymbols; /// Symbols for buttons.
+ Color maLineColor; /// Line color for expanded groups.
+ long mnHeaderSize; /// Size of the header area in entry direction.
+ long mnHeaderPos; /// Position of the header area in entry direction.
+ long mnMainFirstPos; /// First position of main area in entry direction.
+ long mnMainLastPos; /// Last position of main area in entry direction.
+
+ size_t mnMTLevel; /// Mouse tracking: Level of active button.
+ size_t mnMTEntry; /// Mouse tracking: Entry index of active button.
+ bool mbMTActive; /// Mouse tracking active?
+ bool mbMTPressed; /// Mouse tracking: Button currently drawed pressed?
+
+ Rectangle maFocusRect; /// Focus rectangle on screen.
+ size_t mnFocusLevel; /// Level of focused button.
+ size_t mnFocusEntry; /// Entry index of focused button.
+ bool mbDontDrawFocus; /// Do not redraw focus in next Paint().
+
+public:
+ ScOutlineWindow(
+ Window* pParent,
+ ScOutlineMode eMode,
+ ScViewData* pViewData,
+ ScSplitPos eWhich );
+ virtual ~ScOutlineWindow();
+
+ /** Sets the size of the header area (width/height dep. on window type). */
+ void SetHeaderSize( long nNewSize );
+ /** Returns the width/height the window needs to show all levels. */
+ long GetDepthSize() const;
+
+ /** Scrolls the window content by the specified amount of pixels. */
+ void ScrollPixel( long nDiff );
+
+ using Window::ShowFocus;
+
+private:
+ /** Initializes color and image settings. */
+ void InitSettings();
+
+ /** Returns the calc document. */
+ inline ScDocument& GetDoc() const { return *mrViewData.GetDocument(); }
+ /** Returns the current sheet index. */
+ inline SCTAB GetTab() const { return mrViewData.GetTabNo(); }
+ /** Returns the outline array of the corresponding document. */
+ const ScOutlineArray* GetOutlineArray() const;
+ /** Returns the specified outline entry. */
+ const ScOutlineEntry* GetOutlineEntry( size_t nLevel, size_t nEntry ) const;
+
+ /** Returns true, if the column/row is hidden. */
+ bool IsHidden( SCCOLROW nColRowIndex ) const;
+ /** Returns true, if the column/row is filtered. */
+ bool IsFiltered( SCCOLROW nColRowIndex ) const;
+ /** Returns true, if all columns/rows before nColRowIndex are hidden. */
+ bool IsFirstVisible( SCCOLROW nColRowIndex ) const;
+ /** Returns the currently visible column/row range. */
+ void GetVisibleRange( SCCOLROW& rnColRowStart, SCCOLROW& rnColRowEnd ) const;
+
+ /** Returns the point in the window of the specified position. */
+ Point GetPoint( long nLevelPos, long nEntryPos ) const;
+ /** Returns the rectangle in the window of the specified position. */
+ Rectangle GetRectangle(
+ long nLevelStart, long nEntryStart,
+ long nLevelEnd, long nEntryEnd ) const;
+
+ /** Returns the window size for the level coordinate. */
+ long GetOutputSizeLevel() const;
+ /** Returns the window size for the entry coordinate. */
+ long GetOutputSizeEntry() const;
+
+ /** Returns the count of levels of the outline array. 0 means no outlines. */
+ size_t GetLevelCount() const;
+ /** Returns the pixel position of the specified level. */
+ long GetLevelPos( size_t nLevel ) const;
+ /** Returns the level of the passed pixel position. */
+ size_t GetLevelFromPos( long nLevelPos ) const;
+
+ /** Returns the start coordinate of the specified column/row in the window. */
+ long GetColRowPos( SCCOLROW nColRowIndex ) const;
+ /** Returns the entry position of header images. */
+ long GetHeaderEntryPos() const;
+ /** Calculates the coordinates the outline entry takes in the window.
+ @return false = no part of the group is visible (outside window or collapsed by parent group). */
+ bool GetEntryPos(
+ size_t nLevel, size_t nEntry,
+ long& rnStartPos, long& rnEndPos, long& rnImagePos ) const;
+ /** Calculates the absolute position of the image of the specified outline entry.
+ @param nLevel The level of the entry.
+ @param nEntry The entry index or SC_OL_HEADERENTRY for the header image.
+ @return false = image is not visible. */
+ bool GetImagePos( size_t nLevel, size_t nEntry, Point& rPos ) const;
+ /** Returns true, if the button of the specified entry is visible in the window. */
+ bool IsButtonVisible( size_t nLevel, size_t nEntry ) const;
+
+ /** Returns true, if rPos is inside of a button or over the line of an expanded
+ group. The outline entry data is stored in the passed variables. */
+ bool ItemHit( const Point& rPos, size_t& rnLevel, size_t& rnEntry, bool& rbButton ) const;
+ /** Returns true, if rPos is inside of a button.
+ The button data is stored in the passed variables. */
+ bool ButtonHit( const Point& rPos, size_t& rnLevel, size_t& rnEntry ) const;
+ /** Returns true, if rPos is over the line of an expanded group.
+ The outline entry data is stored in the passed variables. */
+ bool LineHit( const Point& rPos, size_t& rnLevel, size_t& rnEntry ) const;
+
+ /** Performs an action with the specified item.
+ @param nLevel The level of the entry.
+ @param nEntry The entry index or SC_OL_HEADERENTRY for the header entry. */
+ void DoFunction( size_t nLevel, size_t nEntry ) const;
+ /** Expands the specified entry (does nothing with header entries). */
+ void DoExpand( size_t nLevel, size_t nEntry ) const;
+ /** Collapses the specified entry (does nothing with header entries). */
+ void DoCollapse( size_t nLevel, size_t nEntry ) const;
+
+ /** Returns true, if the focused button is visible in the window. */
+ bool IsFocusButtonVisible() const;
+
+ /** Calculates index of next/previous focus button in the current level (no paint).
+ @param bFindVisible true = repeats until a visible button has been found.
+ @return true = focus wrapped from end to start or vice versa. */
+ bool ImplMoveFocusByEntry( bool bForward, bool bFindVisible );
+ /** Calculates position of focus button in next/previous level (no paint).
+ @return true = focus wrapped from end to start or vice versa. */
+ bool ImplMoveFocusByLevel( bool bForward );
+ /** Calculates position of focus button in tab order.
+ @param bFindVisible true = repeats until a visible button has been found.
+ @return true = focus wrapped from end to start or vice versa. */
+ bool ImplMoveFocusByTabOrder( bool bForward, bool bFindVisible );
+
+ /** If the focused entry is invisible, tries to move to visible position. */
+ void ImplMoveFocusToVisible( bool bForward );
+
+ /** Focuses next/previous button in the current level. */
+ void MoveFocusByEntry( bool bForward );
+ /** Focuses button in next/previous level. */
+ void MoveFocusByLevel( bool bForward );
+ /** Focuses next/previous button in tab order. */
+ void MoveFocusByTabOrder( bool bForward );
+
+ /** Starts mouse tracking after click on a button. */
+ void StartMouseTracking( size_t nLevel, size_t nEntry );
+ /** Returns whether mouse tracking mode is active. */
+ inline bool IsMouseTracking() const { return mbMTActive; }
+ /** Ends mouse tracking. */
+ void EndMouseTracking();
+
+ /** Sets a clip region for the window area without header. */
+ void SetEntryAreaClipRegion();
+ /** Converts coordinates to real window points and draws the line. */
+ void DrawLineRel(
+ long nLevelStart, long nEntryStart,
+ long nLevelEnd, long nEntryEnd );
+ /** Converts coordinates to real window points and draws the rectangle. */
+ void DrawRectRel(
+ long nLevelStart, long nEntryStart,
+ long nLevelEnd, long nEntryEnd );
+ /** Draws the specified image unpressed. */
+ void DrawImageRel( long nLevelPos, long nEntryPos, USHORT nId );
+ /** Draws a pressed or unpressed border. */
+ void DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed );
+
+ /** Draws the focus rectangle into the focused button. */
+ void ShowFocus();
+ /** Erases the focus rectangle from the focused button. */
+ void HideFocus();
+
+ /** Scrolls the specified range of the window in entry-relative direction. */
+ void ScrollRel( long nEntryDiff, long nEntryStart, long nEntryEnd );
+
+protected:
+ virtual void Paint( const Rectangle& rRect );
+
+ virtual void Resize();
+ virtual void GetFocus();
+ virtual void LoseFocus();
+
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+
+ virtual void KeyInput( const KeyEvent& rKEvt );
+
+public:
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+};
+
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/opredlin.hrc b/sc/source/ui/inc/opredlin.hrc
new file mode 100644
index 000000000000..2b52d8b46118
--- /dev/null
+++ b/sc/source/ui/inc/opredlin.hrc
@@ -0,0 +1,38 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "sc.hrc" // -> RID_SCPAGE_OPREDLINE
+
+#define FT_CONTENT 1
+#define FT_REMOVE 2
+#define FT_INSERT 3
+#define FT_MOVE 4
+#define GB_COLORCHGS 1
+#define CLB_CONTENT 1
+#define CLB_REMOVE 2
+#define CLB_INSERT 3
+#define CLB_MOVE 4
+#define STR_AUTHOR 1
diff --git a/sc/source/ui/inc/opredlin.hxx b/sc/source/ui/inc/opredlin.hxx
new file mode 100644
index 000000000000..0573ecb86f1e
--- /dev/null
+++ b/sc/source/ui/inc/opredlin.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _SC_OPREDLIN_HXX
+#define _SC_OPREDLIN_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+
+#ifndef _FIELD_HXX //autogen
+#include <vcl/field.hxx>
+#endif
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#include <svtools/ctrlbox.hxx>
+#include <svx/fntctrl.hxx>
+#include <svx/strarray.hxx>
+
+/*-----------------------------------------------------------------------
+ Beschreibung: Redlining-Optionen
+ -----------------------------------------------------------------------*/
+
+class ScRedlineOptionsTabPage : public SfxTabPage
+{
+ FixedText aContentFT;
+ ColorListBox aContentColorLB;
+ FixedText aRemoveFT;
+ ColorListBox aRemoveColorLB;
+ FixedText aInsertFT;
+ ColorListBox aInsertColorLB;
+ FixedText aMoveFT;
+ ColorListBox aMoveColorLB;
+ FixedLine aChangedGB;
+ String aAuthorStr;
+ DECL_LINK( ColorHdl, ColorListBox *pColorLB );
+
+
+public:
+
+ ScRedlineOptionsTabPage( Window* pParent, const SfxItemSet& rSet );
+ ~ScRedlineOptionsTabPage();
+
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
+
+ virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+};
+#endif
+
+
diff --git a/sc/source/ui/inc/optdlg.hrc b/sc/source/ui/inc/optdlg.hrc
new file mode 100644
index 000000000000..27b8976e3541
--- /dev/null
+++ b/sc/source/ui/inc/optdlg.hrc
@@ -0,0 +1,192 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc"
+
+/*
+#define RID_SCDLG_OPTIONS 256
+#define RID_SCPAGE_VIEW 256
+#define RID_SCPAGE_USERLISTS 257
+#define RID_SCPAGE_CALC 258
+#define RID_SCPAGE_PRINT 259
+*/
+
+#define TP_GENERAL 1
+#define TP_SAVE 2
+#define TP_PATH 3
+#define TP_SPELL 4
+#define TP_VIEW 5
+#define TP_CALC 6
+#define TP_USERLISTS 7
+#define TP_PRINT 8
+#define TP_COLORS 9
+#define TP_GRID 10
+#define TP_CONTENT 11
+#define TP_LAYOUT 12
+#define TP_INPUT 13
+#define TP_CHANGES 14
+
+// TP_CALC:
+#define BTN_ITERATE 1
+#define FT_STEPS 2
+#define FT_EPS 3
+#define ED_STEPS 4
+#define ED_EPS 5
+#define GB_ZREFS 6
+#define ED_PREC 7
+#define FT_PREC 8
+#define BTN_DATESTD 9
+#define BTN_DATESC10 10
+#define BTN_DATE1904 11
+#define FT_VALUE 13
+#define GB_DATE 14
+#define BTN_CASE 15
+#define FT_CASE 16
+#define BTN_CALC 17
+#define BTN_MATCH 18
+#define BTN_LOOKUP 19
+#define BTN_REGEX 20
+#define BTN_GENERAL_PREC 21
+
+// TP_VIEW:
+#define BTN_VSCROLL 1
+#define BTN_HSCROLL 2
+#define BTN_REGISTER 3
+#define BTN_OUTLINER 4
+#define BTN_HEADERFOOTER 5
+#define BTN_GRID 6
+#define BTN_SYNTAX 7
+#define LB_GRIDCOLOR 9
+#define GB_ELEMENTS 10
+#define BTN_HELPLINES 11
+
+#define BTN_FORMULAS 20
+#define BTN_NULLVALS 21
+#define BTN_NOTES 22
+#define GB_CONTENTS 23
+
+//#define FT_OLE 31
+//#define FT_CHARTS 32
+//#define FT_DRAWINGS 33
+//#define LB_OLE 34
+//#define LB_CHARTS 35
+//#define LB_DRAWINGS 36
+//#define GB_OBJECTS 37
+
+
+// TP_USERLISTS:
+#define FT_LISTS 1
+#define LB_LISTS 1
+#define FT_ENTRIES 2
+#define ED_ENTRIES 2
+#define FT_COPYFROM 3
+#define ED_COPYFROM 3
+#define BTN_NEW 1
+#define BTN_ADD 2
+#define BTN_REMOVE 3
+#define BTN_COPY 4
+#define STR_QUERYREMOVE 5
+#define STR_DISMISS 6
+#define STR_COPYLIST 7
+#define STR_COPYFROM 8
+#define STR_COPYERR 9
+
+// TP_PRINT:
+#define FL_PAGES 1
+#define BTN_SKIPEMPTYPAGES 2
+#define FL_SHEETS 2
+#define BTN_SELECTEDSHEETS 4
+
+// TP_LCONTENT
+
+#define GB_DISPLAY 20
+#define CB_FORMULA 21
+#define CB_NIL 22
+#define CB_ANNOT 23
+#define CB_VALUE 24
+#define CB_ANCHOR 25
+#define GB_OBJECT 26
+#define FT_OBJGRF 27
+#define LB_OBJGRF 28
+#define FT_DIAGRAM 29
+#define LB_DIAGRAM 30
+#define FT_DRAW 31
+#define LB_DRAW 32
+#define CB_CLIP 33
+#define GB_ZOOM 34
+#define CB_SYNCZOOM 35
+
+// TP_LAYOUT
+#define GB_LINK 1
+#define RB_ALWAYS 2
+#define RB_REQUEST 3
+#define RB_NEVER 4
+#define CB_DOCONLY 5
+#define CB_MERGE_PARA_DIST 6
+#define GB_COMPAT 7
+#define CB_AUTO_UPDATE_FIELDS 8
+#define CB_AUTO_UPDATE_CHARTS 9
+#define FT_UPDATE_LINKS 10
+
+#define GB_WINDOW 50
+#define CB_ROWCOLHEADER 51
+#define CB_HSCROLL 52
+#define CB_VSCROLL 53
+#define CB_TBLREG 54
+#define CB_OUTLINE 55
+#define GB_LINES 56
+#define CB_GRID 57
+#define FT_COLOR 58
+#define LB_COLOR 59
+#define CB_GUIDELINE 60
+#define GB_UNIT 61
+#define LB_UNIT 62
+#define ST_UNIT 63
+#define GB_TAB 64
+#define MF_TAB 65
+#define CB_PAGEBREAKS 66
+#define CB_HANDLES 67
+#define CB_BIGHANDLES 68
+#define FT_TAB 69
+#define FT_UNIT 70
+#define FL_SEPARATOR1 71
+#define FL_SEPARATOR2 72
+#define FL_SEPARATOR 73
+#define FL_H_SEPARATOR 74
+// TP_INPUT
+
+#define GB_OPTIONS 70
+#define CB_ALIGN 71
+#define LB_ALIGN 72
+#define CB_EDITMODE 73
+#define CB_FORMAT 74
+#define CB_RFIND 75
+#define CB_EXPREF 76
+#define CB_MARKHDR 77
+#define CB_TEXTFMT 78
+#define CB_REPLWARN 79
+
diff --git a/sc/source/ui/inc/optload.hrc b/sc/source/ui/inc/optload.hrc
new file mode 100644
index 000000000000..992bb8c737e4
--- /dev/null
+++ b/sc/source/ui/inc/optload.hrc
@@ -0,0 +1,40 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#include "sc.hrc" // -> RID_SCPAGE_OPREDLINE
+
+#define GB_LINK 1
+#define RB_ALWAYS 2
+#define RB_REQUEST 3
+#define RB_NEVER 4
+#define CB_DOCONLY 5
+#define CB_MERGE_PARA_DIST 6
+#define GB_COMPAT 7
+#define CB_AUTO_UPDATE_FIELDS 8
+#define CB_AUTO_UPDATE_CHARTS 9
+#define FT_UPDATE_LINKS 10
+
+
diff --git a/sc/source/ui/inc/optload.hxx b/sc/source/ui/inc/optload.hxx
new file mode 100644
index 000000000000..93d5fefa8358
--- /dev/null
+++ b/sc/source/ui/inc/optload.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _OPTLOAD_HXX
+#define _OPTLOAD_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#include <vcl/fixed.hxx>
+
+class ScDocument;
+
+class ScLoadOptPage : public SfxTabPage
+{
+private:
+ FixedText aLinkFT;
+ RadioButton aAlwaysRB;
+ RadioButton aRequestRB;
+ RadioButton aNeverRB;
+ CheckBox aDocOnlyCB;
+ GroupBox aLinkGB;
+ ScDocument *pDoc;
+
+ DECL_LINK( UpdateHdl, CheckBox* );
+
+public:
+ ScLoadOptPage( Window* pParent,
+ const SfxItemSet& rSet );
+ ~ScLoadOptPage();
+
+ static SfxTabPage* Create( Window* pParent,
+ const SfxItemSet& rAttrSet);
+
+ void SetDocument(ScDocument*);
+
+ virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+};
+
+#endif
+
+
diff --git a/sc/source/ui/inc/optsolver.hrc b/sc/source/ui/inc/optsolver.hrc
new file mode 100644
index 000000000000..9df8eea1d7f4
--- /dev/null
+++ b/sc/source/ui/inc/optsolver.hrc
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc"
+
+#define ED_OBJECTIVECELL 1
+#define ED_TARGET 2
+#define ED_VARIABLECELLS 3
+#define ED_LEFT1 4
+#define ED_LEFT2 5
+#define ED_LEFT3 6
+#define ED_LEFT4 7
+#define ED_RIGHT1 8
+#define ED_RIGHT2 9
+#define ED_RIGHT3 10
+#define ED_RIGHT4 11
+
+#define FT_OBJECTIVECELL 1
+#define FT_DIRECTION 2
+#define FT_VARIABLECELLS 3
+#define FT_CELLREF 4
+#define FT_OPERATOR 5
+#define FT_CONSTRAINT 6
+
+#define FT_PROGRESS 7
+#define FT_TIMELIMIT 8
+#define FT_NOSOLUTION 9
+#define FT_ERRORTEXT 10
+#define FT_SUCCESS 11
+#define FT_RESULT 12
+#define FT_QUESTION 13
+
+#define FL_CONDITIONS 1
+#define FL_BUTTONS 2
+
+#define IB_OBJECTIVECELL 1
+#define IB_TARGET 2
+#define IB_VARIABLECELLS 3
+#define IB_LEFT1 4
+#define IB_LEFT2 5
+#define IB_LEFT3 6
+#define IB_LEFT4 7
+#define IB_RIGHT1 8
+#define IB_RIGHT2 9
+#define IB_RIGHT3 10
+#define IB_RIGHT4 11
+#define IB_DELETE1 12
+#define IB_DELETE2 13
+#define IB_DELETE3 14
+#define IB_DELETE4 15
+
+#define LB_OP1 1
+#define LB_OP2 2
+#define LB_OP3 3
+#define LB_OP4 4
+
+#define RB_MAX 1
+#define RB_MIN 2
+#define RB_VALUE 3
+
+#define SB_SCROLL 1
+
+#define BTN_OPTIONS 1
+#define BTN_HELP 2
+#define BTN_CLOSE 3
+#define BTN_SOLVE 4
+#define BTN_OK 5
+#define BTN_CANCEL 6
+
+#define IMG_DEL_H 1
+
+#define STR_INVALIDINPUT 1
+#define STR_INVALIDCONDITION 2
+
diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx
new file mode 100644
index 000000000000..bbd98f1d1818
--- /dev/null
+++ b/sc/source/ui/inc/optsolver.hxx
@@ -0,0 +1,264 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_OPTSOLVER_HXX
+#define SC_OPTSOLVER_HXX
+
+#include "global.hxx"
+#include "address.hxx"
+#include "anyrefdg.hxx"
+#include <vcl/fixed.hxx>
+#include <vcl/group.hxx>
+#include <vcl/lstbox.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <vector>
+
+namespace com { namespace sun { namespace star {
+ namespace beans { struct PropertyValue; }
+} } }
+
+//============================================================================
+
+class ScCursorRefEdit : public formula::RefEdit
+{
+ Link maCursorUpLink;
+ Link maCursorDownLink;
+
+public:
+ ScCursorRefEdit( ScAnyRefDlg* pParent, const ResId& rResId );
+ void SetCursorLinks( const Link& rUp, const Link& rDown );
+
+protected:
+ virtual void KeyInput( const KeyEvent& rKEvt );
+};
+
+
+/// The dialog's content for a row, not yet parsed
+struct ScOptConditionRow
+{
+ String aLeftStr;
+ USHORT nOperator;
+ String aRightStr;
+
+ ScOptConditionRow() : nOperator(0) {}
+ bool IsDefault() const { return aLeftStr.Len() == 0 && aRightStr.Len() == 0 && nOperator == 0; }
+};
+
+/// All settings from the dialog, saved with the DocShell for the next call
+class ScOptSolverSave
+{
+ String maObjective;
+ BOOL mbMax;
+ BOOL mbMin;
+ BOOL mbValue;
+ String maTarget;
+ String maVariable;
+ std::vector<ScOptConditionRow> maConditions;
+ String maEngine;
+ com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> maProperties;
+
+public:
+ ScOptSolverSave( const String& rObjective, BOOL bMax, BOOL bMin, BOOL bValue,
+ const String& rTarget, const String& rVariable,
+ const std::vector<ScOptConditionRow>& rConditions,
+ const String& rEngine,
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rProperties );
+
+ const String& GetObjective() const { return maObjective; }
+ BOOL GetMax() const { return mbMax; }
+ BOOL GetMin() const { return mbMin; }
+ BOOL GetValue() const { return mbValue; }
+ const String& GetTarget() const { return maTarget; }
+ const String& GetVariable() const { return maVariable; }
+ const std::vector<ScOptConditionRow>& GetConditions() const { return maConditions; }
+ const String& GetEngine() const { return maEngine; }
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& GetProperties() const
+ { return maProperties; }
+};
+
+class ScOptSolverDlg : public ScAnyRefDlg
+{
+public:
+ ScOptSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScDocShell* pDocSh, ScAddress aCursorPos );
+ ~ScOptSolverDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+ virtual BOOL IsRefInputMode() const;
+ virtual void SetActive();
+ virtual BOOL Close();
+
+private:
+ FixedText maFtObjectiveCell;
+ formula::RefEdit maEdObjectiveCell;
+ formula::RefButton maRBObjectiveCell;
+
+ FixedText maFtDirection;
+ RadioButton maRbMax;
+ RadioButton maRbMin;
+ RadioButton maRbValue;
+ formula::RefEdit maEdTargetValue;
+ formula::RefButton maRBTargetValue;
+
+ FixedText maFtVariableCells;
+ formula::RefEdit maEdVariableCells;
+ formula::RefButton maRBVariableCells;
+
+ FixedLine maFlConditions;
+
+ FixedText maFtCellRef; // labels are together with controls for the first row
+ ScCursorRefEdit maEdLeft1;
+ formula::RefButton maRBLeft1;
+ FixedText maFtOperator;
+ ListBox maLbOp1;
+ FixedText maFtConstraint;
+ ScCursorRefEdit maEdRight1;
+ formula::RefButton maRBRight1;
+ ImageButton maBtnDel1;
+
+ ScCursorRefEdit maEdLeft2;
+ formula::RefButton maRBLeft2;
+ ListBox maLbOp2;
+ ScCursorRefEdit maEdRight2;
+ formula::RefButton maRBRight2;
+ ImageButton maBtnDel2;
+
+ ScCursorRefEdit maEdLeft3;
+ formula::RefButton maRBLeft3;
+ ListBox maLbOp3;
+ ScCursorRefEdit maEdRight3;
+ formula::RefButton maRBRight3;
+ ImageButton maBtnDel3;
+
+ ScCursorRefEdit maEdLeft4;
+ formula::RefButton maRBLeft4;
+ ListBox maLbOp4;
+ ScCursorRefEdit maEdRight4;
+ formula::RefButton maRBRight4;
+ ImageButton maBtnDel4;
+
+ ScrollBar maScrollBar;
+
+ FixedLine maFlButtons;
+
+ PushButton maBtnOpt;
+ HelpButton maBtnHelp;
+ CancelButton maBtnCancel;
+ PushButton maBtnSolve;
+
+ String maInputError;
+ String maConditionError;
+
+ ScDocShell* mpDocShell;
+ ScDocument* mpDoc;
+ const SCTAB mnCurTab;
+ formula::RefEdit* mpEdActive;
+ bool mbDlgLostFocus;
+
+ static const sal_uInt16 EDIT_ROW_COUNT = 4;
+ ScCursorRefEdit* mpLeftEdit[EDIT_ROW_COUNT];
+ formula::RefButton* mpLeftButton[EDIT_ROW_COUNT];
+ ScCursorRefEdit* mpRightEdit[EDIT_ROW_COUNT];
+ formula::RefButton* mpRightButton[EDIT_ROW_COUNT];
+ ListBox* mpOperator[EDIT_ROW_COUNT];
+ ImageButton* mpDelButton[EDIT_ROW_COUNT];
+
+ std::vector<ScOptConditionRow> maConditions;
+ long nScrollPos;
+
+ com::sun::star::uno::Sequence<rtl::OUString> maImplNames;
+ com::sun::star::uno::Sequence<rtl::OUString> maDescriptions;
+ String maEngine;
+ com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> maProperties;
+
+ void Init(const ScAddress& rCursorPos);
+ bool CallSolver();
+ void ReadConditions();
+ void ShowConditions();
+ void EnableButtons();
+ bool ParseRef( ScRange& rRange, const String& rInput, bool bAllowRange );
+ bool FindTimeout( sal_Int32& rTimeout );
+ void ShowError( bool bCondition, formula::RefEdit* pFocus );
+
+ DECL_LINK( BtnHdl, PushButton* );
+ DECL_LINK( DelBtnHdl, PushButton* );
+ DECL_LINK( GetFocusHdl, Control* );
+ DECL_LINK( LoseFocusHdl, Control* );
+ DECL_LINK( ScrollHdl, ScrollBar* );
+ DECL_LINK( CursorUpHdl, ScCursorRefEdit* );
+ DECL_LINK( CursorDownHdl, ScCursorRefEdit* );
+ DECL_LINK( CondModifyHdl, Edit* );
+ DECL_LINK( TargetModifyHdl, Edit* );
+ DECL_LINK( SelectHdl, ListBox* );
+};
+
+
+class ScSolverProgressDialog : public ModelessDialog
+{
+ FixedText maFtProgress;
+ FixedText maFtTime;
+ FixedLine maFlButtons;
+ OKButton maBtnOk;
+
+public:
+ ScSolverProgressDialog( Window* pParent );
+ ~ScSolverProgressDialog();
+
+ void HideTimeLimit();
+ void SetTimeLimit( sal_Int32 nSeconds );
+};
+
+class ScSolverNoSolutionDialog : public ModalDialog
+{
+ FixedText maFtNoSolution;
+ FixedText maFtErrorText;
+ FixedLine maFlButtons;
+ OKButton maBtnOk;
+
+public:
+ ScSolverNoSolutionDialog( Window* pParent, const String& rErrorText );
+ ~ScSolverNoSolutionDialog();
+};
+
+class ScSolverSuccessDialog : public ModalDialog
+{
+ FixedText maFtSuccess;
+ FixedText maFtResult;
+ FixedText maFtQuestion;
+ FixedLine maFlButtons;
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+
+public:
+ ScSolverSuccessDialog( Window* pParent, const String& rSolution );
+ ~ScSolverSuccessDialog();
+};
+
+
+#endif
+
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
new file mode 100644
index 000000000000..42844513af92
--- /dev/null
+++ b/sc/source/ui/inc/output.hxx
@@ -0,0 +1,272 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_OUTPUT_HXX
+#define SC_OUTPUT_HXX
+
+#include "address.hxx"
+#include <tools/list.hxx>
+#include <tools/color.hxx>
+#include <tools/fract.hxx>
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+
+class Rectangle;
+class Font;
+class OutputDevice;
+class Window;
+class EditEngine;
+class ScDocument;
+class ScBaseCell;
+class ScPatternAttr;
+class SvxMarginItem;
+class SdrObject;
+class SdrOle2Obj;
+struct RowInfo;
+struct ScTableInfo;
+class ScTabViewShell;
+class ScPageBreakData;
+class FmFormView;
+
+// #i74769# SdrPaintWindow predefine
+class SdrPaintWindow;
+
+// ---------------------------------------------------------------------------
+
+#define SC_SCENARIO_HSPACE 60
+#define SC_SCENARIO_VSPACE 50
+
+// ---------------------------------------------------------------------------
+
+#define SC_OBJECTS_NONE 0
+#define SC_OBJECTS_DRAWING 1
+#define SC_OBJECTS_OLE 2
+#define SC_OBJECTS_CHARTS 4
+#define SC_OBJECTS_ALL ( SC_OBJECTS_DRAWING | SC_OBJECTS_OLE | SC_OBJECTS_CHARTS )
+
+enum ScOutputType { OUTTYPE_WINDOW, OUTTYPE_PRINTER };
+
+class ScOutputData
+{
+friend class ScDrawStringsVars;
+private:
+ struct OutputAreaParam
+ {
+ Rectangle maAlignRect;
+ Rectangle maClipRect;
+ long mnColWidth;
+ bool mbLeftClip;
+ bool mbRightClip;
+ };
+
+ OutputDevice* pDev; // Device
+ OutputDevice* pRefDevice; // printer if used for preview
+ OutputDevice* pFmtDevice; // reference for text formatting
+ ScTableInfo& mrTabInfo;
+ RowInfo* pRowInfo; // Info-Block
+ SCSIZE nArrCount; // belegte Zeilen im Info-Block
+ ScDocument* pDoc; // Dokument
+ SCTAB nTab; // Tabelle
+ long nScrX; // Ausgabe Startpos. (Pixel)
+ long nScrY;
+ long nScrW; // Ausgabe Groesse (Pixel)
+ long nScrH;
+ long nMirrorW; // Visible output width for mirroring (default: nScrW)
+ SCCOL nX1; // Start-/Endkoordinaten
+ SCROW nY1; // ( incl. versteckte )
+ SCCOL nX2;
+ SCROW nY2;
+ SCCOL nVisX1; // Start-/Endkoordinaten
+ SCROW nVisY1; // ( sichtbarer Bereich )
+ SCCOL nVisX2;
+ SCROW nVisY2;
+ ScOutputType eType; // Bildschirm/Drucker ...
+ double nPPTX; // Pixel per Twips
+ double nPPTY;
+// USHORT nZoom; // Zoom-Faktor (Prozent) - fuer GetFont
+ Fraction aZoomX;
+ Fraction aZoomY;
+
+ SdrObject* pEditObj; // beim Painten auslassen
+
+ ScTabViewShell* pViewShell; // zum Connecten von sichtbaren Plug-Ins
+
+ // #114135#
+ FmFormView* pDrawView; // SdrView to paint to
+
+ BOOL bEditMode; // InPlace editierte Zelle - nicht ausgeben
+ SCCOL nEditCol;
+ SCROW nEditRow;
+
+ BOOL bMetaFile; // Ausgabe auf Metafile (nicht in Pixeln!)
+ BOOL bSingleGrid; // beim Gitter bChanged auswerten
+
+ BOOL bPagebreakMode; // Seitenumbruch-Vorschau
+ BOOL bSolidBackground; // weiss statt transparent
+
+ BOOL bUseStyleColor;
+ BOOL bForceAutoColor;
+
+ BOOL bSyntaxMode; // Syntax-Highlighting
+ Color* pValueColor;
+ Color* pTextColor;
+ Color* pFormulaColor;
+
+ Color aGridColor;
+
+ BOOL bShowNullValues;
+ BOOL bShowFormulas;
+ BOOL bShowSpellErrors; // Spell-Errors in EditObjekten anzeigen
+ BOOL bMarkClipped;
+
+ BOOL bSnapPixel;
+
+ BOOL bAnyRotated; // intern
+ BOOL bAnyClipped; // intern
+ BOOL bTabProtected;
+ BYTE nTabTextDirection; // EEHorizontalTextDirection values
+ BOOL bLayoutRTL;
+
+ // #i74769# use SdrPaintWindow direct, remember it during BeginDrawLayers/EndDrawLayers
+ SdrPaintWindow* mpTargetPaintWindow;
+
+ // private methods
+
+ BOOL GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
+ SCCOL& rOverX, SCROW& rOverY, BOOL bVisRowChanged );
+ BOOL IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY );
+ void GetVisibleCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell*& rpCell );
+
+ BOOL IsAvailable( SCCOL nX, SCROW nY );
+
+ void GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY,
+ SCCOL nCellX, SCROW nCellY, long nNeeded,
+ const ScPatternAttr& rPattern,
+ USHORT nHorJustify, bool bCellIsValue,
+ bool bBreak, bool bOverwrite,
+ OutputAreaParam& rParam );
+
+ void ShrinkEditEngine( EditEngine& rEngine, const Rectangle& rAlignRect,
+ long nLeftM, long nTopM, long nRightM, long nBottomM,
+ BOOL bWidth, USHORT nOrient, long nAttrRotate, BOOL bPixelToLogic,
+ long& rEngineWidth, long& rEngineHeight, long& rNeededPixel,
+ bool& rLeftClip, bool& rRightClip );
+
+ void SetSyntaxColor( Font* pFont, ScBaseCell* pCell );
+ void SetEditSyntaxColor( EditEngine& rEngine, ScBaseCell* pCell );
+
+ double GetStretch();
+
+ void DrawRotatedFrame( const Color* pForceColor ); // pixel
+
+public:
+ ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
+ ScTableInfo& rTabInfo, ScDocument* pNewDoc,
+ SCTAB nNewTab, long nNewScrX, long nNewScrY,
+ SCCOL nNewX1, SCROW nNewY1, SCCOL nNewX2, SCROW nNewY2,
+ double nPixelPerTwipsX, double nPixelPerTwipsY,
+ const Fraction* pZoomX = NULL,
+ const Fraction* pZoomY = NULL );
+
+ ~ScOutputData();
+
+ void SetContentDevice( OutputDevice* pContentDev );
+
+ void SetRefDevice( OutputDevice* pRDev ) { pRefDevice = pFmtDevice = pRDev; }
+ void SetFmtDevice( OutputDevice* pRDev ) { pFmtDevice = pRDev; }
+ void SetEditObject( SdrObject* pObj ) { pEditObj = pObj; }
+ void SetViewShell( ScTabViewShell* pSh ) { pViewShell = pSh; }
+
+ // #114135#
+ void SetDrawView( FmFormView* pNew ) { pDrawView = pNew; }
+
+ void SetSolidBackground( BOOL bSet ) { bSolidBackground = bSet; }
+ void SetUseStyleColor( BOOL bSet ) { bUseStyleColor = bSet; }
+
+ void SetEditCell( SCCOL nCol, SCROW nRow );
+ void SetSyntaxMode( BOOL bNewMode );
+ void SetMetaFileMode( BOOL bNewMode );
+ void SetSingleGrid( BOOL bNewMode );
+ void SetGridColor( const Color& rColor );
+ void SetMarkClipped( BOOL bSet );
+ void SetShowNullValues ( BOOL bSet = TRUE );
+ void SetShowFormulas ( BOOL bSet = TRUE );
+ void SetShowSpellErrors( BOOL bSet = TRUE );
+ void SetMirrorWidth( long nNew );
+ long GetScrW() const { return nScrW; }
+ long GetScrH() const { return nScrH; }
+
+ void SetSnapPixel( BOOL bSet = TRUE );
+
+ void DrawGrid( BOOL bGrid, BOOL bPage );
+ void DrawStrings( BOOL bPixelToLogic = FALSE );
+ void DrawBackground();
+ void DrawShadow();
+ void DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBottom);
+ void DrawFrame();
+
+ // with logic MapMode set!
+ void DrawEdit(BOOL bPixelToLogic);
+
+ void FindRotated();
+ void DrawRotated(BOOL bPixelToLogic); // logisch
+
+ void DrawClear();
+
+ // #i72502# printer only command set
+ Point PrePrintDrawingLayer(long nLogStX, long nLogStY );
+ void PostPrintDrawingLayer(const Point& rMMOffset); // #i74768# need offset for FormLayer
+ void PrintDrawingLayer(const sal_uInt16 nLayer, const Point& rMMOffset);
+
+ // nur Bildschirm:
+ void DrawingSingle(const sal_uInt16 nLayer);
+ void DrawSelectiveObjects(const sal_uInt16 nLayer);
+
+ BOOL SetChangedClip(); // FALSE = nix
+ PolyPolygon GetChangedArea();
+
+ void FindChanged();
+ void SetPagebreakMode( ScPageBreakData* pPageData );
+#ifdef OLD_SELECTION_PAINT
+ void DrawMark( Window* pWin );
+#endif
+ void DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
+ SCCOL nRefEndX, SCROW nRefEndY,
+ const Color& rColor, BOOL bHandle );
+ void DrawOneChange( SCCOL nRefStartX, SCROW nRefStartY,
+ SCCOL nRefEndX, SCROW nRefEndY,
+ const Color& rColor, USHORT nType );
+ void DrawChangeTrack();
+ void DrawClipMarks();
+
+ void DrawNoteMarks();
+ void AddPDFNotes();
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/pagedata.hxx b/sc/source/ui/inc/pagedata.hxx
new file mode 100644
index 000000000000..bcd85c8f5a96
--- /dev/null
+++ b/sc/source/ui/inc/pagedata.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PAGEDATA_HXX
+#define SC_PAGEDATA_HXX
+
+#include "global.hxx"
+#include "address.hxx"
+
+class ScDocShell;
+
+//============================================================================
+
+class ScPrintRangeData
+{
+private:
+ ScRange aPrintRange;
+ size_t nPagesX;
+ SCCOL* pPageEndX;
+ size_t nPagesY;
+ SCROW* pPageEndY;
+ long nFirstPage;
+ BOOL bTopDown;
+ BOOL bAutomatic;
+
+public:
+ ScPrintRangeData();
+ ~ScPrintRangeData();
+
+ void SetPrintRange( const ScRange& rNew ) { aPrintRange = rNew; }
+ const ScRange& GetPrintRange() const { return aPrintRange; }
+
+ void SetPagesX( size_t nCount, const SCCOL* pEnd );
+ void SetPagesY( size_t nCount, const SCROW* pEnd );
+
+ size_t GetPagesX() const { return nPagesX; }
+ const SCCOL* GetPageEndX() const { return pPageEndX; }
+ size_t GetPagesY() const { return nPagesY; }
+ const SCROW* GetPageEndY() const { return pPageEndY; }
+
+ void SetFirstPage( long nNew ) { nFirstPage = nNew; }
+ long GetFirstPage() const { return nFirstPage; }
+ void SetTopDown( BOOL bSet ) { bTopDown = bSet; }
+ BOOL IsTopDown() const { return bTopDown; }
+ void SetAutomatic( BOOL bSet ) { bAutomatic = bSet; }
+ BOOL IsAutomatic() const { return bAutomatic; }
+};
+
+class ScPageBreakData
+{
+private:
+ size_t nAlloc;
+ size_t nUsed;
+ ScPrintRangeData* pData; // Array
+
+public:
+ ScPageBreakData(size_t nMax);
+ ~ScPageBreakData();
+
+ size_t GetCount() const { return nUsed; }
+ ScPrintRangeData& GetData(size_t i);
+
+ BOOL IsEqual( const ScPageBreakData& rOther ) const;
+
+ void AddPages();
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/parawin.hxx b/sc/source/ui/inc/parawin.hxx
new file mode 100644
index 000000000000..ae02fdb38114
--- /dev/null
+++ b/sc/source/ui/inc/parawin.hxx
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PARAWIN_HXX
+#define SC_PARAWIN_HXX
+
+#include "funcutl.hxx"
+#include "global.hxx" // ScAddress
+#include <svtools/stdctrl.hxx>
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#include <vcl/group.hxx>
+#include <svtools/svmedit.hxx>
+#include <vcl/tabpage.hxx>
+
+#ifndef _SVSTDARR_STRINGS
+
+#define _SVSTDARR_STRINGS
+#include <svl/svstdarr.hxx>
+
+#endif
+#include <vcl/tabctrl.hxx>
+
+#include <vector>
+
+class ScFuncDesc;
+
+//============================================================================
+#define NOT_FOUND 0xffff
+//============================================================================
+
+class ScParaWin : public TabPage
+{
+private:
+
+ Link aScrollLink;
+ Link aFxLink;
+ Link aArgModifiedLink;
+
+ ::std::vector<USHORT> aVisibleArgMapping;
+ const ScFuncDesc* pFuncDesc;
+ ScAnyRefDlg* pMyParent;
+ USHORT nArgs; // unsuppressed arguments
+ Font aFntBold;
+ Font aFntLight;
+
+ FixedInfo aFtEditDesc;
+ FixedText aFtArgName;
+ FixedInfo aFtArgDesc;
+
+ ImageButton aBtnFx1;
+ FixedText aFtArg1;
+ ArgEdit aEdArg1;
+ formula::RefButton aRefBtn1;
+ ImageButton aBtnFx2;
+ FixedText aFtArg2;
+ ArgEdit aEdArg2;
+ formula::RefButton aRefBtn2;
+ ImageButton aBtnFx3;
+ FixedText aFtArg3;
+ ArgEdit aEdArg3;
+ formula::RefButton aRefBtn3;
+ ImageButton aBtnFx4;
+ FixedText aFtArg4;
+ ArgEdit aEdArg4;
+ formula::RefButton aRefBtn4;
+ ScrollBar aSlider;
+ BOOL bRefMode;
+
+ USHORT nEdFocus;
+ USHORT nActiveLine;
+
+ ArgInput aArgInput[4];
+ String aDefaultString;
+ SvStrings aParaArray;
+ DECL_LINK( ScrollHdl, ScrollBar* );
+ DECL_LINK( ModifyHdl, ArgInput* );
+ DECL_LINK( GetEdFocusHdl, ArgInput* );
+ DECL_LINK( GetFxFocusHdl, ArgInput* );
+ DECL_LINK( GetFxHdl, ArgInput* );
+
+protected:
+
+ virtual void SliderMoved();
+ virtual void ArgumentModified();
+ virtual void FxClick();
+
+ void InitArgInput( USHORT nPos, FixedText& rFtArg, ImageButton& rBtnFx,
+ ArgEdit& rEdArg, formula::RefButton& rRefBtn);
+
+ void DelParaArray();
+ void SetArgumentDesc(const String& aText);
+ void SetArgumentText(const String& aText);
+
+
+ void SetArgName (USHORT no,const String &aArg);
+ void SetArgNameFont (USHORT no,const Font&);
+ void SetArgVal (USHORT no,const String &aArg);
+
+ void HideParaLine(USHORT no);
+ void ShowParaLine(USHORT no);
+ void UpdateArgDesc( USHORT nArg );
+ void UpdateArgInput( USHORT nOffset, USHORT i );
+
+public:
+ ScParaWin(ScAnyRefDlg* pParent,Point aPos);
+ ~ScParaWin();
+
+ void SetFunctionDesc(const ScFuncDesc* pFDesc);
+ void SetArgumentOffset(USHORT nOffset);
+ void SetEditDesc(const String& aText);
+ void UpdateParas();
+ void ClearAll();
+
+ BOOL IsRefMode() {return bRefMode;}
+ void SetRefMode(BOOL bFlag) {bRefMode=bFlag;}
+
+ USHORT GetActiveLine();
+ void SetActiveLine(USHORT no);
+ formula::RefEdit* GetActiveEdit();
+ String GetActiveArgName();
+
+ String GetArgument(USHORT no);
+ void SetArgument(USHORT no, const String& aString);
+ void SetArgumentFonts(const Font&aBoldFont,const Font&aLightFont);
+
+ void SetEdFocus(USHORT nEditLine); //Sichtbare Editzeilen
+ USHORT GetSliderPos();
+ void SetSliderPos(USHORT nSliderPos);
+
+ void SetScrollHdl( const Link& rLink ) { aScrollLink = rLink; }
+ const Link& GetScrollHdl() const { return aScrollLink; }
+
+ void SetArgModifiedHdl( const Link& rLink ) { aArgModifiedLink = rLink; }
+ const Link& GetArgModifiedHdl() const { return aArgModifiedLink; }
+
+ void SetFxHdl( const Link& rLink ) { aFxLink = rLink; }
+ const Link& GetFxHdl() const { return aFxLink; }
+};
+
+
+
+
+
+#endif // SC_PARAWIN_HXX
+
diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx
new file mode 100644
index 000000000000..426f95399b33
--- /dev/null
+++ b/sc/source/ui/inc/pfiltdlg.hxx
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PFILTDLG_HXX
+#define SC_PFILTDLG_HXX
+
+#ifndef _SV_HXX
+#endif
+
+#ifndef _MOREBTN_HXX //autogen
+#include <vcl/morebtn.hxx>
+#endif
+#include <svtools/stdctrl.hxx>
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+#include "address.hxx"
+#include "queryparam.hxx"
+
+//------------------------------------------------------------------
+
+class ScViewData;
+class ScDocument;
+class ScQueryItem;
+class TypedScStrCollection;
+
+//==================================================================
+
+class ScPivotFilterDlg : public ModalDialog
+{
+public:
+ ScPivotFilterDlg( Window* pParent,
+ const SfxItemSet& rArgSet, SCTAB nSourceTab );
+ ~ScPivotFilterDlg();
+
+ const ScQueryItem& GetOutputItem();
+
+private:
+ FixedLine aFlCriteria;
+ //----------------------------
+ ListBox aLbField1;
+ ListBox aLbCond1;
+ ComboBox aEdVal1;
+ //----------------------------
+ ListBox aLbConnect1;
+ ListBox aLbField2;
+ ListBox aLbCond2;
+ ComboBox aEdVal2;
+ //----------------------------
+ ListBox aLbConnect2;
+ ListBox aLbField3;
+ ListBox aLbCond3;
+ ComboBox aEdVal3;
+ //----------------------------
+ FixedText aFtConnect;
+ FixedText aFtField;
+ FixedText aFtCond;
+ FixedText aFtVal;
+
+ FixedLine aFlOptions;
+ CheckBox aBtnCase;
+ CheckBox aBtnRegExp;
+ CheckBox aBtnUnique;
+ FixedText aFtDbAreaLabel;
+ FixedInfo aFtDbArea;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ MoreButton aBtnMore;
+ const String aStrUndefined;
+ const String aStrNoName;
+ const String aStrNone;
+ const String aStrEmpty;
+ const String aStrNotEmpty;
+ const String aStrRow;
+ const String aStrColumn;
+
+ const USHORT nWhichQuery;
+ const ScQueryParam theQueryData;
+ ScQueryItem* pOutItem;
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ SCTAB nSrcTab;
+
+ USHORT nFieldCount;
+ ComboBox* aValueEdArr[3];
+ ListBox* aFieldLbArr[3];
+ ListBox* aCondLbArr[3];
+
+ TypedScStrCollection* pEntryLists[MAXCOLCOUNT];
+
+#ifdef _PFILTDLG_CXX
+private:
+ void Init ( const SfxItemSet& rArgSet );
+ void FillFieldLists ();
+ void UpdateValueList ( USHORT nList );
+ void ClearValueList ( USHORT nList );
+ USHORT GetFieldSelPos ( SCCOL nField );
+
+ // Handler:
+ DECL_LINK( LbSelectHdl, ListBox* );
+ DECL_LINK( ValModifyHdl, ComboBox* );
+ DECL_LINK( CheckBoxHdl, CheckBox* );
+#endif
+};
+
+
+#endif // SC_PFILTDLG_HXX
+
diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx
new file mode 100644
index 000000000000..365df0acc38b
--- /dev/null
+++ b/sc/source/ui/inc/pfuncache.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PFUNCACHE_HXX
+#define SC_PFUNCACHE_HXX
+
+#include <vector>
+#include <tools/gen.hxx>
+#include "rangelst.hxx"
+#include "printopt.hxx"
+
+class ScDocShell;
+class ScMarkData;
+
+
+/** Possible types of selection for print functions */
+
+enum ScPrintSelectionMode
+{
+ SC_PRINTSEL_INVALID,
+ SC_PRINTSEL_DOCUMENT,
+ SC_PRINTSEL_CURSOR,
+ SC_PRINTSEL_RANGE,
+ SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS
+};
+
+
+/** Stores the selection in the ScPrintFuncCache so it is only used
+ for the same selection again. */
+
+class ScPrintSelectionStatus
+{
+ ScPrintSelectionMode eMode;
+ ScRangeList aRanges;
+ ScPrintOptions aOptions;
+
+public:
+ ScPrintSelectionStatus() : eMode(SC_PRINTSEL_INVALID) {}
+ ~ScPrintSelectionStatus() {}
+
+ void SetMode(ScPrintSelectionMode eNew) { eMode = eNew; }
+ void SetRanges(const ScRangeList& rNew) { aRanges = rNew; }
+ void SetOptions(const ScPrintOptions& rNew) { aOptions = rNew; }
+
+ BOOL operator==(const ScPrintSelectionStatus& rOther) const
+ { return eMode == rOther.eMode && aRanges == rOther.aRanges && aOptions == rOther.aOptions; }
+
+ ScPrintSelectionMode GetMode() const { return eMode; }
+ const ScPrintOptions& GetOptions() const { return aOptions; }
+};
+
+
+/** The range that is printed on a page (excluding repeated columns/rows),
+ and its position on the page, used to find hyperlink targets. */
+
+struct ScPrintPageLocation
+{
+ long nPage;
+ ScRange aCellRange;
+ Rectangle aRectangle; // pixels
+
+ ScPrintPageLocation() :
+ nPage(-1) {} // default: invalid
+
+ ScPrintPageLocation( long nP, const ScRange& rRange, const Rectangle& rRect ) :
+ nPage(nP), aCellRange(rRange), aRectangle(rRect) {}
+};
+
+
+/** Stores the data for printing that is needed from several sheets,
+ so it doesn't have to be calculated for rendering each page. */
+
+class ScPrintFuncCache
+{
+ ScPrintSelectionStatus aSelection;
+ ScDocShell* pDocSh;
+ long nTotalPages;
+ long nPages[MAXTABCOUNT];
+ long nFirstAttr[MAXTABCOUNT];
+ std::vector<ScPrintPageLocation> aLocations;
+ bool bLocInitialized;
+
+public:
+ ScPrintFuncCache( ScDocShell* pD, const ScMarkData& rMark,
+ const ScPrintSelectionStatus& rStatus );
+ ~ScPrintFuncCache();
+
+ BOOL IsSameSelection( const ScPrintSelectionStatus& rStatus ) const;
+
+ void InitLocations( const ScMarkData& rMark, OutputDevice* pDev );
+ bool FindLocation( const ScAddress& rCell, ScPrintPageLocation& rLocation ) const;
+
+ long GetPageCount() const { return nTotalPages; }
+ long GetFirstAttr( SCTAB nTab ) const { return nFirstAttr[nTab]; }
+ SCTAB GetTabForPage( long nPage ) const;
+ long GetTabStart( SCTAB nTab ) const;
+ long GetDisplayStart( SCTAB nTab ) const;
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/pgbrksh.hxx b/sc/source/ui/inc/pgbrksh.hxx
new file mode 100644
index 000000000000..f367b4cc4f1f
--- /dev/null
+++ b/sc/source/ui/inc/pgbrksh.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PGBRKSH_HXX
+#define SC_PGBRKSH_HXX
+
+#include <sfx2/module.hxx>
+#include <sfx2/shell.hxx>
+
+#include "shellids.hxx"
+
+class ScTabViewShell;
+
+class ScPageBreakShell : public SfxShell
+{
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_PAGEBREAK_SHELL)
+
+ ScPageBreakShell( ScTabViewShell* pView );
+ ~ScPageBreakShell();
+
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/pivotsh.hxx b/sc/source/ui/inc/pivotsh.hxx
new file mode 100644
index 000000000000..2d3a21fa9756
--- /dev/null
+++ b/sc/source/ui/inc/pivotsh.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PIVOTSH_HXX
+#define SC_PIVOTSH_HXX
+
+#include <sfx2/module.hxx>
+#include <sfx2/shell.hxx>
+
+#include "shellids.hxx"
+
+class ScTabViewShell;
+class ScDPObject;
+
+class ScPivotShell : public SfxShell
+{
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_PIVOT_SHELL)
+
+ ScPivotShell( ScTabViewShell* pView );
+ ~ScPivotShell();
+
+ void Execute ( SfxRequest& rReq );
+ void GetState( SfxItemSet& rSet );
+
+private:
+ ScTabViewShell* pViewShell;
+
+ ScDPObject* GetCurrDPObject();
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/pntlock.hxx b/sc/source/ui/inc/pntlock.hxx
new file mode 100644
index 000000000000..60a7502c9734
--- /dev/null
+++ b/sc/source/ui/inc/pntlock.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PNTLOCK_HXX
+#define SC_PNTLOCK_HXX
+
+#include "rangelst.hxx"
+
+class ScPaintLockData
+{
+private:
+ ScRangeListRef xRangeList;
+ USHORT nMode;
+ USHORT nLevel;
+ USHORT nDocLevel;
+ USHORT nParts;
+ BOOL bModified;
+
+public:
+ ScPaintLockData(USHORT nNewMode);
+ ~ScPaintLockData();
+
+ void AddRange( const ScRange& rRange, USHORT nP );
+
+ void SetModified() { bModified = TRUE; }
+ void IncLevel(sal_Bool bDoc)
+ { if (bDoc) ++nDocLevel; else ++nLevel; }
+ void DecLevel(sal_Bool bDoc)
+ { if (bDoc) --nDocLevel; else --nLevel; }
+
+ const ScRangeListRef& GetRangeList() const { return xRangeList; }
+ USHORT GetParts() const { return nParts; }
+ USHORT GetLevel(sal_Bool bDoc) const
+ { return bDoc ? nDocLevel : nLevel; }
+ BOOL GetModified() const { return bModified; }
+
+ // fuer Wiederherstellen nach Reset
+ void SetLevel(USHORT nNew, sal_Bool bDoc)
+ { if (bDoc) nDocLevel = nNew; else nLevel = nNew; }
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/popmenu.hxx b/sc/source/ui/inc/popmenu.hxx
new file mode 100644
index 000000000000..8ac0fba4e80d
--- /dev/null
+++ b/sc/source/ui/inc/popmenu.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_POPMENU_HXX
+#define SC_POPMENU_HXX
+
+#ifndef _MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+#include "scdllapi.h"
+
+class SC_DLLPUBLIC ScPopupMenu : public PopupMenu
+{
+private:
+ USHORT nSel;
+ BOOL bHit;
+protected:
+ virtual void Select();
+public:
+ ScPopupMenu() : nSel(0),bHit(FALSE) {}
+ ScPopupMenu(const ResId& rRes) : PopupMenu(rRes),nSel(0),bHit(FALSE) {}
+ USHORT GetSelected() const { return nSel; }
+ BOOL WasHit() const { return bHit; }
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
new file mode 100644
index 000000000000..87d15dcdaf86
--- /dev/null
+++ b/sc/source/ui/inc/preview.hxx
@@ -0,0 +1,168 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SC_PREVIEW_HXX
+#define SC_PREVIEW_HXX
+
+
+#include <vcl/window.hxx>
+#include "printfun.hxx" // ScPrintState
+
+class ScDocShell;
+class ScPreviewShell;
+class FmFormView;
+
+class ScPreview : public Window
+{
+private:
+ // eingestellt:
+ long nPageNo; // Seite im Dokument
+ USHORT nZoom; // eingestellter Zoom
+ Point aOffset; // positiv
+
+ // berechnet:
+ BOOL bValid; // folgende Werte gueltig
+ SCTAB nTabCount;
+ SCTAB nTabsTested; // fuer wieviele Tabellen ist nPages gueltig?
+ long nPages[MAXTABCOUNT];
+ long nFirstAttr[MAXTABCOUNT];
+ SCTAB nTab; // Tabelle
+ long nTabPage; // Seite von Tabelle
+ long nTabStart; // erste Seite der Tabelle (wirklich)
+ long nDisplayStart; // dito, relativ zum Anfang der Zaehlung
+ Date aDate;
+ Time aTime;
+ long nTotalPages;
+ Size aPageSize; // fuer GetOptimalZoom
+ BOOL bStateValid;
+ BOOL bLocationValid;
+ ScPrintState aState;
+ ScPreviewLocationData* pLocationData; // stores table layout for accessibility API
+ FmFormView* pDrawView;
+
+ // intern:
+ BOOL bInPaint;
+ BOOL bInGetState;
+ ScDocShell* pDocShell;
+ ScPreviewShell* pViewShell;
+
+ BOOL bLeftRulerMove;
+ BOOL bRightRulerMove;
+ BOOL bTopRulerMove;
+ BOOL bBottomRulerMove;
+ BOOL bHeaderRulerMove;
+ BOOL bFooterRulerMove;
+
+ BOOL bLeftRulerChange;
+ BOOL bRightRulerChange;
+ BOOL bTopRulerChange;
+ BOOL bBottomRulerChange;
+ BOOL bHeaderRulerChange;
+ BOOL bFooterRulerChange;
+ BOOL bPageMargin;
+ BOOL bColRulerMove;
+ ScRange aPageArea;
+ long nRight[ MAXCOL+1 ];
+ long nLeftPosition;
+ long mnScale;
+ SCCOL nColNumberButttonDown;
+ Point aButtonDownChangePoint;
+ Point aButtonDownPt;
+ Point aButtonUpPt;
+ long nHeaderHeight;
+ long nFooterHeight;
+
+ void TestLastPage();
+ void CalcPages( SCTAB nToWhichTab );
+ void RecalcPages();
+ void UpdateDrawView();
+ void DoPrint( ScPreviewLocationData* pFillLocation );
+
+ void InvalidateLocationData( ULONG nId );
+
+ using Window::SetZoom;
+
+protected:
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+
+ virtual void GetFocus();
+ virtual void LoseFocus();
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+public:
+ ScPreview( Window* pParent, ScDocShell* pDocSh, ScPreviewShell* pViewSh );
+ ~ScPreview();
+
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ void DataChanged(BOOL bNewTime = FALSE); // statt Invalidate rufen
+ void DoInvalidate();
+
+ void SetXOffset( long nX );
+ void SetYOffset( long nY );
+ void SetZoom(USHORT nNewZoom);
+ void SetPageNo( long nPage );
+
+ BOOL GetPageMargins()const { return bPageMargin; }
+ void SetPageMargins( BOOL bVal ) { bPageMargin = bVal; }
+ void DrawInvert( long nDragPos, USHORT nFlags );
+ void DragMove( long nDragMovePos, USHORT nFlags );
+
+
+ const ScPreviewLocationData& GetLocationData();
+
+ String GetPosString();
+
+ long GetPageNo() const { return nPageNo; }
+ USHORT GetZoom() const { return nZoom; }
+ Point GetOffset() const { return aOffset; }
+
+ SCTAB GetTab() { if (!bValid) { CalcPages(0); RecalcPages(); } return nTab; }
+ long GetTotalPages() { if (!bValid) { CalcPages(0); RecalcPages(); } return nTotalPages; }
+
+ BOOL AllTested() const { return bValid && nTabsTested >= nTabCount; }
+
+ USHORT GetOptimalZoom(BOOL bWidthOnly);
+ long GetFirstPage(SCTAB nTab);
+
+ void CalcAll() { CalcPages(MAXTAB); }
+ void SetInGetState(BOOL bSet) { bInGetState = bSet; }
+
+ DECL_STATIC_LINK( ScPreview, InvalidateHdl, void* );
+ static void StaticInvalidate();
+
+ FmFormView* GetDrawView() { return pDrawView; }
+};
+
+
+
+#endif
diff --git a/sc/source/ui/inc/prevloc.hxx b/sc/source/ui/inc/prevloc.hxx
new file mode 100644
index 000000000000..15b477abad3c
--- /dev/null
+++ b/sc/source/ui/inc/prevloc.hxx
@@ -0,0 +1,157 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PREVLOC_HXX
+#define SC_PREVLOC_HXX
+
+#include "address.hxx"
+#include <tools/list.hxx>
+#include <vcl/mapmod.hxx>
+#include <sal/types.h>
+
+
+#define SC_PREVIEW_MAXRANGES 4
+#define SC_PREVIEW_RANGE_EDGE 0
+#define SC_PREVIEW_RANGE_REPCOL 1
+#define SC_PREVIEW_RANGE_REPROW 2
+#define SC_PREVIEW_RANGE_TAB 3
+
+class OutputDevice;
+class String;
+class Point;
+class Rectangle;
+class ScAddress;
+class ScRange;
+class ScDocument;
+
+struct ScPreviewColRowInfo
+{
+ BOOL bIsHeader;
+ SCCOLROW nDocIndex;
+ long nPixelStart;
+ long nPixelEnd;
+
+ void Set( BOOL bHeader, SCCOLROW nIndex, long nStart, long nEnd )
+ {
+ bIsHeader = bHeader;
+ nDocIndex = nIndex;
+ nPixelStart = nStart;
+ nPixelEnd = nEnd;
+ }
+};
+
+class ScPreviewTableInfo
+{
+ SCTAB nTab;
+ SCCOL nCols;
+ SCROW nRows;
+ ScPreviewColRowInfo* pColInfo;
+ ScPreviewColRowInfo* pRowInfo;
+
+public:
+ ScPreviewTableInfo();
+ ~ScPreviewTableInfo();
+
+ SCTAB GetTab() const { return nTab; }
+ SCCOL GetCols() const { return nCols; }
+ SCROW GetRows() const { return nRows; }
+ const ScPreviewColRowInfo* GetColInfo() const { return pColInfo; }
+ const ScPreviewColRowInfo* GetRowInfo() const { return pRowInfo; }
+
+ void SetTab( SCTAB nNewTab );
+ void SetColInfo( SCCOL nCount, ScPreviewColRowInfo* pNewInfo );
+ void SetRowInfo( SCROW nCount, ScPreviewColRowInfo* pNewInfo );
+ void LimitToArea( const Rectangle& rPixelArea );
+};
+
+
+class ScPreviewLocationData
+{
+ OutputDevice* pWindow;
+ ScDocument* pDoc;
+ MapMode aCellMapMode;
+ MapMode aDrawMapMode[SC_PREVIEW_MAXRANGES];
+ Rectangle aDrawRectangle[SC_PREVIEW_MAXRANGES];
+ sal_uInt8 aDrawRangeId[SC_PREVIEW_MAXRANGES];
+ USHORT nDrawRanges;
+ SCTAB nPrintTab;
+ List aEntries;
+
+//UNUSED2008-05 ScAddress GetCellFromRange( const Size& rOffsetPixel, const ScRange& rRange ) const;
+ Rectangle GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const;
+
+public:
+ ScPreviewLocationData( ScDocument* pDocument, OutputDevice* pWin );
+ ~ScPreviewLocationData();
+
+ void SetCellMapMode( const MapMode& rMapMode );
+ void SetPrintTab( SCTAB nNew );
+ void Clear();
+ void AddCellRange( const Rectangle& rRect, const ScRange& rRange, BOOL bRepCol, BOOL bRepRow,
+ const MapMode& rDrawMap );
+ void AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, BOOL bRepCol );
+ void AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, BOOL bRepRow );
+ void AddHeaderFooter( const Rectangle& rRect, BOOL bHeader, BOOL bLeft );
+ void AddNoteMark( const Rectangle& rRect, const ScAddress& rPos );
+ void AddNoteText( const Rectangle& rRect, const ScAddress& rPos );
+
+ SCTAB GetPrintTab() const { return nPrintTab; }
+
+ // Get info on visible columns/rows in the visible area
+ void GetTableInfo( const Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const;
+
+ USHORT GetDrawRanges() const { return nDrawRanges; }
+ void GetDrawRange( USHORT nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const;
+
+ BOOL GetHeaderPosition( Rectangle& rHeaderRect ) const;
+ BOOL GetFooterPosition( Rectangle& rFooterRect ) const;
+ BOOL IsHeaderLeft() const;
+ BOOL IsFooterLeft() const;
+
+ long GetNoteCountInRange( const Rectangle& rVisiblePixel, BOOL bNoteMarks ) const;
+ BOOL GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, BOOL bNoteMarks,
+ ScAddress& rCellPos, Rectangle& rNoteRect ) const;
+ Rectangle GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, BOOL bNoteMarks,
+ const ScAddress& aCellPos) const;
+
+ // Check if any cells (including column/row headers) are in the visible area
+ BOOL HasCellsInRange( const Rectangle& rVisiblePixel ) const;
+
+ BOOL GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const;
+
+ // returns the rectangle where the EditEngine draws the text of a Header Cell
+ // if bColHeader is true it returns the rectangle of the header of the column in rCellPos
+ // otherwise of the header of the row in rCellPos
+ Rectangle GetHeaderCellOutputRect(const Rectangle& rVisRect, const ScAddress& rCellPos, sal_Bool bColHeader) const;
+ Rectangle GetCellOutputRect(const ScAddress& rCellPos) const;
+
+ // Query the range and rectangle of the main (non-repeat) cell range.
+ // Returns FALSE if not contained.
+ BOOL GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const;
+};
+
+#endif
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
new file mode 100644
index 000000000000..7ff97f8d0152
--- /dev/null
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -0,0 +1,137 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PREVWSH_HXX
+#define SC_PREVWSH_HXX
+
+class ScrollBar;
+
+#include "address.hxx"
+#include <sfx2/viewfac.hxx>
+#include <sfx2/viewsh.hxx>
+#include <svx/zoomitem.hxx>
+
+#include "shellids.hxx"
+
+class ScDocument;
+class ScDocShell;
+class ScPreview;
+struct ScHeaderFieldData;
+class ScPreviewLocationData;
+class CommandEvent;
+
+//==================================================================
+
+
+class ScPreviewShell: public SfxViewShell
+{
+ ScDocShell* pDocShell;
+
+ ScPreview* pPreview; // Ausgabe-Fenster
+ ScrollBar* pHorScroll;
+ ScrollBar* pVerScroll;
+ Window* pCorner;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSourceData; // ViewData
+ BYTE nSourceDesignMode; // form design mode from TabView
+ SvxZoomType eZoom;
+ long nMaxVertPos;
+
+ SfxBroadcaster* pAccessibilityBroadcaster;
+
+private:
+ void Construct( Window* pParent );
+ DECL_LINK(ScrollHandler, ScrollBar* );
+ void DoScroll( USHORT nMode );
+
+protected:
+ virtual void Activate(BOOL bMDI);
+ virtual void Deactivate(BOOL bMDI);
+
+ virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize );
+
+ virtual void InnerResizePixel( const Point &rOfs, const Size &rSize );
+ virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
+
+ virtual Size GetOptimalSizePixel() const;
+
+ virtual String GetDescription() const;
+
+ virtual void WriteUserData(String &, BOOL bBrowse = FALSE);
+ virtual void ReadUserData(const String &, BOOL bBrowse = FALSE);
+
+ virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
+ virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
+
+public:
+ TYPEINFO();
+
+ SFX_DECL_INTERFACE(SCID_PREVIEW_SHELL)
+ SFX_DECL_VIEWFACTORY(ScPreviewShell);
+
+ ScPreviewShell( SfxViewFrame* pViewFrame,
+ SfxViewShell* pOldSh );
+
+ virtual ~ScPreviewShell();
+
+ void InitStartTable(SCTAB nTab);
+
+ void UpdateScrollBars();
+ BOOL ScrollCommand( const CommandEvent& rCEvt );
+
+ void Execute( SfxRequest& rReq );
+ void GetState( SfxItemSet& rSet );
+
+ void FillFieldData( ScHeaderFieldData& rData );
+
+ ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >
+ GetSourceData() const { return aSourceData; }
+ BYTE GetSourceDesignMode() const { return nSourceDesignMode; }
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
+ virtual USHORT SetPrinter( SfxPrinter* pNewPrinter, USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsAPI=false );
+ virtual PrintDialog* CreatePrintDialog( Window* pParent );
+ virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
+ virtual void PreparePrint( PrintDialog* pPrintDialog = NULL );
+ virtual ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent, BOOL bIsAPI );
+ virtual USHORT Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog = NULL );
+
+ void AddAccessibilityObject( SfxListener& rObject );
+ void RemoveAccessibilityObject( SfxListener& rObject );
+ void BroadcastAccessibility( const SfxHint &rHint );
+ BOOL HasAccessibilityObjects();
+
+ const ScPreviewLocationData& GetLocationData();
+ ScDocument* GetDocument();
+ ScPreview* GetPreview() { return pPreview; }
+};
+
+
+
+#endif
diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx
new file mode 100644
index 000000000000..e3966bdc3d37
--- /dev/null
+++ b/sc/source/ui/inc/printfun.hxx
@@ -0,0 +1,368 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PRINTFUN_HXX
+#define SC_PRINTFUN_HXX
+
+
+#include "pagepar.hxx"
+#include "editutil.hxx"
+
+#ifndef _PRINT_HXX //autogen
+#include <vcl/print.hxx>
+#endif
+
+class SfxPrinter;
+class SfxProgress;
+class ScDocShell;
+class ScDocument;
+class ScViewData;
+class SfxItemSet;
+class ScPageHFItem;
+class EditTextObject;
+class MultiSelection;
+class ScHeaderEditEngine;
+class ScPageBreakData;
+class ScPreviewLocationData;
+class ScPrintOptions;
+class SvxBoxItem;
+class SvxBrushItem;
+class SvxShadowItem;
+class FmFormView;
+
+#define RANGENO_NORANGE USHRT_MAX
+
+#define PRINT_HEADER_WIDTH (1.0 * TWIPS_PER_CM)
+#define PRINT_HEADER_HEIGHT (12.8 * TWIPS_PER_POINT)
+#define PRINT_HEADER_FONTHEIGHT 200
+
+
+ // Einstellungen fuer Kopf-/Fusszeilen
+struct ScPrintHFParam
+{
+ BOOL bEnable;
+ BOOL bDynamic;
+ BOOL bShared;
+ long nHeight; // insgesamt (Hoehe+Abstand+Rahmen)
+ long nManHeight; // eingestellte Groesse (Min. bei dynamisch)
+ USHORT nDistance;
+ USHORT nLeft; // Raender
+ USHORT nRight;
+ const ScPageHFItem* pLeft;
+ const ScPageHFItem* pRight;
+ const SvxBoxItem* pBorder;
+ const SvxBrushItem* pBack;
+ const SvxShadowItem* pShadow;
+};
+
+
+// "Ersatz" fuer SV-JobSetup:
+
+class ScJobSetup
+{
+public:
+ ScJobSetup( SfxPrinter* pPrinter );
+
+ Size aUserSize;
+ MapMode aUserMapMode;
+ Paper ePaper;
+ Orientation eOrientation;
+ USHORT nPaperBin;
+};
+
+struct ScPrintState // Variablen aus ScPrintFunc retten
+{
+ SCTAB nPrintTab;
+ SCCOL nStartCol;
+ SCROW nStartRow;
+ SCCOL nEndCol;
+ SCROW nEndRow;
+ USHORT nZoom;
+ size_t nPagesX;
+ size_t nPagesY;
+ long nTabPages;
+ long nTotalPages;
+ long nPageStart;
+ long nDocPages;
+};
+
+class ScPageRowEntry
+{
+private:
+ SCROW nStartRow;
+ SCROW nEndRow;
+ size_t nPagesX;
+ BOOL* pHidden;
+ //! Anzahl wirklich sichtbarer cachen???
+
+public:
+ ScPageRowEntry() { nStartRow = nEndRow = 0; nPagesX = 0; pHidden = NULL; }
+ ~ScPageRowEntry() { delete[] pHidden; }
+
+ ScPageRowEntry(const ScPageRowEntry& r);
+ const ScPageRowEntry& operator=(const ScPageRowEntry& r);
+
+ SCROW GetStartRow() const { return nStartRow; }
+ SCROW GetEndRow() const { return nEndRow; }
+ size_t GetPagesX() const { return nPagesX; }
+ void SetStartRow(SCROW n) { nStartRow = n; }
+ void SetEndRow(SCROW n) { nEndRow = n; }
+
+ void SetPagesX(size_t nNew);
+ void SetHidden(size_t nX);
+ BOOL IsHidden(size_t nX) const;
+
+ size_t CountVisible() const;
+};
+
+class ScPrintFunc
+{
+private:
+ ScDocShell* pDocShell;
+ ScDocument* pDoc;
+ SfxPrinter* pPrinter;
+ OutputDevice* pDev;
+ FmFormView* pDrawView;
+
+ MapMode aOldPrinterMode; // MapMode vor dem Aufruf
+
+ Point aSrcOffset; // Papier-1/100 mm
+ Point aOffset; // mit Faktor aus Seitenformat skaliert
+ USHORT nManualZoom; // Zoom in Preview (Prozent)
+ BOOL bClearWin; // Ausgabe vorher loeschen
+ BOOL bUseStyleColor;
+ BOOL bIsRender;
+
+ SCTAB nPrintTab;
+ long nPageStart; // Offset fuer erste Seite
+ long nDocPages; // Seiten im Dokument
+
+ const ScRange* pUserArea; // Selektion, wenn im Dialog eingestellt
+
+ const SfxItemSet* pParamSet; // eingestellte Vorlage
+ BOOL bState; // aus State-struct erzeugt
+
+ // Parameter aus Vorlage:
+ USHORT nLeftMargin;
+ USHORT nTopMargin;
+ USHORT nRightMargin;
+ USHORT nBottomMargin;
+ BOOL bCenterHor;
+ BOOL bCenterVer;
+ BOOL bLandscape;
+ BOOL bSourceRangeValid;
+
+ USHORT nPageUsage;
+ Size aPageSize; // Drucker-Twips
+ const SvxBoxItem* pBorderItem;
+ const SvxBrushItem* pBackgroundItem;
+ const SvxShadowItem* pShadowItem;
+
+ ScRange aLastSourceRange;
+ ScPrintHFParam aHdr;
+ ScPrintHFParam aFtr;
+ ScPageTableParam aTableParam;
+ ScPageAreaParam aAreaParam;
+
+ // berechnete Werte:
+ USHORT nZoom;
+ BOOL bPrintCurrentTable;
+ BOOL bMultiArea;
+ long nTabPages;
+ long nTotalPages;
+
+ Rectangle aPageRect; // Dokument-Twips
+
+ MapMode aLogicMode; // in DoPrint gesetzt
+ MapMode aOffsetMode;
+ MapMode aTwipMode;
+ double nScaleX;
+ double nScaleY;
+
+ SCCOL nRepeatStartCol;
+ SCCOL nRepeatEndCol;
+ SCROW nRepeatStartRow;
+ SCROW nRepeatEndRow;
+
+ SCCOL nStartCol;
+ SCROW nStartRow;
+ SCCOL nEndCol;
+ SCROW nEndRow;
+
+ SCCOL* pPageEndX; // Seitenaufteilung
+ SCROW* pPageEndY;
+ ScPageRowEntry* pPageRows;
+ size_t nPagesX;
+ size_t nPagesY;
+ size_t nTotalY;
+
+ ScHeaderEditEngine* pEditEngine;
+ SfxItemSet* pEditDefaults;
+
+ ScHeaderFieldData aFieldData;
+
+ List aNotePosList; // Reihenfolge der Notizen
+
+ ScPageBreakData* pPageData; // zum Eintragen der Umbrueche etc.
+
+public:
+ ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTab,
+ long nPage = 0, long nDocP = 0,
+ const ScRange* pArea = NULL,
+ const ScPrintOptions* pOptions = NULL,
+ ScPageBreakData* pData = NULL );
+
+ // ctors for device other than printer - for preview and pdf:
+
+ ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
+ long nPage = 0, long nDocP = 0,
+ const ScRange* pArea = NULL,
+ const ScPrintOptions* pOptions = NULL );
+
+ ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
+ const ScPrintState& rState,
+ const ScPrintOptions* pOptions );
+
+ ScPrintFunc( ScDocShell* pShell, Window* pWindow, SCTAB nTab,
+ long nPage = 0, long nDocP = 0,
+ const ScRange* pArea = NULL,
+ const ScPrintOptions* pOptions = NULL );
+
+ ScPrintFunc( ScDocShell* pShell, Window* pWindow,
+ const ScPrintState& rState,
+ const ScPrintOptions* pOptions );
+ ~ScPrintFunc();
+
+ static void DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double nPrintFactor,
+ const Rectangle& rBound, ScViewData* pViewData, BOOL bMetaFile );
+
+ void SetDrawView( FmFormView* pNew );
+
+ void SetOffset( const Point& rOfs );
+ void SetManualZoom( USHORT nNewZoom );
+ void SetDateTime( const Date& rDate, const Time& rTime );
+
+ void SetClearFlag( BOOL bFlag );
+ void SetUseStyleColor( BOOL bFlag );
+ void SetRenderFlag( BOOL bFlag );
+
+ void SetExclusivelyDrawOleAndDrawObjects();//for printing selected objects without surrounding cell contents
+
+ BOOL UpdatePages();
+
+ void ApplyPrintSettings(); // aus DoPrint() schon gerufen
+ long DoPrint( const MultiSelection& rPageRanges,
+ /*long nStartPage, long nDisplayStart, BOOL bDoPrint,
+ SfxProgress* pProgress, ScPreviewLocationData* pLocationData );*/
+ long nStartPage, long nDisplayStart, BOOL bDoPrint = TRUE,
+ SfxProgress* pProgress = NULL, ScPreviewLocationData* pLocationData = NULL);
+
+ // Werte abfragen - sofort
+
+ Size GetPageSize() const { return aPageSize; }
+ Size GetDataSize() const;
+ void GetScaleData( Size& rPhysSize, long& rDocHdr, long& rDocFtr );
+ long GetFirstPageNo() const { return aTableParam.nFirstPageNo; }
+
+ // letzte Werte abfragen - nach DoPrint !!!
+
+ double GetScaleX() const { return nScaleX; }
+ double GetScaleY() const { return nScaleY; }
+ long GetTotalPages() const { return nTotalPages; }
+ USHORT GetZoom() const { return nZoom; }
+
+ void ResetBreaks( SCTAB nTab );
+
+ void GetPrintState( ScPrintState& rState );
+ BOOL GetLastSourceRange( ScRange& rRange ) const;
+ USHORT GetLeftMargin() const{return nLeftMargin;}
+ USHORT GetRightMargin() const{return nRightMargin;}
+ USHORT GetTopMargin() const{return nTopMargin;}
+ USHORT GetBottomMargin() const{return nBottomMargin;}
+ void SetLeftMargin(USHORT nRulerLeftDistance){ nLeftMargin = nRulerLeftDistance; }
+ void SetRightMargin(USHORT nRulerRightDistance){ nRightMargin = nRulerRightDistance; }
+ void SetTopMargin(USHORT nRulerTopDistance){ nTopMargin = nRulerTopDistance; }
+ void SetBottomMargin(USHORT nRulerBottomDistance){ nBottomMargin = nRulerBottomDistance; }
+ ScPrintHFParam GetHeader(){return aHdr;}
+ ScPrintHFParam GetFooter(){return aFtr;}
+
+private:
+ void Construct( const ScPrintOptions* pOptions );
+ void InitParam( const ScPrintOptions* pOptions );
+ void CalcZoom( USHORT nRangeNo );
+ void CalcPages();
+ long CountPages();
+ long CountNotePages();
+
+ BOOL AdjustPrintArea( BOOL bNew );
+
+ Size GetDocPageSize();
+
+ long TextHeight( const EditTextObject* pObject );
+ void MakeEditEngine();
+ void UpdateHFHeight( ScPrintHFParam& rParam );
+
+ void InitModes();
+
+ BOOL IsLeft( long nPageNo );
+ BOOL IsMirror( long nPageNo );
+ void ReplaceFields( long nPageNo ); // aendert Text in pEditEngine
+ void MakeTableString(); // setzt aTableStr
+
+ void PrintPage( long nPageNo,
+ SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
+ BOOL bDoPrint, ScPreviewLocationData* pLocationData );
+ void PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
+ long nScrX, long nScrY,
+ BOOL bShLeft, BOOL bShTop, BOOL bShRight, BOOL bShBottom );
+ void LocateArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
+ long nScrX, long nScrY, BOOL bRepCol, BOOL bRepRow,
+ ScPreviewLocationData& rLocationData );
+ void PrintColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY );
+ void PrintRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY );
+ void LocateColHdr( SCCOL nX1, SCCOL nX2, long nScrX, long nScrY,
+ BOOL bRepCol, ScPreviewLocationData& rLocationData );
+ void LocateRowHdr( SCROW nY1, SCROW nY2, long nScrX, long nScrY,
+ BOOL bRepRow, ScPreviewLocationData& rLocationData );
+ void PrintHF( long nPageNo, BOOL bHeader, long nStartY,
+ BOOL bDoPrint, ScPreviewLocationData* pLocationData );
+
+ long PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData );
+ long DoNotes( long nNoteStart, BOOL bDoPrint, ScPreviewLocationData* pLocationData );
+
+ void DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
+ const SvxBoxItem* pBorderData,
+ const SvxBrushItem* pBackground,
+ const SvxShadowItem* pShadow );
+
+ void FillPageData();
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/privsplt.hxx b/sc/source/ui/inc/privsplt.hxx
new file mode 100644
index 000000000000..6194a4342849
--- /dev/null
+++ b/sc/source/ui/inc/privsplt.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PRIVSPLT_HXX
+#define SC_PRIVSPLT_HXX
+
+#include <vcl/ctrl.hxx>
+
+enum SC_SPLIT_DIRECTION {SC_SPLIT_HORZ,SC_SPLIT_VERT };
+
+class ScPrivatSplit : public Control
+{
+ private:
+
+ Link aCtrModifiedLink;
+ BOOL aMovingFlag;
+ Pointer aWinPointer;
+ SC_SPLIT_DIRECTION eScSplit;
+ short nOldX;
+ short nOldY;
+ short nNewX;
+ short nNewY;
+ short nMinPos;
+ short nMaxPos;
+ Range aXMovingRange;
+ Range aYMovingRange;
+ short nDeltaX;
+ short nDeltaY;
+
+ using Control::ImplInitSettings;
+ void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+
+
+
+ protected:
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt);
+
+ public:
+
+ ScPrivatSplit( Window* pWindow, const ResId& rResId,
+ SC_SPLIT_DIRECTION eScSplit);
+
+ virtual short GetDeltaX();
+ virtual short GetDeltaY();
+
+ virtual void CtrModified();
+
+ void SetYRange(Range cRgeY);
+
+ void MoveSplitTo(Point aPos);
+
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ void SetCtrModifiedHdl( const Link& rLink ) { aCtrModifiedLink = rLink; }
+ const Link& GetCtrModifiedHdl() const { return aCtrModifiedLink; }
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/protectiondlg.hrc b/sc/source/ui/inc/protectiondlg.hrc
new file mode 100644
index 000000000000..52e57040922c
--- /dev/null
+++ b/sc/source/ui/inc/protectiondlg.hrc
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <sc.hrc>
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_HELP 3
+
+#define BTN_PROTECT 4
+#define FT_PASSWORD1 5
+#define ED_PASSWORD1 6
+#define FT_PASSWORD2 7
+#define ED_PASSWORD2 8
+#define FL_OPTIONS 9
+#define FT_OPTIONS 10
+#define CLB_OPTIONS 11
+
+#define ST_SELECT_LOCKED_CELLS 50
+#define ST_SELECT_UNLOCKED_CELLS 51
diff --git a/sc/source/ui/inc/protectiondlg.hxx b/sc/source/ui/inc/protectiondlg.hxx
new file mode 100644
index 000000000000..d7d555ff5ac5
--- /dev/null
+++ b/sc/source/ui/inc/protectiondlg.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UI_PROTECTION_DLG_HXX
+#define SC_UI_PROTECTION_DLG_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/edit.hxx>
+#include <svx/checklbx.hxx>
+
+class Window;
+class ScTableProtection;
+
+class ScTableProtectionDlg : public ModalDialog
+{
+public:
+ explicit ScTableProtectionDlg(Window* pParent);
+ virtual ~ScTableProtectionDlg();
+
+ virtual short Execute();
+
+ void SetDialogData(const ScTableProtection& rData);
+
+ void WriteData(ScTableProtection& rData) const;
+
+private:
+ ScTableProtectionDlg(); // disabled
+
+ void Init();
+
+ void EnableOptionalWidgets(bool bEnable = true);
+
+ CheckBox maBtnProtect;
+
+ FixedText maPassword1Text;
+ Edit maPassword1Edit;
+ FixedText maPassword2Text;
+ Edit maPassword2Edit;
+
+ FixedLine maOptionsLine;
+ FixedText maOptionsText;
+ SvxCheckListBox maOptionsListBox;
+
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+
+ String maSelectLockedCells;
+ String maSelectUnlockedCells;
+
+ DECL_LINK( OKHdl, OKButton* );
+ DECL_LINK( CheckBoxHdl, CheckBox* );
+ DECL_LINK( PasswordModifyHdl, Edit* );
+};
+
+#endif
diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx
new file mode 100644
index 000000000000..ef245ebf26cf
--- /dev/null
+++ b/sc/source/ui/inc/pvfundlg.hxx
@@ -0,0 +1,244 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PVFUNDLG_HXX
+#define SC_PVFUNDLG_HXX
+
+#include <com/sun/star/sheet/DataPilotFieldReference.hpp>
+#include <com/sun/star/sheet/DataPilotFieldSortInfo.hpp>
+
+#ifndef _FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _LSTBOX_HXX
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _DIALOG_HXX
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef _MOREBTN_HXX
+#include <vcl/morebtn.hxx>
+#endif
+#include <vcl/field.hxx>
+#include <svtools/stdctrl.hxx>
+#include <svx/checklbx.hxx>
+#include <sfx2/itemconnect.hxx>
+#include "pivot.hxx"
+
+#include <hash_map>
+
+// ============================================================================
+
+typedef sfx::ListBoxWrapper< sal_Int32 > ScDPListBoxWrapper;
+
+class ScDPObject;
+
+// ============================================================================
+
+class ScDPFunctionListBox : public MultiListBox
+{
+public:
+ explicit ScDPFunctionListBox( Window* pParent, const ResId& rResId );
+
+ void SetSelection( USHORT nFuncMask );
+ USHORT GetSelection() const;
+
+private:
+ void FillFunctionNames();
+};
+
+// ============================================================================
+
+class ScDPFunctionDlg : public ModalDialog
+{
+public:
+ explicit ScDPFunctionDlg( Window* pParent, const ScDPLabelDataVec& rLabelVec,
+ const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData );
+
+ USHORT GetFuncMask() const;
+ ::com::sun::star::sheet::DataPilotFieldReference GetFieldRef() const;
+
+private:
+ void Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData );
+
+ DECL_LINK( SelectHdl, ListBox* );
+ DECL_LINK( DblClickHdl, MultiListBox* );
+
+private:
+ FixedLine maFlFunc;
+ ScDPFunctionListBox maLbFunc;
+ FixedText maFtNameLabel;
+ FixedInfo maFtName;
+ FixedLine maFlDisplay;
+ FixedText maFtType;
+ ListBox maLbType;
+ FixedText maFtBaseField;
+ ListBox maLbBaseField;
+ FixedText maFtBaseItem;
+ ListBox maLbBaseItem;
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+ MoreButton maBtnMore;
+
+ ScDPListBoxWrapper maLbTypeWrp; /// Wrapper for direct usage of API constants.
+
+ const ScDPLabelDataVec& mrLabelVec; /// Data of all labels.
+ bool mbEmptyItem; /// true = Empty base item in listbox.
+};
+
+// ============================================================================
+
+class ScDPSubtotalDlg : public ModalDialog
+{
+public:
+ explicit ScDPSubtotalDlg( Window* pParent, ScDPObject& rDPObj,
+ const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData,
+ const ScDPNameVec& rDataFields, bool bEnableLayout );
+
+ USHORT GetFuncMask() const;
+
+ void FillLabelData( ScDPLabelData& rLabelData ) const;
+
+private:
+ void Init( const ScDPLabelData& rLabelData, const ScDPFuncData& rFuncData );
+
+ DECL_LINK( DblClickHdl, MultiListBox* );
+ DECL_LINK( RadioClickHdl, RadioButton* );
+ DECL_LINK( ClickHdl, PushButton* );
+
+private:
+ FixedLine maFlSubt;
+ RadioButton maRbNone;
+ RadioButton maRbAuto;
+ RadioButton maRbUser;
+ ScDPFunctionListBox maLbFunc;
+ FixedText maFtNameLabel;
+ FixedInfo maFtName;
+ CheckBox maCbShowAll;
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+ PushButton maBtnOptions;
+
+ ScDPObject& mrDPObj; /// The DataPilot object (for member names).
+ const ScDPNameVec& mrDataFields; /// The list of all data field names.
+
+ ScDPLabelData maLabelData; /// Cache for sub dialog.
+ bool mbEnableLayout; /// true = Enable Layout mode controls.
+};
+
+// ============================================================================
+
+class ScDPSubtotalOptDlg : public ModalDialog
+{
+public:
+ explicit ScDPSubtotalOptDlg( Window* pParent, ScDPObject& rDPObj,
+ const ScDPLabelData& rLabelData, const ScDPNameVec& rDataFields,
+ bool bEnableLayout );
+
+ void FillLabelData( ScDPLabelData& rLabelData ) const;
+
+private:
+ void Init( const ScDPNameVec& rDataFields, bool bEnableLayout );
+ void InitHideListBox();
+
+ DECL_LINK( RadioClickHdl, RadioButton* );
+ DECL_LINK( CheckHdl, CheckBox* );
+ DECL_LINK( SelectHdl, ListBox* );
+
+private:
+ FixedLine maFlSortBy;
+ ListBox maLbSortBy;
+ RadioButton maRbSortAsc;
+ RadioButton maRbSortDesc;
+ RadioButton maRbSortMan;
+ FixedLine maFlLayout;
+ FixedText maFtLayout;
+ ListBox maLbLayout;
+ CheckBox maCbLayoutEmpty;
+ FixedLine maFlAutoShow;
+ CheckBox maCbShow;
+ NumericField maNfShow;
+ FixedText maFtShow;
+ FixedText maFtShowFrom;
+ ListBox maLbShowFrom;
+ FixedText maFtShowUsing;
+ ListBox maLbShowUsing;
+ FixedLine maFlHide;
+ SvxCheckListBox maLbHide;
+ FixedText maFtHierarchy;
+ ListBox maLbHierarchy;
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+
+ ScDPListBoxWrapper maLbLayoutWrp; /// Wrapper for direct usage of API constants.
+ ScDPListBoxWrapper maLbShowFromWrp; /// Wrapper for direct usage of API constants.
+
+ ScDPObject& mrDPObj; /// The DataPilot object (for member names).
+ ScDPLabelData maLabelData; /// Cache for members data.
+};
+
+// ============================================================================
+
+class ScDPShowDetailDlg : public ModalDialog
+{
+public:
+ explicit ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHORT nOrient );
+
+ virtual short Execute();
+
+ /**
+ * @return String internal name of the selected field. Note that this may
+ * be different from the name displayed in the dialog if the field
+ * has a layout name.
+ */
+ String GetDimensionName() const;
+
+private:
+ DECL_LINK( DblClickHdl, ListBox* );
+
+private:
+ FixedText maFtDims;
+ ListBox maLbDims;
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+
+ typedef ::std::hash_map<String, long, ScStringHashCode> DimNameIndexMap;
+ DimNameIndexMap maNameIndexMap;
+ ScDPObject& mrDPObj;
+};
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx
new file mode 100644
index 000000000000..e16c3266510e
--- /dev/null
+++ b/sc/source/ui/inc/pvlaydlg.hxx
@@ -0,0 +1,239 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_PVLAYDLG_HXX
+#define SC_PVLAYDLG_HXX
+
+#include <vector>
+#include <memory>
+#include <boost/shared_ptr.hpp>
+
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _SCRBAR_HXX //autogen
+#include <vcl/scrbar.hxx>
+#endif
+#include <svtools/stdctrl.hxx>
+#ifndef _MOREBTN_HXX //autogen
+#include <vcl/morebtn.hxx>
+#endif
+#include "pivot.hxx"
+#include "anyrefdg.hxx"
+#include "fieldwnd.hxx"
+#include "formula/funcutl.hxx"
+
+/*==========================================================================*\
+
+ Eine Instanz der Klasse ScPivotLayoutDlg ist ein (semi-)modaler
+ Dialog, in dem mit der Maus Felder mit Spaltenueberschriften den
+ drei Pivot-Kategorien "Spalte", "Zeile" und "Daten" zugeordnet
+ werden koennen.
+
+ Der Dialog erhaelt in der Struktur LabelData Informationen ueber
+ diese Ueberschriften (Name, Art (Zahl/String) und Funktionsmaske).
+ Weiterhin werden drei PivotFeld-Arrays uebergeben, mit denen die
+ drei Kategorie-Fenster initialisiert werden. Ein Kategorie-Fenster
+ wird durch eine Instanz der Klasse FieldWindow dargestellt. Ein
+ solches Fenster ist fuer die Darstellung der Datenstrukturen am
+ Schirm zustaendig. Es meldet Mausaktionen an den Dialog weiter und
+ bietet entsprechende Methoden zur Veraenderung der Darstellung.
+ Der Dialog sorgt fuer den Abgleich der interenen Datenstrukturen mit
+ der Bildschirmdarstellung. Ein weiteres FieldWindow (Select) bietet
+ alle Tabellenueberschriften zur Auswahl an, ist also "read-only".
+
+\*==========================================================================*/
+
+//============================================================================
+
+class ScViewData;
+class ScDocument;
+class ScRangeData;
+struct ScDPFuncData;
+class ScDPObject;
+
+//============================================================================
+
+#define FUNC_COUNT 11
+
+class ScDPLayoutDlg : public ScAnyRefDlg
+{
+public:
+ ScDPLayoutDlg(
+ SfxBindings* pB,
+ SfxChildWindow* pCW,
+ Window* pParent,
+ const ScDPObject& rDPObject );
+ virtual ~ScDPLayoutDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+ virtual BOOL IsRefInputMode() const { return bRefInputMode; }
+ virtual void SetActive();
+ virtual BOOL Close();
+ virtual void StateChanged( StateChangedType nStateChange );
+
+ void NotifyDoubleClick ( ScDPFieldType eType, size_t nFieldIndex );
+ PointerStyle NotifyMouseButtonDown( ScDPFieldType eType, size_t nFieldIndex );
+ void NotifyMouseButtonUp ( const Point& rAt );
+ PointerStyle NotifyMouseMove ( const Point& rAt );
+ void NotifyFieldFocus ( ScDPFieldType eType, BOOL bGotFocus );
+ void NotifyMoveField ( ScDPFieldType eToType );
+ void NotifyRemoveField ( ScDPFieldType eType, size_t nFieldIndex );
+ BOOL NotifyMoveSlider ( USHORT nKeyCode ); // return TRUE, if position changed
+
+protected:
+ virtual void Deactivate();
+
+private:
+ typedef boost::shared_ptr< ScDPFuncData > ScDPFuncDataRef;
+ typedef std::vector< ScDPFuncDataRef > ScDPFuncDataVec;
+ typedef std::auto_ptr< ScDPObject > ScDPObjectPtr;
+
+ FixedLine aFlLayout;
+ FixedText aFtPage;
+ ScDPFieldWindow aWndPage;
+ FixedText aFtCol;
+ ScDPFieldWindow aWndCol;
+ FixedText aFtRow;
+ ScDPFieldWindow aWndRow;
+ FixedText aFtData;
+ ScDPFieldWindow aWndData;
+ ScDPFieldWindow aWndSelect;
+ ScrollBar aSlider;
+ FixedInfo aFtInfo;
+
+ FixedLine aFlAreas;
+
+ // DP source selection
+ FixedText aFtInArea;
+ ::formula::RefEdit aEdInPos;
+ ::formula::RefButton aRbInPos;
+
+ // DP output location
+ ListBox aLbOutPos;
+ FixedText aFtOutArea;
+ formula::RefEdit aEdOutPos;
+ formula::RefButton aRbOutPos;
+
+ CheckBox aBtnIgnEmptyRows;
+ CheckBox aBtnDetectCat;
+ CheckBox aBtnTotalCol;
+ CheckBox aBtnTotalRow;
+ CheckBox aBtnFilter;
+ CheckBox aBtnDrillDown;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ PushButton aBtnRemove;
+ PushButton aBtnOptions;
+ MoreButton aBtnMore;
+
+ const String aStrUndefined;
+ const String aStrNewTable;
+ std::vector< String > aFuncNameArr;
+
+ ScDPFieldType eDnDFromType;
+ size_t nDnDFromIndex;
+ BOOL bIsDrag;
+
+ ::formula::RefEdit* pEditActive;
+
+ Rectangle aRectPage;
+ Rectangle aRectRow;
+ Rectangle aRectCol;
+ Rectangle aRectData;
+ Rectangle aRectSelect;
+
+ ScDPLabelDataVec aLabelDataArr; // (nCol, Feldname, Zahl/Text)
+
+ ScDPFieldType eLastActiveType; /// Type of last active area.
+ size_t nOffset; /// Offset of first field in TYPE_SELECT area.
+
+ ScDPFuncDataVec aSelectArr;
+ ScDPFuncDataVec aPageArr;
+ ScDPFuncDataVec aColArr;
+ ScDPFuncDataVec aRowArr;
+ ScDPFuncDataVec aDataArr;
+
+ ScDPObjectPtr xDlgDPObject;
+ ScRange aOldRange;
+ ScPivotParam thePivotData;
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ BOOL bRefInputMode;
+
+private:
+ ScDPFieldWindow& GetFieldWindow ( ScDPFieldType eType );
+ void Init ();
+ void InitWndSelect ( const ::std::vector<ScDPLabelDataRef>& rLabels );
+ void InitWnd ( PivotField* pArr, long nCount, ScDPFieldType eType );
+ void InitFocus ();
+ void InitFields ();
+ void CalcWndSizes ();
+ Point DlgPos2WndPos ( const Point& rPt, Window& rWnd );
+ ScDPLabelData* GetLabelData ( SCsCOL nCol, size_t* pPos = NULL );
+ String GetLabelString ( SCsCOL nCol );
+ bool IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType );
+ String GetFuncString ( USHORT& rFuncMask, BOOL bIsValue = TRUE );
+ BOOL Contains ( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt );
+ void Remove ( ScDPFuncDataVec* pArr, size_t nAt );
+ void Insert ( ScDPFuncDataVec* pArr, const ScDPFuncData& rFData, size_t nAt );
+
+ void AddField ( size_t nFromIndex,
+ ScDPFieldType eToType, const Point& rAtPos );
+ void MoveField ( ScDPFieldType eFromType, size_t nFromIndex,
+ ScDPFieldType eToType, const Point& rAtPos );
+ void RemoveField ( ScDPFieldType eRemType, size_t nRemIndex );
+
+ BOOL GetPivotArrays ( PivotField* pPageArr,
+ PivotField* pColArr,
+ PivotField* pRowArr,
+ PivotField* pDataArr,
+ USHORT& rPageCount,
+ USHORT& rColCount,
+ USHORT& rRowCount,
+ USHORT& rDataCount );
+
+ void UpdateSrcRange();
+
+ // Handler
+ DECL_LINK( ClickHdl, PushButton * );
+ DECL_LINK( ScrollHdl, ScrollBar * );
+ DECL_LINK( SelAreaHdl, ListBox * );
+ DECL_LINK( MoreClickHdl, MoreButton * );
+ DECL_LINK( EdModifyHdl, Edit * );
+ DECL_LINK( EdInModifyHdl, Edit * );
+ DECL_LINK( OkHdl, OKButton * );
+ DECL_LINK( CancelHdl, CancelButton * );
+ DECL_LINK( GetFocusHdl, Control* );
+};
+
+
+
+#endif // SC_PVLAYDLG_HXX
+
diff --git a/sc/source/ui/inc/redcom.hxx b/sc/source/ui/inc/redcom.hxx
new file mode 100644
index 000000000000..e7e064359349
--- /dev/null
+++ b/sc/source/ui/inc/redcom.hxx
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_REDCOM_HXX
+#define SC_REDCOM_HXX
+
+//CHINA001 #ifndef _SVX_POSTDLG_HXX //autogen
+//CHINA001 #include <svx/postdlg.hxx>
+//CHINA001 #endif
+
+#include "chgtrack.hxx"
+
+class ScDocShell;
+class AbstractSvxPostItDialog; //CHINA001
+
+class ScRedComDialog
+{
+private:
+
+ ScChangeAction *pChangeAction;
+ ScDocShell *pDocShell;
+ String aComment;
+ AbstractSvxPostItDialog* pDlg;
+
+ DECL_LINK( PrevHdl, AbstractSvxPostItDialog* );
+ DECL_LINK( NextHdl, AbstractSvxPostItDialog* );
+
+protected:
+
+ void ReInit(ScChangeAction *);
+ void SelectCell();
+
+ ScChangeAction *FindPrev(ScChangeAction *pAction);
+ ScChangeAction *FindNext(ScChangeAction *pAction);
+
+public:
+
+ ScRedComDialog( Window* pParent, const SfxItemSet& rCoreSet,
+ ScDocShell *,ScChangeAction *,BOOL bPrevNext = FALSE);
+ ~ScRedComDialog();
+
+ short Execute();
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
new file mode 100644
index 000000000000..617d7c0a669a
--- /dev/null
+++ b/sc/source/ui/inc/reffact.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_REFFACT_HXX
+#define SC_REFFACT_HXX
+
+#include <sfx2/childwin.hxx>
+
+#include "dbfunc.hxx"
+
+#define DECL_WRAPPER(Class) \
+ class Class : public SfxChildWindow \
+ { \
+ public: \
+ Class( Window*, USHORT, SfxBindings*, SfxChildWinInfo* ); \
+ SFX_DECL_CHILDWINDOW(Class); \
+ };
+
+
+//==================================================================
+
+DECL_WRAPPER(ScNameDlgWrapper)
+DECL_WRAPPER(ScSolverDlgWrapper)
+DECL_WRAPPER(ScOptSolverDlgWrapper)
+DECL_WRAPPER(ScPivotLayoutWrapper)
+DECL_WRAPPER(ScTabOpDlgWrapper)
+DECL_WRAPPER(ScFilterDlgWrapper)
+DECL_WRAPPER(ScSpecialFilterDlgWrapper)
+DECL_WRAPPER(ScDbNameDlgWrapper)
+DECL_WRAPPER(ScConsolidateDlgWrapper)
+DECL_WRAPPER(ScPrintAreasDlgWrapper)
+DECL_WRAPPER(ScCondFormatDlgWrapper)
+DECL_WRAPPER(ScColRowNameRangesDlgWrapper)
+DECL_WRAPPER(ScFormulaDlgWrapper)
+DECL_WRAPPER(ScHighlightChgDlgWrapper)
+
+/*!!! dafuer muss der Funktionsautopilot noch umgebaut werden
+DECL_WRAPPER(ScFunctionDlgWrapper)
+DECL_WRAPPER(ScEditFunctionDlgWrapper)
+DECL_WRAPPER(ScArgumentDlgWrapper)
+*/
+
+class ScAcceptChgDlgWrapper: public SfxChildWindow
+{
+ public:
+ ScAcceptChgDlgWrapper( Window*,
+ USHORT,
+ SfxBindings*,
+ SfxChildWinInfo* );
+
+ SFX_DECL_CHILDWINDOW(Class);
+
+ virtual void ReInitDlg();
+};
+
+class ScSimpleRefDlgWrapper: public SfxChildWindow
+{
+ public:
+ ScSimpleRefDlgWrapper( Window*,
+ USHORT,
+ SfxBindings*,
+ SfxChildWinInfo* );
+
+ SFX_DECL_CHILDWINDOW(Class);
+
+ static void SetDefaultPosSize(Point aPos, Size aSize, BOOL bSet=TRUE);
+ virtual String GetRefString();
+ virtual void SetRefString(const String& rStr);
+ void SetCloseHdl( const Link& rLink );
+ void SetUnoLinks( const Link& rDone, const Link& rAbort,
+ const Link& rChange );
+ void SetFlags( BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection );
+ static void SetAutoReOpen(BOOL bFlag);
+
+ void StartRefInput();
+};
+
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+class SC_DLLPUBLIC ScValidityRefChildWin : public SfxChildWindow
+{
+ bool m_bVisibleLock:1;
+ bool m_bFreeWindowLock:1;
+ Window * m_pSavedWndParent;
+public:
+ ScValidityRefChildWin( Window*, USHORT, SfxBindings*, SfxChildWinInfo* );
+ SFX_DECL_CHILDWINDOW(ScValidityRefChildWin);
+ ~ScValidityRefChildWin();
+ bool LockVisible( bool bLock ){ bool bVis = m_bVisibleLock; m_bVisibleLock = bLock; return bVis; }
+ bool LockFreeWindow( bool bLock ){ bool bFreeWindow = m_bFreeWindowLock; m_bFreeWindowLock = bLock; return bFreeWindow; }
+ void Hide(){ if( !m_bVisibleLock) SfxChildWindow::Hide(); }
+ void Show( USHORT nFlags ){ if( !m_bVisibleLock ) SfxChildWindow::Show( nFlags ); }
+};
+//-->Added by PengYunQuan for Validity Cell Range Picker
+
+//==================================================================
+
+
+#endif // SC_REFFACT_HXX
diff --git a/sc/source/ui/inc/refundo.hxx b/sc/source/ui/inc/refundo.hxx
new file mode 100644
index 000000000000..87b5330e0f96
--- /dev/null
+++ b/sc/source/ui/inc/refundo.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_REFUNDO_HXX
+#define SC_REFUNDO_HXX
+
+#include <tools/solar.h>
+
+class ScDocument;
+class ScDBCollection;
+class ScRangeName;
+class ScPrintRangeSaver;
+class ScDPCollection;
+class ScChartCollection;
+class ScConditionalFormatList;
+class ScDetOpList;
+class ScChartListenerCollection;
+class ScAreaLinkSaveCollection;
+class ScUnoRefList;
+
+class ScRefUndoData
+{
+private:
+ ScDBCollection* pDBCollection;
+ ScRangeName* pRangeName;
+ ScPrintRangeSaver* pPrintRanges;
+ ScDPCollection* pDPCollection;
+ ScConditionalFormatList* pCondFormList;
+ ScDetOpList* pDetOpList;
+ ScChartListenerCollection* pChartListenerCollection;
+ ScAreaLinkSaveCollection* pAreaLinks;
+ ScUnoRefList* pUnoRefs;
+
+public:
+ ScRefUndoData( const ScDocument* pDoc );
+ ~ScRefUndoData();
+
+ void DeleteUnchanged( const ScDocument* pDoc );
+ void DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst );
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/retypepassdlg.hrc b/sc/source/ui/inc/retypepassdlg.hrc
new file mode 100644
index 000000000000..f027b6bc7ded
--- /dev/null
+++ b/sc/source/ui/inc/retypepassdlg.hrc
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <sc.hrc>
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_HELP 3
+
+#define FT_DESC 10
+#define FL_DOCUMENT 11
+#define FT_DOCSTATUS 12
+#define BTN_RETYPE_DOC 13
+
+#define FL_SHEET 112
+
+#define FT_SHEETNAME1 113
+#define FT_SHEETSTATUS1 114
+#define BTN_RETYPE_SHEET1 115
+
+#define FT_SHEETNAME2 116
+#define FT_SHEETSTATUS2 117
+#define BTN_RETYPE_SHEET2 118
+
+#define FT_SHEETNAME3 119
+#define FT_SHEETSTATUS3 120
+#define BTN_RETYPE_SHEET3 121
+
+#define FT_SHEETNAME4 122
+#define FT_SHEETSTATUS4 123
+#define BTN_RETYPE_SHEET4 124
+
+#define SB_SCROLL 190
+
+#define STR_NOT_PROTECTED 200
+#define STR_NOT_PASS_PROTECTED 201
+#define STR_HASH_BAD 202
+#define STR_HASH_GOOD 203
+#define STR_HASH_REGENERATED 204
+
+#define FT_PASSWORD1 301
+#define ED_PASSWORD1 302
+#define FT_PASSWORD2 303
+#define ED_PASSWORD2 304
+#define BTN_MATCH_OLD_PASSWORD 305
+#define BTN_RETYPE_PASSWORD 306
+#define BTN_REMOVE_PASSWORD 307
diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx
new file mode 100644
index 000000000000..59753d8d386b
--- /dev/null
+++ b/sc/source/ui/inc/retypepassdlg.hxx
@@ -0,0 +1,174 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UI_RETYPEPASS_DLG_HXX
+#define SC_UI_RETYPEPASS_DLG_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/scrbar.hxx>
+#include <svx/checklbx.hxx>
+#include <svtools/stdctrl.hxx>
+
+#include "tabprotection.hxx"
+
+#include <boost/shared_ptr.hpp>
+
+class Window;
+class ScDocProtection;
+class ScTableProtection;
+class ScDocument;
+
+class ScRetypePassDlg : public ModalDialog
+{
+public:
+ typedef ::boost::shared_ptr<ScDocProtection> DocProtectionPtr;
+ typedef ::boost::shared_ptr<ScTableProtection> TabProtectionPtr;
+
+ explicit ScRetypePassDlg(Window* pParent);
+ virtual ~ScRetypePassDlg();
+
+ virtual short Execute();
+
+ void SetDataFromDocument(const ScDocument& rDoc);
+ void SetDesiredHash(ScPasswordHash eHash);
+
+ /** Write the new set of password data to the document instance to
+ overwrite the current ones. */
+ void WriteNewDataToDocument(ScDocument& rDoc) const;
+
+private:
+ ScRetypePassDlg(); // disabled
+
+ void Init();
+ void PopulateDialog();
+ void SetDocData();
+ void SetTableData(size_t nRowPos, SCTAB nTab);
+ void ResetTableRows();
+
+ /** Check the status of all hash values to see if it's okay to enable
+ the OK button. */
+ void CheckHashStatus();
+
+private:
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+
+ FixedInfo maTextDescription;
+
+ FixedLine maLineDocument;
+ FixedText maTextDocStatus;
+ PushButton maBtnRetypeDoc;
+
+ FixedLine maLineSheet;
+ FixedText maTextSheetName1;
+ FixedText maTextSheetStatus1;
+ PushButton maBtnRetypeSheet1;
+
+ FixedText maTextSheetName2;
+ FixedText maTextSheetStatus2;
+ PushButton maBtnRetypeSheet2;
+
+ FixedText maTextSheetName3;
+ FixedText maTextSheetStatus3;
+ PushButton maBtnRetypeSheet3;
+
+ FixedText maTextSheetName4;
+ FixedText maTextSheetStatus4;
+ PushButton maBtnRetypeSheet4;
+
+ ScrollBar maScrollBar;
+
+ String maTextNotProtected;
+ String maTextNotPassProtected;
+ String maTextHashBad;
+ String maTextHashGood;
+ String maTextHashRegen;
+
+ DECL_LINK( OKHdl, OKButton* );
+ DECL_LINK( RetypeBtnHdl, PushButton* );
+ DECL_LINK( ScrollHdl, ScrollBar* );
+
+ struct TableItem
+ {
+ String maName;
+ TabProtectionPtr mpProtect;
+ };
+ ::std::vector<TableItem> maTableItems;
+
+ DocProtectionPtr mpDocItem;
+ size_t mnCurScrollPos;
+ ScPasswordHash meDesiredHash;
+};
+
+// ============================================================================
+
+class ScRetypePassInputDlg : public ModalDialog
+{
+public:
+ explicit ScRetypePassInputDlg(Window* pParent, ScPassHashProtectable* pProtected);
+ virtual ~ScRetypePassInputDlg();
+
+ virtual short Execute();
+
+ bool IsRemovePassword() const;
+ String GetNewPassword() const;
+
+private:
+ ScRetypePassInputDlg(); // disabled
+
+ void Init();
+ void CheckPasswordInput();
+
+private:
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+
+ RadioButton maBtnRetypePassword;
+
+ FixedText maPassword1Text;
+ Edit maPassword1Edit;
+ FixedText maPassword2Text;
+ Edit maPassword2Edit;
+
+ CheckBox maBtnMatchOldPass;
+
+ RadioButton maBtnRemovePassword;
+
+ DECL_LINK( OKHdl, OKButton* );
+ DECL_LINK( RadioBtnHdl, RadioButton* );
+ DECL_LINK( CheckBoxHdl, CheckBox* );
+ DECL_LINK( PasswordModifyHdl, Edit* );
+
+ ScPassHashProtectable* mpProtected;
+};
+
+#endif
diff --git a/sc/source/ui/inc/rfindlst.hxx b/sc/source/ui/inc/rfindlst.hxx
new file mode 100644
index 000000000000..225fd01451df
--- /dev/null
+++ b/sc/source/ui/inc/rfindlst.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_RFINDLST_HXX
+#define SC_RFINDLST_HXX
+
+#include <tools/color.hxx>
+#include "global.hxx"
+#include "address.hxx"
+
+//==================================================================
+
+struct ScRangeFindData
+{
+ ScRange aRef;
+ USHORT nFlags;
+ xub_StrLen nSelStart;
+ xub_StrLen nSelEnd;
+
+ ScRangeFindData( const ScRange& rR, USHORT nF, xub_StrLen nS, xub_StrLen nE ) :
+ aRef(rR), nFlags(nF), nSelStart(nS), nSelEnd(nE) {}
+};
+
+class ScRangeFindList
+{
+ List aEntries;
+ String aDocName;
+ BOOL bHidden;
+
+public:
+ ScRangeFindList(const String& rName);
+ ~ScRangeFindList();
+
+ ULONG Count() const { return aEntries.Count(); }
+ void Insert( ScRangeFindData* pNew ) { aEntries.Insert(pNew, LIST_APPEND); }
+ ScRangeFindData* GetObject( ULONG nIndex ) const
+ { return (ScRangeFindData*)aEntries.GetObject(nIndex); }
+
+ void SetHidden( BOOL bSet ) { bHidden = bSet; }
+
+ const String& GetDocName() const { return aDocName; }
+ BOOL IsHidden() const { return bHidden; }
+
+ static ColorData GetColorName( USHORT nIndex );
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx
new file mode 100644
index 000000000000..6281bb58b02c
--- /dev/null
+++ b/sc/source/ui/inc/scendlg.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SCENDLG_HXX
+#define SC_SCENDLG_HXX
+
+
+#include <vcl/dialog.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/imagebtn.hxx>
+#include <svtools/svmedit.hxx>
+#include <svtools/ctrlbox.hxx>
+
+//===================================================================
+
+class ScNewScenarioDlg : public ModalDialog
+{
+public:
+ ScNewScenarioDlg( Window* pParent, const String& rName, BOOL bEdit = FALSE, BOOL bSheetProtected = FALSE );
+ ~ScNewScenarioDlg();
+
+ void SetScenarioData( const String& rName, const String& rComment,
+ const Color& rColor, USHORT nFlags );
+
+ void GetScenarioData( String& rName, String& rComment,
+ Color& rColor, USHORT& rFlags ) const;
+
+private:
+ FixedLine aFlName;
+ Edit aEdName;
+ FixedLine aFlComment;
+ MultiLineEdit aEdComment;
+ FixedLine aFlOptions;
+ CheckBox aCbShowFrame;
+ ColorListBox aLbColor;
+ //CheckBox aCbPrintFrame;
+ CheckBox aCbTwoWay;
+ //CheckBox aCbAttrib;
+ //CheckBox aCbValue;
+ CheckBox aCbCopyAll;
+ CheckBox aCbProtect;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ const String aDefScenarioName;
+ BOOL bIsEdit;
+
+ DECL_LINK( OkHdl, OKButton * );
+ DECL_LINK( EnableHdl, CheckBox * );
+};
+
+
+#endif // SC_SCENDLG_HXX
+
+
diff --git a/sc/source/ui/inc/scui_def.hxx b/sc/source/ui/inc/scui_def.hxx
new file mode 100644
index 000000000000..ca34ab0775b2
--- /dev/null
+++ b/sc/source/ui/inc/scui_def.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SCUI_DEF_HXX
+#define SCUI_DEF_HXX
+
+#define SCRET_COLS 0x42
+#define SCRET_ROWS 0x43
+
+#define FDS_OPT_NONE 0 // from filldlg.hxx
+#define FDS_OPT_HORZ 1 // from filldlg.hxx
+#define FDS_OPT_VERT 2 // from filldlg.hxx
+
+#define INS_CONT_NOEMPTY 0x0100 //from inscodlg.hxx
+#define INS_CONT_TRANS 0x0200 //from inscodlg.hxx
+#define INS_CONT_LINK 0x0400 //from inscodlg.hxx
+
+#define SC_CELL_SHIFT_DISABLE_DOWN 0x01 //from inscodlg.hxx
+#define SC_CELL_SHIFT_DISABLE_RIGHT 0x02 //from inscodlg.hxx
+
+#define NAME_TOP 1 //from namecrea.hxx
+#define NAME_LEFT 2 //from namecrea.hxx
+#define NAME_BOTTOM 4 //from namecrea.hxx
+#define NAME_RIGHT 8 //from namecrea.hxx
+
+#define BTN_PASTE_NAME 100 // from namepast.hxx
+#define BTN_PASTE_LIST 101 // from namepast.hxx
+
+#define BTN_EXTEND_RANGE 150
+#define BTN_CURRENT_SELECTION 151
+#define SCRET_REMOVE 0x42 //from subtdlg.hxx
+#endif
+
diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx
new file mode 100644
index 000000000000..3e1a7db38fb2
--- /dev/null
+++ b/sc/source/ui/inc/scuiasciiopt.hxx
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// ============================================================================
+
+#ifndef SCUI_ASCIIOPT_HXX
+#define SCUI_ASCIIOPT_HXX
+
+
+#include "asciiopt.hxx"
+#include "svx/langbox.hxx"
+
+// ============================================================================
+
+class ScImportAsciiDlg : public ModalDialog
+{
+ SvStream* mpDatStream;
+ ULONG mnStreamPos;
+ ULONG* mpRowPosArray;
+ ULONG mnRowPosCount;
+
+ String maPreviewLine[ CSV_PREVIEW_LINES ];
+
+ FixedLine aFlFieldOpt;
+ FixedText aFtCharSet;
+ SvxTextEncodingBox aLbCharSet;
+ FixedText aFtCustomLang;
+ SvxLanguageBox aLbCustomLang;
+
+ FixedText aFtRow;
+ NumericField aNfRow;
+
+ FixedLine aFlSepOpt;
+ RadioButton aRbFixed;
+ RadioButton aRbSeparated;
+
+ CheckBox aCkbTab;
+ CheckBox aCkbSemicolon;
+ CheckBox aCkbComma;
+ CheckBox aCkbSpace;
+ CheckBox aCkbOther;
+ Edit aEdOther;
+ CheckBox aCkbAsOnce;
+
+ FixedLine aFlOtherOpt;
+
+ FixedText aFtTextSep;
+ ComboBox aCbTextSep;
+
+ CheckBox aCkbQuotedAsText;
+ CheckBox aCkbDetectNumber;
+
+ FixedLine aFlWidth;
+ FixedText aFtType;
+ ListBox aLbType;
+
+ ScCsvTableBox maTableBox;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ String aCharSetUser;
+ String aColumnUser;
+ String aFldSepList;
+ String aTextSepList;
+ String maFieldSeparators; // selected field separators
+ sal_Unicode mcTextSep;
+ String maStrTextToColumns;
+
+ CharSet meCharSet; /// Selected char set.
+ bool mbCharSetSystem; /// Is System char set selected?
+ bool mbFileImport; /// Is this dialog involked for csv file import ?
+
+public:
+ ScImportAsciiDlg(
+ Window* pParent, String aDatName,
+ SvStream* pInStream, sal_Unicode cSep = '\t' );
+ ~ScImportAsciiDlg();
+
+ void GetOptions( ScAsciiOptions& rOpt );
+ void SetTextToColumnsMode();
+ void SaveParameters();
+
+private:
+ /** Sets the selected char set data to meCharSet and mbCharSetSystem. */
+ void SetSelectedCharSet();
+ /** Returns all separator characters in a string. */
+ String GetSeparators() const;
+
+ /** Enables or disables all separator checkboxes and edit fields. */
+ void SetupSeparatorCtrls();
+
+
+ bool GetLine( ULONG nLine, String &rText );
+ void UpdateVertical();
+ inline bool Seek( ULONG nPos ); // synced to and from mnStreamPos
+
+ DECL_LINK( CharSetHdl, SvxTextEncodingBox* );
+ DECL_LINK( FirstRowHdl, NumericField* );
+ DECL_LINK( RbSepFixHdl, RadioButton* );
+ DECL_LINK( SeparatorHdl, Control* );
+ DECL_LINK( LbColTypeHdl, ListBox* );
+ DECL_LINK( UpdateTextHdl, ScCsvTableBox* );
+ DECL_LINK( ColTypeHdl, ScCsvTableBox* );
+};
+
+
+inline bool ScImportAsciiDlg::Seek(ULONG nPos)
+{
+ bool bSuccess = true;
+ if (nPos != mnStreamPos && mpDatStream)
+ {
+ if (mpDatStream->Seek( nPos ) != nPos)
+ bSuccess = false;
+ else
+ mnStreamPos = nPos;
+ }
+ return bSuccess;
+}
+
+#endif
+
diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx
new file mode 100644
index 000000000000..84a408267b20
--- /dev/null
+++ b/sc/source/ui/inc/scuiautofmt.hxx
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SCUI_AUTOFMT_HXX
+#define SCUI_AUTOFMT_HXX
+#include "autofmt.hxx"
+
+class ScAutoFormatDlg : public ModalDialog
+{
+public:
+ ScAutoFormatDlg( Window* pParent,
+ ScAutoFormat* pAutoFormat,
+ const ScAutoFormatData* pSelFormatData,
+ ScDocument* pDoc );
+ ~ScAutoFormatDlg();
+
+ USHORT GetIndex() const { return nIndex; }
+ String GetCurrFormatName();
+
+private:
+ FixedLine aFlFormat;
+ ListBox aLbFormat;
+ ScAutoFmtPreview* pWndPreview;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ PushButton aBtnAdd;
+ PushButton aBtnRemove;
+ MoreButton aBtnMore;
+ FixedLine aFlFormatting;
+ CheckBox aBtnNumFormat;
+ CheckBox aBtnBorder;
+ CheckBox aBtnFont;
+ CheckBox aBtnPattern;
+ CheckBox aBtnAlignment;
+ CheckBox aBtnAdjust;
+ PushButton aBtnRename;
+ String aStrTitle;
+ String aStrLabel;
+ String aStrClose;
+ String aStrDelTitle;
+ String aStrDelMsg;
+ String aStrRename;
+
+ //------------------------
+ ScAutoFormat* pFormat;
+ const ScAutoFormatData* pSelFmtData;
+ USHORT nIndex;
+ BOOL bCoreDataChanged;
+ BOOL bFmtInserted;
+
+ void Init ();
+ void UpdateChecks ();
+ //------------------------
+ DECL_LINK( CheckHdl, Button * );
+ DECL_LINK( AddHdl, void * );
+ DECL_LINK( RemoveHdl, void * );
+ DECL_LINK( SelFmtHdl, void * );
+ DECL_LINK( CloseHdl, PushButton * );
+ DECL_LINK( DblClkHdl, void * );
+ DECL_LINK( RenameHdl, void *);
+
+};
+#endif
+
diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx
new file mode 100644
index 000000000000..957d174a3deb
--- /dev/null
+++ b/sc/source/ui/inc/scuiimoptdlg.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SCUI_IMOPTDLG_HXX
+#define SCUI_IMOPTDLG_HXX
+
+#include "imoptdlg.hxx"
+
+//===================================================================
+
+
+class ScDelimiterTable;
+
+class ScImportOptionsDlg : public ModalDialog
+{
+public:
+ ScImportOptionsDlg( Window* pParent,
+ BOOL bAscii = TRUE,
+ const ScImportOptions* pOptions = NULL,
+ const String* pStrTitle = NULL,
+ BOOL bMultiByte = FALSE,
+ BOOL bOnlyDbtoolsEncodings = FALSE,
+ BOOL bImport = TRUE );
+
+ ~ScImportOptionsDlg();
+
+ void GetImportOptions( ScImportOptions& rOptions ) const;
+
+private:
+ FixedLine aFlFieldOpt;
+ FixedText aFtFont;
+ SvxTextEncodingBox aLbFont;
+ FixedText aFtFieldSep;
+ ComboBox aEdFieldSep;
+ FixedText aFtTextSep;
+ ComboBox aEdTextSep;
+ CheckBox aCbFixed;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ CheckBox aCbShown;
+
+ ScDelimiterTable* pFieldSepTab;
+ ScDelimiterTable* pTextSepTab;
+
+private:
+ USHORT GetCodeFromCombo( const ComboBox& rEd ) const;
+
+ DECL_LINK( FixedWidthHdl, CheckBox* );
+ DECL_LINK( DoubleClickHdl, ListBox* );
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx
new file mode 100644
index 000000000000..99bd6c2a805a
--- /dev/null
+++ b/sc/source/ui/inc/scuitphfedit.hxx
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SCUI_TPHFEDIT_HXX
+#define SCUI_TPHFEDIT_HXX
+
+#include "tphfedit.hxx"
+
+//===================================================================
+enum ScHFEntryId
+{
+ eNoneEntry ,
+ ePageEntry ,
+ ePagesEntry ,
+ eSheetEntry ,
+ eConfidentialEntry ,
+ eFileNamePageEntry ,
+ eExtFileNameEntry ,
+ ePageSheetEntry ,
+ ePageFileNameEntry ,
+ ePageExtFileNameEntry ,
+ eUserNameEntry ,
+ eCreatedByEntry ,
+ eEntryCount
+};
+
+class ScHeaderEditEngine;
+class ScPatternAttr;
+class EditView;
+class EditTextObject;
+class SvxFieldItem;
+class ScAccessibleEditObject;
+
+
+class ScHFEditPage : public SfxTabPage
+{
+public:
+ virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ virtual void Reset ( const SfxItemSet& rCoreSet );
+
+ void SetNumType(SvxNumType eNumType);
+ void ClearTextAreas();
+
+protected:
+ ScHFEditPage( Window* pParent,
+ USHORT nResId,
+ const SfxItemSet& rCoreSet,
+ USHORT nWhich, bool bHeader );
+ virtual ~ScHFEditPage();
+
+private:
+ FixedText aFtLeft;
+ ScEditWindow aWndLeft;
+ FixedText aFtCenter;
+ ScEditWindow aWndCenter;
+ FixedText aFtRight;
+ ScEditWindow aWndRight;
+ FixedText maFtDefinedHF;
+ ListBox maLbDefined;
+ FixedText maFtCustomHF;
+ ImageButton aBtnText;
+ ScExtIButton aBtnFile;
+ ImageButton aBtnTable;
+ ImageButton aBtnPage;
+ ImageButton aBtnLastPage;
+ ImageButton aBtnDate;
+ ImageButton aBtnTime;
+ FixedLine aFlInfo;
+ FixedInfo aFtInfo;
+ ScPopupMenu aPopUpFile;
+
+ USHORT nWhich;
+ String aCmdArr[6];
+
+private:
+#ifdef _TPHFEDIT_CXX
+ void FillCmdArr();
+ void InitPreDefinedList();
+ void ProcessDefinedListSel(ScHFEntryId eSel, bool bTravelling = false);
+ void InsertToDefinedList();
+ void RemoveFromDefinedList();
+ void SetSelectDefinedList();
+ bool IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj);
+ bool IsDateEntry(EditTextObject* pTextObj);
+ bool IsExtFileNameEntry(EditTextObject* pTextObj);
+ DECL_LINK( ListHdl_Impl, ListBox* );
+ DECL_LINK( ClickHdl, ImageButton* );
+ DECL_LINK( MenuHdl, ScExtIButton* );
+#endif
+};
+
+//===================================================================
+
+class ScRightHeaderEditPage : public ScHFEditPage
+{
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
+ static USHORT* GetRanges();
+
+private:
+ ScRightHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
+};
+
+//===================================================================
+
+class ScLeftHeaderEditPage : public ScHFEditPage
+{
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
+ static USHORT* GetRanges();
+
+private:
+ ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
+};
+
+//===================================================================
+
+class ScRightFooterEditPage : public ScHFEditPage
+{
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
+ static USHORT* GetRanges();
+
+private:
+ ScRightFooterEditPage( Window* pParent, const SfxItemSet& rSet );
+};
+
+//===================================================================
+
+class ScLeftFooterEditPage : public ScHFEditPage
+{
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
+ static USHORT* GetRanges();
+
+private:
+ ScLeftFooterEditPage( Window* pParent, const SfxItemSet& rSet );
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx
new file mode 100644
index 000000000000..ad12d9c743ad
--- /dev/null
+++ b/sc/source/ui/inc/select.hxx
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SELECT_HXX
+#define SC_SELECT_HXX
+
+#ifndef _SELENG_HXX //autogen
+#include <vcl/seleng.hxx>
+#endif
+
+#include "viewdata.hxx" // ScSplitPos
+
+// ---------------------------------------------------------------------------
+
+class ScTabView;
+class ScViewData;
+
+
+class ScViewSelectionEngine : public SelectionEngine
+{
+private:
+ ScSplitPos eWhich;
+public:
+ ScViewSelectionEngine( Window* pWindow, ScTabView* pView,
+ ScSplitPos eSplitPos );
+
+ ScSplitPos GetWhich() const { return eWhich; }
+ void SetWhich(ScSplitPos eNew) { eWhich = eNew; }
+};
+
+
+class ScViewFunctionSet : public FunctionSet // View (Gridwin / Tastatur)
+{
+private:
+ ScViewData* pViewData;
+ ScViewSelectionEngine* pEngine;
+
+ BOOL bAnchor;
+ BOOL bStarted;
+ ScAddress aAnchorPos;
+
+ ScSplitPos GetWhich();
+
+public:
+ ScViewFunctionSet( ScViewData* pNewViewData );
+
+ void SetSelectionEngine( ScViewSelectionEngine* pSelEngine );
+
+ void SetAnchor( SCCOL nPosX, SCROW nPosY );
+ void SetAnchorFlag( BOOL bSet );
+
+ virtual void BeginDrag();
+ virtual void CreateAnchor();
+ virtual void DestroyAnchor();
+ virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE );
+ virtual BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ virtual void DeselectAtPoint( const Point& rPointPixel );
+ virtual void DeselectAll();
+
+ BOOL SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, BOOL bScroll );
+};
+
+
+// ---------------------------------------------------------------------------
+
+
+class ScHeaderFunctionSet : public FunctionSet // Spalten- / Zeilenkoepfe
+{
+private:
+ ScViewData* pViewData;
+ BOOL bColumn; // Col- / Rowbar
+ ScSplitPos eWhich;
+
+ BOOL bAnchor;
+ SCCOLROW nCursorPos;
+
+public:
+ ScHeaderFunctionSet( ScViewData* pNewViewData );
+
+ void SetColumn( BOOL bSet );
+ void SetWhich( ScSplitPos eNew );
+
+ virtual void BeginDrag();
+ virtual void CreateAnchor();
+ virtual void DestroyAnchor();
+ virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE );
+ virtual BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ virtual void DeselectAtPoint( const Point& rPointPixel );
+ virtual void DeselectAll();
+
+ void SetAnchorFlag(BOOL bSet) { bAnchor = bSet; }
+};
+
+
+class ScHeaderSelectionEngine : public SelectionEngine
+{
+public:
+ ScHeaderSelectionEngine( Window* pWindow, ScHeaderFunctionSet* pFuncSet );
+};
+
+
+
+#endif
diff --git a/sc/source/ui/inc/selectionstate.hxx b/sc/source/ui/inc/selectionstate.hxx
new file mode 100644
index 000000000000..cbdc6b1faff7
--- /dev/null
+++ b/sc/source/ui/inc/selectionstate.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SELECTIONSTATE_HXX
+#define SC_SELECTIONSTATE_HXX
+
+#include <editeng/editdata.hxx>
+#include "rangelst.hxx"
+
+// ============================================================================
+
+/** Enumerates all possible types of selections in a Calc document. */
+enum ScSelectionType
+{
+ SC_SELECTTYPE_NONE, /// No selection, simple cell cursor.
+ SC_SELECTTYPE_SHEET, /// Single cell, cell range, or multi range selection.
+ SC_SELECTTYPE_EDITCELL, /// Cell in edit mode (with or without selection).
+ SC_SELECTTYPE_DRAWING, /// One or more drawing objects.
+ SC_SELECTTYPE_EDITDRAW /// Edit mode in drawing object (with or without selection).
+};
+
+// ----------------------------------------------------------------------------
+
+class ScViewData;
+
+/** Contains all available data about any possible selection in a Calc document. */
+class ScSelectionState
+{
+public:
+ explicit ScSelectionState( ScViewData& rViewData );
+
+ /** Returns the type of the selection this object contains. */
+ inline ScSelectionType GetSelectionType() const { return meType; }
+
+ /** Returns the position of the cell cursor. */
+ inline const ScAddress& GetCellCursor() const { return maCursor; }
+ /** Returns a range list containing all selected cell ranges. */
+ inline const ScRangeList& GetSheetSelection() const { return maSheetSel; }
+ /** Returns the edit engine selection. */
+ inline const ESelection& GetEditSelection() const { return maEditSel; }
+
+private:
+ ScSelectionType meType; /// Type of the selection.
+ ScAddress maCursor; /// Cell cursor position.
+ ScRangeList maSheetSel; /// Sheet selection.
+ ESelection maEditSel; /// Selection in edit mode.
+};
+
+bool operator==( const ScSelectionState& rL, const ScSelectionState& rR );
+inline bool operator!=( const ScSelectionState& rL, const ScSelectionState& rR ) { return !(rL == rR); }
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/seltrans.hxx b/sc/source/ui/inc/seltrans.hxx
new file mode 100644
index 000000000000..c695c918dad0
--- /dev/null
+++ b/sc/source/ui/inc/seltrans.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SELTRANS_HXX
+#define SC_SELTRANS_HXX
+
+#include <svtools/transfer.hxx>
+
+class ScTabView;
+class ScTransferObj;
+class ScDrawTransferObj;
+
+enum ScSelectionTransferMode
+{
+ SC_SELTRANS_INVALID,
+ SC_SELTRANS_CELL,
+ SC_SELTRANS_CELLS,
+ SC_SELTRANS_DRAW_BITMAP,
+ SC_SELTRANS_DRAW_GRAPHIC,
+ SC_SELTRANS_DRAW_BOOKMARK,
+ SC_SELTRANS_DRAW_OLE,
+ SC_SELTRANS_DRAW_OTHER
+};
+
+class ScSelectionTransferObj : public TransferableHelper
+{
+private:
+ ScTabView* pView;
+ ScSelectionTransferMode eMode;
+ ScTransferObj* pCellData;
+ ScDrawTransferObj* pDrawData;
+
+ ScSelectionTransferObj( ScTabView* pSource, ScSelectionTransferMode eNewMode );
+ void CreateCellData();
+ void CreateDrawData();
+
+public:
+ // creates an object if the view has a valid selection,
+ // returns NULL otherwise
+ static ScSelectionTransferObj* CreateFromView( ScTabView* pSource );
+
+ virtual ~ScSelectionTransferObj();
+
+ void ForgetView();
+ BOOL StillValid();
+ ScTabView* GetView() const { return pView; }
+
+ ScTransferObj* GetCellData();
+ ScDrawTransferObj* GetDrawData();
+
+ virtual void AddSupportedFormats();
+ virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual void ObjectReleased();
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/servobj.hxx b/sc/source/ui/inc/servobj.hxx
new file mode 100644
index 000000000000..68e807461cad
--- /dev/null
+++ b/sc/source/ui/inc/servobj.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SERVOBJ_HXX
+#define SC_SERVOBJ_HXX
+
+#include <svl/lstner.hxx>
+#include <svl/listener.hxx>
+#include <sfx2/linksrc.hxx>
+#include "global.hxx"
+#include "address.hxx"
+
+class ScDocShell;
+class ScServerObject;
+
+class ScServerObjectSvtListenerForwarder : public SvtListener
+{
+ ScServerObject* pObj;
+ SfxBroadcaster aBroadcaster;
+public:
+ ScServerObjectSvtListenerForwarder( ScServerObject* pObjP);
+ virtual ~ScServerObjectSvtListenerForwarder();
+ virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint);
+};
+
+class ScServerObject : public ::sfx2::SvLinkSource, public SfxListener
+{
+private:
+ ScServerObjectSvtListenerForwarder aForwarder;
+ ScDocShell* pDocSh;
+ ScRange aRange;
+ String aItemStr;
+ BOOL bRefreshListener;
+
+ void Clear();
+
+public:
+ ScServerObject( ScDocShell* pShell, const String& rItem );
+ virtual ~ScServerObject();
+
+ virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ const String & rMimeType,
+ BOOL bSynchron = FALSE );
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ void EndListeningAll();
+};
+
+//SO2_DECL_REF( ScServerObject )
+
+
+#endif
diff --git a/sc/source/ui/inc/sharedocdlg.hrc b/sc/source/ui/inc/sharedocdlg.hrc
new file mode 100644
index 000000000000..cc38e81bbddb
--- /dev/null
+++ b/sc/source/ui/inc/sharedocdlg.hrc
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <sc.hrc>
+
+#define CB_SHARE 1
+#define FT_WARNING 2
+#define FL_USERS 3
+#define FT_USERS 4
+#define LB_USERS 5
+#define FL_END 6
+#define BTN_HELP 7
+#define BTN_OK 8
+#define BTN_CANCEL 9
+
+#define STR_TITLE_NAME 1
+#define STR_TITLE_ACCESSED 2
+#define STR_NO_USER_DATA 3
+#define STR_UNKNOWN_USER 4
+#define STR_EXCLUSIVE_ACCESS 5
diff --git a/sc/source/ui/inc/sharedocdlg.hxx b/sc/source/ui/inc/sharedocdlg.hxx
new file mode 100644
index 000000000000..52c2f393b19a
--- /dev/null
+++ b/sc/source/ui/inc/sharedocdlg.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SHAREDOCDLG_HXX
+#define SC_SHAREDOCDLG_HXX
+
+#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <svx/simptabl.hxx>
+
+class ScViewData;
+class ScDocShell;
+
+
+//=============================================================================
+// class ScShareDocumentDlg
+//=============================================================================
+
+class ScShareDocumentDlg : public ModalDialog
+{
+private:
+ CheckBox maCbShare;
+ FixedText maFtWarning;
+ FixedLine maFlUsers;
+ FixedText maFtUsers;
+ SvxSimpleTable maLbUsers;
+ FixedLine maFlEnd;
+ HelpButton maBtnHelp;
+ OKButton maBtnOK;
+ CancelButton maBtnCancel;
+
+ String maStrTitleName;
+ String maStrTitleAccessed;
+ String maStrNoUserData;
+ String maStrUnkownUser;
+ String maStrExclusiveAccess;
+
+ ScViewData* mpViewData;
+ ScDocShell* mpDocShell;
+
+ DECL_LINK( ToggleHandle, void* );
+
+public:
+ ScShareDocumentDlg( Window* pParent, ScViewData* pViewData );
+ ~ScShareDocumentDlg();
+
+ bool IsShareDocumentChecked() const;
+ void UpdateView();
+};
+
+#endif
diff --git a/sc/source/ui/inc/shtabdlg.hxx b/sc/source/ui/inc/shtabdlg.hxx
new file mode 100644
index 000000000000..6c89c43b3a51
--- /dev/null
+++ b/sc/source/ui/inc/shtabdlg.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SHTABDLG_HXX
+#define SC_SHTABDLG_HXX
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#include <svtools/tooltiplbox.hxx>
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+
+//------------------------------------------------------------------------
+
+class ScShowTabDlg : public ModalDialog
+{
+private:
+ ::svtools::ToolTipMultiListBox aLb;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ FixedText aFtLbTitle;
+
+ DECL_LINK( DblClkHdl, void * );
+
+public:
+ ScShowTabDlg( Window* pParent );
+ ~ScShowTabDlg();
+
+ /** Sets dialog title, fixed text for listbox and help IDs. */
+ void SetDescription(
+ const String& rTitle, const String& rFixedText,
+ ULONG nDlgHelpId, ULONG nLbHelpId );
+
+ /** Inserts a string into the ListBox. */
+ void Insert( const String& rString, BOOL bSelected );
+
+ USHORT GetSelectEntryCount() const;
+ String GetSelectEntry(USHORT nPos) const;
+ USHORT GetSelectEntryPos(USHORT nPos) const;
+};
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/simpref.hrc b/sc/source/ui/inc/simpref.hrc
new file mode 100644
index 000000000000..d6fb6d4412eb
--- /dev/null
+++ b/sc/source/ui/inc/simpref.hrc
@@ -0,0 +1,37 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc" // -> RID_SCDLG_SIMPLEREF
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_ADD 3
+#define BTN_HELP 4
+#define FT_ASSIGN 10
+#define ED_ASSIGN 11
+#define RB_ASSIGN 12
+
diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx
new file mode 100644
index 000000000000..ba5b8ca287c3
--- /dev/null
+++ b/sc/source/ui/inc/simpref.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SIMPREF_HXX
+#define SC_SIMPREF_HXX
+
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+
+#ifndef _MOREBTN_HXX //autogen
+#include <vcl/morebtn.hxx>
+#endif
+#include "anyrefdg.hxx"
+#include "dbcolect.hxx"
+#include "expftext.hxx"
+
+class ScViewData;
+class ScDocument;
+
+
+//============================================================================
+
+class ScSimpleRefDlg: public ScAnyRefDlg
+{
+private:
+ Link aCloseHdl;
+ Link aDoneHdl;
+ Link aAbortedHdl;
+ Link aChangeHdl;
+
+ FixedText aFtAssign;
+ formula::RefEdit aEdAssign;
+ formula::RefButton aRbAssign;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ BOOL bRefInputMode;
+
+ ScRange theCurArea;
+ BOOL bCloseFlag;
+ BOOL bAutoReOpen;
+ BOOL bCloseOnButtonUp;
+ BOOL bSingleCell;
+ BOOL bMultiSelection;
+
+ void Init();
+
+ DECL_LINK( CancelBtnHdl, void * );
+ DECL_LINK( OkBtnHdl, void * );
+
+
+protected:
+
+ virtual void RefInputDone( BOOL bForced = FALSE );
+
+public:
+ ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScViewData* ptrViewData );
+ ~ScSimpleRefDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+
+ virtual BOOL IsRefInputMode() const;
+ virtual void SetActive();
+ virtual BOOL Close();
+
+ void StartRefInput();
+
+ virtual String GetRefString() const;
+ virtual void SetRefString(const String &rStr);
+ virtual void FillInfo(SfxChildWinInfo&) const;
+
+ void SetCloseHdl( const Link& rLink );
+ void SetUnoLinks( const Link& rDone, const Link& rAbort,
+ const Link& rChange );
+
+ void SetFlags( BOOL bSetCloseOnButtonUp, BOOL bSetSingleCell, BOOL bSetMultiSelection );
+
+ void SetAutoReOpen(BOOL bFlag) {bAutoReOpen=bFlag;}
+};
+
+
+
+#endif // SC_DBNAMDLG_HXX
+
diff --git a/sc/source/ui/inc/sizedev.hxx b/sc/source/ui/inc/sizedev.hxx
new file mode 100644
index 000000000000..615755be0240
--- /dev/null
+++ b/sc/source/ui/inc/sizedev.hxx
@@ -0,0 +1,55 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SIZEDEV_HXX
+#define SC_SIZEDEV_HXX
+
+#include <vcl/mapmod.hxx>
+
+class OutputDevice;
+class ScDocShell;
+
+class ScSizeDeviceProvider
+{
+ OutputDevice* pDevice;
+ BOOL bOwner;
+ double nPPTX;
+ double nPPTY;
+ MapMode aOldMapMode;
+
+public:
+ ScSizeDeviceProvider( ScDocShell* pDocSh );
+ ~ScSizeDeviceProvider();
+
+ OutputDevice* GetDevice() const { return pDevice; }
+ double GetPPTX() const { return nPPTX; }
+ double GetPPTY() const { return nPPTY; }
+ BOOL IsPrinter() const { return !bOwner; }
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/solveroptions.hrc b/sc/source/ui/inc/solveroptions.hrc
new file mode 100644
index 000000000000..e3be150ccd1b
--- /dev/null
+++ b/sc/source/ui/inc/solveroptions.hrc
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc"
+
+#define FT_ENGINE 1
+#define FT_SETTINGS 2
+#define FT_OPTIONNAME 3
+
+#define LB_ENGINE 1
+#define LB_SETTINGS 2
+
+#define FL_BUTTONS 1
+
+#define BTN_EDIT 1
+#define BTN_HELP 2
+#define BTN_OK 3
+#define BTN_CANCEL 4
+
+#define NF_VALUE 1
+
+#define ED_VALUE 1
+
diff --git a/sc/source/ui/inc/solveroptions.hxx b/sc/source/ui/inc/solveroptions.hxx
new file mode 100644
index 000000000000..fc0714558be4
--- /dev/null
+++ b/sc/source/ui/inc/solveroptions.hxx
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SOLVEROPTIONS_HXX
+#define SC_SOLVEROPTIONS_HXX
+
+#include <vcl/dialog.hxx>
+
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/field.hxx>
+#include <svx/checklbx.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace beans { struct PropertyValue; }
+} } }
+
+
+
+class ScSolverOptionsDialog : public ModalDialog
+{
+ FixedText maFtEngine;
+ ListBox maLbEngine;
+ FixedText maFtSettings;
+ SvxCheckListBox maLbSettings;
+ PushButton maBtnEdit;
+ FixedLine maFlButtons;
+ HelpButton maBtnHelp;
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+
+ SvLBoxButtonData* mpCheckButtonData;
+ com::sun::star::uno::Sequence<rtl::OUString> maImplNames;
+ com::sun::star::uno::Sequence<rtl::OUString> maDescriptions;
+ String maEngine;
+ com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> maProperties;
+
+ DECL_LINK( EngineSelectHdl, ListBox* );
+ DECL_LINK( SettingsSelHdl, SvxCheckListBox* );
+ DECL_LINK( SettingsDoubleClickHdl, SvTreeListBox* );
+ DECL_LINK( ButtonHdl, PushButton* );
+
+ void ReadFromComponent();
+ void FillListBox();
+ void EditOption();
+
+public:
+ ScSolverOptionsDialog( Window* pParent,
+ const com::sun::star::uno::Sequence<rtl::OUString>& rImplNames,
+ const com::sun::star::uno::Sequence<rtl::OUString>& rDescriptions,
+ const String& rEngine,
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rProperties );
+ ~ScSolverOptionsDialog();
+
+ const String& GetEngine() const;
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& GetProperties();
+};
+
+
+class ScSolverIntegerDialog : public ModalDialog
+{
+ FixedText maFtName;
+ NumericField maNfValue;
+ FixedLine maFlButtons;
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+
+public:
+ ScSolverIntegerDialog( Window * pParent );
+ ~ScSolverIntegerDialog();
+
+ void SetOptionName( const String& rName );
+ void SetValue( sal_Int32 nValue );
+ sal_Int32 GetValue() const;
+};
+
+class ScSolverValueDialog : public ModalDialog
+{
+ FixedText maFtName;
+ Edit maEdValue;
+ FixedLine maFlButtons;
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+
+public:
+ ScSolverValueDialog( Window * pParent );
+ ~ScSolverValueDialog();
+
+ void SetOptionName( const String& rName );
+ void SetValue( double fValue );
+ double GetValue() const;
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/solverutil.hxx b/sc/source/ui/inc/solverutil.hxx
new file mode 100644
index 000000000000..89997e03c1a3
--- /dev/null
+++ b/sc/source/ui/inc/solverutil.hxx
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SOLVERUTIL_HXX
+#define SC_SOLVERUTIL_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace beans { struct PropertyValue; }
+ namespace sheet { class XSolver; }
+} } }
+
+
+class ScSolverUtil
+{
+public:
+ static void GetImplementations( com::sun::star::uno::Sequence<rtl::OUString>& rImplNames,
+ com::sun::star::uno::Sequence<rtl::OUString>& rDescriptions );
+ static com::sun::star::uno::Reference<com::sun::star::sheet::XSolver> GetSolver( const rtl::OUString& rImplName );
+ static com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> GetDefaults( const rtl::OUString& rImplName );
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/solvrdlg.hrc b/sc/source/ui/inc/solvrdlg.hrc
new file mode 100644
index 000000000000..7139abd2a5f6
--- /dev/null
+++ b/sc/source/ui/inc/solvrdlg.hrc
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc" // ->RID_SCDLG_SOLVER
+
+#define ED_FORMULACELL 1
+#define ED_TARGETVAL 2
+#define ED_VARCELL 3
+#define FT_FORMULACELL 1
+#define FT_TARGETVAL 2
+#define FT_VARCELL 3
+#define RB_FORMULACELL 1
+#define RB_VARCELL 2
+#define FL_VARIABLES 1
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_HELP 1
+#define STR_INVALIDVAL 1
+#define STR_INVALIDVAR 2
+#define STR_INVALIDFORM 3
+#define STR_NOFORMULA 4
+
diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx
new file mode 100644
index 000000000000..fa1b9eb6341c
--- /dev/null
+++ b/sc/source/ui/inc/solvrdlg.hxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SOLVRDLG_HXX
+#define SC_SOLVRDLG_HXX
+
+#include "global.hxx"
+#include "address.hxx"
+#include "anyrefdg.hxx"
+
+
+#include <vcl/fixed.hxx>
+#include <vcl/group.hxx>
+
+//----------------------------------------------------------------------------
+
+enum ScSolverErr
+ {
+ SOLVERR_NOFORMULA,
+ SOLVERR_INVALID_FORMULA,
+ SOLVERR_INVALID_VARIABLE,
+ SOLVERR_INVALID_TARGETVALUE
+ };
+
+
+//============================================================================
+
+class ScSolverDlg : public ScAnyRefDlg
+{
+public:
+ ScSolverDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScDocument* pDocument,
+ ScAddress aCursorPos );
+ ~ScSolverDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+ virtual BOOL IsRefInputMode() const;
+ virtual void SetActive();
+ virtual BOOL Close();
+
+private:
+ FixedLine aFlVariables;
+ FixedText aFtFormulaCell;
+ formula::RefEdit aEdFormulaCell;
+ formula::RefButton aRBFormulaCell;
+
+ FixedText aFtTargetVal;
+ Edit aEdTargetVal;
+
+ FixedText aFtVariableCell;
+ formula::RefEdit aEdVariableCell;
+ formula::RefButton aRBVariableCell;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ ScAddress theFormulaCell;
+ ScAddress theVariableCell;
+ String theTargetValStr;
+
+ ScDocument* pDoc;
+ const SCTAB nCurTab;
+ formula::RefEdit* pEdActive;
+ BOOL bDlgLostFocus;
+ const String errMsgInvalidVar;
+ const String errMsgInvalidForm;
+ const String errMsgNoFormula;
+ const String errMsgInvalidVal;
+
+
+#ifdef _SOLVRDLG_CXX
+ void Init();
+ BOOL CheckTargetValue( String& rStrVal );
+ void RaiseError( ScSolverErr eError );
+
+ DECL_LINK( BtnHdl, PushButton* );
+ DECL_LINK( GetFocusHdl, Control* );
+ DECL_LINK( LoseFocusHdl, Control* );
+#endif // _SOLVERDLG_CXX
+};
+
+#endif // SC_SOLVRDLG_HXX
+
+
diff --git a/sc/source/ui/inc/sortdlg.hrc b/sc/source/ui/inc/sortdlg.hrc
new file mode 100644
index 000000000000..387690531cfd
--- /dev/null
+++ b/sc/source/ui/inc/sortdlg.hrc
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+#include "sc.hrc" // -> RID_SCDLG_SORT
+ // -> RID_SCPAGE_SORT_FIELDS
+ // -> RID_SCPAGE_SORT_OPTIONS
+ // -> RID_SCDLG_SORT_WARNING
+ // -> SCSTR_NONAME
+ // -> SCSTR_UNDEFINED
+ // -> SCSTR_FIELD
+
+/*
+#define RID_SCDLG_SORT 256
+#define RID_SCPAGE_SORT_FIELDS 257
+#define RID_SCPAGE_SORT_OPTIONS 258
+#define RID_SCDLG_SORT_WARNING
+*/
+
+#define TP_FIELDS 1
+#define TP_OPTIONS 2
+
+// TP_SORT_FIELDS:
+#define FL_SORT1 1
+#define FL_SORT2 2
+#define FL_SORT3 3
+#define LB_SORT1 4
+#define LB_SORT2 5
+#define LB_SORT3 6
+#define BTN_UP1 7
+#define BTN_UP2 8
+#define BTN_UP3 9
+#define BTN_DOWN1 10
+#define BTN_DOWN2 11
+#define BTN_DOWN3 12
+
+// TP_SORT_OPTIONS:
+#define FL_DIRECTION 1
+#define LB_SORT_USER 2
+#define LB_OUTAREA 3
+#define ED_OUTAREA 4
+#define FT_AREA_LABEL 5
+//#define FT_AREA 6
+#define BTN_SORT_USER 7
+#define BTN_CASESENSITIVE 8
+#define BTN_LABEL 9
+#define BTN_FORMATS 10
+#define BTN_COPYRESULT 11
+#define BTN_TOP_DOWN 12
+#define BTN_LEFT_RIGHT 13
+#define STR_COL_LABEL 14
+#define STR_ROW_LABEL 15
+#define FT_LANGUAGE 16
+#define LB_LANGUAGE 17
+#define FT_ALGORITHM 18
+#define LB_ALGORITHM 19
+
+//#define RID_SCDLG_SORT_WARNING
+#define FT_TEXT 1
+#define FT_TIP 2
+#define BTN_EXTSORT 3
+#define BTN_CURSORT 4
+#define BTN_CANCEL 5
+
+
+
diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx
new file mode 100644
index 000000000000..e6f9ab1bf0c8
--- /dev/null
+++ b/sc/source/ui/inc/sortdlg.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SORTDLG_HXX
+#define SC_SORTDLG_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include "scui_def.hxx" //CHINA001
+
+#ifndef LAYOUT_SFX_TABDIALOG_BROKEN
+#define LAYOUT_SFX_TABDIALOG_BROKEN 1
+#endif /* !LAYOUT_SFX_TABDIALOG_BROKEN */
+
+#if !LAYOUT_SFX_TABDIALOG_BROKEN
+#include <sfx2/layout.hxx>
+#include <layout/layout-pre.hxx>
+#endif
+
+class ScSortDlg : public SfxTabDialog
+{
+public:
+ ScSortDlg( Window* pParent,
+ const SfxItemSet* pArgSet );
+ ~ScSortDlg();
+
+ void SetHeaders( BOOL bHeaders );
+ void SetByRows ( BOOL bByRows );
+ BOOL GetHeaders() const;
+ BOOL GetByRows () const;
+
+
+private:
+ BOOL bIsHeaders;
+ BOOL bIsByRows;
+};
+
+inline void ScSortDlg::SetHeaders( BOOL bHeaders ) { bIsHeaders = bHeaders; }
+inline void ScSortDlg::SetByRows ( BOOL bByRows ) { bIsByRows = bByRows; }
+inline BOOL ScSortDlg::GetHeaders() const { return bIsHeaders; }
+inline BOOL ScSortDlg::GetByRows () const { return bIsByRows; }
+
+class ScSortWarningDlg : public ModalDialog
+{
+public:
+ ScSortWarningDlg( Window* pParent, const String& rExtendText,const String& rCurrentText );
+ ~ScSortWarningDlg();
+ DECL_LINK( BtnHdl, PushButton* );
+private:
+ FixedText aFtText;
+ FixedText aFtTip;
+ PushButton aBtnExtSort;
+ PushButton aBtnCurSort;
+ CancelButton aBtnCancel;
+};
+
+#if !LAYOUT_SFX_TABDIALOG_BROKEN
+#include <layout/layout-post.hxx>
+#endif
+
+#endif // SC_SORTDLG_HXX
diff --git a/sc/source/ui/inc/spelldialog.hxx b/sc/source/ui/inc/spelldialog.hxx
new file mode 100644
index 000000000000..eef0d170c2c8
--- /dev/null
+++ b/sc/source/ui/inc/spelldialog.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SPELLDIALOG_HXX
+#define SC_SPELLDIALOG_HXX
+
+#include <memory>
+#include <svx/SpellDialogChildWindow.hxx>
+
+// ============================================================================
+
+class ScConversionEngineBase;
+class ScSelectionState;
+class ScTabViewShell;
+class ScViewData;
+class ScDocShell;
+class ScDocument;
+
+/** Specialized spell check dialog child window for Calc.
+
+ This derivation of the ::svx::SpellDialogChildWindow base class provides
+ Calc specific implementations of the virtual functions GetNextWrongSentence()
+ and ApplyChangedSentence().
+ */
+class ScSpellDialogChildWindow : public ::svx::SpellDialogChildWindow
+{
+public:
+ SFX_DECL_CHILDWINDOW( ScSpellDialogChildWindow );
+
+ explicit ScSpellDialogChildWindow( Window* pParent, USHORT nId,
+ SfxBindings* pBindings, SfxChildWinInfo* pInfo );
+ virtual ~ScSpellDialogChildWindow();
+
+ /** This method makes the one from the base class public so that
+ it can be called from the view shell when one is created.
+ */
+ virtual void InvalidateSpellDialog();
+
+protected:
+ /** Iterate over the sentences in all text shapes and stop at the
+ next sentence with spelling errors. While doing so the view
+ mode may be changed and text shapes are set into edit mode.
+ */
+ virtual ::svx::SpellPortions GetNextWrongSentence( bool bRecheck );
+
+ /** This method is responsible for merging corrections made in the
+ spelling dialog back into the document.
+ */
+ virtual void ApplyChangedSentence( const ::svx::SpellPortions& rChanged, bool bRecheck );
+ virtual void GetFocus();
+ virtual void LoseFocus();
+
+private:
+ void Reset();
+ void Init();
+
+ bool IsSelectionChanged();
+
+private:
+ typedef ::std::auto_ptr< ScConversionEngineBase > ScConvEnginePtr;
+ typedef ::std::auto_ptr< ScDocument > ScDocumentPtr;
+ typedef ::std::auto_ptr< ScSelectionState > ScSelectionStatePtr;
+
+ ScConvEnginePtr mxEngine;
+ ScDocumentPtr mxUndoDoc;
+ ScDocumentPtr mxRedoDoc;
+ ScSelectionStatePtr mxOldSel; /// Old selection state for comparison.
+ ScTabViewShell* mpViewShell;
+ ScViewData* mpViewData;
+ ScDocShell* mpDocShell;
+ ScDocument* mpDoc;
+ bool mbNeedNextObj;
+ bool mbOldIdleDisabled;
+};
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/spelleng.hxx b/sc/source/ui/inc/spelleng.hxx
new file mode 100644
index 000000000000..f44d4a8f7094
--- /dev/null
+++ b/sc/source/ui/inc/spelleng.hxx
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SC_SPELLENG_HXX
+#define SC_SPELLENG_HXX
+
+#include "editutil.hxx"
+#include "selectionstate.hxx"
+#include "spellparam.hxx"
+
+class ScViewData;
+class ScDocShell;
+class ScDocument;
+class SfxItemPool;
+
+// ============================================================================
+
+/** Base class for special type of edit engines, i.e. for spell checker and text conversion. */
+class ScConversionEngineBase : public ScEditEngineDefaulter
+{
+public:
+ explicit ScConversionEngineBase(
+ SfxItemPool* pEnginePool, ScViewData& rViewData,
+ ScDocument* pUndoDoc, ScDocument* pRedoDoc );
+
+ virtual ~ScConversionEngineBase();
+
+ /** Derived classes implement to convert all cells in the selection or sheet. */
+ virtual void ConvertAll( EditView& rEditView ) = 0;
+
+ /** Returns true, if at least one cell has been modified. */
+ inline bool IsAnyModified() const { return mbIsAnyModified; }
+ /** Returns true, if the entire document/selection has been finished. */
+ inline bool IsFinished() const { return mbFinished; }
+
+protected:
+ /** Implementation of cell iteration. Finds a cell that needs conversion.
+ @return true = Current cell needs conversion (i.e. spelling error found). */
+ bool FindNextConversionCell();
+ /** Restores the initial cursor position. */
+ void RestoreCursorPos();
+
+ /** Derived classes return, if the current text needs conversion (i.e. spelling error found).
+ @return true = Current edit text needs conversion. */
+ virtual bool NeedsConversion() = 0;
+
+ /** Derived classes may show a query box that asks whether to restart at top of the sheet.
+ @descr Default here is no dialog and restart always.
+ @return true = Restart at top, false = Stop the conversion. */
+ virtual bool ShowTableWrapDialog();
+ /** Derived classes may show a message box stating that the conversion is finished.
+ @descr Default here is no dialog. */
+ virtual void ShowFinishDialog();
+
+private:
+ /** Fills the edit engine from a document cell. */
+ void FillFromCell( SCCOL nCol, SCROW nRow, SCTAB nTab );
+
+protected: // for usage in derived classes
+ ScViewData& mrViewData;
+ ScDocShell& mrDocShell;
+ ScDocument& mrDoc;
+
+private:
+ ScSelectionState maSelState; /// Selection data of the document.
+ ScDocument* mpUndoDoc; /// Document stores all old cells for UNDO action.
+ ScDocument* mpRedoDoc; /// Document stores all new cells for REDO action.
+ LanguageType meCurrLang; /// Current cell language.
+ SCCOL mnStartCol; /// Initial column index.
+ SCROW mnStartRow; /// Initial row index.
+ SCTAB mnStartTab; /// Initial sheet index.
+ SCCOL mnCurrCol; /// Current column index.
+ SCROW mnCurrRow; /// Current row index.
+ bool mbIsAnyModified; /// true = At least one cell has been changed.
+ bool mbInitialState; /// true = Not searched for a cell yet.
+ bool mbWrappedInTable; /// true = Already restarted at top of the sheet.
+ bool mbFinished; /// true = Entire document/selection finished.
+};
+
+// ============================================================================
+
+/** Edit engine for spell checking. */
+class ScSpellingEngine : public ScConversionEngineBase
+{
+public:
+ typedef ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > XSpellCheckerRef;
+
+ explicit ScSpellingEngine(
+ SfxItemPool* pEnginePool,
+ ScViewData& rViewData,
+ ScDocument* pUndoDoc,
+ ScDocument* pRedoDoc,
+ XSpellCheckerRef xSpeller );
+
+ /** Checks spelling of all cells in the selection or sheet. */
+ virtual void ConvertAll( EditView& rEditView );
+
+protected:
+ /** Callback from edit engine to check the next cell. */
+ virtual BOOL SpellNextDocument();
+
+ /** Returns true, if the current text contains a spelling error. */
+ virtual bool NeedsConversion();
+
+ /** Show a query box that asks whether to restart at top of the sheet.
+ @return true = Restart at top, false = Stop the conversion. */
+ virtual bool ShowTableWrapDialog();
+ /** Show a message box stating that spell checking is finished. */
+ virtual void ShowFinishDialog();
+
+private:
+ /** Returns the spelling dialog if it is open. */
+ Window* GetDialogParent();
+};
+
+// ============================================================================
+
+/** Edit engine for text conversion. */
+class ScTextConversionEngine : public ScConversionEngineBase
+{
+public:
+ explicit ScTextConversionEngine(
+ SfxItemPool* pEnginePool,
+ ScViewData& rViewData,
+ const ScConversionParam& rConvParam,
+ ScDocument* pUndoDoc,
+ ScDocument* pRedoDoc );
+
+ /** Converts all cells in the selection or sheet according to set language. */
+ virtual void ConvertAll( EditView& rEditView );
+
+protected:
+ /** Callback from edit engine to convert the next cell. */
+ virtual BOOL ConvertNextDocument();
+
+ /** Returns true, if the current text contains text to convert. */
+ virtual bool NeedsConversion();
+
+private:
+ ScConversionParam maConvParam; /// Conversion parameters.
+};
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/spellparam.hxx b/sc/source/ui/inc/spellparam.hxx
new file mode 100644
index 000000000000..ecc66d7ccdcb
--- /dev/null
+++ b/sc/source/ui/inc/spellparam.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SC_SPELLPARAM_HXX
+#define SC_SPELLPARAM_HXX
+
+#include <vcl/font.hxx>
+
+// ============================================================================
+
+/** Specifiers for sheet conversion (functions iterating over the sheet and modifying cells). */
+enum ScConversionType
+{
+ SC_CONVERSION_SPELLCHECK, /// Spell checker.
+ SC_CONVERSION_HANGULHANJA, /// Hangul-Hanja converter.
+ SC_CONVERSION_CHINESE_TRANSL /// Chinese simplified/traditional converter.
+};
+
+// ---------------------------------------------------------------------------
+
+/** Parameters for conversion. */
+class ScConversionParam
+{
+public:
+ /** Constructs an empty parameter struct with the passed conversion type. */
+ explicit ScConversionParam( ScConversionType eConvType );
+
+ /** Constructs parameter struct for text conversion without changing the language. */
+ explicit ScConversionParam(
+ ScConversionType eConvType,
+ LanguageType eLang,
+ sal_Int32 nOptions,
+ bool bIsInteractive );
+
+ /** Constructs parameter struct for text conversion with language change. */
+ explicit ScConversionParam(
+ ScConversionType eConvType,
+ LanguageType eSourceLang,
+ LanguageType eTargetLang,
+ const Font& rTargetFont,
+ sal_Int32 nOptions,
+ bool bIsInteractive );
+
+ inline ScConversionType GetType() const { return meConvType; }
+ inline LanguageType GetSourceLang() const { return meSourceLang; }
+ inline LanguageType GetTargetLang() const { return meTargetLang; }
+ inline const Font* GetTargetFont() const { return mbUseTargetFont ? &maTargetFont : 0; }
+ inline sal_Int32 GetOptions() const { return mnOptions; }
+ inline bool IsInteractive() const { return mbIsInteractive; }
+
+private:
+ ScConversionType meConvType; /// Type of the conversion.
+ LanguageType meSourceLang; /// Source language for conversion.
+ LanguageType meTargetLang; /// Target language for conversion.
+ Font maTargetFont; /// Target font to be used if language has to be changed.
+ sal_Int32 mnOptions; /// Conversion options.
+ bool mbUseTargetFont; /// True = Use maTargetFont to change font during conversion.
+ bool mbIsInteractive; /// True = Text conversion has (specific) dialog that may be raised.
+};
+
+// ============================================================================
+
+#endif
+
diff --git a/sc/source/ui/inc/strindlg.hxx b/sc/source/ui/inc/strindlg.hxx
new file mode 100644
index 000000000000..f84d8e4e2b51
--- /dev/null
+++ b/sc/source/ui/inc/strindlg.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_STRINDLG_HXX
+#define SC_STRINDLG_HXX
+
+
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/imagebtn.hxx>
+#include <vcl/edit.hxx>
+
+#include <layout/layout.hxx>
+#include <layout/layout-pre.hxx>
+
+//------------------------------------------------------------------------
+
+class ScStringInputDlg : public ModalDialog
+{
+public:
+ ScStringInputDlg( Window* pParent,
+ const String& rTitle,
+ const String& rEditTitle,
+ const String& rDefault,
+ ULONG nHelpId );
+ ~ScStringInputDlg();
+
+ void GetInputString( String& rString ) const;
+
+private:
+ FixedText aFtEditTitle;
+ Edit aEdInput;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+};
+
+#include <layout/layout-post.hxx>
+
+#endif // SC_STRINDLG_HXX
+
+
diff --git a/sc/source/ui/inc/styledlg.hrc b/sc/source/ui/inc/styledlg.hrc
new file mode 100644
index 000000000000..4a954bb3afc1
--- /dev/null
+++ b/sc/source/ui/inc/styledlg.hrc
@@ -0,0 +1,39 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define TP_NUMBER 2
+#define TP_FONT 3
+#define TP_ALIGNMENT 4
+#define TP_BORDER 5
+#define TP_BACKGROUND 6
+#define TP_PROTECTION 7
+#define TP_PAGE_STD 8
+#define TP_PAGE_HEADER 9
+#define TP_PAGE_FOOTER 10
+#define TP_TABLE 11
+#define TP_FONTEFF 12
+#define TP_ASIAN 13
+
diff --git a/sc/source/ui/inc/styledlg.hxx b/sc/source/ui/inc/styledlg.hxx
new file mode 100644
index 000000000000..63e37becf188
--- /dev/null
+++ b/sc/source/ui/inc/styledlg.hxx
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_STYLEDLG_HXX
+#define SC_STYLEDLG_HXX
+
+#ifndef _SFX_HXX
+#endif
+
+#include <sfx2/styledlg.hxx>
+
+//==================================================================
+
+class SfxStyleSheetBase;
+
+class ScStyleDlg : public SfxStyleDialog
+{
+public:
+ ScStyleDlg( Window* pParent,
+ SfxStyleSheetBase& rStyleBase,
+ USHORT nRscId );
+ ~ScStyleDlg();
+
+protected:
+ virtual void PageCreated( USHORT nPageId, SfxTabPage& rTabPage );
+ virtual const SfxItemSet* GetRefreshedSet();
+
+private:
+ USHORT nDlgRsc;
+};
+
+
+#endif // SC_STYLEDLG_HXX
+
+
diff --git a/sc/source/ui/inc/submenu.hrc b/sc/source/ui/inc/submenu.hrc
new file mode 100644
index 000000000000..4e5ad6d28d9e
--- /dev/null
+++ b/sc/source/ui/inc/submenu.hrc
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// IDs fuer Untermenues
+
+// 1 ist nicht erlaubt ????
+#define SUBMENU_EDIT 2
+#define SUBMENU_FILL 3
+#define SUBMENU_DELBREAK 4
+#define SUBMENU_VIEW 5
+#define SUBMENU_INSERT 6
+#define SUBMENU_INSBREAK 7
+#define SUBMENU_NAME 8
+#define SUBMENU_INSOBJ 9
+#define SUBMENU_DATA 10
+#define SUBMENU_FILTER 11
+#define SUBMENU_OUTLINE 12
+#define SUBMENU_PIVOT 13
+#define SUBMENU_EXTRA 14
+#define SUBMENU_AUDIT 15
+#define SUBMENU_PROTECT 16
+#define SUBMENU_ROW 17
+#define SUBMENU_COL 18
+#define SUBMENU_TAB 19
+#define SUBMENU_MERGE 20
+#define SUBMENU_AREA 21
+#define SUBMENU_MIRROR 22
+#define SUBMENU_OBJARRANGE 23
+#define SUBMENU_ANCHOR 24
+#define SUBMENU_POPARRANGE 25
+#define SUBMENU_OLEARRANGE 26
+#define SUBMENU_MAIL 27
+#define SUBMENU_OPTIONS 28
+#define SUBMENU_TOOLBARS 29
+#define SUBMENU_GRAPHIC 30
+#define SUBMENU_SPELLING 31
+#define SUBMENU_CELLCONT 32
+#define SUBMENU_OBJMIRROR 33
+#define SUBMENU_OBJALIGN 34
+#define SUBMENU_OBJANCHOR 35
+#define SUBMENU_SENDTO 36
+#define SUBMENU_CHANGES 37
+#define SUBMENU_EDIT_TABLE 38
+#define MN_TEMPLATES 39
diff --git a/sc/source/ui/inc/subtdlg.hrc b/sc/source/ui/inc/subtdlg.hrc
new file mode 100644
index 000000000000..66c63df48953
--- /dev/null
+++ b/sc/source/ui/inc/subtdlg.hrc
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc"
+
+/*
+#define RID_SCDLG_SUBTOTALS 256
+#define RID_SCPAGE_SUBT_GROUP 256
+#define RID_SCPAGE_SUBT_OPTIONS 257
+*/
+
+// TabDialog
+#define BTN_REMOVE 1
+#define PAGE_GROUP1 2
+#define PAGE_GROUP2 3
+#define PAGE_GROUP3 4
+#define PAGE_OPTIONS 5
+
+// Gruppen TabPages
+#define FT_GROUP 10
+#define LB_GROUP 11
+#define FT_COLUMNS 12
+#define WND_COLUMNS 13
+#define LB_FUNCTIONS 14
+#define FT_FUNCTIONS 15
+
+// Optionen TabPage
+#define FL_GROUP 20
+#define BTN_PAGEBREAK 21
+#define BTN_CASE 22
+#define BTN_SORT 23
+
+#define FL_SORT 30
+#define BTN_ASCENDING 31
+#define BTN_DESCENDING 32
+#define BTN_FORMATS 33
+#define BTN_USERDEF 34
+#define LB_USERDEF 35
+
+
diff --git a/sc/source/ui/inc/subtdlg.hxx b/sc/source/ui/inc/subtdlg.hxx
new file mode 100644
index 000000000000..ec68d0e1fba1
--- /dev/null
+++ b/sc/source/ui/inc/subtdlg.hxx
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_SUBTDLG_HXX
+#define SC_SUBTDLG_HXX
+
+#ifndef _SFX_HXX
+#endif
+
+#include <sfx2/tabdlg.hxx>
+
+#include "scui_def.hxx" //CHINA001
+//------------------------------------------------------------------------
+
+//CHINA001 #define SCRET_REMOVE 0x42
+
+//==================================================================
+
+class ScSubTotalDlg : public SfxTabDialog
+{
+public:
+ ScSubTotalDlg( Window* pParent,
+ const SfxItemSet* pArgSet );
+private:
+ PushButton aBtnRemove;
+ DECL_LINK( RemoveHdl, PushButton * );
+};
+
+
+#endif // SC_SUBTDLG_HXX
+
+
diff --git a/sc/source/ui/inc/tabbgcolordlg.hxx b/sc/source/ui/inc/tabbgcolordlg.hxx
new file mode 100644
index 000000000000..338609ae0e4d
--- /dev/null
+++ b/sc/source/ui/inc/tabbgcolordlg.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: tabbgcolordlg.hxx,v $
+ * $Revision: 1.0 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TABBGCOLORDLG_HXX
+#define SC_TABBGCOLORDLG_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/imagebtn.hxx>
+#include <svtools/valueset.hxx>
+
+//------------------------------------------------------------------------
+
+class ScTabBgColorDlg : public ModalDialog
+{
+public:
+ ScTabBgColorDlg( Window* pParent,
+ const String& rTitle,
+ const String& rTabBgColorNoColorText,
+ const Color& rDefaultColor,
+ ULONG nHelpId );
+ ~ScTabBgColorDlg();
+
+ void GetSelectedColor( Color& rColor ) const;
+
+private:
+ class ScTabBgColorValueSet : public ValueSet
+ {
+ public:
+ ScTabBgColorValueSet(Control* pParent, const ResId& rResId, ScTabBgColorDlg* pTabBgColorDlg);
+
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ private:
+ ScTabBgColorDlg* aTabBgColorDlg;
+ };
+
+ Control aBorderWin;
+ ScTabBgColorValueSet aTabBgColorSet;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ Color aTabBgColor;
+ const String aTabBgColorNoColorText;
+ ULONG mnHelpId;
+
+ void FillColorValueSets_Impl();
+
+ DECL_LINK( TabBgColorDblClickHdl_Impl, ValueSet* );
+ DECL_LINK( TabBgColorOKHdl_Impl, OKButton* pBtn );
+};
+
+#endif // SC_TABBGCOLORDLG_HXX
diff --git a/sc/source/ui/inc/tabcont.hxx b/sc/source/ui/inc/tabcont.hxx
new file mode 100644
index 000000000000..d77ee812fdb3
--- /dev/null
+++ b/sc/source/ui/inc/tabcont.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TABCONT_HXX
+#define SC_TABCONT_HXX
+
+#include "address.hxx"
+#include <svtools/tabbar.hxx>
+#include <svtools/transfer.hxx>
+
+
+class ScViewData;
+
+// ---------------------------------------------------------------------------
+
+// initial size
+#define SC_TABBAR_DEFWIDTH 270
+
+
+class ScTabControl : public TabBar, public DropTargetHelper, public DragSourceHelper
+{
+private:
+ ScViewData* pViewData;
+ USHORT nMouseClickPageId; /// Last page ID after mouse button down/up
+ USHORT nSelPageIdByMouse; /// Selected page ID, if selected with mouse
+ BOOL bErrorShown;
+
+ void DoDrag( const Region& rRegion );
+
+ USHORT GetMaxId() const;
+ SCTAB GetPrivatDropPos(const Point& rPos );
+
+protected:
+ virtual void Select();
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+
+ virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
+ virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
+
+ virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+
+ virtual long StartRenaming();
+ virtual long AllowRenaming();
+ virtual void EndRenaming();
+ virtual void Mirror();
+
+public:
+ ScTabControl( Window* pParent, ScViewData* pData );
+ ~ScTabControl();
+
+ using TabBar::StartDrag;
+
+ void UpdateStatus();
+ void ActivateView(BOOL bActivate);
+
+ void SetSheetLayoutRTL( BOOL bSheetRTL );
+};
+
+
+
+#endif
diff --git a/sc/source/ui/inc/tabopdlg.hrc b/sc/source/ui/inc/tabopdlg.hrc
new file mode 100644
index 000000000000..5ae127b63e73
--- /dev/null
+++ b/sc/source/ui/inc/tabopdlg.hrc
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "sc.hrc" // ->RID_SCDLG_TABOP
+
+#define ED_FORMULARANGE 1
+#define ED_ROWCELL 2
+#define ED_COLCELL 3
+#define FT_FORMULARANGE 1
+#define FT_ROWCELL 2
+#define FT_COLCELL 3
+#define RB_FORMULARANGE 1
+#define RB_ROWCELL 2
+#define RB_COLCELL 3
+#define FL_VARIABLES 1
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_HELP 1
+#define STR_NOFORMULA 1
+#define STR_NOCOLROW 2
+#define STR_WRONGFORMULA 3
+#define STR_WRONGROWCOL 4
+#define STR_NOCOLFORMULA 5
+#define STR_NOROWFORMULA 6
+
+
diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx
new file mode 100644
index 000000000000..e9286ca5ee96
--- /dev/null
+++ b/sc/source/ui/inc/tabopdlg.hxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TABOPDLG_HXX
+#define SC_TABOPDLG_HXX
+
+#include <vcl/fixed.hxx>
+#include <vcl/group.hxx>
+#include "global.hxx"
+#include "address.hxx"
+#include "anyrefdg.hxx"
+
+
+//------------------------------------------------------------------------
+
+enum ScTabOpErr
+{
+ TABOPERR_NOFORMULA = 1,
+ TABOPERR_NOCOLROW,
+ TABOPERR_WRONGFORMULA,
+ TABOPERR_WRONGROW,
+ TABOPERR_NOCOLFORMULA,
+ TABOPERR_WRONGCOL,
+ TABOPERR_NOROWFORMULA
+};
+
+//========================================================================
+
+class ScTabOpDlg : public ScAnyRefDlg
+{
+public:
+ ScTabOpDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScDocument* pDocument,
+ const ScRefAddress& rCursorPos );
+ ~ScTabOpDlg();
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc );
+ virtual BOOL IsRefInputMode() const { return TRUE; }
+ virtual void SetActive();
+
+ virtual BOOL Close();
+
+private:
+ FixedLine aFlVariables;
+ FixedText aFtFormulaRange;
+ formula::RefEdit aEdFormulaRange;
+ formula::RefButton aRBFormulaRange;
+
+ FixedText aFtRowCell;
+ formula::RefEdit aEdRowCell;
+ formula::RefButton aRBRowCell;
+
+ FixedText aFtColCell;
+ formula::RefEdit aEdColCell;
+ formula::RefButton aRBColCell;
+
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ ScRefAddress theFormulaCell;
+ ScRefAddress theFormulaEnd;
+ ScRefAddress theRowCell;
+ ScRefAddress theColCell;
+
+ ScDocument* pDoc;
+ const SCTAB nCurTab;
+ formula::RefEdit* pEdActive;
+ BOOL bDlgLostFocus;
+ const String errMsgNoFormula;
+ const String errMsgNoColRow;
+ const String errMsgWrongFormula;
+ const String errMsgWrongRowCol;
+ const String errMsgNoColFormula;
+ const String errMsgNoRowFormula;
+
+#ifdef _TABOPDLG_CXX
+ void Init();
+ void RaiseError( ScTabOpErr eError );
+
+ DECL_LINK( BtnHdl, PushButton* );
+ DECL_LINK( GetFocusHdl, Control* );
+ DECL_LINK( LoseFocusHdl, Control* );
+#endif // _TABOPDLG_CXX
+};
+
+#endif // SC_TABOPDLG_HXX
+
+
+
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
new file mode 100644
index 000000000000..71d62f964fef
--- /dev/null
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TABPAGES_HXX
+#define SC_TABPAGES_HXX
+
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#include <svtools/stdctrl.hxx>
+#include <sfx2/tabdlg.hxx>
+
+//========================================================================
+
+class ScTabPageProtection : public SfxTabPage
+{
+public:
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rAttrSet );
+ static USHORT* GetRanges ();
+ virtual BOOL FillItemSet ( SfxItemSet& rCoreAttrs );
+ virtual void Reset ( const SfxItemSet& );
+
+protected:
+ using SfxTabPage::DeactivatePage;
+ virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
+
+private:
+ ScTabPageProtection( Window* pParent,
+ const SfxItemSet& rCoreAttrs );
+ ~ScTabPageProtection();
+
+private:
+ FixedLine aFlProtect;
+ TriStateBox aBtnHideCell;
+ TriStateBox aBtnProtect;
+ TriStateBox aBtnHideFormula;
+ FixedInfo aTxtHint;
+
+ FixedLine aFlPrint;
+ TriStateBox aBtnHidePrint;
+ FixedInfo aTxtHint2;
+
+ // aktueller Status:
+ BOOL bTriEnabled; // wenn vorher Dont-Care
+ BOOL bDontCare; // alles auf TriState
+ BOOL bProtect; // einzelne Einstellungen ueber TriState sichern
+ BOOL bHideForm;
+ BOOL bHideCell;
+ BOOL bHidePrint;
+
+ // Handler:
+ DECL_LINK( ButtonClickHdl, TriStateBox* pBox );
+ void UpdateButtons();
+};
+
+
+
+#endif // SC_TABPAGES_HXX
diff --git a/sc/source/ui/inc/tabpopsh.hxx b/sc/source/ui/inc/tabpopsh.hxx
new file mode 100644
index 000000000000..177e3d75136f
--- /dev/null
+++ b/sc/source/ui/inc/tabpopsh.hxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TABPOPSH_HXX
+#define SC_TABPOPSH_HXX
+
+#include <sfx2/module.hxx>
+#include <sfx2/shell.hxx>
+
+#include "shellids.hxx"
+
+class ScTabPopShell : public SfxShell
+{
+public:
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SCID_TABPOP_SHELL);
+
+ ScTabPopShell(SfxItemPool& rItemPool);
+ ~ScTabPopShell();
+
+ void DummyExec( SfxRequest& rReq );
+ void DummyState( SfxItemSet& rSet );
+};
+
+
+
+#endif
+
+
diff --git a/sc/source/ui/inc/tabsplit.hxx b/sc/source/ui/inc/tabsplit.hxx
new file mode 100644
index 000000000000..a06664c7c4ee
--- /dev/null
+++ b/sc/source/ui/inc/tabsplit.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TABSPLIT_HXX
+#define SC_TABSPLIT_HXX
+
+
+#include <vcl/split.hxx>
+
+class ScViewData;
+
+class ScTabSplitter : public Splitter
+{
+private:
+ ScViewData* pViewData;
+ BOOL bFixed;
+
+protected:
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+
+ virtual void Splitting( Point& rSplitPos );
+
+public:
+ ScTabSplitter( Window* pParent, WinBits nWinStyle,
+ ScViewData* pData );
+ ~ScTabSplitter();
+
+ void SetFixed(BOOL bSet);
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
new file mode 100644
index 000000000000..a6e99613f2ea
--- /dev/null
+++ b/sc/source/ui/inc/tabview.hxx
@@ -0,0 +1,533 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SC_TABVIEW_HXX
+#define SC_TABVIEW_HXX
+
+#include <vcl/scrbar.hxx>
+
+//REMOVE #ifndef SO2_DECL_SVINPLACECLIENT_DEFINED
+//REMOVE #define SO2_DECL_SVINPLACECLIENT_DEFINED
+//REMOVE SO2_DECL_REF(SvInPlaceClient)
+//REMOVE #endif
+
+#include <sfx2/ipclient.hxx>
+
+#include "viewutil.hxx"
+#include "select.hxx"
+
+class ScEditEngineDefaulter;
+class ScGridWindow;
+class ScOutlineWindow;
+class ScRowBar;
+class ScColBar;
+class ScTabControl;
+class ScTabViewShell;
+class SfxPrinter;
+class ScDrawView;
+class SvBorder;
+class FuPoor;
+class Splitter;
+class ScTabSplitter;
+class SdrView;
+class SdrObject;
+class ScHintWindow;
+class ScPageBreakData;
+class ScHighlightRanges;
+struct ChartSelectionInfo;
+class SdrHdlList;
+
+namespace com { namespace sun { namespace star {
+namespace chart2 { namespace data {
+ struct HighlightedRange;
+}}}}}
+
+#define SPLIT_HANDLE_SIZE 3
+#define SC_FORCEMODE_NONE 0xff
+
+// ---------------------------------------------------------------------------
+// Hilfs - Fenster
+
+class ScCornerButton : public Window
+{
+private:
+ ScViewData* pViewData;
+ BOOL bAdd;
+
+protected:
+ virtual void Paint( const Rectangle& rRect );
+ virtual void Resize();
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+public:
+ ScCornerButton( Window* pParent, ScViewData* pData, BOOL bAdditional );
+ ~ScCornerButton();
+
+ virtual void StateChanged( StateChangedType nType );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+};
+
+
+// ---------------------------------------------------------------------------
+
+class ScTabView
+{
+private:
+ Window* pFrameWin; // als erstes !!!
+ ScViewData aViewData; // muss ganz vorne stehen !
+
+ ScViewSelectionEngine* pSelEngine;
+ ScViewFunctionSet aFunctionSet;
+
+ ScHeaderSelectionEngine* pHdrSelEng;
+ ScHeaderFunctionSet aHdrFunc;
+
+ SfxInPlaceClient* pIPClient;
+
+ ScDrawView* pDrawView;
+
+ Size aFrameSize; // wie bei DoResize uebergeben
+ Point aBorderPos;
+
+ BOOL bDrawSelMode; // nur Zeichenobjekte selektieren ?
+
+ FuPoor* pDrawActual;
+ FuPoor* pDrawOld;
+
+ ScGridWindow* pGridWin[4];
+ ScColBar* pColBar[2];
+ ScRowBar* pRowBar[2];
+ ScOutlineWindow* pColOutline[2];
+ ScOutlineWindow* pRowOutline[2];
+ ScTabSplitter* pHSplitter;
+ ScTabSplitter* pVSplitter;
+ ScTabControl* pTabControl;
+ ScrollBar aVScrollTop;
+ ScrollBar aVScrollBottom; // anfangs sichtbar
+ ScrollBar aHScrollLeft; // anfangs sichtbar
+ ScrollBar aHScrollRight;
+ ScCornerButton aCornerButton;
+ ScCornerButton aTopButton;
+ ScrollBarBox aScrollBarBox;
+
+ ScHintWindow* pInputHintWindow; // Eingabemeldung bei Gueltigkeit
+
+ ScPageBreakData* pPageBreakData; // fuer Seitenumbruch-Modus
+ ScHighlightRanges* pHighlightRanges;
+
+ ScDocument* pBrushDocument; // cell formats for format paint brush
+ SfxItemSet* pDrawBrushSet; // drawing object attributes for paint brush
+ BOOL bLockPaintBrush; // keep for more than one use?
+
+ Timer aScrollTimer;
+ ScGridWindow* pTimerWindow;
+ MouseEvent aTimerMEvt;
+
+ ULONG nTipVisible;
+
+ BOOL bDragging; // fuer Scrollbars
+ long nPrevDragPos;
+
+ BOOL bIsBlockMode; // Block markieren
+ BOOL bBlockNeg; // wird Markierung aufgehoben?
+ BOOL bBlockCols; // werden ganze Spalten markiert?
+ BOOL bBlockRows; // werden ganze Zeilen markiert?
+
+ SCCOL nBlockStartX;
+ SCCOL nBlockStartXOrig;
+ SCCOL nBlockEndX;
+
+ SCROW nBlockStartY;
+ SCROW nBlockStartYOrig;
+ SCROW nBlockEndY;
+
+ SCTAB nBlockStartZ;
+ SCTAB nBlockEndZ;
+
+ SCCOL nOldCurX;
+ SCROW nOldCurY;
+
+ double mfPendingTabBarWidth; // Tab bar width relative to frame window width.
+
+ BOOL bMinimized;
+ BOOL bInUpdateHeader;
+ BOOL bInActivatePart;
+ BOOL bInZoomUpdate;
+ BOOL bMoveIsShift;
+ BOOL bNewStartIfMarking;
+
+ void Init();
+
+ void DoAddWin( ScGridWindow* pWin );
+
+ void InitScrollBar( ScrollBar& rScrollBar, long nMaxVal );
+ DECL_LINK( ScrollHdl, ScrollBar* );
+ DECL_LINK( EndScrollHdl, ScrollBar* );
+
+ DECL_LINK( SplitHdl, Splitter* );
+ void DoHSplit(long nSplitPos);
+ void DoVSplit(long nSplitPos);
+
+ DECL_LINK( TimerHdl, Timer* );
+
+ void UpdateVarZoom();
+
+ static void SetScrollBar( ScrollBar& rScroll, long nRangeMax, long nVisible, long nPos, BOOL bLayoutRTL );
+ static long GetScrollBarPos( ScrollBar& rScroll, BOOL bLayoutRTL );
+
+protected:
+ void UpdateHeaderWidth( const ScVSplitPos* pWhich = NULL,
+ const SCROW* pPosY = NULL );
+
+ void HideTip();
+ void ShowRefTip();
+
+ void ZoomChanged();
+ void UpdateShow();
+ void GetBorderSize( SvBorder& rBorder, const Size& rSize );
+
+ void ResetDrawDragMode();
+ BOOL IsDrawTextEdit() const;
+ void DrawEnableAnim(BOOL bSet);
+ //HMHvoid DrawShowMarkHdl(BOOL bShow);
+
+ void MakeDrawView( BYTE nForceDesignMode = SC_FORCEMODE_NONE );
+
+ void HideNoteMarker();
+
+ void UpdateIMap( SdrObject* pObj );
+
+public:
+ ScTabView( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
+//UNUSED2009-05 ScTabView( Window* pParent, const ScTabView& rScTabView, ScTabViewShell* pViewShell );
+ ~ScTabView();
+
+ void MakeDrawLayer();
+
+ void HideListBox();
+
+ BOOL HasHintWindow() const { return pInputHintWindow != NULL; }
+ void RemoveHintWindow();
+ void TestHintWindow();
+
+
+ DECL_LINK( TabBarResize, void* );
+ /** Sets an absolute tab bar width (in pixels). */
+ void SetTabBarWidth( long nNewWidth );
+ /** Sets a relative tab bar width.
+ @param fRelTabBarWidth Tab bar width relative to frame window width (0.0 ... 1.0). */
+ void SetRelTabBarWidth( double fRelTabBarWidth );
+ /** Sets a relative tab bar width. Tab bar is resized again in next DoResize().
+ @param fRelTabBarWidth Tab bar width relative to frame window width (0.0 ... 1.0). */
+ void SetPendingRelTabBarWidth( double fRelTabBarWidth );
+ /** Returns the current tab bar width in pixels. */
+ long GetTabBarWidth() const;
+ /** Returns the current tab bar width relative to the frame window width (0.0 ... 1.0). */
+ double GetRelTabBarWidth() const;
+ /** Returns the pending tab bar width relative to the frame window width (0.0 ... 1.0). */
+ double GetPendingRelTabBarWidth() const;
+
+ void DoResize( const Point& rOffset, const Size& rSize, BOOL bInner = FALSE );
+ void RepeatResize( BOOL bUpdateFix = TRUE );
+ void UpdateFixPos();
+ Point GetGridOffset() const;
+
+ BOOL IsDrawSelMode() const { return bDrawSelMode; }
+ void SetDrawSelMode(BOOL bNew) { bDrawSelMode = bNew; }
+
+ void SetDrawFuncPtr(FuPoor* pFuncPtr) { pDrawActual = pFuncPtr; }
+ void SetDrawFuncOldPtr(FuPoor* pFuncPtr) { pDrawOld = pFuncPtr; }
+ FuPoor* GetDrawFuncPtr() { return pDrawActual; }
+ FuPoor* GetDrawFuncOldPtr() { return pDrawOld; }
+
+ void DrawDeselectAll();
+ void DrawMarkListHasChanged();
+ void UpdateAnchorHandles();
+//UNUSED2008-05 String GetSelectedChartName() const;
+
+ ScPageBreakData* GetPageBreakData() { return pPageBreakData; }
+ ScHighlightRanges* GetHighlightRanges() { return pHighlightRanges; }
+
+ void UpdatePageBreakData( BOOL bForcePaint = FALSE );
+
+ void DrawMarkRect( const Rectangle& rRect );
+
+ ScViewData* GetViewData() { return &aViewData; }
+ const ScViewData* GetViewData() const { return &aViewData; }
+
+ ScViewFunctionSet* GetFunctionSet() { return &aFunctionSet; }
+ ScViewSelectionEngine* GetSelEngine() { return pSelEngine; }
+
+ BOOL SelMouseButtonDown( const MouseEvent& rMEvt );
+
+ ScDrawView* GetScDrawView() { return pDrawView; }
+ SdrView* GetSdrView(); // gegen CLOKs
+
+ BOOL IsMinimized() const { return bMinimized; }
+
+ void TabChanged();
+ void SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll );
+ SC_DLLPUBLIC void RefreshZoom();
+ void SetPagebreakMode( BOOL bSet );
+
+ void UpdateLayerLocks();
+
+ void UpdateDrawTextOutliner();
+ void DigitLanguageChanged();
+
+ void UpdateInputLine();
+
+ void InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType,
+ BOOL bPaint = TRUE );
+ void DoneRefMode( BOOL bContinue = FALSE );
+ void UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ );
+ void StopRefMode();
+
+//UNUSED2008-05 void EndSelection();
+ void StopMarking();
+ void FakeButtonUp( ScSplitPos eWhich );
+
+ Window* GetActiveWin();
+ Window* GetWindowByPos( ScSplitPos ePos );
+
+ ScSplitPos FindWindow( Window* pWindow ) const;
+
+ void SetActivePointer( const Pointer& rPointer );
+//UNUSED2008-05 void SetActivePointer( const ResId& rId );
+
+ void ActiveGrabFocus();
+//UNUSED2008-05 void ActiveCaptureMouse();
+//UNUSED2008-05 void ActiveReleaseMouse();
+//UNUSED2008-05 Point ActivePixelToLogic( const Point& rDevicePoint );
+
+ void ClickCursor( SCCOL nPosX, SCROW nPosY, BOOL bControl );
+
+ SC_DLLPUBLIC void SetCursor( SCCOL nPosX, SCROW nPosY, BOOL bNew = FALSE );
+
+ SC_DLLPUBLIC void CellContentChanged();
+ void SelectionChanged();
+ void CursorPosChanged();
+ void UpdateInputContext();
+
+ void CheckSelectionTransfer();
+
+ void InvertHorizontal( ScVSplitPos eWhich, long nDragPos );
+ void InvertVertical( ScHSplitPos eWhich, long nDragPos );
+
+ Point GetInsertPos();
+
+ Point GetChartInsertPos( const Size& rSize, const ScRange& rCellRange );
+ Point GetChartDialogPos( const Size& rDialogSize, const Rectangle& rLogicChart );
+
+ void UpdateAutoFillMark();
+
+ void HideCursor(); // nur aktiver Teil
+ void ShowCursor();
+ void HideAllCursors();
+ void ShowAllCursors();
+
+ void AlignToCursor( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
+ const ScSplitPos* pWhich = NULL );
+
+ SvxZoomType GetZoomType() const;
+ void SetZoomType( SvxZoomType eNew, BOOL bAll );
+ USHORT CalcZoom( SvxZoomType eType, USHORT nOldZoom );
+
+// void CalcZoom( SvxZoomType eType, USHORT& rZoom, SCCOL& rCol, SCROW& rRow );
+
+ sal_Bool HasPageFieldDataAtCursor() const;
+ void StartDataSelect();
+
+ // MoveCursorAbs - absolut
+ // MoveCursorRel - einzelne Zellen
+ // MoveCursorPage - Bildschirmseite
+ // MoveCursorArea - Datenblock
+ // MoveCursorEnd - links oben / benutzter Bereich
+
+ SC_DLLPUBLIC void MoveCursorAbs( SCsCOL nCurX, SCsROW nCurY, ScFollowMode eMode,
+ BOOL bShift, BOOL bControl,
+ BOOL bKeepOld = FALSE, BOOL bKeepSel = FALSE );
+ void MoveCursorRel( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
+ BOOL bShift, BOOL bKeepSel = FALSE );
+ void MoveCursorPage( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
+ BOOL bShift, BOOL bKeepSel = FALSE );
+ void MoveCursorArea( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
+ BOOL bShift, BOOL bKeepSel = FALSE );
+ void MoveCursorEnd( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode,
+ BOOL bShift, BOOL bKeepSel = FALSE );
+ void MoveCursorScreen( SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, BOOL bShift );
+
+ void MoveCursorEnter( BOOL bShift ); // Shift fuer Richtung (kein Markieren)
+
+ BOOL MoveCursorKeyInput( const KeyEvent& rKeyEvent );
+
+ void FindNextUnprot( BOOL bShift, BOOL bInSelection = TRUE );
+
+ void SetNewStartIfMarking();
+
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ //void SetTabNo( SCTAB nTab, BOOL bNew = FALSE, BOOL bExtendSelection = FALSE );
+ SC_DLLPUBLIC void SetTabNo( SCTAB nTab, BOOL bNew = FALSE, BOOL bExtendSelection = FALSE );
+ //-->Added by PengYunQuan for Validity Cell Range Picker
+ void SelectNextTab( short nDir, BOOL bExtendSelection = FALSE );
+
+ void ActivateView( BOOL bActivate, BOOL bFirst );
+ void ActivatePart( ScSplitPos eWhich );
+ BOOL IsInActivatePart() const { return bInActivatePart; }
+
+ void SetTimer( ScGridWindow* pWin, const MouseEvent& rMEvt );
+ void ResetTimer();
+
+ void ScrollX( long nDeltaX, ScHSplitPos eWhich, BOOL bUpdBars = TRUE );
+ void ScrollY( long nDeltaY, ScVSplitPos eWhich, BOOL bUpdBars = TRUE );
+ SC_DLLPUBLIC void ScrollLines( long nDeltaX, long nDeltaY ); // aktives
+
+ BOOL ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos );
+
+ void ScrollToObject( SdrObject* pDrawObj );
+ void MakeVisible( const Rectangle& rHMMRect );
+
+ // Zeichnen
+
+ void InvertBlockMark(SCCOL nBlockStartX, SCROW nBlockStartY,
+ SCCOL nBlockEndX, SCROW nBlockEndY);
+
+//UNUSED2008-05 void DrawDragRect( SCCOL nStartX, SCROW nStartY, SCCOL nEndX, SCROW nEndY,
+//UNUSED2008-05 ScSplitPos ePos );
+//UNUSED2008-05 void PaintCell( SCCOL nCol, SCROW nRow, SCTAB nTab );
+//UNUSED2008-05 void PaintLeftRow( SCROW nRow );
+//UNUSED2008-05 void PaintTopCol( SCCOL nCol );
+
+ void PaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+ ScUpdateMode eMode = SC_UPDATE_ALL );
+
+ void PaintGrid();
+
+ void PaintTopArea( SCCOL nStartCol, SCCOL nEndCol );
+ void PaintTop();
+
+ void PaintLeftArea( SCROW nStartRow, SCROW nEndRow );
+ void PaintLeft();
+
+ BOOL PaintExtras();
+
+ void RecalcPPT();
+
+ void CreateAnchorHandles(SdrHdlList& rHdl, const ScAddress& rAddress);
+
+ void UpdateSelectionOverlay();
+ void UpdateShrinkOverlay();
+ void UpdateAllOverlays();
+
+ void UpdateFormulas();
+ void InterpretVisible();
+ void CheckNeedsRepaint();
+
+ void PaintRangeFinder( long nNumber = -1 );
+ void AddHighlightRange( const ScRange& rRange, const Color& rColor );
+ void ClearHighlightRanges();
+
+ void DoChartSelection( const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::chart2::data::HighlightedRange > & rHilightRanges );
+
+ long GetGridWidth( ScHSplitPos eWhich );
+ long GetGridHeight( ScVSplitPos eWhich );
+
+ void UpdateScrollBars();
+ void SetNewVisArea();
+
+ void InvalidateAttribs();
+
+ void MakeEditView( ScEditEngineDefaulter* pEngine, SCCOL nCol, SCROW nRow );
+ void KillEditView( BOOL bNoPaint );
+ void UpdateEditView();
+
+
+ // Bloecke
+
+ void SelectAll( BOOL bContinue = FALSE );
+ void SelectAllTables();
+ void DeselectAllTables();
+
+ void MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
+ BOOL bCols = FALSE, BOOL bRows = FALSE, BOOL bCellSelection = FALSE );
+ void InitBlockMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
+ BOOL bTestNeg = FALSE,
+ BOOL bCols = FALSE, BOOL bRows = FALSE );
+ void InitOwnBlockMode();
+ void DoneBlockMode( BOOL bContinue = FALSE );
+
+ BOOL IsBlockMode() const { return bIsBlockMode; }
+
+ void MarkColumns();
+ void MarkRows();
+ void MarkDataArea( BOOL bIncludeCursor = TRUE );
+ void MarkMatrixFormula();
+ void Unmark();
+
+ void MarkRange( const ScRange& rRange, BOOL bSetCursor = TRUE, BOOL bContinue = FALSE );
+
+ BOOL IsMarking( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
+
+ void PaintMarks( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
+ void PaintBlock( BOOL bReset = FALSE );
+
+ void SetMarkData( const ScMarkData& rNew );
+ void MarkDataChanged();
+
+ void LockModifiers( USHORT nModifiers );
+ USHORT GetLockedModifiers() const;
+ void ViewOptionsHasChanged( BOOL bHScrollChanged,
+ BOOL bGraphicsChanged = FALSE);
+
+ Point GetMousePosPixel();
+
+ void SnapSplitPos( Point& rScreenPosPixel );
+ void FreezeSplitters( BOOL bFreeze );
+ void RemoveSplit();
+ void SplitAtCursor();
+ void SplitAtPixel( const Point& rPixel, BOOL bHor, BOOL bVer );
+ void InvalidateSplit();
+
+ void ErrorMessage( USHORT nGlobStrId );
+ Window* GetParentOrChild( USHORT nChildId );
+
+ void EnableRefInput(BOOL bFlag=TRUE);
+
+ Window* GetFrameWin() const { return pFrameWin; }
+
+ BOOL HasPaintBrush() const { return pBrushDocument || pDrawBrushSet; }
+ ScDocument* GetBrushDocument() const { return pBrushDocument; }
+ SfxItemSet* GetDrawBrushSet() const { return pDrawBrushSet; }
+ BOOL IsPaintBrushLocked() const { return bLockPaintBrush; }
+ void SetBrushDocument( ScDocument* pNew, BOOL bLock );
+ void SetDrawBrushSet( SfxItemSet* pNew, BOOL bLock );
+ void ResetBrushDocument();
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
new file mode 100644
index 000000000000..28cc2a823928
--- /dev/null
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -0,0 +1,442 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TABVWSH_HXX
+#define SC_TABVWSH_HXX
+
+#include <svtools/htmlcfg.hxx>
+#include <sfx2/viewsh.hxx>
+#include <sfx2/viewfac.hxx>
+#include <editeng/svxenum.hxx>
+#include "scdllapi.h"
+#include "dbfunc.hxx" // -> tabview
+#include "target.hxx"
+#include "rangelst.hxx" // ScRangeListRef
+#include "shellids.hxx"
+#include "tabprotection.hxx" // for ScPasswordHash
+
+class FmFormShell;
+class SbxObject;
+class SdrOle2Obj;
+class SfxBindings;
+class SfxChildWindow;
+class SfxModelessDialog;
+class SvxBorderLine;
+class SvxBoxObjectRef;
+class SvxNumberInfoItem;
+struct SfxChildWinInfo;
+
+class ScArea;
+class ScAuditingShell;
+class ScDrawShell;
+class ScDrawTextObjectBar;
+class ScEditShell;
+class ScInputHandler;
+class ScPivotShell;
+class ScDrawFormShell;
+class ScCellShell;
+class ScOleObjectShell;
+class ScGraphicShell;
+class ScMediaShell;
+class ScChartShell;
+class ScPageBreakShell;
+class ScDPObject;
+class ScNavigatorSettings;
+
+struct ScHeaderFieldData;
+
+namespace com { namespace sun { namespace star { namespace frame {
+ class XDispatchProviderInterceptor;
+} } } }
+
+namespace svx {
+ class ExtrusionBar;
+ class FontworkBar;
+}
+
+enum ObjectSelectionType
+{
+ OST_NONE,
+ OST_Cell,
+ OST_Editing,
+ OST_DrawText,
+ OST_Drawing,
+ OST_DrawForm,
+ OST_Pivot,
+ OST_Auditing,
+ OST_OleObject,
+ OST_Chart,
+ OST_Graphic,
+ OST_Media
+};
+
+//==================================================================
+
+
+class ScTabViewShell: public SfxViewShell, public ScDBFunc
+{
+private:
+ static USHORT nInsertCtrlState;
+ static USHORT nInsCellsCtrlState;
+ static USHORT nInsObjCtrlState;
+
+ SvxHtmlOptions aHTMLOpt;
+ ObjectSelectionType eCurOST;
+ USHORT nDrawSfxId;
+ USHORT nCtrlSfxId;
+ USHORT nFormSfxId;
+ String sDrawCustom; // current custom shape type
+ ScDrawShell* pDrawShell;
+ ScDrawTextObjectBar* pDrawTextShell;
+ ScEditShell* pEditShell;
+ ScPivotShell* pPivotShell;
+ ScAuditingShell* pAuditingShell;
+ ScDrawFormShell* pDrawFormShell;
+ ScCellShell* pCellShell;
+ ScOleObjectShell* pOleObjectShell;
+ ScChartShell* pChartShell;
+ ScGraphicShell* pGraphicShell;
+ ScMediaShell* pMediaShell;
+ ScPageBreakShell* pPageBreakShell;
+ svx::ExtrusionBar* pExtrusionBarShell;
+ svx::FontworkBar* pFontworkBarShell;
+
+ FmFormShell* pFormShell;
+
+ ScInputHandler* pInputHandler; // fuer OLE-Eingabezeile
+
+ SvxBorderLine* pCurFrameLine;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XDispatchProviderInterceptor >
+ xDisProvInterceptor;
+
+ Point aWinPos;
+
+ ScTabViewTarget aTarget;
+ ScArea* pPivotSource;
+ ScDPObject* pDialogDPObject;
+
+ ScNavigatorSettings* pNavSettings;
+
+ // used in first Activate
+ BOOL bFirstActivate;
+
+ BOOL bActiveDrawSh;
+ BOOL bActiveDrawTextSh;
+ BOOL bActivePivotSh;
+ BOOL bActiveAuditingSh;
+ BOOL bActiveDrawFormSh;
+ BOOL bActiveOleObjectSh;
+ BOOL bActiveChartSh;
+ BOOL bActiveGraphicSh;
+ BOOL bActiveMediaSh;
+ BOOL bActiveEditSh;
+
+ BOOL bFormShellAtTop; // does the FormShell need to be on top?
+
+
+ BOOL bDontSwitch; // EditShell nicht abschalten
+ BOOL bInFormatDialog; // fuer GetSelectionText
+ BOOL bPrintSelected; // for result of SvxPrtQryBox
+
+ BOOL bReadOnly; // um Status-Aenderungen zu erkennen
+
+ SbxObject* pScSbxObject;
+
+//UNUSED2008-05 BOOL bChartDlgIsEdit; // Datenbereich aendern
+ BOOL bChartAreaValid; // wenn Chart aufgezogen wird
+ String aEditChartName;
+ ScRangeListRef aChartSource;
+ Rectangle aChartPos;
+ SCTAB nChartDestTab;
+ USHORT nCurRefDlgId;
+
+ SfxBroadcaster* pAccessibilityBroadcaster;
+
+ static const int MASTERENUMCOMMANDS = 6;
+ String aCurrShapeEnumCommand[ MASTERENUMCOMMANDS ];
+
+private:
+ void Construct( BYTE nForceDesignMode = SC_FORCEMODE_NONE );
+
+//UNUSED2008-05 void SetMySubShell( SfxShell* pShell );
+ SfxShell* GetMySubShell() const;
+
+ void DoReadUserData( const String& rData );
+ void DoReadUserDataSequence( const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& rSettings );
+
+ DECL_LINK( SimpleRefClose, String* );
+ DECL_LINK( SimpleRefDone, String* );
+ DECL_LINK( SimpleRefAborted, String* );
+ DECL_LINK( SimpleRefChange, String* );
+ DECL_LINK( FormControlActivated, FmFormShell* );
+ DECL_LINK( HtmlOptionsHdl, void * );
+
+protected:
+ virtual void Activate(BOOL bMDI);
+ virtual void Deactivate(BOOL bMDI);
+ virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+
+ virtual void ShowCursor(FASTBOOL bOn);
+
+ virtual void Move(); // Benachrichtigung
+
+ virtual void AdjustPosSizePixel( const Point &rPos, const Size &rSize ); // alt
+
+ virtual void InnerResizePixel( const Point &rOfs, const Size &rSize ); // neu
+ virtual void OuterResizePixel( const Point &rOfs, const Size &rSize );
+ virtual void SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY );
+
+ virtual void QueryObjAreaPixel( Rectangle& rRect ) const;
+
+ virtual Size GetOptimalSizePixel() const;
+
+ virtual String GetSelectionText( BOOL bWholeWord );
+ virtual BOOL HasSelection( BOOL bText ) const;
+ virtual String GetDescription() const;
+
+ virtual void WriteUserData(String &, BOOL bBrowse = FALSE);
+ virtual void ReadUserData(const String &, BOOL bBrowse = FALSE);
+ virtual void WriteUserDataSequence (::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
+ virtual void ReadUserDataSequence (const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
+
+ virtual void UIDeactivated( SfxInPlaceClient* pClient );
+
+ virtual FASTBOOL KeyInput( const KeyEvent &rKeyEvent );
+ virtual SdrView* GetDrawView() const;
+
+public:
+ TYPEINFO_VISIBILITY(SC_DLLPUBLIC);
+
+ SFX_DECL_INTERFACE(SCID_TABVIEW_SHELL)
+ SFX_DECL_VIEWFACTORY(ScTabViewShell);
+
+
+ // -> Clone-Methode fuer Factory
+
+//UNUSED2008-05 ScTabViewShell( SfxViewFrame* pViewFrame,
+//UNUSED2008-05 const ScTabViewShell& rWin );
+
+ // aus einer allgemeinen Shell konstruieren und
+ // soviel wie moeglich uebernehmen (SliderPos etc.):
+
+ ScTabViewShell( SfxViewFrame* pViewFrame,
+ SfxViewShell* pOldSh );
+
+ virtual ~ScTabViewShell();
+
+ Window* GetDialogParent();
+
+ bool IsRefInputMode() const;
+ void ExecuteInputDirect();
+
+ ScInputHandler* GetInputHandler() const;
+ void UpdateInputHandler( BOOL bForce = FALSE, BOOL bStopEditing = TRUE );
+ void UpdateInputHandlerCellAdjust( SvxCellHorJustify eJust );
+ BOOL TabKeyInput(const KeyEvent& rKEvt);
+ BOOL SfxKeyInput(const KeyEvent& rKEvt);
+
+ void SetActive();
+
+ SvxBorderLine* GetDefaultFrameLine() const { return pCurFrameLine; }
+ void SetDefaultFrameLine(const SvxBorderLine* pLine );
+
+//UNUSED2008-05 void ExecuteShowNIY( SfxRequest& rReq );
+//UNUSED2008-05 void StateDisabled( SfxItemSet& rSet );
+
+ SC_DLLPUBLIC void Execute( SfxRequest& rReq );
+ SC_DLLPUBLIC void GetState( SfxItemSet& rSet );
+
+ void ExecuteTable( SfxRequest& rReq );
+ void GetStateTable( SfxItemSet& rSet );
+
+ void WindowChanged();
+ void ExecDraw(SfxRequest&);
+ void ExecDrawIns(SfxRequest& rReq);
+ void GetDrawState(SfxItemSet &rSet);
+ void GetDrawInsState(SfxItemSet &rSet);
+ void ExecGallery(SfxRequest& rReq); // StarGallery
+ void GetGalleryState(SfxItemSet& rSet);
+
+ void ExecChildWin(SfxRequest& rReq);
+ void GetChildWinState( SfxItemSet& rSet );
+
+ void ExecImageMap( SfxRequest& rReq );
+ void GetImageMapState( SfxItemSet& rSet );
+
+ void ExecTbx( SfxRequest& rReq );
+ void GetTbxState( SfxItemSet& rSet );
+
+ void ExecuteSave( SfxRequest& rReq );
+ void GetSaveState( SfxItemSet& rSet );
+ void ExecSearch( SfxRequest& rReq );
+
+ void ExecuteUndo(SfxRequest& rReq);
+ void GetUndoState(SfxItemSet &rSet);
+
+ void ExecuteSbx( SfxRequest& rReq );
+ void GetSbxState( SfxItemSet& rSet );
+
+ void ExecuteObject(SfxRequest& rReq);
+ void GetObjectState(SfxItemSet &rSet);
+
+ void ExecDrawOpt(SfxRequest& rReq);
+ void GetDrawOptState(SfxItemSet &rSet);
+
+
+ void SetDrawShell( BOOL bActive );
+ void SetDrawTextShell( BOOL bActive );
+
+ void SetPivotShell( BOOL bActive );
+ ScArea* GetPivotSource(){return pPivotSource;}
+ void SetPivotSource(ScArea* pSrc){pPivotSource=pSrc;}
+ void SetDialogDPObject( const ScDPObject* pObj );
+ const ScDPObject* GetDialogDPObject() const { return pDialogDPObject; }
+
+ BOOL GetDontSwitch(){return bDontSwitch;}
+ void SetDontSwitch(BOOL bFlag){bDontSwitch=bFlag;}
+
+
+ void SetAuditShell( BOOL bActive );
+ void SetDrawFormShell( BOOL bActive );
+ void SetEditShell(EditView* pView, BOOL bActive );
+ void SetOleObjectShell( BOOL bActive );
+ void SetChartShell( BOOL bActive );
+ void SetGraphicShell( BOOL bActive );
+ void SetMediaShell( BOOL bActive );
+
+
+ void SetDrawShellOrSub();
+ void SetCurSubShell( ObjectSelectionType eOST, BOOL bForce = FALSE );
+
+ void SetFormShellAtTop( BOOL bSet );
+
+ ObjectSelectionType GetCurObjectSelectionType();
+
+ virtual ErrCode DoVerb(long nVerb);
+
+
+ void StopEditShell();
+ BOOL IsDrawTextShell() const;
+ BOOL IsAuditShell() const;
+
+ void SetDrawTextUndo( SfxUndoManager* pUndoMgr );
+
+ void FillFieldData( ScHeaderFieldData& rData );
+
+//UNUSED2008-05 void ResetChartArea();
+ void SetChartArea( const ScRangeListRef& rSource, const Rectangle& rDest );
+ BOOL GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const;
+
+//UNUSED2008-05 BOOL IsChartDlgEdit() const;
+//UNUSED2008-05 void SetChartDlgEdit(BOOL bFlag){bChartDlgIsEdit=bFlag;}
+
+ void SetEditChartName(const String& aStr){aEditChartName=aStr;}
+//UNUSED2008-05 const String& GetEditChartName() const;
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+ ScNavigatorSettings* GetNavigatorSettings();
+
+ // Drucken:
+ virtual SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
+ virtual USHORT SetPrinter( SfxPrinter* pNewPrinter,
+ USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false );
+
+ virtual PrintDialog* CreatePrintDialog( Window* pParent );
+ virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions );
+ virtual void PreparePrint( PrintDialog* pPrintDialog = NULL );
+ virtual ErrCode DoPrint( SfxPrinter *pPrinter,
+ PrintDialog *pPrintDialog,
+ BOOL bSilent, BOOL bIsAPI );
+ virtual USHORT Print( SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pPrintDialog = NULL );
+
+ void ConnectObject( SdrOle2Obj* pObj );
+ BOOL ActivateObject( SdrOle2Obj* pObj, long nVerb );
+
+ void DeactivateOle();
+
+ SC_DLLPUBLIC static ScTabViewShell* GetActiveViewShell();
+ SfxModelessDialog* CreateRefDialog( SfxBindings* pB, SfxChildWindow* pCW,
+ SfxChildWinInfo* pInfo,
+ Window* pParent, USHORT nSlotId );
+
+ void UpdateOleZoom();
+ inline SbxObject* GetScSbxObject() const
+ { return pScSbxObject; }
+ inline void SetScSbxObject( SbxObject* pOb )
+ { pScSbxObject = pOb; }
+
+ FmFormShell* GetFormShell() const { return pFormShell; }
+
+ void InsertURL( const String& rName, const String& rURL, const String& rTarget,
+ USHORT nMode );
+ void InsertURLButton( const String& rName, const String& rURL, const String& rTarget,
+ const Point* pInsPos = NULL );
+ void InsertURLField( const String& rName, const String& rURL, const String& rTarget );
+
+ BOOL SelectObject( const String& rName );
+
+ void SetInFormatDialog(BOOL bFlag) {bInFormatDialog=bFlag;}
+ BOOL IsInFormatDialog() {return bInFormatDialog;}
+
+ void ForceMove() { Move(); }
+
+ void MakeNumberInfoItem ( ScDocument* pDoc,
+ ScViewData* pViewData,
+ SvxNumberInfoItem** ppItem );
+
+ void UpdateNumberFormatter ( ScDocument* pDoc,
+ const SvxNumberInfoItem& rInfoItem );
+
+ void ExecuteCellFormatDlg ( SfxRequest& rReq, USHORT nTabPage = 0xffff );
+
+ BOOL GetFunction( String& rFuncStr, sal_uInt16 nErrCode = 0 );
+
+ void StartSimpleRefDialog( const String& rTitle, const String& rInitVal,
+ BOOL bCloseOnButtonUp, BOOL bSingleCell, BOOL bMultiSelection );
+ void StopSimpleRefDialog();
+
+ void SetCurRefDlgId( USHORT nNew );
+
+ void AddAccessibilityObject( SfxListener& rObject );
+ void RemoveAccessibilityObject( SfxListener& rObject );
+ void BroadcastAccessibility( const SfxHint &rHint );
+ BOOL HasAccessibilityObjects();
+
+ bool ExecuteRetypePassDlg(ScPasswordHash eDesiredHash);
+
+ using ScTabView::ShowCursor;
+};
+
+//==================================================================
+
+
+#endif
+
diff --git a/sc/source/ui/inc/target.hxx b/sc/source/ui/inc/target.hxx
new file mode 100644
index 000000000000..6fc62ffaa8cf
--- /dev/null
+++ b/sc/source/ui/inc/target.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TARGET_HXX
+#define SC_TARGET_HXX
+
+#include <svl/undo.hxx>
+
+class ScTabViewShell;
+
+class ScTabViewTarget : public SfxRepeatTarget
+{
+private:
+ ScTabViewShell* pViewShell;
+
+public:
+ TYPEINFO();
+
+ ScTabViewTarget( ScTabViewShell* pShell ) : pViewShell( pShell ) {}
+ virtual ~ScTabViewTarget();
+
+ ScTabViewShell* GetViewShell() const { return pViewShell; }
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/tbinsert.hrc b/sc/source/ui/inc/tbinsert.hrc
new file mode 100644
index 000000000000..44c0d295cfc6
--- /dev/null
+++ b/sc/source/ui/inc/tbinsert.hrc
@@ -0,0 +1,32 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define RID_TOOLBOX_INSERT 1
+#define RID_TOOLBOX_INSCELLS 2
+#define RID_TOOLBOX_INSOBJ 3
+
+
diff --git a/sc/source/ui/inc/tbinsert.hxx b/sc/source/ui/inc/tbinsert.hxx
new file mode 100644
index 000000000000..a056da0a982c
--- /dev/null
+++ b/sc/source/ui/inc/tbinsert.hxx
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TBINSERT_HXX
+#define SC_TBINSERT_HXX
+
+#include <sfx2/tbxctrl.hxx>
+
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+
+class ScTbxInsertCtrl : public SfxToolBoxControl
+{
+ USHORT nLastSlotId;
+
+ using SfxToolBoxControl::Select;
+ virtual void Select( BOOL bMod1 = FALSE );
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ ScTbxInsertCtrl( USHORT nSlotId, USHORT nId, ToolBox& rBox );
+ ~ScTbxInsertCtrl();
+
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+ virtual void StateChanged( USHORT nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState );
+};
+
+//----------------------------------------------------------------------------
+//
+//----------------------------------------------------------------------------
+/*
+class ScTbxInsertPopup : public SfxPopupWindow
+{
+ SfxToolBoxManager aTbx;
+ ResId aRIdWinTemp;
+ ResId aRIdTbxTemp;
+
+ Link aTbxClickHdl;
+
+ DECL_LINK( TbxSelectHdl, ToolBox* );
+ DECL_LINK( TbxClickHdl, ToolBox* );
+
+protected:
+ virtual void PopupModeEnd();
+
+public:
+ ScTbxInsertPopup( USHORT nId, WindowAlign eAlign,
+ const ResId& rRIdWin, const ResId& rRIdTbx,
+ SfxBindings& rBindings );
+ ~ScTbxInsertPopup();
+
+ virtual SfxPopupWindow* Clone() const;
+ void StartSelection();
+};
+*/
+
+
+#endif
+
diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx
new file mode 100644
index 000000000000..6ea4f6e169ed
--- /dev/null
+++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+#ifndef _SC_ZOOMSLIDERTBCONTRL_HXX
+#define _SC_ZOOMSLIDERTBCONTRL_HXX
+
+#ifndef _WINDOW_HXX //autogen
+#include <vcl/window.hxx>
+#endif
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svl/poolitem.hxx>
+#endif
+#ifndef _SFXTBXCTRL_HXX //autogen
+#include <sfx2/tbxctrl.hxx>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#include <svx/zoomslideritem.hxx>
+
+
+//class ScZoomSliderControl define
+class ScZoomSliderControl: public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ ScZoomSliderControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ ~ScZoomSliderControl();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual Window* CreateItemWindow( Window *pParent );
+};
+
+//========================================================================
+// class ScZoomSliderWnd define---------------------------------------
+//========================================================================
+class ScZoomSliderWnd: public Window
+{
+private:
+ struct ScZoomSliderWnd_Impl;
+ ScZoomSliderWnd_Impl* mpImpl;
+ Size aLogicalSize;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xDispatchProvider;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
+
+ USHORT Offset2Zoom( long nOffset ) const;
+ long Zoom2Offset( USHORT nZoom ) const;
+ void DoPaint( const Rectangle& rRect );
+
+public:
+ ScZoomSliderWnd( Window* pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& rDispatchProvider,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame , USHORT nCurrentZoom );
+ ~ScZoomSliderWnd();
+ void UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem );
+
+protected:
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void Paint( const Rectangle& rRect );
+};
+#endif
diff --git a/sc/source/ui/inc/textdlgs.hxx b/sc/source/ui/inc/textdlgs.hxx
new file mode 100644
index 000000000000..302b5de5ffd2
--- /dev/null
+++ b/sc/source/ui/inc/textdlgs.hxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TEXTDLGS_HXX
+#define SC_TEXTDLGS_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+class SfxObjectShell;
+
+//
+// Zeichen-Tab-Dialog
+//
+
+class ScCharDlg : public SfxTabDialog
+{
+private:
+ const SfxItemSet& rOutAttrs;
+ const SfxObjectShell& rDocShell;
+
+ virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+
+public:
+ ScCharDlg( Window* pParent, const SfxItemSet* pAttr,
+ const SfxObjectShell* pDocShell );
+ ~ScCharDlg() {}
+};
+
+//
+// Absatz-Tab-Dialog
+//
+
+class ScParagraphDlg : public SfxTabDialog
+{
+private:
+ const SfxItemSet& rOutAttrs;
+
+ virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+
+public:
+ ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr );
+ ~ScParagraphDlg() {}
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/textimportoptions.hrc b/sc/source/ui/inc/textimportoptions.hrc
new file mode 100644
index 000000000000..93c554ef5c45
--- /dev/null
+++ b/sc/source/ui/inc/textimportoptions.hrc
@@ -0,0 +1,42 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: retypepassdlg.src,v $
+ * $Revision: 1.1.2.3 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <sc.hrc>
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_HELP 3
+
+#define FL_CHOOSE_LANG 4
+#define RB_AUTOMATIC 5
+#define RB_CUSTOM 6
+#define LB_CUSTOM_LANG 7
+#define FL_OPTION 8
+#define BTN_CONVERT_DATE 9
diff --git a/sc/source/ui/inc/textimportoptions.hxx b/sc/source/ui/inc/textimportoptions.hxx
new file mode 100644
index 000000000000..bbb2bf6ebf09
--- /dev/null
+++ b/sc/source/ui/inc/textimportoptions.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: langbox.hxx,v $
+ * $Revision: 1.4.242.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UI_IMPORTOPTIONS_HXX
+#define SC_UI_IMPORTOPTIONS_HXX
+
+#include "vcl/dialog.hxx"
+#include "vcl/button.hxx"
+#include "vcl/fixed.hxx"
+#include "i18npool/lang.h"
+#include "svx/langbox.hxx"
+
+class ScTextImportOptionsDlg : public ModalDialog
+{
+public:
+ ScTextImportOptionsDlg(Window* pParent);
+ virtual ~ScTextImportOptionsDlg();
+
+ virtual short Execute();
+
+ LanguageType getLanguageType() const;
+ bool isDateConversionSet() const;
+
+private:
+ void init();
+
+private:
+ OKButton maBtnOk;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+
+ FixedLine maFlChooseLang;
+
+ RadioButton maRbAutomatic;
+ RadioButton maRbCustom;
+
+ SvxLanguageBox maLbCustomLang;
+
+ FixedLine maFlOption;
+
+ CheckBox maBtnConvertDate;
+
+ DECL_LINK( OKHdl, OKButton* );
+
+ DECL_LINK( RadioHdl, RadioButton* );
+};
+
+
+#endif
diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx
new file mode 100644
index 000000000000..31f2c9458c83
--- /dev/null
+++ b/sc/source/ui/inc/tpcalc.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TPCALC_HXX
+#define SC_TPCALC_HXX
+
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/field.hxx>
+#include <vcl/group.hxx>
+#include <svtools/stdctrl.hxx>
+#include "editfield.hxx"
+
+//===================================================================
+
+class ScDocOptions;
+
+class ScTpCalcOptions : public SfxTabPage
+{
+public:
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rCoreSet );
+ static USHORT* GetRanges ();
+ virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ virtual void Reset ( const SfxItemSet& rCoreSet );
+ using SfxTabPage::DeactivatePage;
+ virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
+
+private:
+ ScTpCalcOptions( Window* pParent,
+ const SfxItemSet& rCoreSet );
+ ~ScTpCalcOptions();
+
+private:
+ FixedLine aGbZRefs;
+ CheckBox aBtnIterate;
+ FixedText aFtSteps;
+ NumericField aEdSteps;
+ FixedText aFtEps;
+ ScDoubleField aEdEps;
+
+ FixedLine aSeparatorFL;
+ FixedLine aGbDate;
+ RadioButton aBtnDateStd;
+ RadioButton aBtnDateSc10;
+ RadioButton aBtnDate1904;
+
+ FixedLine aHSeparatorFL;
+ CheckBox aBtnCase;
+ CheckBox aBtnCalc;
+ CheckBox aBtnMatch;
+ CheckBox aBtnRegex;
+ CheckBox aBtnLookUp;
+ CheckBox aBtnGeneralPrec;
+
+ FixedText aFtPrec;
+ NumericField aEdPrec;
+
+ ScDocOptions* pOldOptions;
+ ScDocOptions* pLocalOptions;
+ USHORT nWhichCalc;
+
+#ifdef _TPCALC_CXX
+private:
+ void Init();
+
+ //------------------------------------
+ // Handler:
+ DECL_LINK( RadioClickHdl, RadioButton* );
+ DECL_LINK( CheckClickHdl, CheckBox* );
+
+#endif
+};
+
+
+#endif
+
diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx
new file mode 100644
index 000000000000..dcf730712a40
--- /dev/null
+++ b/sc/source/ui/inc/tphf.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TPHF_HXX
+#define SC_TPHF_HXX
+
+
+#include <svx/hdft2.hxx>
+
+class ScStyleDlg;
+
+//========================================================================
+
+class ScHFPage : public SvxHFPage
+{
+public:
+ virtual ~ScHFPage();
+
+ virtual void Reset( const SfxItemSet& rSet );
+ virtual BOOL FillItemSet( SfxItemSet& rOutSet );
+
+ void SetPageStyle( const String& rName ) { aStrPageStyle = rName; }
+ void SetStyleDlg ( const ScStyleDlg* pDlg ) { pStyleDlg = pDlg; }
+
+protected:
+ ScHFPage( Window* pParent,
+ USHORT nResId,
+ const SfxItemSet& rSet,
+ USHORT nSetId );
+
+// using SvxHFPage::ActivatePage;
+// using SvxHFPage::DeactivatePage;
+ virtual void ActivatePage();
+ virtual void DeactivatePage();
+ virtual void ActivatePage( const SfxItemSet& rSet );
+ virtual int DeactivatePage( SfxItemSet* pSet = 0 );
+
+private:
+ PushButton aBtnEdit;
+ SfxItemSet aDataSet;
+ String aStrPageStyle;
+ USHORT nPageUsage;
+ const ScStyleDlg* pStyleDlg;
+
+#ifdef _TPHF_CXX
+private:
+ DECL_LINK( BtnHdl, PushButton* );
+ DECL_LINK( HFEditHdl, void* );
+ DECL_LINK( TurnOnHdl, CheckBox* );
+#endif
+};
+
+//========================================================================
+
+class ScHeaderPage : public ScHFPage
+{
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
+ static USHORT* GetRanges();
+
+private:
+ ScHeaderPage( Window* pParent, const SfxItemSet& rSet );
+};
+
+//========================================================================
+
+class ScFooterPage : public ScHFPage
+{
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
+ static USHORT* GetRanges();
+
+private:
+ ScFooterPage( Window* pParent, const SfxItemSet& rSet );
+};
+
+
+#endif // SC_TPHF_HXX
+
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
new file mode 100644
index 000000000000..d9d26d2111cd
--- /dev/null
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -0,0 +1,239 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TPHFEDIT_HXX
+#define SC_TPHFEDIT_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/pageitem.hxx>
+#include <svtools/stdctrl.hxx>
+#include <vcl/group.hxx>
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#include <vcl/timer.hxx>
+#include <vcl/virdev.hxx>
+#include "scdllapi.h"
+#include "scitems.hxx" // wegen enum SvxNumType
+#include "popmenu.hxx"
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <cppuhelper/weakref.hxx>
+
+//===================================================================
+
+class ScHeaderEditEngine;
+class ScPatternAttr;
+class EditView;
+class EditTextObject;
+class SvxFieldItem;
+class ScAccessibleEditObject;
+class ScEditWindow;
+
+SC_DLLPUBLIC ScEditWindow* GetScEditWindow (); //CHINA001
+
+enum ScEditWindowLocation
+{
+ Left,
+ Center,
+ Right
+};
+
+class SC_DLLPUBLIC ScEditWindow : public Control
+{
+public:
+ ScEditWindow( Window* pParent, const ResId& rResId, ScEditWindowLocation eLoc );
+ ~ScEditWindow();
+
+ using Control::SetFont;
+ void SetFont( const ScPatternAttr& rPattern );
+ using Control::SetText;
+ void SetText( const EditTextObject& rTextObject );
+ EditTextObject* CreateTextObject();
+ void SetCharAttriutes();
+
+ void InsertField( const SvxFieldItem& rFld );
+
+ void SetNumType(SvxNumType eNumType);
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible();
+
+ inline ScHeaderEditEngine* GetEditEngine() const {return pEdEngine;}
+protected:
+ virtual void Paint( const Rectangle& rRec );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt );
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual void GetFocus();
+ virtual void LoseFocus();
+
+private:
+ ScHeaderEditEngine* pEdEngine;
+ EditView* pEdView;
+ ScEditWindowLocation eLocation;
+ bool mbRTL;
+
+ com::sun::star::uno::WeakReference< ::com::sun::star::accessibility::XAccessible > xAcc;
+ ScAccessibleEditObject* pAcc;
+};
+
+//===================================================================
+class SC_DLLPUBLIC ScExtIButton : public ImageButton
+{
+private:
+
+ Timer aTimer;
+ ScPopupMenu* pPopupMenu;
+ Link aMLink;
+ USHORT nSelected;
+
+ SC_DLLPRIVATE DECL_LINK( TimerHdl, Timer*);
+
+// void DrawArrow();
+
+protected:
+
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual void MouseButtonUp( const MouseEvent& rMEvt);
+ virtual void Click();
+
+ virtual void StartPopup();
+
+public:
+
+ ScExtIButton(Window* pParent, const ResId& rResId );
+
+ void SetPopupMenu(ScPopupMenu* pPopUp);
+
+ USHORT GetSelected();
+
+ void SetMenuHdl( const Link& rLink ) { aMLink = rLink; }
+ const Link& GetMenuHdl() const { return aMLink; }
+
+ virtual long PreNotify( NotifyEvent& rNEvt );
+};
+
+
+//===================================================================
+//CHINA001
+//CHINA001 class ScHFEditPage : public SfxTabPage
+//CHINA001 {
+//CHINA001 public:
+//CHINA001 virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+//CHINA001 virtual void Reset ( const SfxItemSet& rCoreSet );
+//CHINA001
+//CHINA001 void SetNumType(SvxNumType eNumType);
+//CHINA001
+//CHINA001 protected:
+//CHINA001 ScHFEditPage( Window* pParent,
+//CHINA001 USHORT nResId,
+//CHINA001 const SfxItemSet& rCoreSet,
+//CHINA001 USHORT nWhich );
+//CHINA001 virtual ~ScHFEditPage();
+//CHINA001
+//CHINA001 private:
+//CHINA001 FixedText aFtLeft;
+//CHINA001 ScEditWindow aWndLeft;
+//CHINA001 FixedText aFtCenter;
+//CHINA001 ScEditWindow aWndCenter;
+//CHINA001 FixedText aFtRight;
+//CHINA001 ScEditWindow aWndRight;
+//CHINA001 ImageButton aBtnText;
+//CHINA001 ScExtIButton aBtnFile;
+//CHINA001 ImageButton aBtnTable;
+//CHINA001 ImageButton aBtnPage;
+//CHINA001 ImageButton aBtnLastPage;
+//CHINA001 ImageButton aBtnDate;
+//CHINA001 ImageButton aBtnTime;
+//CHINA001 FixedLine aFlInfo;
+//CHINA001 FixedInfo aFtInfo;
+//CHINA001 ScPopupMenu aPopUpFile;
+//CHINA001
+//CHINA001 USHORT nWhich;
+//CHINA001 String aCmdArr[6];
+//CHINA001
+//CHINA001 private:
+//CHINA001 #ifdef _TPHFEDIT_CXX
+//CHINA001 void FillCmdArr();
+//CHINA001 DECL_LINK( ClickHdl, ImageButton* );
+//CHINA001 DECL_LINK( MenuHdl, ScExtIButton* );
+//CHINA001 #endif
+//CHINA001 };
+//CHINA001
+//CHINA001 //===================================================================
+//CHINA001
+//CHINA001 class ScRightHeaderEditPage : public ScHFEditPage
+//CHINA001 {
+//CHINA001 public:
+//CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
+//CHINA001 static USHORT* GetRanges();
+//CHINA001
+//CHINA001 private:
+//CHINA001 ScRightHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
+//CHINA001 };
+//CHINA001
+//CHINA001 //===================================================================
+//CHINA001
+//CHINA001 class ScLeftHeaderEditPage : public ScHFEditPage
+//CHINA001 {
+//CHINA001 public:
+//CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
+//CHINA001 static USHORT* GetRanges();
+//CHINA001
+//CHINA001 private:
+//CHINA001 ScLeftHeaderEditPage( Window* pParent, const SfxItemSet& rSet );
+//CHINA001 };
+//CHINA001
+//CHINA001 //===================================================================
+//CHINA001
+//CHINA001 class ScRightFooterEditPage : public ScHFEditPage
+//CHINA001 {
+//CHINA001 public:
+//CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
+//CHINA001 static USHORT* GetRanges();
+//CHINA001
+//CHINA001 private:
+//CHINA001 ScRightFooterEditPage( Window* pParent, const SfxItemSet& rSet );
+//CHINA001 };
+//CHINA001
+//CHINA001 //===================================================================
+//CHINA001
+//CHINA001 class ScLeftFooterEditPage : public ScHFEditPage
+//CHINA001 {
+//CHINA001 public:
+//CHINA001 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
+//CHINA001 static USHORT* GetRanges();
+//CHINA001
+//CHINA001 private:
+//CHINA001 ScLeftFooterEditPage( Window* pParent, const SfxItemSet& rSet );
+//CHINA001 };
+
+
+
+#endif // SC_TPHFEDIT_HXX
+
diff --git a/sc/source/ui/inc/tpprint.hxx b/sc/source/ui/inc/tpprint.hxx
new file mode 100644
index 000000000000..358c29f83d97
--- /dev/null
+++ b/sc/source/ui/inc/tpprint.hxx
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TPPRINT_HXX
+#define SC_TPPRINT_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/fixed.hxx>
+
+//===================================================================
+
+class ScTpPrintOptions : public SfxTabPage
+{
+ FixedLine aPagesFL;
+ CheckBox aSkipEmptyPagesCB;
+ FixedLine aSheetsFL;
+ CheckBox aSelectedSheetsCB;
+
+ ScTpPrintOptions( Window* pParent, const SfxItemSet& rCoreSet );
+ ~ScTpPrintOptions();
+
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rCoreSet );
+ static USHORT* GetRanges();
+ virtual BOOL FillItemSet( SfxItemSet& rCoreSet );
+ virtual void Reset( const SfxItemSet& rCoreSet );
+ using SfxTabPage::DeactivatePage;
+ virtual int DeactivatePage( SfxItemSet* pSet = NULL );
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx
new file mode 100644
index 000000000000..d1ba772a8ca2
--- /dev/null
+++ b/sc/source/ui/inc/tpsort.hxx
@@ -0,0 +1,222 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TPSORT_HXX
+#define SC_TPSORT_HXX
+
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <svtools/stdctrl.hxx>
+#include <svx/langbox.hxx>
+
+
+#include "global.hxx"
+#include "address.hxx"
+
+//------------------------------------------------------------------------
+
+// +1 because one field is reserved for the "- undefined -" entry
+#define SC_MAXFIELDS MAXCOLCOUNT+1
+
+class ScViewData;
+class ScSortDlg;
+struct ScSortParam;
+
+//========================================================================
+// Kriterien
+
+class ScTabPageSortFields : public SfxTabPage
+{
+public:
+ ScTabPageSortFields( Window* pParent,
+ const SfxItemSet& rArgSet );
+ ~ScTabPageSortFields();
+
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rArgSet );
+ static USHORT* GetRanges ();
+ virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual void Reset ( const SfxItemSet& rArgSet );
+
+protected:
+// fuer Datenaustausch (sollte noch umgestellt werden!)
+// virtual void ActivatePage ( const SfxItemSet& rSet );
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+ virtual void ActivatePage ();
+ virtual int DeactivatePage ( SfxItemSet* pSet = 0);
+
+private:
+ FixedLine aFlSort1;
+ ListBox aLbSort1;
+ RadioButton aBtnUp1;
+ RadioButton aBtnDown1;
+
+ FixedLine aFlSort2;
+ ListBox aLbSort2;
+ RadioButton aBtnUp2;
+ RadioButton aBtnDown2;
+
+ FixedLine aFlSort3;
+ ListBox aLbSort3;
+ RadioButton aBtnUp3;
+ RadioButton aBtnDown3;
+
+ String aStrUndefined;
+ String aStrColumn;
+ String aStrRow;
+
+ const USHORT nWhichSort;
+ ScSortDlg* pDlg;
+ ScViewData* pViewData;
+ const ScSortParam& rSortData;
+ SCCOLROW nFieldArr[SC_MAXFIELDS];
+ USHORT nFieldCount;
+ SCCOL nFirstCol;
+ SCROW nFirstRow;
+ BOOL bHasHeader;
+ BOOL bSortByRows;
+
+ ListBox* aSortLbArr[3];
+ RadioButton* aDirBtnArr[3][2];
+ FixedLine* aFlArr[3];
+
+#ifdef _TPSORT_CXX
+private:
+ void Init ();
+ void DisableField ( USHORT nField );
+ void EnableField ( USHORT nField );
+ void FillFieldLists ();
+ USHORT GetFieldSelPos ( SCCOLROW nField );
+
+ // Handler ------------------------
+ DECL_LINK( SelectHdl, ListBox * );
+#endif
+};
+
+//========================================================================
+// Sortieroptionen:
+
+class ScDocument;
+class ScRangeData;
+class CollatorRessource;
+class CollatorWrapper;
+
+#if ENABLE_LAYOUT_EXPERIMENTAL
+#include <sfx2/layout.hxx>
+#include <layout/layout-pre.hxx>
+#else /* !ENABLE_LAYOUT_EXPERIMENTAL */
+#define LocalizedString String
+#endif /* !ENABLE_LAYOUT_EXPERIMENTAL */
+
+class ScTabPageSortOptions : public SfxTabPage
+{
+public:
+ ScTabPageSortOptions( Window* pParent,
+ const SfxItemSet& rArgSet );
+ ~ScTabPageSortOptions();
+
+#undef SfxTabPage
+#define SfxTabPage ::SfxTabPage
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rArgSet );
+ static USHORT* GetRanges ();
+ virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual void Reset ( const SfxItemSet& rArgSet );
+
+protected:
+// fuer Datenaustausch (sollte noch umgestellt werden!)
+// virtual void ActivatePage ( const SfxItemSet& rSet );
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+ virtual void ActivatePage ();
+ virtual int DeactivatePage ( SfxItemSet* pSet = 0);
+
+private:
+
+ CheckBox aBtnCase;
+ CheckBox aBtnHeader;
+ CheckBox aBtnFormats;
+
+ CheckBox aBtnCopyResult;
+ ListBox aLbOutPos;
+ Edit aEdOutPos;
+
+ CheckBox aBtnSortUser;
+ ListBox aLbSortUser;
+
+ FixedText aFtLanguage;
+ SvxLanguageBox aLbLanguage;
+ FixedText aFtAlgorithm;
+ ListBox aLbAlgorithm;
+
+ FixedLine aLineDirection;
+ RadioButton aBtnTopDown;
+ RadioButton aBtnLeftRight;
+
+ FixedText aFtAreaLabel;
+// FixedInfo aFtArea;
+ LocalizedString aStrRowLabel;
+ LocalizedString aStrColLabel;
+ LocalizedString aStrUndefined;
+ String aStrNoName;
+ String aStrAreaLabel;
+
+ const USHORT nWhichSort;
+ const ScSortParam& rSortData;
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ ScSortDlg* pDlg;
+ ScAddress theOutPos;
+
+ CollatorRessource* pColRes;
+ CollatorWrapper* pColWrap;
+
+#ifdef _TPSORT_CXX
+private:
+ void Init ();
+ void FillUserSortListBox ();
+ void FillOutPosList ();
+
+ // Handler ------------------------
+ DECL_LINK( EnableHdl, CheckBox * );
+ DECL_LINK( SelOutPosHdl, ListBox * );
+ void EdOutPosModHdl ( Edit* pEd );
+ DECL_LINK( SortDirHdl, RadioButton * );
+ DECL_LINK( FillAlgorHdl, void * );
+#endif
+};
+
+#if ENABLE_LAYOUT_EXPERIMENTAL
+#include <layout/layout-post.hxx>
+#endif /* ENABLE_LAYOUT_EXPERIMENTAL */
+
+#endif // SC_TPSORT_HXX
+
diff --git a/sc/source/ui/inc/tpstat.hxx b/sc/source/ui/inc/tpstat.hxx
new file mode 100644
index 000000000000..1c928ff2ef13
--- /dev/null
+++ b/sc/source/ui/inc/tpstat.hxx
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TPSTAT_HXX
+#define SC_TPSTAT_HXX
+
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/fixed.hxx>
+#include <svtools/stdctrl.hxx>
+
+
+
+//========================================================================
+
+class ScDocStatPage: public SfxTabPage
+{
+public:
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
+
+private:
+ ScDocStatPage( Window *pParent, const SfxItemSet& rSet );
+ ~ScDocStatPage();
+
+protected:
+ virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual void Reset ( const SfxItemSet& rSet );
+
+private:
+ FixedLine aFlInfo;
+ FixedText aFtTablesLbl;
+ FixedInfo aFtTables;
+ FixedText aFtCellsLbl;
+ FixedInfo aFtCells;
+ FixedText aFtPagesLbl;
+ FixedInfo aFtPages;
+};
+
+
+
+#endif
diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx
new file mode 100644
index 000000000000..6dd640e7925e
--- /dev/null
+++ b/sc/source/ui/inc/tpsubt.hxx
@@ -0,0 +1,188 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TPSUBT_HXX
+#define SC_TPSUBT_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <svx/checklbx.hxx>
+#include <vcl/fixed.hxx>
+#include "global.hxx"
+
+//------------------------------------------------------------------------
+
+// +1 because one field is reserved for the "- none -" entry
+#define SC_MAXFIELDS MAXCOLCOUNT+1
+
+class ScViewData;
+class ScDocument;
+
+//========================================================================
+// Gruppenseiten: Basisklasse
+
+class ScTpSubTotalGroup : public SfxTabPage
+{
+protected:
+ ScTpSubTotalGroup( Window* pParent, USHORT nResId,
+ const SfxItemSet& rArgSet );
+
+public:
+ virtual ~ScTpSubTotalGroup();
+
+ static USHORT* GetRanges ();
+ BOOL DoReset ( USHORT nGroupNo,
+ const SfxItemSet& rArgSet );
+ BOOL DoFillItemSet ( USHORT nGroupNo,
+ SfxItemSet& rArgSet );
+protected:
+ FixedText aFtGroup;
+ ListBox aLbGroup;
+ FixedText aFtColumns;
+ SvxCheckListBox aLbColumns;
+ FixedText aFtFunctions;
+ ListBox aLbFunctions;
+ const String aStrNone;
+ const String aStrColumn;
+
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+
+ const USHORT nWhichSubTotals;
+ const ScSubTotalParam& rSubTotalData;
+ SCCOL nFieldArr[SC_MAXFIELDS];
+ const USHORT nFieldCount;
+
+private:
+ void Init ();
+ void FillListBoxes ();
+ ScSubTotalFunc LbPosToFunc ( USHORT nPos );
+ USHORT FuncToLbPos ( ScSubTotalFunc eFunc );
+ USHORT GetFieldSelPos ( SCCOL nField );
+
+ // Handler ------------------------
+ DECL_LINK( SelectHdl, ListBox * );
+ DECL_LINK( CheckHdl, ListBox * );
+};
+
+//------------------------------------------------------------------------
+
+class ScTpSubTotalGroup1 : public ScTpSubTotalGroup
+{
+protected:
+ ScTpSubTotalGroup1( Window* pParent,
+ const SfxItemSet& rArgSet );
+
+public:
+ virtual ~ScTpSubTotalGroup1();
+
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rArgSet );
+ virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual void Reset ( const SfxItemSet& rArgSet );
+};
+
+//------------------------------------------------------------------------
+
+class ScTpSubTotalGroup2 : public ScTpSubTotalGroup
+{
+protected:
+ ScTpSubTotalGroup2( Window* pParent,
+ const SfxItemSet& rArgSet );
+
+public:
+ virtual ~ScTpSubTotalGroup2();
+
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rArgSet );
+ virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual void Reset ( const SfxItemSet& rArgSet );
+};
+
+//------------------------------------------------------------------------
+
+class ScTpSubTotalGroup3 : public ScTpSubTotalGroup
+{
+protected:
+ ScTpSubTotalGroup3( Window* pParent,
+ const SfxItemSet& rArgSet );
+
+public:
+ virtual ~ScTpSubTotalGroup3();
+
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rArgSet );
+ virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual void Reset ( const SfxItemSet& rArgSet );
+};
+
+//========================================================================
+// Optionen:
+
+class ScTpSubTotalOptions : public SfxTabPage
+{
+protected:
+ ScTpSubTotalOptions( Window* pParent,
+ const SfxItemSet& rArgSet );
+
+public:
+ virtual ~ScTpSubTotalOptions();
+
+ static USHORT* GetRanges ();
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rArgSet );
+ virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual void Reset ( const SfxItemSet& rArgSet );
+
+private:
+ FixedLine aFlGroup;
+ CheckBox aBtnPagebreak;
+ CheckBox aBtnCase;
+ CheckBox aBtnSort;
+ FixedLine aFlSort;
+ RadioButton aBtnAscending;
+ RadioButton aBtnDescending;
+ CheckBox aBtnFormats;
+ CheckBox aBtnUserDef;
+ ListBox aLbUserDef;
+
+ ScViewData* pViewData;
+ ScDocument* pDoc;
+ const USHORT nWhichSubTotals;
+ const ScSubTotalParam& rSubTotalData;
+
+private:
+ void Init ();
+ void FillUserSortListBox ();
+
+ // Handler ------------------------
+ DECL_LINK( CheckHdl, CheckBox * );
+};
+
+
+
+#endif // SC_TPSORT_HXX
+
diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx
new file mode 100644
index 000000000000..980a574dc61d
--- /dev/null
+++ b/sc/source/ui/inc/tptable.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TPTABLE_HXX
+#define SC_TPTABLE_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/field.hxx>
+
+//===================================================================
+
+/** A vcl/NumericField that additionally supports empty text.
+ @descr Value 0 is set as empty text, and empty text is returned as 0. */
+class EmptyNumericField : public NumericField
+{
+public:
+ inline explicit EmptyNumericField( Window* pParent, WinBits nWinStyle ) :
+ NumericField( pParent, nWinStyle ) {}
+ inline explicit EmptyNumericField( Window* pParent, const ResId& rResId ) :
+ NumericField( pParent, rResId ) {}
+
+ virtual void Modify();
+ virtual void SetValue( sal_Int64 nValue );
+ virtual sal_Int64 GetValue() const;
+};
+
+//===================================================================
+
+class ScTablePage : public SfxTabPage
+{
+public:
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rCoreSet );
+ static USHORT* GetRanges ();
+ virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ virtual void Reset ( const SfxItemSet& rCoreSet );
+ using SfxTabPage::DeactivatePage;
+ virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
+ virtual void DataChanged ( const DataChangedEvent& rDCEvt );
+
+private:
+ ScTablePage( Window* pParent, const SfxItemSet& rCoreSet );
+ virtual ~ScTablePage();
+
+ void ShowImage();
+
+private:
+ FixedLine aFlPageDir;
+ RadioButton aBtnTopDown;
+ RadioButton aBtnLeftRight;
+ FixedImage aBmpPageDir;
+ Image aImgLeftRight;
+ Image aImgTopDown;
+ Image aImgLeftRightHC;
+ Image aImgTopDownHC;
+ CheckBox aBtnPageNo;
+ NumericField aEdPageNo;
+
+ FixedLine aFlPrint;
+ CheckBox aBtnHeaders;
+ CheckBox aBtnGrid;
+ CheckBox aBtnNotes;
+ CheckBox aBtnObjects;
+ CheckBox aBtnCharts;
+ CheckBox aBtnDrawings;
+ CheckBox aBtnFormulas;
+ CheckBox aBtnNullVals;
+
+ FixedLine aFlScale;
+ FixedText aFtScaleMode;
+ ListBox aLbScaleMode;
+ FixedText aFtScaleAll;
+ MetricField aEdScaleAll;
+ FixedText aFtScalePageWidth;
+ EmptyNumericField aEdScalePageWidth;
+ FixedText aFtScalePageHeight;
+ EmptyNumericField aEdScalePageHeight;
+ FixedText aFtScalePageNum;
+ NumericField aEdScalePageNum;
+
+private:
+ //------------------------------------
+ // Handler:
+ DECL_LINK( PageDirHdl, RadioButton* );
+ DECL_LINK( PageNoHdl, CheckBox* );
+ DECL_LINK( ScaleHdl, ListBox* );
+};
+
+#endif // SC_TPTABLE_HXX
diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx
new file mode 100644
index 000000000000..f26e48889f1d
--- /dev/null
+++ b/sc/source/ui/inc/tpusrlst.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TPUSRLST_HXX
+#define SC_TPUSRLST_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <svtools/svmedit.hxx>
+
+//========================================================================
+// Benutzerdefinierte Listen:
+
+class ScUserList;
+class ScDocument;
+class ScViewData;
+class ScRangeUtil;
+
+class ScTpUserLists : public SfxTabPage
+{
+public:
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rAttrSet );
+ static USHORT* GetRanges ();
+ virtual BOOL FillItemSet ( SfxItemSet& rCoreAttrs );
+ virtual void Reset ( const SfxItemSet& rCoreAttrs );
+ using SfxTabPage::DeactivatePage;
+ virtual int DeactivatePage ( SfxItemSet* pSet = NULL );
+
+private:
+ ScTpUserLists( Window* pParent,
+ const SfxItemSet& rArgSet );
+ ~ScTpUserLists();
+
+private:
+ FixedText aFtLists;
+ ListBox aLbLists;
+ FixedText aFtEntries;
+ MultiLineEdit aEdEntries;
+ FixedText aFtCopyFrom;
+ Edit aEdCopyFrom;
+ PushButton aBtnNew;
+ PushButton aBtnAdd;
+ PushButton aBtnRemove;
+ PushButton aBtnCopy;
+
+ const String aStrQueryRemove;
+ const String aStrNew;
+ const String aStrCancel;
+ const String aStrAdd;
+ const String aStrModify;
+ const String aStrCopyList;
+ const String aStrCopyFrom;
+ const String aStrCopyErr;
+
+ const USHORT nWhichUserLists;
+ ScUserList* pUserLists;
+
+ ScDocument* pDoc;
+ ScViewData* pViewData;
+ ScRangeUtil* pRangeUtil;
+ String aStrSelectedArea;
+
+ BOOL bModifyMode;
+ BOOL bCancelMode;
+ BOOL bCopyDone;
+ USHORT nCancelPos;
+
+#ifdef _TPUSRLST_CXX
+private:
+ void Init ();
+ USHORT UpdateUserListBox ();
+ void UpdateEntries ( USHORT nList );
+ void MakeListStr ( String& rListStr );
+ void AddNewList ( const String& rEntriesStr );
+ void RemoveList ( USHORT nList );
+ void ModifyList ( USHORT nSelList,
+ const String& rEntriesStr );
+ void CopyListFromArea ( const ScRefAddress& rStartPos,
+ const ScRefAddress& rEndPos );
+
+ // Handler:
+ DECL_LINK( LbSelectHdl, ListBox* );
+ DECL_LINK( BtnClickHdl, PushButton* );
+ DECL_LINK( EdEntriesModHdl, MultiLineEdit* );
+#endif
+};
+
+
+
+#endif // SC_TPUSRLST_HXX
+
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
new file mode 100644
index 000000000000..81760eb66c67
--- /dev/null
+++ b/sc/source/ui/inc/tpview.hxx
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TPVIEW_HXX
+#define SC_TPVIEW_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/group.hxx>
+#include <svtools/ctrlbox.hxx>
+#include <svx/strarray.hxx>
+
+//========================================================================
+// View-Optionen:
+
+class ScViewOptions;
+
+//========================================================================
+// TabPage Inhalte
+
+class ScTpContentOptions : public SfxTabPage
+{
+ FixedLine aLinesGB;
+ CheckBox aGridCB;
+ FixedText aColorFT;
+ ColorListBox aColorLB;
+ CheckBox aBreakCB;
+ CheckBox aGuideLineCB;
+ CheckBox aHandleCB;
+ CheckBox aBigHandleCB;
+
+ FixedLine aSeparator1FL;
+
+ FixedLine aDisplayGB;
+ CheckBox aFormulaCB;
+ CheckBox aNilCB;
+ CheckBox aAnnotCB;
+ CheckBox aValueCB;
+ CheckBox aAnchorCB;
+ CheckBox aClipMarkCB;
+ CheckBox aRangeFindCB;
+
+ FixedLine aObjectGB;
+ FixedText aObjGrfFT;
+ ListBox aObjGrfLB;
+ FixedText aDiagramFT;
+ ListBox aDiagramLB;
+ FixedText aDrawFT;
+ ListBox aDrawLB;
+
+ FixedLine aZoomGB;
+ CheckBox aSyncZoomCB;
+
+ FixedLine aSeparator2FL;
+
+ FixedLine aWindowGB;
+ CheckBox aRowColHeaderCB;
+ CheckBox aHScrollCB;
+ CheckBox aVScrollCB;
+ CheckBox aTblRegCB;
+ CheckBox aOutlineCB;
+
+ ScViewOptions* pLocalOptions;
+
+ void InitGridOpt();
+ DECL_LINK( GridHdl, CheckBox* );
+ DECL_LINK( SelLbObjHdl, ListBox* );
+ DECL_LINK( CBHdl, CheckBox* );
+
+ ScTpContentOptions( Window* pParent,
+ const SfxItemSet& rArgSet );
+ ~ScTpContentOptions();
+
+public:
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rCoreSet );
+ virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ virtual void Reset ( const SfxItemSet& rCoreSet );
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+ virtual void ActivatePage( const SfxItemSet& );
+ virtual int DeactivatePage( SfxItemSet* pSet = 0 );
+
+
+};
+
+//========================================================================
+// TabPage Layout
+class ScDocument;
+class ScTpLayoutOptions : public SfxTabPage
+{
+ FixedLine aUnitGB;
+ FixedText aUnitFT;
+ ListBox aUnitLB;
+ FixedText aTabFT;
+ MetricField aTabMF;
+
+ FixedLine aSeparatorFL;
+ FixedLine aLinkGB;
+ FixedText aLinkFT;
+ RadioButton aAlwaysRB;
+ RadioButton aRequestRB;
+ RadioButton aNeverRB;
+
+ FixedLine aOptionsGB;
+ CheckBox aAlignCB;
+ ListBox aAlignLB;
+ CheckBox aEditModeCB;
+ CheckBox aFormatCB;
+ CheckBox aExpRefCB;
+ CheckBox aMarkHdrCB;
+ CheckBox aTextFmtCB;
+ CheckBox aReplWarnCB;
+
+ SvxStringArray aUnitArr;
+
+ DECL_LINK( CBHdl, CheckBox* );
+
+ DECL_LINK(MetricHdl, ListBox*);
+ DECL_LINK( AlignHdl, CheckBox* );
+
+ ScDocument *pDoc;
+
+ DECL_LINK( UpdateHdl, CheckBox* );
+
+ ScTpLayoutOptions( Window* pParent,
+ const SfxItemSet& rArgSet );
+ ~ScTpLayoutOptions();
+
+public:
+ static SfxTabPage* Create ( Window* pParent,
+ const SfxItemSet& rCoreSet );
+ virtual BOOL FillItemSet ( SfxItemSet& rCoreSet );
+ virtual void Reset ( const SfxItemSet& rCoreSet );
+ using SfxTabPage::ActivatePage;
+ using SfxTabPage::DeactivatePage;
+ virtual void ActivatePage( const SfxItemSet& );
+ virtual int DeactivatePage( SfxItemSet* pSet = 0 );
+
+ void SetDocument(ScDocument* pPtr){pDoc = pPtr;}
+
+};
+//========================================================================
+
+#endif // SC_TPUSRLST_HXX
+
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
new file mode 100644
index 000000000000..e2dbad485812
--- /dev/null
+++ b/sc/source/ui/inc/transobj.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_TRANSOBJ_HXX
+#define SC_TRANSOBJ_HXX
+
+#include <svtools/transfer.hxx>
+#include "global.hxx"
+#include "address.hxx"
+
+class ScDocShell;
+class ScMarkData;
+class SfxObjectShell;
+
+namespace com { namespace sun { namespace star {
+ namespace sheet {
+ class XSheetCellRanges;
+ }
+}}}
+
+#include <sfx2/objsh.hxx>
+
+class ScTransferObj : public TransferableHelper
+{
+private:
+ ScDocument* pDoc;
+ ScRange aBlock;
+ SCROW nNonFiltered; // non-filtered rows
+ TransferableDataHelper aOleData;
+ TransferableObjectDescriptor aObjDesc;
+//REMOVE SvEmbeddedObjectRef aDocShellRef;
+//REMOVE SvEmbeddedObjectRef aDrawPersistRef;
+ SfxObjectShellRef aDocShellRef;
+ SfxObjectShellRef aDrawPersistRef;
+ com::sun::star::uno::Reference<com::sun::star::sheet::XSheetCellRanges> xDragSourceRanges;
+ SCCOL nDragHandleX;
+ SCROW nDragHandleY;
+ SCTAB nVisibleTab;
+ USHORT nDragSourceFlags;
+ BOOL bDragWasInternal;
+ BOOL bUsedForLink;
+ bool bHasFiltered; // if has filtered rows
+
+ void InitDocShell();
+ static void StripRefs( ScDocument* pDoc, SCCOL nStartX, SCROW nStartY,
+ SCCOL nEndX, SCROW nEndY,
+ ScDocument* pDestDoc=0,
+ SCCOL nSubX=0, SCROW nSubY=0 );
+ static void PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPrintFactor,
+ const ScRange& rBlock, BOOL bMetaFile );
+ static void GetAreaSize( ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCROW& nRow, SCCOL& nCol );
+
+public:
+ ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDescriptor& rDesc );
+ virtual ~ScTransferObj();
+
+ virtual void AddSupportedFormats();
+ virtual sal_Bool GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual sal_Bool WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId,
+ const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ virtual void ObjectReleased();
+ virtual void DragFinished( sal_Int8 nDropAction );
+
+ ScDocument* GetDocument() { return pDoc; } // owned by ScTransferObj
+ const ScRange& GetRange() const { return aBlock; }
+ SCROW GetNonFilteredRows() const { return nNonFiltered; }
+ SCCOL GetDragHandleX() const { return nDragHandleX; }
+ SCROW GetDragHandleY() const { return nDragHandleY; }
+ SCTAB GetVisibleTab() const { return nVisibleTab; }
+ USHORT GetDragSourceFlags() const { return nDragSourceFlags; }
+ bool HasFilteredRows() const { return bHasFiltered; }
+ ScDocShell* GetSourceDocShell();
+ ScDocument* GetSourceDocument();
+ ScMarkData GetSourceMarkData();
+
+ void SetDrawPersist( const SfxObjectShellRef& rRef );
+ void SetDragHandlePos( SCCOL nX, SCROW nY );
+ void SetVisibleTab( SCTAB nNew );
+ void SetDragSource( ScDocShell* pSourceShell, const ScMarkData& rMark );
+ void SetDragSourceFlags( USHORT nFlags );
+ void SetDragWasInternal();
+
+ static SC_DLLPUBLIC ScTransferObj* GetOwnClipboard( Window* pUIWin );
+
+ static SfxObjectShell* SetDrawClipDoc( BOOL bAnyOle ); // update ScGlobal::pDrawClipDocShellRef
+ virtual sal_Int64 SAL_CALL getSomething( const com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( com::sun::star::uno::RuntimeException );
+ static const com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+};
+
+#endif
+
diff --git a/sc/source/ui/inc/ui_pch.hxx b/sc/source/ui/inc/ui_pch.hxx
new file mode 100644
index 000000000000..1ef2f02d405b
--- /dev/null
+++ b/sc/source/ui/inc/ui_pch.hxx
@@ -0,0 +1,332 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// ItemID-Defines etc. muessen immer ganz vorne stehen
+
+#include "scitems.hxx"
+
+#define _ZFORLIST_DECLARE_TABLE
+
+#define _PRINTFUN_CXX
+#define _INPUTHDL_CXX
+
+// ab hier automatisch per makepch generiert
+// folgende duerfen nicht aufgenommen werden:
+// scslots.hxx
+
+#include <tools/solar.h>
+#include <tools/string.hxx>
+#include <svl/solar.hrc>
+#include <tools/rtti.hxx>
+#include <string.h>
+#include <tools/contnr.hxx>
+#include <vcl/sv.h>
+#include <tools/ref.hxx>
+#include <tools/list.hxx>
+#include <tools/link.hxx>
+#include <i18npool/lang.h>
+#include <sfx2/sfx.hrc>
+#include <svl/memberid.hrc>
+#include <sfx2/sfxsids.hrc>
+#include <svl/cntwids.hrc>
+#include <tools/resid.hxx>
+#include <tools/rc.hxx>
+#include <tools/resmgr.hxx>
+#include <tools/gen.hxx>
+#include <tools/fract.hxx>
+#include <tools/date.hxx>
+#include <tools/time.hxx>
+#include <vcl/keycod.hxx>
+#include <vcl/keycodes.hxx>
+#include <tools/globname.hxx>
+#include <tools/color.hxx>
+#include <vcl/region.hxx>
+#include <vcl/mapmod.hxx>
+#include <vcl/bitmap.hxx>
+#include <sot/sotref.hxx>
+#include <svx/svxids.hrc>
+#include <vcl/vclenum.hxx>
+#include <sot/object.hxx>
+#include <sot/sotdata.hxx>
+#include <sot/factory.hxx>
+#include <tools/ownlist.hxx>
+#include <vcl/font.hxx>
+#include <vcl/wall.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/accel.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/pointr.hxx>
+#include <vcl/ptrstyle.hxx>
+#include <vcl/wintypes.hxx>
+#include <vcl/event.hxx>
+#include <limits.h>
+#include <tools/errinf.hxx>
+#include <tools/errcode.hxx>
+#include <tools/stream.hxx>
+#include <vcl/color.hxx>
+#include <vcl/window.hxx>
+#include <global.hxx>
+#include <vcl/syswin.hxx>
+#include <tools/debug.hxx>
+#include <svl/svarray.hxx>
+#include <vcl/ctrl.hxx>
+#include <svl/hint.hxx>
+#include <svl/poolitem.hxx>
+#include <vcl/image.hxx>
+#include <vcl/timer.hxx>
+#include <tools/unqidx.hxx>
+#include <vcl/symbol.hxx>
+#include <vcl/fixed.hxx>
+#include <svl/brdcst.hxx>
+#include <vcl/timer.hxx>
+#include <sc.hrc>
+#include <stdarg.h>
+#include <svx/dialogs.hrc>
+#include <basic/sbxdef.hxx>
+#include <svl/lstner.hxx>
+#include <sfx2/shell.hxx>
+#include <vcl/window.hxx>
+#include <vcl/group.hxx>
+#include <tools/unqid.hxx>
+#include <tools/table.hxx>
+#include <svl/itemset.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+#include <rangelst.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/combobox.h>
+#include <tools/shl.hxx>
+#include <vcl/field.hxx>
+#include <vcl/spinfld.hxx>
+#include <vcl/combobox.hxx>
+#include <tools/pstm.hxx>
+#include <svl/eitem.hxx>
+#include <svl/itempool.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <vcl/tabdlg.hxx>
+#include <vcl/tabpage.hxx>
+#include <vcl/tabctrl.hxx>
+#include <shellids.hxx>
+#include <vcl/event.hxx>
+#include <svl/intitem.hxx>
+#include <svtools/confitem.hxx>
+#include <markdata.hxx>
+#include <svx/optgrid.hxx>
+#include <vcl/apptypes.hxx>
+#include <viewopti.hxx>
+#include <viewdata.hxx>
+#include <sfx2/viewsh.hxx>
+#include <sfx2/clientsh.hxx>
+#include <document.hxx>
+#include <vcl/prntypes.hxx>
+#include <table.hxx>
+#include <column.hxx>
+#include <markarr.hxx>
+#include <vcl/mapmod.hxx>
+#include <svl/undo.hxx>
+#include <vcl/seleng.hxx>
+#include <rsc/rscsfx.hxx>
+#include <svx/zoomitem.hxx>
+#include <vcl/scrbar.hxx>
+#include <viewutil.hxx>
+#include <vcl/svapp.hxx>
+#include <tools/datetime.hxx>
+#include <tabview.hxx>
+#include <select.hxx>
+#include <sfx2/imgdef.hxx>
+#include <viewfunc.hxx>
+#include <sfx2/module.hxx>
+#include <dbfunc.hxx>
+#include <vcl/accel.hxx>
+#include <svl/smplhint.hxx>
+#include <sfx2/viewfac.hxx>
+#include <sot/storage.hxx>
+#include <sfx2/objsh.hxx>
+#include <target.hxx>
+#include <tabvwsh.hxx>
+#include <svl/inethist.hxx>
+#include <svl/inetdef.hxx>
+#include <sfx2/sfxdefs.hxx>
+#include <svtools/compat.hxx>
+#include <svl/inetmsg.hxx>
+#include <sfx2/app.hxx>
+#include <tools/urlobj.hxx>
+#include <scdll.hxx>
+#include <sfx2/msg.hxx>
+#include <svl/ownlist.hxx>
+#include <sfx2/objface.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/frame.hxx>
+#include <scresid.hxx>
+#include <sfx2/ipfrm.hxx>
+#include <docsh.hxx>
+//REMOVE #include <sfx2/interno.hxx>
+#include <vcl/wintypes.hxx>
+#include <sfx2/docfac.hxx>
+#include <scitems.hxx>
+#include <vcl/virdev.hxx>
+#include <globstr.hrc>
+#include <tcov.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/gdimtf.hxx>
+#include <vcl/lstbox.h>
+#include <sfx2/minarray.hxx>
+#include <sfx2/bindings.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/pointr.hxx>
+#include <vcl/prntypes.hxx>
+#include <vcl/jobset.hxx>
+#include <svx/svdtypes.hxx>
+#include <vcl/btndlg.hxx>
+#include <vcl/svapp.hxx>
+#include <svl/svstdarr.hxx>
+#include <vcl/edit.hxx>
+#include <svl/stritem.hxx>
+#include <collect.hxx>
+#include <svx/svdsob.hxx>
+#include <vcl/imagebtn.hxx>
+#include <svx/svdobj.hxx>
+#include <svx/svdglue.hxx>
+#include <svx/svdlayer.hxx>
+#include <vcl/msgbox.hxx>
+#include <svx/svdmrkv.hxx>
+#include <svx/svdmark.hxx>
+#include <svx/svdhdl.hxx>
+#include <svx/svdsnpv.hxx>
+#include <svx/svdpntv.hxx>
+#include <svx/svddrag.hxx>
+#include <svx/svdhlpln.hxx>
+#include <scmod.hxx>
+#include <sfx2/request.hxx>
+#include <vcl/field.hxx>
+#include <svx/svdview.hxx>
+#include <svx/svdcrtv.hxx>
+#include <vcl/print.hxx>
+#include <vcl/floatwin.hxx>
+#include <vcl/wrkwin.hxx>
+#include <sfx2/childwin.hxx>
+#include <sfx2/chalign.hxx>
+#include <sfx2/dispatch.hxx>
+#include <vcl/graph.hxx>
+#include <vcl/bitmapex.hxx>
+#include <vcl/animate.hxx>
+#include <vcl/graph.h>
+#include <editeng/editdata.hxx>
+#include <svtools/stdctrl.hxx>
+#include <sfx2/basedlgs.hxx>
+#include <conditio.hxx>
+#include <vcl/combobox.hxx>
+#include <vcl/print.hxx>
+#include <uiitems.hxx>
+#include <svx/svdmodel.hxx>
+#include <vcl/gdiobj.hxx>
+#include <editeng/editeng.hxx>
+#include <svx/pageitem.hxx>
+#include <anyrefdg.hxx>
+#include <basic/sbxcore.hxx>
+#include <vcl/ctrl.hxx>
+#include <svx/xenum.hxx>
+#include <dbcolect.hxx>
+#include <sot/exchange.hxx>
+#include <math.h>
+#include <vcl/wrkwin.hxx>
+#include <basic/sbxvar.hxx>
+#include <vcl/image.hxx>
+#include <svx/xdef.hxx>
+#include <drwlayer.hxx>
+#include <editutil.hxx>
+#include <svx/xit.hxx>
+#include <svx/xcolit.hxx>
+#include <attrib.hxx>
+#include <patattr.hxx>
+#include <svx/xfillit0.hxx>
+#include <svx/xlineit0.hxx>
+#include <svx/xflasit.hxx>
+#include <svx/xlnasit.hxx>
+#include <svx/svdattr.hxx>
+#include <svx/sdangitm.hxx>
+#include <svx/sderitm.hxx>
+#include <svx/sdmetitm.hxx>
+#include <svx/svddef.hxx>
+#include <svx/sdooitm.hxx>
+#include <svx/sdprcitm.hxx>
+#include <svx/sdshcitm.hxx>
+#include <svx/sdshitm.hxx>
+#include <svx/sdshtitm.hxx>
+#include <svx/sdsxyitm.hxx>
+#include <svx/sdtaaitm.hxx>
+#include <svx/sdtacitm.hxx>
+#include <svx/sdtaditm.hxx>
+#include <svx/sdtagitm.hxx>
+#include <svx/sdtaiitm.hxx>
+#include <svx/sdynitm.hxx>
+#include <svx/sdtaitm.hxx>
+#include <svx/sdtakitm.hxx>
+#include <svx/sdtayitm.hxx>
+#include <svx/sdtcfitm.hxx>
+#include <svx/sdtditm.hxx>
+#include <svx/sdtfsitm.hxx>
+#include <svx/sdtmfitm.hxx>
+#include <tools/poly.hxx>
+#include <vcl/gdimtf.hxx>
+#include <cell.hxx>
+#include <stddef.h>
+#include <tools/mempool.hxx>
+#include <svl/style.hrc>
+#include <drawview.hxx>
+#include <svx/view3d.hxx>
+#include <svx/def3d.hxx>
+#include <vcl/floatwin.hxx>
+#include <basic/sbxobj.hxx>
+#include <editeng/svxenum.hxx>
+#include <svx/xtextit0.hxx>
+#include <svx/svdtrans.hxx>
+#include <svl/style.hxx>
+#include <reffact.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/svdoattr.hxx>
+#include <tools/wldcrd.hxx>
+#include <rangenam.hxx>
+#include <undobase.hxx>
+#include <vcl/dockwin.hxx>
+#include <vcl/virdev.hxx>
+#include <rangeutl.hxx>
+#include <vcl/toolbox.hxx>
+#include <fupoor.hxx>
+#include <docpool.hxx>
+#include <vcl/button.hxx>
+#include <svl/srchitem.hxx>
+#include <svx/svdorect.hxx>
+#include <svl/whiter.hxx>
+#include <stlpool.hxx>
+#include <editeng/eeitem.hxx>
+#include <inputhdl.hxx>
+#include <svx/svdpage.hxx>
+
+
+
+
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
new file mode 100644
index 000000000000..770411b63e1b
--- /dev/null
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -0,0 +1,378 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UIITEMS_HXX
+#define SC_UIITEMS_HXX
+
+#include "scdllapi.h"
+#include "conditio.hxx"
+#include "sortparam.hxx"
+#include "queryparam.hxx"
+#include "paramisc.hxx"
+#include <svl/poolitem.hxx>
+
+class ScEditEngineDefaulter;
+class EditTextObject;
+class ScViewData;
+class ScDPSaveData;
+
+// ---------------------------------------------------------------------------
+
+// Items
+
+class ScInputStatusItem : public SfxPoolItem
+{
+ ScAddress aCursorPos;
+ ScAddress aStartPos;
+ ScAddress aEndPos;
+ String aString;
+ EditTextObject* pEditData;
+
+public:
+ TYPEINFO();
+//UNUSED2008-05 ScInputStatusItem( USHORT nWhich,
+//UNUSED2008-05 SCTAB nTab,
+//UNUSED2008-05 SCCOL nCol, SCROW nRow,
+//UNUSED2008-05 SCCOL nStartCol, SCROW nStartRow,
+//UNUSED2008-05 SCCOL nEndCol, SCROW nSEndRow,
+//UNUSED2008-05 const String& rString,
+//UNUSED2008-05 const EditTextObject* pData );
+
+ ScInputStatusItem( USHORT nWhich,
+ const ScAddress& rCurPos,
+ const ScAddress& rStartPos,
+ const ScAddress& rEndPos,
+ const String& rString,
+ const EditTextObject* pData );
+ ScInputStatusItem( const ScInputStatusItem& rItem );
+ ~ScInputStatusItem();
+
+ virtual String GetValueText() const;
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ const ScAddress& GetPos() const { return aCursorPos; }
+ const ScAddress& GetStartPos() const { return aStartPos; }
+ const ScAddress& GetEndPos() const { return aEndPos; }
+ SCTAB GetTab() const { return aCursorPos.Tab(); }
+ SCCOL GetCol() const { return aCursorPos.Col(); }
+ SCROW GetRow() const { return aCursorPos.Row(); }
+ SCCOL GetStartCol() const { return aStartPos.Col(); }
+ SCROW GetStartRow() const { return aStartPos.Row(); }
+ SCCOL GetEndCol() const { return aEndPos.Col(); }
+ SCROW GetEndRow() const { return aEndPos.Row(); }
+
+ const String& GetString() const { return aString; }
+ const EditTextObject* GetEditData() const { return pEditData; }
+};
+
+
+#define SC_TAB_INSERTED 1
+#define SC_TAB_DELETED 2
+#define SC_TAB_MOVED 3
+#define SC_TAB_COPIED 4
+#define SC_TAB_HIDDEN 5
+
+class ScTablesHint : public SfxHint
+{
+ USHORT nId;
+ SCTAB nTab1;
+ SCTAB nTab2;
+
+public:
+ TYPEINFO();
+ ScTablesHint(USHORT nNewId, SCTAB nTable1, SCTAB nTable2=0);
+ ~ScTablesHint();
+
+ USHORT GetId() const { return nId; }
+ SCTAB GetTab1() const { return nTab1; }
+ SCTAB GetTab2() const { return nTab2; }
+};
+
+class ScEditViewHint : public SfxHint
+{
+ ScEditEngineDefaulter* pEditEngine;
+ ScAddress aCursorPos;
+
+public:
+ TYPEINFO();
+ ScEditViewHint( ScEditEngineDefaulter* pEngine, const ScAddress& rCurPos );
+ ~ScEditViewHint();
+
+ SCCOL GetCol() const { return aCursorPos.Col(); }
+ SCROW GetRow() const { return aCursorPos.Row(); }
+ SCTAB GetTab() const { return aCursorPos.Tab(); }
+ ScEditEngineDefaulter* GetEngine() const { return pEditEngine; }
+
+private:
+ ScEditViewHint(); // disabled
+};
+
+class ScIndexHint : public SfxHint
+{
+ USHORT nId;
+ USHORT nIndex;
+
+public:
+ TYPEINFO();
+ ScIndexHint(USHORT nNewId, USHORT nIdx);
+ ~ScIndexHint();
+
+ USHORT GetId() const { return nId; }
+ USHORT GetIndex() const { return nIndex; }
+};
+
+//----------------------------------------------------------------------------
+// Parameter-Item fuer den Sortierdialog:
+
+class SC_DLLPUBLIC ScSortItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+ ScSortItem( USHORT nWhich,
+ ScViewData* ptrViewData,
+ const ScSortParam* pSortData );
+ ScSortItem( USHORT nWhich,
+ const ScSortParam* pSortData );
+ ScSortItem( const ScSortItem& rItem );
+ ~ScSortItem();
+
+ virtual String GetValueText() const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const;
+
+ ScViewData* GetViewData () const { return pViewData; }
+ const ScSortParam& GetSortData () const { return theSortData; }
+
+private:
+ ScViewData* pViewData;
+ ScSortParam theSortData;
+};
+
+//----------------------------------------------------------------------------
+// Parameter-Item fuer den Filterdialog:
+
+class SC_DLLPUBLIC ScQueryItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+ ScQueryItem( USHORT nWhich,
+ ScViewData* ptrViewData,
+ const ScQueryParam* pQueryData );
+ ScQueryItem( USHORT nWhich,
+ const ScQueryParam* pQueryData );
+ ScQueryItem( const ScQueryItem& rItem );
+ ~ScQueryItem();
+
+ virtual String GetValueText() const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ ScViewData* GetViewData () const { return pViewData; }
+ const ScQueryParam& GetQueryData() const { return theQueryData; }
+
+ BOOL GetAdvancedQuerySource(ScRange& rSource) const;
+ void SetAdvancedQuerySource(const ScRange* pSource);
+
+private:
+ ScViewData* pViewData;
+ ScQueryParam theQueryData;
+ BOOL bIsAdvanced;
+ ScRange aAdvSource;
+};
+
+//----------------------------------------------------------------------------
+// Parameter-Item fuer den Zwischenergebnisdialog:
+
+class SC_DLLPUBLIC ScSubTotalItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+ ScSubTotalItem( USHORT nWhich,
+ ScViewData* ptrViewData,
+ const ScSubTotalParam* pSubTotalData );
+ ScSubTotalItem( USHORT nWhich,
+ const ScSubTotalParam* pSubTotalData );
+ ScSubTotalItem( const ScSubTotalItem& rItem );
+ ~ScSubTotalItem();
+
+ virtual String GetValueText() const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberUd ) const;
+
+ ScViewData* GetViewData () const { return pViewData; }
+ const ScSubTotalParam& GetSubTotalData() const { return theSubTotalData; }
+
+private:
+ ScViewData* pViewData;
+ ScSubTotalParam theSubTotalData;
+};
+
+//----------------------------------------------------------------------------
+// Parameter-Item fuer die Benutzerlisten-TabPage:
+
+class SC_DLLPUBLIC ScUserListItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+ ScUserListItem( USHORT nWhich );
+ ScUserListItem( const ScUserListItem& rItem );
+ ~ScUserListItem();
+
+ virtual String GetValueText() const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ void SetUserList ( const ScUserList& rUserList );
+ ScUserList* GetUserList () const { return pUserList; }
+
+private:
+ ScUserList* pUserList;
+};
+
+//----------------------------------------------------------------------------
+// Parameter-Item fuer die Konsolidieren-Dialog
+
+class ScConsolidateItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+ ScConsolidateItem( USHORT nWhich,
+ const ScConsolidateParam* pParam );
+ ScConsolidateItem( const ScConsolidateItem& rItem );
+ ~ScConsolidateItem();
+
+ virtual String GetValueText() const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ const ScConsolidateParam& GetData() const { return theConsData; }
+
+private:
+ ScConsolidateParam theConsData;
+};
+
+//----------------------------------------------------------------------------
+// Parameter-Item fuer den Pivot-Dialog
+
+class ScPivotItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+ ScPivotItem( USHORT nWhich, const ScDPSaveData* pData,
+ const ScRange* pRange, BOOL bNew );
+ ScPivotItem( const ScPivotItem& rItem );
+ ~ScPivotItem();
+
+ virtual String GetValueText() const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ const ScDPSaveData& GetData() const { return *pSaveData; }
+ const ScRange& GetDestRange() const { return aDestRange; }
+ BOOL IsNewSheet() const { return bNewSheet; }
+
+private:
+ ScDPSaveData* pSaveData;
+ ScRange aDestRange;
+ BOOL bNewSheet;
+};
+
+//----------------------------------------------------------------------------
+// Parameter-Item fuer den Solver-Dialog
+
+class ScSolveItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+ ScSolveItem( USHORT nWhich,
+ const ScSolveParam* pParam );
+ ScSolveItem( const ScSolveItem& rItem );
+ ~ScSolveItem();
+
+ virtual String GetValueText() const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ const ScSolveParam& GetData() const { return theSolveData; }
+
+private:
+ ScSolveParam theSolveData;
+};
+
+//----------------------------------------------------------------------------
+// Parameter-Item fuer den Mehrfachoperationen-Dialog
+
+class ScTabOpItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+ ScTabOpItem( USHORT nWhich,
+ const ScTabOpParam* pParam );
+ ScTabOpItem( const ScTabOpItem& rItem );
+ ~ScTabOpItem();
+
+ virtual String GetValueText() const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ const ScTabOpParam& GetData() const { return theTabOpData; }
+
+private:
+ ScTabOpParam theTabOpData;
+};
+
+//----------------------------------------------------------------------------
+// Parameter-Item fuer den Dialog bedingte Formatierung
+
+class ScCondFrmtItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+ ScCondFrmtItem( USHORT nWhich,
+//! const ScConditionalFormat* pCondFrmt );
+ const ScConditionalFormat& rCondFrmt );
+ ScCondFrmtItem( const ScCondFrmtItem& rItem );
+ ~ScCondFrmtItem();
+
+ virtual String GetValueText() const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ const ScConditionalFormat& GetData() const { return theCondFrmtData; }
+
+private:
+ ScConditionalFormat theCondFrmtData;
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
new file mode 100644
index 000000000000..6f2bb3572832
--- /dev/null
+++ b/sc/source/ui/inc/undobase.hxx
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UNDOBASE_HXX
+#define SC_UNDOBASE_HXX
+
+#include <svl/undo.hxx>
+#include "global.hxx"
+#include "address.hxx"
+
+class ScDocument;
+class ScDocShell;
+class SdrUndoAction;
+class ScRefUndoData;
+class ScDBData;
+
+//----------------------------------------------------------------------------
+
+class ScSimpleUndo: public SfxUndoAction
+{
+public:
+ TYPEINFO();
+ ScSimpleUndo( ScDocShell* pDocSh );
+ virtual ~ScSimpleUndo();
+
+ virtual BOOL Merge( SfxUndoAction *pNextAction );
+
+protected:
+ ScDocShell* pDocShell;
+ SfxUndoAction* pDetectiveUndo;
+
+ void BeginUndo();
+ void EndUndo();
+ void BeginRedo();
+ void EndRedo();
+
+ static void ShowTable( SCTAB nTab );
+ static void ShowTable( const ScRange& rRange );
+};
+
+//----------------------------------------------------------------------------
+
+enum ScBlockUndoMode { SC_UNDO_SIMPLE, SC_UNDO_MANUALHEIGHT, SC_UNDO_AUTOHEIGHT };
+
+class ScBlockUndo: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScBlockUndo( ScDocShell* pDocSh, const ScRange& rRange,
+ ScBlockUndoMode eBlockMode );
+ virtual ~ScBlockUndo();
+
+protected:
+ ScRange aBlockRange;
+ SdrUndoAction* pDrawUndo;
+ ScBlockUndoMode eMode;
+
+ void BeginUndo();
+ void EndUndo();
+// void BeginRedo();
+ void EndRedo();
+
+ BOOL AdjustHeight();
+ void ShowBlock();
+};
+
+//----------------------------------------------------------------------------
+
+// for functions that act on a database range - takes care of the unnamed database range
+// (collected separately, before the undo action, for showing dialogs etc.)
+
+class ScDBFuncUndo: public ScSimpleUndo
+{
+ ScDBData* pAutoDBRange;
+ ScRange aOriginalRange;
+ SdrUndoAction* mpDrawUndo;
+
+public:
+ TYPEINFO();
+ ScDBFuncUndo( ScDocShell* pDocSh, const ScRange& rOriginal, SdrUndoAction* pDrawUndo = 0 );
+ virtual ~ScDBFuncUndo();
+
+ void SetDrawUndoAction( SdrUndoAction* pDrawUndo );
+
+ void BeginUndo();
+ void EndUndo();
+ void BeginRedo();
+ void EndRedo();
+};
+
+//----------------------------------------------------------------------------
+
+enum ScMoveUndoMode { SC_UNDO_REFFIRST, SC_UNDO_REFLAST };
+
+class ScMoveUndo: public ScSimpleUndo // mit Referenzen
+{
+public:
+ TYPEINFO();
+ ScMoveUndo( ScDocShell* pDocSh,
+ ScDocument* pRefDoc, ScRefUndoData* pRefData,
+ ScMoveUndoMode eRefMode );
+ virtual ~ScMoveUndo();
+
+protected:
+ SdrUndoAction* pDrawUndo;
+ ScDocument* pRefUndoDoc;
+ ScRefUndoData* pRefUndoData;
+ ScMoveUndoMode eMode;
+
+ void BeginUndo();
+ void EndUndo();
+// void BeginRedo();
+// void EndRedo();
+
+private:
+ void UndoRef();
+};
+
+//----------------------------------------------------------------------------
+
+class ScUndoWrapper: public SfxUndoAction // for manual merging of actions
+{
+ SfxUndoAction* pWrappedUndo;
+
+public:
+ TYPEINFO();
+ ScUndoWrapper( SfxUndoAction* pUndo );
+ virtual ~ScUndoWrapper();
+
+ SfxUndoAction* GetWrappedUndo() { return pWrappedUndo; }
+ void ForgetWrappedUndo();
+
+ virtual BOOL IsLinked();
+ virtual void SetLinked( BOOL bIsLinked );
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual String GetComment() const;
+ virtual String GetRepeatComment(SfxRepeatTarget&) const;
+ virtual USHORT GetId() const;
+};
+
+
+#endif
+
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
new file mode 100644
index 000000000000..574926ecbf52
--- /dev/null
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -0,0 +1,988 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SC_UNDOBLK_HXX
+#define SC_UNDOBLK_HXX
+
+#include "undobase.hxx"
+#include "markdata.hxx"
+#include "viewutil.hxx"
+#include "spellparam.hxx"
+
+class ScDocShell;
+class ScBaseCell;
+class ScDocument;
+class ScOutlineTable;
+class ScRangeName;
+class ScRangeList;
+class ScDBCollection;
+class ScPatternAttr;
+class SvxBoxItem;
+class SvxBoxInfoItem;
+class SvxSearchItem;
+class SdrUndoAction;
+
+//----------------------------------------------------------------------------
+
+class ScUndoInsertCells: public ScMoveUndo
+{
+public:
+ TYPEINFO();
+ ScUndoInsertCells( ScDocShell* pNewDocShell,
+ const ScRange& rRange, SCTAB nNewCount, SCTAB* pNewTabs, SCTAB* pNewScenarios,
+ InsCellCmd eNewCmd, ScDocument* pUndoDocument, ScRefUndoData* pRefData,
+ BOOL bNewPartOfPaste );
+ virtual ~ScUndoInsertCells();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat( SfxRepeatTarget& rTarget );
+ virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const;
+
+ virtual String GetComment() const;
+
+ virtual BOOL Merge( SfxUndoAction *pNextAction );
+
+private:
+ ScRange aEffRange;
+ SCTAB nCount;
+ SCTAB* pTabs;
+ SCTAB* pScenarios;
+ ULONG nEndChangeAction;
+ InsCellCmd eCmd;
+ BOOL bPartOfPaste;
+ SfxUndoAction* pPasteUndo;
+
+ void DoChange ( const BOOL bUndo );
+ void SetChangeTrack();
+};
+
+
+class ScUndoDeleteCells: public ScMoveUndo
+{
+public:
+ TYPEINFO();
+ ScUndoDeleteCells( ScDocShell* pNewDocShell,
+ const ScRange& rRange, SCTAB nNewCount, SCTAB* pNewTabs, SCTAB* pNewScenarios,
+ DelCellCmd eNewCmd, ScDocument* pUndoDocument, ScRefUndoData* pRefData );
+ virtual ~ScUndoDeleteCells();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScRange aEffRange;
+ SCTAB nCount;
+ SCTAB* pTabs;
+ SCTAB* pScenarios;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+ DelCellCmd eCmd;
+
+ void DoChange ( const BOOL bUndo );
+ void SetChangeTrack();
+};
+
+
+class ScUndoDeleteMulti: public ScMoveUndo
+{
+public:
+ TYPEINFO();
+ ScUndoDeleteMulti( ScDocShell* pNewDocShell,
+ BOOL bNewRows, BOOL bNeedsRefresh, SCTAB nNewTab,
+ const SCCOLROW* pRng, SCCOLROW nRngCnt,
+ ScDocument* pUndoDocument, ScRefUndoData* pRefData );
+ virtual ~ScUndoDeleteMulti();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ BOOL bRows;
+ BOOL bRefresh;
+ SCTAB nTab;
+ SCCOLROW* pRanges;
+ SCCOLROW nRangeCnt;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+
+ void DoChange() const;
+ void SetChangeTrack();
+};
+
+
+class ScUndoCut: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoCut( ScDocShell* pNewDocShell,
+ ScRange aRange, // adjusted for merged cells
+ ScAddress aOldEnd, // end position without adjustment
+ const ScMarkData& rMark, // selected sheets
+ ScDocument* pNewUndoDoc );
+ virtual ~ScUndoCut();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScMarkData aMarkData;
+ ScDocument* pUndoDoc;
+ ScRange aExtendedRange;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+
+ void DoChange( const BOOL bUndo );
+ void SetChangeTrack();
+};
+
+
+struct ScUndoPasteOptions
+{
+ USHORT nFunction;
+ BOOL bSkipEmpty;
+ BOOL bTranspose;
+ BOOL bAsLink;
+ InsCellCmd eMoveMode;
+
+ ScUndoPasteOptions() :
+ nFunction( PASTE_NOFUNC ),
+ bSkipEmpty( FALSE ),
+ bTranspose( FALSE ),
+ bAsLink( FALSE ),
+ eMoveMode( INS_NONE )
+ {}
+};
+
+class ScUndoPaste: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoPaste( ScDocShell* pNewDocShell,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
+ const ScMarkData& rMark,
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
+ USHORT nNewFlags,
+ ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3,
+ BOOL bRedoIsFilled = TRUE,
+ const ScUndoPasteOptions* pOptions = NULL );
+ virtual ~ScUndoPaste();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScMarkData aMarkData;
+ ScDocument* pUndoDoc;
+ ScDocument* pRedoDoc;
+ USHORT nFlags;
+ ScRefUndoData* pRefUndoData;
+ ScRefUndoData* pRefRedoData;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+ BOOL bRedoFilled;
+ ScUndoPasteOptions aPasteOptions;
+
+ void DoChange( const BOOL bUndo );
+ void SetChangeTrack();
+};
+
+
+class ScUndoDragDrop: public ScMoveUndo
+{
+public:
+ TYPEINFO();
+ ScUndoDragDrop( ScDocShell* pNewDocShell,
+ const ScRange& rRange, ScAddress aNewDestPos, BOOL bNewCut,
+ ScDocument* pUndoDocument, ScRefUndoData* pRefData,
+ BOOL bScenario );
+ virtual ~ScUndoDragDrop();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScRange aSrcRange;
+ ScRange aDestRange;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+ BOOL bCut;
+ BOOL bKeepScenarioFlags;
+
+ void PaintArea( ScRange aRange, USHORT nExtFlags ) const;
+ void DoUndo( ScRange aRange ) const;
+
+ void SetChangeTrack();
+};
+
+
+class ScUndoDeleteContents: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoDeleteContents( ScDocShell* pNewDocShell,
+ const ScMarkData& rMark,
+ const ScRange& rRange,
+ ScDocument* pNewUndoDoc, BOOL bNewMulti,
+ USHORT nNewFlags, BOOL bObjects );
+ virtual ~ScUndoDeleteContents();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScRange aRange;
+ ScMarkData aMarkData;
+ ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
+ SdrUndoAction* pDrawUndo; // geloeschte Objekte
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+ USHORT nFlags;
+ BOOL bMulti; // Mehrfachselektion
+
+ void DoChange( const BOOL bUndo );
+ void SetChangeTrack();
+};
+
+
+class ScUndoFillTable: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoFillTable( ScDocShell* pNewDocShell,
+ const ScMarkData& rMark,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
+ ScDocument* pNewUndoDoc, BOOL bNewMulti, SCTAB nSrc,
+ USHORT nFlg, USHORT nFunc, BOOL bSkip, BOOL bLink );
+ virtual ~ScUndoFillTable();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScRange aRange;
+ ScMarkData aMarkData;
+ ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+ USHORT nFlags;
+ USHORT nFunction;
+ SCTAB nSrcTab;
+ BOOL bMulti; // Mehrfachselektion
+ BOOL bSkipEmpty;
+ BOOL bAsLink;
+
+ void DoChange( const BOOL bUndo );
+ void SetChangeTrack();
+};
+
+
+class ScUndoSelectionAttr: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoSelectionAttr( ScDocShell* pNewDocShell,
+ const ScMarkData& rMark,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
+ ScDocument* pNewUndoDoc, BOOL bNewMulti,
+ const ScPatternAttr* pNewApply,
+ const SvxBoxItem* pNewOuter = NULL,
+ const SvxBoxInfoItem* pNewInner = NULL );
+ virtual ~ScUndoSelectionAttr();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScMarkData aMarkData;
+ ScRange aRange;
+ ScDocument* pUndoDoc;
+ BOOL bMulti;
+ ScPatternAttr* pApplyPattern;
+ SvxBoxItem* pLineOuter;
+ SvxBoxInfoItem* pLineInner;
+
+ void DoChange( const BOOL bUndo );
+};
+
+
+class ScUndoWidthOrHeight: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoWidthOrHeight( ScDocShell* pNewDocShell,
+ const ScMarkData& rMark,
+ SCCOLROW nNewStart, SCTAB nNewStartTab,
+ SCCOLROW nNewEnd, SCTAB nNewEndTab,
+ ScDocument* pNewUndoDoc,
+ SCCOLROW nNewCnt, SCCOLROW* pNewRanges,
+ ScOutlineTable* pNewUndoTab,
+ ScSizeMode eNewMode, USHORT nNewSizeTwips,
+ BOOL bNewWidth );
+ virtual ~ScUndoWidthOrHeight();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScMarkData aMarkData;
+ SCCOLROW nStart;
+ SCCOLROW nEnd;
+ SCTAB nStartTab;
+ SCTAB nEndTab;
+ ScDocument* pUndoDoc;
+ ScOutlineTable* pUndoTab;
+ SCCOLROW nRangeCnt;
+ SCCOLROW* pRanges;
+ USHORT nNewSize;
+ BOOL bWidth;
+ ScSizeMode eMode;
+ SdrUndoAction* pDrawUndo;
+};
+
+
+class ScUndoAutoFill: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoAutoFill( ScDocShell* pNewDocShell,
+ const ScRange& rRange, const ScRange& rSourceArea,
+ ScDocument* pNewUndoDoc, const ScMarkData& rMark,
+ FillDir eNewFillDir,
+ FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd,
+ double fNewStartValue, double fNewStepValue, double fNewMaxValue,
+ USHORT nMaxShIndex );
+ virtual ~ScUndoAutoFill();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScRange aSource;
+ ScMarkData aMarkData;
+ ScDocument* pUndoDoc;
+ FillDir eFillDir;
+ FillCmd eFillCmd;
+ FillDateCmd eFillDateCmd;
+ double fStartValue;
+ double fStepValue;
+ double fMaxValue;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+ USHORT nMaxSharedIndex;
+
+ void SetChangeTrack();
+};
+
+
+class ScUndoMerge: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoMerge( ScDocShell* pNewDocShell,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
+ bool bMergeContents, ScDocument* pUndoDoc, SdrUndoAction* pDrawUndo );
+ virtual ~ScUndoMerge();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScRange maRange;
+ bool mbMergeContents; // Merge contents in Redo().
+ ScDocument* mpUndoDoc; // wenn Daten zusammengefasst
+ SdrUndoAction* mpDrawUndo;
+
+ void DoChange( bool bUndo ) const;
+};
+
+
+class ScUndoAutoFormat: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoAutoFormat( ScDocShell* pNewDocShell,
+ const ScRange& rRange, ScDocument* pNewUndoDoc,
+ const ScMarkData& rMark,
+ BOOL bNewSize, USHORT nNewFormatNo );
+ virtual ~ScUndoAutoFormat();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScDocument* pUndoDoc; // geloeschte Daten
+ ScMarkData aMarkData;
+ BOOL bSize;
+ USHORT nFormatNo;
+};
+
+
+class ScUndoReplace: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoReplace( ScDocShell* pNewDocShell,
+ const ScMarkData& rMark,
+ SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
+ const String& rNewUndoStr, ScDocument* pNewUndoDoc,
+ const SvxSearchItem* pItem );
+ virtual ~ScUndoReplace();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScAddress aCursorPos;
+ ScMarkData aMarkData;
+ String aUndoStr; // Daten bei Einfachmarkierung
+ ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
+ SvxSearchItem* pSearchItem;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+
+ void SetChangeTrack();
+};
+
+
+class ScUndoTabOp: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoTabOp( ScDocShell* pNewDocShell,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
+ ScDocument* pNewUndoDoc,
+ const ScRefAddress& rFormulaCell,
+ const ScRefAddress& rFormulaEnd,
+ const ScRefAddress& rRowCell,
+ const ScRefAddress& rColCell,
+ BYTE nMode );
+ virtual ~ScUndoTabOp();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScRange aRange;
+ ScDocument* pUndoDoc; // geloeschte Daten
+ ScRefAddress theFormulaCell;
+ ScRefAddress theFormulaEnd;
+ ScRefAddress theRowCell;
+ ScRefAddress theColCell;
+ BYTE nMode;
+};
+
+
+class ScUndoConversion : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+
+ ScUndoConversion(
+ ScDocShell* pNewDocShell, const ScMarkData& rMark,
+ SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScDocument* pNewUndoDoc,
+ SCCOL nNewX, SCROW nNewY, SCTAB nNewZ, ScDocument* pNewRedoDoc,
+ const ScConversionParam& rConvParam );
+ virtual ~ScUndoConversion();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScMarkData aMarkData;
+ ScAddress aCursorPos;
+ ScDocument* pUndoDoc; // Blockmarkierung und geloeschte Daten
+ ScAddress aNewCursorPos;
+ ScDocument* pRedoDoc; // Blockmarkierung und neue Daten
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+ ScConversionParam maConvParam; /// Conversion type and parameters.
+
+ void DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPos );
+ void SetChangeTrack();
+};
+
+class ScUndoRefConversion: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoRefConversion( ScDocShell* pNewDocShell,
+ const ScRange& aMarkRange, const ScMarkData& rMark,
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, BOOL bNewMulti, USHORT nNewFlag);
+ virtual ~ScUndoRefConversion();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScMarkData aMarkData;
+ ScDocument* pUndoDoc;
+ ScDocument* pRedoDoc;
+ ScRange aRange;
+ BOOL bMulti;
+ USHORT nFlags;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+
+ void DoChange( ScDocument* pRefDoc);
+ void SetChangeTrack();
+};
+
+class ScUndoListNames: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoListNames( ScDocShell* pNewDocShell,
+ const ScRange& rRange,
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc );
+ virtual ~ScUndoListNames();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScDocument* pUndoDoc;
+ ScDocument* pRedoDoc;
+
+ void DoChange( ScDocument* pSrcDoc ) const;
+};
+
+
+class ScUndoUseScenario: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoUseScenario( ScDocShell* pNewDocShell,
+ const ScMarkData& rMark,
+ const ScArea& rDestArea, ScDocument* pNewUndoDoc,
+ const String& rNewName );
+ virtual ~ScUndoUseScenario();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScDocument* pUndoDoc;
+ ScRange aRange;
+ ScMarkData aMarkData;
+ String aName;
+};
+
+
+class ScUndoSelectionStyle: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoSelectionStyle( ScDocShell* pNewDocShell,
+ const ScMarkData& rMark,
+ const ScRange& rRange,
+ const String& rName,
+ ScDocument* pNewUndoDoc );
+ virtual ~ScUndoSelectionStyle();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+ virtual USHORT GetId() const;
+
+private:
+ ScMarkData aMarkData;
+ ScDocument* pUndoDoc;
+ String aStyleName;
+ ScRange aRange;
+
+ void DoChange( const BOOL bUndo );
+};
+
+
+class ScUndoRefreshLink: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoRefreshLink( ScDocShell* pNewDocShell,
+ ScDocument* pNewUndoDoc );
+ virtual ~ScUndoRefreshLink();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScDocument* pUndoDoc;
+ ScDocument* pRedoDoc;
+};
+
+
+class ScUndoEnterMatrix: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoEnterMatrix( ScDocShell* pNewDocShell,
+ const ScRange& rArea,
+ ScDocument* pNewUndoDoc,
+ const String& rForm );
+ virtual ~ScUndoEnterMatrix();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScDocument* pUndoDoc;
+ String aFormula;
+ formula::FormulaGrammar::AddressConvention eConv;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+
+ void SetChangeTrack();
+};
+
+
+class ScUndoInsertAreaLink : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoInsertAreaLink( ScDocShell* pShell,
+ const String& rDoc,
+ const String& rFlt, const String& rOpt,
+ const String& rArea, const ScRange& rDestRange,
+ ULONG nRefreshDelay );
+ virtual ~ScUndoInsertAreaLink();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ String aDocName;
+ String aFltName;
+ String aOptions;
+ String aAreaName;
+ ScRange aRange;
+ ULONG nRefreshDelay;
+};
+
+
+class ScUndoRemoveAreaLink : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoRemoveAreaLink( ScDocShell* pShell,
+ const String& rDoc,
+ const String& rFlt, const String& rOpt,
+ const String& rArea, const ScRange& rDestRange,
+ ULONG nRefreshDelay );
+ virtual ~ScUndoRemoveAreaLink();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ String aDocName;
+ String aFltName;
+ String aOptions;
+ String aAreaName;
+ ScRange aRange;
+ ULONG nRefreshDelay;
+};
+
+
+class ScUndoUpdateAreaLink : public ScSimpleUndo //! auch BlockUndo umstellen?
+{
+public:
+ TYPEINFO();
+ ScUndoUpdateAreaLink( ScDocShell* pShell,
+ const String& rOldD,
+ const String& rOldF, const String& rOldO,
+ const String& rOldA, const ScRange& rOldR,
+ ULONG nOldRD,
+ const String& rNewD,
+ const String& rNewF, const String& rNewO,
+ const String& rNewA, const ScRange& rNewR,
+ ULONG nNewRD,
+ ScDocument* pUndo, ScDocument* pRedo,
+ BOOL bDoInsert );
+ virtual ~ScUndoUpdateAreaLink();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ String aOldDoc;
+ String aOldFlt;
+ String aOldOpt;
+ String aOldArea;
+ ScRange aOldRange;
+ String aNewDoc;
+ String aNewFlt;
+ String aNewOpt;
+ String aNewArea;
+ ScRange aNewRange;
+ ScDocument* pUndoDoc;
+ ScDocument* pRedoDoc;
+ ULONG nOldRefresh;
+ ULONG nNewRefresh;
+ BOOL bWithInsert;
+
+ void DoChange( const BOOL bUndo ) const;
+};
+
+
+class ScUndoIndent: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoIndent( ScDocShell* pNewDocShell, const ScMarkData& rMark,
+ ScDocument* pNewUndoDoc, BOOL bIncrement );
+ virtual ~ScUndoIndent();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScMarkData aMarkData;
+ ScDocument* pUndoDoc;
+ BOOL bIsIncrement;
+};
+
+
+class ScUndoTransliterate: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoTransliterate( ScDocShell* pNewDocShell, const ScMarkData& rMark,
+ ScDocument* pNewUndoDoc, sal_Int32 nType );
+ virtual ~ScUndoTransliterate();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScMarkData aMarkData;
+ ScDocument* pUndoDoc;
+ sal_Int32 nTransliterationType;
+};
+
+
+class ScUndoClearItems: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData& rMark,
+ ScDocument* pNewUndoDoc, const USHORT* pW );
+ virtual ~ScUndoClearItems();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScMarkData aMarkData;
+ ScDocument* pUndoDoc;
+ USHORT* pWhich;
+};
+
+
+class ScUndoRemoveBreaks: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoRemoveBreaks( ScDocShell* pNewDocShell,
+ SCTAB nNewTab, ScDocument* pNewUndoDoc );
+ virtual ~ScUndoRemoveBreaks();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nTab;
+ ScDocument* pUndoDoc;
+};
+
+
+class ScUndoRemoveMerge: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoRemoveMerge( ScDocShell* pNewDocShell,
+ const ScRange& rArea,
+ ScDocument* pNewUndoDoc );
+ virtual ~ScUndoRemoveMerge();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScDocument* pUndoDoc;
+};
+
+
+class ScUndoBorder: public ScBlockUndo
+{
+public:
+ TYPEINFO();
+ ScUndoBorder( ScDocShell* pNewDocShell,
+ const ScRangeList& rRangeList,
+ ScDocument* pNewUndoDoc,
+ const SvxBoxItem& rNewOuter,
+ const SvxBoxInfoItem& rNewInner );
+ virtual ~ScUndoBorder();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScDocument* pUndoDoc;
+ ScRangeList* pRanges;
+ SvxBoxItem* pOuter;
+ SvxBoxInfoItem* pInner;
+};
+
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/undocell.hxx b/sc/source/ui/inc/undocell.hxx
new file mode 100644
index 000000000000..53f129166d10
--- /dev/null
+++ b/sc/source/ui/inc/undocell.hxx
@@ -0,0 +1,366 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UNDOCELL_HXX
+#define SC_UNDOCELL_HXX
+
+#include "undobase.hxx"
+#include "postit.hxx"
+
+class ScDocShell;
+class ScBaseCell;
+class ScPatternAttr;
+class EditTextObject;
+class SdrUndoAction;
+class ScDetOpList;
+class ScDetOpData;
+class ScRangeName;
+
+//----------------------------------------------------------------------------
+
+class ScUndoCursorAttr: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoCursorAttr( ScDocShell* pNewDocShell,
+ SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
+ const ScPatternAttr* pOldPat, const ScPatternAttr* pNewPat,
+ const ScPatternAttr* pApplyPat, BOOL bAutomatic );
+ virtual ~ScUndoCursorAttr();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCCOL nCol;
+ SCROW nRow;
+ SCTAB nTab;
+ ScPatternAttr* pOldPattern;
+ ScPatternAttr* pNewPattern;
+ ScPatternAttr* pApplyPattern;
+ BOOL bIsAutomatic;
+
+ void DoChange( const ScPatternAttr* pWhichPattern ) const;
+};
+
+
+class ScUndoEnterData: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoEnterData( ScDocShell* pNewDocShell,
+ SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
+ SCTAB nNewCount, SCTAB* pNewTabs,
+ ScBaseCell** ppOldData, BOOL* pHasForm, ULONG* pOldForm,
+ const String& rNewStr, EditTextObject* pObj = NULL );
+ virtual ~ScUndoEnterData();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ String aNewString;
+ SCTAB* pTabs;
+ ScBaseCell** ppOldCells;
+ BOOL* pHasFormat;
+ ULONG* pOldFormats;
+ EditTextObject* pNewEditData;
+ ULONG nEndChangeAction;
+ SCCOL nCol;
+ SCROW nRow;
+ SCTAB nTab;
+ SCTAB nCount; // markierte Tabellen
+
+ void DoChange() const;
+ void SetChangeTrack();
+};
+
+
+class ScUndoEnterValue: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoEnterValue( ScDocShell* pNewDocShell,
+ const ScAddress& rNewPos,
+ ScBaseCell* pUndoCell, double nVal, BOOL bHeight );
+ virtual ~ScUndoEnterValue();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScAddress aPos;
+ ScBaseCell* pOldCell;
+ double nValue;
+ ULONG nEndChangeAction;
+ BOOL bNeedHeight;
+
+ void SetChangeTrack();
+};
+
+
+class ScUndoPutCell: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoPutCell( ScDocShell* pNewDocShell,
+ const ScAddress& rNewPos,
+ ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, BOOL bHeight );
+ virtual ~ScUndoPutCell();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScAddress aPos;
+ ScBaseCell* pOldCell;
+ ScBaseCell* pEnteredCell;
+ ULONG nEndChangeAction;
+ BOOL bNeedHeight;
+
+ void SetChangeTrack();
+};
+
+
+class ScUndoPageBreak: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoPageBreak( ScDocShell* pNewDocShell,
+ SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
+ BOOL bNewColumn, BOOL bNewInsert );
+ virtual ~ScUndoPageBreak();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCCOL nCol;
+ SCROW nRow;
+ SCTAB nTab;
+ BOOL bColumn; // Spalten- oder Zeilenumbruch
+ BOOL bInsert; // Einfuegen oder Loeschen
+
+ void DoChange( BOOL bInsert ) const;
+};
+
+class ScUndoPrintZoom: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoPrintZoom( ScDocShell* pNewDocShell, SCTAB nT,
+ USHORT nOS, USHORT nOP, USHORT nNS, USHORT nNP );
+ virtual ~ScUndoPrintZoom();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nTab;
+ USHORT nOldScale;
+ USHORT nOldPages;
+ USHORT nNewScale;
+ USHORT nNewPages;
+
+ void DoChange( BOOL bUndo );
+};
+
+class ScUndoThesaurus: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoThesaurus( ScDocShell* pNewDocShell,
+ SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
+ const String& rNewUndoStr, const EditTextObject* pUndoTObj,
+ const String& rNewRedoStr, const EditTextObject* pRedoTObj);
+ virtual ~ScUndoThesaurus();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCCOL nCol;
+ SCROW nRow;
+ SCTAB nTab;
+ String aUndoStr; // Daten bei StringZelle
+ EditTextObject* pUndoTObject; // bei EditZelle
+ String aRedoStr;
+ EditTextObject* pRedoTObject;
+ ULONG nEndChangeAction;
+
+ void DoChange( BOOL bUndo, const String& rStr,
+ const EditTextObject* pTObj );
+ void SetChangeTrack( ScBaseCell* pOldCell );
+};
+
+// ============================================================================
+
+/** Undo action for inserting, removing, and replacing a cell note. */
+class ScUndoReplaceNote : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+
+ /** Constructs an undo action for inserting or removing a cell note. */
+ ScUndoReplaceNote(
+ ScDocShell& rDocShell,
+ const ScAddress& rPos,
+ const ScNoteData& rNoteData,
+ bool bInsert,
+ SdrUndoAction* pDrawUndo );
+
+ /** Constructs an undo action for replacing a cell note with another. */
+ ScUndoReplaceNote(
+ ScDocShell& rDocShell,
+ const ScAddress& rPos,
+ const ScNoteData& rOldData,
+ const ScNoteData& rNewData,
+ SdrUndoAction* pDrawUndo );
+
+ virtual ~ScUndoReplaceNote();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat( SfxRepeatTarget& rTarget );
+ virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const;
+
+ virtual String GetComment() const;
+
+private:
+ void DoInsertNote( const ScNoteData& rNoteData );
+ void DoRemoveNote( const ScNoteData& rNoteData );
+
+private:
+ ScAddress maPos;
+ ScNoteData maOldData;
+ ScNoteData maNewData;
+ SdrUndoAction* mpDrawUndo;
+};
+
+// ============================================================================
+
+/** Undo action for showing or hiding a cell note caption. */
+class ScUndoShowHideNote : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoShowHideNote( ScDocShell& rDocShell, const ScAddress& rPos, bool bShow );
+ virtual ~ScUndoShowHideNote();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat( SfxRepeatTarget& rTarget );
+ virtual BOOL CanRepeat( SfxRepeatTarget& rTarget ) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScAddress maPos;
+ bool mbShown;
+};
+
+// ============================================================================
+
+class ScUndoDetective: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoDetective( ScDocShell* pNewDocShell,
+ SdrUndoAction* pDraw, const ScDetOpData* pOperation,
+ ScDetOpList* pUndoList = NULL );
+ virtual ~ScUndoDetective();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ BOOL bIsDelete;
+ ScDetOpList* pOldList;
+ USHORT nAction;
+ ScAddress aPos;
+ SdrUndoAction* pDrawUndo;
+};
+
+
+class ScUndoRangeNames: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoRangeNames( ScDocShell* pNewDocShell,
+ ScRangeName* pOld, ScRangeName* pNew );
+ virtual ~ScUndoRangeNames();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScRangeName* pOldRanges;
+ ScRangeName* pNewRanges;
+
+ void DoChange( BOOL bUndo );
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx
new file mode 100644
index 000000000000..a2fcd392e9b4
--- /dev/null
+++ b/sc/source/ui/inc/undodat.hxx
@@ -0,0 +1,535 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UNDODAT_HXX
+#define SC_UNDODAT_HXX
+
+#include "undobase.hxx"
+#include "rangeutl.hxx" // ScArea
+#include "rangelst.hxx" // ScRangeListRef
+#include "markdata.hxx"
+#include "sortparam.hxx"
+#include "queryparam.hxx"
+#include "pivot.hxx"
+
+class ScDocShell;
+class ScDocument;
+class ScOutlineTable;
+class ScRangeName;
+class ScDBData;
+class ScDBCollection;
+class ScDPObject;
+class SdrUndoAction;
+
+//----------------------------------------------------------------------------
+
+class ScUndoDoOutline: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoDoOutline( ScDocShell* pNewDocShell,
+ SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
+ ScDocument* pNewUndoDoc, BOOL bNewColumns,
+ USHORT nNewLevel, USHORT nNewEntry, BOOL bNewShow );
+ virtual ~ScUndoDoOutline();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCCOLROW nStart;
+ SCCOLROW nEnd;
+ SCTAB nTab;
+ ScDocument* pUndoDoc;
+ BOOL bColumns;
+ USHORT nLevel;
+ USHORT nEntry;
+ BOOL bShow;
+};
+
+
+class ScUndoMakeOutline: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoMakeOutline( ScDocShell* pNewDocShell,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
+ ScOutlineTable* pNewUndoTab,
+ BOOL bNewColumns, BOOL bNewMake );
+ virtual ~ScUndoMakeOutline();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScAddress aBlockStart;
+ ScAddress aBlockEnd;
+ ScOutlineTable* pUndoTable;
+ BOOL bColumns;
+ BOOL bMake;
+};
+
+
+class ScUndoOutlineLevel: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoOutlineLevel( ScDocShell* pNewDocShell,
+ SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
+ ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
+ BOOL bNewColumns, USHORT nNewLevel );
+ virtual ~ScUndoOutlineLevel();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCCOLROW nStart;
+ SCCOLROW nEnd;
+ SCTAB nTab;
+ ScDocument* pUndoDoc;
+ ScOutlineTable* pUndoTable;
+ BOOL bColumns;
+ USHORT nLevel;
+};
+
+
+class ScUndoOutlineBlock: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoOutlineBlock( ScDocShell* pNewDocShell,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
+ ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
+ BOOL bNewShow );
+ virtual ~ScUndoOutlineBlock();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScAddress aBlockStart;
+ ScAddress aBlockEnd;
+ ScDocument* pUndoDoc;
+ ScOutlineTable* pUndoTable;
+ BOOL bShow;
+};
+
+
+class ScUndoRemoveAllOutlines: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoRemoveAllOutlines( ScDocShell* pNewDocShell,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
+ ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab );
+ virtual ~ScUndoRemoveAllOutlines();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScAddress aBlockStart;
+ ScAddress aBlockEnd;
+ ScDocument* pUndoDoc;
+ ScOutlineTable* pUndoTable;
+};
+
+
+class ScUndoAutoOutline: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoAutoOutline( ScDocShell* pNewDocShell,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
+ ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab );
+ virtual ~ScUndoAutoOutline();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScAddress aBlockStart;
+ ScAddress aBlockEnd;
+ ScDocument* pUndoDoc;
+ ScOutlineTable* pUndoTable;
+};
+
+
+class ScUndoSubTotals: public ScDBFuncUndo
+{
+public:
+ TYPEINFO();
+ ScUndoSubTotals( ScDocShell* pNewDocShell, SCTAB nNewTab,
+ const ScSubTotalParam& rNewParam, SCROW nNewEndY,
+ ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
+// ScDBData* pNewData,
+ ScRangeName* pNewUndoRange, ScDBCollection* pNewUndoDB );
+ virtual ~ScUndoSubTotals();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nTab;
+ ScSubTotalParam aParam; // Original uebergebener Parameter
+ SCROW nNewEndRow; // Ergebnis-Groesse
+ ScDocument* pUndoDoc;
+ ScOutlineTable* pUndoTable;
+// ScDBData* pUndoDBData;
+ ScRangeName* pUndoRange;
+ ScDBCollection* pUndoDB;
+};
+
+
+class ScUndoSort: public ScDBFuncUndo
+{
+public:
+ TYPEINFO();
+ ScUndoSort( ScDocShell* pNewDocShell, SCTAB nNewTab,
+ const ScSortParam& rParam,
+ BOOL bQuery, ScDocument* pNewUndoDoc,
+ ScDBCollection* pNewUndoDB, const ScRange* pDest = NULL );
+ virtual ~ScUndoSort();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nTab;
+ ScSortParam aSortParam;
+ BOOL bRepeatQuery;
+ ScDocument* pUndoDoc;
+ ScDBCollection* pUndoDB; // wegen Quell- und Zielbereich
+ BOOL bDestArea;
+ ScRange aDestRange;
+};
+
+
+class ScUndoQuery: public ScDBFuncUndo
+{
+public:
+ TYPEINFO();
+ ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab,
+ const ScQueryParam& rParam, ScDocument* pNewUndoDoc,
+ ScDBCollection* pNewUndoDB, const ScRange* pOld,
+ BOOL bSize, const ScRange* pAdvSrc );
+ virtual ~ScUndoQuery();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SdrUndoAction* pDrawUndo;
+ SCTAB nTab;
+ ScQueryParam aQueryParam;
+ ScDocument* pUndoDoc;
+ ScDBCollection* pUndoDB; // wegen Quell- und Zielbereich
+ ScRange aOldDest;
+ ScRange aAdvSource;
+ BOOL bIsAdvanced;
+ BOOL bDestArea;
+ BOOL bDoSize;
+};
+
+
+class ScUndoAutoFilter: public ScDBFuncUndo
+{
+private:
+ String aDBName;
+ BOOL bFilterSet;
+
+ void DoChange( BOOL bUndo );
+
+public:
+ TYPEINFO();
+ ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange,
+ const String& rName, BOOL bSet );
+ virtual ~ScUndoAutoFilter();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+};
+
+
+class ScUndoDBData: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoDBData( ScDocShell* pNewDocShell,
+ ScDBCollection* pNewUndoColl, ScDBCollection* pNewRedoColl );
+ virtual ~ScUndoDBData();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScDBCollection* pUndoColl;
+ ScDBCollection* pRedoColl;
+};
+
+
+class ScUndoImportData: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoImportData( ScDocShell* pNewDocShell, SCTAB nNewTab,
+ const ScImportParam& rParam, SCCOL nNewEndX, SCROW nNewEndY,
+ SCCOL nNewFormula,
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
+ ScDBData* pNewUndoData, ScDBData* pNewRedoData );
+ virtual ~ScUndoImportData();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nTab;
+ ScImportParam aImportParam;
+ SCCOL nEndCol;
+ SCROW nEndRow;
+ ScDocument* pUndoDoc;
+ ScDocument* pRedoDoc;
+ ScDBData* pUndoDBData;
+ ScDBData* pRedoDBData;
+ SCCOL nFormulaCols;
+ BOOL bRedoFilled;
+};
+
+
+class ScUndoRepeatDB: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoRepeatDB( ScDocShell* pNewDocShell, SCTAB nNewTab,
+ SCCOL nStartX, SCROW nStartY, SCCOL nEndX, SCROW nEndY,
+ SCROW nResultEndRow, SCCOL nCurX, SCROW nCurY,
+ ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
+ ScRangeName* pNewUndoRange, ScDBCollection* pNewUndoDB,
+ const ScRange* pOldQ, const ScRange* pNewQ );
+ virtual ~ScUndoRepeatDB();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScAddress aBlockStart;
+ ScAddress aBlockEnd;
+ SCROW nNewEndRow;
+ ScAddress aCursorPos;
+ ScDocument* pUndoDoc;
+ ScOutlineTable* pUndoTable;
+ ScRangeName* pUndoRange;
+ ScDBCollection* pUndoDB;
+ ScRange aOldQuery;
+ ScRange aNewQuery;
+ BOOL bQuerySize;
+};
+
+//UNUSED2008-05 class ScUndoPivot: public ScSimpleUndo
+//UNUSED2008-05 {
+//UNUSED2008-05 public:
+//UNUSED2008-05 TYPEINFO();
+//UNUSED2008-05 ScUndoPivot( ScDocShell* pNewDocShell,
+//UNUSED2008-05 const ScArea& rOld, const ScArea& rNew,
+//UNUSED2008-05 ScDocument* pOldDoc, ScDocument* pNewDoc,
+//UNUSED2008-05 const ScPivot* pOldPivot, const ScPivot* pNewPivot );
+//UNUSED2008-05 virtual ~ScUndoPivot();
+//UNUSED2008-05
+//UNUSED2008-05 virtual void Undo();
+//UNUSED2008-05 virtual void Redo();
+//UNUSED2008-05 virtual void Repeat(SfxRepeatTarget& rTarget);
+//UNUSED2008-05 virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+//UNUSED2008-05
+//UNUSED2008-05 virtual String GetComment() const;
+//UNUSED2008-05
+//UNUSED2008-05 private:
+//UNUSED2008-05 ScArea aOldArea;
+//UNUSED2008-05 ScArea aNewArea;
+//UNUSED2008-05 ScDocument* pOldUndoDoc;
+//UNUSED2008-05 ScDocument* pNewUndoDoc;
+//UNUSED2008-05 ScPivotParam aOldParam; // fuer Redo
+//UNUSED2008-05 ScQueryParam aOldQuery;
+//UNUSED2008-05 ScArea aOldSrc;
+//UNUSED2008-05 ScPivotParam aNewParam; // fuer Undo in Collection
+//UNUSED2008-05 ScQueryParam aNewQuery;
+//UNUSED2008-05 ScArea aNewSrc;
+//UNUSED2008-05 String aOldName;
+//UNUSED2008-05 String aOldTag;
+//UNUSED2008-05 String aNewName;
+//UNUSED2008-05 String aNewTag;
+//UNUSED2008-05 };
+
+class ScUndoDataPilot: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoDataPilot( ScDocShell* pNewDocShell,
+ ScDocument* pOldDoc, ScDocument* pNewDoc,
+ const ScDPObject* pOldObj, const ScDPObject* pNewObj,
+ BOOL bMove );
+ virtual ~ScUndoDataPilot();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScDocument* pOldUndoDoc;
+ ScDocument* pNewUndoDoc;
+ ScDPObject* pOldDPObject;
+ ScDPObject* pNewDPObject;
+ BOOL bAllowMove;
+};
+
+
+class ScUndoConsolidate: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoConsolidate( ScDocShell* pNewDocShell,
+ const ScArea& rArea, const ScConsolidateParam& rPar,
+ ScDocument* pNewUndoDoc, BOOL bReference,
+ SCROW nInsCount, ScOutlineTable* pTab,
+ ScDBData* pData );
+ virtual ~ScUndoConsolidate();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ScArea aDestArea;
+ ScDocument* pUndoDoc;
+ ScConsolidateParam aParam;
+ BOOL bInsRef;
+ SCSIZE nInsertCount;
+ ScOutlineTable* pUndoTab;
+ ScDBData* pUndoData;
+};
+
+
+class ScUndoChartData: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoChartData( ScDocShell* pNewDocShell,
+ const String& rName, const ScRange& rNew,
+ BOOL bColHdr, BOOL bRowHdr, BOOL bAdd );
+ ScUndoChartData( ScDocShell* pNewDocShell,
+ const String& rName, const ScRangeListRef& rNew,
+ BOOL bColHdr, BOOL bRowHdr, BOOL bAdd );
+ virtual ~ScUndoChartData();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ String aChartName;
+ ScRangeListRef aOldRangeListRef;
+ BOOL bOldColHeaders;
+ BOOL bOldRowHeaders;
+// ScRange aNewRange;
+ ScRangeListRef aNewRangeListRef;
+ BOOL bNewColHeaders;
+ BOOL bNewRowHeaders;
+ BOOL bAddRange;
+
+ void Init();
+};
+
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/undodraw.hxx b/sc/source/ui/inc/undodraw.hxx
new file mode 100644
index 000000000000..a2647985af9f
--- /dev/null
+++ b/sc/source/ui/inc/undodraw.hxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UNDODRAW_HXX
+#define SC_UNDODRAW_HXX
+
+#include <svl/undo.hxx>
+
+class ScDocShell;
+
+class ScUndoDraw: public SfxUndoAction
+{
+ SfxUndoAction* pDrawUndo;
+ ScDocShell* pDocShell;
+
+public:
+ TYPEINFO();
+ ScUndoDraw( SfxUndoAction* pUndo, ScDocShell* pDocSh );
+ virtual ~ScUndoDraw();
+
+ SfxUndoAction* GetDrawUndo() { return pDrawUndo; }
+ void ForgetDrawUndo();
+
+ virtual BOOL IsLinked();
+ virtual void SetLinked( BOOL bIsLinked );
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+ virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual String GetComment() const;
+ virtual String GetRepeatComment(SfxRepeatTarget&) const;
+ virtual USHORT GetId() const;
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/undoolk.hxx b/sc/source/ui/inc/undoolk.hxx
new file mode 100644
index 000000000000..527c973b6705
--- /dev/null
+++ b/sc/source/ui/inc/undoolk.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UNDOOLK_HXX
+#define SC_UNDOOLK_HXX
+
+#include <tools/solar.h>
+
+class SdrUndoAction;
+class ScDocument;
+
+SdrUndoAction* GetSdrUndoAction ( ScDocument* pDoc );
+void DoSdrUndoAction ( SdrUndoAction* pUndoAction, ScDocument* pDoc );
+void RedoSdrUndoAction ( SdrUndoAction* pUndoAction );
+void DeleteSdrUndoAction ( SdrUndoAction* pUndoAction );
+void EnableDrawAdjust ( ScDocument* pDoc, BOOL bEnable );
+
+
+
+#endif
diff --git a/sc/source/ui/inc/undostyl.hxx b/sc/source/ui/inc/undostyl.hxx
new file mode 100644
index 000000000000..5e7b86449722
--- /dev/null
+++ b/sc/source/ui/inc/undostyl.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UNDOSTYL_HXX
+#define SC_UNDOSTYL_HXX
+
+#include <rsc/rscsfx.hxx>
+#include "undobase.hxx"
+
+class ScDocShell;
+class SfxStyleSheetBase;
+
+//----------------------------------------------------------------------------
+
+class ScStyleSaveData
+{
+private:
+ String aName;
+ String aParent;
+ SfxItemSet* pItems;
+
+public:
+ ScStyleSaveData();
+ ScStyleSaveData( const ScStyleSaveData& rOther );
+ ~ScStyleSaveData();
+ ScStyleSaveData& operator=( const ScStyleSaveData& rOther );
+
+ void InitFromStyle( const SfxStyleSheetBase* pSource );
+
+ const String& GetName() const { return aName; }
+ const String& GetParent() const { return aParent; }
+ const SfxItemSet* GetItems() const { return pItems; }
+};
+
+class ScUndoModifyStyle: public ScSimpleUndo
+{
+private:
+ SfxStyleFamily eFamily;
+ ScStyleSaveData aOldData;
+ ScStyleSaveData aNewData;
+
+ static void DoChange( ScDocShell* pDocSh,
+ const String& rName, SfxStyleFamily eStyleFamily,
+ const ScStyleSaveData& rData );
+
+public:
+ TYPEINFO();
+ ScUndoModifyStyle( ScDocShell* pDocSh,
+ SfxStyleFamily eFam,
+ const ScStyleSaveData& rOld,
+ const ScStyleSaveData& rNew );
+ virtual ~ScUndoModifyStyle();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+};
+
+class ScUndoApplyPageStyle: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoApplyPageStyle( ScDocShell* pDocSh, const String& rNewStyle );
+ virtual ~ScUndoApplyPageStyle();
+
+ void AddSheetAction( SCTAB nTab, const String& rOld );
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ struct ApplyStyleEntry
+ {
+ SCTAB mnTab;
+ String maOldStyle;
+ explicit ApplyStyleEntry( SCTAB nTab, const String& rOldStyle );
+ };
+ typedef ::std::vector< ApplyStyleEntry > ApplyStyleVec;
+
+ ApplyStyleVec maEntries;
+ String maNewStyle;
+};
+
+
+#endif
+
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
new file mode 100644
index 000000000000..c8d135070ab1
--- /dev/null
+++ b/sc/source/ui/inc/undotab.hxx
@@ -0,0 +1,543 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UNDOTAB_HXX
+#define SC_UNDOTAB_HXX
+
+#include "undobase.hxx"
+#include "markdata.hxx"
+#include "formula/grammar.hxx"
+#include <tools/color.hxx>
+#include "tabbgcolor.hxx"
+
+#ifndef _SVSTDARR_SHORTS
+
+#define _SVSTDARR_SHORTS
+#include <svl/svstdarr.hxx>
+
+#endif
+
+#ifndef _SVSTDARR_STRINGS
+
+#define _SVSTDARR_STRINGS
+#include <svl/svstdarr.hxx>
+
+#endif
+
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <memory>
+
+class ScDocShell;
+class ScDocument;
+class SdrUndoAction;
+class ScPrintRangeSaver;
+class SdrObject;
+class ScDocProtection;
+class ScTableProtection;
+
+//----------------------------------------------------------------------------
+
+class ScUndoInsertTab : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoInsertTab(
+ ScDocShell* pNewDocShell,
+ SCTAB nTabNum,
+ BOOL bApp,
+ const String& rNewName);
+ virtual ~ScUndoInsertTab();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ String sNewName;
+ SdrUndoAction* pDrawUndo;
+ ULONG nEndChangeAction;
+ SCTAB nTab;
+ BOOL bAppend;
+
+ void SetChangeTrack();
+};
+
+class ScUndoInsertTables : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoInsertTables(
+ ScDocShell* pNewDocShell,
+ SCTAB nTabNum,
+ BOOL bApp,
+ SvStrings *pNewNameList);
+ virtual ~ScUndoInsertTables();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+
+ SdrUndoAction* pDrawUndo;
+ SvStrings* pNameList;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+ SCTAB nTab;
+ BOOL bAppend;
+
+ void SetChangeTrack();
+};
+
+
+class ScUndoDeleteTab: public ScMoveUndo // Draw vom Move fuer geloeschte Tabelle
+{
+public:
+ TYPEINFO();
+ ScUndoDeleteTab(
+ ScDocShell* pNewDocShell,
+ const SvShorts &theTabs, //SCTAB nNewTab,
+ ScDocument* pUndoDocument,
+ ScRefUndoData* pRefData );
+ virtual ~ScUndoDeleteTab();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SvShorts theTabs;
+ ULONG nStartChangeAction;
+ ULONG nEndChangeAction;
+
+ void SetChangeTrack();
+};
+
+
+class ScUndoRenameTab: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoRenameTab(
+ ScDocShell* pNewDocShell,
+ SCTAB nT,
+ const String& rOldName,
+ const String& rNewName);
+ virtual ~ScUndoRenameTab();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nTab;
+ String sOldName;
+ String sNewName;
+
+ void DoChange( SCTAB nTab, const String& rName ) const;
+};
+
+
+class ScUndoMoveTab: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoMoveTab( ScDocShell* pNewDocShell,
+ const SvShorts &aOldTab,
+ const SvShorts &aNewTab);
+ virtual ~ScUndoMoveTab();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SvShorts theOldTabs;
+ SvShorts theNewTabs;
+
+ void DoChange( BOOL bUndo ) const;
+};
+
+
+class ScUndoCopyTab: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoCopyTab(ScDocShell* pNewDocShell,
+ const SvShorts &aOldTab,
+ const SvShorts &aNewTab);
+
+ virtual ~ScUndoCopyTab();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SdrUndoAction* pDrawUndo;
+ SvShorts theOldTabs;
+ SvShorts theNewTabs;
+
+ void DoChange() const;
+};
+
+class ScUndoTabColor: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoTabColor(
+ ScDocShell* pNewDocShell,
+ SCTAB nT,
+ const Color& aOTabBgColor,
+ const Color& aNTabBgColor);
+ ScUndoTabColor(
+ ScDocShell* pNewDocShell,
+ const ScUndoTabColorInfo::List& rUndoTabColorList);
+ virtual ~ScUndoTabColor();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+virtual String GetComment() const;
+
+private:
+ ScUndoTabColorInfo::List aTabColorList;
+ bool bIsMultipleUndo;
+
+ void DoChange(bool bUndoType) const;
+};
+
+class ScUndoMakeScenario: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoMakeScenario(
+ ScDocShell* pNewDocShell,
+ SCTAB nSrc, SCTAB nDest,
+ const String& rN, const String& rC,
+ const Color& rCol, USHORT nF,
+ const ScMarkData& rMark );
+ virtual ~ScUndoMakeScenario();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nSrcTab;
+ SCTAB nDestTab;
+ String aName;
+ String aComment;
+ Color aColor;
+ USHORT nFlags;
+ ScMarkData aMarkData;
+ SdrUndoAction* pDrawUndo;
+};
+
+
+class ScUndoImportTab : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoImportTab(
+ ScDocShell* pShell,
+ SCTAB nNewTab, SCTAB nNewCount,
+ BOOL bNewLink );
+ virtual ~ScUndoImportTab();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nTab;
+ SCTAB nCount;
+ BOOL bLink;
+ ScDocument* pRedoDoc;
+ SdrUndoAction* pDrawUndo;
+
+ void DoChange() const;
+};
+
+
+class ScUndoRemoveLink : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoRemoveLink( // vor dem Loeschen aufrufen!
+ ScDocShell* pShell,
+ const String& rDoc );
+ virtual ~ScUndoRemoveLink();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ String aDocName;
+ String aFltName;
+ String aOptions;
+ ULONG nRefreshDelay;
+ USHORT nCount;
+ SCTAB* pTabs;
+ BYTE* pModes;
+ String* pTabNames;
+
+ void DoChange( BOOL bLink ) const;
+};
+
+
+class ScUndoShowHideTab : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoShowHideTab(
+ ScDocShell* pShell,
+ SCTAB nNewTab, BOOL bNewShow );
+ virtual ~ScUndoShowHideTab();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nTab;
+ BOOL bShow;
+
+ void DoChange( BOOL bShow ) const;
+};
+
+// ============================================================================
+
+/** This class implements undo & redo of document protect & unprotect
+ operations. */
+class ScUndoDocProtect : public ScSimpleUndo
+{
+public:
+ ScUndoDocProtect(ScDocShell* pShell, ::std::auto_ptr<ScDocProtection> pProtectSettings);
+ virtual ~ScUndoDocProtect();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ ::std::auto_ptr<ScDocProtection> mpProtectSettings;
+
+ void DoProtect(bool bProtect);
+};
+
+// ============================================================================
+
+/** This class implements undo & redo of both protect and unprotect of
+ sheet. */
+class ScUndoTabProtect : public ScSimpleUndo
+{
+public:
+ ScUndoTabProtect(ScDocShell* pShell, SCTAB nTab,
+ ::std::auto_ptr<ScTableProtection> pProtectSettings);
+ virtual ~ScUndoTabProtect();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB mnTab;
+ ::std::auto_ptr<ScTableProtection> mpProtectSettings;
+
+ void DoProtect(bool bProtect);
+};
+
+
+class ScUndoPrintRange : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoPrintRange( ScDocShell* pShell, SCTAB nNewTab,
+ ScPrintRangeSaver* pOld, ScPrintRangeSaver* pNew );
+ virtual ~ScUndoPrintRange();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nTab;
+ ScPrintRangeSaver* pOldRanges;
+ ScPrintRangeSaver* pNewRanges;
+
+ void DoChange( BOOL bUndo );
+};
+
+
+class ScUndoScenarioFlags: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoScenarioFlags(
+ ScDocShell* pNewDocShell, SCTAB nT,
+ const String& rON, const String& rNN,
+ const String& rOC, const String& rNC,
+ const Color& rOCol, const Color& rNCol,
+ USHORT nOF, USHORT nNF );
+
+ virtual ~ScUndoScenarioFlags();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nTab;
+ String aOldName;
+ String aNewName;
+ String aOldComment;
+ String aNewComment;
+ Color aOldColor;
+ Color aNewColor;
+ USHORT nOldFlags;
+ USHORT nNewFlags;
+};
+
+
+class ScUndoRenameObject: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoRenameObject(
+ ScDocShell* pNewDocShell, const String& rPN,
+ const String& rON, const String& rNN );
+
+ virtual ~ScUndoRenameObject();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ String aPersistName; // to find object (works only for OLE objects)
+ String aOldName;
+ String aNewName;
+
+ SdrObject* GetObject();
+};
+
+
+class ScUndoLayoutRTL : public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewRTL );
+ virtual ~ScUndoLayoutRTL();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+ virtual String GetComment() const;
+
+private:
+ SCTAB nTab;
+ BOOL bRTL;
+
+ void DoChange( BOOL bNew );
+};
+
+
+//UNUSED2009-05 class ScUndoSetGrammar : public ScSimpleUndo
+//UNUSED2009-05 {
+//UNUSED2009-05 public:
+//UNUSED2009-05 TYPEINFO();
+//UNUSED2009-05 ScUndoSetGrammar( ScDocShell* pShell,
+//UNUSED2009-05 formula::FormulaGrammar::Grammar eGrammar );
+//UNUSED2009-05 virtual ~ScUndoSetGrammar();
+//UNUSED2009-05
+//UNUSED2009-05 virtual void Undo();
+//UNUSED2009-05 virtual void Redo();
+//UNUSED2009-05 virtual void Repeat(SfxRepeatTarget& rTarget);
+//UNUSED2009-05 virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+//UNUSED2009-05
+//UNUSED2009-05 virtual String GetComment() const;
+//UNUSED2009-05
+//UNUSED2009-05 private:
+//UNUSED2009-05 formula::FormulaGrammar::Grammar meNewGrammar, meOldGrammar;
+//UNUSED2009-05
+//UNUSED2009-05 void DoChange( formula::FormulaGrammar::Grammar eGrammar );
+//UNUSED2009-05 };
+
+#endif
+
diff --git a/sc/source/ui/inc/undoutil.hxx b/sc/source/ui/inc/undoutil.hxx
new file mode 100644
index 000000000000..38302096b1fa
--- /dev/null
+++ b/sc/source/ui/inc/undoutil.hxx
@@ -0,0 +1,66 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_UNDOUTIL_HXX
+#define SC_UNDOUTIL_HXX
+
+#include "address.hxx"
+#include <tools/solar.h>
+
+class ScRange;
+class ScDocShell;
+class ScDBData;
+class ScDocument;
+
+//----------------------------------------------------------------------------
+
+class ScUndoUtil
+{
+public:
+ // Block markieren (unsichtbar, muss repainted werden)
+ static void MarkSimpleBlock( ScDocShell* pDocShell,
+ SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
+ SCCOL nEndX, SCROW nEndY, SCTAB nEndZ );
+ static void MarkSimpleBlock( ScDocShell* pDocShell,
+ const ScAddress& rBlockStart,
+ const ScAddress& rBlockEnd );
+ static void MarkSimpleBlock( ScDocShell* pDocShell,
+ const ScRange& rRange );
+
+ // Bereich +1 painten
+ static void PaintMore( ScDocShell* pDocShell,
+ const ScRange& rRange );
+
+ // DB-Bereich im Dokument suchen ("unbenannt" oder nach Bereich)
+ // legt neu an, wenn nicht gefunden
+ static ScDBData* GetOldDBData( ScDBData* pUndoData, ScDocument* pDoc, SCTAB nTab,
+ SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
+};
+
+
+
+#endif
diff --git a/sc/source/ui/inc/validate.hrc b/sc/source/ui/inc/validate.hrc
new file mode 100644
index 000000000000..45e5dda39c2d
--- /dev/null
+++ b/sc/source/ui/inc/validate.hrc
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#define TP_VALIDATION_VALUES 696
+#define TP_VALIDATION_INPUTHELP 697
+#define TP_VALIDATION_ERROR 698
+#define TAB_DLG_VALIDATION 699
+
+#define FT_ALLOW 1
+#define LB_ALLOW 2
+#define TSB_ALLOW_BLANKS 3
+#define FT_VALUE 4
+#define LB_VALUE 5
+#define FT_MIN 6
+#define EDT_MIN 7
+#define FT_MAX 8
+#define EDT_MAX 9
+
+#define FL_CONTENT 10
+
+#define TSB_HELP 11
+#define FT_TITLE 12
+#define EDT_TITLE 13
+#define FT_INPUTHELP 14
+#define EDT_INPUTHELP 15
+
+#define TSB_SHOW 21
+#define FT_ACTION 22
+#define FT_ERROR 23
+#define LB_ACTION 24
+#define EDT_ERROR 25
+#define BTN_SEARCH 26
+
+#define CB_SHOWLIST 27
+#define CB_SORTLIST 28
+#define EDT_LIST 29
+#define FT_SOURCEHINT 30
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+#define RB_VALIDITY_REF 88
+//-->Added by PengYunQuan for Validity Cell Range Picker
+
+/* Position indexes for "Allow" list box.
+ They do not map directly to ScValidationMode and can safely be modified to
+ change the order of the list box entries. */
+#define SC_VALIDDLG_ALLOW_ANY 0
+#define SC_VALIDDLG_ALLOW_WHOLE 1
+#define SC_VALIDDLG_ALLOW_DECIMAL 2
+#define SC_VALIDDLG_ALLOW_DATE 3
+#define SC_VALIDDLG_ALLOW_TIME 4
+#define SC_VALIDDLG_ALLOW_RANGE 5
+#define SC_VALIDDLG_ALLOW_LIST 6
+#define SC_VALIDDLG_ALLOW_TEXTLEN 7
+
+/* Position indexes for "Data" list box.
+ They do not map directly to ScConditionMode and can safely be modified to
+ change the order of the list box entries. */
+#define SC_VALIDDLG_DATA_EQUAL 0
+#define SC_VALIDDLG_DATA_LESS 1
+#define SC_VALIDDLG_DATA_GREATER 2
+#define SC_VALIDDLG_DATA_EQLESS 3
+#define SC_VALIDDLG_DATA_EQGREATER 4
+#define SC_VALIDDLG_DATA_NOTEQUAL 5
+#define SC_VALIDDLG_DATA_BETWEEN 6
+#define SC_VALIDDLG_DATA_NOTBETWEEN 7
+
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
new file mode 100644
index 000000000000..f7cb9af23b63
--- /dev/null
+++ b/sc/source/ui/inc/validate.hxx
@@ -0,0 +1,347 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_VALIDATE_HXX
+#define SC_VALIDATE_HXX
+
+#include <sfx2/tabdlg.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <svtools/svmedit.hxx>
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+#include "anyrefdg.hxx"
+//-->Added by PengYunQuan for Validity Cell Range Picker
+
+// ============================================================================
+
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+struct ScRefHandlerCaller{
+ virtual ~ScRefHandlerCaller(){}
+};
+class ScRefHandlerHelper
+{
+protected:
+ ScRefHandlerCaller *m_pHandler;
+ void (ScRefHandlerCaller::*m_pSetReferenceHdl)( const ScRange& , ScDocument* );
+ void (ScRefHandlerCaller::*m_pSetActiveHdl)();
+ void (ScRefHandlerCaller::*m_pRefInputStartPreHdl)( ScRefEdit* pEdit, ScRefButton* pButton );
+ void (ScRefHandlerCaller::*m_pRefInputStartPostHdl)( ScRefEdit* pEdit, ScRefButton* pButton );
+ void (ScRefHandlerCaller::*m_pRefInputDonePreHdl)();
+ void (ScRefHandlerCaller::*m_pRefInputDonePostHdl)();
+
+public:
+ typedef void (ScRefHandlerCaller::*PFUNCSETREFHDLTYPE)( const ScRange& , ScDocument* );
+ typedef void (ScRefHandlerCaller::*PCOMMONHDLTYPE)();
+ typedef void (ScRefHandlerCaller::*PINPUTSTARTDLTYPE)( ScRefEdit* pEdit, ScRefButton* pButton );
+
+ PFUNCSETREFHDLTYPE SetSetRefHdl( PFUNCSETREFHDLTYPE pNewHdl )
+ {
+ PFUNCSETREFHDLTYPE pOldHdl = m_pSetReferenceHdl;
+ m_pSetReferenceHdl = pNewHdl;
+ return pOldHdl;
+ }
+
+ PCOMMONHDLTYPE SetSetActHdl( PCOMMONHDLTYPE pNewHdl )
+ {
+ PCOMMONHDLTYPE pOldHdl = m_pSetActiveHdl;
+ m_pSetActiveHdl = pNewHdl;
+ return pOldHdl;
+ }
+
+ ScRefHandlerCaller *SetHandler( ScRefHandlerCaller *pNewHandler )
+ {
+ ScRefHandlerCaller *pOldHandler = m_pHandler;
+ m_pHandler = pNewHandler;
+ return pOldHandler;
+ }
+ void SetRefInputStartPreHdl( PINPUTSTARTDLTYPE pNewHdl ){ m_pRefInputStartPreHdl = pNewHdl; }
+ void SetRefInputDonePostHdl( void (ScRefHandlerCaller::*pNewHdl)() ){ m_pRefInputDonePostHdl = pNewHdl; }
+ void SetRefInputStartPostHdl( PINPUTSTARTDLTYPE pNewHdl ){ m_pRefInputStartPostHdl = pNewHdl; }
+ void SetRefInputDonePreHdl( void (ScRefHandlerCaller::*pNewHdl)() ){ m_pRefInputDonePreHdl = pNewHdl; }
+
+ ScRefHandlerHelper():m_pHandler(NULL), m_pSetReferenceHdl( NULL ), m_pSetActiveHdl(NULL), m_pRefInputStartPreHdl( NULL ), m_pRefInputStartPostHdl( NULL ), m_pRefInputDonePreHdl( NULL ), m_pRefInputDonePostHdl( NULL ){}
+};
+//-->Added by PengYunQuan for Validity Cell Range Picker
+
+/** The "Validity" tab dialog. */
+//<!--Modified by PengYunQuan for Validity Cell Range Picker
+//class ScValidationDlg : public SfxTabDialog
+class ScValidationDlg :public ScRefHdlrImpl<ScValidationDlg, SfxTabDialog, false>, public ScRefHandlerHelper
+//-->Modified by PengYunQuan for Validity Cell Range Picker
+{
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ typedef ScRefHdlrImpl<ScValidationDlg, SfxTabDialog, false> ScValidationDlgBase;
+
+ //Start_Moddify by liliang 03/26/2008 SODC_13677_2
+ DECL_LINK( OkHdl, Button * );
+ //End_Moddify by liliang 03/26/2008 SODC_13677_2
+ bool m_bOwnRefHdlr:1;
+
+ ScTabViewShell *m_pTabVwSh;
+ bool m_bRefInputting:1;
+ bool EnterRefStatus();
+ bool LeaveRefStatus();
+ //-->Added by PengYunQuan for Validity Cell Range Picker
+public:
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //explicit ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet );
+ explicit ScValidationDlg( Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = NULL );
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ virtual ~ScValidationDlg();
+ inline static ScValidationDlg * Find1AliveObject( Window *pAncestor );
+ bool IsAlive();
+ inline ScTabViewShell * GetTabViewShell();
+
+ bool SetupRefDlg();
+ bool RemoveRefDlg( BOOL bRestoreModal = TRUE );
+
+ virtual void SetModal( BOOL bModal ){ ScValidationDlgBase::SetModalInputMode( bModal ); }
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc )
+ {
+ if ( m_pHandler && m_pSetReferenceHdl )
+ (m_pHandler->*m_pSetReferenceHdl)( rRef, pDoc );
+ }
+
+ virtual void SetActive()
+ {
+ if ( m_pHandler && m_pSetActiveHdl )
+ (m_pHandler->*m_pSetActiveHdl)();
+ }
+
+ void CloseRefDialog()
+ {
+ DBG_ASSERT( false, "should not execute here!!!when the edit kill focus, should remove refhandler.\r\n" );
+
+ if ( IsInExecute() )
+ EndDialog( FALSE );
+ else if ( GetStyle() & WB_CLOSEABLE )
+ Close();
+ }
+
+ bool IsRefInputting(){ return m_bRefInputting; }
+
+ virtual void RefInputStart( ScRefEdit* pEdit, ScRefButton* pButton = NULL )
+ {
+ if( !CanInputStart( pEdit ) )
+ return;
+
+ if ( m_pHandler && m_pRefInputStartPreHdl )
+ (m_pHandler->*m_pRefInputStartPreHdl)( pEdit, pButton );
+ m_bRefInputting = true;
+ ScValidationDlgBase::RefInputStart( pEdit, pButton );
+ if ( m_pHandler && m_pRefInputStartPostHdl )
+ (m_pHandler->*m_pRefInputStartPostHdl)( pEdit, pButton );
+ }
+
+ virtual void RefInputDone( BOOL bForced = FALSE )
+ {
+ if( !CanInputDone( bForced ) )
+ return;
+
+ if ( m_pHandler && m_pRefInputDonePreHdl )
+ (m_pHandler->*m_pRefInputDonePreHdl)();
+
+ ScValidationDlgBase::RefInputDone( bForced );
+ m_bRefInputting = false;
+
+ if ( m_pHandler && m_pRefInputDonePostHdl )
+ (m_pHandler->*m_pRefInputDonePostHdl)();
+ }
+
+ BOOL IsChildFocus();
+
+ enum { SLOTID = SID_VALIDITY_REFERENCE };
+
+ BOOL Close();
+ //-->Added by PengYunQuan for Validity Cell Range Picker
+};
+
+
+// ============================================================================
+
+/** The tab page "Criteria" from the Validation dialog. */
+//<!--Modified by PengYunQuan for Validity Cell Range Picker
+//class ScTPValidationValue : public SfxTabPage
+class ScTPValidationValue : public ScRefHandlerCaller, public SfxTabPage
+//-->Modified by PengYunQuan for Validity Cell Range Picker
+{
+public:
+ explicit ScTPValidationValue( Window* pParent, const SfxItemSet& rArgSet );
+ virtual ~ScTPValidationValue();
+
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rArgSet );
+ static USHORT* GetRanges();
+
+ virtual BOOL FillItemSet( SfxItemSet& rArgSet );
+ virtual void Reset( const SfxItemSet& rArgSet );
+
+private:
+ void Init();
+
+ String GetFirstFormula() const;
+ String GetSecondFormula() const;
+
+ void SetFirstFormula( const String& rFmlaStr );
+ void SetSecondFormula( const String& rFmlaStr );
+
+ DECL_LINK( SelectHdl, ListBox* );
+ DECL_LINK( CheckHdl, CheckBox* );
+
+ FixedText maFtAllow;
+ ListBox maLbAllow;
+ CheckBox maCbAllow; /// Allow blank cells.
+ CheckBox maCbShow; /// Show selection list in cell.
+ CheckBox maCbSort; /// Sort selection list in cell.
+ FixedText maFtValue;
+ ListBox maLbValue;
+ FixedText maFtMin;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Edit maEdMin;
+ ScRefEdit maEdMin;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
+ MultiLineEdit maEdList; /// Entries for explicit list
+ FixedText maFtMax;
+ //<!--Modified by PengYunQuan for Validity Cell Range Picker
+ //Edit maEdMax;
+ ScRefEdit maEdMax;
+ //-->Modified by PengYunQuan for Validity Cell Range Picker
+ FixedText maFtHint; /// Hint text for cell range validity.
+
+ String maStrMin;
+ String maStrMax;
+ String maStrValue;
+ String maStrRange;
+ String maStrList;
+ sal_Unicode mcFmlaSep; /// List separator in formulas.
+ //<!--Added by PengYunQuan for Validity Cell Range Picker
+ DECL_LINK( EditSetFocusHdl, Edit *);
+ DECL_LINK( KillFocusHdl, Window *);
+ void OnClick( Button *pBtn );
+ ScRefEdit *m_pRefEdit;
+ class ScRefButtonEx:public ::ScRefButton
+ {
+ void Click();
+ public:
+ ScRefButtonEx( Window* pParent, const ResId& rResId, ScRefEdit* pEdit = NULL, ScRefHandler *pRefHdlr = NULL ): ::ScRefButton( pParent, rResId, pEdit, pRefHdlr ){}
+ }m_btnRef;
+ friend class ScRefButtonEx;
+ void SetReferenceHdl( const ScRange& , ScDocument* );
+ void SetActiveHdl();
+ void RefInputStartPreHdl( ScRefEdit* pEdit, ScRefButton* pButton );
+ void RefInputDonePreHdl();
+ void RefInputDonePostHdl();
+ ScValidationDlg * GetValidationDlg();
+
+ //TYPEINFO();
+ void TidyListBoxes();
+public:
+ USHORT GetAllowEntryPos();
+ String GetMinText();
+ void SetupRefDlg();
+ void RemoveRefDlg();
+ //-->Added by PengYunQuan for Validity Cell Range Picker
+};
+
+
+//==================================================================
+
+class ScTPValidationHelp : public SfxTabPage
+{
+private:
+ TriStateBox aTsbHelp;
+ FixedLine aFlContent;
+ FixedText aFtTitle;
+ Edit aEdtTitle;
+ FixedText aFtInputHelp;
+ MultiLineEdit aEdInputHelp;
+
+ const SfxItemSet& mrArgSet;
+
+ void Init();
+
+ // Handler ------------------------
+ // DECL_LINK( SelectHdl, ListBox * );
+
+public:
+ ScTPValidationHelp( Window* pParent, const SfxItemSet& rArgSet );
+ ~ScTPValidationHelp();
+
+ static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet );
+ static USHORT* GetRanges ();
+ virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual void Reset ( const SfxItemSet& rArgSet );
+};
+
+//==================================================================
+
+class ScTPValidationError : public SfxTabPage
+{
+private:
+ TriStateBox aTsbShow;
+ FixedLine aFlContent;
+ FixedText aFtAction;
+ ListBox aLbAction;
+ PushButton aBtnSearch;
+ FixedText aFtTitle;
+ Edit aEdtTitle;
+ FixedText aFtError;
+ MultiLineEdit aEdError;
+
+ const SfxItemSet& mrArgSet;
+
+ void Init();
+
+ // Handler ------------------------
+ DECL_LINK( SelectActionHdl, ListBox * );
+ DECL_LINK( ClickSearchHdl, PushButton * );
+
+public:
+ ScTPValidationError( Window* pParent, const SfxItemSet& rArgSet );
+ ~ScTPValidationError();
+
+ static SfxTabPage* Create ( Window* pParent, const SfxItemSet& rArgSet );
+ static USHORT* GetRanges ();
+ virtual BOOL FillItemSet ( SfxItemSet& rArgSet );
+ virtual void Reset ( const SfxItemSet& rArgSet );
+};
+
+//<!--Added by PengYunQuan for Validity Cell Range Picker
+inline ScTabViewShell *ScValidationDlg::GetTabViewShell()
+{
+ return m_pTabVwSh;
+}
+
+inline ScValidationDlg * ScValidationDlg::Find1AliveObject( Window *pAncestor )
+{
+ return static_cast<ScValidationDlg *>( SC_MOD()->Find1RefWindow( SLOTID, pAncestor ) );
+}
+//-->Added by PengYunQuan for Validity Cell Range Picker
+#endif // SC_VALIDATE_HXX
+
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
new file mode 100644
index 000000000000..fb9c674a4488
--- /dev/null
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -0,0 +1,557 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SC_VIEWDATA_HXX
+#define SC_VIEWDATA_HXX
+
+#include <svx/zoomitem.hxx>
+#include "scdllapi.h"
+#include "viewopti.hxx"
+#include "markdata.hxx"
+
+
+// ---------------------------------------------------------------------------
+
+#define SC_SLIDER_SIZE 2
+#define SC_SMALL3DSHADOW COL_BLACK
+#define SC_SIZE_NONE 65535
+const SCCOL SC_TABSTART_NONE = SCCOL_MAX;
+
+#define SC_FILL_NONE 0
+#define SC_FILL_FILL 1
+#define SC_FILL_EMBED_LT 2
+#define SC_FILL_EMBED_RB 3
+#define SC_FILL_MATRIX 4
+
+enum ScSplitMode { SC_SPLIT_NONE = 0, SC_SPLIT_NORMAL, SC_SPLIT_FIX };
+
+enum ScSplitPos { SC_SPLIT_TOPLEFT, SC_SPLIT_TOPRIGHT, SC_SPLIT_BOTTOMLEFT, SC_SPLIT_BOTTOMRIGHT };
+enum ScHSplitPos { SC_SPLIT_LEFT, SC_SPLIT_RIGHT };
+enum ScVSplitPos { SC_SPLIT_TOP, SC_SPLIT_BOTTOM };
+
+inline ScHSplitPos WhichH( ScSplitPos ePos );
+inline ScVSplitPos WhichV( ScSplitPos ePos );
+inline ScSplitPos Which( ScHSplitPos eHPos );
+inline ScSplitPos Which( ScVSplitPos eVPos );
+
+// Bildschirmverhalten bei Cursorbewegungen:
+enum ScFollowMode { SC_FOLLOW_NONE, SC_FOLLOW_LINE, SC_FOLLOW_FIX, SC_FOLLOW_JUMP };
+
+// Mausmodi um Bereiche zu selektieren
+enum ScRefType { SC_REFTYPE_NONE, SC_REFTYPE_REF, SC_REFTYPE_FILL,
+ SC_REFTYPE_EMBED_LT, SC_REFTYPE_EMBED_RB };
+
+/** States GetSimpleArea() returns for the underlying selection marks, so the
+ caller can react if the result is not of type SC_MARK_SIMPLE. */
+enum ScMarkType
+{
+ SC_MARK_NONE = 0, // Not returned by GetSimpleArea(), used internally.
+ // Nothing marked always results in the
+ // current cursor position being selected and a simple mark.
+ SC_MARK_SIMPLE = 1, // Simple rectangular area marked, no filtered rows.
+ SC_MARK_FILTERED = 2, // At least one mark contains filtered rows.
+ SC_MARK_SIMPLE_FILTERED = // Simple rectangular area marked containing filtered rows.
+ SC_MARK_SIMPLE |
+ SC_MARK_FILTERED, // 3
+ SC_MARK_MULTI = 4 // Multiple selection marks.
+ /* TODO: if filtered multi-selection was implemented, this would be the value to use. */
+#if 0
+ ,
+ SC_MARK_MULTI_FILTERED = // Multiple selection marks containing filtered rows.
+ SC_MARK_MULTI |
+ SC_MARK_FILTERED // 6
+#endif
+};
+
+class ScDocShell;
+class ScDocument;
+class ScDBFunc;
+class ScTabViewShell;
+class ScDrawView;
+class ScEditEngineDefaulter;
+class EditView;
+class EditStatus;
+class Outliner;
+class Window;
+class SfxObjectShell;
+class SfxBindings;
+class SfxDispatcher;
+class ScPatternAttr;
+class ScRangeListRef;
+class ScExtDocOptions;
+class ScViewData;
+
+//--------------------------------------------------------------------------
+
+class ScViewDataTable // Daten pro Tabelle
+{
+friend class ScViewData;
+private:
+ SvxZoomType eZoomType; // selected zoom type (normal view)
+ Fraction aZoomX; // selected zoom X
+ Fraction aZoomY; // selected zoom Y (displayed)
+ Fraction aPageZoomX; // zoom in page break preview mode
+ Fraction aPageZoomY;
+
+ long nTPosX[2]; // MapMode - Offset (Twips)
+ long nTPosY[2];
+ long nMPosX[2]; // MapMode - Offset (1/100 mm)
+ long nMPosY[2];
+ long nPixPosX[2]; // Offset in Pixeln
+ long nPixPosY[2];
+ long nHSplitPos;
+ long nVSplitPos;
+
+ ScSplitMode eHSplitMode;
+ ScSplitMode eVSplitMode;
+ ScSplitPos eWhichActive;
+
+ SCCOL nFixPosX; // Zellposition des Splitters beim Fixieren
+ SCROW nFixPosY;
+
+ SCCOL nCurX;
+ SCROW nCurY;
+ SCCOL nOldCurX;
+ SCROW nOldCurY;
+ SCCOL nPosX[2];
+ SCROW nPosY[2];
+
+ BOOL bOldCurValid; // "virtuelle" Cursorpos. bei zusammengefassten
+
+ ScViewDataTable();
+ ~ScViewDataTable();
+
+ void WriteUserDataSequence(
+ com::sun::star::uno::Sequence <com::sun::star::beans::PropertyValue>& rSettings,
+ const ScViewData& rViewData, SCTAB nTab );
+
+ void ReadUserDataSequence(
+ const com::sun::star::uno::Sequence <com::sun::star::beans::PropertyValue>& rSettings,
+ ScViewData& rViewData, SCTAB nTab, bool& rHasZoom);
+};
+
+// ---------------------------------------------------------------------------
+
+class SC_DLLPUBLIC ScViewData
+{
+private:
+ double nPPTX, nPPTY; // Scaling-Faktoren
+
+ ScViewDataTable* pTabData[MAXTABCOUNT];
+ ScViewDataTable* pThisTab; // Daten der angezeigten Tabelle
+ ScDocShell* pDocShell;
+ ScDocument* pDoc;
+ ScDBFunc* pView;
+ ScTabViewShell* pViewShell;
+ EditView* pEditView[4]; // gehoert dem Fenster
+ ScViewOptions* pOptions;
+ EditView* pSpellingView;
+
+ ScMarkData aMarkData;
+
+ long nEditMargin;
+
+ Size aScenButSize; // Groesse eines Szenario-Buttons
+
+ Size aScrSize;
+ MapMode aLogicMode; // skalierter 1/100mm-MapMode
+
+ SvxZoomType eDefZoomType; // default zoom and type for missing TabData
+ Fraction aDefZoomX;
+ Fraction aDefZoomY;
+ Fraction aDefPageZoomX; // zoom in page break preview mode
+ Fraction aDefPageZoomY;
+
+ ScRefType eRefType;
+
+ SCTAB nTabNo; // angezeigte Tabelle
+ SCTAB nRefTabNo; // Tabelle auf die sich RefInput bezieht
+ SCCOL nRefStartX;
+ SCROW nRefStartY;
+ SCTAB nRefStartZ;
+ SCCOL nRefEndX;
+ SCROW nRefEndY;
+ SCTAB nRefEndZ;
+ SCCOL nFillStartX; // Fill-Cursor
+ SCROW nFillStartY;
+ SCCOL nFillEndX;
+ SCROW nFillEndY;
+ SCCOL nEditCol; // Position dazu
+ SCROW nEditRow;
+ SCCOL nEditStartCol;
+ SCCOL nEditEndCol; // Ende der Edit-View
+ SCROW nEditEndRow;
+ SCCOL nTabStartCol; // fuer Enter nach Tab
+ ScRange aDelRange; // fuer AutoFill-Loeschen
+
+ ScSplitPos eEditActivePart; // the part that was active when edit mode was started
+ BOOL bEditActive[4]; // aktiv?
+ BOOL bActive; // aktives Fenster ?
+ BOOL bIsRefMode; // Referenzeingabe
+ BOOL bDelMarkValid; // nur gueltig bei SC_REFTYPE_FILL
+ BYTE nFillMode; // Modus
+ BOOL bPagebreak; // Seitenumbruch-Vorschaumodus
+
+ BOOL bSelCtrlMouseClick; // special selection handling for ctrl-mouse-click
+
+ SC_DLLPRIVATE DECL_LINK (EmptyEditHdl, EditStatus*);
+ SC_DLLPRIVATE DECL_LINK (EditEngineHdl, EditStatus*);
+
+ SC_DLLPRIVATE void CalcPPT();
+ SC_DLLPRIVATE void CreateTabData( SCTAB nNewTab );
+ SC_DLLPRIVATE void CreateTabData( std::vector< SCTAB >& rvTabs );
+ SC_DLLPRIVATE void CreateSelectedTabData();
+
+public:
+ ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh );
+ ScViewData( const ScViewData& rViewData );
+ ~ScViewData();
+
+ void InitData( ScDocument* pDocument );
+//UNUSED2008-05 void InitFrom( const ScViewData* pRef );
+//UNUSED2008-05 void SetDocShell( ScDocShell* pShell );
+
+
+ ScDocShell* GetDocShell() const { return pDocShell; }
+ ScDBFunc* GetView() const { return pView; }
+ ScTabViewShell* GetViewShell() const { return pViewShell; }
+
+ SfxObjectShell* GetSfxDocShell() const;
+ SfxBindings& GetBindings(); // from ViewShell's ViewFrame
+ SfxDispatcher& GetDispatcher(); // from ViewShell's ViewFrame
+
+ ScMarkData& GetMarkData() { return aMarkData; }
+ const ScMarkData& GetMarkData() const { return aMarkData; }
+
+ Window* GetDialogParent(); // von tabvwsh weitergeleitet
+ Window* GetActiveWin(); // von View
+ ScDrawView* GetScDrawView(); // von View
+ BOOL IsMinimized(); // von View
+
+ void UpdateInputHandler( BOOL bForce = FALSE, BOOL bStopEditing = TRUE );
+
+ void WriteUserData(String& rData);
+ void ReadUserData(const String& rData);
+ void WriteExtOptions( ScExtDocOptions& rOpt ) const;
+ void ReadExtOptions( const ScExtDocOptions& rOpt );
+ void WriteUserDataSequence(com::sun::star::uno::Sequence <com::sun::star::beans::PropertyValue>& rSettings);
+ void ReadUserDataSequence(const com::sun::star::uno::Sequence <com::sun::star::beans::PropertyValue>& rSettings);
+
+ ScDocument* GetDocument() const;
+
+ void SetViewShell( ScTabViewShell* pViewSh );
+
+ BOOL IsActive() const { return bActive; }
+ void Activate(BOOL bActivate) { bActive = bActivate; }
+
+ void UpdateThis();
+
+ void InsertTab( SCTAB nTab );
+ void DeleteTab( SCTAB nTab );
+ void CopyTab( SCTAB nSrcTab, SCTAB nDestTab );
+ void MoveTab( SCTAB nSrcTab, SCTAB nDestTab );
+
+ SCTAB GetRefTabNo() const { return nRefTabNo; }
+ void SetRefTabNo( SCTAB nNewTab ) { nRefTabNo = nNewTab; }
+
+ SCTAB GetTabNo() const { return nTabNo; }
+ ScSplitPos GetActivePart() const { return pThisTab->eWhichActive; }
+ SCCOL GetPosX( ScHSplitPos eWhich ) const { return pThisTab->nPosX[eWhich]; }
+ SCROW GetPosY( ScVSplitPos eWhich ) const { return pThisTab->nPosY[eWhich]; }
+ SCCOL GetCurX() const { return pThisTab->nCurX; }
+ SCROW GetCurY() const { return pThisTab->nCurY; }
+ BOOL HasOldCursor() const { return pThisTab->bOldCurValid; }
+ SCCOL GetOldCurX() const;
+ SCROW GetOldCurY() const;
+ ScSplitMode GetHSplitMode() const { return pThisTab->eHSplitMode; }
+ ScSplitMode GetVSplitMode() const { return pThisTab->eVSplitMode; }
+ long GetHSplitPos() const { return pThisTab->nHSplitPos; }
+ long GetVSplitPos() const { return pThisTab->nVSplitPos; }
+ SCCOL GetFixPosX() const { return pThisTab->nFixPosX; }
+ SCROW GetFixPosY() const { return pThisTab->nFixPosY; }
+ BOOL IsPagebreakMode() const { return bPagebreak; }
+
+ void SetPosX( ScHSplitPos eWhich, SCCOL nNewPosX );
+ void SetPosY( ScVSplitPos eWhich, SCROW nNewPosY );
+ void SetCurX( SCCOL nNewCurX ) { pThisTab->nCurX = nNewCurX; }
+ void SetCurY( SCROW nNewCurY ) { pThisTab->nCurY = nNewCurY; }
+ void SetOldCursor( SCCOL nNewX, SCROW nNewY );
+ void ResetOldCursor();
+ void SetHSplitMode( ScSplitMode eMode ) { pThisTab->eHSplitMode = eMode; }
+ void SetVSplitMode( ScSplitMode eMode ) { pThisTab->eVSplitMode = eMode; }
+ void SetHSplitPos( long nPos ) { pThisTab->nHSplitPos = nPos; }
+ void SetVSplitPos( long nPos ) { pThisTab->nVSplitPos = nPos; }
+ void SetFixPosX( SCCOL nPos ) { pThisTab->nFixPosX = nPos; }
+ void SetFixPosY( SCROW nPos ) { pThisTab->nFixPosY = nPos; }
+ void SetPagebreakMode( BOOL bSet );
+
+ void SetZoomType( SvxZoomType eNew, BOOL bAll );
+ void SetZoomType( SvxZoomType eNew, std::vector< SCTAB >& tabs );
+ void SetZoom( const Fraction& rNewX, const Fraction& rNewY, std::vector< SCTAB >& tabs );
+ void SetZoom( const Fraction& rNewX, const Fraction& rNewY, BOOL bAll );
+ void RefreshZoom();
+
+ void SetSelCtrlMouseClick( BOOL bTmp ) { bSelCtrlMouseClick = bTmp; }
+
+ SvxZoomType GetZoomType() const { return pThisTab->eZoomType; }
+ const Fraction& GetZoomX() const { return bPagebreak ? pThisTab->aPageZoomX : pThisTab->aZoomX; }
+ const Fraction& GetZoomY() const { return bPagebreak ? pThisTab->aPageZoomY : pThisTab->aZoomY; }
+
+ const MapMode& GetLogicMode( ScSplitPos eWhich );
+ const MapMode& GetLogicMode(); // Offset 0
+
+ long GetTPosX( ScHSplitPos eWhich ) const { return pThisTab->nTPosX[eWhich]; }
+ long GetTPosY( ScVSplitPos eWhich ) const { return pThisTab->nTPosY[eWhich]; }
+
+ double GetPPTX() const { return nPPTX; }
+ double GetPPTY() const { return nPPTY; }
+
+ ScMarkType GetSimpleArea( SCCOL& rStartCol, SCROW& rStartRow, SCTAB& rStartTab,
+ SCCOL& rEndCol, SCROW& rEndRow, SCTAB& rEndTab ) const;
+ ScMarkType GetSimpleArea( ScRange& rRange ) const;
+ /// May modify rNewMark using MarkToSimple().
+ ScMarkType GetSimpleArea( ScRange & rRange, ScMarkData & rNewMark ) const;
+ void GetMultiArea( ScRangeListRef& rRange ) const;
+
+ BOOL SimpleColMarked();
+ BOOL SimpleRowMarked();
+
+ BOOL IsMultiMarked();
+
+ void SetFillMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
+ void SetDragMode( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
+ BYTE nMode );
+ void GetFillData( SCCOL& rStartCol, SCROW& rStartRow,
+ SCCOL& rEndCol, SCROW& rEndRow );
+ void ResetFillMode();
+ BOOL IsAnyFillMode() { return nFillMode != SC_FILL_NONE; }
+ BOOL IsFillMode() { return nFillMode == SC_FILL_FILL; }
+ BYTE GetFillMode() { return nFillMode; }
+
+ // TRUE: Zelle ist zusammengefasst
+ BOOL GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix );
+ BOOL GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich,
+ SCsCOL& rPosX, SCsROW& rPosY,
+ BOOL bTestMerge = TRUE, BOOL bRepair = FALSE,
+ BOOL bNextIfLarge = TRUE );
+ void GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich,
+ SCsCOL nPosX, SCsROW nPosY, BOOL& rLeft, BOOL& rTop );
+
+ BOOL IsRefMode() const { return bIsRefMode; }
+ ScRefType GetRefType() const { return eRefType; }
+ SCCOL GetRefStartX() const { return nRefStartX; }
+ SCROW GetRefStartY() const { return nRefStartY; }
+ SCTAB GetRefStartZ() const { return nRefStartZ; }
+ SCCOL GetRefEndX() const { return nRefEndX; }
+ SCROW GetRefEndY() const { return nRefEndY; }
+ SCTAB GetRefEndZ() const { return nRefEndZ; }
+
+ void SetRefMode( BOOL bNewMode, ScRefType eNewType )
+ { bIsRefMode = bNewMode; eRefType = eNewType; }
+
+ void SetRefStart( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ )
+ { nRefStartX = nNewX; nRefStartY = nNewY; nRefStartZ = nNewZ; }
+ void SetRefEnd( SCCOL nNewX, SCROW nNewY, SCTAB nNewZ )
+ { nRefEndX = nNewX; nRefEndY = nNewY; nRefEndZ = nNewZ; }
+
+ void ResetDelMark() { bDelMarkValid = FALSE; }
+ void SetDelMark( const ScRange& rRange )
+ { aDelRange = rRange; bDelMarkValid = TRUE; }
+
+ BOOL GetDelMark( ScRange& rRange ) const
+ { rRange = aDelRange; return bDelMarkValid; }
+
+ inline void GetMoveCursor( SCCOL& rCurX, SCROW& rCurY );
+
+ const ScViewOptions& GetOptions() const { return *pOptions; }
+ void SetOptions( const ScViewOptions& rOpt );
+
+ BOOL IsGridMode () const { return pOptions->GetOption( VOPT_GRID ); }
+ void SetGridMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_GRID, bNewMode ); }
+ BOOL IsSyntaxMode () const { return pOptions->GetOption( VOPT_SYNTAX ); }
+ void SetSyntaxMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_SYNTAX, bNewMode ); }
+ BOOL IsHeaderMode () const { return pOptions->GetOption( VOPT_HEADER ); }
+ void SetHeaderMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_HEADER, bNewMode ); }
+ BOOL IsTabMode () const { return pOptions->GetOption( VOPT_TABCONTROLS ); }
+ void SetTabMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_TABCONTROLS, bNewMode ); }
+ BOOL IsVScrollMode () const { return pOptions->GetOption( VOPT_VSCROLL ); }
+ void SetVScrollMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_VSCROLL, bNewMode ); }
+ BOOL IsHScrollMode () const { return pOptions->GetOption( VOPT_HSCROLL ); }
+ void SetHScrollMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_HSCROLL, bNewMode ); }
+ BOOL IsOutlineMode () const { return pOptions->GetOption( VOPT_OUTLINER ); }
+ void SetOutlineMode ( BOOL bNewMode ) { pOptions->SetOption( VOPT_OUTLINER, bNewMode ); }
+
+ void KillEditView();
+ void ResetEditView();
+ void SetEditEngine( ScSplitPos eWhich,
+ ScEditEngineDefaulter* pNewEngine,
+ Window* pWin, SCCOL nNewX, SCROW nNewY );
+ void GetEditView( ScSplitPos eWhich, EditView*& rViewPtr, SCCOL& rCol, SCROW& rRow );
+ BOOL HasEditView( ScSplitPos eWhich ) const
+ { return pEditView[eWhich] && bEditActive[eWhich]; }
+ EditView* GetEditView( ScSplitPos eWhich ) const
+ { return pEditView[eWhich]; }
+
+ void EditGrowX();
+ void EditGrowY( BOOL bInitial = FALSE );
+
+ ScSplitPos GetEditActivePart() const { return eEditActivePart; }
+ SCCOL GetEditViewCol() const { return nEditCol; }
+ SCROW GetEditViewRow() const { return nEditRow; }
+ SCCOL GetEditStartCol() const { return nEditStartCol; }
+ SCROW GetEditStartRow() const { return nEditRow; } // never editing above the cell
+ SCCOL GetEditEndCol() const { return nEditEndCol; }
+ SCROW GetEditEndRow() const { return nEditEndRow; }
+
+ Rectangle GetEditArea( ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, Window* pWin,
+ const ScPatternAttr* pPattern, BOOL bForceToTop );
+
+ void SetTabNo( SCTAB nNewTab );
+ void SetActivePart( ScSplitPos eNewActive );
+
+ Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
+ BOOL bAllowNeg = FALSE ) const;
+ Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScHSplitPos eWhich ) const;
+ Point GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScVSplitPos eWhich ) const;
+
+ SCCOL CellsAtX( SCsCOL nPosX, SCsCOL nDir, ScHSplitPos eWhichX, USHORT nScrSizeY = SC_SIZE_NONE ) const;
+ SCROW CellsAtY( SCsROW nPosY, SCsROW nDir, ScVSplitPos eWhichY, USHORT nScrSizeX = SC_SIZE_NONE ) const;
+
+ SCCOL VisibleCellsX( ScHSplitPos eWhichX ) const; // angezeigte komplette Zellen
+ SCROW VisibleCellsY( ScVSplitPos eWhichY ) const;
+ SCCOL PrevCellsX( ScHSplitPos eWhichX ) const; // Zellen auf der vorgehenden Seite
+ SCROW PrevCellsY( ScVSplitPos eWhichY ) const;
+//UNUSED2008-05 SCCOL LastCellsX( ScHSplitPos eWhichX ) const; // Zellen auf der letzten Seite
+//UNUSED2008-05 SCROW LastCellsY( ScVSplitPos eWhichY ) const;
+
+ BOOL IsOle();
+//UNUSED2008-05 void UpdateOle( ScSplitPos eWhich );
+ void SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
+ void SetScreen( const Rectangle& rVisArea );
+ void SetScreenPos( const Point& rVisAreaStart );
+
+ void UpdateScreenZoom( const Fraction& rNewX, const Fraction& rNewY );
+
+ Size GetScrSize() const { return aScrSize; }
+
+ void RecalcPixPos();
+ Point GetPixPos( ScSplitPos eWhich ) const
+ { return Point( pThisTab->nPixPosX[WhichH(eWhich)],
+ pThisTab->nPixPosY[WhichV(eWhich)] ); }
+ void SetSpellingView( EditView* pSpView) { pSpellingView = pSpView; }
+ EditView* GetSpellingView() const { return pSpellingView; }
+
+ void UpdateOutlinerFlags( Outliner& rOutl ) const;
+
+ Point GetMousePosPixel();
+
+ BOOL UpdateFixX(SCTAB nTab = MAXTAB+1);
+ BOOL UpdateFixY(SCTAB nTab = MAXTAB+1);
+
+ SCCOL GetTabStartCol() const { return nTabStartCol; }
+ void SetTabStartCol(SCCOL nNew) { nTabStartCol = nNew; }
+
+ ScAddress GetCurPos() const;
+
+ const Size& GetScenButSize() const { return aScenButSize; }
+ void SetScenButSize(const Size& rNew) { aScenButSize = rNew; }
+
+ BOOL IsSelCtrlMouseClick() { return bSelCtrlMouseClick; }
+
+ static inline long ToPixel( USHORT nTwips, double nFactor );
+
+ /** while (rScrY <= nEndPixels && rPosY <= nEndRow) add pixels of row
+ heights converted with nPPTY to rScrY, optimized for row height
+ segments. Upon return rPosY is the last row evaluated <= nEndRow, rScrY
+ may be > nEndPixels!
+ */
+ static void AddPixelsWhile( long & rScrY, long nEndPixels,
+ SCROW & rPosY, SCROW nEndRow, double nPPTY,
+ const ScDocument * pDoc, SCTAB nTabNo );
+
+ /** while (rScrY <= nEndPixels && rPosY >= nStartRow) add pixels of row
+ heights converted with nPPTY to rScrY, optimized for row height
+ segments. Upon return rPosY is the last row evaluated >= nStartRow,
+ rScrY may be > nEndPixels!
+ */
+ static void AddPixelsWhileBackward( long & rScrY, long nEndPixels,
+ SCROW & rPosY, SCROW nStartRow, double nPPTY,
+ const ScDocument * pDoc, SCTAB nTabNo );
+};
+
+
+// ---------------------------------------------------------------------------
+
+inline long ScViewData::ToPixel( USHORT nTwips, double nFactor )
+{
+ long nRet = (long)( nTwips * nFactor );
+ if ( !nRet && nTwips )
+ nRet = 1;
+ return nRet;
+}
+
+inline void ScViewData::GetMoveCursor( SCCOL& rCurX, SCROW& rCurY )
+{
+ if ( bIsRefMode )
+ {
+ rCurX = nRefEndX;
+ rCurY = nRefEndY;
+ }
+ else
+ {
+ rCurX = GetCurX();
+ rCurY = GetCurY();
+ }
+}
+
+inline ScHSplitPos WhichH( ScSplitPos ePos )
+{
+ return (ePos==SC_SPLIT_TOPLEFT || ePos==SC_SPLIT_BOTTOMLEFT) ?
+ SC_SPLIT_LEFT : SC_SPLIT_RIGHT;
+}
+
+inline ScVSplitPos WhichV( ScSplitPos ePos )
+{
+ return (ePos==SC_SPLIT_TOPLEFT || ePos==SC_SPLIT_TOPRIGHT) ?
+ SC_SPLIT_TOP : SC_SPLIT_BOTTOM;
+}
+
+inline ScSplitPos Which( ScHSplitPos eHPos )
+{
+ return (eHPos==SC_SPLIT_LEFT) ?
+ SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT;
+}
+
+inline ScSplitPos Which( ScVSplitPos eVPos )
+{
+ return (eVPos==SC_SPLIT_TOP) ?
+ SC_SPLIT_TOPLEFT : SC_SPLIT_BOTTOMLEFT;
+}
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
new file mode 100644
index 000000000000..59da2966cc60
--- /dev/null
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -0,0 +1,369 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SC_VIEWFUNC_HXX
+#define SC_VIEWFUNC_HXX
+
+#include "tabview.hxx"
+
+#include "tabbgcolor.hxx"
+
+#ifndef _SVSTDARR_SHORTS
+#define _SVSTDARR_SHORTS
+#include <svl/svstdarr.hxx>
+
+#endif
+
+#ifndef _SVSTDARR_STRINGS
+
+#define _SVSTDARR_STRINGS
+#include <svl/svstdarr.hxx>
+
+#endif
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
+
+class ScPatternAttr;
+class ScAutoFormatData;
+class SvxSearchItem;
+class SfxItemSet;
+class SvxBorderLine;
+class SvxBoxItem;
+class SvxBoxInfoItem;
+class SfxStyleSheet;
+class SfxPoolItem;
+class EditTextObject;
+struct ScSolveParam;
+struct ScTabOpParam;
+class ScPostIt;
+class ScConditionalFormat;
+class ScValidationData;
+class ScConversionParam;
+class SdrModel;
+class Graphic;
+class Exchange;
+class ScRangeList;
+class SvxHyperlinkItem;
+class ScTransferObj;
+class ScTableProtection;
+
+namespace com { namespace sun { namespace star { namespace datatransfer { class XTransferable; } } } }
+
+//==================================================================
+
+class ScViewFunc : public ScTabView
+{
+private:
+ ScAddress aFormatSource; // fuer automatisches Erweitern von Formatierung
+ ScRange aFormatArea;
+ BOOL bFormatValid;
+
+public:
+ ScViewFunc( Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell );
+//UNUSED2008-05 ScViewFunc( Window* pParent, const ScViewFunc& rViewFunc, ScTabViewShell* pViewShell );
+ ~ScViewFunc();
+
+ const ScPatternAttr* GetSelectionPattern ();
+ void GetSelectionFrame ( SvxBoxItem& rLineOuter,
+ SvxBoxInfoItem& rLineInner );
+
+ BYTE GetSelectionScriptType();
+
+ BOOL GetAutoSumArea(ScRangeList& rRangeList);
+ void EnterAutoSum(const ScRangeList& rRangeList, sal_Bool bSubTotal);
+ bool AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor, bool bContinue );
+ String GetAutoSumFormula( const ScRangeList& rRangeList, bool bSubTotal );
+
+ void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString,
+ BOOL bRecord = TRUE, const EditTextObject* pData = NULL );
+ void EnterValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rValue );
+ void EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextObject* pData,
+ BOOL bRecord = TRUE, BOOL bTestSimple = FALSE );
+
+ void EnterMatrix( const String& rString );
+ void EnterBlock( const String& rString, const EditTextObject* pData );
+
+ void EnterDataAtCursor( const String& rString ); //! nicht benutzt ?
+
+ SC_DLLPUBLIC void CutToClip( ScDocument* pClipDoc = NULL, BOOL bIncludeObjects = FALSE );
+ SC_DLLPUBLIC BOOL CopyToClip( ScDocument* pClipDoc = NULL, BOOL bCut = FALSE, BOOL bApi = FALSE,
+ BOOL bIncludeObjects = FALSE, BOOL bStopEdit = TRUE );
+ ScTransferObj* CopyToTransferable();
+ SC_DLLPUBLIC BOOL PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
+ USHORT nFunction = PASTE_NOFUNC, BOOL bSkipEmpty = FALSE,
+ BOOL bTranspose = FALSE, BOOL bAsLink = FALSE,
+ InsCellCmd eMoveMode = INS_NONE,
+ USHORT nUndoExtraFlags = IDF_NONE,
+ BOOL bAllowDialogs = FALSE );
+
+ void FillTab( USHORT nFlags, USHORT nFunction, BOOL bSkipEmpty, BOOL bAsLink );
+
+ SC_DLLPUBLIC void PasteFromSystem();
+ SC_DLLPUBLIC BOOL PasteFromSystem( ULONG nFormatId, BOOL bApi = FALSE );
+ void PasteFromTransferable( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::datatransfer::XTransferable >& rxTransferable );
+
+ void PasteDraw();
+ void PasteDraw( const Point& rLogicPos, SdrModel* pModel,
+ BOOL bGroup = FALSE, BOOL bSameDocClipboard = FALSE );
+
+ BOOL PasteOnDrawObject( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::datatransfer::XTransferable >& rxTransferable,
+ SdrObject* pHitObj, BOOL bLink );
+
+ BOOL PasteDataFormat( ULONG nFormatId,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::datatransfer::XTransferable >& rxTransferable,
+ SCCOL nPosX, SCROW nPosY, Point* pLogicPos = NULL,
+ BOOL bLink = FALSE, BOOL bAllowDialogs = FALSE );
+
+ BOOL PasteFile( const Point&, const String&, BOOL bLink=FALSE );
+ BOOL PasteObject( const Point&, const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >&, const Size* = NULL, const Graphic* = NULL, const ::rtl::OUString& = ::rtl::OUString(), sal_Int64 nAspect = ::com::sun::star::embed::Aspects::MSOLE_CONTENT );
+ BOOL PasteBitmap( const Point&, const Bitmap& );
+ BOOL PasteMetaFile( const Point&, const GDIMetaFile& );
+ BOOL PasteGraphic( const Point& rPos, const Graphic& rGraphic,
+ const String& rFile, const String& rFilter );
+ BOOL PasteBookmark( ULONG nFormatId,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::datatransfer::XTransferable >& rxTransferable,
+ SCCOL nPosX, SCROW nPosY );
+ BOOL PasteDDE( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::datatransfer::XTransferable >& rxTransferable );
+
+ BOOL ApplyGraphicToObject( SdrObject* pObject, const Graphic& rGraphic );
+
+ void InsertBookmark( const String& rDescription, const String& rURL,
+ SCCOL nPosX, SCROW nPosY, const String* pTarget = NULL,
+ BOOL bTryReplace = FALSE );
+ BOOL HasBookmarkAtCursor( SvxHyperlinkItem* pContent );
+
+ long DropRequestHdl( Exchange* pExchange );
+ BOOL MoveBlockTo( const ScRange& rSource, const ScAddress& rDestPos,
+ BOOL bCut, BOOL bRecord, BOOL bPaint, BOOL bApi );
+
+ BOOL LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, BOOL bApi );
+
+ void CreateNames( USHORT nFlags );
+ USHORT GetCreateNameFlags();
+ void InsertNameList();
+ BOOL InsertName( const String& rName, const String& rSymbol,
+ const String& rType );
+
+ void ApplyAttributes( const SfxItemSet* pDialogSet, const SfxItemSet* pOldSet,
+ BOOL bRecord = TRUE );
+ void ApplyAttr( const SfxPoolItem& rAttrItem );
+ void ApplySelectionPattern( const ScPatternAttr& rAttr,
+ BOOL bRecord = TRUE,
+ BOOL bCursorOnly = FALSE );
+ void ApplyPatternLines( const ScPatternAttr& rAttr,
+ const SvxBoxItem* pNewOuter,
+ const SvxBoxInfoItem* pNewInner, BOOL bRecord = TRUE );
+
+ void ApplyUserItemSet( const SfxItemSet& rItemSet );
+
+ const SfxStyleSheet* GetStyleSheetFromMarked();
+ void SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet,
+ BOOL bRecord = TRUE );
+ void RemoveStyleSheetInUse( SfxStyleSheet* pStyleSheet );
+ void UpdateStyleSheetInUse( SfxStyleSheet* pStyleSheet );
+
+ void SetNumberFormat( short nFormatType, ULONG nAdd = 0 );
+ void SetNumFmtByStr( const String& rCode );
+ void ChangeNumFmtDecimals( BOOL bIncrement );
+
+ void SetConditionalFormat( const ScConditionalFormat& rNew );
+ void SetValidation( const ScValidationData& rNew );
+
+ void ChangeIndent( BOOL bIncrement );
+
+ void ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect );
+
+ void Protect( SCTAB nTab, const String& rPassword );
+ BOOL Unprotect( SCTAB nTab, const String& rPassword );
+
+ void DeleteCells( DelCellCmd eCmd, BOOL bRecord = TRUE );
+ BOOL InsertCells( InsCellCmd eCmd, BOOL bRecord = TRUE, BOOL bPartOfPaste = FALSE );
+ void DeleteMulti( BOOL bRows, BOOL bRecord = TRUE );
+
+ void DeleteContents( USHORT nFlags, BOOL bRecord = TRUE );
+
+ void SetWidthOrHeight( BOOL bWidth, SCCOLROW nRangeCnt, SCCOLROW* pRanges,
+ ScSizeMode eMode, USHORT nSizeTwips,
+ BOOL bRecord = TRUE, BOOL bPaint = TRUE,
+ ScMarkData* pMarkData = NULL );
+ void SetMarkedWidthOrHeight( BOOL bWidth, ScSizeMode eMode, USHORT nSizeTwips,
+ BOOL bRecord = TRUE, BOOL bPaint = TRUE );
+ void ShowMarkedColumns( BOOL bShow, BOOL bRecord = TRUE );
+ void ShowMarkedRows( BOOL bShow, BOOL bRecord = TRUE );
+
+ BOOL AdjustBlockHeight( BOOL bPaint = TRUE, ScMarkData* pMarkData = NULL );
+ BOOL AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, BOOL bPaint = TRUE );
+
+ void ModifyCellSize( ScDirection eDir, BOOL bOptimal );
+
+ SC_DLLPUBLIC void InsertPageBreak( BOOL bColumn, BOOL bRecord = TRUE,
+ const ScAddress* pPos = NULL,
+ BOOL bSetModified = TRUE );
+ SC_DLLPUBLIC void DeletePageBreak( BOOL bColumn, BOOL bRecord = TRUE,
+ const ScAddress* pPos = NULL,
+ BOOL bSetModified = TRUE );
+
+ void RemoveManualBreaks();
+
+ void SetPrintZoom(USHORT nScale, USHORT nPages);
+ void AdjustPrintZoom();
+
+ BOOL TestMergeCells();
+ BOOL TestRemoveMerge();
+
+ BOOL MergeCells( BOOL bApi, BOOL& rDoContents, BOOL bRecord = TRUE );
+ BOOL RemoveMerge( BOOL bRecord = TRUE );
+
+ void FillSimple( FillDir eDir, BOOL bRecord = TRUE );
+ void FillSeries( FillDir eDir, FillCmd eCmd, FillDateCmd eDateCmd,
+ double fStart, double fStep, double fMax, BOOL bRecord = TRUE );
+ void FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
+ SCCOL nEndCol, SCROW nEndRow, ULONG nCount, BOOL bRecord = TRUE );
+ void FillCrossDblClick();
+
+ void TransliterateText( sal_Int32 nType );
+
+ ScAutoFormatData* CreateAutoFormatData();
+ void AutoFormat( USHORT nFormatNo, BOOL bRecord = TRUE );
+
+ void SearchAndReplace( const SvxSearchItem* pSearchItem,
+ BOOL bAddUndo, BOOL bIsApi );
+
+ void Solve( const ScSolveParam& rParam );
+ void TabOp( const ScTabOpParam& rParam, BOOL bRecord = TRUE );
+
+ BOOL InsertTable( const String& rName, SCTAB nTabNr, BOOL bRecord = TRUE );
+ BOOL InsertTables(SvStrings *pNames, SCTAB nTab, SCTAB nCount, BOOL bRecord = TRUE);
+
+
+ BOOL AppendTable( const String& rName, BOOL bRecord = TRUE );
+
+ BOOL DeleteTable( SCTAB nTabNr, BOOL bRecord = TRUE );
+ BOOL DeleteTables(const SvShorts &TheTabs, BOOL bRecord = TRUE );
+
+ BOOL RenameTable( const String& rName, SCTAB nTabNr );
+ void MoveTable( USHORT nDestDocNo, SCTAB nDestTab, BOOL bCopy );
+ void ImportTables( ScDocShell* pSrcShell,
+ SCTAB nCount, const SCTAB* pSrcTabs,
+ BOOL bLink,SCTAB nTab);
+
+ bool SetTabBgColor( const Color& rColor, SCTAB nTabNr );
+ bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfoList );
+
+ void InsertTableLink( const String& rFile,
+ const String& rFilter, const String& rOptions,
+ const String& rTabName );
+ void InsertAreaLink( const String& rFile,
+ const String& rFilter, const String& rOptions,
+ const String& rSource, ULONG nRefresh );
+
+ void ShowTable( const String& rName );
+ void HideTable( SCTAB nTabNr );
+
+ void MakeScenario( const String& rName, const String& rComment,
+ const Color& rColor, USHORT nFlags );
+ void ExtendScenario();
+ void UseScenario( const String& rName );
+
+ void InsertSpecialChar( const String& rStr, const Font& rFont );
+
+ void InsertDummyObject();
+ void InsertOleObject();
+
+ void InsertDraw();
+
+ void SetSelectionFrameLines( const SvxBorderLine* pLine,
+ BOOL bColorOnly );
+
+ void SetNoteText( const ScAddress& rPos, const String& rNoteText );
+ void ReplaceNote( const ScAddress& rPos, const String& rNoteText, const String* pAuthor, const String* pDate );
+ void DoRefConversion( BOOL bRecord = TRUE );
+
+//UNUSED2008-05 void DoSpellingChecker( BOOL bRecord = TRUE );
+ void DoHangulHanjaConversion( BOOL bRecord = TRUE );
+ void DoThesaurus( BOOL bRecord = TRUE );
+//UNUSED2008-05 DECL_LINK( SpellError, void * );
+
+ /** Generic implementation of sheet conversion functions. */
+ void DoSheetConversion( const ScConversionParam& rParam, BOOL bRecord = TRUE );
+
+ void SetPrintRanges( BOOL bEntireSheet,
+ const String* pPrint,
+ const String* pRepCol, const String* pRepRow,
+ BOOL bAddPrint );
+
+ void DetectiveAddPred();
+ void DetectiveDelPred();
+ void DetectiveAddSucc();
+ void DetectiveDelSucc();
+ void DetectiveAddError();
+ void DetectiveMarkInvalid();
+ void DetectiveDelAll();
+ void DetectiveRefresh();
+
+ void ShowNote( bool bShow = true );
+ inline void HideNote() { ShowNote( false ); }
+ void EditNote();
+
+ void ForgetFormatArea() { bFormatValid = FALSE; }
+ BOOL SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix = NULL );
+
+ // interne Hilfsfunktionen
+protected:
+ void UpdateLineAttrs( SvxBorderLine& rLine,
+ const SvxBorderLine* pDestLine,
+ const SvxBorderLine* pSrcLine,
+ BOOL bColor );
+
+//UNUSED2008-05 void PaintWidthHeight( BOOL bColumns, SCCOLROW nStart, SCCOLROW nEnd );
+
+
+private:
+ void PasteRTF( SCCOL nCol, SCROW nStartRow,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::datatransfer::XTransferable >& rxTransferable );
+ bool PasteMultiRangesFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc, sal_uInt16 nFunction,
+ bool bSkipEmpty, bool bTranspos, bool bAsLink, bool bAllowDialogs,
+ InsCellCmd eMoveMode, sal_uInt16 nCondFlags, sal_uInt16 nUndoFlags );
+ void PostPasteFromClip(const ScRange& rPasteRange, const ScMarkData& rMark);
+
+ USHORT GetOptimalColWidth( SCCOL nCol, SCTAB nTab, BOOL bFormula );
+
+ void StartFormatArea();
+ BOOL TestFormatArea( SCCOL nCol, SCROW nRow, SCTAB nTab, BOOL bAttrChanged );
+ void DoAutoAttributes( SCCOL nCol, SCROW nRow, SCTAB nTab,
+ BOOL bAttrChanged, BOOL bAddUndo );
+};
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
new file mode 100644
index 000000000000..eb1c6df2f902
--- /dev/null
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SC_VIEWUTIL_HXX
+#define SC_VIEWUTIL_HXX
+
+#include "address.hxx"
+#include <tools/solar.h>
+#include <sal/types.h>
+
+class String;
+class SfxItemSet;
+class SfxBindings;
+class SvxFontItem;
+class SfxViewShell;
+class SfxViewFrame;
+
+class ScChangeAction;
+class ScChangeViewSettings;
+class ScDocument;
+class ScAddress;
+class ScRange;
+class ScMarkData;
+
+enum ScUpdateMode { SC_UPDATE_ALL, SC_UPDATE_CHANGED, SC_UPDATE_MARKS };
+
+// ---------------------------------------------------------------------------
+
+class ScViewUtil // static Methoden
+{
+public:
+ static BOOL ExecuteCharMap( const SvxFontItem& rOldFont,
+ SfxViewFrame& rFrame,
+ SvxFontItem& rNewFont,
+ String& rString );
+
+ static BOOL IsActionShown( const ScChangeAction& rAction,
+ const ScChangeViewSettings& rSettings,
+ ScDocument& rDocument );
+
+ static void PutItemScript( SfxItemSet& rShellSet, const SfxItemSet& rCoreSet,
+ USHORT nWhichId, USHORT nScript );
+
+ static USHORT GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos );
+
+ static sal_Int32 GetTransliterationType( USHORT nSlotID );
+
+ static bool HasFiltered( const ScRange& rRange, ScDocument* pDoc );
+ /** Fit a range to cover nRows number of unfiltered rows.
+ @return <TRUE/> if the resulting range covers nRows unfiltered rows. */
+ static bool FitToUnfilteredRows( ScRange & rRange, ScDocument * pDoc, size_t nRows );
+ static void UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc );
+
+ static void HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USHORT nSlotId );
+
+ /** Returns true, if the passed view shell is in full screen mode. */
+ static bool IsFullScreen( SfxViewShell& rViewShell );
+ /** Enters or leaves full screen mode at the passed view shell. */
+ static void SetFullScreen( SfxViewShell& rViewShell, bool bSet );
+};
+
+// ---------------------------------------------------------------------------
+
+class ScUpdateRect
+{
+private:
+ SCCOL nOldStartX;
+ SCROW nOldStartY;
+ SCCOL nOldEndX;
+ SCROW nOldEndY;
+ SCCOL nNewStartX;
+ SCROW nNewStartY;
+ SCCOL nNewEndX;
+ SCROW nNewEndY;
+ SCCOL nContX1;
+ SCROW nContY1;
+ SCCOL nContX2;
+ SCROW nContY2;
+public:
+ ScUpdateRect( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
+ void SetNew( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2 );
+ BOOL GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
+#ifdef OLD_SELECTION_PAINT
+ BOOL GetXorDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, BOOL& rCont );
+ void GetContDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
+#endif
+};
+
+
+
+
+#endif
+
diff --git a/sc/source/ui/inc/warnbox.hxx b/sc/source/ui/inc/warnbox.hxx
new file mode 100644
index 000000000000..3b06c98c9e3e
--- /dev/null
+++ b/sc/source/ui/inc/warnbox.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SC_WARNBOX_HXX
+#define SC_WARNBOX_HXX
+
+#include <vcl/msgbox.hxx>
+
+
+// ============================================================================
+
+/** Message box with warning image and "Do not show again" checkbox. */
+class ScCbWarningBox : public WarningBox
+{
+public:
+ /** @param rMsgStr Resource ID for the message text.
+ @param bDefYes true = "Yes" focused, false = "No" focused. */
+ ScCbWarningBox( Window* pParent, const String& rMsgStr, bool bDefYes = true );
+
+ /** Opens dialog if IsDialogEnabled() returns true.
+ @descr If after executing the dialog the checkbox "Do not show again" is set,
+ the method DisableDialog() will be called. */
+ virtual sal_Int16 Execute();
+
+ /** Called before executing the dialog. If this method returns false, the dialog will not be opened. */
+ virtual bool IsDialogEnabled();
+ /** Called, when dialog is exited and the option "Do not show again" is set. */
+ virtual void DisableDialog();
+};
+
+
+// ----------------------------------------------------------------------------
+
+/** Warning box for "Replace cell contents?". */
+class ScReplaceWarnBox : public ScCbWarningBox
+{
+public:
+ ScReplaceWarnBox( Window* pParent );
+
+ /** Reads the configuration key "ReplaceCellsWarning". */
+ virtual bool IsDialogEnabled();
+ /** Sets the configuration key "ReplaceCellsWarning" to false. */
+ virtual void DisableDialog();
+};
+
+
+// ============================================================================
+
+#endif
+