View | Details | Raw Unified | Return to issue 23658
Collapse All | Expand All

(-)sc.clean/source/ui/dbgui/fieldwnd.cxx (-1 / +1 lines)
Lines 644-650 void ScDPFieldWindow::DelField( size_t n Link Here
644
644
645
void ScDPFieldWindow::ClearFields()
645
void ScDPFieldWindow::ClearFields()
646
{
646
{
647
    if( eType == TYPE_SELECT )
647
    if( eType == TYPE_SELECT || eType == TYPE_PAGE || eType == TYPE_COL || eType == TYPE_ROW || eType == TYPE_DATA)
648
	{
648
	{
649
        com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible > xTempAcc = xAccessible;
649
        com::sun::star::uno::Reference < com::sun::star::accessibility::XAccessible > xTempAcc = xAccessible;
650
        if (!xTempAcc.is() && pAccessible)
650
        if (!xTempAcc.is() && pAccessible)
(-)sc.clean/source/ui/dbgui/pivot.hrc (+4 lines)
Lines 71-76 Link Here
71
#define BTN_FILTER              29
71
#define BTN_FILTER              29
72
#define BTN_DRILLDOWN           30
72
#define BTN_DRILLDOWN           30
73
73
74
#define FT_INAREA               40
75
#define RB_INAREA               41
76
#define ED_INAREA               42
77
74
#define PIVOTSTR_SUM			1
78
#define PIVOTSTR_SUM			1
75
#define PIVOTSTR_COUNT			2
79
#define PIVOTSTR_COUNT			2
76
#define PIVOTSTR_AVG			3
80
#define PIVOTSTR_AVG			3
(-)sc.clean/source/ui/dbgui/pivot.src (-10 / +51 lines)
Lines 183-191 ModelessDialog RID_SCDLG_PIVOT_LAYOUT Link Here
183
		Text [ en-US ] = "Result" ;
183
		Text [ en-US ] = "Result" ;
184
		Hide = TRUE ;
184
		Hide = TRUE ;
185
	};
185
	};
186
187
    FixedText FT_INAREA
188
    {
189
        Pos = MAP_APPFONT ( 12 , 203 ) ;
190
        Size = MAP_APPFONT ( 59 , 8 ) ;
191
        Hide = TRUE ;
192
        Text [ en-US ] = "Selection from" ;
193
        Text[ de ] = "Auswahl aus";
194
        Text[ es ] = "Selección de";
195
        Text[ fr ] = "Sélection à partir de";
196
        Text[ it ] = "Seleziona da";
197
        Text[ ja ] = "選択元";
198
        Text[ pt-BR ] = "Seleção de ";
199
        Text[ zh-CN ] = "选择范围";
200
        Text[ zh-TW ] = "選項來源";
201
    };
202
    Edit ED_INAREA
203
    {
204
        Border = TRUE ;
205
        Pos = MAP_APPFONT ( 73 , 201 ) ;
206
        Size = MAP_APPFONT ( 100 , 12 ) ;
207
        TabStop = TRUE ;
208
        Hide = TRUE ;
209
    };
210
    ImageButton RB_INAREA
211
    {
212
        Pos = MAP_APPFONT ( 177 , 200 ) ;
213
        Size = MAP_APPFONT ( 13 , 15 ) ;
214
        TabStop = TRUE ;
215
        Hide = TRUE ;
216
        QuickHelpText [ de ] = "Verkleinern" ;
217
        QuickHelpText [ en-US ] = "Shrink" ;
218
        QuickHelpText[ es ] = "Reducir";
219
        QuickHelpText[ fr ] = "Comprimer";
220
        QuickHelpText[ it ] = "Comprimi";
221
        QuickHelpText[ ja ] = "縮小";
222
        QuickHelpText[ pt-BR ] = "Diminuir";
223
        QuickHelpText[ zh-CN ] = "收缩";
224
        QuickHelpText[ zh-TW ] = "縮小";
225
    };
226
186
	FixedText FT_OUTAREA
227
	FixedText FT_OUTAREA
187
	{
228
	{
188
        Pos = MAP_APPFONT ( 12 , 203 ) ;
229
        Pos = MAP_APPFONT ( 12 , 221 ) ;
189
        Size = MAP_APPFONT ( 59 , 8 ) ;
230
        Size = MAP_APPFONT ( 59 , 8 ) ;
190
		Hide = TRUE ;
231
		Hide = TRUE ;
191
		Text [ en-US ] = "Results to" ;
232
		Text [ en-US ] = "Results to" ;
Lines 193-199 ModelessDialog RID_SCDLG_PIVOT_LAYOUT Link Here
193
	ListBox LB_OUTAREA
234
	ListBox LB_OUTAREA
194
	{
235
	{
195
		Border = TRUE ;
236
		Border = TRUE ;
196
        Pos = MAP_APPFONT ( 73 , 201 ) ;
237
        Pos = MAP_APPFONT ( 73 , 219 ) ;
197
        Size = MAP_APPFONT ( 75 , 90 ) ;
238
        Size = MAP_APPFONT ( 75 , 90 ) ;
198
		TabStop = TRUE ;
239
		TabStop = TRUE ;
199
		DropDown = TRUE ;
240
		DropDown = TRUE ;
Lines 202-215 ModelessDialog RID_SCDLG_PIVOT_LAYOUT Link Here
202
	Edit ED_OUTAREA
243
	Edit ED_OUTAREA
203
	{
244
	{
204
		Border = TRUE ;
245
		Border = TRUE ;
205
        Pos = MAP_APPFONT ( 152 , 201 ) ;
246
        Pos = MAP_APPFONT ( 152 , 219 ) ;
206
        Size = MAP_APPFONT ( 100 , 12 ) ;
247
        Size = MAP_APPFONT ( 100 , 12 ) ;
207
		TabStop = TRUE ;
248
		TabStop = TRUE ;
208
		Hide = TRUE ;
249
		Hide = TRUE ;
209
	};
250
	};
210
	ImageButton RB_OUTAREA
251
	ImageButton RB_OUTAREA
211
	{
252
	{
212
        Pos = MAP_APPFONT ( 256 , 200 ) ;
253
        Pos = MAP_APPFONT ( 256 , 218 ) ;
213
		Size = MAP_APPFONT ( 13 , 15 ) ;
254
		Size = MAP_APPFONT ( 13 , 15 ) ;
214
        TabStop = TRUE ;
255
        TabStop = TRUE ;
215
        Hide = TRUE ;
256
        Hide = TRUE ;
Lines 217-223 ModelessDialog RID_SCDLG_PIVOT_LAYOUT Link Here
217
	};
258
	};
218
	CheckBox BTN_IGNEMPTYROWS
259
	CheckBox BTN_IGNEMPTYROWS
219
	{
260
	{
220
        Pos = MAP_APPFONT ( 12 , 219 ) ;
261
        Pos = MAP_APPFONT ( 12 , 237 ) ;
221
        Size = MAP_APPFONT ( 124 , 10 ) ;
262
        Size = MAP_APPFONT ( 124 , 10 ) ;
222
		TabStop = TRUE ;
263
		TabStop = TRUE ;
223
		Hide = TRUE ;
264
		Hide = TRUE ;
Lines 225-231 ModelessDialog RID_SCDLG_PIVOT_LAYOUT Link Here
225
	};
266
	};
226
	CheckBox BTN_DETECTCAT
267
	CheckBox BTN_DETECTCAT
227
	{
268
	{
228
        Pos = MAP_APPFONT ( 142 , 219 ) ;
269
        Pos = MAP_APPFONT ( 142 , 237 ) ;
229
        Size = MAP_APPFONT ( 124 , 10 ) ;
270
        Size = MAP_APPFONT ( 124 , 10 ) ;
230
		TabStop = TRUE ;
271
		TabStop = TRUE ;
231
		Hide = TRUE ;
272
		Hide = TRUE ;
Lines 233-239 ModelessDialog RID_SCDLG_PIVOT_LAYOUT Link Here
233
	};
274
	};
234
	CheckBox BTN_TOTALCOL
275
	CheckBox BTN_TOTALCOL
235
	{
276
	{
236
        Pos = MAP_APPFONT ( 12 , 233 ) ;
277
        Pos = MAP_APPFONT ( 12 , 251 ) ;
237
        Size = MAP_APPFONT ( 124 , 10 ) ;
278
        Size = MAP_APPFONT ( 124 , 10 ) ;
238
		TabStop = TRUE ;
279
		TabStop = TRUE ;
239
		Hide = TRUE ;
280
		Hide = TRUE ;
Lines 241-247 ModelessDialog RID_SCDLG_PIVOT_LAYOUT Link Here
241
	};
282
	};
242
	CheckBox BTN_TOTALROW
283
	CheckBox BTN_TOTALROW
243
	{
284
	{
244
        Pos = MAP_APPFONT ( 142 , 233 ) ;
285
        Pos = MAP_APPFONT ( 142 , 251 ) ;
245
        Size = MAP_APPFONT ( 124 , 10 ) ;
286
        Size = MAP_APPFONT ( 124 , 10 ) ;
246
		TabStop = TRUE ;
287
		TabStop = TRUE ;
247
		Hide = TRUE ;
288
		Hide = TRUE ;
Lines 249-255 ModelessDialog RID_SCDLG_PIVOT_LAYOUT Link Here
249
	};
290
	};
250
    CheckBox BTN_FILTER
291
    CheckBox BTN_FILTER
251
    {
292
    {
252
        Pos = MAP_APPFONT ( 12 , 247 ) ;
293
        Pos = MAP_APPFONT ( 12 , 265 ) ;
253
        Size = MAP_APPFONT ( 124 , 10 ) ;
294
        Size = MAP_APPFONT ( 124 , 10 ) ;
254
        TabStop = TRUE ;
295
        TabStop = TRUE ;
255
        Hide = TRUE ;
296
        Hide = TRUE ;
Lines 257-263 ModelessDialog RID_SCDLG_PIVOT_LAYOUT Link Here
257
    };
298
    };
258
    CheckBox BTN_DRILLDOWN
299
    CheckBox BTN_DRILLDOWN
259
    {
300
    {
260
        Pos = MAP_APPFONT ( 142 , 247 ) ;
301
        Pos = MAP_APPFONT ( 142 , 265 ) ;
261
        Size = MAP_APPFONT ( 124 , 10 ) ;
302
        Size = MAP_APPFONT ( 124 , 10 ) ;
262
        TabStop = TRUE ;
303
        TabStop = TRUE ;
263
        Hide = TRUE ;
304
        Hide = TRUE ;
(-)sc.clean/source/ui/dbgui/pvlaydlg.cxx (-19 / +179 lines)
Lines 36-46 Link Here
36
// MARKER(update_precomp.py): autogen include statement, do not remove
36
// MARKER(update_precomp.py): autogen include statement, do not remove
37
#include "precompiled_sc.hxx"
37
#include "precompiled_sc.hxx"
38
38
39
39
#include <stdio.h>
40
40
41
//----------------------------------------------------------------------------
41
//----------------------------------------------------------------------------
42
42
43
#include "pvlaydlg.hxx"
43
#include "pvlaydlg.hxx"
44
#include "dbdocfun.hxx"
44
45
45
#include <sfx2/dispatch.hxx>
46
#include <sfx2/dispatch.hxx>
46
#include <vcl/msgbox.hxx>
47
#include <vcl/msgbox.hxx>
Lines 61-66 Link Here
61
#include "pivot.hrc"
62
#include "pivot.hrc"
62
#include "dpobject.hxx"
63
#include "dpobject.hxx"
63
#include "dpsave.hxx"
64
#include "dpsave.hxx"
65
#include "dpshttab.hxx"
64
#include "scmod.hxx"
66
#include "scmod.hxx"
65
67
66
#include "sc.hrc" //CHINA001
68
#include "sc.hrc" //CHINA001
Lines 129-134 ScDPLayoutDlg::ScDPLayoutDlg( SfxBinding Link Here
129
		aFtOutArea		( this, ScResId( FT_OUTAREA ) ),
131
		aFtOutArea		( this, ScResId( FT_OUTAREA ) ),
130
		aEdOutPos		( this, ScResId( ED_OUTAREA ) ),
132
		aEdOutPos		( this, ScResId( ED_OUTAREA ) ),
131
		aRbOutPos		( this, ScResId( RB_OUTAREA ), &aEdOutPos ),
133
		aRbOutPos		( this, ScResId( RB_OUTAREA ), &aEdOutPos ),
134
		aFtInArea		( this, ScResId( FT_INAREA) ),
135
		aEdInPos		( this, ScResId( ED_INAREA) ),
136
		aRbInPos		( this, ScResId( RB_INAREA ), &aEdInPos ),
132
		aBtnIgnEmptyRows( this, ScResId( BTN_IGNEMPTYROWS ) ),
137
		aBtnIgnEmptyRows( this, ScResId( BTN_IGNEMPTYROWS ) ),
133
		aBtnDetectCat	( this, ScResId( BTN_DETECTCAT ) ),
138
		aBtnDetectCat	( this, ScResId( BTN_DETECTCAT ) ),
134
		aBtnTotalCol	( this, ScResId( BTN_TOTALCOL ) ),
139
		aBtnTotalCol	( this, ScResId( BTN_TOTALCOL ) ),
Lines 148-153 ScDPLayoutDlg::ScDPLayoutDlg( SfxBinding Link Here
148
153
149
		bIsDrag			( FALSE ),
154
		bIsDrag			( FALSE ),
150
155
156
        pEditActive     ( NULL ),
157
151
        eLastActiveType ( TYPE_SELECT ),
158
        eLastActiveType ( TYPE_SELECT ),
152
		nOffset			( 0 ),
159
		nOffset			( 0 ),
153
		//
160
		//
Lines 209-214 void __EXPORT ScDPLayoutDlg::Init() Link Here
209
    for ( USHORT i = 0; i < FUNC_COUNT; ++i )
216
    for ( USHORT i = 0; i < FUNC_COUNT; ++i )
210
        aFuncNameArr.push_back( String( ScResId( i + 1 ) ) );
217
        aFuncNameArr.push_back( String( ScResId( i + 1 ) ) );
211
218
219
    aBtnMore.AddWindow( &aFtInArea );
220
    aBtnMore.AddWindow( &aEdInPos );
221
    aBtnMore.AddWindow( &aRbInPos );
212
	aBtnMore.AddWindow( &aFtOutArea );
222
	aBtnMore.AddWindow( &aFtOutArea );
213
	aBtnMore.AddWindow( &aLbOutPos );
223
	aBtnMore.AddWindow( &aLbOutPos );
214
	aBtnMore.AddWindow( &aEdOutPos );
224
	aBtnMore.AddWindow( &aEdOutPos );
Lines 221-226 void __EXPORT ScDPLayoutDlg::Init() Link Here
221
    aBtnMore.AddWindow( &aBtnDrillDown );
231
    aBtnMore.AddWindow( &aBtnDrillDown );
222
    aBtnMore.AddWindow( &aFlAreas );
232
    aBtnMore.AddWindow( &aFlAreas );
223
    aBtnMore.SetClickHdl( LINK( this, ScDPLayoutDlg, MoreClickHdl ) );
233
    aBtnMore.SetClickHdl( LINK( this, ScDPLayoutDlg, MoreClickHdl ) );
234
    aBtnMore.SetDelta(90);
224
235
225
	{
236
	{
226
        Size aFieldSize( Window( this, ScResId( WND_FIELD ) ).GetSizePixel() );
237
        Size aFieldSize( Window( this, ScResId( WND_FIELD ) ).GetSizePixel() );
Lines 243-248 void __EXPORT ScDPLayoutDlg::Init() Link Here
243
	InitWnd( thePivotData.aRowArr,  static_cast<long>(thePivotData.nRowCount),  TYPE_ROW );
254
	InitWnd( thePivotData.aRowArr,  static_cast<long>(thePivotData.nRowCount),  TYPE_ROW );
244
	InitWnd( thePivotData.aDataArr, static_cast<long>(thePivotData.nDataCount), TYPE_DATA );
255
	InitWnd( thePivotData.aDataArr, static_cast<long>(thePivotData.nDataCount), TYPE_DATA );
245
256
257
    ScRange inRange;
258
    String inString;
259
    if (xDlgDPObject->GetSheetDesc())
260
    {
261
        aEdInPos.Enable();
262
        aRbInPos.Enable();
263
        inRange = xDlgDPObject->GetSheetDesc()->aSourceRange;
264
        inRange.Format( inString, STD_FORMAT, pDoc);
265
        aEdInPos.SetText(inString);
266
    }
267
    else 
268
    {
269
        /* Data is not reachable, so could be a remote database */
270
        aEdInPos.Disable();
271
        aRbInPos.Disable();
272
    }
273
	
246
    aSlider.SetPageSize( PAGE_SIZE );
274
    aSlider.SetPageSize( PAGE_SIZE );
247
    aSlider.SetVisibleSize( PAGE_SIZE );
275
    aSlider.SetVisibleSize( PAGE_SIZE );
248
    aSlider.SetLineSize( LINE_SIZE );
276
    aSlider.SetLineSize( LINE_SIZE );
Lines 260-267 void __EXPORT ScDPLayoutDlg::Init() Link Here
260
288
261
    aLbOutPos .SetSelectHdl( LINK( this, ScDPLayoutDlg, SelAreaHdl ) );
289
    aLbOutPos .SetSelectHdl( LINK( this, ScDPLayoutDlg, SelAreaHdl ) );
262
    aEdOutPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdModifyHdl ) );
290
    aEdOutPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdModifyHdl ) );
291
    aEdInPos  .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdInModifyHdl ) );	
263
    aBtnOk    .SetClickHdl ( LINK( this, ScDPLayoutDlg, OkHdl ) );
292
    aBtnOk    .SetClickHdl ( LINK( this, ScDPLayoutDlg, OkHdl ) );
264
    aBtnCancel.SetClickHdl ( LINK( this, ScDPLayoutDlg, CancelHdl ) );
293
    aBtnCancel.SetClickHdl ( LINK( this, ScDPLayoutDlg, CancelHdl ) );
294
    Link aLink = LINK( this, ScDPLayoutDlg, GetFocusHdl );
295
    if ( aEdInPos.IsEnabled() )
296
        // Once disabled it will never get enabled, so no need to handle focus.
297
        aEdInPos.SetGetFocusHdl( aLink );
298
    aEdOutPos.SetGetFocusHdl( aLink );
265
299
266
	if ( pViewData && pDoc )
300
	if ( pViewData && pDoc )
267
	{
301
	{
Lines 1319-1336 BOOL ScDPLayoutDlg::GetPivotArrays( P Link Here
1319
1353
1320
void ScDPLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
1354
void ScDPLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
1321
{
1355
{
1322
	if ( bRefInputMode )
1356
    if ( !bRefInputMode || !pEditActive )
1323
	{
1357
        return;
1324
		if ( rRef.aStart != rRef.aEnd )
1358
1325
			RefInputStart( &aEdOutPos );
1359
    if ( rRef.aStart != rRef.aEnd )
1326
/*
1360
        RefInputStart( pEditActive );
1327
		ScAddress	aAdr( nStartCol, nStartRow, nStartTab );
1361
1328
		aAdr.PutInOrder( ScAddress( nEndCol, nEndRow, nEndTab ) );
1362
    if ( pEditActive == &aEdInPos )
1329
*/
1363
    {
1330
		String aRefStr;
1364
        String aRefStr;
1331
        rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP );
1365
        rRef.Format( aRefStr, STD_FORMAT, pDocP, pDocP->GetAddressConvention() );
1332
		aEdOutPos.SetRefString( aRefStr );
1366
        pEditActive->SetRefString( aRefStr );
1333
	}
1367
    }
1368
    else if ( pEditActive == &aEdOutPos )
1369
    {
1370
        String aRefStr;
1371
        rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP, pDocP->GetAddressConvention() );
1372
        pEditActive->SetRefString( aRefStr );
1373
    }
1334
}
1374
}
1335
1375
1336
1376
Lines 1340-1347 void ScDPLayoutDlg::SetActive() Link Here
1340
{
1380
{
1341
	if ( bRefInputMode )
1381
	if ( bRefInputMode )
1342
	{
1382
	{
1343
		aEdOutPos.GrabFocus();
1383
        if ( pEditActive )
1344
		EdModifyHdl( NULL );
1384
            pEditActive->GrabFocus();
1385
1386
        if ( pEditActive == &aEdInPos )
1387
            EdInModifyHdl( NULL );
1388
        else if ( pEditActive == &aEdOutPos )
1389
            EdModifyHdl( NULL );
1345
	}
1390
	}
1346
	else
1391
	else
1347
	{
1392
	{
Lines 1489-1495 IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButto Link Here
1489
		ErrorBox( this, WinBits( WB_OK | WB_DEF_OK ),
1534
		ErrorBox( this, WinBits( WB_OK | WB_DEF_OK ),
1490
				 ScGlobal::GetRscString( STR_INVALID_TABREF )
1535
				 ScGlobal::GetRscString( STR_INVALID_TABREF )
1491
				).Execute();
1536
				).Execute();
1492
		aEdOutPos.GrabFocus();
1537
        if ( pEditActive )
1538
            pEditActive->GrabFocus();
1493
	}
1539
	}
1494
	return 0;
1540
	return 0;
1495
}
1541
}
Lines 1514-1522 IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, Link Here
1514
		bRefInputMode = TRUE;
1560
		bRefInputMode = TRUE;
1515
		//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
1561
		//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
1516
		//SFX_APPWINDOW->Enable();
1562
		//SFX_APPWINDOW->Enable();
1517
		aEdOutPos.Enable();
1563
        if ( aEdInPos.IsEnabled() )
1518
		aEdOutPos.GrabFocus();
1564
        {
1519
        aRbOutPos.Enable();
1565
            aEdInPos.Enable();
1566
            aEdInPos.GrabFocus();
1567
            aEdInPos.Enable();
1568
        }
1569
        else
1570
        {
1571
            aEdOutPos.Enable();
1572
            aEdOutPos.GrabFocus();
1573
            aEdOutPos.Enable();
1574
        }
1520
	}
1575
	}
1521
	else
1576
	else
1522
	{
1577
	{
Lines 1557-1562 IMPL_LINK( ScDPLayoutDlg, EdModifyHdl, E Link Here
1557
}
1612
}
1558
1613
1559
1614
1615
IMPL_LINK( ScDPLayoutDlg, EdInModifyHdl, Edit *, EMPTYARG )
1616
{
1617
    String  theCurPosStr = aEdInPos.GetText();
1618
1619
    ScSheetSourceDesc inSheet = *(xDlgDPObject->GetSheetDesc());
1620
    ScRange aR = xDlgDPObject->GetSheetDesc()->aSourceRange;
1621
    ScRefAddress start, end;
1622
    ConvertDoubleRef (pDoc, theCurPosStr, 1,  start, end );
1623
    inSheet.aSourceRange = ScRange(start.GetAddress(), end.GetAddress());
1624
    xDlgDPObject->SetSheetDesc( inSheet);
1625
    xDlgDPObject->InvalidateSource();
1626
    xDlgDPObject->Output();
1627
    xDlgDPObject->SetAlive( TRUE );     // needed to get structure information
1628
    xDlgDPObject->FillOldParam( thePivotData, FALSE );
1629
    xDlgDPObject->FillLabelData( thePivotData );
1630
1631
    ScTabViewShell * pTabViewShell = pViewData->GetViewShell();
1632
    ScDPObject tmpDPObject(*xDlgDPObject);
1633
    pTabViewShell->SetDialogDPObject(&tmpDPObject);
1634
            
1635
    aR = xDlgDPObject->GetSheetDesc()->aSourceRange;
1636
    
1637
    aLabelDataArr.clear();
1638
    aWndSelect.ClearFields();
1639
    aWndData.ClearFields();
1640
    aWndRow.ClearFields();
1641
    aWndCol.ClearFields();
1642
    aWndPage.ClearFields();
1643
    
1644
    USHORT i;
1645
    for ( i=0; i<MAX_LABELS; i++ )
1646
        aSelectArr[i].reset();
1647
1648
    for ( i=0; i<MAX_FIELDS; i++ )
1649
    {
1650
        RemoveField (TYPE_COL, i);
1651
        RemoveField (TYPE_ROW, i);
1652
        RemoveField (TYPE_DATA, i);
1653
    }
1654
    for ( i=0; i<MAX_PAGEFIELDS; i++ )
1655
        RemoveField (TYPE_PAGE, i);
1656
1657
    InitWndSelect( thePivotData.ppLabelArr, thePivotData.nLabels );
1658
    InitWnd( thePivotData.aColArr,  thePivotData.nColCount,  TYPE_COL );
1659
    InitWnd( thePivotData.aRowArr,  thePivotData.nRowCount,  TYPE_ROW );
1660
    InitWnd( thePivotData.aDataArr, thePivotData.nDataCount, TYPE_DATA );
1661
    InitWnd( thePivotData.aPageArr, thePivotData.nPageCount, TYPE_PAGE );
1662
    aSlider.SetPageSize( PAGE_SIZE );
1663
    aSlider.SetVisibleSize( PAGE_SIZE );
1664
    aSlider.SetLineSize( LINE_SIZE );
1665
    aSlider.SetRange( Range( 0, ((thePivotData.nLabels+LINE_SIZE-1)/LINE_SIZE)*LINE_SIZE ) );
1666
1667
    if ( thePivotData.nLabels > PAGE_SIZE )
1668
    {
1669
        aSlider.SetEndScrollHdl( LINK( this, ScDPLayoutDlg, ScrollHdl ) );
1670
        aSlider.Show();
1671
    }
1672
    else
1673
        aSlider.Hide();
1674
1675
    if ( pViewData && pDoc )
1676
    {
1677
        /*
1678
         * Aus den RangeNames des Dokumentes werden nun die
1679
         * in einem Zeiger-Array gemerkt, bei denen es sich
1680
         * um sinnvolle Bereiche handelt
1681
         */
1682
1683
        aLbOutPos.Clear();
1684
        aLbOutPos.InsertEntry( aStrUndefined, 0 );
1685
        aLbOutPos.InsertEntry( aStrNewTable,  1 );
1686
1687
        ScAreaNameIterator aIter( pDoc );
1688
        String aName;
1689
        ScRange aRange;
1690
        String aRefStr;
1691
        while ( aIter.Next( aName, aRange ) )
1692
        {
1693
            if ( !aIter.WasDBName() )       // hier keine DB-Bereiche !
1694
            {
1695
                USHORT nInsert = aLbOutPos.InsertEntry( aName );
1696
1697
                aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc );
1698
                aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) );
1699
            }
1700
        }
1701
    }
1702
1703
    aEdInPos.GrabFocus();
1704
    return 0;
1705
}
1706
1707
1560
//----------------------------------------------------------------------------
1708
//----------------------------------------------------------------------------
1561
1709
1562
IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG )
1710
IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG )
Lines 1610-1613 IMPL_LINK( ScDPLayoutDlg, ScrollHdl, Scr Link Here
1610
	return 0;
1758
	return 0;
1611
}
1759
}
1612
1760
1761
//----------------------------------------------------------------------------
1762
1763
IMPL_LINK( ScDPLayoutDlg, GetFocusHdl, Control*, pCtrl )
1764
{
1765
    pEditActive = NULL;
1766
    if ( pCtrl == &aEdInPos )
1767
        pEditActive = &aEdInPos;
1768
    else if ( pCtrl == &aEdOutPos )
1769
        pEditActive = &aEdOutPos;
1770
1771
	return 0;
1772
}
1613
1773
(-)sc.clean/source/ui/inc/pvlaydlg.hxx (+10 lines)
Lines 147-152 private: Link Here
147
    FixedText               aFtOutArea;
147
    FixedText               aFtOutArea;
148
    ScRefEdit               aEdOutPos;
148
    ScRefEdit               aEdOutPos;
149
    ScRefButton             aRbOutPos;
149
    ScRefButton             aRbOutPos;
150
151
    // For DP source selection
152
    FixedText               aFtInArea;
153
    ScRefEdit               aEdInPos;
154
    ScRefButton             aRbInPos;
155
150
    CheckBox                aBtnIgnEmptyRows;
156
    CheckBox                aBtnIgnEmptyRows;
151
    CheckBox                aBtnDetectCat;
157
    CheckBox                aBtnDetectCat;
152
    CheckBox                aBtnTotalCol;
158
    CheckBox                aBtnTotalCol;
Lines 169-174 private: Link Here
169
    size_t                  nDnDFromIndex;
175
    size_t                  nDnDFromIndex;
170
    BOOL                    bIsDrag;
176
    BOOL                    bIsDrag;
171
177
178
    ScRefEdit*              pEditActive;
179
172
    Rectangle               aRectPage;
180
    Rectangle               aRectPage;
173
    Rectangle               aRectRow;
181
    Rectangle               aRectRow;
174
    Rectangle               aRectCol;
182
    Rectangle               aRectCol;
Lines 227-234 private: Link Here
227
	DECL_LINK( SelAreaHdl, ListBox * );
235
	DECL_LINK( SelAreaHdl, ListBox * );
228
	DECL_LINK( MoreClickHdl, MoreButton * );
236
	DECL_LINK( MoreClickHdl, MoreButton * );
229
	DECL_LINK( EdModifyHdl, Edit * );
237
	DECL_LINK( EdModifyHdl, Edit * );
238
	DECL_LINK( EdInModifyHdl, Edit * );
230
	DECL_LINK( OkHdl, OKButton * );
239
	DECL_LINK( OkHdl, OKButton * );
231
	DECL_LINK( CancelHdl, CancelButton * );
240
	DECL_LINK( CancelHdl, CancelButton * );
241
    DECL_LINK( GetFocusHdl, Control* );
232
};
242
};
233
243
234
244

Return to issue 23658