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

(-)../../../sc.bak/source/ui/dbgui/pivot.hrc (-1 / +3 lines)
Lines 108-111 Link Here
108
#define PIVOTSTR_DEV2			9
108
#define PIVOTSTR_DEV2			9
109
#define PIVOTSTR_VAR			10
109
#define PIVOTSTR_VAR			10
110
#define PIVOTSTR_VAR2			11
110
#define PIVOTSTR_VAR2			11
111
111
#define FT_INAREA			40
112
#define RB_INAREA			41
113
#define ED_INAREA			42
(-)../../../sc.bak/source/ui/dbgui/pivot.src (-1 / +27 lines)
Lines 65-71 Link Here
65
{
65
{
66
	OutputSize = TRUE ;
66
	OutputSize = TRUE ;
67
	HelpId = SID_OPENDLG_PIVOTTABLE ;
67
	HelpId = SID_OPENDLG_PIVOTTABLE ;
68
    Size = MAP_APPFONT ( 336 , 190 ) ;
68
    Size = MAP_APPFONT ( 336 , 200 ) ;
69
	Hide = TRUE ;
69
	Hide = TRUE ;
70
	SVLook = TRUE ;
70
	SVLook = TRUE ;
71
	Moveable = TRUE ;
71
	Moveable = TRUE ;
Lines 161-166 Link Here
161
		Text [ de ] = "Layout" ;
161
		Text [ de ] = "Layout" ;
162
		Text [ en-US ] = "Layout";
162
		Text [ en-US ] = "Layout";
163
	};
163
	};
164
165
	FixedText FT_INAREA
166
        {
167
        Pos = MAP_APPFONT ( 6 , 180 ) ;
168
        Size = MAP_APPFONT ( 59 , 8 ) ;
169
                Hide = FALSE ;
170
	Text [ en-US ] = "Selection from" ;
171
	};
172
173
        Edit ED_INAREA
174
        {
175
                Border = TRUE ;
176
        Pos = MAP_APPFONT ( 65 , 180 ) ;
177
        Size = MAP_APPFONT ( 100 , 12 ) ;
178
                TabStop = TRUE ;
179
                Hide = FALSE ;
180
        };
181
        ImageButton RB_INAREA
182
        {
183
        Pos = MAP_APPFONT ( 172 , 180 ) ;
184
                Size = MAP_APPFONT ( 12 , 12 ) ;
185
        TabStop = TRUE ;
186
        Hide = FALSE ;
187
                QuickHelpText = "Verkleinern" ;
188
                QuickHelpText [ en-US ] = "Shrink" ;
189
	};
164
	OKButton BTN_OK
190
	OKButton BTN_OK
165
	{
191
	{
166
        Pos = MAP_APPFONT ( 280 , 6 ) ;
192
        Pos = MAP_APPFONT ( 280 , 6 ) ;
(-)../../../sc.bak/source/ui/dbgui/pvlaydlg.cxx (-5 / +124 lines)
Lines 68-73 Link Here
68
//----------------------------------------------------------------------------
68
//----------------------------------------------------------------------------
69
69
70
#include "pvlaydlg.hxx"
70
#include "pvlaydlg.hxx"
71
#include "dbdocfun.hxx"
71
72
72
#include <sfx2/dispatch.hxx>
73
#include <sfx2/dispatch.hxx>
73
#include <vcl/msgbox.hxx>
74
#include <vcl/msgbox.hxx>
Lines 87-92 Link Here
87
#include "pivot.hrc"
88
#include "pivot.hrc"
88
#include "dpobject.hxx"
89
#include "dpobject.hxx"
89
#include "dpsave.hxx"
90
#include "dpsave.hxx"
91
#include "dpshttab.hxx"
90
#include "scmod.hxx"
92
#include "scmod.hxx"
91
93
92
#include "sc.hrc" //CHINA001
94
#include "sc.hrc" //CHINA001
Lines 139-144 Link Here
139
		aFtOutArea		( this, ScResId( FT_OUTAREA ) ),
141
		aFtOutArea		( this, ScResId( FT_OUTAREA ) ),
140
		aEdOutPos		( this, ScResId( ED_OUTAREA ) ),
142
		aEdOutPos		( this, ScResId( ED_OUTAREA ) ),
141
		aRbOutPos		( this, ScResId( RB_OUTAREA ), &aEdOutPos ),
143
		aRbOutPos		( this, ScResId( RB_OUTAREA ), &aEdOutPos ),
144
		aFtInArea			( this, ScResId( FT_INAREA) ),
145
		aEdInPos			( this, ScResId( ED_INAREA) ),
146
		aRbInPos			( this, ScResId( RB_INAREA ), &aEdInPos ),
142
        aFlAreas        ( this, ScResId( FL_OUTPUT ) ),
147
        aFlAreas        ( this, ScResId( FL_OUTPUT ) ),
143
148
144
        aFtPage         ( this, ScResId( FT_PAGE ) ),
149
        aFtPage         ( this, ScResId( FT_PAGE ) ),
Lines 166-172 Link Here
166
								GetViewData() ),
171
								GetViewData() ),
