我有一个文档,其中有多个图像作为链接插入,即通过插入>图片>来自档案> Link = [v] 。
整体文件结构如下所示:
C:\Users\John\Desktop\Test\
|-- test.odt
|-- image1.png
|-- image2.png
现在我想将文件从“Test”目录移动到“Images”。那就是:
C:\Users\John\Desktop\Test\
|-- test.odt
|-- Images\
|-- image1.png
|-- image2.png
由于这个原因,文档中的链接现在已经破坏,需要修复。
这假设文档中有大约30个图像,我想自动修复它们的路径,而不是手动修复它们。如何做到这一点?
我使用OpenOffice 4.1.3,但我相信,Open和Libre办公套装的任务相同。
答案 0 :(得分:0)
您想要更改该Writer文件if (!!url && !!url.trim()) { //Check if url is not blank
url = url.trim(); //Removes blank spaces from start and end
if (!/^(https?:)?\/\//i.test(url)) { //Checks for if url doesn't match either of: http://example.com, https://example.com AND //example.com
url = 'http://' + url; //Prepend http:// to the URL
}
} else {
//Handle empty url
}
上对象的属性GraphicURL
...
你有什么尝试?
什么不起作用?