Ask Your Question
1

Change default template image anchor to as character

asked 2016-08-12 19:25:55 +0200

Dargo gravatar image

Found several posts on this topic, many of them old, none of them work.

https://forum.openoffice.org/en/forum... Tick overwrite - where's that? Click from file - where's that?

https://ask.libreoffice.org/en/questi... No reply

Also tried making a new template, inserting image, editing "frame/graphics" style, deleting image, save as template. Using this new template, add new image, which still came up with anchor as paragraph. Using version 5.0.6.3 how do you make the default anchor type for new images "as character"?

edit retag flag offensive close merge delete

4 Answers

Sort by » oldest newest most voted
1

answered 2017-03-10 23:33:26 +0200

qrktx gravatar image

Answer at OO forum Essentially:

Save a template of how you want your document set up. For Windows, I put my template in

%AppData%\Roaming\LibreOffice\4\user\template

Open your template.odt file in 7-Zip. Edit the styles.xml file and change the properties in the following tag:

<style:style style:name="Graphics" style:family="graphic">

Change text:anchor-type="paragraph" to text:anchor-type="as-char"

I used HxD to modify the styles.xml file.

edit flag offensive delete link more

Comments

I did it (I use Mac OS Sierra). I have done all the things you said. So what to do next?

Zui Zui gravatar imageZui Zui ( 2018-08-27 12:16:38 +0200 )edit

There's no tag <style:style style:name="Graphics" style:family="graphic"> in my styles.xml. There's no "anchor-type" keyword anywhere in the unpacked template as well. styles.xml has the tag <style:default-style style:family="graphic"> instead. Setting "anchor-type" in it achieves nothing.

LibreOffice version: 6.0.3.2

shystar gravatar imageshystar ( 2018-09-02 12:15:15 +0200 )edit

These lines were in the OO default template. Apparently LO, at least modern versions, doesn't have these lines in the default template. You need to add them, preferably to your own template file.

After extracting styles.xml from the template file, add the following lines to the styles.xml file in the <office:styles> section (around the 11th line):

<style:style style:name="Graphics" style:family="graphic"><style:graphic-properties text:anchor-type="as-char" svg:x="0in" svg:y="0in" style:wrap="none" style:vertical-pos="top" style:vertical-rel="baseline" style:horizontal-pos="center" style:horizontal-rel="paragraph"/></style:style>

To see a human readable version of styles.xml, you can open styles.xml in a web browser. Editing is best done in a hex editor like HxD as there are no carriage returns/line feeds in the file. If you use HxD (Windows program), be sure to set HxD to INSERT mode ...(more)

qrktx gravatar imageqrktx ( 2019-06-18 05:07:02 +0200 )edit
0

answered 2017-03-11 22:46:39 +0200

JohnHa gravatar image

updated 2017-03-11 22:46:56 +0200

It's 3 mouse clicks per image so unless you need it a lot just do it for each image.

1 left-click image

2 left-click Anchor

3 left-click Anchor as character

edit flag offensive delete link more

Comments

1

Well, it's "only" 3 clicks... but just imagine this situation: I'm importing tens (hundreds) of single/scanned images into blank templates in order to print them as a PDF document... Just multiply those 3 clicks by the number of images... It's quite annoying, do you agree, don't you?
Think an option to set the default anchor type would be welcome by many users.

Regards, Max - Italy

Massimo Mula gravatar imageMassimo Mula ( 2018-01-28 22:36:34 +0200 )edit

I add thousands of images for custom handwriting recreation. 3 clicks X 1000 = 3000 clicks.

Getting REALLY tired of this.

tomjjones gravatar imagetomjjones ( 2018-06-15 01:05:47 +0200 )edit

Do what the dude qrktx said above, it works

Zui Zui gravatar imageZui Zui ( 2018-08-27 12:55:54 +0200 )edit

You can use keyboard shortcuts Instead of the 3 clicks (just look for the underlined letters in the menus):

Alt+o for the "Format" menu
h for "Anchor"
h for "As Character"

I had the same problem but I figured out later that this Alt+o→h→h key combination is pretty fast and convenient...

Matej gravatar imageMatej ( 2019-01-24 13:02:27 +0200 )edit

So much fun that everyone tells the OP that his problem is not a problem - when it clearly is an annoying lack of a feature for anyone writing reports with a lot of images in them. When I was working as a sw engineer in the 90s we thought computers would remove dumb manual actions - but here there are people telling us it is fine to perform 3 operations per file every time, for 10s-100s of files...

laz442 gravatar imagelaz442 ( 2019-06-09 21:35:05 +0200 )edit
0

answered 2016-08-12 20:49:21 +0200

RGB-es gravatar image

Not possible, it seems:

Bug 32484 - Allow anchor settings in frame styles

Bug 36535 - EDITING: Updating of Frame Style not working correctly, anchoring to character do not updates

I remember someone "hacking" an odt file to manually modify the anchoring, but I'm not sure what needs to be changed.

edit flag offensive delete link more

Comments

The 'hacking' idea is mentioned here: https://ask.libreoffice.org/en/questi...

jdpipe gravatar imagejdpipe ( 2018-09-22 00:28:49 +0200 )edit
0

answered 2016-08-12 23:48:53 +0200

Dargo gravatar image

Wow... first bug is dated 2010, and in the work log there is a comment that the problem dates back to 2003. With all the hits I see when searching for this problem, gotta wonder why developers can't find the time to fix it in the past 6-13 years.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-08-12 19:25:55 +0200

Seen: 2,290 times

Last updated: Mar 11 '17