限制 Apache OpenOffice

From Apache OpenOffice Wiki
Jump to: navigation, search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
doc OOo

您可以针对单个用户、组或整个网络限制 Apache OpenOffice 程序模块的功能。对于不同用户,可以应用不同的限制。也可以通过创建一个 XML 格式的命令配置文件,限制可以在 Apache OpenOffice 程序中使用的菜单命令。

创建命令配置文件

创建命令配置文件的过程共分三步:

  • 确定要限制的功能的命令名称。
  • 创建 XML 配置文件。
  • 将该配置文件复制到 Apache OpenOffice 安装目录中的相应位置。

创建命令配置文件

  1. 确定要限制的功能的 UNO 命令名称
  2. 在文本编辑器中,创建一个 XML 配置文件。
    1. 使用以下文件结构。
    2.  <?xml version="1.0" encoding="UTF-8" ?>
       <oor:node oor:name="Commands" oor:package="org.openoffice.Office" 
       xmlns:oor="http://openoffice.org/2001/registry" 
       xmlns:xs="http://www.w3.org/2001/XMLSchema" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <node oor:name="Execute">
          <node oor:name="Disabled">
            <node oor:name="CommandName" oor:op="replace">
              <prop oor:name="Command">
                <value>CommandName</value>
              </prop>
            </node>
          </node>
        </node>
       </oor:node>
      

      Commands.xcu 文件使用以下模式:

       <?xml version='1.0' encoding='UTF-8'?>
       <oor:component-schema oor:name="Commands" 
       oor:package="org.openoffice.Office" xml:language="zh-CN" 
       xmlns:oor="http://openoffice.org/2001/registry" 
       xmlns:xs="http://www.w3.org/2001/XMLSchema" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <templates>
          <group oor:name="CommandType">
            <prop oor:name="Command" oor:type="xs:string"/>
          </group>
        </templates>
        <component>
          <group oor:name="Execute">
            <set oor:name="Disabled" oor:node-type="CommandType"/>
          </group>
        </component>
       </oor:component-schema>
      
    3. 为要限制的每种功能创建一个单独的节点。
    4. 在每个节点中,将 CommandName 一词替换为该功能的命令名称。
  3. 使用 Commands.xcu 名称保存该文件。

以下 Commands.xcu 文件可在 Apache OpenOffice 中禁用菜单自定义功能。要将此限制应用于所有用户,请将该文件复制到 network-install-dir/share/registry/data/org/openoffice/Office 目录中。

 <?xml version="1.0" encoding="UTF-8" ?>
 <oor:node oor:name="Commands" 
 oor:package="org.openoffice.Office" 
 xmlns:oor="http://openoffice.org/2001/registry" 
 xmlns:xs="http://www.w3.org/2001/XMLSchema" 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <node oor:name="Execute">
     <node oor:name="Disabled">
       <node oor:name="ConfigureDialog" oor:op="replace">
         <prop oor:name="Command">
           <value>ConfigureDialog</value>
         </prop>
       </node>
       <node oor:name="ConfigureToolboxVisible" oor:op="replace">;
         <prop oor:name="Command">
           <value>LoadToolBox</value>
         </prop>
       </node> 
     </node>
   </node>
  </oor:node>

有关命令名称及其说明的列表,请参阅 Apache OpenOffice UNO 命令名称索引

应用命令配置文件

可以在 Solaris、Linux 和 Windows 平台上将命令配置文件应用于 Apache OpenOffice。

  1. 退出所有 Apache OpenOffice 应用程序。
    在 Windows 中,确保退出了任务栏中的 Apache OpenOffice 快速启动程序。
  2. Commands.xcu 文件复制到相应目录中。
    • 要将配置应用于网络上的所有用户,请将 Commands.xcu 文件复制到以下目录中:
      network-install-dir/share/registry/data/org/openoffice/Office
    • 要将配置应用于网络上的特定用户,请将 Commands.xcu 文件复制到以下目录中:
      workstat-dir/user/registry/data/org/openoffice/Office

在重新启动 Apache OpenOffice 时,将会应用该配置。

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages