ooo-build r15158 - in trunk: . patches/dev300



Author: kyoshida
Date: Tue Jan 27 04:44:54 2009
New Revision: 15158
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15158&view=rev

Log:
2009-01-26  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/sc-dataform-sc-m38.diff:
	* patches/dev300/sc-dataform-sc.diff:
	* patches/dev300/apply:	adjusted for dev300-m39.


Added:
   trunk/patches/dev300/sc-dataform-sc-m38.diff
      - copied unchanged from r15157, /trunk/patches/dev300/sc-dataform-sc.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply
   trunk/patches/dev300/sc-dataform-sc.diff

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Tue Jan 27 04:44:54 2009
@@ -215,8 +215,15 @@
 # sw-input-field-inline-edit.diff, Zhang Yun # removed since it causes some
 # crashes with undo/redo
 
+[ TemporaryHacks <= dev300-m38 ]
+#realize a new feature named as Show Data Form in OpenOffice
+sc-dataform-sc-m38.diff, Amelia Wang
+
+[ TemporaryHacks > dev300-m38 ]
 #realize a new feature named as Show Data Form in OpenOffice
 sc-dataform-sc.diff, Amelia Wang
+
+[ TemporaryHacks ]
 sc-dataform-officecfg.diff, kohei
 
 #realize extra piece of new feature named as Show Data Form about vba

Modified: trunk/patches/dev300/sc-dataform-sc.diff
==============================================================================
--- trunk/patches/dev300/sc-dataform-sc.diff	(original)
+++ trunk/patches/dev300/sc-dataform-sc.diff	Tue Jan 27 04:44:54 2009
@@ -1,20 +1,8 @@
-diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
-index b8f96ea..3e68262 100644
+diff --git sc/inc/document.hxx sc/inc/document.hxx
+index bae5aea..5b3fb82 100644
 --- sc/inc/document.hxx
 +++ sc/inc/document.hxx
-@@ -717,7 +717,10 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollection() const;
- 	void			PutCell(SCCOL nCol, SCROW nRow, SCTAB nTab, ScBaseCell* pCell,
- 							ULONG nFormatIndex, BOOL bForceTab = FALSE);
- 					//	return TRUE = Zahlformat gesetzt
--	BOOL			SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString );
-+	//BOOL			SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString );
-+	//for dataform
-+	SC_DLLPUBLIC  BOOL			SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rString );
-+	//end
- 	void			SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal );
- 	void			SetNote( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPostIt& rNote );
- 	void 			SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const USHORT nError);
-@@ -887,8 +890,10 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollection() const;
+@@ -880,8 +880,10 @@ public:
  							   SCCOL nEndCol,   SCTAB nEndTab,
  							   SCROW nStartRow, SCSIZE nSize,
  							   ScDocument* pRefUndoDoc = NULL, BOOL* pUndoOutline = NULL );
@@ -26,22 +14,11 @@
  	BOOL			InsertCol( SCROW nStartRow, SCTAB nStartTab,
  							   SCROW nEndRow,   SCTAB nEndTab,
  							   SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = NULL );
-@@ -1187,7 +1192,9 @@ SC_DLLPUBLIC	ScDBCollection*	GetDBCollection() const;
- 											USHORT nNewHeight );
- 	void			SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BOOL bManual );
- 
--	USHORT			GetColWidth( SCCOL nCol, SCTAB nTab ) const;
-+	//for dataform
-+	SC_DLLPUBLIC    USHORT			GetColWidth( SCCOL nCol, SCTAB nTab ) const;
-+	
- 	USHORT			GetRowHeight( SCROW nRow, SCTAB nTab ) const;
- 	ULONG			GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
- 	ULONG			GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const;
-diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
-index 4b48144..9f58a25 100644
+diff --git sc/inc/sc.hrc sc/inc/sc.hrc
+index 3bcc4f3..7c62d8d 100644
 --- sc/inc/sc.hrc
 +++ sc/inc/sc.hrc
-@@ -1641,6 +1641,11 @@
+@@ -1647,6 +1647,11 @@
  
  #define SC_OOO_BUILD_START          (SC_DIALOGS_END)
  
@@ -53,7 +30,7 @@
  
  
  
-diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
+diff --git sc/inc/scabstdlg.hxx sc/inc/scabstdlg.hxx
 index 3403c2d..dfdf0ba 100644
 --- sc/inc/scabstdlg.hxx
 +++ sc/inc/scabstdlg.hxx