167
		pDoc			( ((ScTabViewShell*)SfxViewShell::Current())->
172
		pDoc			( ((ScTabViewShell*)SfxViewShell::Current())->
168
								GetViewData()->GetDocument() ),
173
								GetViewData()->GetDocument() ),
169
		bRefInputMode	( FALSE )
174
		bRefInputMode	( TRUE )
170
{
175
{
171
    xDlgDPObject->SetAlive( TRUE );     // needed to get structure information
176
    xDlgDPObject->SetAlive( TRUE );     // needed to get structure information
172
    xDlgDPObject->FillOldParam( thePivotData, FALSE );
177
    xDlgDPObject->FillOldParam( thePivotData, FALSE );
Lines 249-254 Link Here
249
	InitWnd( thePivotData.aRowArr,  static_cast<long>(thePivotData.nRowCount),  TYPE_ROW );
254
	InitWnd( thePivotData.aRowArr,  static_cast<long>(thePivotData.nRowCount),  TYPE_ROW );
250
	InitWnd( thePivotData.aDataArr, static_cast<long>(thePivotData.nDataCount), TYPE_DATA );
255
	InitWnd( thePivotData.aDataArr, static_cast<long>(thePivotData.nDataCount), TYPE_DATA );
251
256
257
	ScRange inRange;
258
	String inString;
259
	inRange = xDlgDPObject->GetSheetDesc()->aSourceRange;
260
	inRange.Format( inString, STD_FORMAT, pDoc);
261
	aEdInPos.SetText(inString);
262
	
252
    aSlider.SetPageSize( PAGE_SIZE );
263
    aSlider.SetPageSize( PAGE_SIZE );
253
    aSlider.SetVisibleSize( PAGE_SIZE );
264
    aSlider.SetVisibleSize( PAGE_SIZE );
254
    aSlider.SetLineSize( LINE_SIZE );
265
    aSlider.SetLineSize( LINE_SIZE );
Lines 266-271 Link Here
266
277
267
    aLbOutPos .SetSelectHdl( LINK( this, ScDPLayoutDlg, SelAreaHdl ) );
278
    aLbOutPos .SetSelectHdl( LINK( this, ScDPLayoutDlg, SelAreaHdl ) );
268
    aEdOutPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdModifyHdl ) );
279
    aEdOutPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdModifyHdl ) );
280
    aEdInPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdInModifyHdl ) );	
269
    aBtnOk    .SetClickHdl ( LINK( this, ScDPLayoutDlg, OkHdl ) );
281
    aBtnOk    .SetClickHdl ( LINK( this, ScDPLayoutDlg, OkHdl ) );
270
    aBtnCancel.SetClickHdl ( LINK( this, ScDPLayoutDlg, CancelHdl ) );
282
    aBtnCancel.SetClickHdl ( LINK( this, ScDPLayoutDlg, CancelHdl ) );
