Changeset 3891
- Timestamp:
- 05/02/07 12:02:19 (6 years ago)
- Files:
-
- plugins/sfOpenOfficePlugin/README (modified) (6 diffs)
- plugins/sfOpenOfficePlugin/config (added)
- plugins/sfOpenOfficePlugin/config/app.yml (added)
- plugins/sfOpenOfficePlugin/config/config.php (added)
- plugins/sfOpenOfficePlugin/config/ooffice-osx-env.sh (added)
- plugins/sfOpenOfficePlugin/config/ooffice-osx.sh (added)
- plugins/sfOpenOfficePlugin/config/ooffice-unix-env.sh (added)
- plugins/sfOpenOfficePlugin/config/ooffice-unix.sh (added)
- plugins/sfOpenOfficePlugin/config/sfOpenOfficePlugin.odt (added)
- plugins/sfOpenOfficePlugin/data (added)
- plugins/sfOpenOfficePlugin/data/tasks (added)
- plugins/sfOpenOfficePlugin/data/tasks/sfPakeOpenOffice.php (added)
- plugins/sfOpenOfficePlugin/data/transformations (added)
- plugins/sfOpenOfficePlugin/data/transformations/ooffice2php.xsl (added)
- plugins/sfOpenOfficePlugin/lib (added)
- plugins/sfOpenOfficePlugin/lib/sfOOImage.class.php (added)
- plugins/sfOpenOfficePlugin/lib/sfOpenOfficeDocumentView.class.php (added)
- plugins/sfOpenOfficePlugin/modules (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOffice (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOffice/actions (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOffice/actions/actions.class.php (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOffice/documents (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOffice/documents/spreadsheet.ods (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOffice/documents/test.odt (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOffice/templates (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOfficeSetup (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOfficeSetup/actions (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOfficeSetup/actions/actions.class.php (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOfficeSetup/templates (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOfficeSetup/templates/firstOsx.php (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOfficeSetup/templates/firstUnix.php (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOfficeSetup/templates/firstWindows.php (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOfficeSetup/templates/runSuccess.php (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOfficeSetup/templates/secondSuccess.php (added)
- plugins/sfOpenOfficePlugin/modules/sfOpenOfficeSetup/templates/xorgSuccess.php (added)
- plugins/sfOpenOfficePlugin/package.xml (added)
- plugins/sfOpenOfficePlugin/web (added)
- plugins/sfOpenOfficePlugin/web/images (added)
- plugins/sfOpenOfficePlugin/web/images/openoffice.png (added)
- plugins/sfOpenOfficePlugin/web/images/placeholder.jpg (added)
- plugins/sfOpenOfficePlugin/web/images/xorg.png (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfOpenOfficePlugin/README
r3683 r3891 1 1 = 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) 2 8 3 9 == Notes == … … 34 40 == Setup == 35 41 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/sfOpenOfficePlugin43 }}}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 apache55 }}}56 57 If you don't have possibility to run X, use a vncserver or Xvnc.58 {{{59 vncserver :9 -nohttpd -rfbport 590160 }}}61 62 Connect to remote host with a vnc client63 {{{64 vnc host.com:590165 }}}66 67 Then, just run !OpenOffice in display 968 {{{69 $PATH_TO_OOFICE_BIN_DIR/soffice -display :970 }}}71 72 A license agreement dialog should appear. Proceed with the installation.73 74 42 === Installing the Macro === 75 43 … … 79 47 * globally you can avoid the !OpenOffice profile of the apache user; 80 48 * 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 51 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. Feel free to drop other suggestions. 84 52 85 53 So just edit one global module where the macros can be added: 86 54 87 55 {{{ 88 sudovim $PATH_TO_OPENOFFICE_LIBS/share/basic/Tools/Misc.xba56 vim $PATH_TO_OPENOFFICE_LIBS/share/basic/Tools/Misc.xba 89 57 }}} 90 58 … … 92 60 93 61 {{{ 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 62 Sub 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 ) 70 End Sub 71 103 72 Function MakePropertyValue(Optional cName as String, Optional uValue) As com.sun.star.beans.PropertyValue 104 73 Dim oPropertyValue as New com.sun.star.beans.PropertyValue … … 135 104 For local macro installation use the same approach or use the OpenOffice IDE. We'll explain it later. 136 105 106 === osX === 107 108 If you have the stable version of symfony, and you want to try our test module, you need to do: 109 {{{ 110 ln -s plugins/sfOpenOfficePlugin/modules/sfOpenOffice apps/aplication/modules/sfOpenOffice 111 }}} 112 Check this ticket to see why. 113 114 In your global app.yml, you should add the following parameters: 115 {{{ 116 all: 117 sfOpenOfficePlugin: 118 ooffice_cmd: /Applications/OpenOffice.app/Contents/MacOS/program/soffice 119 temp_dir: '/tmp' 120 unzip_cmd: 'unzip -d' 121 }}} 122 123 To create your first dynamic template, you should use our task: 124 {{{ 125 symfony ooffice-create-document frontend sfOpenOffice test.odt 126 }}} 127 128 === Linux === 129 130 In order to setup correctly !OpenOffice, you need to activate the license. We suggest that you run OpenOffice in X with the user apache. 131 132 Change to the apache user (here apache): 133 134 {{{ 135 sudo su apache 136 }}} 137 138 If you don't have possibility to run X, use a vncserver or Xvnc. 139 {{{ 140 vncserver :9 -nohttpd -rfbport 5901 141 }}} 142 143 Connect to remote host with a vnc client 144 {{{ 145 vnc host.com:5901 146 }}} 147 148 Then, just run !OpenOffice in display 9 149 {{{ 150 $PATH_TO_OOFICE_BIN_DIR/soffice -display :9 151 }}} 152 153 A license agreement dialog should appear. Proceed with the installation. 154 155 === Windows === 156 137 157 == Test it == 138 158 … … 197 217 198 218 Comming soon 199 200 == Authors ==201 202 * [joao.paulo.barbosa] [at] [gmail]203 * [tiago.ribeiro] [at] [gmail]204