Page 1 of 1
Problems with background styles
Posted: Wed Feb 06, 2008 4:08 pm
by jo73chignin
Hello,
First, sorry for my english : I'm french. I wrote this post for show you 2 bugs with the background image of a style (all of them, style of chapter, of page...) on Writer (I use 2.3.1 version)
-
The Background of a style (color or image) is always behind everything.
Indeed, for exemple :
-> you insert a text "Text_A".
-> you give to it a chapter style "Style_A" with a background image "Image_A".
-> you insert an image "Image_B".
-> you make it behind the text "Text_A".
=> "Image_B" is behind "Text_A"(normal

) but over "Image_A" (not normal

).
-
A PNG Background image of a style loose its transparancy
Indeed, for example :
-> you create a style of chapter "Style_C" with a PNG background image "Image_PNG" with transparency zones.
-> you create a style of page "Style_P" with a background image.
-> on a page with "Style_P", you put a text with "Style_C".
=>Image_PNG is in a white rectangle and so loose its transparency.
So, can you tell me if you they are reals bugs or it's just because I don't use correctly Open Writer. If it's not a bug, how to proceed ?
An another thing. It's not a bug but a request for a next version :
With actual version, a background of a page style respect margin.
Is it possible for a next version of Writer to have an option which define that the background will be on all the page? Indeed, when you make an image with border décoration, you can't use it for a page style because the border décorations are always under the text and not in margin.
If a function exist for doing that in actual version, can you tell me how to use it ?

Re: Problems with background styles
Posted: Wed Feb 06, 2008 9:28 pm
by foxcole
Just for future reference, per the Survival Guide (please see the link in my signature) please limit each post to one question. This makes it easier for other members to find issues related to their own questions.
jo73chignin wrote:-
The Background of a style (color or image) is always behind everything.
Indeed, for exemple :
-> you insert a text "Text_A".
-> you give to it a chapter style "Style_A" with a background image "Image_A".
-> you insert an image "Image_B".
-> you make it behind the text "Text_A".
=> "Image_B" is behind "Text_A"(normal

) but over "Image_A" (not normal

).
This is what I would expect to happen, if I understand correctly what you're describing. The image set as background (Image_A) is in the background, so it's always going to be behind other content. You've simply changed the background from white to whatever image or color you assigned. You'll notice you can't select or edit the background image... because it's just a different color "paper".
Inserting an image and wrapping it behind text means the image is still an image object, and it should appear in front of the background... where it would appear even if your background was still the default white.
Does that help? Or am I misunderstanding the problem?
jo73chignin wrote:- A PNG Background image of a style loose its transparancy
Indeed, for example :
-> you create a style of chapter "Style_C" with a PNG background image "Image_PNG" with transparency zones.
-> you create a style of page "Style_P" with a background image.
-> on a page with "Style_P", you put a text with "Style_C".
=>Image_PNG is in a white rectangle and so loose its transparency.
There is an issue with PNG transparency if you're using copy and paste to insert the image. Use Insert> Picture> From file instead. Does that help?
jo73chignin wrote:With actual version, a background of a page style respect margin.
Is it possible for a next version of Writer to have an option which define that the background will be on all the page? Indeed, when you make an image with border décoration, you can't use it for a page style because the border décorations are always under the text and not in margin.
If a function exist for doing that in actual version, can you tell me how to use it ?

