Go to Gallery->Backgrounds
Right-click on a background and choose Insert->Background->Page or Paragraph
The page style has then a link like this:
<style:background-image xlink:href="../../../../opt/libreoffice4.0/program/../share/gallery/www-back/ice-blue.jpg" xlink:type="simple" xlink:actuate="onLoad"/>
and the paragraph style looks like this in the document structure:
<style:background-image xlink:href="../../../../opt/libreoffice4.0/program/../share/gallery/www-back/ice-light.jpg" xlink:type="simple" xlink:actuate="onLoad"/>
Instead of being linked, these images should be embedded in the document structure. Currently you only have to move the document to a different folder and the image won't load anymore.
Linking is always "dangerous" and I think any linking to gallery images should be removed. Additionally if a user tries to link to any external resource, he should be warned about the consequences of his action.
You are right, it should not be possible to link to gallery images. We discussed this also on the UX-Advise list: http://nabble.documentfoundation.org/Libreoffice-ux-advise-Remove-outdated-Gallery-images-tp4067129p4067444.html
I changed the title accordingly.
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":
fdo#67274 Always embed images from gallery
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
The mentioned commit fixes this problem only partly.
The Problem described in Comment 0 still exists.
Can someone else please have a look at it?
The Background URL is set here: http://opengrok.libreoffice.org/xref/core/svx/source/gallery2/galbrws2.cxx#372
Then the Image gets inserted here: http://opengrok.libreoffice.org/xref/core/sw/source/ui/shells/basesh.cxx#2662
Somewhere in between the SvxBrushItem (the background) is created as a linked graphic and that must be changed. But I don't know where that happens.
Can someone give a hint or take this over?
I mark this as MAB because it makes Documents depend on hard-coded image paths.
(Adding the Dev list to CC)
I'd need some help with the Fix for this bug. Can someone have a look at Comment 5 and help me with this?
No idea but I assume code like this:
706 const Graphic aGrf( pGalleryItem->GetGraphic() );
708 if ( nSelType & nsSelectionType::SEL_GRF )
709 rSh.ReRead( aGrfName, aFltName, &aGrf );
711 rSh.Insert( aGrfName, aFltName, aGrf );
Creates that Graphic - and that (somehow) the GraphicObject that gets created from that gets tagged as linked somehow - perhaps chasing rSh.Insert() and re-read to see what parameters they take might be useful (?)
CONFIRMED on LO 126.96.36.199.beta1 + Ubuntu 12.04.3
- Open LibreOffice
- Tools -> Gallery -> Backgrounds
- Right-click on aqua (first background in list) and choose: Insert as Background -> Page
- Right-click on the changed page background and select 'Page'
- Select 'Background' tab
- Under the 'File' section, the 'Link' checkbox is checked, and the filepath listed below the 'Browse' button is to a file in 'share/gallery' on disk.
- The background would be embedded in the file.
- The 'Link' checkbox would be unchecked
Adding repro information to whiteboard
not a MAB in my opionion..
* has always been that way for decades,
* graphic as page backgrounds are not a very common usecase
* easy workaround/manual fix (Goto Format|Page → Background and uncheck [ ] Link)
Not saying that this shouldn't be fixed, but that's not so important to have for 4.2.0 (4.2.x is enough IMHO)
(This is an automated message.)
Setting priority to highest as this is a 4.0 MAB. This is part of an effort to make the importance of MAB reflected in priority too.
Moving to mab4.1 (Bug 60270) because:
- 4.0 reached EOL (End Of Life)
- bug confirmed in later version
if issue is still present in 4.2.x current releases please move it to the mab4.2 list (Bug 65675) since 4.1.x is END OF LIFE
Removing from MAB - this is an enhancement and does not belong on mab list. Marking as enhancement also. The product works as designed, the request is just to change the design which by definition is an enhancement.
@Jan: it sounds like an easyhack. isn't it?
(In reply to Xisco Faulí from comment #14)
> @Jan: it sounds like an easyhack. isn't it?
it sure is, and a good one.