Development

Changeset 3891

You must first sign up to be able to contribute.

Changeset 3891

Show
Ignore:
Timestamp:
05/02/07 12:02:19 (6 years ago)
Author:
promag
Message:

easy setup
task automatically called on dev environment (avoids anoying task call when writing a document)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfOpenOfficePlugin/README

    r3683 r3891  
    11= The sfOpenOffice Plugin = 
     2[[PageOutline]] 
     3 
     4== Authors == 
     5 
     6  * [joao.paulo.barbosa] [at] [gmail] (promag at irc) 
     7  * [tiago.ribeiro] [at] [gmail] (fixe at irc) 
    28 
    39== Notes == 
     
    3440== Setup == 
    3541 
    36 === Installing the plugin === 
    37  
    38  
    39 For now the plugin is available in SVN. Type the following at project root: 
    40  
    41   {{{ 
    42   svn co http://svn.symfony-project.com/plugins/sfOpenOfficePlugin/ ./plugins/sfOpenOfficePlugin 
    43   }}} 
    44  
    45 === Setting up !OpenOffice === 
    46  
    47 '''Note''' In some systems, for instance Ubuntu, this section can be ignored (needs more testing) 
    48  
    49 In order to setup correctly !OpenOffice, you need to activate the license. We suggest that you run OpenOffice in X with the user apache. 
    50  
    51 Change to the apache user (here apache): 
    52  
    53 {{{ 
    54 sudo su apache 
    55 }}} 
    56  
    57 If you don't have possibility to run X, use a vncserver or Xvnc. 
    58 {{{ 
    59 vncserver :9 -nohttpd -rfbport 5901 
    60 }}} 
    61  
    62 Connect to remote host with a vnc client 
    63 {{{ 
    64 vnc host.com:5901 
    65 }}} 
    66  
    67 Then, just run !OpenOffice in display 9 
    68 {{{ 
    69 $PATH_TO_OOFICE_BIN_DIR/soffice -display :9 
    70 }}} 
    71  
    72 A license agreement dialog should appear. Proceed with the installation. 
    73  
    7442=== Installing the Macro === 
    7543 
     
    7947  * globally you can avoid the !OpenOffice profile of the apache user; 
    8048  * locally makes more sence;  
    81   * locally avoids reinstalling the macro when OpenOffice is updated; 
    82  
    83 Here we are going to install the macro in the global library. This can't be done in the !OpenOffice !IDE, so we need to edit the macro files. Despite this is not the best approach, it is required because !OpenOffice will be executed by Apache, and it has no !OpenOffice profile where we can install the macros. This behaviour will be changed in the near future. Feel free to drop other suggestions. 
     49  * ... 
     50 
     51Here we are going to install the macro in the global library. This can't be done in the !OpenOffice !IDE, so we need to edit the macro files. Despite this is not the best approach, it is required because !OpenOffice will be executed by Apache, and it has no !OpenOffice profile where we can install the macros. Feel free to drop other suggestions. 
    8452 
    8553So just edit one global module where the macros can be added: 
    8654 
    8755{{{ 
    88 sudo vim $PATH_TO_OPENOFFICE_LIBS/share/basic/Tools/Misc.xba 
     56vim $PATH_TO_OPENOFFICE_LIBS/share/basic/Tools/Misc.xba 
    8957}}} 
    9058 
     
    9260 
    9361{{{ 
    94 Sub ConvertTo( cFile, cOutFile, cFilter ) 
    95  
    96         cURL = ConvertToURL( cFile ) 
    97         oDoc = StarDesktop.loadComponentFromURL( cURL, "_blank", 0, Array(MakePropertyValue( "Hidden", False) )) 
    98         cURL = ConvertToURL( cOutFile ) 
    99         oDoc.storeToURL( cURL, Array( MakePropertyValue( "Overwrite", True), MakePropertyValue( "FilterName", cFilter ) )) 
    100         oDoc.close( True ) 
    101 End Sub 
    102  
     62Sub ConvertTo( cFile, cOutFile, cFilter )  
     63  
     64        cURL = ConvertToURL( cFile )  
     65        oDoc = StarDesktop.loadComponentFromURL( cURL, "_blank", 0, Array(MakePropertyValue( "Hidden", True ),))  
     66        cURL = ConvertToURL( cOutFile )  
     67        oDoc.storeToURL( cURL, Array( MakePropertyValue( "FilterName", cFilter ),)  
     68  
     69        oDoc.close( True )  
     70End Sub  
     71  
    10372Function MakePropertyValue(Optional cName as String, Optional uValue) As com.sun.star.beans.PropertyValue  
    10473        Dim oPropertyValue as New com.sun.star.beans.PropertyValue  
     
    135104For local macro installation use the same approach or use the OpenOffice IDE. We'll explain it later.  
    136105 
     106=== osX === 
     107 
     108If you have the stable version of symfony, and you want to try our test module, you need to do: 
     109{{{ 
     110ln -s plugins/sfOpenOfficePlugin/modules/sfOpenOffice apps/aplication/modules/sfOpenOffice 
     111}}} 
     112Check this ticket to see why. 
     113 
     114In your global app.yml, you should add the following parameters: 
     115{{{ 
     116all: 
     117  sfOpenOfficePlugin: 
     118    ooffice_cmd: /Applications/OpenOffice.app/Contents/MacOS/program/soffice 
     119    temp_dir:    '/tmp' 
     120    unzip_cmd:   'unzip -d' 
     121}}} 
     122 
     123To create your first dynamic template, you should use our task: 
     124{{{ 
     125symfony ooffice-create-document frontend sfOpenOffice test.odt 
     126}}} 
     127 
     128=== Linux === 
     129 
     130In order to setup correctly !OpenOffice, you need to activate the license. We suggest that you run OpenOffice in X with the user apache. 
     131 
     132Change to the apache user (here apache): 
     133 
     134{{{ 
     135sudo su apache 
     136}}} 
     137 
     138If you don't have possibility to run X, use a vncserver or Xvnc. 
     139{{{ 
     140vncserver :9 -nohttpd -rfbport 5901 
     141}}} 
     142 
     143Connect to remote host with a vnc client 
     144{{{ 
     145vnc host.com:5901 
     146}}} 
     147 
     148Then, just run !OpenOffice in display 9 
     149{{{ 
     150$PATH_TO_OOFICE_BIN_DIR/soffice -display :9 
     151}}} 
     152 
     153A license agreement dialog should appear. Proceed with the installation. 
     154 
     155=== Windows === 
     156 
    137157== Test it == 
    138158 
     
    197217 
    198218Comming soon 
    199  
    200 == Authors == 
    201  
    202   * [joao.paulo.barbosa] [at] [gmail] 
    203   * [tiago.ribeiro] [at] [gmail] 
    204