It's already been requested. You might be interested in registering and voting for this issue:
http://www.openoffice.org/issues/show_bug.cgi?id=44935
Re: Problems with background styles
Posted: Thu Feb 07, 2008 7:18 pm
by jo73chignin
Thank you for your early awnsers.
"Just for future reference, per the Survival Guide (please see the link in my signature) please limit each post to one question. This makes it easier for other members to find issues related to their own questions.
"
Sorry, I didn't know. I will not do that again.
The Background of a style (color or image) is always behind everything.
I understand but I think that's not very nice.
A PNG Background image of a style loose its transparancy
I've seen the post with the copy/past and actually it seams to be the same bug. I agree that I can use the "Insert> Picture> From file instead" function but if I do that I loose all of the interest of styles. So it's not really nice too.
Affect a background image for all the page
I think that feature is exactly what I want. I hope that it will be on the next version !
Re: Problems with background styles
Posted: Thu Feb 07, 2008 10:02 pm
by Bill
foxcole wrote:jo73chignin wrote:-
The Background of a style (color or image) is always behind everything.
Indeed, for exemple :
-> you insert a text "Text_A".
-> you give to it a chapter style "Style_A" with a background image "Image_A".
-> you insert an image "Image_B".
-> you make it behind the text "Text_A".
=> "Image_B" is behind "Text_A"(normal

) but over "Image_A" (not normal

).
This is what I would expect to happen, if I understand correctly what you're describing. The image set as background (Image_A) is in the background, so it's always going to be behind other content. You've simply changed the background from white to whatever image or color you assigned. You'll notice you can't select or edit the background image... because it's just a different color "paper".
Inserting an image and wrapping it behind text means the image is still an image object, and it should appear in front of the background... where it would appear even if your background was still the default white.
Does that help? Or am I misunderstanding the problem?
I have to agree with jo73chignin. I would have expected any background image wrapped "in background" to appear behind any paragraph or character background but over any page background. Instead, I see that the image "in background" is over the paragraph background instead of behind it. I created a document in Word 2000 with character (text) background, paragraph background, and an image "behind text". In Word, the image was behind both the character and paragraph background as I expected, but when this document was opened in Writer, the paragraph background was behind the image. I don't know why. Why not just go ahead and also put the character background behind the image?
Re: Problems with background styles
Posted: Thu Feb 07, 2008 10:06 pm
by JohnV
Is it possible for a next version of Writer to have an option which define that the background will be on all the page? Indeed, when you make an image with border décoration, you can't use it for a page style because the border décorations are always under the text and not in margin.
Format your page as follow:
On Page tab -
Set page margins to 0 and ignore OOo's complaint.
On Border tab -
Set page border all around and set it's color to white.
Set Spacing to Text = the actual margins you want.
On Background tab -
Insert your Color or Picture.
Re: Problems with background styles
Posted: Thu Feb 07, 2008 11:30 pm
by foxcole
jo73chignin wrote:The Background of a style (color or image) is always behind everything.
I understand but I think that's not very nice.
I don't understand. What you seem to want is more of an image object arrangement than a background and second image. The whole purpose of a background is to be an immovable substrate. You can't select the white background (or any portion of it) and you can't move images behind it, so why would you expect to select any other color of background just because it was painted from an image?
If you want Image_B behind Image_A, why not make Image_B the background and Image_A the picture object? Either that or have two image objects that you can control with the Arrange options (right-click, or select the object and choose Format> Arrange).
jo73chignin wrote:I've seen the post with the copy/past and actually it seams to be the same bug. I agree that I can use the "Insert> Picture> From file instead" function but if I do that I loose all of the interest of styles.
No, you should still have all the style options available to you doing Insert> Picture> From file. It's a graphic object and retains all the properties of a graphic object, including styles.
Are you saying yours doesn't? If you insert a picture by that method, click on it and look in the Frames category of the Stylist, what is highlighted there? What do you see when you right-click on the inserted object?
jo73chignin wrote:I think that feature is exactly what I want. I hope that it will be on the next version !
Here's where you can find out what features are being developed for each new release (as well as a history of features for past releases):
Features - OpenOffice.org Wiki
Re: Problems with background styles
Posted: Fri Feb 08, 2008 12:48 am
by floris v
I heartily agree with foxcole here. If you want to have an image behind a background then you just don't understand what a background is. A background is behind everything, or it wouldn't be a background. That the programmers of MS Word get it all mixed up doesn't surprise me in the least, after all, they are also telling us that you can win a game of patience. From such folks you can expect anything.
Re: Problems with background styles
Posted: Fri Feb 08, 2008 6:58 am
by acknak
Well I'm afraid I have to disagree. No matter how you want to define the words, Writer's model of layers in a document is not logical, nor is it well suited to typical tasks such as what jo73chignin is trying to do. The background of a text style should be "stuck" to its text. You should not be able to insert an image between the text and it's background.
Writer could really benefit from full, logical support of layers in a document.
If you really need good control over layers of text and images, you have to use Draw.
Re: Problems with background styles
Posted: Fri Feb 08, 2008 10:04 am
by jo73chignin
Affect a background image for all the page
Thanks, Johnv, your method resolve my problem exactly how I want
The Background of a style (color or image) is always behind everything.
I agree with acknak.
A chapter background is the background for the chapter's text and not for all things in the page. For me it would be like background of Div content in html.
A PNG Background image of a style loose its transparancy
Sorry, foxcole I don't know if you understand what I want.
I know that you can "Insert> Picture> From file instead" an image an make it behind a text and I agree that with this method, the transparency of the image is not loose.
The problème is that if I write a long text with many titles with the same background image, I would like to make a chapter style with this background image. So, it would be very easy to affect and adjust the size the background style. The problem is, as I said, a PNG background image loose it transparency
With your method, I can have the same résult but
- it will take more time because I have to insert the image, make it behind the text and adjust the size for all titles manually.
- I think that the file will be more big because with the background image style, I memorise only one image and not one image for each title even if it's the same.
Re: Problems with background styles
Posted: Fri Feb 08, 2008 12:32 pm
by floris v
Layers is just rephrasing things, isn't it? I want to call a spade a spade. Therefore - if you have a paragraph with a background image for that paragraph and want to have an image behind that background, then maybe your design or your thinking is wrong. But on the other hand I'd say that the background of a page should be behind the background of a paragraph, and that should come behind the background of text in that paragraph.
Can't you simply put two images in that paragraph with one over the other, taking out the background image if you don't really want that to be the background?
Re: Problems with background styles
Posted: Fri Feb 08, 2008 9:04 pm
by foxcole
It's amazing what very different expectations we have regarding how a background should behave and what a floating image wrapped "behind text" should do. I would never expect a background to support transparency, because it's a background, nothing behind it... and I would expect a floating object set to wrap behind text, to wrap behind text and in front of the background. One size never truly does fit all!
Anyway, a document using an embedded image object only embeds the image once and points to it multiple times, whether you copy an already inserted image, or whether you choose Insert> Picture> From file each time. So, using the same image object in thirty different paragraphs is not going to result in a noticeably larger file than using the image in one paragraph.
Inserting the file is not as easy as applying a background style to a paragraph, but it isn't very difficult either. If you prefer tools to menus, the Drawing toolbar has a ready-made tool for Insert Picture From File.
Nor would you have to manually adjust the wrap each time. You could simply create and apply a style (see the Frames category in the Styles and Formatting window) that has the wrap and anchor options you want. You could even change the default style to do that, if that's what you'd use most of the time, and create other styles to handle images in other ways.
You could even make a macro to insert that picture from file and apply the graphic frame style, so you can accomplish the whole thing with one click on a tool or with a key combination.
Re: Problems with background styles
Posted: Fri Feb 08, 2008 9:51 pm
by Bill
I finally found a bug report about this issue if anyone wishes to vote for it or add comments:
picture in background between table cell background and table text
Re: Problems with background styles
Posted: Fri Feb 08, 2008 11:17 pm
by acknak
Actually, after playing around a little more, it seems that Writer does better than I thought. Although I don't understand the reason why, it seems that anything with wrap set to "Through, in background" behaves as a typical layered object. You can move it up and down in the stack and the object background always stays with the object's text (if any).
It seems that in this sense, you're absolutely right: in Writer, anything in the background behaves quite differently than things, um, not in the background. The paragraph background is not the background of an object, it's actually a layer that lives down in the basement, separate from the paragraph text. The same holds true for a paragraph background color.
If an image is only wrapped "Through" but not in background, then it always covers the text. If you have multiple objects like that, they can also be stacked as layers but they always cover the document text.
And of course the page background is behind everything.
It still seems highly counter-intuitive to me that the paragraph background should be 1) separable from the paragraph text, and 2) always behind everything but the page background.
You can work around this by putting the text in a text frame. That will keep the paragraph background together with the paragraph text.
Re: Problems with background styles
Posted: Fri Feb 08, 2008 11:44 pm
by foxcole
acknak wrote:Although I don't understand the reason why, it seems that anything with wrap set to "Through, in background" behaves as a typical layered object.
I suspect that's a highly ill-considered attempt to avoid using the same terminology as Word uses. That particular option is synonymous with Word's "behind text" and as you see, does not affect the background at all, so that was a poor choice of words. It simply places the image object behind the text---which has a bug of its own, in that if you try to click the text over such an image, the image is selected instead. This is fixed for the 3.0 release:
http://www.openoffice.org/issues/show_bug.cgi?id=28595
(Woo hoo! That frees up a vote for me so I can apply it to something else.)
Re: Problems with background styles
Posted: Sat Feb 09, 2008 9:26 pm
by Bill
I'm not convinced that an image wrapped "in background" is between the text and the background instead of being in the background. If the the image is between the text and the background, then why do I still see the character background in front of the image? It's obvious that some parts of the background must appear in front of other parts. It seems more logical to me that the image is in the background, but is in front of every part of the background except the character background.
Is there anything that prohibits floating images from being in the background? Is there any documentation about this? If two or more overlapping images are "in background", their order could still be set relative to each other, but they would all still appear in front of everything else in the background except the character background.
Re: Problems with background styles
Posted: Sun Feb 10, 2008 12:13 am
by acknak
See? The "background" nomenclature is a big part of the problem. I can't even parse Bill's post, because it gets very confusing to talk about "the background" when there are really an arbitrary number of layers available. A layer model is good because everyone is familiar with the concept of stacking up layers of things to form a complex layout, but in that model, the only "background" that's unambiguous is the layer that's always behind everything--which for Writer is the page background setting.
It seems that Writer has a "zoned" model, something like this:
Foreground layers
Document text
Background layers
Page background
Things wrapped "Through, in background" live in the Background layers space; things wrapped "Through" live in the Foreground layers space. You can adjust the stacking order of objects within those spaces using the Arrange > ... menu.
The paragraph background seems to live in a special place just above the page background, but behind everything else.
Bill: I'm not sure what you're referring to when you say "why do I still see the character background in front of the image?" Are you referring to my screenshot; if so, which part?
Re: Problems with background styles
Posted: Sun Feb 10, 2008 1:29 am
by Bill
acknak wrote:Bill: I'm not sure what you're referring to when you say "why do I still see the character background in front of the image?" Are you referring to my screenshot; if so, which part?
I don't think it's in your image. It's the background you get when you select some text, right-click, select Character, then specify a background graphic or color on the Background tab. It's the same background applied by the Highlighting button on the toolbar. Highlighting is always in front of an image which is wrapped "in background".
Your model of the layers is also the way it seems to me. "Highlighting" or character background would be at the top of the background layers. The "in background" images would then be below the "Highlighting", then the paragraph background would be below the "in background" images. There could also be several other layers below the page background. If the paragraph is in a table cell, there could be a cell background, a row background and a table background. If the table is in a section, there could then be a section background.
If "the background" is to be considered as being "behind everything", then it seems to me that the "in background" images must also be in "the background". If the images were between "the background" and the text, then there would also have to be another layer for the "highlighting" between the images and the text.
Re: Problems with background styles
Posted: Sun Feb 10, 2008 4:59 am
by acknak
Aaack. I think my head just exploded

Re: Problems with background styles
Posted: Sun Feb 10, 2008 5:37 am
by foxcole
Bill wrote:If "the background" is to be considered as being "behind everything"
It is.
Bill wrote:then it seems to me that the "in background" images must also be in "the background"
Nope, just behind text. If the image is wrapped behind text ("in background" but let's drop talking about it that way and continue to think of it as behind text) it's operating behind all text, yet it remains a graphic object that can be selected and dragged, unlike a paragraph or page background. The background stays in place but the image behind text can be moved around.
And
the image can be any size. This to me is the single best argument for having the inserted image appear over the paragraph background... otherwise small images would seem to disappear, if they happen to move or be dropped behind a paragraph with a background. Think what fun that would be to explain!
The character level is above, or overrides, the paragraph level, and the character background is part of the character style... so it still appears over the image behind text and over the paragraph background, because that's what happens when you apply
any character style over the paragraph style. An image inserted and wrapped behind text is not a style; it therefore can't be part of the background because the background
is part of a style.
So our model is more like this:
Text (can be any style)
Character style including background
Image behind text
Paragraph background
Page background