1 diff --git sc/inc/document.hxx sc/inc/document.hxx
2 index bae5aea..5b3fb82 100644
3 --- sc/inc/document.hxx
4 +++ sc/inc/document.hxx
5 @@ -880,8 +880,10 @@ public:
6 SCCOL nEndCol, SCTAB nEndTab,
7 SCROW nStartRow, SCSIZE nSize,
8 ScDocument* pRefUndoDoc = NULL, BOOL* pUndoOutline = NULL );
9 - void DeleteRow( const ScRange& rRange,
11 + SC_DLLPUBLIC void DeleteRow( const ScRange& rRange,
12 ScDocument* pRefUndoDoc = NULL, BOOL* pUndoOutline = NULL );
14 BOOL InsertCol( SCROW nStartRow, SCTAB nStartTab,
15 SCROW nEndRow, SCTAB nEndTab,
16 SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL );
17 diff --git sc/inc/sc.hrc sc/inc/sc.hrc
18 index 3bcc4f3..7c62d8d 100644
21 @@ -1647,7 +1647,12 @@
23 #define SC_OOO_BUILD_START (SC_DIALOGS_END)
26 +#define SID_DATAFORM_NEW (SC_OOO_BUILD_START + 1) // message
27 +#define SID_DATA_FORM (SC_OOO_BUILD_START + 2) // menu (in Data menu)
28 +#define RID_SCDLG_DATAFORM (SC_OOO_BUILD_START + 3) // dialog
34 diff --git sc/inc/scabstdlg.hxx sc/inc/scabstdlg.hxx
35 index 3403c2d..dfdf0ba 100644
36 --- sc/inc/scabstdlg.hxx
37 +++ sc/inc/scabstdlg.hxx
42 +#include <tabvwsh.hxx>
46 class ScAutoFormatData;
47 @@ -111,6 +113,12 @@ public:
48 virtual DelCellCmd GetDelCellCmd() const = 0;
52 +class AbstractScDataFormDlg : public VclAbstractDialog //add for ScDeleteCellDlg
57 class AbstractScDeleteContentsDlg: public VclAbstractDialog //add for ScDeleteContentsDlg
60 @@ -324,6 +332,9 @@ public:
62 virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId, BOOL bDisallowCellMove = FALSE ) = 0 ; //add for ScDeleteCellDlg
65 + virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell ) = 0 ; //add for ScDataFormDlg
67 virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
68 USHORT nCheckDefaults = 0 ) = 0;
69 virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window* pParent, //add for ScFillSeriesDlg
70 diff --git sc/sdi/cellsh.sdi sc/sdi/cellsh.sdi
71 index 5e99223..baec475 100644
74 @@ -60,6 +60,7 @@ interface CellSelection
75 SID_SBA_BRW_INSERT [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
76 SID_SELECT_DB [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
77 SID_SORT [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
78 + SID_DATA_FORM [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
79 FID_FILTER_OK [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
80 SID_AUTO_FILTER [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
81 SID_AUTOFILTER_HIDE [ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
82 diff --git sc/sdi/scalc.sdi sc/sdi/scalc.sdi
83 index 2ff50a0..ecc0921 100644
86 @@ -1601,6 +1601,31 @@ SfxVoidItem DataSort SID_SORT
89 //--------------------------------------------------------------------------
90 +SfxVoidItem DataForm SID_DATA_FORM
95 + Cachable = Cachable,
102 + RecordAbsolute = FALSE,
107 + AccelConfig = TRUE,
109 + StatusBarConfig = FALSE,
110 + ToolBoxConfig = FALSE,
111 + GroupId = GID_DATA;
114 +//--------------------------------------------------------------------------
115 SfxVoidItem DataSubTotals SID_SUBTOTALS
118 diff --git sc/source/ui/attrdlg/scdlgfact.cxx sc/source/ui/attrdlg/scdlgfact.cxx
119 index aeb4786..de9b284 100644
120 --- sc/source/ui/attrdlg/scdlgfact.cxx
121 +++ sc/source/ui/attrdlg/scdlgfact.cxx
123 #include "tpstat.hxx" //add for ScDocStatPage
124 #include "tpusrlst.hxx" //add for ScTpUserLists
125 #include "tpview.hxx" //add for ScTpContentOptions
127 +#include "datafdlg.hxx" //add for ScDataFormDlg
130 #include "editutil.hxx"
131 @@ -88,6 +90,8 @@ IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl); //add for ScDataPilotDat
132 IMPL_ABSTDLG_BASE(AbstractScDataPilotSourceTypeDlg_Impl); //add for ScDataPilotSourceTypeDlg
133 IMPL_ABSTDLG_BASE(AbstractScDataPilotServiceDlg_Impl); //add for ScDataPilotServiceDlg
134 IMPL_ABSTDLG_BASE(AbstractScDeleteCellDlg_Impl); //add for ScDeleteCellDlg
136 +IMPL_ABSTDLG_BASE(AbstractScDataFormDlg_Impl); //add for ScDataFormDlg
137 IMPL_ABSTDLG_BASE(AbstractScDeleteContentsDlg_Impl); //add for ScDeleteContentsDlg
138 IMPL_ABSTDLG_BASE(AbstractScFillSeriesDlg_Impl); //add for ScFillSeriesDlg
139 IMPL_ABSTDLG_BASE(AbstractScGroupDlg_Impl); //add for ScGroupDlg
140 @@ -761,6 +765,26 @@ AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg( Wi
142 //add for ScDeleteCellDlg end
144 +//add for ScDataFormDlg begin
145 +AbstractScDataFormDlg* ScAbstractDialogFactory_Impl::CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell )
147 + ScDataFormDlg * pDlg=NULL;
150 + case RID_SCDLG_DATAFORM :
151 + pDlg = new ScDataFormDlg( pParent, pTabViewShell);
158 + return new AbstractScDataFormDlg_Impl( pDlg );
162 +//add for ScDataFormDlg end
164 //add for ScDeleteContentsDlg begin
165 AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
166 USHORT nCheckDefaults )
167 diff --git sc/source/ui/attrdlg/scdlgfact.hxx sc/source/ui/attrdlg/scdlgfact.hxx
168 index 463898c..526a1ec 100644
169 --- sc/source/ui/attrdlg/scdlgfact.hxx
170 +++ sc/source/ui/attrdlg/scdlgfact.hxx
171 @@ -40,6 +40,7 @@ class ScDataPilotDatabaseDlg;
172 class ScDataPilotSourceTypeDlg;
173 class ScDataPilotServiceDlg;
174 class ScDeleteCellDlg;
175 +class ScDataFormDlg;
176 class ScDeleteContentsDlg;
177 class ScFillSeriesDlg;
179 @@ -163,6 +164,12 @@ class AbstractScDeleteCellDlg_Impl : public AbstractScDeleteCellDlg //add for S
180 virtual DelCellCmd GetDelCellCmd() const;
184 +class AbstractScDataFormDlg_Impl : public AbstractScDataFormDlg //add for ScDataFormDlg
186 + DECL_ABSTDLG_BASE(AbstractScDataFormDlg_Impl,ScDataFormDlg);
189 class AbstractScDeleteContentsDlg_Impl : public AbstractScDeleteContentsDlg //add for ScDeleteContentsDlg
191 DECL_ABSTDLG_BASE( AbstractScDeleteContentsDlg_Impl,ScDeleteContentsDlg)
192 @@ -391,6 +398,9 @@ public:
193 virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg( Window* pParent, int nId,
194 BOOL bDisallowCellMove = FALSE ); //add for ScDeleteCellDlg
197 + virtual AbstractScDataFormDlg * CreateScDataFormDlg( Window* pParent, int nId, ScTabViewShell* pTabViewShell); //add for ScDeleteCellDlg
199 virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
200 USHORT nCheckDefaults = 0 );
202 diff --git sc/source/ui/inc/datafdlg.hrc sc/source/ui/inc/datafdlg.hrc
204 index 0000000..8fa8999
206 +++ sc/source/ui/inc/datafdlg.hrc
208 +/*************************************************************************
210 + * OpenOffice.org - a multi-platform office productivity suite
212 + * $RCSfile: datafdlg.hrc,v $
214 + * $Revision: 1.00 $
216 + * last change: $Author: rt $ $Date: 2005/09/08 21:37:12 $
218 + * The Contents of this file are made available subject to
219 + * the terms of GNU Lesser General Public License Version 2.1.
222 + * GNU Lesser General Public License Version 2.1
223 + * =============================================
224 + * Copyright 2005 by Sun Microsystems, Inc.
225 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
227 + * This library is free software; you can redistribute it and/or
228 + * modify it under the terms of the GNU Lesser General Public
229 + * License version 2.1, as published by the Free Software Foundation.
231 + * This library is distributed in the hope that it will be useful,
232 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
233 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
234 + * Lesser General Public License for more details.
236 + * You should have received a copy of the GNU Lesser General Public
237 + * License along with this library; if not, write to the Free Software
238 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
239 + * MA 02111-1307 USA
241 + ************************************************************************/
243 +#include "sc.hrc" // -> RID_SCDLG_DATAFORM
246 +#define BTN_DATAFORM_NEW 1001
247 +#define BTN_DATAFORM_DELETE 1002
248 +#define BTN_DATAFORM_RESTORE 1003
249 +#define BTN_DATAFORM_LAST 1004
250 +#define BTN_DATAFORM_NEXT 1005
251 +#define BTN_DATAFORM_CLOSE 1007
252 +#define WND_DATAFORM_SCROLLBAR 1008
253 +#define LAB_DATAFORM_RECORDNO 1009
255 +#define FT_DATAFORM_FIXEDTEXT1 2001
256 +#define ED_DATAFORM_EDIT1 2002
257 \ No newline at end of file
258 diff --git sc/source/ui/inc/datafdlg.hxx sc/source/ui/inc/datafdlg.hxx
260 index 0000000..3e6d8e3
262 +++ sc/source/ui/inc/datafdlg.hxx
264 +/*************************************************************************
266 + * OpenOffice.org - a multi-platform office productivity suite
268 + * $RCSfile: datafdlg.hxx,v $
270 + * $Revision: 1.00 $
272 + * last change: $Author: rt $ $Date: 2005/09/08 21:20:35 $
274 + * The Contents of this file are made available subject to
275 + * the terms of GNU Lesser General Public License Version 2.1.
278 + * GNU Lesser General Public License Version 2.1
279 + * =============================================
280 + * Copyright 2005 by Sun Microsystems, Inc.
281 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
283 + * This library is free software; you can redistribute it and/or
284 + * modify it under the terms of the GNU Lesser General Public
285 + * License version 2.1, as published by the Free Software Foundation.
287 + * This library is distributed in the hope that it will be useful,
288 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
289 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
290 + * Lesser General Public License for more details.
292 + * You should have received a copy of the GNU Lesser General Public
293 + * License along with this library; if not, write to the Free Software
294 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
295 + * MA 02111-1307 USA
297 + ************************************************************************/
299 +#ifndef SC_DATAFDLG_HXX
300 +#define SC_DATAFDLG_HXX
303 +#ifndef _SV_DIALOG_HXX //autogen
304 +#include <vcl/dialog.hxx>
307 +#ifndef _SV_BUTTON_HXX //autogen
308 +#include <vcl/imagebtn.hxx>
311 +#ifndef _SV_FIXED_HXX //autogen
312 +#include <vcl/fixed.hxx>
316 +#include "global.hxx"
318 +#include <tabvwsh.hxx>
319 +#include <sfx2/bindings.hxx>
320 +#include <sfx2/dispatch.hxx>
322 +#define MAX_DATAFORM_COLS 256
323 +#define MAX_DATAFORM_ROWS 32000
324 +#define CTRL_HEIGHT 22
325 +#define FIXED_WIDTH 60
326 +#define EDIT_WIDTH 140
327 +#define FIXED_LEFT 12
328 +#define EDIT_LEFT 78
329 +#define LINE_HEIGHT 30
332 +class ScDataFormDlg : public ModalDialog
336 + PushButton aBtnNew;
337 + PushButton aBtnDelete;
338 + PushButton aBtnRestore;
339 + PushButton aBtnLast;
340 + PushButton aBtnNext;
341 + PushButton aBtnClose;
343 + FixedText aFixedText;
344 + //FixedText aFixedText1;
347 + ScTabViewShell* pTabViewShell;
349 + sal_uInt16 aColLength;
358 + FixedText** pFixedTexts;
362 + ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShell);
365 + void FillCtrls(SCROW nCurrentRow);
368 + void SetButtonState();
371 + DECL_LINK( Impl_NewHdl, PushButton* );
372 + DECL_LINK( Impl_LastHdl, PushButton* );
373 + DECL_LINK( Impl_NextHdl, PushButton* );
375 + DECL_LINK( Impl_RestoreHdl, PushButton* );
376 + DECL_LINK( Impl_DeleteHdl, PushButton* );
377 + DECL_LINK( Impl_CloseHdl, PushButton* );
379 + DECL_LINK( Impl_ScrollHdl, ScrollBar* );
380 + DECL_LINK( Impl_DataModifyHdl, Edit* );
382 +#endif // SC_DATAFDLG_HXX
385 diff --git sc/source/ui/inc/undodat.hxx sc/source/ui/inc/undodat.hxx
386 index 3b65ba1..3487442 100644
387 --- sc/source/ui/inc/undodat.hxx
388 +++ sc/source/ui/inc/undodat.hxx
389 @@ -530,7 +530,43 @@ private:
394 +class ScUndoDataForm: public ScBlockUndo
398 + ScUndoDataForm( ScDocShell* pNewDocShell,
399 + SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
400 + SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
401 + const ScMarkData& rMark,
402 + ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
404 + ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3,
405 + BOOL bRedoIsFilled = TRUE
407 + virtual ~ScUndoDataForm();
409 + virtual void Undo();
410 + virtual void Redo();
411 + virtual void Repeat(SfxRepeatTarget& rTarget);
412 + virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
414 + virtual String GetComment() const;
417 + ScMarkData aMarkData;
418 + ScDocument* pUndoDoc;
419 + ScDocument* pRedoDoc;
421 + ScRefUndoData* pRefUndoData;
422 + ScRefUndoData* pRefRedoData;
423 + ULONG nStartChangeAction;
424 + ULONG nEndChangeAction;
427 + void DoChange( const BOOL bUndo );
428 + void SetChangeTrack();
433 diff --git sc/source/ui/inc/viewfunc.hxx sc/source/ui/inc/viewfunc.hxx
434 index acaea7e..0c1fa9e 100644
435 --- sc/source/ui/inc/viewfunc.hxx
436 +++ sc/source/ui/inc/viewfunc.hxx
437 @@ -328,6 +328,13 @@ public:
438 void ForgetFormatArea() { bFormatValid = FALSE; }
439 BOOL SelectionEditable( BOOL* pOnlyNotBecauseOfMatrix = NULL );
442 + SC_DLLPUBLIC void DataFormPutData( SCROW nCurrentRow ,
443 + SCROW nStartRow , SCCOL nStartCol ,
444 + SCROW nEndRow , SCCOL nEndCol ,
446 + sal_uInt16 aColLength );
448 // interne Hilfsfunktionen
450 void UpdateLineAttrs( SvxBorderLine& rLine,
451 diff --git sc/source/ui/miscdlgs/datafdlg.cxx sc/source/ui/miscdlgs/datafdlg.cxx
453 index 0000000..2249c57
455 +++ sc/source/ui/miscdlgs/datafdlg.cxx
457 +/*************************************************************************
459 + * OpenOffice.org - a multi-platform office productivity suite
461 + * $RCSfile: datafdlg.cxx,v $
463 + * $Revision: 1.00 $
465 + * last change: $Author: kz $ $Date: 2006/07/21 14:04:33 $
467 + * The Contents of this file are made available subject to
468 + * the terms of GNU Lesser General Public License Version 2.1.
471 + * GNU Lesser General Public License Version 2.1
472 + * =============================================
473 + * Copyright 2005 by Sun Microsystems, Inc.
474 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
476 + * This library is free software; you can redistribute it and/or
477 + * modify it under the terms of the GNU Lesser General Public
478 + * License version 2.1, as published by the Free Software Foundation.
480 + * This library is distributed in the hope that it will be useful,
481 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
482 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
483 + * Lesser General Public License for more details.
485 + * You should have received a copy of the GNU Lesser General Public
486 + * License along with this library; if not, write to the Free Software
487 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
488 + * MA 02111-1307 USA
490 + ************************************************************************/
492 +// MARKER(update_precomp.py): autogen include statement, do not remove
493 +#include "precompiled_sc.hxx"
495 +#undef SC_DLLIMPLEMENTATION
497 +//------------------------------------------------------------------
499 +#include "datafdlg.hxx"
500 +#include "scresid.hxx"
501 +#include "datafdlg.hrc"
502 +#include "viewdata.hxx"
503 +//#include "document.hxx"
504 +#include "docsh.hxx"
505 +#include "refundo.hxx"
506 +#include "undodat.hxx"
508 +#define HDL(hdl) LINK( this, ScDataFormDlg, hdl )
511 +ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri) :
512 + ModalDialog ( pParent, ScResId( RID_SCDLG_DATAFORM ) ),
514 + aBtnNew ( this, ScResId( BTN_DATAFORM_NEW ) ),
515 + aBtnDelete ( this, ScResId( BTN_DATAFORM_DELETE ) ),
516 + aBtnRestore ( this, ScResId( BTN_DATAFORM_RESTORE ) ),
517 + aBtnLast ( this, ScResId( BTN_DATAFORM_LAST ) ),
518 + aBtnNext ( this, ScResId( BTN_DATAFORM_NEXT ) ),
519 + aBtnClose ( this, ScResId( BTN_DATAFORM_CLOSE ) ),
520 + aSlider ( this, ScResId( WND_DATAFORM_SCROLLBAR ) ),
521 + aFixedText ( this, ScResId( LAB_DATAFORM_RECORDNO ) )
523 + pTabViewShell = pTabViewShellOri;
525 + //read header form current document, and add new controls
526 + DBG_ASSERT( pTabViewShell, "pTabViewShell is NULL! :-/" );
527 + ScViewData* pViewData = pTabViewShell->GetViewData();
529 + pDoc = pViewData->GetDocument();
533 + pViewData->GetSimpleArea( aRange );
534 + ScAddress aStart = aRange.aStart;
535 + ScAddress aEnd = aRange.aEnd;
537 + nStartCol = aStart.Col();
538 + nEndCol = aEnd.Col();
539 + nStartRow = aStart.Row();
540 + nEndRow = aEnd.Row();
542 + nTab = pViewData->GetTabNo();
543 + //if there is no selection
544 + if ((nStartCol == nEndCol) && (nStartRow == nEndRow))
545 + bNoSelection = TRUE;
549 + //find last not blank cell in row
550 + for (int i=1;i<=MAX_DATAFORM_COLS;i++)
554 + pDoc->GetString( nEndCol, nStartRow, nTab, aColName );
555 + int nColWidth = pDoc->GetColWidth( nEndCol, nTab );
556 + if ( aColName.Len() == 0 && nColWidth)
563 + //find first not blank cell in row
564 + for (int i=1;i<=MAX_DATAFORM_COLS;i++)
567 + if (nStartCol <= 0)
571 + pDoc->GetString( nStartCol, nStartRow, nTab, aColName );
572 + int nColWidth = pDoc->GetColWidth( nEndCol, nTab );
573 + if ( aColName.Len() == 0 && nColWidth)
580 + //skip leading hide column
581 + for (int i=1;i<=MAX_DATAFORM_COLS;i++)
584 + int nColWidth = pDoc->GetColWidth( nStartCol, nTab );
590 + if (nEndCol < nStartCol)
591 + nEndCol = nStartCol;
593 + //find last not blank cell in row
594 + for (int i=1;i<=MAX_DATAFORM_ROWS;i++)
598 + pDoc->GetString( nStartCol, nEndRow, nTab, aColName );
599 + if ( aColName.Len() == 0 )
606 + //find first not blank cell in row
607 + for (int i=1;i<=MAX_DATAFORM_ROWS;i++)
610 + if (nStartRow <= 0)
614 + pDoc->GetString( nStartCol, nStartRow, nTab, aColName );
615 + if ( aColName.Len() == 0 )
622 + if (nEndRow < nStartRow)
623 + nEndRow = nStartRow;
626 + aCurrentRow = nStartRow + 1;
632 + Size nFixedSize(FIXED_WIDTH, CTRL_HEIGHT );
633 + Size nEditSize(EDIT_WIDTH, CTRL_HEIGHT );
635 + //pFtArray = new FixedText(this);
636 + aColLength = nEndCol - nStartCol + 1;
639 + pFixedTexts = new FixedText*[aColLength];
640 + pEdits = new Edit*[aColLength];
642 + for(sal_uInt16 nIndex = 0; nIndex < aColLength; nIndex++)
644 + pDoc->GetString( nIndex + nStartCol, nStartRow, nTab, aFieldName );
645 + int nColWidth = pDoc->GetColWidth( nIndex + nStartCol, nTab );
648 + pFixedTexts[nIndex] = new FixedText(this);
649 + pEdits[nIndex] = new Edit(this, WB_BORDER);
651 + pFixedTexts[nIndex]->SetSizePixel(nFixedSize);
652 + pEdits[nIndex]->SetSizePixel(nEditSize);
653 + pFixedTexts[nIndex]->SetPosPixel(Point(FIXED_LEFT, nTop));
654 + pEdits[nIndex]->SetPosPixel(Point(EDIT_LEFT, nTop));
655 + //pFixedTexts[nIndex]->SetText(String::CreateFromAscii("W4W-Filter Nr. "));
656 + pFixedTexts[nIndex]->SetText(aFieldName);
657 + pFixedTexts[nIndex]->Show();
658 + pEdits[nIndex]->Show();
660 + nTop += LINE_HEIGHT;
664 + pFixedTexts[nIndex] = NULL;
665 + pEdits[nIndex] = NULL;
667 + pEdits[nIndex]->SetModifyHdl( HDL(Impl_DataModifyHdl) );
670 + Size nDialogSize = this->GetSizePixel();
671 + if (nTop > nDialogSize.Height())
673 + nDialogSize.setHeight(nTop);
674 + this->SetSizePixel(nDialogSize);
676 + Size nScrollSize = aSlider.GetSizePixel();
677 + nScrollSize.setHeight(nDialogSize.Height()-20);
678 + aSlider.SetSizePixel(nScrollSize);
681 + FillCtrls(aCurrentRow);
683 + aSlider.SetPageSize( 10 );
684 + aSlider.SetVisibleSize( 1 );
685 + aSlider.SetLineSize( 1 );
686 + aSlider.SetRange( Range( 0, nEndRow - nStartRow + 1) );
689 + aBtnNew.SetClickHdl ( HDL(Impl_NewHdl) );
690 + aBtnLast.SetClickHdl ( HDL(Impl_LastHdl) );
691 + aBtnNext.SetClickHdl ( HDL(Impl_NextHdl) );
693 + aBtnRestore.SetClickHdl ( HDL(Impl_RestoreHdl) );
694 + aBtnDelete.SetClickHdl ( HDL(Impl_DeleteHdl) );
695 + aBtnClose.SetClickHdl ( HDL(Impl_CloseHdl) );
697 + aSlider.SetEndScrollHdl( HDL( Impl_ScrollHdl ) );
705 +ScDataFormDlg::~ScDataFormDlg()
707 + for(sal_uInt16 i = 0; i < aColLength; i++)
711 + if (pFixedTexts[i])
712 + delete pFixedTexts[i];
717 + delete pFixedTexts;
720 +void ScDataFormDlg::FillCtrls(SCROW /*nCurrentRow*/)
722 + //ScViewData* pViewData = pTabViewShell->GetViewData();
724 + //pDoc = pViewData->GetDocument();
726 + int nRecordNum = nEndRow - nStartRow;
727 + for(sal_uInt16 i = 0; i < aColLength; i++)
731 + if (aCurrentRow<=nEndRow)
733 + pDoc->GetString( i + nStartCol, aCurrentRow, nTab, aFieldName );
734 + pEdits[i]->SetText(aFieldName);
737 + pEdits[i]->SetText(String());
740 + char sRecordStr[256];
741 + if (aCurrentRow<=nEndRow)
742 + aFixedText.SetText(String::CreateFromAscii(sRecordStr));
744 + aFixedText.SetText(String::CreateFromAscii("New Record"));
746 + aSlider.SetThumbPos(aCurrentRow-nStartRow-1);
749 +IMPL_LINK( ScDataFormDlg, Impl_DataModifyHdl, Edit*, pEdit)
751 + if ( pEdit->IsModified() )
752 + aBtnRestore.Enable( TRUE );
756 +IMPL_LINK( ScDataFormDlg, Impl_NewHdl, PushButton*, EMPTYARG )
758 + ScViewData* pViewData = pTabViewShell->GetViewData();
759 + ScDocShell* pDocSh = pViewData->GetDocShell();
762 + sal_Bool bHasData = sal_False;
763 + for(sal_uInt16 i = 0; i < aColLength; i++)
765 + if ( pEdits[i]->GetText().Len() != 0 )
767 + bHasData = sal_True;
773 + pTabViewShell->DataFormPutData( aCurrentRow , nStartRow , nStartCol , nEndRow , nEndCol , pEdits , aColLength );
775 + if (aCurrentRow >= nEndRow + 2)
778 + aSlider.SetRange( Range( 0, nEndRow - nStartRow + 1) );
781 + FillCtrls(aCurrentRow);
782 + pDocSh->SetDocumentModified();
783 + pDocSh->PostPaintGridAll();
789 +IMPL_LINK( ScDataFormDlg, Impl_LastHdl, PushButton*, EMPTYARG )
793 + if ( aCurrentRow > nStartRow +1 )
797 + FillCtrls(aCurrentRow);
802 +IMPL_LINK( ScDataFormDlg, Impl_NextHdl, PushButton*, EMPTYARG )
806 + if ( aCurrentRow <= nEndRow)
810 + FillCtrls(aCurrentRow);
815 +IMPL_LINK( ScDataFormDlg, Impl_RestoreHdl, PushButton*, EMPTYARG )
819 + FillCtrls(aCurrentRow);
824 +IMPL_LINK( ScDataFormDlg, Impl_DeleteHdl, PushButton*, EMPTYARG )
826 + ScViewData* pViewData = pTabViewShell->GetViewData();
827 + ScDocShell* pDocSh = pViewData->GetDocShell();
830 + ScRange aRange(nStartCol, aCurrentRow, nTab, nEndCol, aCurrentRow, nTab);
831 + pDoc->DeleteRow(aRange);
835 + pDocSh->GetUndoManager()->Clear();
837 + FillCtrls(aCurrentRow);
838 + pDocSh->SetDocumentModified();
839 + pDocSh->PostPaintGridAll();
844 +IMPL_LINK( ScDataFormDlg, Impl_CloseHdl, PushButton*, EMPTYARG )
850 +IMPL_LINK( ScDataFormDlg, Impl_ScrollHdl, ScrollBar*, EMPTYARG )
852 + long nOffset = aSlider.GetThumbPos();
853 + aCurrentRow = nStartRow + nOffset + 1;
855 + FillCtrls(aCurrentRow);
859 +void ScDataFormDlg::SetButtonState()
861 + if ( aCurrentRow > nEndRow )
863 + aBtnDelete.Enable( FALSE );
864 + aBtnLast.Enable( TRUE );
865 + aBtnNext.Enable( FALSE );
869 + aBtnDelete.Enable( TRUE );
870 + aBtnNext.Enable( TRUE );
872 + if ( 1 == aCurrentRow )
873 + aBtnLast.Enable( FALSE );
875 + aBtnRestore.Enable( FALSE );
877 + pEdits[0]->GrabFocus();
879 diff --git sc/source/ui/miscdlgs/makefile.mk sc/source/ui/miscdlgs/makefile.mk
880 index 90f3afe..3569ccf 100644
881 --- sc/source/ui/miscdlgs/makefile.mk
882 +++ sc/source/ui/miscdlgs/makefile.mk
883 @@ -45,6 +45,7 @@ LIBTARGET=no
884 # --- Files --------------------------------------------------------
887 + $(SLO)$/datafdlg.obj \
888 $(SLO)$/delcldlg.obj \
889 $(SLO)$/inscldlg.obj \
890 $(SLO)$/delcodlg.obj \
891 diff --git sc/source/ui/src/datafdlg.src sc/source/ui/src/datafdlg.src
893 index 0000000..535ec66
895 +++ sc/source/ui/src/datafdlg.src
897 +/*************************************************************************
899 + * OpenOffice.org - a multi-platform office productivity suite
901 + * $RCSfile: datafdlg.src,v $
903 + * $Revision: 1.00 $
905 + * last change: $Author: hr $ $Date: 2005/09/23 15:07:30 $
907 + * The Contents of this file are made available subject to
908 + * the terms of GNU Lesser General Public License Version 2.1.
911 + * GNU Lesser General Public License Version 2.1
912 + * =============================================
913 + * Copyright 2005 by Sun Microsystems, Inc.
914 + * 901 San Antonio Road, Palo Alto, CA 94303, USA
916 + * This library is free software; you can redistribute it and/or
917 + * modify it under the terms of the GNU Lesser General Public
918 + * License version 2.1, as published by the Free Software Foundation.
920 + * This library is distributed in the hope that it will be useful,
921 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
922 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
923 + * Lesser General Public License for more details.
925 + * You should have received a copy of the GNU Lesser General Public
926 + * License along with this library; if not, write to the Free Software
927 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
928 + * MA 02111-1307 USA
930 + ************************************************************************/
932 +#include "datafdlg.hrc"
934 +//zhangyun, dataform
935 +ModalDialog RID_SCDLG_DATAFORM
937 + OutputSize = TRUE ;
939 + Size = MAP_APPFONT ( 191 , 180 ) ;
940 + Text [ en-US ] = "Data Form" ;
943 + FixedText LAB_DATAFORM_RECORDNO
945 + Pos = MAP_APPFONT ( 136 , 6 ) ;
946 + Size = MAP_APPFONT ( 50 , 12 ) ;
947 + Text [ en-US ] = "/" ;
949 + PushButton BTN_DATAFORM_NEW
951 + Pos = MAP_APPFONT ( 135 , 23 ) ;
952 + Size = MAP_APPFONT ( 50 , 14 ) ;
955 + Text [ en-US ] = "New" ;
957 + PushButton BTN_DATAFORM_DELETE
959 + Pos = MAP_APPFONT ( 135 , 40 ) ;
960 + Size = MAP_APPFONT ( 50 , 14 ) ;
962 + Text [ en-US ] = "Delete" ;
964 + PushButton BTN_DATAFORM_RESTORE
966 + Pos = MAP_APPFONT ( 135 , 57 ) ;
967 + Size = MAP_APPFONT ( 50 , 14 ) ;
969 + Text [ en-US ] = "Restore" ;
971 + PushButton BTN_DATAFORM_LAST
973 + Pos = MAP_APPFONT ( 135 , 82 ) ;
974 + Size = MAP_APPFONT ( 50 , 14 ) ;
976 + Text [ en-US ] = "Last Record" ;
978 + PushButton BTN_DATAFORM_NEXT
980 + Pos = MAP_APPFONT ( 135 , 99 ) ;
981 + Size = MAP_APPFONT ( 50 , 14 ) ;
983 + Text [ en-US ] = "Next Record" ;
985 + PushButton BTN_DATAFORM_CLOSE
987 + Pos = MAP_APPFONT ( 135 , 116 ) ;
988 + Size = MAP_APPFONT ( 50 , 14 ) ;
990 + Text [ en-US ] = "Close" ;
992 + ScrollBar WND_DATAFORM_SCROLLBAR
994 + Pos = MAP_APPFONT ( 124 , 6 ) ;
995 + Size = MAP_APPFONT ( 8 , 135 ) ;
1005 diff --git sc/source/ui/src/makefile.mk sc/source/ui/src/makefile.mk
1006 index af0e906..8f33ac9 100644
1007 --- sc/source/ui/src/makefile.mk
1008 +++ sc/source/ui/src/makefile.mk
1009 @@ -57,6 +57,7 @@ SRC1FILES = \
1017 diff --git sc/source/ui/undo/undodat.cxx sc/source/ui/undo/undodat.cxx
1018 index 4ea4a0a..9aea0eb 100644
1019 --- sc/source/ui/undo/undodat.cxx
1020 +++ sc/source/ui/undo/undodat.cxx
1022 #include "dpobject.hxx"
1023 #include "attrib.hxx"
1025 +#include "chgtrack.hxx" // Amelia Wang
1026 +#include "refundo.hxx" // Amelia Wang
1028 // -----------------------------------------------------------------------
1030 @@ -74,6 +74,7 @@ TYPEINIT1(ScUndoRepeatDB, ScSi
1031 TYPEINIT1(ScUndoDataPilot, ScSimpleUndo);
1032 TYPEINIT1(ScUndoConsolidate, ScSimpleUndo);
1033 TYPEINIT1(ScUndoChartData, ScSimpleUndo);
1034 +TYPEINIT1(ScUndoDataForm, SfxUndoAction); // amelia
1036 // -----------------------------------------------------------------------
1038 @@ -2182,8 +2185,210 @@ BOOL __EXPORT ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
1043 +ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
1044 + SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
1045 + SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
1046 + const ScMarkData& rMark,
1047 + ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
1049 + ScRefUndoData* pRefData,
1050 + void* /*pFill1*/, void* /*pFill2*/, void* /*pFill3*/,
1051 + BOOL bRedoIsFilled ) :
1052 + ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ),
1053 + aMarkData( rMark ),
1054 + pUndoDoc( pNewUndoDoc ),
1055 + pRedoDoc( pNewRedoDoc ),
1056 + nFlags( nNewFlags ),
1057 + pRefUndoData( pRefData ),
1058 + pRefRedoData( NULL ),
1059 + bRedoFilled( bRedoIsFilled )
1061 + // pFill1,pFill2,pFill3 are there so the ctor calls for simple paste (without cutting)
1062 + // don't have to be changed and branched for 641.
1063 + // They can be removed later.
1065 + if ( !aMarkData.IsMarked() ) // no cell marked:
1066 + aMarkData.SetMarkArea( aBlockRange ); // mark paste block
1068 + if ( pRefUndoData )
1069 + pRefUndoData->DeleteUnchanged( pDocShell->GetDocument() );
1074 +ScUndoDataForm::~ScUndoDataForm()
1078 + delete pRefUndoData;
1079 + delete pRefRedoData;
1082 +String ScUndoDataForm::GetComment() const
1084 + return ScGlobal::GetRscString( STR_UNDO_PASTE );
1087 +void ScUndoDataForm::SetChangeTrack()
1089 + ScChangeTrack* pChangeTrack = pDocShell->GetDocument()->GetChangeTrack();
1090 + if ( pChangeTrack && (nFlags & IDF_CONTENTS) )
1091 + pChangeTrack->AppendContentRange( aBlockRange, pUndoDoc,
1092 + nStartChangeAction, nEndChangeAction, SC_CACM_PASTE );
1094 + nStartChangeAction = nEndChangeAction = 0;
1098 +void ScUndoDataForm::Undo()
1102 + ShowTable( aBlockRange );
1104 + SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
1107 +void ScUndoDataForm::Redo()
1110 + ScDocument* pDoc = pDocShell->GetDocument();
1111 + EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
1112 + DoChange( FALSE );
1113 + EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
1115 + SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
1118 +void ScUndoDataForm::Repeat(SfxRepeatTarget& /*rTarget*/)
1122 +BOOL ScUndoDataForm::CanRepeat(SfxRepeatTarget& rTarget) const
1124 + return (rTarget.ISA(ScTabViewTarget));
1127 +void ScUndoDataForm::DoChange( const BOOL bUndo )
1129 + ScDocument* pDoc = pDocShell->GetDocument();
1131 + // RefUndoData for redo is created before first undo
1132 + // (with DeleteUnchanged after the DoUndo call)
1133 + BOOL bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
1134 + if ( bCreateRedoData )
1135 + pRefRedoData = new ScRefUndoData( pDoc );
1137 + ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
1139 + // fuer Undo immer alle oder keine Inhalte sichern
1140 + USHORT nUndoFlags = IDF_NONE;
1141 + if (nFlags & IDF_CONTENTS)
1142 + nUndoFlags |= IDF_CONTENTS;
1143 + if (nFlags & IDF_ATTRIB)
1144 + nUndoFlags |= IDF_ATTRIB;
1146 + BOOL bPaintAll = FALSE;
1148 + ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
1150 + // marking is in ScBlockUndo...
1151 + //ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockRange );
1153 + SCTAB nTabCount = pDoc->GetTableCount();
1154 + if ( bUndo && !bRedoFilled )
1158 + BOOL bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
1159 + BOOL bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
1161 + pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
1162 + pRedoDoc->InitUndoSelected( pDoc, aMarkData, bColInfo, bRowInfo );
1164 + // read "redo" data from the document in the first undo
1165 + // all sheets - CopyToDocument skips those that don't exist in pRedoDoc
1166 + ScRange aCopyRange = aBlockRange;
1167 + aCopyRange.aStart.SetTab(0);
1168 + aCopyRange.aEnd.SetTab(nTabCount-1);
1169 + pDoc->CopyToDocument( aCopyRange, 1, FALSE, pRedoDoc );
1170 + bRedoFilled = TRUE;
1173 + USHORT nExtFlags = 0;
1174 + pDocShell->UpdatePaintExt( nExtFlags, aBlockRange );
1176 + for ( sal_uInt16 i=0; i <= ( aBlockRange.aEnd.Col() - aBlockRange.aStart.Col() ); i++ )
1178 + String aOldString;
1179 + pUndoDoc->GetString( aBlockRange.aStart.Col()+i , aBlockRange.aStart.Row() , aBlockRange.aStart.Tab() , aOldString );
1180 + pDoc->SetString( aBlockRange.aStart.Col()+i , aBlockRange.aStart.Row() , aBlockRange.aStart.Tab() , aOldString );
1183 + //ScRange aTabSelectRange = aBlockRange;
1187 + pWorkRefData->DoUndo( pDoc, TRUE ); // TRUE = bSetChartRangeLists for SetChartListenerCollection
1188 + if ( pDoc->RefreshAutoFilter( 0,0, MAXCOL,MAXROW, aBlockRange.aStart.Tab() ) )
1192 + if ( bCreateRedoData && pRefRedoData )
1193 + pRefRedoData->DeleteUnchanged( pDoc );
1197 + ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
1198 + if ( pChangeTrack )
1199 + pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
1204 + ScRange aDrawRange( aBlockRange );
1205 + pDoc->ExtendMerge( aDrawRange, TRUE ); // only needed for single sheet (text/rtf etc.)
1206 + USHORT nPaint = PAINT_GRID;
1209 + aDrawRange.aStart.SetCol(0);
1210 + aDrawRange.aStart.SetRow(0);
1211 + aDrawRange.aEnd.SetCol(MAXCOL);
1212 + aDrawRange.aEnd.SetRow(MAXROW);
1213 + nPaint |= PAINT_TOP | PAINT_LEFT;
1214 +/*A*/ if (pViewShell)
1215 + pViewShell->AdjustBlockHeight(FALSE);
1219 + if ( aBlockRange.aStart.Row() == 0 && aBlockRange.aEnd.Row() == MAXROW ) // ganze Spalte
1221 + nPaint |= PAINT_TOP;
1222 + aDrawRange.aEnd.SetCol(MAXCOL);
1224 + if ( aBlockRange.aStart.Col() == 0 && aBlockRange.aEnd.Col() == MAXCOL ) // ganze Zeile
1226 + nPaint |= PAINT_LEFT;
1227 + aDrawRange.aEnd.SetRow(MAXROW);
1229 +/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(FALSE))
1231 + aDrawRange.aStart.SetCol(0);
1232 + aDrawRange.aStart.SetRow(0);
1233 + aDrawRange.aEnd.SetCol(MAXCOL);
1234 + aDrawRange.aEnd.SetRow(MAXROW);
1235 + nPaint |= PAINT_LEFT;
1237 + pDocShell->UpdatePaintExt( nExtFlags, aDrawRange );
1240 + if ( !bUndo ) // draw redo after updating row heights
1241 + RedoSdrUndoAction( pDrawUndo ); //! include in ScBlockUndo?
1243 + pDocShell->PostPaint( aDrawRange, nPaint, nExtFlags );
1245 + pDocShell->PostDataChanged();
1247 + pViewShell->CellContentChanged();
1249 diff --git sc/source/ui/view/cellsh2.cxx sc/source/ui/view/cellsh2.cxx
1250 index 7dee7cc..231e71e 100644
1251 --- sc/source/ui/view/cellsh2.cxx
1252 +++ sc/source/ui/view/cellsh2.cxx
1253 @@ -265,6 +265,20 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
1257 + case SID_DATA_FORM:
1259 + ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
1260 + DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001
1262 + AbstractScDataFormDlg* pDlg = pFact->CreateScDataFormDlg( pTabViewShell->GetDialogParent(),RID_SCDLG_DATAFORM, pTabViewShell);
1263 + DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001
1273 const SfxItemSet* pArgs = rReq.GetArgs();
1274 diff --git sc/source/ui/view/viewfun3.cxx sc/source/ui/view/viewfun3.cxx
1275 index 1cb5400..9c2ef97 100644
1276 --- sc/source/ui/view/viewfun3.cxx
1277 +++ sc/source/ui/view/viewfun3.cxx
1279 #include "transobj.hxx"
1280 #include "drwtrans.hxx"
1281 #include "docuno.hxx"
1282 +#include "undodat.hxx" // Amelia Wang
1284 using namespace com::sun::star;
1286 @@ -1414,6 +1415,85 @@ BOOL ScViewFunc::LinkBlock( const ScRange& rSource, const ScAddress& rDestPos, B
1290 +void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
1291 + SCROW nStartRow , SCCOL nStartCol ,
1292 + SCROW nEndRow , SCCOL nEndCol ,
1294 + sal_uInt16 aColLength )
1296 + ScDocument* pDoc = GetViewData()->GetDocument();
1297 + ScDocShell* pDocSh = GetViewData()->GetDocShell();
1298 + ScMarkData& rMark = GetViewData()->GetMarkData();
1299 + ScDocShellModificator aModificator( *pDocSh );
1300 + SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager();
1303 + const BOOL bRecord( pDoc->IsUndoEnabled());
1304 + ScDocument* pUndoDoc = NULL;
1305 + ScDocument* pRedoDoc = NULL;
1306 + ScDocument* pRefUndoDoc = NULL;
1307 + ScRefUndoData* pUndoData = NULL;
1308 + SCTAB nTab = GetViewData()->GetTabNo();
1309 + SCTAB nStartTab = nTab;
1310 + SCTAB nEndTab = nTab;
1313 + ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
1314 + if ( pChangeTrack )
1315 + pChangeTrack->ResetLastCut(); // kein CutMode mehr
1317 + ScRange aUserRange( nStartCol, nCurrentRow, nStartTab, nEndCol, nCurrentRow, nEndTab );
1318 + BOOL bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
1319 + BOOL bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
1320 + SCCOL nUndoEndCol = nStartCol+aColLength-1;
1321 + SCROW nUndoEndRow = nCurrentRow;
1322 + USHORT nUndoFlags = IDF_NONE;
1326 + pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
1327 + pUndoDoc->InitUndoSelected( pDoc , rMark , bColInfo , bRowInfo );
1328 + pDoc->CopyToDocument( aUserRange , 1 , FALSE , pUndoDoc );
1330 + USHORT nExtFlags = 0;
1331 + pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nStartRow, nStartTab , nEndCol, nEndRow, nEndTab ); // content before the change
1332 + //rMark.SetMarkArea( aUserRange );
1333 + pDoc->BeginDrawUndo();
1335 + for(sal_uInt16 i = 0; i < aColLength; i++)
1339 + String aFieldName=pEdits[i]->GetText();
1340 + pDoc->SetString( nStartCol + i, nCurrentRow, nTab, aFieldName );
1343 + //pDoc->ExtendMergeSel( nStartCol, nStartRow, nEndCol, nEndRow, rMark, TRUE ); // Refresh
1344 + pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nCurrentRow, nStartTab, nEndCol, nCurrentRow, nEndTab ); // content after the change
1345 + SfxUndoAction* pUndo = new ScUndoDataForm( pDocSh,
1346 + nStartCol, nCurrentRow, nStartTab,
1347 + nUndoEndCol, nUndoEndRow, nEndTab, rMark,
1348 + pUndoDoc, pRedoDoc, nUndoFlags,
1349 + pUndoData, NULL, NULL, NULL,
1350 + FALSE ); // FALSE = Redo data not yet copied
1351 + pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), TRUE );
1353 + USHORT nPaint = PAINT_GRID;
1356 + nPaint |= PAINT_TOP;
1357 + nUndoEndCol = MAXCOL; // nur zum Zeichnen !
1361 + nPaint |= PAINT_LEFT;
1362 + nUndoEndRow = MAXROW; // nur zum Zeichnen !
1365 + pDocSh->PostPaint( nStartCol, nCurrentRow, nStartTab,
1366 + nUndoEndCol, nUndoEndRow, nEndTab, nPaint, nExtFlags );
1367 + pDocSh->UpdateOle(GetViewData());
1372 diff --git sc/uiconfig/scalc/menubar/menubar.xml sc/uiconfig/scalc/menubar/menubar.xml
1373 index 938f00b..06dfc6f 100644
1374 --- sc/uiconfig/scalc/menubar/menubar.xml
1375 +++ sc/uiconfig/scalc/menubar/menubar.xml
1377 <menu:menuitem menu:id=".uno:DataFilterHideAutoFilter"/>
1380 + <menu:menuitem menu:id=".uno:DataForm"/>
1381 <menu:menuitem menu:id=".uno:DataSubTotals"/>
1382 <menu:menuitem menu:id=".uno:Validation"/>
1383 <menu:menuseparator/>
1384 diff --git sc/util/makefile.mk sc/util/makefile.mk
1385 index a051bb8..9d2706a 100644
1386 --- sc/util/makefile.mk
1387 +++ sc/util/makefile.mk
1388 @@ -273,6 +273,7 @@ LIB8OBJFILES = \
1389 $(SLO)$/filldlg.obj \
1390 $(SLO)$/delcodlg.obj \
1391 $(SLO)$/delcldlg.obj \
1392 + $(SLO)$/datafdlg.obj \
1393 $(SLO)$/dapitype.obj \
1394 $(SLO)$/dapidata.obj \