@@ -89,7 +66,7 @@
  	virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
  																 USHORT  nCheckDefaults = 0 ) = 0;
  	virtual AbstractScFillSeriesDlg * CreateScFillSeriesDlg( Window*		pParent, //add for ScFillSeriesDlg
-diff --git a/sc/sdi/cellsh.sdi b/sc/sdi/cellsh.sdi
+diff --git sc/sdi/cellsh.sdi sc/sdi/cellsh.sdi
 index 5e99223..baec475 100644
 --- sc/sdi/cellsh.sdi
 +++ sc/sdi/cellsh.sdi
@@ -101,8 +78,8 @@
  	FID_FILTER_OK			[ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
  	SID_AUTO_FILTER			[ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
  	SID_AUTOFILTER_HIDE		[ ExecMethod = ExecuteDB; StateMethod = GetDBState; ]
-diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
-index 2fb90e6..f6cc119 100644
+diff --git sc/sdi/scalc.sdi sc/sdi/scalc.sdi
+index 2ff50a0..ecc0921 100644
 --- sc/sdi/scalc.sdi
 +++ sc/sdi/scalc.sdi
 @@ -1601,6 +1601,31 @@ SfxVoidItem DataSort SID_SORT
@@ -137,7 +114,7 @@
  SfxVoidItem DataSubTotals SID_SUBTOTALS
  ()
  [
-diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
+diff --git sc/source/ui/attrdlg/scdlgfact.cxx sc/source/ui/attrdlg/scdlgfact.cxx
 index aeb4786..de9b284 100644
 --- sc/source/ui/attrdlg/scdlgfact.cxx
 +++ sc/source/ui/attrdlg/scdlgfact.cxx
@@ -186,7 +163,7 @@
  //add for ScDeleteContentsDlg begin
  AbstractScDeleteContentsDlg* ScAbstractDialogFactory_Impl::CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
  																 USHORT  nCheckDefaults )
-diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
+diff --git sc/source/ui/attrdlg/scdlgfact.hxx sc/source/ui/attrdlg/scdlgfact.hxx
 index 463898c..526a1ec 100644
 --- sc/source/ui/attrdlg/scdlgfact.hxx
 +++ sc/source/ui/attrdlg/scdlgfact.hxx
@@ -221,7 +198,7 @@
  	virtual AbstractScDeleteContentsDlg * CreateScDeleteContentsDlg(Window* pParent,int nId, //add for ScDeleteContentsDlg
  																 USHORT  nCheckDefaults = 0 );
  
-diff --git a/sc/source/ui/inc/datafdlg.hrc b/sc/source/ui/inc/datafdlg.hrc
+diff --git sc/source/ui/inc/datafdlg.hrc sc/source/ui/inc/datafdlg.hrc
 new file mode 100644
 index 0000000..8fa8999
 --- /dev/null
@@ -277,9 +254,9 @@
 +#define FT_DATAFORM_FIXEDTEXT1    2001
 +#define ED_DATAFORM_EDIT1         2002
 \ No newline at end of file
-diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx
+diff --git sc/source/ui/inc/datafdlg.hxx sc/source/ui/inc/datafdlg.hxx
 new file mode 100644
-index 0000000..b1a38c2
+index 0000000..3e6d8e3
 --- /dev/null
 +++ sc/source/ui/inc/datafdlg.hxx
 @@ -0,0 +1,121 @@
@@ -355,60 +332,60 @@
 +{
 +private:
 +
-+	PushButton      aBtnNew;
-+	PushButton      aBtnDelete;
-+	PushButton      aBtnRestore;
-+	PushButton      aBtnLast;
-+	PushButton      aBtnNext;
-+	PushButton      aBtnClose;
-+	ScrollBar       aSlider;
-+	FixedText       aFixedText;
-+	//FixedText       aFixedText1;
-+	//Edit            aEdit1;
-+	
-+	ScTabViewShell*	pTabViewShell;
++    PushButton      aBtnNew;
++    PushButton      aBtnDelete;
++    PushButton      aBtnRestore;
++    PushButton      aBtnLast;
++    PushButton      aBtnNext;
++    PushButton      aBtnClose;
++    ScrollBar       aSlider;
++    FixedText       aFixedText;
++    //FixedText       aFixedText1;
++    //Edit            aEdit1;
++    
++    ScTabViewShell* pTabViewShell;
 +    ScDocument*     pDoc;
-+	sal_uInt16      aColLength;
-+	SCROW           aCurrentRow;
-+	SCCOL           nStartCol;
-+	SCCOL           nEndCol;
-+	SCROW	        nStartRow;
-+	SCROW	        nEndRow;
-+	SCTAB	        nTab;
-+	BOOL            bNoSelection;
-+	
-+	FixedText** pFixedTexts;
++    sal_uInt16      aColLength;
++    SCROW           aCurrentRow;
++    SCCOL           nStartCol;
++    SCCOL           nEndCol;
++    SCROW           nStartRow;
++    SCROW           nEndRow;
++    SCTAB           nTab;
++    BOOL            bNoSelection;
++    
++    FixedText** pFixedTexts;
 +    Edit** pEdits;
 +
 +public:
-+	ScDataFormDlg( Window* pParent, ScTabViewShell*	pTabViewShell);
-+	~ScDataFormDlg();
-+	
-+	void FillCtrls(SCROW nCurrentRow);
++    ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShell);
++    ~ScDataFormDlg();
++    
++    void FillCtrls(SCROW nCurrentRow);
 +private:
 +
-+	void SetButtonState();
++    void SetButtonState();
 +
-+	// Handler:
-+	DECL_LINK( Impl_NewHdl,		PushButton*    );
-+	DECL_LINK( Impl_LastHdl,	PushButton*    );
-+	DECL_LINK( Impl_NextHdl,	PushButton*    );
-+	
-+	DECL_LINK( Impl_RestoreHdl,	PushButton*    );
-+	DECL_LINK( Impl_DeleteHdl,	PushButton*    );
-+	DECL_LINK( Impl_CloseHdl,	PushButton*    );
-+	
-+	DECL_LINK( Impl_ScrollHdl,	ScrollBar*    );
-+	DECL_LINK( Impl_DataModifyHdl,  Edit*    );
++    // Handler:
++    DECL_LINK( Impl_NewHdl,     PushButton*    );
++    DECL_LINK( Impl_LastHdl,    PushButton*    );
++    DECL_LINK( Impl_NextHdl,    PushButton*    );
++    
++    DECL_LINK( Impl_RestoreHdl, PushButton*    );
++    DECL_LINK( Impl_DeleteHdl,  PushButton*    );
++    DECL_LINK( Impl_CloseHdl,   PushButton*    );
++    
++    DECL_LINK( Impl_ScrollHdl,  ScrollBar*    );
++    DECL_LINK( Impl_DataModifyHdl,  Edit*    );
 +};
 +#endif // SC_DATAFDLG_HXX
 +
 +
-diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx
-index d5cfd54..61107ce 100644
+diff --git sc/source/ui/inc/undodat.hxx sc/source/ui/inc/undodat.hxx
+index 3b65ba1..3487442 100644
 --- sc/source/ui/inc/undodat.hxx
 +++ sc/source/ui/inc/undodat.hxx
-@@ -532,7 +532,43 @@ private:
+@@ -530,7 +530,43 @@ private:
  	void				Init();
  };
  
@@ -452,8 +429,8 @@
  
  
  #endif
-diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
-index b5b00be..a88db08 100644
+diff --git sc/source/ui/inc/viewfunc.hxx sc/source/ui/inc/viewfunc.hxx
+index acaea7e..0c1fa9e 100644
 --- sc/source/ui/inc/viewfunc.hxx
 +++ sc/source/ui/inc/viewfunc.hxx
 @@ -328,6 +328,13 @@ public:
@@ -470,9 +447,9 @@
  												// interne Hilfsfunktionen
  protected:
  	void			UpdateLineAttrs( SvxBorderLine&		  rLine,
-diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
+diff --git sc/source/ui/miscdlgs/datafdlg.cxx sc/source/ui/miscdlgs/datafdlg.cxx
 new file mode 100644
-index 0000000..da9214a
+index 0000000..2249c57
 --- /dev/null
 +++ sc/source/ui/miscdlgs/datafdlg.cxx
 @@ -0,0 +1,436 @@
@@ -530,20 +507,20 @@
 +#include <stdio.h>
 +
 +static BYTE nDelItemChecked=0;
-+#define HDL(hdl)			LINK( this, ScDataFormDlg, hdl )
++#define HDL(hdl)            LINK( this, ScDataFormDlg, hdl )
 +
 +//zhangyun
-+ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell*	pTabViewShellOri) :
-+	ModalDialog     ( pParent, ScResId( RID_SCDLG_DATAFORM ) ),
-+	//
-+	aFixedText          ( this, ScResId( LAB_DATAFORM_RECORDNO ) ),
-+	aBtnNew          ( this, ScResId( BTN_DATAFORM_NEW ) ),
-+	aBtnDelete          ( this, ScResId( BTN_DATAFORM_DELETE ) ),
-+	aBtnRestore          ( this, ScResId( BTN_DATAFORM_RESTORE ) ),
-+	aBtnLast          ( this, ScResId( BTN_DATAFORM_LAST ) ),
-+	aBtnNext          ( this, ScResId( BTN_DATAFORM_NEXT ) ),
++ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell*  pTabViewShellOri) :
++    ModalDialog     ( pParent, ScResId( RID_SCDLG_DATAFORM ) ),
++    //
++    aFixedText          ( this, ScResId( LAB_DATAFORM_RECORDNO ) ),
++    aBtnNew          ( this, ScResId( BTN_DATAFORM_NEW ) ),
++    aBtnDelete          ( this, ScResId( BTN_DATAFORM_DELETE ) ),
++    aBtnRestore          ( this, ScResId( BTN_DATAFORM_RESTORE ) ),
++    aBtnLast          ( this, ScResId( BTN_DATAFORM_LAST ) ),
++    aBtnNext          ( this, ScResId( BTN_DATAFORM_NEXT ) ),
 +    aBtnClose          ( this, ScResId( BTN_DATAFORM_CLOSE ) ),
