关于导入与导出筛选器

在 LibreOffice 中,除自身的 XML 格式以外,还可以打开和保存多种外来的 XML 格式。

但在有些情况下,您必须自己从「打开」对话框中选择文件类型。例如,如果您希望将一个文本格式的数据库表格当作数据库表格打开,那么在选择文件之后就需要将该文件的类型指定为「文本 CSV」。

BASIC Macros in Microsoft Office Documents

- 加载/保存 - VBA 属性 中,可以指定用于 MS Office 文档中的 VBA 宏代码的设置。必须先对 VBA 宏进行转换和调整,否则它们不能在 LibreOffice 中执行。通常,您只需要使用 LibreOffice 更改 Word、Excel 或 PowerPoint 文件的可见内容,然后再次以 Microsoft Office 格式保存此文件,而不需要更改这些文件所含有的宏。您可以根据需要设定 LibreOffice 的行为: VBA 宏以注释形式保存为 LibreOffice 的子例行程序,并且文档以 MS Office 格式保存时被重新正确写回;或者您可以选择装入时删除 Microsoft Office 宏。后一个选项是对 Microsoft Office 文档中的病毒的有效防护。

请注意相关的外部格式和文件类型

即使未安装某些筛选,也可以在「打开」和「保存」对话框中选择它们。如果选择这些筛选,将显示一条消息,提示您如果需要仍可以安装此筛选。

提示图标

文本过滤器「已编码文本」用于打开和保存用其他字符集来编码的文本文档。该过滤器有一个对话框,您可以在其中设置字符集、标准字体、语言和换段落。


以 HTML 格式进行导入与导出

使用 LibreOffice Writer,您可以在 HTML 文档中插入脚注与尾注。它们将作为元标记导出。脚注与尾注字符将作为超链接导出。

批注可将未知字符添加到 HTML 文档中。每个以 "HTML:..." 开始、并以 ">" 结束的批注将被作为 HTML 码来处理,但在导出时将不带这些标记。在 "HTML:..." 之后可以有多个标记,而在这些标记之间也可以有任意的文字。变元音将被转换为 ANSI 字符集。在导入时,同样将创建批注 (例如,对于在文档信息中没有位置的图元标记或未知标记)。

LibreOffice Writer 的 HTML 导入能够读取包含 UTF-8 或 UCS2 字符编码的文件。同时能显示 ANSI 字符集以及系统字符集中的所有字符。

当导出为 HTML 时,会使用在「 - 加载/保存 - HTML 兼容性」中定义的字符集。未在该处显示的字符会以替换格式写入,该格式会正确地显示在现代的网页浏览器中。当导出此类字符时,您将收到相应的警告。

If, in - Load/Save - HTML Compatibility, you select Mozilla Firefox or LibreOffice Writer as the export option, upon export all important font attributes are exported as direct attributes (for example, text color, font size, bold, italic, and so on) in CSS1 styles. (CSS stands for Cascading Style Sheets.) Importing is also carried out according to this standard.

"font" 属性对应 Mozilla Firefox; 在字体大小之前您可以指定可选的值给 "font-style" (italic, none), "font-variant" (normal, small-caps) 以及 "font-weight" (normal, bold)。

If LibreOffice Writer are set as the export option, the sizes of the control field and their internal margins are exported as styles (print formats). CSS1 size properties are based on "width" and "height" values. The "Margin" property is used to set equal margins on all sides of the page. To allow different margins, the "Margin-Left", "Margin-Right", "Margin-Top" and "Margin-Bottom" properties are used.

The distances of graphics and Plug-Ins to the content can be set individually for export to LibreOffice Writer. If the top/bottom or right/left margin is set differently, the distances are exported in a "STYLE" option for the corresponding tag as CSS1 size properties "Margin-Top", "Margin-Bottom", "Margin-Left" and "Margin-Right".

Frames are supported with the use of CSS1 extensions for absolute positioned objects. This applies only to the export options Mozilla Firefox and LibreOffice Writer. Frames can be aligned as graphics, and Floating Frames, but character-linked frames are not possible.

Frames are exported as "<SPAN>" or "<DIV>" tags if they do not contain columns. If they do contain columns then they are exported as "<MULTICOL>".

LibreOffice 中设置的度量单位用于 CSS1 属性的 HTML 导出。可在 - LibreOffice Writer - 常规或者 - LibreOffice Writer/Web - 视图中分别为文本和 HTML 文档设置度量单位。导出的小数点位数取决于度量单位。

度量单位

CSS1 中的度量单位名称

小数位数的最大值

毫米

mm

2

厘米

cm

2

英寸

in

2

Pica

pc

2

pt

1


LibreOffice 网页过滤器支持特定 CSS2 功能。但是要使用这些功能,就必须在「 - 加载/保存 - HTML 兼容性」中启用「导出打印布局」。在 HTML 文档中,除了可以 HTML 页面样式以外,还可以使用「首页」「左页」和「右页」页面样式。使用这些样式后,在打印时,首页、左页和右页将会使用不同的页面大小和页面边距属性。

编号的导入与导出

If, in - Load/Save - HTML Compatibility, the export option "LibreOffice Writer" is selected, the indents of numberings are exported as "margin-left" CSS1 property in the STYLE attribute of the <OL> and <UL> tags. The property indicates the difference relative to the indent of the next higher level.

段落左缩进在编号内作为 "margin-left" CSS1 属性来指定。首行缩进在编号中将被忽略,因此也不会被导出。

工作表文件的导入与导出

LibreOffice 可以导入与导出对已删除区域 (如引用的列) 的引用。在导出过程中可以查看整个公式,已删除的引用含有一个对引用的指示 (#REF!)。相应地,在导入过程中将为引用创建一个 #REF!。

图形文件的导入与导出

与 HTML 文档相类似,您可以选择使用名称中包括或不包括元素 (LibreOffice Impress) 的过滤器打开 LibreOffice 图形文件。如果不包括,则文档将作为 LibreOffice Draw 文档打开;否则,以旧版本的程序保存的文件将在 LibreOffice Impress 中被打开,这样,您就可以把这个文档用作演示文稿的基础。

导入 EPS 文件时,文档中将显示图形预览。如果无法预览,则文档中显示与图形大小相对应的占位符。在 Unix 和 Microsoft Windows 系统下,您可以使用 PostScript 打印机打印输入的文件。 当导出 EPS 图形时,将创建一个 TIFF 或 EPSI 格式的预览。如果 EPS 图形与其他图形一起以 EPS 格式导出,那么此文件将以原样嵌入新的文乀¶中。

在图形以 TIFF 格式导入与导出时,也将顾及所谓的多页 Tiff。这是指汇集一个单独文件中的各个图像,例如传真中的各页。

通过「文件 - 导出」可以访问某些 LibreOffice Draw 和 LibreOffice Impress 选项。详情参见 图像导出选项

PostScript

要以 PostScript 格式输出文档或图形:

  1. 如果您还没有 PostScript 打印机驱动程序,就先安装一个,例如 Apple LaserWriter 的驱动程序。

  2. 使用菜单命令「文件 - 打印」打印文档。

  3. 在对话框中选择 PostScript 打印机并选中「打印到文件」复选框。将创建 PostScript 文件。

请支持我们!