ooo-build r11569 - in trunk: . patches/src680
- From: kyoshida svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11569 - in trunk: . patches/src680
- Date: Thu, 14 Feb 2008 00:23:02 +0000 (GMT)
Author: kyoshida
Date: Thu Feb 14 00:23:02 2008
New Revision: 11569
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11569&view=rev
Log:
2008-02-13 Kohei Yoshida <kyoshida novell com>
* patches/src680/sc-datapilot-dynamic-range.diff: fixed lots of
breakages as a result of upstream's change in the ScAnyRefDlg base
class. Moved the data source input field into the 'More' part of the
dialog. Fixed a bug where changing the data source removed the page
fields.
Modified:
trunk/ChangeLog
trunk/patches/src680/sc-datapilot-dynamic-range.diff
Modified: trunk/patches/src680/sc-datapilot-dynamic-range.diff
==============================================================================
--- trunk/patches/src680/sc-datapilot-dynamic-range.diff (original)
+++ trunk/patches/src680/sc-datapilot-dynamic-range.diff Thu Feb 14 00:23:02 2008
@@ -1,7 +1,7 @@
-diff -urN --exclude='*.orig' sc.clean/source/ui/dbgui/fieldwnd.cxx sc/source/ui/dbgui/fieldwnd.cxx
---- sc.clean/source/ui/dbgui/fieldwnd.cxx 2007-10-29 12:01:46.000000000 -0400
-+++ sc/source/ui/dbgui/fieldwnd.cxx 2007-10-29 12:18:58.000000000 -0400
-@@ -644,7 +644,7 @@
+diff -urp --exclude=CVS sc.clean/source/ui/dbgui/fieldwnd.cxx sc/source/ui/dbgui/fieldwnd.cxx
+--- sc.clean/source/ui/dbgui/fieldwnd.cxx 2008-02-05 11:16:56.000000000 -0500
++++ sc/source/ui/dbgui/fieldwnd.cxx 2008-02-13 12:26:03.000000000 -0500
+@@ -644,7 +644,7 @@ void ScDPFieldWindow::DelField( size_t n
void ScDPFieldWindow::ClearFields()
{
@@ -10,81 +10,166 @@
{
com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible > xTempAcc = xAccessible;
if (!xTempAcc.is() && pAccessible)
-diff -urN --exclude='*.orig' sc.clean/source/ui/dbgui/pivot.hrc sc/source/ui/dbgui/pivot.hrc
---- sc.clean/source/ui/dbgui/pivot.hrc 2007-10-29 12:01:46.000000000 -0400
-+++ sc/source/ui/dbgui/pivot.hrc 2007-10-29 12:02:15.000000000 -0400
-@@ -82,4 +82,6 @@
- #define PIVOTSTR_DEV2 9
- #define PIVOTSTR_VAR 10
- #define PIVOTSTR_VAR2 11
--
-+#define FT_INAREA 40
-+#define RB_INAREA 41
-+#define ED_INAREA 42
-diff -urN --exclude='*.orig' sc.clean/source/ui/dbgui/pivot.src sc/source/ui/dbgui/pivot.src
---- sc.clean/source/ui/dbgui/pivot.src 2007-10-29 12:01:46.000000000 -0400
-+++ sc/source/ui/dbgui/pivot.src 2007-10-29 12:02:15.000000000 -0400
-@@ -39,7 +39,7 @@
- {
- OutputSize = TRUE ;
- HelpId = SID_OPENDLG_PIVOTTABLE ;
-- Size = MAP_APPFONT ( 336 , 190 ) ;
-+ Size = MAP_APPFONT ( 336 , 200 ) ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Moveable = TRUE ;
-@@ -124,6 +124,47 @@
- Size = MAP_APPFONT ( 268 , 8 ) ;
- Text [ en-US ] = "Layout";
+diff -urp --exclude=CVS sc.clean/source/ui/dbgui/pivot.hrc sc/source/ui/dbgui/pivot.hrc
+--- sc.clean/source/ui/dbgui/pivot.hrc 2008-02-05 11:16:56.000000000 -0500
++++ sc/source/ui/dbgui/pivot.hrc 2008-02-13 17:26:28.000000000 -0500
+@@ -71,6 +71,10 @@
+ #define BTN_FILTER 29
+ #define BTN_DRILLDOWN 30
+
++#define FT_INAREA 40
++#define RB_INAREA 41
++#define ED_INAREA 42
++
+ #define PIVOTSTR_SUM 1
+ #define PIVOTSTR_COUNT 2
+ #define PIVOTSTR_AVG 3
+diff -urp --exclude=CVS sc.clean/source/ui/dbgui/pivot.src sc/source/ui/dbgui/pivot.src
+--- sc.clean/source/ui/dbgui/pivot.src 2008-02-05 11:16:56.000000000 -0500
++++ sc/source/ui/dbgui/pivot.src 2008-02-13 17:29:26.000000000 -0500
+@@ -183,9 +183,50 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
+ Text [ en-US ] = "Result" ;
+ Hide = TRUE ;
};
+
-+ FixedText FT_INAREA
-+ {
-+ Pos = MAP_APPFONT ( 6 , 180 ) ;
++ FixedText FT_INAREA
++ {
++ Pos = MAP_APPFONT ( 12 , 203 ) ;
+ Size = MAP_APPFONT ( 59 , 8 ) ;
-+ Hide = FALSE ;
-+ Text [ en-US ] = "Selection from" ;
-+ Text[ de ] = "Auswahl aus";
-+ Text[ es ] = "SelecciÃn de";
-+ Text[ fr ] = "SÃlection à partir de";
-+ Text[ it ] = "Seleziona da";
-+ Text[ ja ] = "éæå";
-+ Text[ pt-BR ] = "SeleÃÃo de ";
-+ Text[ zh-CN ] = "éæèå";
-+ Text[ zh-TW ] = "ééäæ";
-+ };
-+
-+ Edit ED_INAREA
-+ {
-+ Border = TRUE ;
-+ Pos = MAP_APPFONT ( 65 , 180 ) ;
++ Hide = TRUE ;
++ Text [ en-US ] = "Selection from" ;
++ Text[ de ] = "Auswahl aus";
++ Text[ es ] = "SelecciÃn de";
++ Text[ fr ] = "SÃlection à partir de";
++ Text[ it ] = "Seleziona da";
++ Text[ ja ] = "éæå";
++ Text[ pt-BR ] = "SeleÃÃo de ";
++ Text[ zh-CN ] = "éæèå";
++ Text[ zh-TW ] = "ééäæ";
++ };
++ Edit ED_INAREA
++ {
++ Border = TRUE ;
++ Pos = MAP_APPFONT ( 73 , 201 ) ;
+ Size = MAP_APPFONT ( 100 , 12 ) ;
-+ TabStop = TRUE ;
-+ Hide = FALSE ;
-+ };
-+ ImageButton RB_INAREA
-+ {
-+ Pos = MAP_APPFONT ( 172 , 180 ) ;
-+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ TabStop = TRUE ;
-+ Hide = FALSE ;
-+ QuickHelpText [ de ] = "Verkleinern" ;
-+ QuickHelpText [ en-US ] = "Shrink" ;
-+ QuickHelpText[ es ] = "Reducir";
-+ QuickHelpText[ fr ] = "Comprimer";
-+ QuickHelpText[ it ] = "Comprimi";
-+ QuickHelpText[ ja ] = "çå";
-+ QuickHelpText[ pt-BR ] = "Diminuir";
-+ QuickHelpText[ zh-CN ] = "æç";
-+ QuickHelpText[ zh-TW ] = "çå";
-+ };
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 280 , 6 ) ;
-diff -urN --exclude='*.orig' sc.clean/source/ui/dbgui/pvlaydlg.cxx sc/source/ui/dbgui/pvlaydlg.cxx
---- sc.clean/source/ui/dbgui/pvlaydlg.cxx 2007-10-29 12:01:46.000000000 -0400
-+++ sc/source/ui/dbgui/pvlaydlg.cxx 2007-10-29 12:18:58.000000000 -0400
-@@ -41,6 +41,7 @@
++ Hide = TRUE ;
++ };
++ ImageButton RB_INAREA
++ {
++ Pos = MAP_APPFONT ( 177 , 200 ) ;
++ Size = MAP_APPFONT ( 13 , 15 ) ;
++ TabStop = TRUE ;
++ Hide = TRUE ;
++ QuickHelpText [ de ] = "Verkleinern" ;
++ QuickHelpText [ en-US ] = "Shrink" ;
++ QuickHelpText[ es ] = "Reducir";
++ QuickHelpText[ fr ] = "Comprimer";
++ QuickHelpText[ it ] = "Comprimi";
++ QuickHelpText[ ja ] = "çå";
++ QuickHelpText[ pt-BR ] = "Diminuir";
++ QuickHelpText[ zh-CN ] = "æç";
++ QuickHelpText[ zh-TW ] = "çå";
++ };
++
+ FixedText FT_OUTAREA
+ {
+- Pos = MAP_APPFONT ( 12 , 203 ) ;
++ Pos = MAP_APPFONT ( 12 , 221 ) ;
+ Size = MAP_APPFONT ( 59 , 8 ) ;
+ Hide = TRUE ;
+ Text [ en-US ] = "Results to" ;
+@@ -193,7 +234,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
+ ListBox LB_OUTAREA
+ {
+ Border = TRUE ;
+- Pos = MAP_APPFONT ( 73 , 201 ) ;
++ Pos = MAP_APPFONT ( 73 , 219 ) ;
+ Size = MAP_APPFONT ( 75 , 90 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+@@ -202,14 +243,14 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
+ Edit ED_OUTAREA
+ {
+ Border = TRUE ;
+- Pos = MAP_APPFONT ( 152 , 201 ) ;
++ Pos = MAP_APPFONT ( 152 , 219 ) ;
+ Size = MAP_APPFONT ( 100 , 12 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+ };
+ ImageButton RB_OUTAREA
+ {
+- Pos = MAP_APPFONT ( 256 , 200 ) ;
++ Pos = MAP_APPFONT ( 256 , 218 ) ;
+ Size = MAP_APPFONT ( 13 , 15 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+@@ -217,7 +258,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
+ };
+ CheckBox BTN_IGNEMPTYROWS
+ {
+- Pos = MAP_APPFONT ( 12 , 219 ) ;
++ Pos = MAP_APPFONT ( 12 , 237 ) ;
+ Size = MAP_APPFONT ( 124 , 10 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+@@ -225,7 +266,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
+ };
+ CheckBox BTN_DETECTCAT
+ {
+- Pos = MAP_APPFONT ( 142 , 219 ) ;
++ Pos = MAP_APPFONT ( 142 , 237 ) ;
+ Size = MAP_APPFONT ( 124 , 10 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+@@ -233,7 +274,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
+ };
+ CheckBox BTN_TOTALCOL
+ {
+- Pos = MAP_APPFONT ( 12 , 233 ) ;
++ Pos = MAP_APPFONT ( 12 , 251 ) ;
+ Size = MAP_APPFONT ( 124 , 10 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+@@ -241,7 +282,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
+ };
+ CheckBox BTN_TOTALROW
+ {
+- Pos = MAP_APPFONT ( 142 , 233 ) ;
++ Pos = MAP_APPFONT ( 142 , 251 ) ;
+ Size = MAP_APPFONT ( 124 , 10 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+@@ -249,7 +290,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
+ };
+ CheckBox BTN_FILTER
+ {
+- Pos = MAP_APPFONT ( 12 , 247 ) ;
++ Pos = MAP_APPFONT ( 12 , 265 ) ;
+ Size = MAP_APPFONT ( 124 , 10 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+@@ -257,7 +298,7 @@ ModelessDialog RID_SCDLG_PIVOT_LAYOUT
+ };
+ CheckBox BTN_DRILLDOWN
+ {
+- Pos = MAP_APPFONT ( 142 , 247 ) ;
++ Pos = MAP_APPFONT ( 142 , 265 ) ;
+ Size = MAP_APPFONT ( 124 , 10 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+Only in sc/source/ui/dbgui: pivot.src~
+diff -urp --exclude=CVS sc.clean/source/ui/dbgui/pvlaydlg.cxx sc/source/ui/dbgui/pvlaydlg.cxx
+--- sc.clean/source/ui/dbgui/pvlaydlg.cxx 2008-02-05 11:16:56.000000000 -0500
++++ sc/source/ui/dbgui/pvlaydlg.cxx 2008-02-13 18:15:29.000000000 -0500
+@@ -36,11 +36,12 @@
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_sc.hxx"
+
+-
++#include <stdio.h>
+
//----------------------------------------------------------------------------
#include "pvlaydlg.hxx"
@@ -92,7 +177,7 @@
#include <sfx2/dispatch.hxx>
#include <vcl/msgbox.hxx>
-@@ -60,6 +61,7 @@
+@@ -61,6 +62,7 @@
#include "pivot.hrc"
#include "dpobject.hxx"
#include "dpsave.hxx"
@@ -100,7 +185,7 @@
#include "scmod.hxx"
#include "sc.hrc" //CHINA001
-@@ -128,6 +130,9 @@
+@@ -129,6 +131,9 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBinding
aFtOutArea ( this, ScResId( FT_OUTAREA ) ),
aEdOutPos ( this, ScResId( ED_OUTAREA ) ),
aRbOutPos ( this, ScResId( RB_OUTAREA ), &aEdOutPos ),
@@ -110,250 +195,308 @@
aBtnIgnEmptyRows( this, ScResId( BTN_IGNEMPTYROWS ) ),
aBtnDetectCat ( this, ScResId( BTN_DETECTCAT ) ),
aBtnTotalCol ( this, ScResId( BTN_TOTALCOL ) ),
-@@ -155,7 +160,7 @@
- GetViewData() ),
- pDoc ( ((ScTabViewShell*)SfxViewShell::Current())->
- GetViewData()->GetDocument() ),
-- bRefInputMode ( FALSE )
-+ bRefInputMode ( TRUE )
- {
- xDlgDPObject->SetAlive( TRUE ); // needed to get structure information
- xDlgDPObject->FillOldParam( thePivotData, FALSE );
-@@ -242,6 +247,24 @@
+@@ -148,6 +153,8 @@ ScDPLayoutDlg::ScDPLayoutDlg( SfxBinding
+
+ bIsDrag ( FALSE ),
+
++ pEditActive ( NULL ),
++
+ eLastActiveType ( TYPE_SELECT ),
+ nOffset ( 0 ),
+ //
+@@ -209,6 +216,9 @@ void __EXPORT ScDPLayoutDlg::Init()
+ for ( USHORT i = 0; i < FUNC_COUNT; ++i )
+ aFuncNameArr.push_back( String( ScResId( i + 1 ) ) );
+
++ aBtnMore.AddWindow( &aFtInArea );
++ aBtnMore.AddWindow( &aEdInPos );
++ aBtnMore.AddWindow( &aRbInPos );
+ aBtnMore.AddWindow( &aFtOutArea );
+ aBtnMore.AddWindow( &aLbOutPos );
+ aBtnMore.AddWindow( &aEdOutPos );
+@@ -221,6 +231,7 @@ void __EXPORT ScDPLayoutDlg::Init()
+ aBtnMore.AddWindow( &aBtnDrillDown );
+ aBtnMore.AddWindow( &aFlAreas );
+ aBtnMore.SetClickHdl( LINK( this, ScDPLayoutDlg, MoreClickHdl ) );
++ aBtnMore.SetDelta(90);
+
+ {
+ Size aFieldSize( Window( this, ScResId( WND_FIELD ) ).GetSizePixel() );
+@@ -243,6 +254,23 @@ void __EXPORT ScDPLayoutDlg::Init()
InitWnd( thePivotData.aRowArr, static_cast<long>(thePivotData.nRowCount), TYPE_ROW );
InitWnd( thePivotData.aDataArr, static_cast<long>(thePivotData.nDataCount), TYPE_DATA );
-+ ScRange inRange;
-+ String inString;
-+ if (xDlgDPObject->GetSheetDesc())
-+ {
-+ aEdInPos.Enable();
-+ aRbInPos.Enable();
-+ inRange = xDlgDPObject->GetSheetDesc()->aSourceRange;
-+ inRange.Format( inString, STD_FORMAT, pDoc);
-+ aEdInPos.SetText(inString);
-+ }
-+ else
-+ {
-+ /* Data is not reachable, so could be a remote database */
-+ aEdInPos.Disable();
-+ aRbInPos.Disable();
-+
-+ }
++ ScRange inRange;
++ String inString;
++ if (xDlgDPObject->GetSheetDesc())
++ {
++ aEdInPos.Enable();
++ aRbInPos.Enable();
++ inRange = xDlgDPObject->GetSheetDesc()->aSourceRange;
++ inRange.Format( inString, STD_FORMAT, pDoc);
++ aEdInPos.SetText(inString);
++ }
++ else
++ {
++ /* Data is not reachable, so could be a remote database */
++ aEdInPos.Disable();
++ aRbInPos.Disable();
++ }
+
aSlider.SetPageSize( PAGE_SIZE );
aSlider.SetVisibleSize( PAGE_SIZE );
aSlider.SetLineSize( LINE_SIZE );
-@@ -259,6 +282,7 @@
+@@ -260,8 +288,14 @@ void __EXPORT ScDPLayoutDlg::Init()
aLbOutPos .SetSelectHdl( LINK( this, ScDPLayoutDlg, SelAreaHdl ) );
aEdOutPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdModifyHdl ) );
+ aEdInPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdInModifyHdl ) );
aBtnOk .SetClickHdl ( LINK( this, ScDPLayoutDlg, OkHdl ) );
aBtnCancel.SetClickHdl ( LINK( this, ScDPLayoutDlg, CancelHdl ) );
++ Link aLink = LINK( this, ScDPLayoutDlg, GetFocusHdl );
++ if ( aEdInPos.IsEnabled() )
++ // Once disabled it will never get enabled, so no need to handle focus.
++ aEdInPos.SetGetFocusHdl( aLink );
++ aEdOutPos.SetGetFocusHdl( aLink );
-@@ -1318,17 +1342,34 @@
+ if ( pViewData && pDoc )
+ {
+@@ -1319,18 +1353,24 @@ BOOL ScDPLayoutDlg::GetPivotArrays( P
void ScDPLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
{
-+ ScRefEdit *tmpREd;
-+ ScRefButton *tmpRBtn;
-+
- if ( bRefInputMode )
- {
-+ tmpRBtn = GetRefButton();
-+ tmpREd = tmpRBtn->GetReferencesEdit();
- if ( rRef.aStart != rRef.aEnd )
+- if ( bRefInputMode )
+- {
+- if ( rRef.aStart != rRef.aEnd )
- RefInputStart( &aEdOutPos );
-+ RefInputStart( tmpREd, tmpRBtn);
-+
- /*
- ScAddress aAdr( nStartCol, nStartRow, nStartTab );
- aAdr.PutInOrder( ScAddress( nEndCol, nEndRow, nEndTab ) );
- */
-+
- String aRefStr;
+-/*
+- ScAddress aAdr( nStartCol, nStartRow, nStartTab );
+- aAdr.PutInOrder( ScAddress( nEndCol, nEndRow, nEndTab ) );
+-*/
+- String aRefStr;
- rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP );
- aEdOutPos.SetRefString( aRefStr );
-+
-+ if ( tmpREd== &aEdInPos)
-+ {
-+ USHORT nFmt = SCR_ABS_3D; //!!! nCurTab fehlt noch
-+ if ( rRef.aStart.Tab() != rRef.aEnd.Tab() )
-+ nFmt |= SCA_TAB2_3D;
-+ rRef.Format( aRefStr, nFmt, pDocP );
-+ }
-+ else
-+ rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP );
-+
-+ tmpREd->SetRefString( aRefStr );
- }
+- }
++ if ( !bRefInputMode || !pEditActive )
++ return;
++
++ if ( rRef.aStart != rRef.aEnd )
++ RefInputStart( pEditActive );
++
++ if ( pEditActive == &aEdInPos )
++ {
++ String aRefStr;
++ rRef.Format( aRefStr, STD_FORMAT, pDocP, pDocP->GetAddressConvention() );
++ pEditActive->SetRefString( aRefStr );
++ }
++ else if ( pEditActive == &aEdOutPos )
++ {
++ String aRefStr;
++ rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP, pDocP->GetAddressConvention() );
++ pEditActive->SetRefString( aRefStr );
++ }
}
-@@ -1516,7 +1557,7 @@
+
+@@ -1340,8 +1380,13 @@ void ScDPLayoutDlg::SetActive()
+ {
+ if ( bRefInputMode )
+ {
+- aEdOutPos.GrabFocus();
+- EdModifyHdl( NULL );
++ if ( pEditActive )
++ pEditActive->GrabFocus();
++
++ if ( pEditActive == &aEdInPos )
++ EdInModifyHdl( NULL );
++ else if ( pEditActive == &aEdOutPos )
++ EdModifyHdl( NULL );
}
else
{
-- bRefInputMode = FALSE;
-+
+@@ -1489,7 +1534,8 @@ IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButto
+ ErrorBox( this, WinBits( WB_OK | WB_DEF_OK ),
+ ScGlobal::GetRscString( STR_INVALID_TABREF )
+ ).Execute();
+- aEdOutPos.GrabFocus();
++ if ( pEditActive )
++ pEditActive->GrabFocus();
+ }
+ return 0;
+ }
+@@ -1514,9 +1560,18 @@ IMPL_LINK( ScDPLayoutDlg, MoreClickHdl,
+ bRefInputMode = TRUE;
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
- //SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg
+ //SFX_APPWINDOW->Enable();
+- aEdOutPos.Enable();
+- aEdOutPos.GrabFocus();
+- aRbOutPos.Enable();
++ if ( aEdInPos.IsEnabled() )
++ {
++ aEdInPos.Enable();
++ aEdInPos.GrabFocus();
++ aEdInPos.Enable();
++ }
++ else
++ {
++ aEdOutPos.Enable();
++ aEdOutPos.GrabFocus();
++ aEdOutPos.Enable();
++ }
}
-@@ -1553,6 +1594,99 @@
+ else
+ {
+@@ -1557,6 +1612,99 @@ IMPL_LINK( ScDPLayoutDlg, EdModifyHdl, E
}
+IMPL_LINK( ScDPLayoutDlg, EdInModifyHdl, Edit *, EMPTYARG )
+{
++ String theCurPosStr = aEdInPos.GetText();
+
-+ String theCurPosStr = aEdInPos.GetText();
-+ ScSheetSourceDesc inSheet = *(xDlgDPObject->GetSheetDesc());
-+ ScRange aR = xDlgDPObject->GetSheetDesc()->aSourceRange;
-+ ScRefAddress start, end;
-+ ConvertDoubleRef (pDoc, theCurPosStr, 1, start, end );
-+ inSheet.aSourceRange = ScRange(start.GetAddress(), end.GetAddress());
-+ xDlgDPObject->SetSheetDesc( inSheet);
-+ xDlgDPObject->InvalidateSource();
-+ xDlgDPObject->Output();
-+ xDlgDPObject->SetAlive( TRUE ); // needed to get structure information
-+ xDlgDPObject->FillOldParam( thePivotData, FALSE );
-+ xDlgDPObject->FillLabelData( thePivotData );
-+
-+ ScTabViewShell * pTabViewShell = pViewData->GetViewShell();
-+ ScDPObject tmpDPObject(*xDlgDPObject);
-+ pTabViewShell->SetDialogDPObject(&tmpDPObject);
-+
-+ aR = xDlgDPObject->GetSheetDesc()->aSourceRange;
-+
-+ aLabelDataArr.clear();
-+ aWndSelect.ClearFields();
-+ aWndData.ClearFields();
-+ aWndRow.ClearFields();
-+ aWndCol.ClearFields();
-+ aWndPage.ClearFields();
-+
-+ USHORT i;
-+ for ( i=0; i<MAX_LABELS; i++ )
-+ aSelectArr[i].reset();
-+
-+ for ( i=0; i<MAX_FIELDS; i++ )
-+ {
-+ RemoveField (TYPE_COL, i);
-+ RemoveField (TYPE_ROW, i);
-+ RemoveField (TYPE_DATA, i);
-+ }
-+ for ( i=0; i<MAX_PAGEFIELDS; i++ )
-+ RemoveField (TYPE_PAGE, i);
-+
-+
-+
-+ InitWndSelect( thePivotData.ppLabelArr, thePivotData.nLabels );
-+ InitWnd( thePivotData.aColArr, thePivotData.nColCount, TYPE_COL );
-+ InitWnd( thePivotData.aRowArr, thePivotData.nRowCount, TYPE_ROW );
-+ InitWnd( thePivotData.aDataArr, thePivotData.nDataCount, TYPE_DATA );
-+ aSlider.SetPageSize( PAGE_SIZE );
-+ aSlider.SetVisibleSize( PAGE_SIZE );
-+ aSlider.SetLineSize( LINE_SIZE );
-+ aSlider.SetRange( Range( 0, ((thePivotData.nLabels+LINE_SIZE-1)/LINE_SIZE)*LINE_SIZE ) );
++ ScSheetSourceDesc inSheet = *(xDlgDPObject->GetSheetDesc());
++ ScRange aR = xDlgDPObject->GetSheetDesc()->aSourceRange;
++ ScRefAddress start, end;
++ ConvertDoubleRef (pDoc, theCurPosStr, 1, start, end );
++ inSheet.aSourceRange = ScRange(start.GetAddress(), end.GetAddress());
++ xDlgDPObject->SetSheetDesc( inSheet);
++ xDlgDPObject->InvalidateSource();
++ xDlgDPObject->Output();
++ xDlgDPObject->SetAlive( TRUE ); // needed to get structure information
++ xDlgDPObject->FillOldParam( thePivotData, FALSE );
++ xDlgDPObject->FillLabelData( thePivotData );
++
++ ScTabViewShell * pTabViewShell = pViewData->GetViewShell();
++ ScDPObject tmpDPObject(*xDlgDPObject);
++ pTabViewShell->SetDialogDPObject(&tmpDPObject);
++
++ aR = xDlgDPObject->GetSheetDesc()->aSourceRange;
++
++ aLabelDataArr.clear();
++ aWndSelect.ClearFields();
++ aWndData.ClearFields();
++ aWndRow.ClearFields();
++ aWndCol.ClearFields();
++ aWndPage.ClearFields();
++
++ USHORT i;
++ for ( i=0; i<MAX_LABELS; i++ )
++ aSelectArr[i].reset();
++
++ for ( i=0; i<MAX_FIELDS; i++ )
++ {
++ RemoveField (TYPE_COL, i);
++ RemoveField (TYPE_ROW, i);
++ RemoveField (TYPE_DATA, i);
++ }
++ for ( i=0; i<MAX_PAGEFIELDS; i++ )
++ RemoveField (TYPE_PAGE, i);
++
++ InitWndSelect( thePivotData.ppLabelArr, thePivotData.nLabels );
++ InitWnd( thePivotData.aColArr, thePivotData.nColCount, TYPE_COL );
++ InitWnd( thePivotData.aRowArr, thePivotData.nRowCount, TYPE_ROW );
++ InitWnd( thePivotData.aDataArr, thePivotData.nDataCount, TYPE_DATA );
++ InitWnd( thePivotData.aPageArr, thePivotData.nPageCount, TYPE_PAGE );
++ aSlider.SetPageSize( PAGE_SIZE );
++ aSlider.SetVisibleSize( PAGE_SIZE );
++ aSlider.SetLineSize( LINE_SIZE );
++ aSlider.SetRange( Range( 0, ((thePivotData.nLabels+LINE_SIZE-1)/LINE_SIZE)*LINE_SIZE ) );
+
-+ if ( thePivotData.nLabels > PAGE_SIZE )
-+ {
++ if ( thePivotData.nLabels > PAGE_SIZE )
++ {
+ aSlider.SetEndScrollHdl( LINK( this, ScDPLayoutDlg, ScrollHdl ) );
-+ aSlider.Show();
-+ }
-+ else
-+ aSlider.Hide();
-+
-+ if ( pViewData && pDoc )
-+ {
-+ /*
-+ * Aus den RangeNames des Dokumentes werden nun die
-+ * in einem Zeiger-Array gemerkt, bei denen es sich
-+ * um sinnvolle Bereiche handelt
-+ */
-+
-+ aLbOutPos.Clear();
-+ aLbOutPos.InsertEntry( aStrUndefined, 0 );
-+ aLbOutPos.InsertEntry( aStrNewTable, 1 );
-+
-+ ScAreaNameIterator aIter( pDoc );
-+ String aName;
-+ ScRange aRange;
-+ String aRefStr;
-+ while ( aIter.Next( aName, aRange ) )
-+ {
-+ if ( !aIter.WasDBName() ) // hier keine DB-Bereiche !
-+ {
-+ USHORT nInsert = aLbOutPos.InsertEntry( aName );
-+
-+ aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc );
-+ aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) );
-+ }
-+ }
-+ }
++ aSlider.Show();
++ }
++ else
++ aSlider.Hide();
++
++ if ( pViewData && pDoc )
++ {
++ /*
++ * Aus den RangeNames des Dokumentes werden nun die
++ * in einem Zeiger-Array gemerkt, bei denen es sich
++ * um sinnvolle Bereiche handelt
++ */
++
++ aLbOutPos.Clear();
++ aLbOutPos.InsertEntry( aStrUndefined, 0 );
++ aLbOutPos.InsertEntry( aStrNewTable, 1 );
++
++ ScAreaNameIterator aIter( pDoc );
++ String aName;
++ ScRange aRange;
++ String aRefStr;
++ while ( aIter.Next( aName, aRange ) )
++ {
++ if ( !aIter.WasDBName() ) // hier keine DB-Bereiche !
++ {
++ USHORT nInsert = aLbOutPos.InsertEntry( aName );
++
++ aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc );
++ aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) );
++ }
++ }
++ }
+
-+ return 0;
++ aEdInPos.GrabFocus();
++ return 0;
+}
+
+
//----------------------------------------------------------------------------
IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG )
-diff -urN --exclude='*.orig' sc.clean/source/ui/inc/anyrefdg.hxx sc/source/ui/inc/anyrefdg.hxx
---- sc.clean/source/ui/inc/anyrefdg.hxx 2007-10-29 12:01:46.000000000 -0400
-+++ sc/source/ui/inc/anyrefdg.hxx 2007-10-29 12:02:15.000000000 -0400
-@@ -115,7 +115,7 @@
- ScRefButton( Window* pParent, const ResId& rResId );
+@@ -1610,4 +1758,16 @@ IMPL_LINK( ScDPLayoutDlg, ScrollHdl, Scr
+ return 0;
+ }
- void SetReferences( ScAnyRefDlg* pDlg, ScRefEdit* pEdit );
--
-+ ScRefEdit* GetReferencesEdit ();
- void SetStartImage();
- void SetEndImage();
- inline void DoRef() { Click(); }
-@@ -169,6 +169,7 @@
- ScAnyRefDlg( SfxBindings* pB, SfxChildWindow* pCW,
- Window* pParent, USHORT nResId);
- virtual ~ScAnyRefDlg();
-+ ScRefButton* GetRefButton() { return pRefBtn; }
-
- virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0;
- virtual void AddRefEntry();
-diff -urN --exclude='*.orig' sc.clean/source/ui/inc/pvlaydlg.hxx sc/source/ui/inc/pvlaydlg.hxx
---- sc.clean/source/ui/inc/pvlaydlg.hxx 2007-10-29 12:01:46.000000000 -0400
-+++ sc/source/ui/inc/pvlaydlg.hxx 2007-10-29 12:02:15.000000000 -0400
-@@ -145,8 +145,11 @@
- FixedLine aFlAreas;
- ListBox aLbOutPos;
++//----------------------------------------------------------------------------
++
++IMPL_LINK( ScDPLayoutDlg, GetFocusHdl, Control*, pCtrl )
++{
++ pEditActive = NULL;
++ if ( pCtrl == &aEdInPos )
++ pEditActive = &aEdInPos;
++ else if ( pCtrl == &aEdOutPos )
++ pEditActive = &aEdOutPos;
++
++ return 0;
++}
+
+Only in sc/source/ui/dbgui: pvlaydlg.cxx.orig
+diff -urp --exclude=CVS sc.clean/source/ui/inc/pvlaydlg.hxx sc/source/ui/inc/pvlaydlg.hxx
+--- sc.clean/source/ui/inc/pvlaydlg.hxx 2008-02-05 11:16:55.000000000 -0500
++++ sc/source/ui/inc/pvlaydlg.hxx 2008-02-13 16:32:46.000000000 -0500
+@@ -147,6 +147,12 @@ private:
FixedText aFtOutArea;
-+ FixedText aFtInArea;
ScRefEdit aEdOutPos;
ScRefButton aRbOutPos;
++
++ // For DP source selection
++ FixedText aFtInArea;
+ ScRefEdit aEdInPos;
+ ScRefButton aRbInPos;
++
CheckBox aBtnIgnEmptyRows;
CheckBox aBtnDetectCat;
CheckBox aBtnTotalCol;
-@@ -227,6 +230,7 @@
+@@ -169,6 +175,8 @@ private:
+ size_t nDnDFromIndex;
+ BOOL bIsDrag;
+
++ ScRefEdit* pEditActive;
++
+ Rectangle aRectPage;
+ Rectangle aRectRow;
+ Rectangle aRectCol;
+@@ -227,8 +235,10 @@ private:
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* );
};
-diff -urN --exclude='*.orig' sc.clean/source/ui/miscdlgs/anyrefdg.cxx sc/source/ui/miscdlgs/anyrefdg.cxx
---- sc.clean/source/ui/miscdlgs/anyrefdg.cxx 2007-10-29 12:01:47.000000000 -0400
-+++ sc/source/ui/miscdlgs/anyrefdg.cxx 2007-10-29 12:02:15.000000000 -0400
-@@ -290,6 +290,11 @@
- pRefEdit = pEdit;
- }
-+ScRefEdit* ScRefButton::GetReferencesEdit ()
-+{
-+ return pRefEdit;
-+}
-+
- //----------------------------------------------------------------------------
- void ScRefButton::Click()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]