Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


Hi,

If you apply any style that has borders re-defined in any way
(including "no borders"), setting the cell style will override whatever
settings you previously made. I did a few tests and if, in your style
definition you only change - for instance - the background color, then
the borders that were set previously around the cell (Format >
Cells...) remain unchanged when the style is applied.

If you want to re-initialise the border definition, you can press the
"Standard" button in the bottom right corner of the Style Edit panel
when the Borders tab is selected. This will reset the definition to the
setting of the parent (Herited from on the Organizer tab) - important
note here: if the parent has any border settings, then you will not be
able to achieve your objective of having a style that uses "whatever
was already there". This means you should create your styles as
children of Default, and never change Default itself unless it's for
font settings or background color.

Now, what is it you are trying to do? Are you creating styles to apply
Conditional Formatting? Or are you just trying to make your table
"pretty"? If it's the latter, I suggest you do it "à la Excel" and just
apply the formatting (background, borders, fonts, etc.) manually,
without styles. If it's Conditional Formatting, apply the borders
manually, then apply the highlighting styles to obtain the effect you
are looking for, based on the condition set. You can also use the STYLE
function to dynamically apply a style from a formula:

- If the result is a number, the formula would then be:
=Calculation_of_the_number+STYLE("StyleName")
- If the result is text, the formula could be:
=CONCATENATE(Calculatiom_of_the_text,TEXT(STYLE("StyleName")," "))

This also works, but still requires you to manually apply the borders.
Also note that trying multiple styles to a cell does not work (e.g.
=Calculation_of_the_number+STYLE("StyleName1")+STYLE("StyleName2")+STYL
E("StyleName3")+...): only the last applied style is kept.

I hope this helps.

Rémy.
 
Le vendredi 04 janvier 2019 à 23:33 +0100, Johnny Rosenberg a écrit :
Sorry for bothering again, but how do I set certain things in a style to
”don't change”?
For instance, I have cell styles with different background colours that I
apply to cells in a sheet looking like a table with different borders and
things like that, for instance the first cell in a column has an upper
border line, the last one has a lower border line. When I apply a cell
style to these, the lines disappear and I have to add them again, manually.
Or if I add the lines to the style, they are also added where I don't want
them. Creating a style for each thinkable scenario is of course
overwhelming, and not a convenient way to go.
I just want to set all border lines to ”whatever was already there”, and I
thought I could, but it didn't work.
When I click a line in the border line section in the styles dialogue, a
line appears, if I click again the line turns thicker and grayer and a
third click removes the line again, but neither of those three states seems
to do what I want. Either lines are drawn or removed, never left untouched
when applying the style.
What am I missing?

Yes, even the bug-monster Excel can do this. :o


Kind regards

Johnny Rosenberg



-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.