diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2019-12-12 11:45:05 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2019-12-12 14:30:57 +0100 |
commit | 64bf055db690a4475cf49dc03800619674b891c2 (patch) | |
tree | f23228d5112e1d3764c79bae6f25950a9210880f /oox | |
parent | 3bf7a861b37a93e196b2e53eeaa5a561d26ed240 (diff) |
tdf#115698 android: Don't modify doc on color palette initialization
Previously, the call to 'ColorPaletteAdapter::setColorPalette' from
the 'ColorPickerAdapter' constructur (via 'initializeColorPalette')
would not just set the color palette, but also apply the color at
index (0, 0) to the current selection, since
'ColorPaleteAdapter::setPosition' calls
'colorPaletteListener.applyColor' after setting the position.
This is an undesirable side effect, and led to the situation described
in tdf#115698 that cell A1 would always get black background when
opening a spreadsheet in the Android viewer, since black is the color
at 'color_palette[0][0]' by default and cell A1 is explicitly selected
when Calc first opens, s. the 'CalcHeadersController' constructor.
For Writer, something similar could be reproduced by selecting a
word in a document using long-tap. If experimental editing mode was
enabled, that word got black background (other words selected
later didn't).
To avoid this, make 'ColorPaletteAdapter::setColorPalette' just set
the color palette and set back the values that indicate what is
selected but don't apply any color. (And make 'setColorPalette'
just take the palette as parameter, and set 0 for both start values,
as the only caller was doing as well).
Change-Id: I0fa720ac6550102701a2c82905c9720aab6daab2
Reviewed-on: https://gerrit.libreoffice.org/85044
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'oox')
0 files changed, 0 insertions, 0 deletions