2016-05-27 43 views
0

我試圖在windows和ubuntu上運行open office calc的項目,但圖像僅在Windows中顯示,而不是ubuntu。 我用下面這段在Addons.xcu代碼OXT>註冊表>數據>單位>的OpenOffice>辦公找到> Addons.xcu在Ubuntu的開放辦公室電子表格文檔中的擴展工具欄上獲取圖像

我曾試圖遵循在[https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/AddOns/Images_for_Toolbars_and_Menus][1]

雖這麼說,但我無法獲得,如何在開放式辦公室電子表格工具欄中獲取ubuntu中的圖像。

<node oor:name="com.abc.user guide.images" oor:op="replace"> 
       <prop oor:name="URL" oor:type="xs:string"> 
        <value>com.abc:User Guide</value> 
       </prop> 
       <node oor:name="UserDefinedImages"> 
        <prop oor:name="ImageSmallURL">  <value>vnd.sun.star.extension://com.ABC/images/help16.png</value><!--Have tried this code but it works in windows, not Ubuntu--> 
         <!--      <value>%origin%/../../../../../images/help16.png</value> works in case of windows--><!--Have also tried this code,but it works in windows, not Ubuntu--> 
        </prop> 
        <prop oor:name="ImageBigURL"> 
         <value/> 
         <!--<value>vnd.sun.star.extension://com.ABC/images/help16.png</value>--> 
        </prop> 
        <prop oor:name="ImageSmallHCURL"> 
         <value/> 
        </prop> 
        <prop oor:name="ImageBigHCURL"> 
         <value/> 
        </prop> 
       </node> 
      </node> 
+0

您是否嘗試將//com.ABC更改爲//com.abc或com.abc或com.ABC這些xcu文件可能是一個真正的痛苦。 –

+0

是的,沒有工作。 – Rubal

回答

0

我認爲它的差異是由於操作系統,在下拉菜單中Ubuntu的開放式辦公室菜單工具欄菜單的圖像,是不可見的,而他們是可見的僅適用於Windows,當比較Windows之間的和Ubuntu。 我在Windows和Ubuntu上都嘗試了一個開放式辦公室擴展項目。即使如果我將圖標圖像放在Jframe上,它在打開時也不可見,而是在Ubuntu的任務欄中與Windows中的相反,其中圖像在框架中的頂部角落可見爲圖標,也可以在Windows的任務欄中找到。

還比較了開放式辦公室中其他菜單項,其中菜單按鈕上沒有圖像或下拉菜單項。

結論:操作系統的差異。

0

對於具有工具欄圖像的Libreoffice 5.0編寫器應用程序以及Linux Mint(Ubuntu)下拉菜單項上的4個圖像,使用Addons.xcu。
我希望你能從中挑選出骨頭,因爲它需要大量的編輯工作才能運行,而且文檔比幫助文檔更容易受到阻礙。
注意:圖像應該是26x26或16x16。我現在不記得爲什麼。

<?xml version='1.0' encoding='UTF-8'?> 
<oor:component-data oor:name="Addons" oor:package="org.openoffice.Office" xmlns:install="http://openoffice.org/2004/installation" 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="AddonUI"> 
    <node oor:name="OfficeMenuBarMerging"> 
    <node oor:name="libreoffice.footswitch" oor:op="replace"> 
    <node oor:name="S1" oor:op="replace"> 
    <prop oor:name="MergePoint"> 
     <value>.uno:ToolsMenu</value> 
    </prop> 
    <prop oor:name="MergeCommand"> 
     <value>AddAfter</value> 
    </prop> 
    <prop oor:name="MergeFallback"> 
     <value>AddPath</value> 
    </prop> 
    <node oor:name="MenuItems"> 
     <node oor:name="M1" oor:op="replace"> 
     <prop oor:name="Title"> 
     <value xml:lang="en-GB">Footswitch</value> 
     <value xml:lang="en-US">Footswitch</value> 
     <value xml:lang="es">Footswitch</value> 
     <value xml:lang="de">Footswitch</value> 
     </prop> 
     <prop oor:name="Context" oor:type="xs:string"> 
     <value>com.sun.star.text.TextDocument, com.sun.star.text.WebDocument</value> 
     </prop> 
     <node oor:name="Submenu"> 
     <node oor:name="M1" oor:op="replace"> 
     <prop oor:name="Title"> 
      <value xml:lang="en-GB">Start footswitch</value> 
      <value xml:lang="en-US">Start footswitch</value> 
      <value xml:lang="es">Iniciar footswitch</value> 
      <value xml:lang="de">Starten footswitch</value> 
     </prop> 
     <prop oor:name="URL"> 
      <value>vnd.sun.star.script:footswitch.oxt|footswitch|footswitch.py$footswitch?language=Python&amp;location=user:uno_packages</value> 
     </prop> 
     <prop oor:name="ImageIdentifier" oor:type="xs:string"> 
     <value>%origin%/icons/footswitch.png</value> 
     </prop> 
     <prop oor:name="Context" oor:type="xs:string"> 
      <value>com.sun.star.text.TextDocument, com.sun.star.text.WebDocument</value> 
     </prop> 
     </node> 
     </node> 
     <node oor:name="Submenu"> 
     <node oor:name="M2" oor:op="replace"> 
     <prop oor:name="Title"> 
      <value xml:lang="en-GB">List HID Devices</value> 
      <value xml:lang="en-US">List HID Devices</value> 
      <value xml:lang="es">Lista dispositivos de HID</value> 
      <value xml:lang="de">Liste HID Geräte</value> 

     </prop> 
     <prop oor:name="URL"> 
      <value>vnd.sun.star.script:footswitch.oxt|footswitch|footswitch.py$list_hid_devices?language=Python&amp;location=user:uno_packages</value> 
     </prop> 
     <prop oor:name="Context" oor:type="xs:string"> 
      <value>com.sun.star.text.TextDocument, com.sun.star.text.WebDocument</value> 
     </prop> 
     </node> 
     </node> 
     <node oor:name="Submenu"> 
     <node oor:name="M3" oor:op="replace"> 
     <prop oor:name="Title"> 
      <value xml:lang="en-GB">footswitch help</value> 
      <value xml:lang="en-US">footswitch help</value> 
      <value xml:lang="es">footswitch Ayuda</value> 
      <value xml:lang="de">footswitch Hilfe</value> 
     </prop> 
     <prop oor:name="URL"> 
      <value>vnd.sun.star.script:footswitch.oxt|footswitch|footswitch.py$HelpBox?language=Python&amp;location=user:uno_packages</value> 
     </prop> 
     <prop oor:name="Context" oor:type="xs:string"> 
      <value>com.sun.star.text.TextDocument, com.sun.star.text.WebDocument</value> 
     </prop> 
     </node> 
     </node> 
     <node oor:name="Submenu"> 
     <node oor:name="M4" oor:op="replace"> 
     <prop oor:name="Title"> 
      <value xml:lang="en-GB">Edit Config file</value> 
      <value xml:lang="en-US">Edit Config file</value> 
      <value xml:lang="es">Editar archivo de configuración</value> 
      <value xml:lang="de">Bearbeiten Konfigurationsdatei</value> 
     </prop> 
     <prop oor:name="URL"> 
      <value>vnd.sun.star.script:footswitch.oxt|footswitch|footswitch.py$EditConfigurationFile?language=Python&amp;location=user:uno_packages</value> 
     </prop> 
     <prop oor:name="Context" oor:type="xs:string"> 
      <value>com.sun.star.text.TextDocument, com.sun.star.text.WebDocument</value> 
     </prop> 
     </node> 
     </node> 
     </node> 
    </node> 
    </node> 
    </node> 
    </node> 
