<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Tahoma">Good morning,<br>
      <br>
      I solved the problem. I thougth than UpdateDocMode.NEVER_UPDATE
      will set up loading without warning. It is not true, the problem
      solved set libre office by hand in options -> set update
      document from on request to never update. It solving the problem.
      I thinking now why UpdateDocMode property not working and how set
      Never Update documents from code (its not good idea to setting
      libre office conf by hand :D).<br>
    </font>
    <div class="moz-forward-container"><br>
      However, thanks for help. If You will have fast answer for no
      update by code, it will be glad to read good tip. <br>
      <br>
      Have a nice day,<br>
      Bartłomiej Mikos<br>
      <br>
      --- Treść przekazanej wiadomości ---
      <table class="moz-email-headers-table" border="0" cellpadding="0"
        cellspacing="0">
        <tbody>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Temat: </th>
            <td>Re: Ask for help, Young developer request</td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Data: </th>
            <td>Mon, 23 Feb 2015 08:35:30 +0100</td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Nadawca:
            </th>
            <td>Bartłomiej Mikos PrimeSoft Polska
              <a class="moz-txt-link-rfc2396E" href="mailto:bartlomiej.mikos@primesoft.pl"><bartlomiej.mikos@primesoft.pl></a></td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Adresat:
            </th>
            <td>Andrew Pitonyak <a class="moz-txt-link-rfc2396E" href="mailto:andrew@pitonyak.org"><andrew@pitonyak.org></a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      Good Morning,<br>
      <br>
      I tried use XModifiable to close xlsx file, my method for making
      pdf looks like that: <br>
      <br>
          public void convertToPdf(String sourcePath, String
      destinyPath)<br>
                  throws java.lang.Exception {<br>
      <br>
              PropertyValue[] properties = new PropertyValue[3];<br>
      <br>
              properties[0] = getHiddenProperty();<br>
      <br>
              properties[1] = new PropertyValue();<br>
              properties[1].Name = "UpdateDocMode";<br>
              properties[1].Value = new Short((short) 1);<br>
      <br>
              properties[2] = new PropertyValue();<br>
              properties[2].Name = "ReadOnly";<br>
              properties[2].Value = new Boolean(true);<br>
      <br>
              String sourceURL = convertFilePathToURL(sourcePath);<br>
              String destinyURL = convertFilePathToURL(destinyPath);<br>
      <br>
              XComponent xComponent =
      xComponentLoader.loadComponentFromURL(<br>
                      sourceURL, "_blank", 0, properties);<br>
      <br>
              XModel xModel = UnoRuntime.queryInterface(XModel.class,
      xComponent);<br>
      <br>
              XModifiable xModifiable =
      UnoRuntime.queryInterface(XModifiable.class,<br>
                      xModel);<br>
      <br>
              xModifiable.setModified(false);<br>
      <br>
              XStorable xStorable = null;<br>
              if (xComponent != null) {<br>
                  xStorable = UnoRuntime.queryInterface(XStorable.class,
      xComponent);<br>
      <br>
                  if (xStorable != null) {<br>
                      properties = new PropertyValue[2];<br>
                      properties[0] = getPDFWriterProperty();<br>
                      properties[1] = new PropertyValue();<br>
                      properties[1].Name = "Wait";<br>
                      properties[1].Value = new Boolean(true);<br>
      <br>
                      xStorable.storeToURL(destinyURL, properties);<br>
                  } <br>
              } <br>
      <br>
              //I tried use XModifiable here too<br>
      <br>
              if (xStorable != null) {<br>
                  XCloseable closeable =
      UnoRuntime.queryInterface(XCloseable.class,<br>
                          xStorable);<br>
                  if (closeable != null) {<br>
                      try {<br>
                          closeable.close(true);<br>
                      } catch (CloseVetoException closeVetoException) {<br>
                         //exception problem<br>
                      }<br>
                  } else {<br>
                      XComponent xComp =
      UnoRuntime.queryInterface(XComponent.class,<br>
                              xStorable);<br>
                      xComp.dispose();<br>
                  }<br>
              }<br>
          }<br>
      <br>
      It not helps with that issue. Maybe usefull information is that I
      used UpdateDocMode (all options) and there still appears warn
      window "update/links [yes][no]". Have You some other tips which
      can help?. <br>
      <br>
      Thanks you for Your interest,<br>
      Have a nice day. <br>
      <br>
      <div class="moz-cite-prefix">W dniu 2015-02-20 o 14:35, Andrew
        Pitonyak pisze:<br>
      </div>
      <blockquote cite="mid:201502201335.t1KDZrFG023253@wendy.xaox.net"
        type="cite">
        <pre wrap="">First use XModifiable and if
