Lines 90-95
Link Here
|
90 |
#include "pivot.hrc" |
90 |
#include "pivot.hrc" |
91 |
#include "dpobject.hxx" |
91 |
#include "dpobject.hxx" |
92 |
#include "dpsave.hxx" |
92 |
#include "dpsave.hxx" |
|
|
93 |
#include "dpshttab.hxx" |
93 |
#include "scmod.hxx" |
94 |
#include "scmod.hxx" |
94 |
|
95 |
|
95 |
using namespace com::sun::star; |
96 |
using namespace com::sun::star; |
Lines 150-155
Link Here
|
150 |
aFtOutArea ( this, ScResId( FT_OUTAREA ) ), |
151 |
aFtOutArea ( this, ScResId( FT_OUTAREA ) ), |
151 |
aEdOutPos ( this, ScResId( ED_OUTAREA ) ), |
152 |
aEdOutPos ( this, ScResId( ED_OUTAREA ) ), |
152 |
aRbOutPos ( this, ScResId( RB_OUTAREA ), &aEdOutPos ), |
153 |
aRbOutPos ( this, ScResId( RB_OUTAREA ), &aEdOutPos ), |
|
|
154 |
aFtInArea ( this, ScResId( FT_INAREA) ), |
155 |
aEdInPos ( this, ScResId( ED_INAREA) ), |
156 |
aRbInPos ( this, ScResId( RB_INAREA ), &aEdInPos ), |
153 |
aFlAreas ( this, ScResId( FL_OUTPUT ) ), |
157 |
aFlAreas ( this, ScResId( FL_OUTPUT ) ), |
154 |
|
158 |
|
155 |
aFtRow ( this, ScResId( FT_ROW ) ), |
159 |
aFtRow ( this, ScResId( FT_ROW ) ), |
Lines 177-183
Link Here
|
177 |
GetViewData() ), |
181 |
GetViewData() ), |
178 |
pDoc ( ((ScTabViewShell*)SfxViewShell::Current())-> |
182 |
pDoc ( ((ScTabViewShell*)SfxViewShell::Current())-> |
179 |
GetViewData()->GetDocument() ), |
183 |
GetViewData()->GetDocument() ), |
180 |
bRefInputMode ( FALSE ) |
184 |
bRefInputMode ( TRUE ) |
181 |
{ |
185 |
{ |
182 |
if ( pDPObject ) |
186 |
if ( pDPObject ) |
183 |
{ |
187 |
{ |
Lines 282-287
Link Here
|
282 |
InitWnd( thePivotData.aRowArr, thePivotData.nRowCount, TYPE_ROW ); |
286 |
InitWnd( thePivotData.aRowArr, thePivotData.nRowCount, TYPE_ROW ); |
283 |
InitWnd( thePivotData.aDataArr, thePivotData.nDataCount, TYPE_DATA ); |
287 |
InitWnd( thePivotData.aDataArr, thePivotData.nDataCount, TYPE_DATA ); |
284 |
|
288 |
|
|
|
289 |
ScRange inRange; |
290 |
String inString; |
291 |
inRange = pDlgDPObject->GetSheetDesc()->aSourceRange; |
292 |
inRange.Format( inString, STD_FORMAT, pDoc); |
293 |
aEdInPos.SetText(inString); |
294 |
|
285 |
aSlider.SetPageSize( PAGE_SIZE ); |
295 |
aSlider.SetPageSize( PAGE_SIZE ); |
286 |
aSlider.SetVisibleSize( PAGE_SIZE ); |
296 |
aSlider.SetVisibleSize( PAGE_SIZE ); |
287 |
aSlider.SetLineSize( LINE_SIZE ); |
297 |
aSlider.SetLineSize( LINE_SIZE ); |
Lines 299-304
Link Here
|
299 |
|
309 |
|
300 |
aLbOutPos .SetSelectHdl( LINK( this, ScDPLayoutDlg, SelAreaHdl ) ); |
310 |
aLbOutPos .SetSelectHdl( LINK( this, ScDPLayoutDlg, SelAreaHdl ) ); |
301 |
aEdOutPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdModifyHdl ) ); |
311 |
aEdOutPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdModifyHdl ) ); |
|
|
312 |
aEdInPos .SetModifyHdl( LINK( this, ScDPLayoutDlg, EdInModifyHdl ) ); |
302 |
aBtnOk .SetClickHdl ( LINK( this, ScDPLayoutDlg, OkHdl ) ); |
313 |
aBtnOk .SetClickHdl ( LINK( this, ScDPLayoutDlg, OkHdl ) ); |
303 |
aBtnCancel.SetClickHdl ( LINK( this, ScDPLayoutDlg, CancelHdl ) ); |
314 |
aBtnCancel.SetClickHdl ( LINK( this, ScDPLayoutDlg, CancelHdl ) ); |
304 |
|
315 |
|
Lines 1218-1234
Link Here
|
1218 |
|
1229 |
|
1219 |
void ScDPLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDoc ) |
1230 |
void ScDPLayoutDlg::SetReference( const ScRange& rRef, ScDocument* pDoc ) |
1220 |
{ |
1231 |
{ |
|
|
1232 |
ScRefEdit *tmpREd; |
1233 |
ScRefButton *tmpRBtn; |
1234 |
|
1221 |
if ( bRefInputMode ) |
1235 |
if ( bRefInputMode ) |
1222 |
{ |
1236 |
{ |
|
|
1237 |
tmpRBtn = GetRefButton(); |
1238 |
tmpREd = tmpRBtn->GetReferencesEdit(); |
1223 |
if ( rRef.aStart != rRef.aEnd ) |
1239 |
if ( rRef.aStart != rRef.aEnd ) |
1224 |
RefInputStart( &aEdOutPos ); |
1240 |
RefInputStart( tmpREd, tmpRBtn); |
|
|
1241 |
|
1225 |
/* |
1242 |
/* |
1226 |
ScAddress aAdr( nStartCol, nStartRow, nStartTab ); |
1243 |
ScAddress aAdr( nStartCol, nStartRow, nStartTab ); |
1227 |
aAdr.PutInOrder( ScAddress( nEndCol, nEndRow, nEndTab ) ); |
1244 |
aAdr.PutInOrder( ScAddress( nEndCol, nEndRow, nEndTab ) ); |
1228 |
*/ |
1245 |
*/ |
|
|
1246 |
|
1229 |
String aRefStr; |
1247 |
String aRefStr; |
1230 |
rRef.aStart.Format( aRefStr, STD_FORMAT, pDoc ); |
1248 |
|
1231 |
aEdOutPos.SetRefString( aRefStr ); |
1249 |
if ( tmpREd== &aEdInPos) |
|
|
1250 |
{ |
1251 |
USHORT nFmt = SCR_ABS_3D; //!!! nCurTab fehlt noch |
1252 |
if ( rRef.aStart.Tab() != rRef.aEnd.Tab() ) |
1253 |
nFmt |= SCA_TAB2_3D; |
1254 |
rRef.Format( aRefStr, nFmt, pDoc ); |
1255 |
} |
1256 |
else |
1257 |
rRef.aStart.Format( aRefStr, STD_FORMAT, pDoc ); |
1258 |
|
1259 |
tmpREd->SetRefString( aRefStr ); |
1232 |
} |
1260 |
} |
1233 |
} |
1261 |
} |
1234 |
|
1262 |
|
Lines 1389-1395
Link Here
|
1389 |
} |
1417 |
} |
1390 |
else |
1418 |
else |
1391 |
{ |
1419 |
{ |
1392 |
bRefInputMode = FALSE; |
1420 |
|
1393 |
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse |
1421 |
//@BugID 54702 Enablen/Disablen nur noch in Basisklasse |
1394 |
//SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg |
1422 |
//SFX_APPWINDOW->Disable(FALSE); //! allgemeine Methode im ScAnyRefDlg |
1395 |
} |
1423 |
} |
Lines 1426-1431
Link Here
|
1426 |
} |
1455 |
} |
1427 |
|
1456 |
|
1428 |
|
1457 |
|
|
|
1458 |
IMPL_LINK( ScDPLayoutDlg, EdInModifyHdl, Edit *, EMPTYARG ) |
1459 |
{ |
1460 |
|
1461 |
String theCurPosStr = aEdInPos.GetText(); |
1462 |
ScSheetSourceDesc *inSheet = pDlgDPObject->GetSheetDesc(); |
1463 |
ScRefTripel start, end; |
1464 |
ConvertDoubleRef (pDoc, theCurPosStr, 1, start, end ); |
1465 |
inSheet->aSourceRange = ScRange(start, end); |
1466 |
|
1467 |
pDlgDPObject->SetSheetDesc( *inSheet); |
1468 |
pDlgDPObject->InvalidateSource(); |
1469 |
pDlgDPObject->Output(); |
1470 |
pDlgDPObject->SetAlive( TRUE ); // needed to get structure information |
1471 |
pDlgDPObject->FillOldParam( thePivotData, FALSE ); |
1472 |
pDlgDPObject->FillLabelData( thePivotData, bShowAll, MAX_LABELS ); |
1473 |
|
1474 |
|
1475 |
USHORT i; |
1476 |
for ( i=0; i<MAX_LABELS; i++ ) |
1477 |
aSelectArr[i] = NULL; |
1478 |
|
1479 |
for ( i=0; i<MAX_FIELDS; i++ ) |
1480 |
{ |
1481 |
aColArr[i] = NULL; |
1482 |
aRowArr[i] = NULL; |
1483 |
aDataArr[i] = NULL; |
1484 |
} |
1485 |
|
1486 |
for ( i=0; i<nLabelCount; i++ ) |
1487 |
{ |
1488 |
delete aLabelDataArr[i]; |
1489 |
} |
1490 |
delete [] aLabelDataArr; |
1491 |
|
1492 |
nLabelCount = 0; |
1493 |
aWndSelect.ClearFields(); |
1494 |
|
1495 |
InitWndSelect( thePivotData.ppLabelArr, thePivotData.nLabels ); |
1496 |
InitWnd( thePivotData.aColArr, thePivotData.nColCount, TYPE_COL ); |
1497 |
InitWnd( thePivotData.aRowArr, thePivotData.nRowCount, TYPE_ROW ); |
1498 |
InitWnd( thePivotData.aDataArr, thePivotData.nDataCount, TYPE_DATA ); |
1499 |
aSlider.SetPageSize( PAGE_SIZE ); |
1500 |
aSlider.SetVisibleSize( PAGE_SIZE ); |
1501 |
aSlider.SetLineSize( LINE_SIZE ); |
1502 |
aSlider.SetRange( Range( 0, ((thePivotData.nLabels+LINE_SIZE-1)/LINE_SIZE)*LINE_SIZE ) ); |
1503 |
|
1504 |
if ( thePivotData.nLabels > PAGE_SIZE ) |
1505 |
{ |
1506 |
aSlider.SetEndScrollHdl( LINK( this, ScDPLayoutDlg, ScrollHdl ) ); |
1507 |
aSlider.Show(); |
1508 |
} |
1509 |
else |
1510 |
aSlider.Hide(); |
1511 |
|
1512 |
if ( pViewData && pDoc ) |
1513 |
{ |
1514 |
/* |
1515 |
* Aus den RangeNames des Dokumentes werden nun die |
1516 |
* in einem Zeiger-Array gemerkt, bei denen es sich |
1517 |
* um sinnvolle Bereiche handelt |
1518 |
*/ |
1519 |
|
1520 |
aLbOutPos.Clear(); |
1521 |
aLbOutPos.InsertEntry( aStrUndefined, 0 ); |
1522 |
aLbOutPos.InsertEntry( aStrNewTable, 1 ); |
1523 |
|
1524 |
ScAreaNameIterator aIter( pDoc ); |
1525 |
String aName; |
1526 |
ScRange aRange; |
1527 |
String aRefStr; |
1528 |
while ( aIter.Next( aName, aRange ) ) |
1529 |
{ |
1530 |
if ( !aIter.WasDBName() ) // hier keine DB-Bereiche ! |
1531 |
{ |
1532 |
USHORT nInsert = aLbOutPos.InsertEntry( aName ); |
1533 |
|
1534 |
aRange.aStart.Format( aRefStr, SCA_ABS_3D, pDoc ); |
1535 |
aLbOutPos.SetEntryData( nInsert, new String( aRefStr ) ); |
1536 |
} |
1537 |
} |
1538 |
} |
1539 |
|
1540 |
|
1541 |
|
1542 |
//Init(); |
1543 |
return 0; |
1544 |
} |
1545 |
|
1546 |
|
1429 |
//---------------------------------------------------------------------------- |
1547 |
//---------------------------------------------------------------------------- |
1430 |
|
1548 |
|
1431 |
IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG ) |
1549 |
IMPL_LINK( ScDPLayoutDlg, SelAreaHdl, ListBox *, EMPTYARG ) |