271
283
Lines 1270-1286 Link Here
1270
1282
1271
void ScDPLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDoc )
1283
void ScDPLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDoc )
1272
{
1284
{
1285
	ScRefEdit *tmpREd;
1286
	ScRefButton *tmpRBtn;
1287
	
1273
	if ( bRefInputMode )
1288
	if ( bRefInputMode )
1274
	{
1289
	{
1290
		tmpRBtn = GetRefButton();
1291
		tmpREd = tmpRBtn->GetReferencesEdit();
1275
		if ( rRef.aStart != rRef.aEnd )
1292
		if ( rRef.aStart != rRef.aEnd )
1276
			RefInputStart( &aEdOutPos );
1293
			RefInputStart( tmpREd, tmpRBtn);
1294
1277
/*
1295
/*
1278
		ScAddress	aAdr( nStartCol, nStartRow, nStartTab );
1296
		ScAddress	aAdr( nStartCol, nStartRow, nStartTab );
1279
		aAdr.PutInOrder( ScAddress( nEndCol, nEndRow, nEndTab ) );
1297
		aAdr.PutInOrder( ScAddress( nEndCol, nEndRow, nEndTab ) );
1280
*/
1298
*/
1299
1281
		String aRefStr;
1300
		String aRefStr;
1282
		rRef.aStart.Format( aRefStr, STD_FORMAT, pDoc );
1301
1283
		aEdOutPos.SetRefString( aRefStr );
1302
		if ( tmpREd== &aEdInPos)
1303
		{
1304
			USHORT	 	nFmt = SCR_ABS_3D;		 //!!! nCurTab fehlt noch		
1305
			if ( rRef.aStart.Tab() != rRef.aEnd.Tab() )
1306
				nFmt |= SCA_TAB2_3D;		
1307
			rRef.Format( aRefStr, nFmt, pDoc );
1308
		}
1309
		else			
1310
			rRef.aStart.Format( aRefStr, STD_FORMAT, pDoc );
1311
		
1312
		tmpREd->SetRefString( aRefStr );
1284
	}
1313
	}
1285
}
1314
}
1286
1315
Lines 1432-1437 Link Here
1432
				).Execute();
1461
				).Execute();
1433
		aEdOutPos.GrabFocus();
1462
		aEdOutPos.GrabFocus();
1434
	}
1463
	}
1464
1435
	return 0;
1465
	return 0;
1436
}
1466
}
1437
1467
Lines 1461-1467 Link Here
1461
	}
1491
	}
1462
	else
1492
	else
1463
	{
1493
	{
1464
		bRefInputMode = FALSE;
1494
1465
		//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
1495
		//@BugID 54702 Enablen/Disablen nur noch in Basisklasse
1466
		//SFX_APPWINDOW->Disable(FALSE);		//! allgemeine Methode im ScAnyRefDlg
1496
		//SFX_APPWINDOW->Disable(FALSE);		//! allgemeine Methode im ScAnyRefDlg
1467
	}
1497
	}