"isModified" is true call
"setModified" to set to false.

See of that helps.

On Feb 20, 2015 3:12 AM, =?UTF-8?Q?Bart=C5=82omiej_Mikos_PrimeSoft_Polska?= <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:bartlomiej.mikos@primesoft.pl"><bartlomiej.mikos@primesoft.pl></a> wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Good Morning, 

I have problem with use of java LibreOffice Api 4.3 

Is a possible way to close XComponent (xlsx type) in save way?. 

I have converting to pdf method. I use XStorable.storeToURL() The 
converting works fine, but when I try to close like this: 

         if (xStorable != null) { 
             XCloseable closeable = 
UnoRuntime.queryInterface(XCloseable.class, xStorable); 
             if (closeable != null) { 
                 try { 
                     closeable.close(true); 
                 } catch (CloseVetoException closeVetoException) { 
                     //problem with xlsx files, always occure 
                 } 
             } else { 
                 XComponent xComp = 
UnoRuntime.queryInterface(XComponent.class, xStorable); 
                 xComp.dispose(); 
             } 
         } 

I tried to dispose a XController and the XFrame. In that case window is 
closed, but in next time XComponentLoader cannot load the XComponent, 
problem with socket etc. 

Can You tell me what i should do to make it work fine?. Maybe i should 
know more about something or You had some simillar problems?. 

I hope You will find time to answer, 
Have a nice day. 


_______________________________________________ 
LibreOffice mailing list 
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a> 
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/libreoffice">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a> 
</pre>
        </blockquote>
      </blockquote>
      <br>
      <div class="moz-signature">
        <!--<meta charset="acii">-->
        <p style="font-size: 12px;color: #666666;font-family: Tahoma,
          sans-serif;line-height: 1.4"> <span style="font-size:
            15;color: #000000;">Z poważaniem,</span> <br>
          <span style="font-size: 15;color: #000000;">Bartłomiej Mikos</span>
          <br>
          --<br>
          <span style="font-size: 15px;color:#003380;font-weight: bold;">Bartłomiej

            Mikos</span><br>
          <span style="font-size: 12px;color:#003380">software engineer</span>
          <br>
          <a moz-do-not-send="true"
            href="mailto:bartlomiej.mikos@primesoft.pl"
            style="text-decoration: none;color: #666666;">bartlomiej.mikos@primesoft.pl</a><br>
          <a moz-do-not-send="true" href="http://www.primesoft.pl"
            style="text-decoration: none;color: #666666;">www.primesoft.pl</a>
          <br>
          <br>
          <span style="font-size: 13px;color:#003380;font-weight: bold;">PrimeSoft

            Polska Sp. z o.o.</span><br>
          ul. Perkuna 25, 61-615 Poznań tel/fax 61/833-17-72<br>
          NIP 7831592998 Regon 634610845 KRS 0000221565 Kapitał zakł.
          50000pln<br>
          NORDEA Bank Polska S.A. PL 50 1440 1130 0000 0000 0336 0806 <br>
          <br>
          <strong>Dla Państwa już od 10 lat</strong><br>
          Dnia 25 września 2014 roku odbyła się konferencja "10-lecie
          PrimeSoft Polska: okiem klienta, okiem dostawcy – wymiana
          doświadczeń biznesowych". W wydarzeniu wzięli udział
          przedstawiciele firm i instytucji będących klientami oraz
          partnerami biznesowymi PrimeSoft Polska. <a
            moz-do-not-send="true"
            href="http://www.youtube.com/watch?v=FjsrjSmaNaQ">Relacja z
            wydarzenia</a> </p>
      </div>
      <br>
    </div>
    <br>
  </body>
</html>