实验:OOo的粘连模板是什么效果?
编辑一文档A,里面有自定义的样式叫’逗你玩’,里面把字符设置为绿色的,然后保存了一个模板。然后用这个模板建立文档B,里面自然继承’逗你玩’样式,但编辑文档B的过程中,修改’逗你玩’样式的字符颜色为红色。
现在,再次打开文档A,请问A中的’逗你玩’应该是绿色还是红色?
这是在本次OOo3.0HC2的翻译过程中想起来的一个问题。翻译的是帮助文档中的一些句子,其中遇到了 \”sticky template\”这个说法,我把它翻译作‘粘连模板’。具体意思呢,看下面这两句自然就明白了。
“When you use <item type=\”menuitem\”>File - Template - Save</item> to save a template, the template will be stored in your user template directory. When you open a document that is based on such a template, the document will be checked for a changed template as decribed below. The template is associated with the document, it may be called a \”sticky template\”.”
“当你用<item type=\”menuitem\”>文件 - 模板 - 保存</item> 来保存一个模板,这个模板将存储在你的用户 template 文件夹。当你打开基于这样一个模板建立的文档时,文档将被检查模板是否改变,详见下文。该模板是与文档关联的,这也许叫做 \”粘连模板\”。@@@”
“When you open a document that was created from a \”sticky template\” (as defined above), <item type=\”productname\”>%PRODUCTNAME</item> checks to see if the template has been modified since the document was last opened. If the template was changed a dialog is shown where you can select which styles to apply to the document.”
“当你打开一个由 \”粘连模板\” (如上文定义)创建的文档,<item type=\”productname\”>%PRODUCTNAME</item> 会检查模板自最后一次打开以来是否被改变,如果模板被修改,一个对话框将出现,你能够选择哪个样式可以应用到这个文档。@@@”
实验结果:A中的‘逗你玩’还是绿色,丝毫不受后来文档B的影响。实际上,模板‘逗你玩’根本没有跟随文档B变化,它只取决于‘保存为模板’的那一刻。所以,即使再次从模板新建文档C,‘逗你玩’仍然是绿色。