Lines 1498-1503 Link Here
1498
}
1528
}
1499
1529
1500
1530
1531
IMPL_LINK( ScDPLayoutDlg, EdInModifyHdl, Edit *, EMPTYARG )
1532
{
1533
1534
	String	theCurPosStr = aEdInPos.GetText();
1535
	ScSheetSourceDesc inSheet = *(xDlgDPObject->GetSheetDesc());
1536
        ScRange aR = xDlgDPObject->GetSheetDesc()->aSourceRange;        
1537
	ScRefAddress start, end;
1538
	ConvertDoubleRef (pDoc, theCurPosStr, 1,  start, end );
1539
	inSheet.aSourceRange = ScRange(start.GetAddress(), end.GetAddress());
1540
	xDlgDPObject->SetSheetDesc( inSheet);
1541
	xDlgDPObject->InvalidateSource();
1542
	xDlgDPObject->Output();
1543
	xDlgDPObject->SetAlive( TRUE );		// needed to get structure information
1544
	xDlgDPObject->FillOldParam( thePivotData, FALSE );
1545
	xDlgDPObject->FillLabelData( thePivotData );
1546
1547
	ScTabViewShell * pTabViewShell = pViewData->GetViewShell();
1548
	pTabViewShell->SetDialogDPObject(&ScDPObject(*xDlgDPObject));
1549
			
1550
	aR = xDlgDPObject->GetSheetDesc()->aSourceRange;
1551
	
1552
	USHORT i;
1553
 	for ( i=0; i<MAX_LABELS; i++ )
1554
		aSelectArr[i].reset();
1555
1556
	for ( i=0; i<MAX_FIELDS; i++ )
1557
	{
1558
		RemoveField (TYPE_COL, i);
1559
		RemoveField (TYPE_ROW, i);
1560
		RemoveField (TYPE_DATA, i);
1561
		RemoveField (TYPE_PAGE, i);
1562
	}
1563
1564
	aLabelDataArr.clear();
1565
	
1566
	aWndSelect.ClearFields();
1567
	
1568
	InitWndSelect( thePivotData.ppLabelArr, thePivotData.nLabels );
1569
	InitWnd( thePivotData.aColArr,  thePivotData.nColCount,  TYPE_COL );
1570
	InitWnd( thePivotData.aRowArr,  thePivotData.nRowCount,  TYPE_ROW );
1571
	InitWnd( thePivotData.aDataArr, thePivotData.nDataCount, TYPE_DATA );
1572
	aSlider.SetPageSize( PAGE_SIZE );
1573
	aSlider.SetVisibleSize( PAGE_SIZE );
1574
	aSlider.SetLineSize( LINE_SIZE );
1575
	aSlider.SetRange( Range( 0, ((thePivotData.nLabels+LINE_SIZE-1)/LINE_SIZE)*LINE_SIZE ) );
1576
1577
	if ( thePivotData.nLabels > PAGE_SIZE )
1578
	{
1579
        aSlider.SetEndScrollHdl( LINK( this, ScDPLayoutDlg, ScrollHdl ) );
1580
		aSlider.Show();
1581
	}
1582
	else
1583
		aSlider.Hide();
1584
1585
	if ( pViewData && pDoc )
1586
	{
1587
		/*
1588
		 * Aus den RangeNames des Dokumentes werden nun die
1589
		 * in einem Zeiger-Array gemerkt, bei denen es sich
1590
		 * um sinnvolle Bereiche handelt
1591
		 */
1592
1593
		aLbOutPos.Clear();
1594
		aLbOutPos.InsertEntry( aStrUndefined, 0 );
1595
		aLbOutPos.InsertEntry( aStrNewTable,  1 );
1596
1597
		ScAreaNameIterator aIter( pDoc );
1598
		String aName;
1599
		ScRange aRange;
1600
		String aRefStr;
1601
		while ( aIter.Next( aName, aRange ) )
1602
		{
1603
			if ( !aIter.WasDBName() )		// hier keine DB-Bereiche !
1604
			{
1605
				USHORT nInsert = aLbOutPos.InsertEntry( aName );
1606
1607
				aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc );
1608
				aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) );
1609
			}
1610
		}
1611
	}
1612
1613
1614
	
1615
	//Init();
1616
	return 0;
1617
}
1618
1619
1501
//----------------------------------------------------------------------------
1620
//----------------------------------------------------------------------------
1502
1621
1503
IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG )
1622
IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG )
(-)../../../sc.bak/source/ui/inc/anyrefdg.hxx (-1 / +2 lines)
Lines 140-146 Link Here
140
                        ScRefButton( Window* pParent, const ResId& rResId );
140
                        ScRefButton( Window* pParent, const ResId& rResId );
141
141
142
    void                SetReferences( ScAnyRefDlg* pDlg, ScRefEdit* pEdit );
142
    void                SetReferences( ScAnyRefDlg* pDlg, ScRefEdit* pEdit );
143
143
    ScRefEdit* 	   GetReferencesEdit ();
144
    void                SetStartImage();
