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 (-11 / +52 lines)
Lines 163-169 ModelessDialog RID_SCDLG_PIVOT_LAYOUT Link Here
163
        Size = MAP_APPFONT ( 50 , 14 ) ;
163
        Size = MAP_APPFONT ( 50 , 14 ) ;
164
		TabStop = TRUE ;
164
		TabStop = TRUE ;
165
		MapUnit = MAP_APPFONT ;
165
		MapUnit = MAP_APPFONT ;
166
        Delta = 73 ;
166
        Delta = 90 ;
167
	};
167
	};
168
	Window WND_FIELD
168
	Window WND_FIELD
169
	{
169
	{
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 (-39 / +168 lines)
Lines 41-46 Link Here
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 125-130 ScDPLayoutDlg::ScDPLayoutDlg( SfxBinding Link Here
125
		aFtInfo			( this, ScResId( FT_INFO ) ),
127
		aFtInfo			( this, ScResId( FT_INFO ) ),
126
128
127
        aFlAreas        ( this, ScResId( FL_OUTPUT ) ),
129
        aFlAreas        ( this, ScResId( FL_OUTPUT ) ),
130
131
        aFtInArea		( this, ScResId( FT_INAREA) ),
132
        aEdInPos		( this, ScResId( ED_INAREA) ),
133
        aRbInPos		( this, ScResId( RB_INAREA ), &aEdInPos ),
134
128
		aLbOutPos		( this, ScResId( LB_OUTAREA ) ),
135
		aLbOutPos		( this, ScResId( LB_OUTAREA ) ),
129
		aFtOutArea		( this, ScResId( FT_OUTAREA ) ),
136
		aFtOutArea		( this, ScResId( FT_OUTAREA ) ),
130
		aEdOutPos		( this, ScResId( ED_OUTAREA ) ),
137
		aEdOutPos		( this, ScResId( ED_OUTAREA ) ),
Lines 148-153 ScDPLayoutDlg::ScDPLayoutDlg( SfxBinding Link Here
148
155
149
		bIsDrag			( FALSE ),
156
		bIsDrag			( FALSE ),
150
157
158
        pEditActive     ( NULL ),
159
151
        eLastActiveType ( TYPE_SELECT ),
160
        eLastActiveType ( TYPE_SELECT ),
152
		nOffset			( 0 ),
161
		nOffset			( 0 ),
153
		//
162
		//
Lines 209-214 void __EXPORT ScDPLayoutDlg::Init() Link Here
209
    for ( USHORT i = 0; i < FUNC_COUNT; ++i )
218
    for ( USHORT i = 0; i < FUNC_COUNT; ++i )
210
        aFuncNameArr.push_back( String( ScResId( i + 1 ) ) );
219
        aFuncNameArr.push_back( String( ScResId( i + 1 ) ) );
211
220
221
    aBtnMore.AddWindow( &aFlAreas );
222
    aBtnMore.AddWindow( &aFtInArea );
223
    aBtnMore.AddWindow( &aEdInPos );
224
    aBtnMore.AddWindow( &aRbInPos );
212
	aBtnMore.AddWindow( &aFtOutArea );
225
	aBtnMore.AddWindow( &aFtOutArea );
213
	aBtnMore.AddWindow( &aLbOutPos );
226
	aBtnMore.AddWindow( &aLbOutPos );
214
	aBtnMore.AddWindow( &aEdOutPos );
227
	aBtnMore.AddWindow( &aEdOutPos );
Lines 219-225 void __EXPORT ScDPLayoutDlg::Init() Link Here
219
	aBtnMore.AddWindow( &aBtnTotalRow );
232
	aBtnMore.AddWindow( &aBtnTotalRow );
220
    aBtnMore.AddWindow( &aBtnFilter );
233
    aBtnMore.AddWindow( &aBtnFilter );
221
    aBtnMore.AddWindow( &aBtnDrillDown );
234
    aBtnMore.AddWindow( &aBtnDrillDown );
222
    aBtnMore.AddWindow( &aFlAreas );
223
    aBtnMore.SetClickHdl( LINK( this, ScDPLayoutDlg, MoreClickHdl ) );
235
    aBtnMore.SetClickHdl( LINK( this, ScDPLayoutDlg, MoreClickHdl ) );
224
236
225
	{
237
	{
Lines 237-267 void __EXPORT ScDPLayoutDlg::Init() Link Here
237
    aRowArr.resize( MAX_FIELDS );
249
    aRowArr.resize( MAX_FIELDS );
238
    aDataArr.resize( MAX_FIELDS );
250
    aDataArr.resize( MAX_FIELDS );
239
251
240
	InitWndSelect( thePivotData.ppLabelArr, static_cast<long>(thePivotData.nLabels) );
252
    ScRange inRange;
241
    InitWnd( thePivotData.aPageArr, static_cast<long>(thePivotData.nPageCount), TYPE_PAGE );
253
    String inString;
242
	InitWnd( thePivotData.aColArr,  static_cast<long>(thePivotData.nColCount),  TYPE_COL );
254
    if (xDlgDPObject->GetSheetDesc())
243
	InitWnd( thePivotData.aRowArr,  static_cast<long>(thePivotData.nRowCount),  TYPE_ROW );
255
    {
244
	InitWnd( thePivotData.aDataArr, static_cast<long>(thePivotData.nDataCount), TYPE_DATA );
256
        aEdInPos.Enable();
245
257
        aRbInPos.Enable();
246
    aSlider.SetPageSize( PAGE_SIZE );
258
        aOldRange = xDlgDPObject->GetSheetDesc()->aSourceRange;
247
    aSlider.SetVisibleSize( PAGE_SIZE );
259
        aOldRange.Format( inString, STD_FORMAT, pDoc);
248
    aSlider.SetLineSize( LINE_SIZE );
260
        aEdInPos.SetText(inString);
249
    aSlider.SetRange( Range( 0, static_cast<long>(((thePivotData.nLabels+LINE_SIZE-1)/LINE_SIZE)*LINE_SIZE) ) );
261
    }
250
262
    else 
251
	if ( thePivotData.nLabels > PAGE_SIZE )
263
    {
252
	{
264
        /* Data is not reachable, so could be a remote database */
253
        aSlider.SetEndScrollHdl( LINK( this, ScDPLayoutDlg, ScrollHdl ) );
265
        aEdInPos.Disable();
254
		aSlider.Show();
266
        aRbInPos.Disable();
255
	}
267
    }
256
	else
257
		aSlider.Hide();
258
268
259
	// Ein-/Ausgabebereiche: ----------------------------------------------
269
    InitFields();
260
270
261
    aLbOutPos .SetSelectHdl( LINK( this, ScDPLayoutDlg, SelAreaHdl ) );
271
    aLbOutPos .SetSelectHdl( LINK( this, ScDPLayoutDlg, SelAreaHdl ) );
262
    aEdOutPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdModifyHdl ) );
272
    aEdOutPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdModifyHdl ) );
273
    aEdInPos  .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdInModifyHdl ) );	
