diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-12-12 19:05:31 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-12-14 01:12:41 -0500 |
commit | 1360b28b477f980a2c58659ffc298d0dd2cda20b (patch) | |
tree | 446e6c4aba4f8414687ebd884ea98ab983e475f4 /sc/source/ui/view/gridwin4.cxx | |
parent | 34b7826f9814b09dcd6aba15552bef1c330f3db2 (diff) |
bnc#791706: Support multiple selection in page fields.
This change allows selecting multiple items in page field popups in
pivot table.
Change-Id: I692e13c0815211bac6da47fefd83bba18c901c5c
Diffstat (limited to 'sc/source/ui/view/gridwin4.cxx')
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index aedcf22225f5..64e4bbcff241 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -719,7 +719,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod // Autofilter- und Pivot-Buttons - DrawButtons( nX1, nY1, nX2, nY2, aTabInfo, pContentDev ); // Pixel + DrawButtons( nX1, nX2, aTabInfo, pContentDev ); // Pixel // Notiz-Anzeiger @@ -1110,7 +1110,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, } } -void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2*/, ScTableInfo& rTabInfo, OutputDevice* pContentDev ) +void ScGridWindow::DrawButtons( SCCOL nX1, SCCOL nX2, ScTableInfo& rTabInfo, OutputDevice* pContentDev) { aComboButton.SetOutputDevice( pContentDev ); @@ -1211,33 +1211,33 @@ void ScGridWindow::DrawButtons( SCCOL nX1, SCROW /*nY1*/, SCCOL nX2, SCROW /*nY2 } } - if ( pRowInfo[nArrY].bPushButton && pRowInfo[nArrY].bChanged ) + if ( pRowInfo[nArrY].bPivotButton && pRowInfo[nArrY].bChanged ) { RowInfo* pThisRowInfo = &pRowInfo[nArrY]; nRow = pThisRowInfo->nRowNo; for (nCol=nX1; nCol<=nX2; nCol++) { CellInfo* pInfo = &pThisRowInfo->pCellInfo[nCol+1]; - if ( pInfo->bPushButton && !pInfo->bHOverlapped && !pInfo->bVOverlapped ) - { - Point aScrPos = pViewData->GetScrPos( nCol, nRow, eWhich ); - long nSizeX; - long nSizeY; - pViewData->GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY ); - long nPosX = aScrPos.X(); - long nPosY = aScrPos.Y(); - // bLayoutRTL is handled in setBoundingBox - - String aStr; - pDoc->GetString(nCol, nRow, nTab, aStr); - aCellBtn.setText(aStr); - aCellBtn.setBoundingBox(Point(nPosX, nPosY), Size(nSizeX-1, nSizeY-1), bLayoutRTL); - aCellBtn.setPopupLeft(false); // DataPilot popup is always right-aligned for now - aCellBtn.setDrawBaseButton(true); - aCellBtn.setDrawPopupButton(pInfo->bPopupButton); - aCellBtn.setHasHiddenMember(pInfo->bFilterActive); - aCellBtn.draw(); - } + if (pInfo->bHOverlapped || pInfo->bVOverlapped) + continue; + + Point aScrPos = pViewData->GetScrPos( nCol, nRow, eWhich ); + long nSizeX; + long nSizeY; + pViewData->GetMergeSizePixel( nCol, nRow, nSizeX, nSizeY ); + long nPosX = aScrPos.X(); + long nPosY = aScrPos.Y(); + // bLayoutRTL is handled in setBoundingBox + + String aStr; + pDoc->GetString(nCol, nRow, nTab, aStr); + aCellBtn.setText(aStr); + aCellBtn.setBoundingBox(Point(nPosX, nPosY), Size(nSizeX-1, nSizeY-1), bLayoutRTL); + aCellBtn.setPopupLeft(false); // DataPilot popup is always right-aligned for now + aCellBtn.setDrawBaseButton(pInfo->bPivotButton); + aCellBtn.setDrawPopupButton(pInfo->bPivotPopupButton); + aCellBtn.setHasHiddenMember(pInfo->bFilterActive); + aCellBtn.draw(); } } |