-+    aSlider			( this, ScResId( WND_DATAFORM_SCROLLBAR ) )
++    aSlider         ( this, ScResId( WND_DATAFORM_SCROLLBAR ) )
 +    //aSlider          ( this, ScResId( WND_DATAFORM_SCROLLBAR ) ),
 +    //aFixedText1          ( this, ScResId( FT_DATAFORM_FIXEDTEXT1 ) ),
 +    //aEdit1          ( this, ScResId( ED_DATAFORM_EDIT1 ) )
@@ -552,13 +529,13 @@
 +    FreeResource();
 +    //read header form current document, and add new controls
 +    DBG_ASSERT( pTabViewShell, "pTabViewShell is NULL! :-/" );
-+    ScViewData*	pViewData = pTabViewShell->GetViewData();
++    ScViewData* pViewData = pTabViewShell->GetViewData();
 +    
 +    //int aColLength=20;
 +    //FixedText** pFixedTexts;
 +    //Edit** pEdits;
 +    //pFixedTexts = new FixedText*[aColLength];
-+	//pEdits = new Edit*[aColLength];
++    //pEdits = new Edit*[aColLength];
 +    
 +    pDoc = pViewData->GetDocument();
 +    if (pDoc)
@@ -569,140 +546,140 @@
 +        ScAddress aEnd = aRange.aEnd;
 +        
 +        nStartCol = aStart.Col();