<!-- Insert a toolbar image for Start footswitch --> 
    <node oor:name="OfficeToolBar"> 
     <node oor:name="footswitch.OfficeToolBar" oor:op="replace"> 
      <node oor:name="fstb01" oor:op="replace"> 
       <prop oor:name="URL" oor:type="xs:string"> 
        <value>vnd.sun.star.script:footswitch.oxt|footswitch|footswitch.py$footswitch?language=Python&amp;location=user:uno_packages</value> 
       </prop> 
       <prop oor:name="Title" oor:type="xs:string"> 
        <value xml:lang="en">Start footswitch</value> 
        <value xml:lang="es">Iniciar footswitch</value> 
        <value xml:lang="de">Starten footswitch</value> 
       </prop> 
       <prop oor:name="Target" oor:type="xs:string"> 
        <value>_self</value> 
       </prop> 
       <prop oor:name="Context" oor:type="xs:string"> 
        <value>com.sun.star.text.TextDocument, com.sun.star.text.WebDocument</value> 
       </prop> 
      </node> 
    </node> 
    </node> 

<!-- Assign an image to any reference to the footswitch URL --> 
    <node oor:name="Images"> 
    <node oor:name="libreoffice.footswitch.image1" oor:op="replace"> 
    <prop oor:name="URL" oor:type="xs:string"> 
    <value>vnd.sun.star.script:footswitch.oxt|footswitch|footswitch.py$footswitch?language=Python&amp;location=user:uno_packages</value> 
    </prop> 
    <node oor:name="UserDefinedImages"> 
    <prop oor:name="ImageSmallURL" oor:type="xs:string"> 
    <value>%origin%/icons/footswitch_26.png</value> 
    </prop> 
    <prop oor:name="ImageBigURL" oor:type="xs:string"> 
    <value>%origin%/icons/footswitch_26.png</value> 
    </prop> 
    </node> 
    </node> 
    <node oor:name="libreoffice.footswitch.image2" oor:op="replace"> 
    <prop oor:name="URL" oor:type="xs:string"> 
    <value>vnd.sun.star.script:footswitch.oxt|footswitch|footswitch.py$EditConfigurationFile?language=Python&amp;location=user:uno_packages</value> 
    </prop> 
    <node oor:name="UserDefinedImages"> 
    <prop oor:name="ImageSmallURL" oor:type="xs:string"> 
    <value>%origin%/icons/config_16.png</value> 
    </prop> 
    </node> 
    </node> 
    <node oor:name="libreoffice.footswitch.image3" oor:op="replace"> 
    <prop oor:name="URL" oor:type="xs:string"> 
    <value>vnd.sun.star.script:footswitch.oxt|footswitch|footswitch.py$HelpBox?language=Python&amp;location=user:uno_packages</value> 
    </prop> 
    <node oor:name="UserDefinedImages"> 
    <prop oor:name="ImageSmallURL" oor:type="xs:string"> 
    <value>%origin%/icons/help-contents_16.png</value> 
    </prop> 
    </node> 
    </node> 
    <node oor:name="libreoffice.footswitch.image4" oor:op="replace"> 
    <prop oor:name="URL" oor:type="xs:string"> 
    <value>vnd.sun.star.script:footswitch.oxt|footswitch|footswitch.py$list_hid_devices?language=Python&amp;location=user:uno_packages</value> 
    </prop> 
    <node oor:name="UserDefinedImages"> 
    <prop oor:name="ImageSmallURL" oor:type="xs:string"> 
    <value>%origin%/icons/devices_16.png</value> 
    </prop> 
    </node> 
    </node> 
</node> 
</node> 
</oor:component-data> 
相關問題