Version: 1.5.1 (using KDE 3.5.2, Debian Package 4:3.5.2-2+b1 (testing/unstable)) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.15-1-686 After I select cells in a spreadsheet and try to change their font, justification or other properties, some cells appear changed while others appear untouched. To reproduce: 1. Load my document ([1]) 2. Select multiple cells by - free selection, or - selecting row headers - selecting column headers 3. Change the font from Bitstream Vera Sans to Times New Roman => Not all cell fonts get changed. I observe similar (lack of) behavior when I try to right or left-align a selection. References: 1. http://roey.freeshell.org/mystuff/kde/kspread/more-hebrew-english-words.ods
Created an attachment (id=16943) [details] Test case; it's a mini-dictionary. Here's [1] from the bug above.
Works fine for me with 1.6 (cvs from 2006-08-01). So, bug is not reproducable (any longer?!).
Ok, retrying shows, that the bug is still valid and reproducable with following steps; 1. Open the at comment #1 attached file with KSpread 2. Selected the row #5 by clicking on the rowheader, so that all cells within that row are selected 3. Change the font from "Bitstream Vera Sans" to "Times New Roman" by using the at the Format-toolbar displayed font-selector. Result; B5, F5, H5 and all cells >=J5 (so, J5, K5,, L5, etc.) have still the font "Bitstream Vera Sans" while all other cells within that row have the font "Times New Roman".
I may like to add, that KSpread is right to _not_ apply the changed font to the whole row (as bugreports like #114635 show). But it seems to even don't apply the new font to cells that have already content.
KSpread has a fallback procedure for cell formats. If a cell has none, it looks at its row, which also could have one. If there's also no format, it falls back to the column. Assignments of a format to a row first process all non-default cells. The flag, that indicates, that a format attribute (e.g. font) is set, will be reset (!) and the so called "no-fallback-flag" for this attribute also. Then, the format is assigned to the row. Which should lead to the fact, that all cell in this row fall back to the format of the row. But unfortunately it does not work as expected.
SVN commit 570067 by nikolaus: Format Fix "some operations ignore arbitrary cells of a selection" by clearing the flags in Format and also in Style. BUGS: 130559 M +2 -2 branches/koffice/1.6/koffice/kspread/kspread_format.cc M +5 -0 branches/koffice/1.6/koffice/kspread/kspread_style.cc M +1 -0 branches/koffice/1.6/koffice/kspread/kspread_style.h M +2 -2 trunk/koffice/kspread/Format.cpp M +5 -0 trunk/koffice/kspread/Style.cpp M +1 -0 trunk/koffice/kspread/Style.h --- branches/koffice/1.6/koffice/kspread/kspread_format.cc #570066:570067 @@ -164,14 +164,14 @@ void Format::clearProperties() { m_mask = 0; - + m_pStyle->clearFeature( (Style::FlagsSet) ~(uint)0 ); formatChanged(); } void Format::clearProperty( Properties p ) { m_mask &= ~(uint)p; - + m_pStyle->clearFeature( (Style::FlagsSet) p ); formatChanged(); } --- branches/koffice/1.6/koffice/kspread/kspread_style.cc #570066:570067 @@ -1878,6 +1878,11 @@ return b; } +void Style::clearFeature( FlagsSet f ) +{ + m_featuresSet &= ~(uint)f; +} + QFont Style::font() const { QString family = fontFamily(); --- branches/koffice/1.6/koffice/kspread/kspread_style.h #570066:570067 @@ -196,6 +196,7 @@ bool hasProperty( Properties p ) const; bool hasFeature( FlagsSet f, bool withoutParent ) const; + void clearFeature( FlagsSet f ); uint features() const { return m_featuresSet; } uint bottomPenValue() const { return m_bottomPenValue; } --- trunk/koffice/kspread/Format.cpp #570066:570067 @@ -168,14 +168,14 @@ void Format::clearProperties() { m_mask = 0; - + m_pStyle->clearFeature( (Style::FlagsSet) ~(uint)0 ); formatChanged(); } void Format::clearProperty( Style::FlagsSet p ) { m_mask &= ~(uint)p; - + m_pStyle->clearFeature( p ); formatChanged(); } --- trunk/koffice/kspread/Style.cpp #570066:570067 @@ -1875,6 +1875,11 @@ return b; } +void Style::clearFeature( FlagsSet f ) +{ + m_featuresSet &= ~(uint)f; +} + QFont Style::font() const { QString family = fontFamily(); --- trunk/koffice/kspread/Style.h #570066:570067 @@ -219,6 +219,7 @@ bool hasProperty( Properties p ) const; bool hasFeature( FlagsSet f, bool withoutParent ) const; + void clearFeature( FlagsSet f ); uint features() const { return m_featuresSet; } uint bottomPenValue() const { return m_bottomPenValue; }
You need to log in before you can comment on or make changes to this bug.