-+		nEndCol = aEnd.Col();
-+		nStartRow	= aStart.Row();
-+		nEndRow	= aEnd.Row();
-+		
-+		nTab = pViewData->GetTabNo();
-+		//if there is no selection
-+		if ((nStartCol == nEndCol) && (nStartRow == nEndRow))
-+		    bNoSelection = TRUE;
-+		
-+		if (bNoSelection)
-+		{
-+		    //find last not blank cell in row
-+		    for (int i=1;i<=MAX_DATAFORM_COLS;i++)
-+		    {
-+		        String	aColName;
-+		        nEndCol++;
-+		        pDoc->GetString( nEndCol, nStartRow, nTab, aColName );
-+		        int nColWidth = pDoc->GetColWidth( nEndCol, nTab );
-+		        if ( aColName.Len() == 0 && nColWidth)
-+		        {
++        nEndCol = aEnd.Col();
++        nStartRow   = aStart.Row();
++        nEndRow = aEnd.Row();
++        
++        nTab = pViewData->GetTabNo();
++        //if there is no selection
++        if ((nStartCol == nEndCol) && (nStartRow == nEndRow))
++            bNoSelection = TRUE;
++        
++        if (bNoSelection)
++        {
++            //find last not blank cell in row
++            for (int i=1;i<=MAX_DATAFORM_COLS;i++)
++            {
++                String  aColName;
++                nEndCol++;
++                pDoc->GetString( nEndCol, nStartRow, nTab, aColName );
++                int nColWidth = pDoc->GetColWidth( nEndCol, nTab );
++                if ( aColName.Len() == 0 && nColWidth)
++                {
 +                    nEndCol--;
 +                    break;
 +                }
-+		    }
-+		    
-+		    //find first not blank cell in row
-+		    for (int i=1;i<=MAX_DATAFORM_COLS;i++)
-+		    {
-+		        String	aColName;
-+		        if (nStartCol <= 0)
-+		            break;
-+		        nStartCol--;
-+
-+		        pDoc->GetString( nStartCol, nStartRow, nTab, aColName );
-+		        int nColWidth = pDoc->GetColWidth( nEndCol, nTab );
-+		        if ( aColName.Len() == 0 && nColWidth)
-+		        {
++            }
++            
++            //find first not blank cell in row
++            for (int i=1;i<=MAX_DATAFORM_COLS;i++)
++            {
++                String  aColName;
++                if (nStartCol <= 0)
++                    break;
++                nStartCol--;
++
++                pDoc->GetString( nStartCol, nStartRow, nTab, aColName );
++                int nColWidth = pDoc->GetColWidth( nEndCol, nTab );
++                if ( aColName.Len() == 0 && nColWidth)
++                {
 +                    nStartCol++;
 +                    break;
 +                }
-+		    }
-+		    
-+		    //skip leading hide column
-+		    for (int i=1;i<=MAX_DATAFORM_COLS;i++)
-+		    {
-+		        String	aColName;
-+		        int nColWidth = pDoc->GetColWidth( nStartCol, nTab );
-+		        if (nColWidth)
-+		            break;
-+		        nStartCol++;
-+		    }
-+
-+		    if (nEndCol < nStartCol)
-+		        nEndCol = nStartCol;
-+		        
-+		    //find last not blank cell in row
-+		    for (int i=1;i<=MAX_DATAFORM_ROWS;i++)
-+		    {
-+		        String	aColName;
-+		        nEndRow++;
-+		        pDoc->GetString( nStartCol, nEndRow, nTab, aColName );
-+		        if ( aColName.Len() == 0 )
-+		        {
++            }
++            
++            //skip leading hide column
++            for (int i=1;i<=MAX_DATAFORM_COLS;i++)
++            {
++                String  aColName;
++                int nColWidth = pDoc->GetColWidth( nStartCol, nTab );
++                if (nColWidth)
++                    break;
++                nStartCol++;
++            }
++
++            if (nEndCol < nStartCol)
++                nEndCol = nStartCol;
++                
++            //find last not blank cell in row
++            for (int i=1;i<=MAX_DATAFORM_ROWS;i++)
++            {
++                String  aColName;
++                nEndRow++;
++                pDoc->GetString( nStartCol, nEndRow, nTab, aColName );
++                if ( aColName.Len() == 0 )
++                {
 +                    nEndRow--;
 +                    break;
 +                }
-+		    }
-+		    
-+		    //find first not blank cell in row
-+		    for (int i=1;i<=MAX_DATAFORM_ROWS;i++)
-+		    {
-+		        String	aColName;
-+		        if (nStartRow <= 0)
-+		            break;
-+		        nStartRow--;
-+
-+		        pDoc->GetString( nStartCol, nStartRow, nTab, aColName );
-+		        if ( aColName.Len() == 0 )
-+		        {
++            }
++            
++            //find first not blank cell in row
++            for (int i=1;i<=MAX_DATAFORM_ROWS;i++)
++            {
++                String  aColName;
++                if (nStartRow <= 0)
++                    break;
++                nStartRow--;
++
++                pDoc->GetString( nStartCol, nStartRow, nTab, aColName );
++                if ( aColName.Len() == 0 )
++                {
 +                    nStartRow++;
 +                    break;
 +                }
-+		    }
++            }
 +
-+		    if (nEndRow < nStartRow)
-+		        nEndRow = nStartRow;
-+		}
-+		
-+		aCurrentRow = nStartRow + 1;
-+		
-+		SCCOL	col;
-+		String	aFieldName;
-+
-+		int nTop = 12;
-+
-+		Size	nFixedSize(FIXED_WIDTH, CTRL_HEIGHT );
-+	    Size	nEditSize(EDIT_WIDTH, CTRL_HEIGHT );
-+		
-+		//pFtArray = new FixedText(this);
-+		aColLength = nEndCol - nStartCol + 1;
-+	    
-+	    //new the controls
-+	    pFixedTexts = new FixedText*[aColLength];
-+	    pEdits = new Edit*[aColLength];
-+	    
-+	    for(sal_uInt16 nIndex = 0; nIndex < aColLength; nIndex++)
-+		{
-+    		pDoc->GetString( nIndex + nStartCol, nStartRow, nTab, aFieldName );
-+    		int nColWidth = pDoc->GetColWidth( nIndex + nStartCol, nTab );
-+    		if (nColWidth)
-+    		{
-+        		pFixedTexts[nIndex] = new FixedText(this);
-+        		pEdits[nIndex] = new Edit(this, WB_BORDER);
++            if (nEndRow < nStartRow)
++                nEndRow = nStartRow;
++        }
++        
++        aCurrentRow = nStartRow + 1;
++        
++        SCCOL   col;
++        String  aFieldName;
++
++        int nTop = 12;
++
++        Size    nFixedSize(FIXED_WIDTH, CTRL_HEIGHT );
++        Size    nEditSize(EDIT_WIDTH, CTRL_HEIGHT );
++        
++        //pFtArray = new FixedText(this);
++        aColLength = nEndCol - nStartCol + 1;
++        
++        //new the controls
++        pFixedTexts = new FixedText*[aColLength];
++        pEdits = new Edit*[aColLength];
++        
++        for(sal_uInt16 nIndex = 0; nIndex < aColLength; nIndex++)
++        {
++            pDoc->GetString( nIndex + nStartCol, nStartRow, nTab, aFieldName );
++            int nColWidth = pDoc->GetColWidth( nIndex + nStartCol, nTab );
++            if (nColWidth)
++            {
++                pFixedTexts[nIndex] = new FixedText(this);
++                pEdits[nIndex] = new Edit(this, WB_BORDER);
++        
++                pFixedTexts[nIndex]->SetSizePixel(nFixedSize);
++                pEdits[nIndex]->SetSizePixel(nEditSize);
++                pFixedTexts[nIndex]->SetPosPixel(Point(FIXED_LEFT, nTop));
++                pEdits[nIndex]->SetPosPixel(Point(EDIT_LEFT, nTop));
++                //pFixedTexts[nIndex]->SetText(String::CreateFromAscii("W4W-Filter Nr. "));
++                pFixedTexts[nIndex]->SetText(aFieldName);
++                pFixedTexts[nIndex]->Show();
++                pEdits[nIndex]->Show();
++                
++                nTop += LINE_HEIGHT;
++            }
++            else
++            {
++                pFixedTexts[nIndex] = NULL;
++                pEdits[nIndex] = NULL;
++            }
++        pEdits[nIndex]->SetModifyHdl( HDL(Impl_DataModifyHdl) );
++        }
 +        
-+        		pFixedTexts[nIndex]->SetSizePixel(nFixedSize);
-+        		pEdits[nIndex]->SetSizePixel(nEditSize);
-+        		pFixedTexts[nIndex]->SetPosPixel(Point(FIXED_LEFT, nTop));
-+        		pEdits[nIndex]->SetPosPixel(Point(EDIT_LEFT, nTop));
-+        		//pFixedTexts[nIndex]->SetText(String::CreateFromAscii("W4W-Filter Nr. "));
-+        		pFixedTexts[nIndex]->SetText(aFieldName);
-+        		pFixedTexts[nIndex]->Show();
-+        		pEdits[nIndex]->Show();
-+        		
-+        		nTop += LINE_HEIGHT;
-+    	    }
-+        	else
-+        	{
-+        	    pFixedTexts[nIndex] = NULL;
-+        		pEdits[nIndex] = NULL;
-+        	}
-+		pEdits[nIndex]->SetModifyHdl( HDL(Impl_DataModifyHdl) );
-+    	}
-+    	
-+    	Size nDialogSize = this->GetSizePixel();
++        Size nDialogSize = this->GetSizePixel();
 +        if (nTop > nDialogSize.Height())
 +        {
 +            nDialogSize.setHeight(nTop);
@@ -721,116 +698,116 @@
 +    aSlider.SetRange( Range( 0, nEndRow - nStartRow + 1) );
 +    aSlider.Show();
 +    
-+    aBtnNew.SetClickHdl 	( HDL(Impl_NewHdl)    );
-+    aBtnLast.SetClickHdl 	( HDL(Impl_LastHdl)    );
-+    aBtnNext.SetClickHdl 	( HDL(Impl_NextHdl)    );
++    aBtnNew.SetClickHdl     ( HDL(Impl_NewHdl)    );
++    aBtnLast.SetClickHdl    ( HDL(Impl_LastHdl)    );
++    aBtnNext.SetClickHdl    ( HDL(Impl_NextHdl)    );
 +    
-+    aBtnRestore.SetClickHdl 	( HDL(Impl_RestoreHdl)    );
-+    aBtnDelete.SetClickHdl 	( HDL(Impl_DeleteHdl)    );
-+    aBtnClose.SetClickHdl 	( HDL(Impl_CloseHdl)    );
++    aBtnRestore.SetClickHdl     ( HDL(Impl_RestoreHdl)    );
++    aBtnDelete.SetClickHdl  ( HDL(Impl_DeleteHdl)    );
++    aBtnClose.SetClickHdl   ( HDL(Impl_CloseHdl)    );
 +    
 +    aSlider.SetEndScrollHdl( HDL( Impl_ScrollHdl ) );
 +
 +    SetButtonState();
 +
 +    //end
-+	//FreeResource();
++    //FreeResource();
 +}
 +
 +__EXPORT ScDataFormDlg::~ScDataFormDlg()
 +{
 +    for(sal_uInt16 i = 0; i < aColLength; i++)
 +    {
-+	    if (pEdits[i])
-+    	    delete pEdits[i];
-+	    if (pFixedTexts[i])
-+    	    delete pFixedTexts[i];
++        if (pEdits[i])
++            delete pEdits[i];
++        if (pFixedTexts[i])
++            delete pFixedTexts[i];
 +    }
 +    if (pEdits)
-+    	delete pEdits;
-+	if (pFixedTexts)
-+    	delete pFixedTexts;
++        delete pEdits;
++    if (pFixedTexts)
++        delete pFixedTexts;
 +}
 +
 +void ScDataFormDlg::FillCtrls(SCROW nCurrentRow)
 +{
-+    //ScViewData*	pViewData = pTabViewShell->GetViewData();
++    //ScViewData*   pViewData = pTabViewShell->GetViewData();
 +    
 +    //pDoc = pViewData->GetDocument();
-+    String	aFieldName;
++    String  aFieldName;
 +    int nRecordNum = nEndRow - nStartRow;
 +    for(sal_uInt16 i = 0; i < aColLength; i++)
 +    {
-+	    if (pEdits[i])
-+	    {
-+    	    if (aCurrentRow<=nEndRow)
-+    	    {
-+    	        pDoc->GetString( i + nStartCol, aCurrentRow, nTab, aFieldName );
-+    	        pEdits[i]->SetText(aFieldName);
-+    	    }
-+    	    else
-+    	        pEdits[i]->SetText(String());
-+	    }
++        if (pEdits[i])
++        {
++            if (aCurrentRow<=nEndRow)
++            {
++                pDoc->GetString( i + nStartCol, aCurrentRow, nTab, aFieldName );
++                pEdits[i]->SetText(aFieldName);
++            }
++            else
++                pEdits[i]->SetText(String());
++        }
 +    }
 +    char sRecordStr[256];
-+	sprintf(sRecordStr, "%i / %i", aCurrentRow-nStartRow, nRecordNum);
++    sprintf(sRecordStr, "%i / %i", aCurrentRow-nStartRow, nRecordNum);
 +    if (aCurrentRow<=nEndRow)
-+	    aFixedText.SetText(String::CreateFromAscii(sRecordStr));
-+	else
-+	    aFixedText.SetText(String::CreateFromAscii("New Record"));
-+	    
-+	aSlider.SetThumbPos(aCurrentRow-nStartRow-1);
++        aFixedText.SetText(String::CreateFromAscii(sRecordStr));
++    else
++        aFixedText.SetText(String::CreateFromAscii("New Record"));
++        
++    aSlider.SetThumbPos(aCurrentRow-nStartRow-1);
 +}
 +
 +IMPL_LINK( ScDataFormDlg, Impl_DataModifyHdl, Edit*, pEdit)
 +{
-+	if ( pEdit->IsModified() )
-+		aBtnRestore.Enable( TRUE );
-+	return 0;
++    if ( pEdit->IsModified() )
++        aBtnRestore.Enable( TRUE );
++    return 0;
 +}
 +
 +IMPL_LINK( ScDataFormDlg, Impl_NewHdl, PushButton*, pBtn)
 +{
-+    ScViewData*	pViewData = pTabViewShell->GetViewData();
++    ScViewData* pViewData = pTabViewShell->GetViewData();
 +    ScDocShell* pDocSh = pViewData->GetDocShell();
 +    if ( pDoc )
 +    {
-+		sal_Bool bHasData = sal_False;
-+		for(sal_uInt16 i = 0; i < aColLength; i++)
-+			if (pEdits[i])
-+				if ( pEdits[i]->GetText().Len() != 0 )
-+				{
-+					bHasData = sal_True;
-+					break;
-+				}
++        sal_Bool bHasData = sal_False;
++        for(sal_uInt16 i = 0; i < aColLength; i++)
++            if (pEdits[i])
++                if ( pEdits[i]->GetText().Len() != 0 )
++                {
++                    bHasData = sal_True;
++                    break;
++                }
 +
-+		if ( bHasData )
-+		{
-+			pTabViewShell->DataFormPutData( aCurrentRow , nStartRow , nStartCol , nEndRow , nEndCol , pEdits , aColLength );
-+			aCurrentRow++;
-+			if (aCurrentRow >= nEndRow + 2)
-+			{
-+		    		nEndRow ++ ;
-+		    		aSlider.SetRange( Range( 0, nEndRow - nStartRow + 1) );
-+			}
-+			SetButtonState();
-+			FillCtrls(aCurrentRow);
-+			pDocSh->SetDocumentModified();
-+			pDocSh->PostPaintGridAll();
-+    		}
-+	}
-+	return 0;
++        if ( bHasData )
++        {
++            pTabViewShell->DataFormPutData( aCurrentRow , nStartRow , nStartCol , nEndRow , nEndCol , pEdits , aColLength );
++            aCurrentRow++;
++            if (aCurrentRow >= nEndRow + 2)
++            {
++                    nEndRow ++ ;
++                    aSlider.SetRange( Range( 0, nEndRow - nStartRow + 1) );
++            }
++            SetButtonState();
++            FillCtrls(aCurrentRow);
++            pDocSh->SetDocumentModified();
++            pDocSh->PostPaintGridAll();
++            }
++    }
++    return 0;
 +}
 +
 +IMPL_LINK( ScDataFormDlg, Impl_LastHdl, PushButton*, pBtn)
 +{   
 +    if (pDoc)
 +    {
-+		if ( aCurrentRow > nStartRow +1 )
-+		    aCurrentRow--;
++        if ( aCurrentRow > nStartRow +1 )
++            aCurrentRow--;
 +
-+		SetButtonState();
-+		FillCtrls(aCurrentRow);
++        SetButtonState();
++        FillCtrls(aCurrentRow);
 +    }
 +    return 0;
 +}
@@ -839,11 +816,11 @@
 +{   
 +    if (pDoc)
 +    {
-+		if ( aCurrentRow <= nEndRow)
-+		    aCurrentRow++;
++        if ( aCurrentRow <= nEndRow)
++            aCurrentRow++;
 +
-+		SetButtonState();
-+		FillCtrls(aCurrentRow);
++        SetButtonState();
++        FillCtrls(aCurrentRow);
 +    }
 +    return 0;
 +}
@@ -852,27 +829,27 @@
 +{   
 +    if (pDoc)
 +    {
-+		FillCtrls(aCurrentRow);
++        FillCtrls(aCurrentRow);
 +    }
 +    return 0;
 +}
 +
 +IMPL_LINK( ScDataFormDlg, Impl_DeleteHdl, PushButton*, pBtn)
 +{   
-+    ScViewData*	pViewData = pTabViewShell->GetViewData();
++    ScViewData* pViewData = pTabViewShell->GetViewData();
 +    ScDocShell* pDocSh = pViewData->GetDocShell();
 +    if (pDoc)
 +    {
-+		ScRange aRange(nStartCol, aCurrentRow, nTab, nEndCol, aCurrentRow, nTab);
-+		pDoc->DeleteRow(aRange);
-+		nEndRow--;
-+		
-+		SetButtonState();
-+		pDocSh->GetUndoManager()->Clear();
-+
-+		FillCtrls(aCurrentRow);
-+		pDocSh->SetDocumentModified();
-+		pDocSh->PostPaintGridAll();
++        ScRange aRange(nStartCol, aCurrentRow, nTab, nEndCol, aCurrentRow, nTab);
++        pDoc->DeleteRow(aRange);
++        nEndRow--;
++        
++        SetButtonState();
++        pDocSh->GetUndoManager()->Clear();
++
++        FillCtrls(aCurrentRow);
++        pDocSh->SetDocumentModified();
++        pDocSh->PostPaintGridAll();
 +    }
 +    return 0;
 +}
@@ -912,7 +889,7 @@
 +    if ( pEdits )
 +        pEdits[0]->GrabFocus();
 +}
-diff --git a/sc/source/ui/miscdlgs/makefile.mk b/sc/source/ui/miscdlgs/makefile.mk
+diff --git sc/source/ui/miscdlgs/makefile.mk sc/source/ui/miscdlgs/makefile.mk
 index 90f3afe..3569ccf 100644
 --- sc/source/ui/miscdlgs/makefile.mk
 +++ sc/source/ui/miscdlgs/makefile.mk
@@ -924,9 +901,9 @@
  	$(SLO)$/delcldlg.obj		\
  	$(SLO)$/inscldlg.obj		\
  	$(SLO)$/delcodlg.obj		\
-diff --git a/sc/source/ui/src/datafdlg.src b/sc/source/ui/src/datafdlg.src
+diff --git sc/source/ui/src/datafdlg.src sc/source/ui/src/datafdlg.src
 new file mode 100644
-index 0000000..18877fa
+index 0000000..535ec66
 --- /dev/null
 +++ sc/source/ui/src/datafdlg.src
 @@ -0,0 +1,108 @@
@@ -970,62 +947,62 @@
 +//zhangyun, dataform
 +ModalDialog RID_SCDLG_DATAFORM
 +{
-+	OutputSize = TRUE ;
-+	SVLook = TRUE ;
++    OutputSize = TRUE ;
++    SVLook = TRUE ;
 +    Size = MAP_APPFONT ( 191 , 180 ) ;
-+	Text [ en-US ] = "Data Form" ;
-+	Moveable = TRUE ;
-+	Closeable = TRUE ;
-+	FixedText LAB_DATAFORM_RECORDNO
-+	{
-+		Pos = MAP_APPFONT ( 136 , 6 ) ;
++    Text [ en-US ] = "Data Form" ;
++    Moveable = TRUE ;
++    Closeable = TRUE ;
++    FixedText LAB_DATAFORM_RECORDNO
++    {
++        Pos = MAP_APPFONT ( 136 , 6 ) ;
 +        Size = MAP_APPFONT ( 50 , 12 ) ;
-+		Text [ en-US ] = "/" ;
-+	};
-+	PushButton BTN_DATAFORM_NEW
-+	{
-+		Pos = MAP_APPFONT ( 135 , 23 ) ;
-+		Size = MAP_APPFONT ( 50 , 14 ) ;
-+		TabStop = TRUE ;
-+		DefButton = TRUE ;
-+		Text [ en-US ] = "New" ;
-+	};
-+	PushButton BTN_DATAFORM_DELETE
-+	{
-+		Pos = MAP_APPFONT ( 135 , 40 ) ;
-+		Size = MAP_APPFONT ( 50 , 14 ) ;
-+		TabStop = TRUE ;
-+		Text [ en-US ] = "Delete" ;
-+	};
-+	PushButton BTN_DATAFORM_RESTORE
-+	{
-+		Pos = MAP_APPFONT ( 135 , 57 ) ;
-+		Size = MAP_APPFONT ( 50 , 14 ) ;
-+		TabStop = TRUE ;
-+		Text [ en-US ] = "Restore" ;
-+	};
-+	PushButton BTN_DATAFORM_LAST
-+	{
-+		Pos = MAP_APPFONT ( 135 , 82 ) ;
-+		Size = MAP_APPFONT ( 50 , 14 ) ;
-+		TabStop = TRUE ;
-+		Text [ en-US ] = "Last Record" ;
-+	};
-+	PushButton BTN_DATAFORM_NEXT
-+	{
-+		Pos = MAP_APPFONT ( 135 , 99 ) ;
-+		Size = MAP_APPFONT ( 50 , 14 ) ;
-+		TabStop = TRUE ;
-+		Text [ en-US ] = "Next Record" ;
-+	};
-+	PushButton BTN_DATAFORM_CLOSE
-+	{
-+		Pos = MAP_APPFONT ( 135 , 116 ) ;
-+		Size = MAP_APPFONT ( 50 , 14 ) ;
-+		TabStop = TRUE ;
-+		Text [ en-US ] = "Close" ;
-+	};
-+	ScrollBar WND_DATAFORM_SCROLLBAR
++        Text [ en-US ] = "/" ;
++    };
++    PushButton BTN_DATAFORM_NEW
++    {
++        Pos = MAP_APPFONT ( 135 , 23 ) ;
++        Size = MAP_APPFONT ( 50 , 14 ) ;
++        TabStop = TRUE ;
++        DefButton = TRUE ;
++        Text [ en-US ] = "New" ;
++    };
++    PushButton BTN_DATAFORM_DELETE
++    {
++        Pos = MAP_APPFONT ( 135 , 40 ) ;
++        Size = MAP_APPFONT ( 50 , 14 ) ;
++        TabStop = TRUE ;
++        Text [ en-US ] = "Delete" ;
++    };
++    PushButton BTN_DATAFORM_RESTORE
++    {
++        Pos = MAP_APPFONT ( 135 , 57 ) ;
++        Size = MAP_APPFONT ( 50 , 14 ) ;
++        TabStop = TRUE ;
++        Text [ en-US ] = "Restore" ;
++    };
++    PushButton BTN_DATAFORM_LAST
++    {
++        Pos = MAP_APPFONT ( 135 , 82 ) ;
++        Size = MAP_APPFONT ( 50 , 14 ) ;
++        TabStop = TRUE ;
++        Text [ en-US ] = "Last Record" ;
++    };
++    PushButton BTN_DATAFORM_NEXT
++    {
++        Pos = MAP_APPFONT ( 135 , 99 ) ;
++        Size = MAP_APPFONT ( 50 , 14 ) ;
++        TabStop = TRUE ;
++        Text [ en-US ] = "Next Record" ;
++    };
++    PushButton BTN_DATAFORM_CLOSE
++    {
++        Pos = MAP_APPFONT ( 135 , 116 ) ;
++        Size = MAP_APPFONT ( 50 , 14 ) ;
++        TabStop = TRUE ;
++        Text [ en-US ] = "Close" ;
++    };
++    ScrollBar WND_DATAFORM_SCROLLBAR
 +    {
 +        Pos = MAP_APPFONT ( 124 , 6 ) ;
 +        Size = MAP_APPFONT ( 8 , 135 ) ;
@@ -1038,7 +1015,7 @@
 +
 +
 +
-diff --git a/sc/source/ui/src/makefile.mk b/sc/source/ui/src/makefile.mk
+diff --git sc/source/ui/src/makefile.mk sc/source/ui/src/makefile.mk
 index af0e906..8f33ac9 100644
 --- sc/source/ui/src/makefile.mk
 +++ sc/source/ui/src/makefile.mk
@@ -1050,8 +1027,8 @@
  	autofmt.src  \
  	solvrdlg.src \
      optsolver.src \
-diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
-index d7529d9..2dad8e7 100644
+diff --git sc/source/ui/undo/undodat.cxx sc/source/ui/undo/undodat.cxx
+index 4ea4a0a..9aea0eb 100644
 --- sc/source/ui/undo/undodat.cxx
 +++ sc/source/ui/undo/undodat.cxx
 @@ -58,6 +58,8 @@
@@ -1063,7 +1040,7 @@
  
  // -----------------------------------------------------------------------
  
-@@ -78,6 +80,7 @@ TYPEINIT1(ScUndoPivot,				SfxUndoAction);
+@@ -78,6 +80,7 @@ TYPEINIT1(ScUndoRepeatDB,			SfxUndoAction);
  TYPEINIT1(ScUndoDataPilot,			SfxUndoAction);
  TYPEINIT1(ScUndoConsolidate,		SfxUndoAction);
  TYPEINIT1(ScUndoChartData,			SfxUndoAction);
@@ -1071,7 +1048,7 @@
  
  // -----------------------------------------------------------------------
  
-@@ -2179,8 +2182,218 @@ BOOL __EXPORT ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+@@ -2182,8 +2185,218 @@ BOOL __EXPORT ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
  	return FALSE;
  }
  
@@ -1290,8 +1267,8 @@
 +        if (pViewShell)
 +                pViewShell->CellContentChanged();
 +}
-diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
-index 7cc4624..dffb73a 100644
+diff --git sc/source/ui/view/cellsh2.cxx sc/source/ui/view/cellsh2.cxx
+index 7dee7cc..231e71e 100644
 --- sc/source/ui/view/cellsh2.cxx
 +++ sc/source/ui/view/cellsh2.cxx
 @@ -265,6 +265,20 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
@@ -1315,7 +1292,7 @@
  		case SID_SUBTOTALS:
  			{
  				const SfxItemSet* pArgs = rReq.GetArgs();
-@@ -593,6 +607,15 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
+@@ -605,6 +619,15 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
  			rReq.Done();
  			break;
  
@@ -1331,7 +1308,7 @@
  		case SID_PIVOT_TABLE:
  			{
  				const SfxPoolItem* pItem;
-diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
+diff --git sc/source/ui/view/viewfun3.cxx sc/source/ui/view/viewfun3.cxx
 index 1cb5400..9c2ef97 100644
 --- sc/source/ui/view/viewfun3.cxx
 +++ sc/source/ui/view/viewfun3.cxx
@@ -1429,8 +1406,8 @@
 +}
  
  
-diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
-index 7d63f85..f29aedd 100644
+diff --git sc/uiconfig/scalc/menubar/menubar.xml sc/uiconfig/scalc/menubar/menubar.xml
+index 938f00b..06dfc6f 100644
 --- sc/uiconfig/scalc/menubar/menubar.xml
 +++ sc/uiconfig/scalc/menubar/menubar.xml
 @@ -391,6 +391,7 @@
@@ -1441,11 +1418,11 @@
  			<menu:menuitem menu:id=".uno:DataSubTotals"/>
  			<menu:menuitem menu:id=".uno:Validation"/>
  			<menu:menuseparator/>
-diff --git a/sc/util/makefile.mk b/sc/util/makefile.mk
-index 38c205e..64e1ead 100644
+diff --git sc/util/makefile.mk sc/util/makefile.mk
+index a051bb8..9d2706a 100644
 --- sc/util/makefile.mk
 +++ sc/util/makefile.mk
-@@ -242,6 +242,7 @@ LIB8OBJFILES = \
+@@ -273,6 +273,7 @@ LIB8OBJFILES = \
  		$(SLO)$/filldlg.obj			\
  		$(SLO)$/delcodlg.obj		\
  		$(SLO)$/delcldlg.obj		\



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]