263
    aBtnOk    .SetClickHdl ( LINK( this, ScDPLayoutDlg, OkHdl ) );
274
    aBtnOk    .SetClickHdl ( LINK( this, ScDPLayoutDlg, OkHdl ) );
264
    aBtnCancel.SetClickHdl ( LINK( this, ScDPLayoutDlg, CancelHdl ) );
275
    aBtnCancel.SetClickHdl ( LINK( this, ScDPLayoutDlg, CancelHdl ) );
276
    Link aLink = LINK( this, ScDPLayoutDlg, GetFocusHdl );
277
    if ( aEdInPos.IsEnabled() )
278
        // Once disabled it will never get enabled, so no need to handle focus.
279
        aEdInPos.SetGetFocusHdl( aLink );
280
    aEdOutPos.SetGetFocusHdl( aLink );
265
281
266
	if ( pViewData && pDoc )
282
	if ( pViewData && pDoc )
267
	{
283
	{
Lines 480-485 void ScDPLayoutDlg::InitFocus() Link Here
480
        aWndSelect.GrabFocus();
496
        aWndSelect.GrabFocus();
481
}
497
}
482
498
499
void ScDPLayoutDlg::InitFields()
500
{
501
    InitWndSelect( thePivotData.ppLabelArr, static_cast<long>(thePivotData.nLabels) );
502
    InitWnd( thePivotData.aPageArr, static_cast<long>(thePivotData.nPageCount), TYPE_PAGE );
503
    InitWnd( thePivotData.aColArr,  static_cast<long>(thePivotData.nColCount),  TYPE_COL );
504
    InitWnd( thePivotData.aRowArr,  static_cast<long>(thePivotData.nRowCount),  TYPE_ROW );
505
    InitWnd( thePivotData.aDataArr, static_cast<long>(thePivotData.nDataCount), TYPE_DATA );
506
507
    aSlider.SetPageSize( PAGE_SIZE );
508
    aSlider.SetVisibleSize( PAGE_SIZE );
509
    aSlider.SetLineSize( LINE_SIZE );
510
    aSlider.SetRange( Range( 0, static_cast<long>(((thePivotData.nLabels+LINE_SIZE-1)/LINE_SIZE)*LINE_SIZE) ) );
511
512
    if ( thePivotData.nLabels > PAGE_SIZE )
513
    {
514
        aSlider.SetEndScrollHdl( LINK( this, ScDPLayoutDlg, ScrollHdl ) );
515
        aSlider.Show();
516
    }
517
    else
518
        aSlider.Hide();
519
}
483
520
484
//----------------------------------------------------------------------------
521
//----------------------------------------------------------------------------
485
522
Lines 1314-1336 BOOL ScDPLayoutDlg::GetPivotArrays( P Link Here
1314
	return bFit;
1351
	return bFit;
1315
}
1352
}
1316
1353
1354
void ScDPLayoutDlg::UpdateSrcRange()
1355
{
1356
    String  theCurPosStr = aEdInPos.GetText();
1357
    USHORT  nResult = ScRange().Parse(theCurPosStr, pDoc);
1358
1359
    if ( SCA_VALID != (nResult & SCA_VALID) )
1360
        // invalid source range.
1361
        return;
1362
1363
    ScRefAddress start, end;
1364
    ConvertDoubleRef(pDoc, theCurPosStr, 1,  start, end);
1365
    ScRange aNewRange(start.GetAddress(), end.GetAddress());
1366
    ScSheetSourceDesc inSheet = *xDlgDPObject->GetSheetDesc();
1367
1368
    if (inSheet.aSourceRange == aNewRange)
1369
        // new range is identical to the current range.  Nothing to do.
1370
        return;
1371
1372
    ScTabViewShell * pTabViewShell = pViewData->GetViewShell();
1373
    inSheet.aSourceRange = aNewRange;
1374
    xDlgDPObject->SetSheetDesc(inSheet);
1375
    xDlgDPObject->InvalidateSource();
1376
    xDlgDPObject->FillLabelData(thePivotData);
1377
1378
    pTabViewShell->SetDialogDPObject(xDlgDPObject.get());
1379
    aLabelDataArr.clear();
1380
    aWndSelect.ClearFields();
1381
    aWndData.ClearFields();
1382
    aWndRow.ClearFields();
1383
    aWndCol.ClearFields();
1384
    aWndPage.ClearFields();
1385
1386
    for (USHORT i = 0; i < MAX_LABELS; ++i)
1387
        aSelectArr[i].reset();
1388
1389
    for (USHORT i = 0; i < MAX_FIELDS; ++i)
1390
    {
1391
        RemoveField(TYPE_COL,  i);
1392
        RemoveField(TYPE_ROW,  i);
1393
        RemoveField(TYPE_DATA, i);
1394
    }
1395
1396
    for (USHORT i = 0; i < MAX_PAGEFIELDS; ++i)
1397
        RemoveField(TYPE_PAGE, i);
1398
1399
    InitFields();
1400
1401
    return;
1402
}
1317
1403
1318
//----------------------------------------------------------------------------
1404
//----------------------------------------------------------------------------
1319
1405
1320
void ScDPLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
1406
void ScDPLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDocP )
1321
{
1407
{
1322
	if ( bRefInputMode )
1408
    if ( !bRefInputMode || !pEditActive )
1323
	{
1409
        return;
1324
		if ( rRef.aStart != rRef.aEnd )
1410
1325
			RefInputStart( &aEdOutPos );
1411
    if ( rRef.aStart != rRef.aEnd )
1326
/*
1412
        RefInputStart( pEditActive );
1327
		ScAddress	aAdr( nStartCol, nStartRow, nStartTab );
1413
1328
		aAdr.PutInOrder( ScAddress( nEndCol, nEndRow, nEndTab ) );
1414
    if ( pEditActive == &aEdInPos )
1329
*/
1415
    {
1330
		String aRefStr;
1416
        String aRefStr;
1331
        rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP );
1417
        rRef.Format( aRefStr, STD_FORMAT, pDocP, pDocP->GetAddressConvention() );
1332
		aEdOutPos.SetRefString( aRefStr );
1418
        pEditActive->SetRefString( aRefStr );
1333
	}
1419
    }
1420
    else if ( pEditActive == &aEdOutPos )
1421
    {
1422
        String aRefStr;
1423
        rRef.aStart.Format( aRefStr, STD_FORMAT, pDocP, pDocP->GetAddressConvention() );
1424
        pEditActive->SetRefString( aRefStr );
1425
    }
1334
}
1426
}
1335
1427
1336
1428
Lines 1340-1347 void ScDPLayoutDlg::SetActive() Link Here
1340
{
1432
{
1341
	if ( bRefInputMode )
1433
	if ( bRefInputMode )
1342
	{
1434
	{
1343
		aEdOutPos.GrabFocus();
1435
        if ( pEditActive )
1344
		EdModifyHdl( NULL );
1436
            pEditActive->GrabFocus();
1437
1438
        if ( pEditActive == &aEdInPos )
1439
            EdInModifyHdl( NULL );
1440
        else if ( pEditActive == &aEdOutPos )
1441
            EdModifyHdl( NULL );
1345
	}
1442
	}
1346
	else
1443
	else
1347
	{
1444
	{
Lines 1497-1508 IMPL_LINK( ScDPLayoutDlg, OkHdl, OKButto Link Here
1497
1594
1498
//----------------------------------------------------------------------------
1595
//----------------------------------------------------------------------------
1499
1596
1500
IMPL_LINK_INLINE_START( ScDPLayoutDlg, CancelHdl, CancelButton *, EMPTYARG )
1597
IMPL_LINK( ScDPLayoutDlg, CancelHdl, CancelButton *, EMPTYARG )
1501
{
1598
{
1599
    ScSheetSourceDesc inSheet = *xDlgDPObject->GetSheetDesc();
1600
    inSheet.aSourceRange = aOldRange;
1601
    xDlgDPObject->SetSheetDesc(inSheet);
1602
    xDlgDPObject->InvalidateSource();
1603
    xDlgDPObject->FillLabelData(thePivotData);
1502
	Close();
1604
	Close();
1503
	return 0;
1605
	return 0;
1504
}
1606
}
1505
IMPL_LINK_INLINE_END( ScDPLayoutDlg, CancelHdl, CancelButton *, EMPTYARG )
1506
1607
1507
1608
1508
//----------------------------------------------------------------------------
1609
//----------------------------------------------------------------------------
Lines 1514-1522 IMPL_LINK( ScDPLayoutDlg, MoreClickHdl, Link Here
1514
		bRefInputMode = TRUE;
1615
		bRefInputMode = TRUE;
1515
		//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
1616
		//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
1516
		//SFX_APPWINDOW->Enable();
1617
		//SFX_APPWINDOW->Enable();
1517
		aEdOutPos.Enable();
1618
        if ( aEdInPos.IsEnabled() )
1518
		aEdOutPos.GrabFocus();
1619
        {
1519
        aRbOutPos.Enable();
1620
            aEdInPos.Enable();
1621
            aEdInPos.GrabFocus();
1622
            aEdInPos.Enable();
1623
        }
1624
        else
1625
        {
1626
            aEdOutPos.Enable();
1627
            aEdOutPos.GrabFocus();
1628
            aEdOutPos.Enable();
1629
        }
1520
	}
1630
	}
1521
	else
1631
	else
1522
	{
1632
	{
Lines 1557-1562 IMPL_LINK( ScDPLayoutDlg, EdModifyHdl, E Link Here
1557
}
1667
}
1558
1668
1559
1669
1670
IMPL_LINK( ScDPLayoutDlg, EdInModifyHdl, Edit *, EMPTYARG )
1671
{
1672
    UpdateSrcRange();
1673
    return 0;
1674
}
1675
1676
1560
//----------------------------------------------------------------------------
1677
//----------------------------------------------------------------------------
1561
1678
1562
IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG )
1679
IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG )
Lines 1610-1613 IMPL_LINK( ScDPLayoutDlg, ScrollHdl, Scr Link Here
1610
	return 0;
1727
	return 0;
1611
}
1728
}
1612
1729
1730
//----------------------------------------------------------------------------
1731
1732
IMPL_LINK( ScDPLayoutDlg, GetFocusHdl, Control*, pCtrl )
1733
{
1734
    pEditActive = NULL;
1735
    if ( pCtrl == &aEdInPos )
1736
        pEditActive = &aEdInPos;
1737
    else if ( pCtrl == &aEdOutPos )
1738
        pEditActive = &aEdOutPos;
1739
1740
	return 0;
1741
}
1613
1742
(-)sc.clean/source/ui/inc/pvlaydlg.hxx (+17 lines)
Lines 143-152 private: Link Here
143
    FixedInfo               aFtInfo;
143
    FixedInfo               aFtInfo;
144
144
145
    FixedLine               aFlAreas;
145
    FixedLine               aFlAreas;
146
147
    // DP source selection
148
    FixedText               aFtInArea;
149
    ScRefEdit               aEdInPos;
150
    ScRefButton             aRbInPos;
151
152
    // DP output location
146
    ListBox                 aLbOutPos;
153
    ListBox                 aLbOutPos;
147
    FixedText               aFtOutArea;
154
    FixedText               aFtOutArea;
148
    ScRefEdit               aEdOutPos;
155
    ScRefEdit               aEdOutPos;
149
    ScRefButton             aRbOutPos;
156
    ScRefButton             aRbOutPos;
157
150
    CheckBox                aBtnIgnEmptyRows;
158
    CheckBox                aBtnIgnEmptyRows;
151
    CheckBox                aBtnDetectCat;
159
    CheckBox                aBtnDetectCat;
152
    CheckBox                aBtnTotalCol;
160
    CheckBox                aBtnTotalCol;
Lines 169-174 private: Link Here
169
    size_t                  nDnDFromIndex;
177
    size_t                  nDnDFromIndex;
170
    BOOL                    bIsDrag;
178
    BOOL                    bIsDrag;
171
179
180
    ScRefEdit*              pEditActive;
181
172
    Rectangle               aRectPage;
182
    Rectangle               aRectPage;
173
    Rectangle               aRectRow;
183
    Rectangle               aRectRow;
174
    Rectangle               aRectCol;
184
    Rectangle               aRectCol;
Lines 187-192 private: Link Here
187
    ScDPFuncDataVec         aDataArr;
197
    ScDPFuncDataVec         aDataArr;
188
198
189
    ScDPObjectPtr           xDlgDPObject;
199
    ScDPObjectPtr           xDlgDPObject;
200
    ScRange                 aOldRange;
190
    ScPivotParam            thePivotData;
201
    ScPivotParam            thePivotData;
191
    ScViewData*             pViewData;
202
    ScViewData*             pViewData;
192
    ScDocument*             pDoc;
203
    ScDocument*             pDoc;
Lines 198-203 private: Link Here
198
    void                    InitWndSelect   ( LabelData** ppLabelArr, long nLabels );
209
    void                    InitWndSelect   ( LabelData** ppLabelArr, long nLabels );
199
    void                    InitWnd         ( PivotField* pArr, long nCount, ScDPFieldType eType );
210
    void                    InitWnd         ( PivotField* pArr, long nCount, ScDPFieldType eType );
200
    void                    InitFocus       ();
211
    void                    InitFocus       ();
212
    void                    InitFields      ();
201
    void                    CalcWndSizes    ();
213
    void                    CalcWndSizes    ();
202
    Point                   DlgPos2WndPos   ( const Point& rPt, Window& rWnd );
214
    Point                   DlgPos2WndPos   ( const Point& rPt, Window& rWnd );
203
    ScDPLabelData*          GetLabelData    ( SCsCOL nCol, size_t* pPos = NULL );
215
    ScDPLabelData*          GetLabelData    ( SCsCOL nCol, size_t* pPos = NULL );
Lines 221-234 private: Link Here
221
                                              USHORT&       rColCount,
233
                                              USHORT&       rColCount,
222
                                              USHORT&       rRowCount,
234
                                              USHORT&       rRowCount,
223
                                              USHORT&       rDataCount );
235
                                              USHORT&       rDataCount );
236
237
    void                    UpdateSrcRange();
238
224
	// Handler
239
	// Handler
225
    DECL_LINK( ClickHdl, PushButton * );
240
    DECL_LINK( ClickHdl, PushButton * );
226
	DECL_LINK( ScrollHdl, ScrollBar * );
241
	DECL_LINK( ScrollHdl, ScrollBar * );
227
	DECL_LINK( SelAreaHdl, ListBox * );
242
	DECL_LINK( SelAreaHdl, ListBox * );
228
	DECL_LINK( MoreClickHdl, MoreButton * );
243
	DECL_LINK( MoreClickHdl, MoreButton * );
229
	DECL_LINK( EdModifyHdl, Edit * );
244
	DECL_LINK( EdModifyHdl, Edit * );
245
    DECL_LINK( EdInModifyHdl, Edit * );
230
	DECL_LINK( OkHdl, OKButton * );
246
	DECL_LINK( OkHdl, OKButton * );
231
	DECL_LINK( CancelHdl, CancelButton * );
247
	DECL_LINK( CancelHdl, CancelButton * );
248
    DECL_LINK( GetFocusHdl, Control* );
232
};
249
};
233
250
234
251

Return to issue 23658