144
    void                SetStartImage();
145
    void                SetEndImage();
145
    void                SetEndImage();
146
    inline void         DoRef() { Click(); }
146
    inline void         DoRef() { Click(); }
Lines 194-199 Link Here
194
                        ScAnyRefDlg( SfxBindings* pB, SfxChildWindow* pCW,
194
                        ScAnyRefDlg( SfxBindings* pB, SfxChildWindow* pCW,
195
                                     Window* pParent, USHORT nResId);
195
                                     Window* pParent, USHORT nResId);
196
    virtual             ~ScAnyRefDlg();
196
    virtual             ~ScAnyRefDlg();
197
    ScRefButton* GetRefButton()	{ return pRefBtn; }
197
198
198
    virtual void        SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0;
199
    virtual void        SetReference( const ScRange& rRef, ScDocument* pDoc ) = 0;
199
    virtual void        AddRefEntry();
200
    virtual void        AddRefEntry();
(-)../../../sc.bak/source/ui/inc/pvlaydlg.hxx (+4 lines)
Lines 170-177 Link Here
170
    FixedLine               aFlAreas;
170
    FixedLine               aFlAreas;
171
    ListBox                 aLbOutPos;
171
    ListBox                 aLbOutPos;
172
    FixedText               aFtOutArea;
172
    FixedText               aFtOutArea;
173
    FixedText			aFtInArea;
173
    ScRefEdit               aEdOutPos;
174
    ScRefEdit               aEdOutPos;
174
    ScRefButton             aRbOutPos;
175
    ScRefButton             aRbOutPos;
176
    ScRefEdit               aEdInPos;
177
    ScRefButton             aRbInPos;
175
    CheckBox                aBtnIgnEmptyRows;
178
    CheckBox                aBtnIgnEmptyRows;
176
    CheckBox                aBtnDetectCat;
179
    CheckBox                aBtnDetectCat;
177
    CheckBox                aBtnTotalCol;
180
    CheckBox                aBtnTotalCol;
Lines 252-257 Link Here
252
	DECL_LINK( SelAreaHdl, ListBox * );
255
	DECL_LINK( SelAreaHdl, ListBox * );
253
	DECL_LINK( MoreClickHdl, MoreButton * );
256
	DECL_LINK( MoreClickHdl, MoreButton * );
254
	DECL_LINK( EdModifyHdl, Edit * );
257
	DECL_LINK( EdModifyHdl, Edit * );
258
	DECL_LINK( EdInModifyHdl, Edit * );
255
	DECL_LINK( OkHdl, OKButton * );
259
	DECL_LINK( OkHdl, OKButton * );
256
	DECL_LINK( CancelHdl, CancelButton * );
260
	DECL_LINK( CancelHdl, CancelButton * );
257
};
261
};
(-)../../../sc.bak/source/ui/miscdlgs/anyrefdg.cxx (+5 lines)
Lines 317-322 Link Here
317
    pRefEdit = pEdit;
317
    pRefEdit = pEdit;
318
}
318
}
319
319
320
ScRefEdit* ScRefButton::GetReferencesEdit ()
321
{
322
    return pRefEdit;
323
}
324
320
//----------------------------------------------------------------------------
325
//----------------------------------------------------------------------------
321
326
322
void ScRefButton::Click()
327
void ScRefButton::Click()
(-)../../../sc.bak/source/ui/view/cellsh2.cxx (+2 lines)
Lines 598-603 Link Here
598
					}
598
					}
599
599
600
					const ScDPObject* pDPObject = pTabViewShell->GetDialogDPObject();
600
					const ScDPObject* pDPObject = pTabViewShell->GetDialogDPObject();
601
					ScRange aR = pDPObject->GetSheetDesc()->aSourceRange;
602
601
					if ( pDPObject )
603
					if ( pDPObject )
602
					{
604
					{
603
						const ScPivotItem* pPItem = (const ScPivotItem*)pItem;
605
						const ScPivotItem* pPItem = (const ScPivotItem*)pItem;

Return to issue 23658