<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    probably you must use xStorable.store<u>As</u>URL<br>
    hope it help<br>
    <br>
    Fernand<br>
    <br>
    <div class="moz-cite-prefix">On 24/02/2015 10:48, Bartłomiej Mikos
      PrimeSoft Polska wrote:<br>
    </div>
    <blockquote cite="mid:54EC48D7.2050304@primesoft.pl" type="cite">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      Good Morning,<br>
      <div class="moz-forward-container"> <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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LibreOffice mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/libreoffice">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>