lok: chart when edited is visible on other user's document parts
- Open a spreadsheet with chart in multiple views. - With one view double-click in the chart. - With the other switch to a different sheet. => The chart is visible for the second view on the other sheet. The same is true in impress for slides. Change-Id: Ia3fe98b0a9fc94c7f3a8f59f28e3a8937eb51a2a Reviewed-on: https://gerrit.libreoffice.org/52960 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
This commit is contained in:
committed by
Jan Holesovsky
parent
1407aeea58
commit
08db80ebb4
@@ -178,12 +178,17 @@ bool LokChartHelper::Hit(const Point& aPos)
|
||||
|
||||
bool LokChartHelper::HitAny(const Point& aPos)
|
||||
{
|
||||
SfxViewShell* pCurView = SfxViewShell::Current();
|
||||
int nPartForCurView = pCurView ? pCurView->getPart() : -1;
|
||||
SfxViewShell* pViewShell = SfxViewShell::GetFirst();
|
||||
while (pViewShell)
|
||||
{
|
||||
LokChartHelper aChartHelper(pViewShell);
|
||||
if (aChartHelper.Hit(aPos))
|
||||
return true;
|
||||
if (pViewShell->getPart() == nPartForCurView)
|
||||
{
|
||||
LokChartHelper aChartHelper(pViewShell);
|
||||
if (aChartHelper.Hit(aPos))
|
||||
return true;
|
||||
}
|
||||
pViewShell = SfxViewShell::GetNext(*pViewShell);
|
||||
}
|
||||
return false;
|
||||
@@ -254,12 +259,17 @@ void LokChartHelper::PaintAllChartsOnTile(VirtualDevice& rDevice,
|
||||
aMapMode.SetScaleY(scaleY);
|
||||
rDevice.SetMapMode(aMapMode);
|
||||
|
||||
SfxViewShell* pCurView = SfxViewShell::Current();
|
||||
int nPartForCurView = pCurView ? pCurView->getPart() : -1;
|
||||
tools::Rectangle aTileRect(Point(nTilePosX, nTilePosY), Size(nTileWidth, nTileHeight));
|
||||
SfxViewShell* pViewShell = SfxViewShell::GetFirst();
|
||||
while (pViewShell)
|
||||
{
|
||||
LokChartHelper aChartHelper(pViewShell);
|
||||
aChartHelper.PaintTile(rDevice, aTileRect);
|
||||
if (pViewShell->getPart() == nPartForCurView)
|
||||
{
|
||||
LokChartHelper aChartHelper(pViewShell);
|
||||
aChartHelper.PaintTile(rDevice, aTileRect);
|
||||
}
|
||||
pViewShell = SfxViewShell::GetNext(*pViewShell);
|
||||
}
|
||||
rDevice.Pop();
|
||||
|
Reference in New Issue
Block a user