[Libreoffice-commits] core.git: Changes to 'refs/changes/99/2999/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/76/5176/2'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/76/5176/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/90/2990/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/23/3023/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/03/3003/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/21/3021/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/09/3009/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/22/3022/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/10/3010/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/96/2996/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/74/4174/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/94/2994/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/07/3007/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/74/4174/5'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/74/4174/4'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/28/3028/2'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/13/3013/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/16/3016/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/04/3004/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/02/3002/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/89/2989/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/28/3028/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/08/3008/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/74/4174/2'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/93/2993/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/27/3027/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/92/2992/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/27/3027/3'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/00/3000/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/25/3025/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/17/3017/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/05/3005/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/01/3001/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/27/3027/2'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/87/2987/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/88/2988/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/91/2991/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/94/5194/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/20/3020/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/15/3015/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/26/3026/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/14/3014/1'

2014-09-29 Thread Javier Fernandez

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - dbaccess/source include/sal

2013-07-30 Thread Javier Fernandez
 dbaccess/source/ui/dlg/generalpage.cxx |7 ++-
 include/sal/log-areas.dox  |1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 9b1d8d864b813ebf943b85b129335d7d55e35c41
Author: Javier Fernandez jfernan...@igalia.com
Date:   Thu Jun 6 09:14:49 2013 +

fdo#67361 Prevent out-of-range values coming from ListBox GetSelectEntryPos.

Applied to master (LibreOffice 4.2.0.alpha) as:
 Change-Id: Ia787c412408ef53db3c8458f54c7843c669c81ad
 Reviewed-on: https://gerrit.libreoffice.org/4174
 Reviewed-by: Lionel Elie Mamane lio...@mamane.lu
 Tested-by: Lionel Elie Mamane lio...@mamane.lu
(without the fdo#67361 reference)

Squash with subsequent fixups:

1) -Werror=sign-compare

   (ListBox::GetSelectEntryPos returns sal_uInt16)

   Change-Id: Ia6e4bf4354523f5112ee3ade1d3da6db0f9ab2c4

2) Fix previous fix

   Change-Id: I2d7ea38b743d78327fd19886019c1106bc1316d6

Also fix discrepancy between log-areas.dox and SAL_WARN argument.

Change-Id: I03fc1014da0be8335689954725ac605e32fbbee8
Reviewed-on: https://gerrit.libreoffice.org/5176
Reviewed-by: Tomáš Chvátal tchva...@suse.cz
Tested-by: Tomáš Chvátal tchva...@suse.cz
Reviewed-by: Michael Meeks michael.me...@suse.com
Tested-by: Michael Meeks michael.me...@suse.com

diff --git a/dbaccess/source/ui/dlg/generalpage.cxx 
b/dbaccess/source/ui/dlg/generalpage.cxx
index 3eea60a..6a79acf 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -328,7 +328,12 @@ namespace dbaui
 IMPL_LINK( OGeneralPage, OnDatasourceTypeSelected, ListBox*, _pBox )
 {
 // get the type from the entry data
-sal_Int16 nSelected = _pBox-GetSelectEntryPos();
+sal_uInt16 nSelected = _pBox-GetSelectEntryPos();
+if (nSelected = m_aURLPrefixes.size() )
+{
+SAL_WARN(dbaccess.ui.OGeneralPage, Got out-of-range value '  
nSelected   ' from the DatasourceType selection ListBox's 
GetSelectEntryPos(): no corresponding URL prefix);
+return 0L;
+}
 const OUString sURLPrefix = m_aURLPrefixes[ nSelected ];
 
 setParentTitle( sURLPrefix );
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index bee62d6..e04e877 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -332,6 +332,7 @@ certain functionality.
 
 @li @c dbaccess
 @li @c dbaccess.ui
+@li @c dbaccess.ui.OGeneralPage
 
 @section svx
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: LO /  Firebird DB Integration

2013-06-20 Thread Javier Fernandez
Hi,

On 20/06/13 16:40, Andrzej J. R. Hunt wrote:
 Hi there,
 
 On 15/06/13 20:03, Javier Fernandez wrote:
 Nice work !!! We haven't been able to build Firebird inside libreoffice
 at the beginning, so we movd to the system library instead. Perhaps you
 could take that as reference for the installation details you mentioned.

 BTW, I've tested your changes in the branch and this is what I get by
 opening an already created ODB file configured for Firebird:

 warn:cppuhelper:664:1:cppuhelper/source/shlib.cxx:501: loading component
 library failed:
 file://$HOME/libo.git/solver/unxlngx6/installation/opt/program/../program/libfirebird-sdbclo.so
 terminate called after throwing an instance of
 'com::sun::star::loader::CannotActivateFactoryException'
 I've finally managed to figure out how to get the install working -- the
 driver now loads fine. For the moment however the following is needed
 for things to work:
 
 FIREBIRD=./install/program/firebird
 LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):./install/program/firebird/lib
 ./install/program/soffice.bin --base
 
 I'm not entirely sure how to provide these paths within LO to avoid
 having to prepend them yet.

I think you can try to inspect how it was using the Firebird external
libraries, so you can figure out how to do it with internal builds. Try
to build the branch before your changes and see where the libraries are
installed. But Andres should know more about this, I'll ping him to know
his opinion.

 
 I'm also not entirely certain everything will work as expected yet
 either -- I haven't found a definitive list of files which Firebird 2.5
 requires in embedded mode -- if anything is missing it can be however
 easily be added to the bottom of firebird/ExternalPackage_firebird.mk.

Firebird embedded only requires the libfbembed.so library, just that.

Regards,
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: LO /  Firebird DB Integration

2013-06-15 Thread Javier Fernandez
Hi,

On 14/06/13 20:49, Andrzej J. R. Hunt wrote:
 Hi all,
 
 Brief update: I now have Firebird (2.5) building within LibreOffice --
 only tested on Suse x64 -- I've still not sorted out all the
 installation details yet though so no idea how things will run in
 practice (should be fairly simple based on
 http://www.firebirdfaq.org/Firebird-Embedded-Linux-HOWTO.html ), I'll
 start on that once I have Windows happy.

Nice work !!! We haven't been able to build Firebird inside libreoffice
at the beginning, so we movd to the system library instead. Perhaps you
could take that as reference for the installation details you mentioned.

BTW, I've tested your changes in the branch and this is what I get by
opening an already created ODB file configured for Firebird:

warn:cppuhelper:664:1:cppuhelper/source/shlib.cxx:501: loading component
library failed:
file://$HOME/libo.git/solver/unxlngx6/installation/opt/program/../program/libfirebird-sdbclo.so
terminate called after throwing an instance of
'com::sun::star::loader::CannotActivateFactoryException'

I think that issue is related to the installation details mentioned before.

I want to use this email as well to introduce a new section in the wiki,
related to the Firebird driver implementation:

https://wiki.documentfoundation.org/Development/Base/FirebirdSQL#Firebird_driver_implementation

I've added some notes about the current status of the driver
implementation and some tasks to organize a bit the work to be done to
complete the implementation.

I have not too much time at this moment, but I'll try some hours every
week. Feel free to assign one of those tasks or adding them to your
personal schedule. I'll be available at the IRC for discussing details
and help you the best I can, if needed.


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: dbaccess/source include/sal

2013-06-06 Thread Javier Fernandez
 dbaccess/source/ui/dlg/generalpage.cxx |5 +
 include/sal/log-areas.dox  |1 +
 2 files changed, 6 insertions(+)

New commits:
commit b6a91e6d30e2a15880638d570d4c7d1e6c4a1853
Author: Javier Fernandez jfernan...@igalia.com
Date:   Thu Jun 6 09:14:49 2013 +

Prevent out-of-range values coming from ListBox GetSelectEntryPos.

Change-Id: Ia787c412408ef53db3c8458f54c7843c669c81ad
Reviewed-on: https://gerrit.libreoffice.org/4174
Reviewed-by: Lionel Elie Mamane lio...@mamane.lu
Tested-by: Lionel Elie Mamane lio...@mamane.lu

diff --git a/dbaccess/source/ui/dlg/generalpage.cxx 
b/dbaccess/source/ui/dlg/generalpage.cxx
index 3eea60a..0373916 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -329,6 +329,11 @@ namespace dbaui
 {
 // get the type from the entry data
 sal_Int16 nSelected = _pBox-GetSelectEntryPos();
+if (nSelected  0 || nSelected = m_aURLPrefixes.size() )
+{
+SAL_WARN(dbaui.OGeneralPage, Got out-of-range value '  
nSelected   ' from the DatasourceType selection ListBox's 
GetSelectEntryPos():   ((nSelected  0) ? negative : no corresponding URL 
prefix) );
+return 0L;
+}
 const OUString sURLPrefix = m_aURLPrefixes[ nSelected ];
 
 setParentTitle( sURLPrefix );
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index a6d14de..8917815 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -345,6 +345,7 @@ certain functionality.
 
 @li @c dbaccess
 @li @c dbaccess.ui
+@li @c dbaccess.OGeneralPage
 
 @section svx
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-qa] Web Wizard ported to python

2013-05-21 Thread Javier Fernandez
Hi,

I'm not sure whether there is something required from my side to help on
the integration of the python Web Wizard in the new release. I did my
best to test all the functionalities but there is likely a substantial
amount of code that could have been not touched by my tests.

I'll be willing to help on anything you consider relevant to ease the
integration in the next release.

I could attach a patch or rebasing my working branch feature/pyweb-wizard.


On 09/05/13 16:30, Javier Fernandez wrote:
 Hi Pedro,
 
 On 09/05/13 12:04, Pedro wrote:
 
 Do you know if the patch is included in the recently released Alpha1
 (probably not since it was pushed to master yesterday)?
 https://bugs.freedesktop.org/show_bug.cgi?id=38820
 
 I guess it's not integrated yet.
 

 Can you provide a link to the patch in gerrit (e.g.
 https://gerrit.libreoffice.org/#/c/3280/)?


 
 Well, I've been working on the feature/pyweb-wizard remote branch, and
 we pushed the changes directly to master. That branch has not all the
 commits, since some additional changes were required after pushing the
 branch to master.
 
 I can provide a single and clean patch with all the changes, if
 required, including the removal of the java files. I think the java
 version should stay in the master branch for the time being, while the
 QA tests verify that all the functionality has been ported correctly.
 
 Regards,
 
 ___
 List Name: Libreoffice-qa mailing list
 Mail address: Libreoffice-qa@lists.freedesktop.org
 Change settings: http://lists.freedesktop.org/mailman/listinfo/libreoffice-qa
 Problems? 
 http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
 Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
 List archive: http://lists.freedesktop.org/archives/libreoffice-qa/
 

___
List Name: Libreoffice-qa mailing list
Mail address: Libreoffice-qa@lists.freedesktop.org
Change settings: http://lists.freedesktop.org/mailman/listinfo/libreoffice-qa
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://lists.freedesktop.org/archives/libreoffice-qa/


[Libreoffice-qa] Web Wizard ported to python

2013-05-09 Thread Javier Fernandez
Hi,

Excuse me if this is not the proper list to send this, but I've recently
pushed a substantial amount of code to master, as result of the task to
port the Web Wizard to python (bug 38820). I think the Agenda wizard has
been recently integrated too, so I would kindly ask for some special
attention to the Web and Agenda wizards functionality in the tests prior
to the next release.

Thanks.
___
List Name: Libreoffice-qa mailing list
Mail address: Libreoffice-qa@lists.freedesktop.org
Change settings: http://lists.freedesktop.org/mailman/listinfo/libreoffice-qa
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://lists.freedesktop.org/archives/libreoffice-qa/


Re: [Libreoffice-qa] Web Wizard ported to python

2013-05-09 Thread Javier Fernandez
Hi Pedro,

On 09/05/13 12:04, Pedro wrote:

 Do you know if the patch is included in the recently released Alpha1
 (probably not since it was pushed to master yesterday)?
 https://bugs.freedesktop.org/show_bug.cgi?id=38820

I guess it's not integrated yet.

 
 Can you provide a link to the patch in gerrit (e.g.
 https://gerrit.libreoffice.org/#/c/3280/)?
 
 

Well, I've been working on the feature/pyweb-wizard remote branch, and
we pushed the changes directly to master. That branch has not all the
commits, since some additional changes were required after pushing the
branch to master.

I can provide a single and clean patch with all the changes, if
required, including the removal of the java files. I think the java
version should stay in the master branch for the time being, while the
QA tests verify that all the functionality has been ported correctly.

Regards,

___
List Name: Libreoffice-qa mailing list
Mail address: Libreoffice-qa@lists.freedesktop.org
Change settings: http://lists.freedesktop.org/mailman/listinfo/libreoffice-qa
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://lists.freedesktop.org/archives/libreoffice-qa/


[Libreoffice-commits] core.git: scp2/source wizards/Module_wizards.mk

2013-05-08 Thread Javier Fernandez
 scp2/source/ooo/file_ooo.scp |1 -
 wizards/Module_wizards.mk|1 -
 2 files changed, 2 deletions(-)

New commits:
commit 41f89d2236e20c9c92c9e1267d5841e7dfd92d5b
Author: Javier Fernandez jfernan...@igalia.com
Date:   Wed May 8 10:21:27 2013 +

PyWebWizard: Removed the Jar_web, relaced by the python version.

Change-Id: Ia76a2d4ce93bf338c6ca22fd2cd991b42c195ae4

diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index dffee3e..d3f596fe 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -315,7 +315,6 @@ STD_JAR_FILE( gid_File_Jar_Smoketest, smoketest )
 STD_JAR_FILE( gid_File_Jar_Table, table )
 STD_JAR_FILE( gid_File_Jar_Form, form )
 STD_JAR_FILE( gid_File_Jar_Query, query )
-STD_JAR_FILE( gid_File_Jar_Web, web )
 STD_JAR_FILE( gid_File_Jar_Xmerge, xmerge )
 STD_JAR_FILE( gid_File_Jar_Xmergebridge, XMergeBridge )
 #endif
diff --git a/wizards/Module_wizards.mk b/wizards/Module_wizards.mk
index 5d6c594..1e88f9a 100644
--- a/wizards/Module_wizards.mk
+++ b/wizards/Module_wizards.mk
@@ -60,7 +60,6 @@ $(eval $(call gb_Module_add_targets,wizards,\
Jar_report \
Jar_reportbuilder \
Jar_table \
-   Jar_web \
 ))
 endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-ux-advise] fdo#38820: Python Wizards almost complete -- possible papercuts/low hanging fruits?

2013-05-02 Thread Javier Fernandez
Hi,

On 22/04/13 16:45, Bjoern Michaelsen wrote:
 Hi,
 
 since this bug is now almost finished:
 
  https://bugs.freedesktop.org/show_bug.cgi?id=38820
 
 and Xisco and Javier are probably experts in the new implementation of the
 wizards, it might be a good idea to look if there are some low-hanging fruits
 to harvest: Namely tweaking the dialogs a bit here and there for easy
 improvements.

Besides what I already suggested, I think the Events Management (see
ui/event/CommonListener.py class) could be implemented in a better way;
I think the ProcAdapter stuff is confusing and is not easy to deal with
add/remove listeners operations. I guess the main issue behind this
ProcAdapter stuff is how to deal with the unohelper.Base inheritance,
perhaps we could think about a more elegant solution for the PyUNO
bindings.

___
Libreoffice-ux-advise mailing list
Libreoffice-ux-advise@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-ux-advise


[Libreoffice-commits] core.git: Branch 'feature/pyweb-wizard' - wizards/com

2013-04-22 Thread Javier Fernandez
 wizards/com/sun/star/wizards/common/Desktop.py |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit b51cf843665bf178d6f64320b758f269eb71d718
Author: Javier Fernandez jfernan...@igalia.com
Date:   Fri Apr 19 18:34:53 2013 +

Fixed the preview bug.

Using the mutiple return value of the PyUNO calls for the inout args.

Change-Id: I7eb95a9cc8e020367161b1ff2a728fa543eb656c

Change-Id: I7d8e39ab9d7848b3283647e317eb90029e42b60c

diff --git a/wizards/com/sun/star/wizards/common/Desktop.py 
b/wizards/com/sun/star/wizards/common/Desktop.py
index 1bfc414..76bacaa 100644
--- a/wizards/com/sun/star/wizards/common/Desktop.py
+++ b/wizards/com/sun/star/wizards/common/Desktop.py
@@ -139,12 +139,14 @@ class Desktop(object):
 try:
 print (DEBUG !!! getDispatchURL -- s_URL: , _sURL)
 oTransformer = 
xMSF.createInstance(com.sun.star.util.URLTransformer)
-oURL = list(range(1))
-oURL[0] = URL()
-oURL[0].Complete = _sURL
-oTransformer.parseStrict(oURL[0])
+oURL = URL()
+oURL.Complete = _sURL
+ok, oURL = oTransformer.parseStrict(oURL)
+if (not ok):
+print (DEBUG !!! getDispatchURL --  parsing failed.)
+return None
 print (DEBUG !!! getDispatchURL --  oURL: , oURL)
-return oURL[0];
+return oURL
 except Exception:
 traceback.print_exc()
 return None
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/pyweb-wizard' - wizards/com

2013-04-22 Thread Javier Fernandez
Rebased ref, commits from common ancestor:
commit 2bc6dc3705db3154a08c81d9f4795f3be57f2f1d
Author: Javier Fernandez jfernan...@igalia.com
Date:   Fri Apr 19 18:34:53 2013 +

Fixed the preview bug.

Using the mutiple return value of the PyUNO calls for the inout args.

Change-Id: I7eb95a9cc8e020367161b1ff2a728fa543eb656c

diff --git a/wizards/com/sun/star/wizards/common/Desktop.py 
b/wizards/com/sun/star/wizards/common/Desktop.py
index 1bfc414..76bacaa 100644
--- a/wizards/com/sun/star/wizards/common/Desktop.py
+++ b/wizards/com/sun/star/wizards/common/Desktop.py
@@ -139,12 +139,14 @@ class Desktop(object):
 try:
 print (DEBUG !!! getDispatchURL -- s_URL: , _sURL)
 oTransformer = 
xMSF.createInstance(com.sun.star.util.URLTransformer)
-oURL = list(range(1))
-oURL[0] = URL()
-oURL[0].Complete = _sURL
-oTransformer.parseStrict(oURL[0])
+oURL = URL()
+oURL.Complete = _sURL
+ok, oURL = oTransformer.parseStrict(oURL)
+if (not ok):
+print (DEBUG !!! getDispatchURL --  parsing failed.)
+return None
 print (DEBUG !!! getDispatchURL --  oURL: , oURL)
-return oURL[0];
+return oURL
 except Exception:
 traceback.print_exc()
 return None
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Launching a web browser using the PYUNO bindings

2013-04-16 Thread Javier Fernandez
Hi,

Thanks Michael for the reply. I'll comment below.

On 16/04/13 13:45, Michael Stahl wrote:
 
 that rather sounds like a bug if the same thing works from Java.
 
 probably best to debug from C++ the implementation of queryDispatch, if
 the parameters look as expected from the C++ side.
 

I didn't try with gdb, but I've set some printf calls to trace the
classes involved in the process and why the result is always None.

Notice that the URL has only the Complete field not empty, which affects
the decision of which dispatcher to use:

(com.sun.star.util.URL){ Complete = (string).uno:OpenHyperlink, Main =
(string), Protocol = (string), User = (string), Password =
(string), Server = (string), Port = (short)0x0, Path = (string),
Name = (string), Arguments = (string), Mark = (string) }

These are the logs I've got in the process:

DEBUG !!! Frame::queryDispatch --
DEBUG !!! InterceptionHelper::queryDispatch --
DEBUG !!! DispatchProvider::queryDispatch --
DEBUG !!! DispatchProvider::implts_queryFrameDispatch --
targetFrameName: _top
DEBUG !!! DispatchProvider::implts_queryFrameDispatch -- TARGET TOP
DEBUG !!! DispatchProvider::queryDispatch --
DEBUG !!! DispatchProvider::implts_queryFrameDispatch --
targetFrameName: _self
DEBUG !!! DispatchProvider::implts_queryFrameDispatch --  TARGET SELF
DEBUG !!! DispatchProvider::implts_queryFrameDispatch --  aURL.Complete:
.uno:OpenHyperlink
DEBUG !!! DispatchProvider::implts_queryFrameDispatch --  Delegating on
controller
DEBUG !!! SfxBaseController::queryDispatch --
DEBUG !!! SfxBaseController::queryDispatch -- target _self
DEBUG !!! SfxBaseController::queryDispatch -- xModel.is(): 1
DEBUG !!! SfxBaseController::queryDispatch -- aURL.Mark.isEmpty(): 1
DEBUG !!! SfxBaseController::queryDispatch -- INVALID model
DEBUG !!! DispatchProvider::implts_queryFrameDispatch --  Searching
protocol
DEBUG !!! DispatchProvider::implts_searchProtocolHandler --
DEBUG !!! DispatchProvider::implts_searchProtocolHandler -- FOUND in the
Protocol Handler cache.
DEBUG !!! DispatchProvider::implts_searchProtocolHandler -- aHandler:
com.sun.star.comp.sfx2.AppDispatchProvider
DEBUG !!! SfxAppDispatchProvider::queryDispatch --
DEBUG !!! SfxAppDispatchProvider::queryDispatch -- NO slot
DEBUG !!! DispatchProvider::implts_isLoadableContent -- Checking whether
is loadable content ...
DEBUG !!! LoadEnv::classifyContent -- Classifying content ...
DEBUG !!! getDispatcher -- xDispatch :  None


 but i'm not sure how this dispatch stuff works, i guess most likely
 you're calling one of these:
 
 sfx2/source/view/sfxbasecontroller.cxx:Reference frame::XDispatch 
 SAL_CALL SfxBaseController::queryDispatch
 framework/source/services/desktop.cxx:css::uno::Reference
 css::frame::XDispatch  SAL_CALL Desktop::queryDispatch
 framework/source/dispatch/dispatchprovider.cxx:css::uno::Reference
 css::frame::
 XDispatch  SAL_CALL DispatchProvider::queryDispatch
 

From my analysis of the DispatchProvider source code and the
documentation of the Application Environment, I've got some idea what is
going on in the process.

The Web Wizard Frame implements the XDispatchProvider interface, so it
uses the queryDispatch function to get the suitable Dispatcher based on
the URL. This would be perhaps my main doubt, as the URL contains only
the string .uno:OpenHyperlink, I guess, suggesting the document passed
in the arguments of the dispatcher's dispatch method, should be opened
in a browser. That's the way the Java wizard implements such logic, and
I've seen similar code inside Libreoffice, for instance, in the
genericpropertyhandler.cxx file.

What I don't understand well is how such URL is managed in the classes
related to the DispatchProviders::queryDispatch function. Looking at the
logs and the source code, it's clear that the first steps are to get the
_self frame, since _top was initially passed.

As the URL does not match with the .uno:CloseXX commands, it tries to
delegate in the frame controller. Im not sure why, and it would be good
to have it clear, but the SfxBaseController is the one given by the
frame. Since the URL has got an empty Protocol field and the target is
not _beamer, it tries to use the xModel to get the internal URL of the
component. This dispatcher looks like the one used to dispatch internal
objects of Libreoffice, so it doesn't seems the suitable choice for
opening an external HTML file.

Once the controller is discarded as dispatcher, the DispatchProvider
tries to get it from the Protocol used. It searches in a protocol cache
and found the com.sun.star.comp.sfx2.AppDispatchProvider as the protocol
handler to use. Again, since the Protocol field is empty the first
checks failed, hence the SfxSlot is not retrieved so no dispatcher is
instantiated.

Finally, the DispatchProvider tries to determine whether the URL points
to a Loadable content. It uses the LoadEnv::classifyContent function to
determine the type of the URL. This time, it checks out the protocol
based on the URL.Complete string, 

Launching a web browser using the PYUNO bindings

2013-04-15 Thread Javier Fernandez
Hi,

I'm trying to launch the default web browser to load an html file with
the preview of the web wizard results.

Im trying to get a dispatcher using the following code:

  xDispatch = xFrame.queryDispatch(oURL, _top, ALL)

Being oURL:

(com.sun.star.util.URL){ Complete = (string).uno:OpenHyperlink, Main =
(string), Protocol = (string), User = (string), Password =
(string), Server = (string), Port = (short)0x0, Path = (string),
Name = (string), Arguments = (string), Mark = (string) }

The xFrame instance is acquired as follows:

  xDesktop = xMSF.createInstance( com.sun.star.frame.Desktop)
  xFrame = xDesktop.findFrame(_blank, 0)

I've got several browsers installed in my environment (Ubuntu Quantal)
and it works fine using the java version of the web wizard.

Any idea why I'm getting always NULL as result of the queryDispatch call ?

Thanks,
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/pyweb-wizard' - 3 commits - wizards/com

2013-04-12 Thread Javier Fernandez
 wizards/com/sun/star/wizards/common/UCB.py  |3 
 wizards/com/sun/star/wizards/ui/event/CommonListener.py |4 
 wizards/com/sun/star/wizards/web/FTPDialog.py   |2 
 wizards/com/sun/star/wizards/web/Process.py |   85 
 wizards/com/sun/star/wizards/web/WWD_Events.py  |   13 --
 5 files changed, 55 insertions(+), 52 deletions(-)

New commits:
commit cbeda02fb914b16f498289ff1a45c5cff1be5178
Author: Javier Fernandez jfernan...@igalia.com
Date:   Fri Apr 12 10:59:06 2013 +

Fixed bug in the FTPDialog

Enable again the getPropertyValues call to verofy the FTP connection
is successfully established.

Using an Any type instead of beans.Properties because of the pyuno bug.

Change-Id: Ib6870a021d30c3b2fc971b66016ba9a8c3648eaf

diff --git a/wizards/com/sun/star/wizards/common/UCB.py 
b/wizards/com/sun/star/wizards/common/UCB.py
index 0065801..5377a3f 100644
--- a/wizards/com/sun/star/wizards/common/UCB.py
+++ b/wizards/com/sun/star/wizards/common/UCB.py
@@ -163,7 +163,8 @@ class UCB(object):
 pv[0].Name = propName
 pv[0].Handle = -1
 
-row = self.executeCommand(content, getPropertyValues, tuple(pv))
+row = self.executeCommand(content, getPropertyValues,
+  uno.Any([]com.sun.star.beans.Property, 
tuple(pv)))
 if (isinstance(classType, str)):
return row.getString(1)
 elif (isinstance(classType, bool)):
diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.py 
b/wizards/com/sun/star/wizards/web/FTPDialog.py
index d3c1ddb..ccd39f9 100644
--- a/wizards/com/sun/star/wizards/web/FTPDialog.py
+++ b/wizards/com/sun/star/wizards/web/FTPDialog.py
@@ -364,7 +364,7 @@ class FTPDialog(UnoDialog2, UIConsts):
 self.ucb.executeCommand(content, open, aArg)
 
 # get the title property of the content.
-#obj = self.ucb.getContentProperty(content, Title, str)
+obj = self.ucb.getContentProperty(content, Title, str)
 
 # changes the ftp subdirectory, in both
 # the UI and the data.
commit 2fda9a1cc46eb45217da77009a5a7dfe76cab829
Author: Javier Fernandez jfernan...@igalia.com
Date:   Thu Apr 11 21:35:28 2013 +

Fixed bug in the ZIP publisher.

The ZIP url was not being built correctly (was not an absolute URI)

Using the VndSunStarPkgUrlReferenceFactory service to build the ZIP URI.

Change-Id: Ied93a2064ecad3782770c43a919db306849ab2be

diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.py 
b/wizards/com/sun/star/wizards/web/WWD_Events.py
index a465a80..687ff70 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.py
@@ -841,14 +841,11 @@ class WWD_Events(WWD_Startup):
 '''
 p = self.getPublisher(ZIP_PUBLISHER)
 print (DEBUG !!! finishWizard2 - zip URL: , p.cp_URL)
-#remove the 'file://' prefix
-url1 = p.cp_URL.replace(file://, )
-#replace the '%' with '%25'
-url1 = url1.replace(%, %25)
-#replace all '/' with '%2F'
-url1 = url1.replace(/, %2F)
-
-p.url = vnd.sun.star.zip:// + url1 + /
+factory = 
self.xMSF.createInstance(com.sun.star.uri.VndSunStarPkgUrlReferenceFactory)
+uriFactory = 
self.xMSF.createInstance(com.sun.star.uri.UriReferenceFactory)
+uri = uriFactory.parse(p.cp_URL)
+pckUri = factory.createVndSunStarPkgUrlReference(uri)
+p.url = pckUri.getUriReference()
 print (DEBUG !!! finishWizard2 - zip url: , p.url)
 
 '''
commit 4e86152ce270f5f158000c17a611ee5b69386457
Author: Javier Fernandez jfernan...@igalia.com
Date:   Thu Apr 11 18:48:56 2013 +

Waiting for the XSLT Transformation before going on with the task.

Change-Id: Id1b3f6fd5579dc25e0d0fb4266d0774ec982409c

diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py 
b/wizards/com/sun/star/wizards/ui/event/CommonListener.py
index 5a9a003..96ff8a2 100644
--- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py
+++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py
@@ -114,7 +114,7 @@ class StreamListenerProcAdapter( unohelper.Base, 
XStreamListener ):
 
 def terminated(self):
 if callable( self. terminatedCall):
-self.terminatedCall(self)
+self.terminatedCall(self, self.parent)
 
 def started(self):
 if callable( self.startedCall ):
@@ -122,7 +122,7 @@ class StreamListenerProcAdapter( unohelper.Base, 
XStreamListener ):
 
 def closed(self):
 if callable( self.closedCall ):
-self.closedCall(self)
+self.closedCall(self, self.parent)
 
 def error(self, aException):
 if callable( self.errorCall ):
diff --git a/wizards/com/sun/star/wizards/web/Process.py 
b/wizards/com/sun/star/wizards/web/Process.py
index 2e3b3fb..62fbeca 100644
--- a/wizards/com/sun/star/wizards/web/Process.py
+++ b

[ABANDONED] Pack and register the Web wizard.

2013-03-28 Thread Javier Fernandez (via Code Review)
Javier Fernandez has abandoned this change.

Change subject: Pack and register the Web wizard.
..


Patch Set 3: Abandoned

This patch should not be integrated on master until we have decided to replace 
completely the java version.

-- 
To view, visit https://gerrit.libreoffice.org/3027
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I8e43d228e842f24b054afc6bf59040667a6703d5
Gerrit-PatchSet: 3
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com
Gerrit-Reviewer: Fridrich Strba fridr...@documentfoundation.org

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Changes to 'feature/pyweb-wizard'

2013-03-27 Thread Javier Fernandez
New branch 'feature/pyweb-wizard' available with the following commits:
commit e408b18432008e10412ba0f3a0d5d2bcc34913bf
Author: Javier Fernandez jfernan...@igalia.com
Date:   Fri Mar 8 12:56:16 2013 +

Ugly Hack: using our own WebConfigSet while the Topic stuff is not 
integrated.

Change-Id: I0df92af6b01e5eab99212bb1587f7165c70fd59b

commit 2202afcefe61c3624f906fc768d60f84aca36947
Author: Javier Fernandez jfernan...@igalia.com
Date:   Wed Mar 6 10:04:59 2013 +

Pack and register the Web wizard.

Change-Id: I8e43d228e842f24b054afc6bf59040667a6703d5

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: wizards/com wizards/Pyuno_web.mk

2013-03-27 Thread Javier Fernandez
 wizards/Pyuno_web.mk|   80 +++
 wizards/com/sun/star/wizards/web/WebConfigSet.py|  209 
 wizards/com/sun/star/wizards/web/data/CGContent.py  |6 
 wizards/com/sun/star/wizards/web/data/CGExporter.py |4 
 wizards/com/sun/star/wizards/web/data/CGSession.py  |6 
 wizards/com/sun/star/wizards/web/data/CGSettings.py |   18 -
 6 files changed, 306 insertions(+), 17 deletions(-)

New commits:
commit 6db890bfbb4cc86d0963599b70033b4eb32ff154
Author: Javier Fernandez jfernan...@igalia.com
Date:   Fri Mar 8 12:56:16 2013 +

Ugly Hack: using our own WebConfigSet while the Topic stuff is not 
integrated.

Change-Id: I0df92af6b01e5eab99212bb1587f7165c70fd59b

diff --git a/wizards/Pyuno_web.mk b/wizards/Pyuno_web.mk
new file mode 100644
index 000..93b312f
--- /dev/null
+++ b/wizards/Pyuno_web.mk
@@ -0,0 +1,80 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the License); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an AS IS basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2011 Red Hat, Inc., David Tardon dtar...@redhat.com
+#  (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the GPLv3+), or
+# the GNU Lesser General Public License Version 3 or later (the LGPLv3+),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Pyuno_Pyuno,web,$(SRCDIR)/wizards/com/sun/star/wizards/web))
+
+$(eval $(call gb_Pyuno_add_files,web,\
+   CallWizard.py \
+   BackgroundsDialog.py \
+   ErrorHandler.py \
+   AbstractErrorHandler.py \
+   FTPDialog.py \
+   FTPDialogResources.py \
+   IconsDialog.py \
+   ImageListDialog.py \
+   LogTaskListener.py \
+   Process.py \
+   ProcessErrorHandler.py \
+   ProcessErrors.py \
+   ProcessStatusRenderer.py \
+   StatusDialog.py \
+   StylePreview.py \
+   TOCPreview.py \
+   WWD_Events.py \
+   WWD_General.py \
+   WWD_Startup.py \
+   WWHID.py \
+   WebWizard.py \
+   WebWizardConst.py \
+   WebWizardDialog.py \
+   WebWizardDialogResources.py \
+   TypeDetection.py \
+   ExtensionVerifier.py\
+   WebConfigSet.py\
+   __init__.py \
+   data/CGArgument.py \
+   data/CGContent.py \
+   data/CGDesign.py \
+   data/CGDocument.py \
+   data/CGExporter.py \
+   data/CGFilter.py \
+   data/CGGeneralInfo.py \
+   data/CGIconSet.py \
+   data/CGImage.py \
+   data/CGLayout.py \
+   data/CGPublish.py \
+   data/CGSession.py \
+   data/CGSessionName.py \
+   data/CGSettings.py \
+   data/CGStyle.py\
+   data/__init__.py \
+   export/Exporter.py \
+   export/AbstractExporter.py \
+   export/CopyExporter.py \
+   export/__init__.py \
+))
+$(eval $(call 
gb_Pyuno_set_componentfile_full,web,wizards/com/sun/star/wizards/web/web,vnd.openoffice.pymodule:wizards.web,.CallWizard))
diff --git a/wizards/com/sun/star/wizards/web/WebConfigSet.py 
b/wizards/com/sun/star/wizards/web/WebConfigSet.py
new file mode 100644
index 000..88b49f2
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/WebConfigSet.py
@@ -0,0 +1,209 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+import traceback
+from ..common.ConfigGroup import ConfigGroup
+from ..common.Configuration import Configuration
+from ..common.XMLProvider import XMLProvider
+
+class WebConfigSet(ConfigGroup):
+'''
+After reading the configuration set items,
+the ConfigSet

Re: [PATCH] Init: fixed typo in the SystemDialog class.

2013-03-26 Thread Javier Fernandez
Hi,

On 26/03/13 18:03, Petr Mladek wrote:
 
 I guess that you did not merge the following two commits by purpose:
 
+ https://gerrit.libreoffice.org/#/c/3027/
  Pack and register the Web wizard.
 
+ https://gerrit.libreoffice.org/#/c/3028/
  Ugly Hack: using our own WebConfigSet while the Topic stuff is not
  integrated.
 
 I do not see any comments in gerrit. What are the plans here? ;-)


Well, the c/3027/ enables the python web wizard, replacing the java one.
As it's not ready, it's better not to integrate that for the time being.

Regarding the change c/3028/, it's just something I need to discuss with
Xisco; we have already been talking about it and he recently pushed some
changes to master in order to let me integrate what it's needed to make
the Web wizard work.

I've got around 25 additional commits for completing the Web Wizard
functionality. It seems to work fine in my local branch, but I would
like to discuss first with Xisco, before sending more review requests.

My idea would be to do it during this week, so hopefully, we could
integrate everything during the next week.





___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file IRenderer.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2987

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/87/2987/1

Init: Added new file IRenderer.py

Change-Id: Ifa203647da815ca66171fad96e04bad8a0f4b0eb
---
A wizards/com/sun/star/wizards/common/IRenderer.py
1 file changed, 28 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/common/IRenderer.py 
b/wizards/com/sun/star/wizards/common/IRenderer.py
new file mode 100644
index 000..6086665
--- /dev/null
+++ b/wizards/com/sun/star/wizards/common/IRenderer.py
@@ -0,0 +1,28 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+
+from abc import abstractmethod
+
+# A General interface which gives a string
+# that represents the rendered argument object.
+# Can be used to reference resources, internationalizartion
+# a.s.o
+class IRenderer:
+
+@abstractmethod
+def render(object):
+  pass

-- 
To view, visit https://gerrit.libreoffice.org/2987
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa203647da815ca66171fad96e04bad8a0f4b0eb
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file UCB.py

2013-03-25 Thread Javier Fernandez (via Code Review)
+return xContent.execute(aCommand, 0, None)
+
+def listFiles(self, path, verifier):
+xContent = self.getContent(path)
+
+aArg = OpenCommandArgument2()
+aArg.Mode = ALL
+aArg.Priority = 32768
+
+# Fill info for the properties wanted.
+aArg.Properties = (Property(),)
+
+aArg.Properties[0].Name = Title
+aArg.Properties[0].Handle = -1
+
+xSet = self.executeCommand(xContent, open, aArg)
+
+xResultSet = xSet.getStaticResultSet()
+
+files = []
+
+if (xResultSet.first()):
+# obtain XContentAccess interface for child content access and 
XRow for properties
+while (True):
+# Obtain URL of child.
+aId = xResultSet.queryContentIdentifierString()
+# First column: Title (column numbers are 1-based!)
+aTitle = xResultSet.getString(1)
+if (len(aTitle) == 0 and xResultSet.wasNull()):
+# ignore
+pass
+else:
+files.append(aTitle)
+if (not xResultSet.next()):
+break
+# next child
+if (verifier is not None):
+for i in range(len(files)):
+if (not verifier.verify(files[i])):
+files.pop(i) # FIXME !!! dangerous
+return files
+
+def getContentProperty(self, content, propName, classType):
+pv = []
+pv[0] = Property()
+pv[0].Name = propName
+pv[0].Handle = -1
+
+row = self.executeCommand(content, getPropertyValues, pv)
+if (isinstance(classType, str)):
+   return row.getString(1)
+elif (isinstance(classType, bool)):
+return True if (row.getBoolean(1)) else False
+elif (isinstance(classType, int)):
+return row.getInt(1)
+elif (isinstance(classType, int)):
+return row.getShort(1)
+else:
+return None
+
+def getContent(self, path):
+try:
+print (WARNING !!! getContent - path: , path)
+#if (path.startswith(/)):
+#s = file:// + path
+#elif (path.startswith(file://)):
+#s = path
+#else:
+#s = 
file:///home/javi/intel-libreoffice/install/share/config/ + path[7:]
+#ident = self.ucb.createContentIdentifier(s)
+ident = self.ucb.createContentIdentifier(path)
+print (WARNING !!! getContent - ident: , 
ident.getContentIdentifier())
+return self.ucb.queryContent(ident)
+except Exception:
+traceback.print_exc()
+return None
+
+class Verifier:
+@abstractmethod
+def verify(object):
+pass
+

-- 
To view, visit https://gerrit.libreoffice.org/2988
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f25ee62a1f090dd6f494108849f038656b5e9fa
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file XMLHelper.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2989

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/89/2989/1

Init: Added new file XMLHelper.py

Change-Id: I145965230232150e91233ed1cd9ba623c19955f0
---
A wizards/com/sun/star/wizards/common/XMLHelper.py
1 file changed, 34 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/common/XMLHelper.py 
b/wizards/com/sun/star/wizards/common/XMLHelper.py
new file mode 100644
index 000..7ea3de3
--- /dev/null
+++ b/wizards/com/sun/star/wizards/common/XMLHelper.py
@@ -0,0 +1,34 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+class XMLHelper:
+
+@classmethod
+def addElement(self, parent, name, attNames, attValues):
+doc = parent.ownerDocument
+if (doc == None):
+doc = parent
+e = doc.createElement(name)
+for i in range(len(attNames)):
+if (not (attValues[i] is None or (attValues[i] == ))):
+e.setAttribute(attNames[i], attValues[i])
+parent.appendChild(e)
+return e
+
+@classmethod
+def addElement1(self, parent, name, attName, attValue):
+return self.addElement(parent, name, [attName], [attValue])

-- 
To view, visit https://gerrit.libreoffice.org/2989
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I145965230232150e91233ed1cd9ba623c19955f0
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file XMLProvider.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2990

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/90/2990/1

Init: Added new file XMLProvider.py

Change-Id: Idfc71c05f80150d67bc3f27f01b4a95efe9a8b5a
---
A wizards/com/sun/star/wizards/common/XMLProvider.py
1 file changed, 24 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/common/XMLProvider.py 
b/wizards/com/sun/star/wizards/common/XMLProvider.py
new file mode 100644
index 000..4627238
--- /dev/null
+++ b/wizards/com/sun/star/wizards/common/XMLProvider.py
@@ -0,0 +1,24 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+from abc import abstractmethod
+
+class XMLProvider:
+
+@abstractmethod
+def createDOM(parent):
+pass

-- 
To view, visit https://gerrit.libreoffice.org/2990
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfc71c05f80150d67bc3f27f01b4a95efe9a8b5a
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file Task.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2991

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/91/2991/1

Init: Added new file Task.py

Change-Id: I968fdf4b906cf6aab0a274fe4d1292cbaf1be51e
---
A wizards/com/sun/star/wizards/ui/event/Task.py
1 file changed, 114 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/ui/event/Task.py 
b/wizards/com/sun/star/wizards/ui/event/Task.py
new file mode 100644
index 000..133f93b
--- /dev/null
+++ b/wizards/com/sun/star/wizards/ui/event/Task.py
@@ -0,0 +1,114 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+import traceback
+
+from .TaskEvent import TaskEvent
+
+class Task:
+successfull = 0
+failed = 0
+maximum = 0
+taskName = 
+listeners = []
+subtaskName = 
+
+def __init__(self, taskName_, subtaskName_, max_):
+self.taskName = taskName_
+self.subtaskName = subtaskName_
+self.maximum = max_
+
+def start(self):
+self.fireTaskStarted()
+
+def fail(self):
+self.fireTaskFailed()
+
+def getMax(self):
+return self.maximum
+
+def setMax(self, max_):
+self.maximum = max_
+self.fireTaskStatusChanged()
+
+def advance(self, success_):
+if success_:
+self.successfull += 1
+print (Success :, self.successfull)
+else:
+self.failed += 1
+print (Failed :, self.failed)
+self.fireTaskStatusChanged()
+if (self.failed + self.successfull == self.maximum):
+self.fireTaskFinished()
+
+def advance1(self, success_, nextSubtaskName):
+self.advance(success_)
+self.setSubtaskName(nextSubtaskName)
+
+def getStatus(self):
+return self.successfull + self.failed
+
+def addTaskListener(self, tl):
+self.listeners.append(tl)
+
+def removeTaskListener(self, tl):
+try:
+index = self.listeners.index(tl)
+self.listeners.pop(index)
+except Exception:
+traceback.print_exc()
+
+def fireTaskStatusChanged(self):
+te = TaskEvent(self, TaskEvent.TASK_STATUS_CHANGED)
+for i in range(len(self.listeners)):
+self.listeners[i].taskStatusChanged(te)
+
+def fireTaskStarted(self):
+te = TaskEvent(self, TaskEvent.TASK_STARTED)
+for i in range(len(self.listeners)):
+self.listeners[i].taskStarted(te)
+
+def fireTaskFailed(self):
+te = TaskEvent(self, TaskEvent.TASK_FAILED)
+for i in range(len(self.listeners)):
+self.listeners[i].taskFinished(te)
+
+def fireTaskFinished(self):
+te = TaskEvent(self, TaskEvent.TASK_FINISHED)
+for i in range(len(self.listeners)):
+self.listeners[i].taskFinished(te)
+
+def fireSubtaskNameChanged(self):
+te = TaskEvent(self, TaskEvent.SUBTASK_NAME_CHANGED)
+for i in range(len(self.listeners)):
+self.listeners[i].subtaskNameChanged(te)
+
+def getSubtaskName(self):
+return self.subtaskName
+
+def getTaskName(self):
+return self.taskName
+
+def setSubtaskName(self, s):
+self.subtaskName = s
+self.fireSubtaskNameChanged()
+
+def getFailed(self):
+return self.failed
+
+def getSuccessfull(self):
+return self.successfull

-- 
To view, visit https://gerrit.libreoffice.org/2991
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I968fdf4b906cf6aab0a274fe4d1292cbaf1be51e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file TaskEvent.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2992

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/92/2992/1

Init: Added new file TaskEvent.py

Change-Id: Iadaa2e003186fc041e67270da39454cd28014a46
---
A wizards/com/sun/star/wizards/ui/event/TaskEvent.py
1 file changed, 42 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/ui/event/TaskEvent.py 
b/wizards/com/sun/star/wizards/ui/event/TaskEvent.py
new file mode 100644
index 000..291a1896
--- /dev/null
+++ b/wizards/com/sun/star/wizards/ui/event/TaskEvent.py
@@ -0,0 +1,42 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+from com.sun.star.document import EventObject
+
+#class TaskEvent(EventObject):
+class TaskEvent:
+
+TASK_STARTED = 1
+TASK_FINISHED = 2
+TASK_STATUS_CHANGED = 3
+SUBTASK_NAME_CHANGED = 4
+TASK_FAILED = 5
+taskType = 0
+source = None
+
+#general constructor-
+# @param source
+# @param type_
+def __init__(self, source_, type_):
+#super(TaskEvent, self).__init__(source)
+self.taskType = type_
+self.source = source_
+
+def getTask(self):
+return self.getSource()
+
+def getSource(self):
+return self.source

-- 
To view, visit https://gerrit.libreoffice.org/2992
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadaa2e003186fc041e67270da39454cd28014a46
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file TaskListener.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2993

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/93/2993/1

Init: Added new file TaskListener.py

Change-Id: I3b90d34dbe160410f63cd5cb6b40a1736a01c7cb
---
A wizards/com/sun/star/wizards/ui/event/TaskListener.py
1 file changed, 39 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/ui/event/TaskListener.py 
b/wizards/com/sun/star/wizards/ui/event/TaskListener.py
new file mode 100644
index 000..9cd86e9
--- /dev/null
+++ b/wizards/com/sun/star/wizards/ui/event/TaskListener.py
@@ -0,0 +1,39 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+from abc import abstractmethod
+from com.sun.star.script import EventListener
+
+class TaskListener(EventListener):
+
+@abstractmethod
+def taskStarted(self, te):
+pass
+
+@abstractmethod
+def taskFinished(self, te):
+pass
+
+# is called when the status of the task has advanced.
+# @param te
+@abstractmethod
+def taskStatusChanged(self, te):
+pass
+
+@abstractmethod
+def subtaskNameChanged(self, te):
+pass

-- 
To view, visit https://gerrit.libreoffice.org/2993
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b90d34dbe160410f63cd5cb6b40a1736a01c7cb
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file AbstractErrorHandler.py

2013-03-25 Thread Javier Fernandez (via Code Review)
(self, xmsf, peer, message, dialogType, buttons, 
defaultButton, returnTrueOn):
+b = SystemDialog.showMessageBox(xmsf, dialogType, defaultButton + 
buttons, message, peer, )
+return b == returnTrueOn
+
+
+# normally ok(1) is the value for true.
+# but a question dialog may use yes. so i use this method
+# for each error type to get its type of true value.
+# @param errorType
+# @return
+@classmethod
+def getTrueFor(self, errorType):
+if (errorType in (ErrorHandler.ERROR_FATAL, 
ErrorHandler.ERROR_PROCESS_FATAL,
+  ErrorHandler.ERROR_NORMAL_ABORT, 
ErrorHandler.ERROR_NORMAL_IGNORE,
+  ErrorHandler.ERROR_QUESTION_CANCEL, 
ErrorHandler.ERROR_QUESTION_OK)):
+return 1
+elif (errorType in (ErrorHandler.ERROR_QUESTION_NO, 
ErrorHandler.ERROR_QUESTION_YES)):
+return 2
+elif (errorType in (ErrorHandler.ERROR_WARNING, 
ErrorHandler.ERROR_MESSAGE)):
+return 1
+raise IllegalArgumentException(unkonown error type)
+
+
+# @param errorType
+# @return the Uno attributes for each error type.
+@classmethod
+def getAttributeFor(self, errorType):
+if (errorType == ErrorHandler.ERROR_FATAL):
+return OK
+elif (errorType == ErrorHandler.ERROR_PROCESS_FATAL):
+return OK
+elif (errorType == ErrorHandler.ERROR_NORMAL_ABORT):
+return OK_CANCEL + DEF_CANCEL
+elif (errorType == ErrorHandler.ERROR_NORMAL_IGNORE):
+return OK_CANCEL + DEF_OK
+elif (errorType == ErrorHandler.ERROR_QUESTION_CANCEL):
+return OK_CANCEL + DEF_CANCEL
+elif (errorType == ErrorHandler.ERROR_QUESTION_OK):
+return OK_CANCEL + DEF_OK
+elif (errorType == ErrorHandler.ERROR_QUESTION_NO):
+return YES_NO + DEF_NO
+elif (errorType == ErrorHandler.ERROR_QUESTION_YES):
+return YES_NO + DEF_YES
+elif (errorType == ErrorHandler.ERROR_WARNING):
+return OK
+elif (errorType == ErrorHandler.ERROR_MESSAGE):
+return OK
+raise IllegalArgumentException(unkonown error type)
+
+# @deprecated
+# @param errorType
+# @return the uno service name for each error type
+@classmethod
+def getServiceNameFor(self, errorType):
+if (errorType == ErrorHandler.ERROR_FATAL):
+return errorbox
+elif (errorType == ErrorHandler.ERROR_PROCESS_FATAL):
+return errorbox
+elif (errorType == ErrorHandler.ERROR_NORMAL_ABORT):
+return errorbox
+elif (errorType == ErrorHandler.ERROR_NORMAL_IGNORE):
+return warningbox
+elif (errorType == ErrorHandler.ERROR_QUESTION_CANCEL):
+return querybox
+elif (errorType == ErrorHandler.ERROR_QUESTION_OK):
+return querybox
+elif (errorType == ErrorHandler.ERROR_QUESTION_NO):
+return querybox
+elif (errorType == ErrorHandler.ERROR_QUESTION_YES):
+return querybox
+elif (errorType == ErrorHandler.ERROR_WARNING):
+return warningbox
+elif (errorType == ErrorHandler.ERROR_MESSAGE):
+return infobox
+raise IllegalArgumentException(unkonown error type)
+
+# renders the error
+# @param ex the exception
+# @param arg a free argument
+# @param ix a free argument
+# @param type the error type (from the int constants
+# in ErrorHandler interface)
+# @return a Strings which will be displayed in the message box,
+# and which describes the error, and the needed action from the user.
+@abstractmethod
+def getMessageFor(self, ex, arg, ix, errorType):
+pass
+
+
+

-- 
To view, visit https://gerrit.libreoffice.org/2994
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d5a304a51af734379c5597e9cdddf6ecfa6ba8a
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file CallWizard.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2995

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/95/2995/1

Init: Added new file CallWizard.py

Change-Id: Iba5ce15586bffd997c925522ee50fe71cdf59ea2
---
A wizards/com/sun/star/wizards/web/CallWizard.py
1 file changed, 51 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/CallWizard.py 
b/wizards/com/sun/star/wizards/web/CallWizard.py
new file mode 100644
index 000..1a98a31
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/CallWizard.py
@@ -0,0 +1,51 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+import unohelper
+import traceback
+
+from .WebWizard import WebWizard
+
+from com.sun.star.task import XJobExecutor
+
+# implement a UNO component by deriving from the standard unohelper.Base class
+# and from the interface(s) you want to implement.
+class CallWizard(unohelper.Base, XJobExecutor):
+def __init__(self, ctx):
+# store the component context for later use
+self.ctx = ctx
+
+def trigger(self, args):
+try:
+ww = WebWizard(self.ctx.ServiceManager)
+ww.show()
+ww.cleanup()
+except Exception as e:
+print (Wizard failure exception  + str(type(e)) +
+message  + str(e) +  args  + str(e.args) +
+   traceback.format_exc())
+
+# pythonloader looks for a static g_ImplementationHelper variable
+g_ImplementationHelper = unohelper.ImplementationHelper()
+
+g_ImplementationHelper.addImplementation( \
+CallWizard,   # UNO object class
+com.sun.star.wizards.web.CallWizard,# implemenation name
+(com.sun.star.task.Job,),)  # list of implemented services
+  # (the only service)
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:

-- 
To view, visit https://gerrit.libreoffice.org/2995
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba5ce15586bffd997c925522ee50fe71cdf59ea2
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file ExtensionVerifier.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2997

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/97/2997/1

Init: Added new file ExtensionVerifier.py

Change-Id: Ie6f413317d192643c0a30da760965fdb02125abd
---
A wizards/com/sun/star/wizards/web/ExtensionVerifier.py
1 file changed, 38 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/ExtensionVerifier.py 
b/wizards/com/sun/star/wizards/web/ExtensionVerifier.py
new file mode 100644
index 000..6f5fee0
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/ExtensionVerifier.py
@@ -0,0 +1,38 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+
+from ..common.UCB import UCB
+
+# Verifies all String that do not end with
+# the given extension.
+# This is used to exclude from a copy all the
+# xsl files, so I copy from a layout directory
+# all the files that do *not* end with xsl.
+class ExtensionVerifier(UCB.Verifier):
+
+extension = 
+
+def __init__(self, extension_):
+self.extension = . + extension_
+
+# @return true if the given object is
+# a String which does not end with the
+# given extension.
+def verify(self, obj):
+if (isinstance(obj, str())):
+return not obj.endsWith(extension)
+return False

-- 
To view, visit https://gerrit.libreoffice.org/2997
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6f413317d192643c0a30da760965fdb02125abd
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file ErrorHandler.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2996

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/96/2996/1

Init: Added new file ErrorHandler.py

Change-Id: Id4118c5f2e13e38d5c6803e8e07ef250cdcb2d7f
---
A wizards/com/sun/star/wizards/web/ErrorHandler.py
1 file changed, 79 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/ErrorHandler.py 
b/wizards/com/sun/star/wizards/web/ErrorHandler.py
new file mode 100644
index 000..093e498
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/ErrorHandler.py
@@ -0,0 +1,79 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+
+from com.sun.star.awt.VclWindowPeerAttribute import OK, DEF_OK, OK_CANCEL, 
DEF_CANCEL
+from com.sun.star.awt.VclWindowPeerAttribute import YES_NO, DEF_NO, DEF_YES
+
+class ErrorHandler:
+
+MESSAGE_INFO = infobox
+MESSAGE_QUESTION = querybox
+MESSAGE_ERROR = errorbox
+MESSAGE_WARNING = warningbox
+BUTTONS_OK = OK
+BUTTONS_OK_CANCEL = OK_CANCEL
+BUTTONS_YES_NO = YES_NO
+RESULT_CANCEL = 0
+RESULT_OK = 1
+RESULT_YES = 2
+DEF_OK = DEF_OK
+DEF_NO = DEF_NO
+DEF_CANCEL = DEF_CANCEL
+
+#Error type for fatal errors which should abort application
+# execution. Should actually never be used :-)
+ERROR_FATAL = 0
+# An Error type for errors which should stop the current process.
+ERROR_PROCESS_FATAL = 1
+# An Error type for errors to which the user can choose, whether
+# to continue or to abort the current process.
+# default is abort.
+ERROR_NORMAL_ABORT = 2
+# An Error type for errors to which the user can choose, whether
+# to continue or to abort the current process.
+# default is continue.
+ERROR_NORMAL_IGNORE = 3
+# An error type for warnings which requires user interaction.
+# (a question :-) )
+# Default is abort (cancel).
+ERROR_QUESTION_CANCEL = 4
+# An error type for warnings which requires user interaction
+# (a question :-) )
+# Default is to continue (ok).
+ERROR_QUESTION_OK = 5
+# An error type for warnings which requires user interaction.
+# (a question :-) )
+# Default is abort (No).
+ERROR_QUESTION_NO = 6
+# An error type for warnings which requires user interaction
+# (a question :-) )
+# Default is to continue (Yes).
+ERROR_QUESTION_YES = 7
+# An error type which is just a warning...
+ERROR_WARNING = 8
+# An error type which just tells the user something
+# ( like you look tired! you should take a bath! and so on)
+ERROR_MESSAGE = 9
+
+# @param ex the exception that accured
+# @param arg an object as help for recognizing the exception
+# @param ix an integer which helps for detailed recognizing of the 
exception
+# @param errorType one of the int constants defined by this Interface
+# @return true if the execution should continue, false if it should stop.
+def error(self, ex, arg, ix, errorType):
+pass
+

-- 
To view, visit https://gerrit.libreoffice.org/2996
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4118c5f2e13e38d5c6803e8e07ef250cdcb2d7f
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file FTPDialog.py

2013-03-25 Thread Javier Fernandez (via Code Review)
)
+elif status == self.STATUS_HOST_UNREACHABLE:
+# host unreachable (firewall?)
+self.setLabel1(self.resources.resFTPHostUnreachable, 
self.ICON_ERROR)
+elif status ==  self.STATUS_CONNECTING:
+self.setLabel1(self.resources.resConnecting, self.ICON_CONNECTING)
+else:
+self.setLabel1(self.resources.resFTPUnknownError, self.ICON_ERROR)
+
+# changes the text of the status label and
+# (TODO) the status image.
+# @param label
+# @param image
+def setLabel1(self, label, image):
+setattr(self.lblStatus.Model, PropertyNames.PROPERTY_LABEL, label)
+setattr(self.imgStatus.Model, PropertyNames.PROPERTY_IMAGEURL, 
self.imageUrl(image))
+
+def imageUrl(self, s):
+return self.imagesDirectory + s
+
+# called when the user clicks
+# the choose-dir button. (...)
+# Opens the pickFolder dialog.
+# checks if the returned folder is an ftp folder.
+# sets the textbox and the data to the new selected dir.
+def chooseDirectory(self):
+sd = SystemDialog.createOfficeFolderDialog(self.xMSF)
+newUrl = sd.callFolderDialog(self.resources.resFTPDirectory, , 
self.getFullUrl())
+if (newUrl is not None):
+# if the user chose a local directory,
+# sI do not accept it.
+if (newUrl.startswith(ftp://;)):
+self.setDir(extractDir(newUrl))
+else:
+AbstractErrorHandler.showMessage(self.xMSF, 
self.xUnoDialog.getPeer(), self.resources.resIllegalFolder, 
ErrorHandler.ERROR_PROCESS_FATAL)
+
+# practical to have such a method...
+# @param p the publisher obejct that contains the ftp connection info.
+# @return the full ftp url with username password and everything one needs.
+@classmethod
+def getFullURL1(self, p):
+#return ftp://; + p.Username + : + p.password + @ + 
self.host(p.URL)
+return ftp://; + p.cp_Username + : +  + @ + self.host1(p.cp_URL)

-- 
To view, visit https://gerrit.libreoffice.org/2998
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5ac3202e602fa5154510c7249847713cc76692e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file FTPDialogResources.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/2999

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/99/2999/1

Init: Added new file FTPDialogResources.py

Change-Id: Ibacf3645ecfd892b924fb2d2b202a1f5f2db3215
---
A wizards/com/sun/star/wizards/web/FTPDialogResources.py
1 file changed, 79 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/FTPDialogResources.py 
b/wizards/com/sun/star/wizards/web/FTPDialogResources.py
new file mode 100644
index 000..1190fe0
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/FTPDialogResources.py
@@ -0,0 +1,79 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+
+from ..common.Resource import Resource
+
+class FTPDialogResources(Resource):
+
+UNIT_NAME = dbwizres
+MODULE_NAME = dbw
+RID_FTPDIALOG_START = 4200
+RID_COMMON_START = 500
+resFTPDialog_title = 
+reslblUsername_value = 
+reslblPassword_value = 
+resbtnConnect_value = 
+resbtnOK_value = 
+resbtnHelp_value = 
+resbtnCancel_value = 
+resln1_value = 
+reslblFTPAddress_value = 
+resln2_value = 
+resln3_value = 
+esln3_value = 
+restxtDir_value = 
+resbtnDir_value = 
+resFTPDisconnected = 
+resFTPConnected = 
+resFTPUserPwdWrong = 
+resFTPServerNotFound = 
+resFTPRights = 
+resFTPHostUnreachable = 
+resFTPUnknownError = 
+resFTPDirectory = 
+resIllegalFolder = 
+resConnecting = 
+
+def __init__(self, xmsf):
+super(FTPDialogResources, self).__init__(xmsf, self.MODULE_NAME)
+
+# Delete the String, uncomment the getResText method
+resFTPDialog_title = self.getResText(self.RID_FTPDIALOG_START + 0)
+reslblUsername_value = self.getResText(self.RID_FTPDIALOG_START + 1)
+reslblPassword_value = self.getResText(self.RID_FTPDIALOG_START + 2)
+resbtnConnect_value = self.getResText(self.RID_FTPDIALOG_START + 3)
+resln1_value = self.getResText(self.RID_FTPDIALOG_START + 4)
+reslblFTPAddress_value = self.getResText(self.RID_FTPDIALOG_START + 5)
+resln2_value = self.getResText(self.RID_FTPDIALOG_START + 6)
+resln3_value = self.getResText(self.RID_FTPDIALOG_START + 7)
+resbtnDir_value = self.getResText(self.RID_FTPDIALOG_START + 8)
+resFTPDisconnected = self.getResText(self.RID_FTPDIALOG_START + 9)
+resFTPConnected = self.getResText(self.RID_FTPDIALOG_START + 10)
+resFTPUserPwdWrong = self.getResText(self.RID_FTPDIALOG_START + 11)
+resFTPServerNotFound = self.getResText(self.RID_FTPDIALOG_START + 12)
+resFTPRights = self.getResText(self.RID_FTPDIALOG_START + 13)
+resFTPHostUnreachable = self.getResText(self.RID_FTPDIALOG_START + 14)
+resFTPUnknownError = self.getResText(self.RID_FTPDIALOG_START + 15)
+resFTPDirectory = self.getResText(self.RID_FTPDIALOG_START + 16)
+resIllegalFolder = self.getResText(self.RID_FTPDIALOG_START + 17)
+resConnecting = self.getResText(self.RID_FTPDIALOG_START + 18)
+
+resbtnCancel_value = self.getResText(self.RID_COMMON_START + 11)
+resbtnOK_value = self.getResText(self.RID_COMMON_START + 18)
+resbtnHelp_value = self.getResText(self.RID_COMMON_START + 15)
+
+restxtDir_value = /

-- 
To view, visit https://gerrit.libreoffice.org/2999
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibacf3645ecfd892b924fb2d2b202a1f5f2db3215
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file LogTaskListener.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3000

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/00/3000/1

Init: Added new file LogTaskListener.py

Change-Id: I3bed03d791c8ad5361b25e8374578a927aed9bf1
---
A wizards/com/sun/star/wizards/web/LogTaskListener.py
1 file changed, 49 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/LogTaskListener.py 
b/wizards/com/sun/star/wizards/web/LogTaskListener.py
new file mode 100644
index 000..13b7e59
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/LogTaskListener.py
@@ -0,0 +1,49 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+
+# used for debugging.
+class LogTaskListener(TaskListener, ErrorHandler):
+
+out
+
+def __init__(os):
+out = os
+
+def __init__():
+self.__init__(System.out)
+
+# @see 
com.sun.star.wizards.web.status.TaskListener#taskStarted(com.sun.star.wizards.web.status.TaskEvent)
+def taskStarted(te):
+out.println(TASK  + te.getTask().getTaskName() +  STARTED.)
+
+#@see 
com.sun.star.wizards.web.status.TaskListener#taskFinished(com.sun.star.wizards.web.status.TaskEvent)
+def taskFinished(te):
+out.println(TASK  + te.getTask().getTaskName() +  FINISHED:  + 
te.getTask().getSuccessfull() + / + te.getTask().getMax() + Succeeded.)
+
+#@see 
com.sun.star.wizards.web.status.TaskListener#taskStatusChanged(com.sun.star.wizards.web.status.TaskEvent)
+def taskStatusChanged(te)
+out.println(TASK  + te.getTask().getTaskName() +  status :  + 
te.getTask().getSuccessfull() + (+ + te.getTask().getFailed() + )/ + 
te.getTask().getMax())
+
+#@see 
com.sun.star.wizards.web.status.TaskListener#subtaskNameChanged(com.sun.star.wizards.web.status.TaskEvent)
+def subtaskNameChanged(te):
+out.println(SUBTASK Name: + te.getTask().getSubtaskName())
+
+# @see 
com.sun.star.wizards.web.status.ErrorReporter#error(java.lang.Exception, 
java.lang.Object, java.lang.String)
+def error(ex, arg, ix, i):
+print (PropertyNames.EMPTY_STRING + arg + // + ix + //Exception:  
+ ex.getLocalizedMessage())
+ex.printStackTrace()
+return True;

-- 
To view, visit https://gerrit.libreoffice.org/3000
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bed03d791c8ad5361b25e8374578a927aed9bf1
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file Process.py

2013-03-25 Thread Javier Fernandez (via Code Review)
):
+exp = self.createExporter(export)
+self.exporters[export.cp_Name] = exp
+return exp
+
+# @return tru if everything went smooth, false
+# if error(s) accured.
+def getResult(self):
+print (Process -- getFailed: , self.myTask.getFailed())
+print (Process -- result: , self.result)
+return (self.myTask.getFailed() == 0) and self.result

-- 
To view, visit https://gerrit.libreoffice.org/3001
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09a49ec08b89f6fbae27a60d5f9208bea7ba8cf8
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file ProcessErrorHandler.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3002

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/02/3002/1

Init: Added new file ProcessErrorHandler.py

Change-Id: I0444f27eddc4367c963a4c5e81a7f4b8011d5626
---
A wizards/com/sun/star/wizards/web/ProcessErrorHandler.py
1 file changed, 61 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/ProcessErrorHandler.py 
b/wizards/com/sun/star/wizards/web/ProcessErrorHandler.py
new file mode 100644
index 000..6b6c8bb
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/ProcessErrorHandler.py
@@ -0,0 +1,61 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+
+from .ProcessErrors import ProcessErrors
+from .AbstractErrorHandler import AbstractErrorHandler
+from .WebWizardConst import *
+
+# used to interact error accuring when generating the
+# web-site to the user.
+# This class renders the different errors,
+# replaceing some strings from the resources with
+# content of the given arguments, depending on the error
+# that accured.
+class ProcessErrorHandler(AbstractErrorHandler, ProcessErrors):
+
+FILENAME = %FILENAME
+URL = %URL
+ERROR = %ERROR
+resources = None
+
+def __init__(self, xmsf, peer, res):
+super(ProcessErrorHandler, self).__init__(xmsf, peer)
+self.resources = res
+
+def getMessageFor(self, ex, obj, ix, errType):
+if ix == ProcessErrors.ERROR_MKDIR:
+return self.resources.resErrDocExport.replace(obj.localFilename, 
self.FILENAME)
+elif ix == ProcessErrors.ERROR_EXPORT_MKDIR:
+return self.resources.resErrMkDir.replace(obj.localFilename, 
self.FILENAME)
+elif ix == ProcessErrors.ERROR_DOC_VALIDATE:
+return self.resources.resErrDocInfo.replace(obj.localFilename, 
self.FILENAME)
+elif ix == ProcessErrors.ERROR_EXPORT_IO:
+return self.resources.resErrExportIO.replace(obj.localFilename, 
self.FILENAME)
+elif ix == ProcessErrors.ERROR_EXPORT_SECURITY:
+return self.resources.resErrSecurity.replace(obj.localFilename, 
self.FILENAME)
+elif ix == ProcessErrors.ERROR_GENERATE_XSLT:
+return self.resources.resErrTOC
+elif ix == ProcessErrors.ERROR_GENERATE_COPY:
+return self.resources.resErrTOCMedia
+elif ix == ProcessErrors.ERROR_PUBLISH:
+return self.resources.resErrPublish.replace(self.URL, obj.URL)
+elif (ix == ProcessErrors.ERROR_EXPORT or ix == 
ProcessErrors.ERROR_PUBLISH_MEDIA):
+return self.resources.resErrPublishMedia
+elif ix == ProcessErrors.ERROR_CLEANUP:
+return self.resources.resErrUnexpected
+else:
+return self.resources.resErrUnknown.replace(%ERROR, 
{0}/{1}/{2!s}.format(ex.__class__.__name__, obj.__class__.__name__, ix))

-- 
To view, visit https://gerrit.libreoffice.org/3002
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0444f27eddc4367c963a4c5e81a7f4b8011d5626
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file ProcessErrors.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3003

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/03/3003/1

Init: Added new file ProcessErrors.py

Change-Id: I02484002b23db77313247fb3c6de12dc82c08da7
---
A wizards/com/sun/star/wizards/web/ProcessErrors.py
1 file changed, 32 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/ProcessErrors.py 
b/wizards/com/sun/star/wizards/web/ProcessErrors.py
new file mode 100644
index 000..40fda77
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/ProcessErrors.py
@@ -0,0 +1,32 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+
+# Error IDs for errors that can accure
+# in the interaction with the Process class.
+class ProcessErrors:
+
+ERROR_MKDIR = 0
+ERROR_EXPORT = 1
+ERROR_EXPORT_MKDIR = 2
+ERROR_DOC_VALIDATE = 3
+ERROR_EXPORT_IO = 4
+ERROR_EXPORT_SECURITY = 5
+ERROR_GENERATE_XSLT = 6
+ERROR_GENERATE_COPY = 7
+ERROR_PUBLISH = 8
+ERROR_PUBLISH_MEDIA = 9
+ERROR_CLEANUP = 10

-- 
To view, visit https://gerrit.libreoffice.org/3003
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I02484002b23db77313247fb3c6de12dc82c08da7
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file ProcessStatusRenderer.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3004

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/04/3004/1

Init: Added new file ProcessStatusRenderer.py

Change-Id: Ifacbff7c1423580f14ff3c92a8202015f1afad6b
---
A wizards/com/sun/star/wizards/web/ProcessStatusRenderer.py
1 file changed, 48 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/ProcessStatusRenderer.py 
b/wizards/com/sun/star/wizards/web/ProcessStatusRenderer.py
new file mode 100644
index 000..f123785
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/ProcessStatusRenderer.py
@@ -0,0 +1,48 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+
+
+from .WebWizardConst import *
+from ..common.IRenderer import IRenderer
+
+
+# recieves status calls from the status dialog which
+# apears when the user clicks create.
+# allocates strings from the resources to
+# display the current task status.
+# (renders the state to resource strings)
+class ProcessStatusRenderer(IRenderer):
+
+strings = {}
+
+def __init__(self, res):
+self.strings[TASK_EXPORT_DOCUMENTS] = res.resTaskExportDocs
+self.strings[TASK_EXPORT_PREPARE] = res.resTaskExportPrepare
+self.strings[TASK_GENERATE_COPY] = res.resTaskGenerateCopy
+self.strings[TASK_GENERATE_PREPARE] = res.resTaskGeneratePrepare
+self.strings[TASK_GENERATE_XSL] = res.resTaskGenerateXsl
+self.strings[TASK_PREPARE] = res.resTaskPrepare
+self.strings[LOCAL_PUBLISHER] = res.resTaskPublishLocal
+self.strings[ZIP_PUBLISHER] = res.resTaskPublishZip
+self.strings[FTP_PUBLISHER] = res.resTaskPublishFTP
+
+self.strings[TASK_PUBLISH_PREPARE] = res.resTaskPublishPrepare
+self.strings[TASK_FINISH] = res.resTaskFinish
+
+def render(self, object):
+return self.strings[object]
+

-- 
To view, visit https://gerrit.libreoffice.org/3004
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifacbff7c1423580f14ff3c92a8202015f1afad6b
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file StatusDialog.py

2013-03-25 Thread Javier Fernandez (via Code Review)
+#self.xReschedule.reschedule()
+
+# change the max property of the status bar
+# @param max
+def setMax(self, maximum):
+if self.finished:
+return
+self.progressBar.Model.ProgressValueMax = maximum
+
+# initialize the status bar according
+# to the given event.
+def taskStarted(self, te):
+self.finished = False
+self.initProgressBar(te.getTask())
+
+#closes the dialog.
+def taskFinished(self, te):
+self.finished = True
+if self.closeOnFinish:
+self.parent.xUnoDialog.setEnable(True)
+try:
+self.xUnoDialog.setVisible(False)
+self.xUnoDialog.dispose()
+except Exception:
+traceback.print_exc()
+else:
+self.btnCancel.Model.Label = self.res[2]
+
+# changes the status display
+def taskStatusChanged(self, te):
+self.setMax(te.getTask().getMax())
+self.setStatus(te.getTask().getStatus())
+
+# changes the displayed text.
+# A renderer is used to render
+#the task's subtask name to a resource string.
+def subtaskNameChanged(self, te):
+if self.renderer is not None:
+self.setLabel(self.renderer.render(te.getTask().getSubtaskName()))
+
+# displays the status dialog
+# @param parent_ the parent dialog
+# @param task what to do
+def execute(self, parent_, task, title):
+try:
+self.parent = parent_
+self.xDialogModel.Title = title
+try:
+# TODO change this to another execute dialog method.
+task.addTaskListener(self)
+self.setMax(10)
+self.setStatus(0)
+self.setLabel(task.getSubtaskName())
+self.parent.xUnoDialog.setEnable(False)
+self.setVisible(self.parent)
+if self.finishedMethod is not None:
+self.finishedMethod.invoke()
+except Exception:
+traceback.print_exc()
+except Exception:
+traceback.print_exc()
+
+# not supported !
+def performCancel(self):
+#TODO - implement a thread thing here...
+self.xUnoDialog.setVisible(False)
+
+# @return the subTask renderer object
+def getRenderer(self):
+return self.renderer
+
+# @param renderer
+def setRenderer(self, renderer):
+self.renderer = renderer
+
+#sets a method to be invoced when the
+def setFinishedMethod(self, mi):
+self.finishedMethod = mi

-- 
To view, visit https://gerrit.libreoffice.org/3005
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I679e60042d2d46fdeaf5b56063108bb0332393a0
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file TOCPreview.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3006

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/06/3006/1

Init: Added new file TOCPreview.py

Change-Id: I77749fd794308da81096b95acc57613562d76f8b
---
A wizards/com/sun/star/wizards/web/TOCPreview.py
1 file changed, 65 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/TOCPreview.py 
b/wizards/com/sun/star/wizards/web/TOCPreview.py
new file mode 100644
index 000..ad27afd
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/TOCPreview.py
@@ -0,0 +1,65 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+import traceback
+
+from .Process import Process
+from ..ui.event.Task import Task
+from ..common.FileAccess import FileAccess
+from ..common.Properties import Properties
+from ..common.Desktop import Desktop
+from ..common.UCB import UCB
+
+# This class both copies necessary files to
+# a temporary directory, generates a temporary TOC page,
+# and opens the generated html document in a web browser,
+# by default index.html (unchangeable).
+# br/
+# Since the files are both static and dynamic (some are always the same,
+# while other change according to user choices)
+# I divide this tasks to two: all necessary
+# static files, which should not regularily update are copied upon
+# instanciation.
+# The TOC is generated in refresh(...);
+
+class TOCPreview:
+
+def __init__(self, xmsf_, settings, res, tempDir_, _xFrame):
+self.xFrame = _xFrame
+self.xmsf = xmsf_
+self.resources = res
+self.fileAccess = FileAccess(self.xmsf)
+self.tempDir = tempDir_
+self.loadArgs = self.loadArgs(FileAccess.connectURLs(self.tempDir, 
/index.html))
+self.openHyperlink = Desktop.getDispatchURL(self.xmsf, 
.uno:OpenHyperlink)
+self.xDispatch = Desktop.getDispatcher(self.xmsf, self.xFrame, _top, 
self.openHyperlink)
+self.ucb = UCB(self.xmsf)
+
+Process.copyStaticImages(self.ucb, settings, self.tempDir)
+
+def refresh(self, settings):
+doc = settings.cp_DefaultSession.createDOM1()
+layout = settings.cp_DefaultSession.getLayout()
+task = Task(, , 1);
+Process.generate1(self.xmsf, layout, doc, self.fileAccess, 
self.tempDir, task)
+Process.copyLayoutFiles(self.ucb, self.fileAccess, settings, layout, 
self.tempDir)
+self.xDispatch.dispatch(self.openHyperlink, tuple(self.loadArgs))
+
+def loadArgs(self, url):
+props = Properties()
+props[URL] = url
+return props.getProperties1()

-- 
To view, visit https://gerrit.libreoffice.org/3006
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77749fd794308da81096b95acc57613562d76f8b
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file TypeDetection.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3007

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/07/3007/1

Init: Added new file TypeDetection.py

Change-Id: I1bd9f27fb0ebcde9af72bf7dc734c869a91da9ed
---
A wizards/com/sun/star/wizards/web/TypeDetection.py
1 file changed, 54 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/TypeDetection.py 
b/wizards/com/sun/star/wizards/web/TypeDetection.py
new file mode 100644
index 000..48957b6
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/TypeDetection.py
@@ -0,0 +1,54 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+'''
+a document which will open in writer.
+'''
+WRITER_DOC = writer
+'''
+a document which will open in calc.
+'''
+CALC_DOC = calc
+'''
+a document which will open in impress.
+'''
+IMPRESS_DOC = impress
+'''
+a document which will open in draw.
+'''
+DRAW_DOC = draw
+'''
+an HTML document
+'''
+HTML_DOC = html
+'''
+a GIF or an JPG file.
+'''
+WEB_GRAPHICS = graphics
+'''
+a PDF document.
+'''
+PDF_DOC = pdf
+'''
+a Sound file (mp3/wav ect.)
+'''
+SOUND_FILE = sound
+'''
+a File which can not be handled by neither SO or a Web browser
+(exe, jar, zip ect.)
+'''
+NO_TYPE = other

-- 
To view, visit https://gerrit.libreoffice.org/3007
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1bd9f27fb0ebcde9af72bf7dc734c869a91da9ed
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new file WebWizard.py

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3008

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/08/3008/1

Init: Added new file WebWizard.py

Change-Id: I25dffb036644b9e8466256b866ce89abbabc5b2f
---
A wizards/com/sun/star/wizards/web/WebWizard.py
1 file changed, 42 insertions(+), 0 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/WebWizard.py 
b/wizards/com/sun/star/wizards/web/WebWizard.py
new file mode 100644
index 000..241e776
--- /dev/null
+++ b/wizards/com/sun/star/wizards/web/WebWizard.py
@@ -0,0 +1,42 @@
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the License); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+#
+import traceback
+
+from .WWD_Events import WWD_Events
+
+# The last class in the WebWizard Dialog class hirarchy.
+# Has no functionality, is just nice to have it instanciated.
+class WebWizard(WWD_Events):
+
+def __init__(self, xmsf):
+super(WebWizard, self).__init__(xmsf)
+
+@classmethod
+def main(self):
+#Call the wizard remotely(see README)
+try:
+ConnectStr = \
+
uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext
+xLocMSF = Desktop.connect(ConnectStr)
+ww = WebWizard(xLocMSF)
+ww.show()
+ww.cleanup()
+except Exception as e:
+print (Wizard failure exception  + str(type(e)) +
+message  + str(e) +  args  + str(e.args) +
+   traceback.format_exc())

-- 
To view, visit https://gerrit.libreoffice.org/3008
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25dffb036644b9e8466256b866ce89abbabc5b2f
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Added new Exporter classes.

2013-03-25 Thread Javier Fernandez (via Code Review)
-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Relative paths and missing imports

2013-03-25 Thread Javier Fernandez (via Code Review)
 0928dda..bdfdae6 100644
--- a/wizards/com/sun/star/wizards/web/data/CGGeneralInfo.py
+++ b/wizards/com/sun/star/wizards/web/data/CGGeneralInfo.py
@@ -15,7 +15,8 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from common.ConfigGroup import ConfigGroup
+from ...common.ConfigGroup import ConfigGroup
+from ...common.XMLHelper import XMLHelper
 
 class CGGeneralInfo(ConfigGroup):
 
diff --git a/wizards/com/sun/star/wizards/web/data/CGIconSet.py 
b/wizards/com/sun/star/wizards/web/data/CGIconSet.py
index fb540e4..6f8c88f 100644
--- a/wizards/com/sun/star/wizards/web/data/CGIconSet.py
+++ b/wizards/com/sun/star/wizards/web/data/CGIconSet.py
@@ -15,7 +15,7 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from common.ConfigGroup import ConfigGroup
+from ...common.ConfigGroup import ConfigGroup
 
 class CGIconSet(ConfigGroup):
 cp_Index = -1
diff --git a/wizards/com/sun/star/wizards/web/data/CGImage.py 
b/wizards/com/sun/star/wizards/web/data/CGImage.py
index 1f01ff9..0d747ee 100644
--- a/wizards/com/sun/star/wizards/web/data/CGImage.py
+++ b/wizards/com/sun/star/wizards/web/data/CGImage.py
@@ -15,7 +15,7 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from common.ConfigGroup import ConfigGroup
+from ...common.ConfigGroup import ConfigGroup
 
 class CGImage(ConfigGroup):
 cp_Href = str()
diff --git a/wizards/com/sun/star/wizards/web/data/CGLayout.py 
b/wizards/com/sun/star/wizards/web/data/CGLayout.py
index a8b5bbb..9830664 100644
--- a/wizards/com/sun/star/wizards/web/data/CGLayout.py
+++ b/wizards/com/sun/star/wizards/web/data/CGLayout.py
@@ -15,8 +15,8 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from common.ConfigGroup import ConfigGroup
-from ui.UIConsts import RID_IMG_WEB
+from ...common.ConfigGroup import ConfigGroup
+from ...ui.UIConsts import UIConsts
 
 class CGLayout(ConfigGroup):
 
@@ -42,7 +42,7 @@
 
 def getImageUrls(self):
 sRetUrls = range(1)
-ResId = RID_IMG_WEB + (self.cp_Index * 2)
+ResId = UIConsts.RID_IMG_WEB + (self.cp_Index * 2)
 return [ResId, ResId + 1]
 
 def getTemplates(self, xmsf):
diff --git a/wizards/com/sun/star/wizards/web/data/CGSessionName.py 
b/wizards/com/sun/star/wizards/web/data/CGSessionName.py
index d42b0d5..283eaac 100644
--- a/wizards/com/sun/star/wizards/web/data/CGSessionName.py
+++ b/wizards/com/sun/star/wizards/web/data/CGSessionName.py
@@ -15,7 +15,7 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from common.ConfigGroup import ConfigGroup
+from ...common.ConfigGroup import ConfigGroup
 
 class CGSessionName(ConfigGroup):
 cp_Index = -1
diff --git a/wizards/com/sun/star/wizards/web/data/CGStyle.py 
b/wizards/com/sun/star/wizards/web/data/CGStyle.py
index bf90d51..2de5fdd 100644
--- a/wizards/com/sun/star/wizards/web/data/CGStyle.py
+++ b/wizards/com/sun/star/wizards/web/data/CGStyle.py
@@ -15,7 +15,7 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from common.ConfigGroup import ConfigGroup
+from ...common.ConfigGroup import ConfigGroup
 
 class CGStyle(ConfigGroup):
 cp_Index = -1

-- 
To view, visit https://gerrit.libreoffice.org/3010
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2196567e0c9b90a9a56aa1db769f6efc9e56e74f
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: fixed typo in the SystemDialog class.

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3011

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/11/3011/1

Init: fixed typo in the SystemDialog class.

Change-Id: I8ab25ca01eb68ad10e60b9209e8a2ee6b0eb3252
---
M wizards/com/sun/star/wizards/common/SystemDialog.py
1 file changed, 2 insertions(+), 2 deletions(-)



diff --git a/wizards/com/sun/star/wizards/common/SystemDialog.py 
b/wizards/com/sun/star/wizards/common/SystemDialog.py
index ab9b463..cf640ff 100644
--- a/wizards/com/sun/star/wizards/common/SystemDialog.py
+++ b/wizards/com/sun/star/wizards/common/SystemDialog.py
@@ -91,8 +91,8 @@
 
 def callFolderDialog(self, title, description, displayDir):
 try:
-self.systemDialog.setDisplayDirectoryxPropertyValue(
-subst(displayDir))
+self.systemDialog.setDisplayDirectory(
+self.subst(displayDir))
 except IllegalArgumentException as iae:
 traceback.print_exc()
 raise AttributeError(iae.getMessage());

-- 
To view, visit https://gerrit.libreoffice.org/3011
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ab25ca01eb68ad10e60b9209e8a2ee6b0eb3252
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the BackgroundsDialog class.

2013-03-25 Thread Javier Fernandez (via Code Review)
: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the ImageList class and avoid using the Help...

2013-03-25 Thread Javier Fernandez (via Code Review)
):
-Helper.setUnoPropertyValue(
-self.m_aImages[image].Model, Tabstop, True)
+self.m_aImages[image].Model.Tabstop = True
 xWindow = self.m_aImages[image]
 xWindow.setFocus()
 
 def defocus(self, image):
-Helper.setUnoPropertyValue(
-self.m_aImages[image].Model, Tabstop, False)
+self.m_aImages[image].Model.Tabstop = False
 
 '''jump to the given item (display the screen
 that contains the given item).

-- 
To view, visit https://gerrit.libreoffice.org/3012
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic48fa9d02eb9285937bc6b03e59dde67cf3c625c
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the IconsDialog class.

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3014

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/14/3014/1

Init: Pythonize the IconsDialog class.

Change-Id: I0a214b28a62d2a86834f1ca2c83220324d9e80ae
---
M wizards/com/sun/star/wizards/web/IconsDialog.py
1 file changed, 15 insertions(+), 14 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/IconsDialog.py 
b/wizards/com/sun/star/wizards/web/IconsDialog.py
index ee83a77..09191e3 100644
--- a/wizards/com/sun/star/wizards/web/IconsDialog.py
+++ b/wizards/com/sun/star/wizards/web/IconsDialog.py
@@ -15,10 +15,12 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from ImageListDialog import *
-from ImageListDialog import *
-from WWHID import HID_IS
-from common.FileAccess import FileAccess
+
+from .ImageListDialog import ImageListDialog
+from .WWHID import HID_IS
+from ..common.FileAccess import FileAccess
+
+from com.sun.star.awt import Size
 
 '''
 @author rpiterman
@@ -61,10 +63,10 @@
 self.build()
 
 def getIconset(self):
-if getSelected() is None:
+if self.getSelected() is None:
 return None
 else:
-return self.set.getKey((getSelected()) / len(self.icons))
+return self.set.getKey((self.getSelected()) / len(self.icons))
 
 def setIconset(self, iconset):
 #COMMENTED
@@ -86,29 +88,28 @@
 icon = getIconNum(i)
 sRetUrls = range(2)
 sRetUrls[0] = self.htmlexpDirectory + /htmlexpo/ \
-+ getIconsetPref(iset) + self.icons[icon] + getIconsetPostfix(iset)
++ self.getIconsetPref(iset) + self.icons[icon] + 
self.getIconsetPostfix(iset)
 sRetUrls[1] = sRetUrls[0]
 return sRetUrls
 
 def render(self, object):
 if object is None:
 return 
-
 i = (object).intValue()
-iset = getIconsetNum(i)
-return getIconset(iset).cp_Name
+iset = self.getIconsetNum(i)
+return self.getIconset1(iset).cp_Name
 
 def getIconsetNum(self, i):
 return i / self.icons.length
 
 def getIconNum(self, i):
-return i % self.icons.length
+return i % len(self.icons)
 
 def getIconsetPref(self, iconset):
-return getIconset(iconset).cp_FNPrefix
+return self.getIconset1(iconset).cp_FNPrefix
 
 def getIconsetPostfix(self, iconset):
-return getIconset(iconset).cp_FNPostfix
+return self.getIconset1(iconset).cp_FNPostfix
 
-def getIconset(self, i):
+def getIconset1(self, i):
 return self.set.getElementAt(i)

-- 
To view, visit https://gerrit.libreoffice.org/3014
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a214b28a62d2a86834f1ca2c83220324d9e80ae
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Don't use the Helper in ImageListDialog.

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3015

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/15/3015/1

Init: Don't use the Helper in ImageListDialog.

Change-Id: Ic58b14b73191039840b09e04b37109476e9a0a48
---
M wizards/com/sun/star/wizards/web/ImageListDialog.py
1 file changed, 10 insertions(+), 7 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/ImageListDialog.py 
b/wizards/com/sun/star/wizards/web/ImageListDialog.py
index d9dcf61..b9e176e 100644
--- a/wizards/com/sun/star/wizards/web/ImageListDialog.py
+++ b/wizards/com/sun/star/wizards/web/ImageListDialog.py
@@ -15,10 +15,12 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from ui.UnoDialog2 import *
-from ui.UnoDialog2 import *
-from ui.ImageList import ImageList
-from common.HelpIds import HelpIds
+import uno
+
+from ..ui.UnoDialog2 import UnoDialog2
+from ..ui.ImageList import ImageList
+from ..common.HelpIds import HelpIds
+from ..common.PropertyNames import PropertyNames
 
 from com.sun.star.awt import FontDescriptor
 from com.sun.star.awt.PushButtonType import OK, CANCEL, HELP, STANDARD
@@ -91,6 +93,7 @@
 '''
 
 def build(self):
+print (DEBUG  ImageListDialog build 1)
 #set dialog properties...
 ilWidth = (self.il.imageSize.Width + self.il.gap.Width) \
 * self.il.cols + self.il.gap.Width
@@ -98,8 +101,7 @@
 * self.il.rows + self.il.gap.Height
 dialogWidth = 6 + ilWidth + 6 + 50 + 6
 dialogHeight = 3 + 16 + 3 + (ilHeight + 8 + 14) + 6
-Helper.setUnoPropertyValues(
-self.xDialogModel,
+uno.invoke(self.xDialogModel, setPropertyValues,(
 (Closeable,
 PropertyNames.PROPERTY_HEIGHT,
 PropertyNames.PROPERTY_HELPURL,
@@ -112,7 +114,7 @@
 PropertyNames.PROPERTY_WIDTH),
 (True, dialogHeight, HelpIds.getHelpIdString(self.hid), True,
 imgDialog, 59, 24, 1,
-self.resources[ImageListDialog.RES_TITLE],dialogWidth))
+self.resources[ImageListDialog.RES_TITLE],dialogWidth)))
 #Set member- FontDescriptors...
 self.fontDescriptor1.Weight = 150
 PROPNAMES = (DefaultButton,
@@ -167,6 +169,7 @@
 self.il.helpURL = self.hid + 5
 self.il.tabIndex = 1
 self.il.create(self)
+print (DEBUG  ImageListDialog build 2)
 self.lblTitle = self.insertLabel(lblTitle,
 (FontDescriptor,
 PropertyNames.PROPERTY_HEIGHT,

-- 
To view, visit https://gerrit.libreoffice.org/3015
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic58b14b73191039840b09e04b37109476e9a0a48
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the WWD_Events class.

2013-03-25 Thread Javier Fernandez (via Code Review)
):
-
WWD_General.settings.cp_DefaultSession.cp_Content.cp_Documents.add(
-offset + i - failed - start, doc)
+if WWD_Startup.checkDocument1(self.xMSF, doc, self.task, 
self.xC):
+index = offset + i - failed - start
+print (DEBUG !!! loadDocuments (checkDocument) -- index: 
, index)
+
WWD_General.settings.cp_DefaultSession.cp_Content.cp_Documents.add(index, doc)
 else:
+print (DEBUG !!! loadDocuments (checkDocument) -- failed 
validation.)
 failed += 1
 
 # if any documents where added,
 # set the first one to be the current-selected document.
 if len(self.files)  start + failed:
+print (DEBUG !!! loadDocuments (setSelectedDoc) -- offset: , 
offset)
 self.parent.setSelectedDoc([offset])
+else:
+print (DEBUG !!! loadDocuments (setSelectedDoc) -- no 
documents were added)
 
 # update the ui...
-self.parent.docListDA.updateUI();
+self.parent.docListDA.updateUI()
 # this enables/disables the next steps.
 # when no documents in the list, all next steps are disabled
 self.parent.checkSteps()
@@ -950,5 +990,5 @@
 really close...
 '''
 
-#while (self.task.getStatus()  self.task.getMax()):
-#self.task.advance(false)
+while (self.task.getStatus()  self.task.getMax()):
+self.task.advance(False)

-- 
To view, visit https://gerrit.libreoffice.org/3016
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2000ac9f14b5ef8d2f1cc3bcb9c3d206c0ee5740
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the WWD_General class.

2013-03-25 Thread Javier Fernandez (via Code Review)
):
 return 
WWD_General.settings.cp_DefaultSession.cp_Content.cp_Documents.getSize()
 
@@ -132,15 +153,14 @@
 '''
 
 def isSaveSession(self):
-return int(Helper.getUnoPropertyValue(
-chkSaveSettings.Model, PropertyNames.PROPERTY_STATE) == 1)
+return int(self.chkSaveSettings.Model.State == 1)
 
 '''
 @return the name to save the session (step 7)
 '''
 
 def getSessionSaveName(self):
-return Helper.getUnoPropertyValue(getModel(cbSaveSettings), Text)
+return self.cbSaveSettings.Model.Text
 
 '''
 This method checks the status of the wizards and
@@ -165,7 +185,7 @@
 #disbale steps 3-7
 return
 
-for i in xrange(3,8):
+for i in range(3,8):
 self.setStepEnabled(i, enabled, True)
 '''
 in this place i just disable the finish button.
@@ -200,7 +220,7 @@
 '''
 
 def checkSaveSession(self):
-return (not isSaveSession() or not getSessionSaveName() == )
+return (not self.isSaveSession() or not self.getSessionSaveName() == 
)
 
 '''
 @return false if this publisher is not active, or, if it
@@ -209,14 +229,16 @@
 '''
 
 def checkPublish2(self, s, text, _property):
+print (DEBUG !!! checkPublish2)
 p = self.getPublisher(s)
 if p.cp_Publish:
-url = Helper.getUnoPropertyValue(text.Model, _property)
+print (DEBUG !!! Property: , _property)
+url = getattr(text.Model, _property)
+print (DEBUG !!! URL: , url)
 if url is None or url == :
 raise IllegalArgumentException ()
 else:
 return True
-
 else:
 return False
 
@@ -231,13 +253,14 @@
 
 def checkPublish_(self):
 try:
+print (DEBUG !!! checkPublish_)
 return \
 self.checkPublish2(LOCAL_PUBLISHER, self.txtLocalDir, Text) \
-or (not self.proxies and self.checkPublish(
-FTP_PUBLISHER, lblFTP, PropertyNames.PROPERTY_LABEL) \
+or (not self.proxies and self.checkPublish2(
+FTP_PUBLISHER, self.lblFTP, PropertyNames.PROPERTY_LABEL) \
 or self.checkPublish2(ZIP_PUBLISHER, self.txtZip, Text)) \
 and self.checkSaveSession()
-except IllegalArgumentException, ex:
+except IllegalArgumentException as ex:
 return False
 
 '''
@@ -249,6 +272,7 @@
 '''
 
 def checkPublish(self):
+print (DEBUG !!! checkPublish)
 self.enableFinishButton(self.checkPublish_())
 
 '''
@@ -257,9 +281,9 @@
 '''
 
 def unexpectedError(self, ex):
-ex.printStackTrace()
-peer = xControl.getPeer()
-AbstractErrorHandler.showMessage(
+traceback.print_exc()
+peer = self.xUnoDialog.getPeer()
+AbstractErrorHandler.showMessage1(
 self.xMSF, peer, self.resources.resErrUnexpected,
 ErrorHandler.ERROR_PROCESS_FATAL)
 
@@ -272,5 +296,6 @@
 def substitute(self, path):
 try:
 return self.xStringSubstitution.substituteVariables(path, False)
-except Exception, ex:
+except Exception as ex:
+traceback.print_exc()
 return path

-- 
To view, visit https://gerrit.libreoffice.org/3017
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc799956ffc688009e771fe9f8eea735cd22652d
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the WWD_Startup class.

2013-03-25 Thread Javier Fernandez (via Code Review)
).setDataObject(data, True)
-self.pubAware.get(i * 2 + 1).setDataObject(data, True)
+self.pubAware[i * 2].setDataObject(data, True)
+self.pubAware[i * 2 + 1].setDataObject(data, True)
 
 '''
 Fills the documents listbox.
@@ -534,6 +548,7 @@
 '''
 
 def mountList(self, data, _list):
+print (DEBUG !!! mountList -- data: , data)
 for i in _list:
 i.setDataObject(data, True)
 
@@ -550,8 +565,12 @@
 '''
 
 @classmethod
-def checkDocument(self,xmsf, doc, task, xC):
+def checkDocument1(self, xmsf, doc, task, xC):
 doc.validate(xmsf, task)
+return True
+
+def checkDocument(self, doc, task, xC):
+doc.validate(self.xMSF, task)
 return True
 '''except IOError:
 relocate = SystemDialog.showMessageBox(
@@ -599,7 +618,7 @@
 def checkContent(self, content, task, xC):
 i = 0
 while i  content.cp_Documents.getSize():
-if not checkDocument(content.cp_Documents.getElementAt(i), task, 
xC):
+if not self.checkDocument(content.cp_Documents.getElementAt(i), 
task, xC):
 # I use here 'i--' since, when the document is removed
 # an index change accures
 content.cp_Documents.remove(i)
@@ -623,15 +642,13 @@
 aux = False
 else:
 aux = True
-
 if WWD_Startup.selectedDoc[0] + 1  \
 
WWD_General.settings.cp_DefaultSession.cp_Content.cp_Documents.getSize():
 aux2 = True
 else:
 aux2 = False
-
-self.setEnabled(self.btnDocUp, aux)
-self.setEnabled(self.btnDocDown, aux2)
+self.btnDocUp.Model.Enabled = aux
+self.btnDocDown.Model.Enabled = aux2
 except Exception:
 traceback.print_exc()
 
@@ -641,10 +658,9 @@
 if bg is None or bg == :
 bg = self.resources.resBackgroundNone
 else:
-bg = FileAccess.getPathFilename(getFileAccess().getPath(bg, None))
+bg = FileAccess.getPathFilename(self.getFileAccess().getPath(bg, 
None))
 
-Helper.setUnoPropertyValue(
-self.txtBackground.Model, PropertyNames.PROPERTY_LABEL, bg)
+self.txtBackground.Model.Label = bg
 
 def updateIconsetText(self):
 iconset = WWD_General.settings.cp_DefaultSession.cp_Design.cp_IconSet
@@ -657,8 +673,7 @@
 else:
 iconsetName = IconSet.cp_Name
 
-Helper.setUnoPropertyValue(
-txtIconset.Model, PropertyNames.PROPERTY_LABEL, iconsetName)
+self.txtIconset.Model.Label = iconsetName
 
 '''
 refreshes the style preview.
@@ -669,11 +684,10 @@
 
 def refreshStylePreview(self):
 try:
-WWD_General.settings.cp_DefaultSession.cp_Design.cp_Style = \
-style + \
-str(WWD_General.settings.cp_DefaultSession.cp_Design.cp_Style)
+print (WARNING !!! refreshStylePreview)
 self.updateBackgroundText()
-
self.stylePreview.refresh(WWD_General.settings.cp_DefaultSession.getStyle(), 
WWD_General.settings.cp_DefaultSession.cp_Design.cp_BackgroundImage)
+
self.stylePreview.refresh(WWD_General.settings.cp_DefaultSession.getStyle(),
+  
WWD_General.settings.cp_DefaultSession.cp_Design.cp_BackgroundImage)
 self.dpStylePreview.reload(self.xMSF)
 except Exception:
 traceback.print_exc()

-- 
To view, visit https://gerrit.libreoffice.org/3018
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic23a6c834f470baa47b10ef6cb6aa4ca34d40af7
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the WebWizardDialogResources class.

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3020

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/20/3020/1

Init: Pythonize the WebWizardDialogResources class.

Change-Id: I416e4b02c7f8128c0a9f81cb7e7dbf366c7941e5
---
M wizards/com/sun/star/wizards/web/WebWizardDialogResources.py
1 file changed, 5 insertions(+), 5 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py 
b/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py
index ca295de..a8b5e54 100644
--- a/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py
+++ b/wizards/com/sun/star/wizards/web/WebWizardDialogResources.py
@@ -16,10 +16,10 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 import traceback
-from common.Resource import Resource
-from common.Configuration import Configuration
-from common.Properties import Properties
-from document.OfficeDocument import OfficeDocument
+from ..common.Resource import Resource
+from ..common.Configuration import Configuration
+from ..common.Properties import Properties
+from ..document.OfficeDocument import OfficeDocument
 
 class WebWizardDialogResources(Resource):
 UNIT_NAME = dbwizres
@@ -311,5 +311,5 @@
 self.resGifFiles = Properties.getPropertyValue(
 OfficeDocument.getTypeMediaDescriptor(
 xmsf, gif_Graphics_Interchange), UIName)
-except Exception, ex:
+except Exception as ex:
 traceback.print_exc()

-- 
To view, visit https://gerrit.libreoffice.org/3020
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I416e4b02c7f8128c0a9f81cb7e7dbf366c7941e5
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the CGDocument class.

2013-03-25 Thread Javier Fernandez (via Code Review)
().getExporters(CGDocument.appType)[exporter_[0]]
-cp_Exporter = getSettings().cp_Exporters.getKey(exp)
+exp = self.getSettings().getExporters(CGDocument.appType)[exporter_[0]]
+self.cp_Exporter = self.getSettings().cp_Exporters.getKey(exp)
 
 '''
 @see getExporter()
@@ -275,10 +307,10 @@
 if self.cp_Exporter is None:
 return 0
 
-exporter = getSettings().cp_Exporters.getElement(self.cp_Exporter)
-exporters = getSettings().getExporters(CGDocument.appType)
+exporter = self.getSettings().cp_Exporters.getElement(self.cp_Exporter)
+exporters = self.getSettings().getExporters(CGDocument.appType)
 i = 0
-while i  exporters.length:
+while i  len(exporters):
 if exporters[i] == exporter:
 return i
 

-- 
To view, visit https://gerrit.libreoffice.org/3021
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09c40828c5a6dbceaf531a7146014dc36f67a1f5
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the CGExporter class.

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3022

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/22/3022/1

Init: Pythonize the CGExporter class.

Change-Id: I985d0cc3cdb75b6f1443f316181ce83d423e2b91
---
M wizards/com/sun/star/wizards/web/data/CGExporter.py
1 file changed, 4 insertions(+), 4 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/data/CGExporter.py 
b/wizards/com/sun/star/wizards/web/data/CGExporter.py
index ef4a944..74288c7 100644
--- a/wizards/com/sun/star/wizards/web/data/CGExporter.py
+++ b/wizards/com/sun/star/wizards/web/data/CGExporter.py
@@ -15,9 +15,9 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from common.ConfigSet import ConfigSet
-from CGArgument import CGArgument
-from common.ConfigGroup import ConfigGroup
+from ...common.ConfigSet import ConfigSet
+from ...common.ConfigGroup import ConfigGroup
+from .CGArgument import CGArgument
 
 class CGExporter(ConfigGroup):
 cp_Index = -1
@@ -37,4 +37,4 @@
 
 def supports(self, mime):
 return CGExporter.cp_SupportedMimeTypes ==  or \
-CGExporter.cp_SupportedMimeTypes.index(mime)  -1
+CGExporter.cp_SupportedMimeTypes.find(mime)  -1

-- 
To view, visit https://gerrit.libreoffice.org/3022
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I985d0cc3cdb75b6f1443f316181ce83d423e2b91
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the WebWizardDialog class.

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3019

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/19/3019/1

Init: Pythonize the WebWizardDialog class.

Change-Id: Ief62c2feea79ceb0e90c940bd1d442cf996df839
---
M wizards/com/sun/star/wizards/web/WebWizardDialog.py
1 file changed, 13 insertions(+), 12 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialog.py 
b/wizards/com/sun/star/wizards/web/WebWizardDialog.py
index f6fbc39..bec0f70 100644
--- a/wizards/com/sun/star/wizards/web/WebWizardDialog.py
+++ b/wizards/com/sun/star/wizards/web/WebWizardDialog.py
@@ -15,12 +15,14 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from ui.WizardDialog import *
-from ui.WizardDialog import *
-from WebWizardDialogResources import WebWizardDialogResources
-from WebWizardConst import *
-from WWHID import *
-from ui.ImageList import ImageList
+import unohelper
+
+from ..ui.WizardDialog import WizardDialog, uno, PropertyNames
+from .WebWizardDialogResources import WebWizardDialogResources
+from .WebWizardConst import *
+from .WWHID import *
+from ..ui.ControlScroller import HelpIds
+from ..ui.ImageList import ImageList
 from com.sun.star.awt import Size
 from com.sun.star.awt.FontUnderline import SINGLE
 from com.sun.star.awt.FontFamily import ROMAN
@@ -87,8 +89,8 @@
 #Load Resources
 self.resources = WebWizardDialogResources(xmsf)
 #set dialog properties...
-Helper.setUnoPropertyValues(self.xDialogModel,(
-Closeable,
+uno.invoke(self.xDialogModel, setPropertyValues,(
+(Closeable,
 PropertyNames.PROPERTY_HEIGHT,
 PropertyNames.PROPERTY_HELPURL, Moveable,
 PropertyNames.PROPERTY_NAME,
@@ -99,7 +101,7 @@
 PropertyNames.PROPERTY_WIDTH),
 (True, 210, HelpIds.getHelpIdString(HID0_WEBWIZARD), True,
 WebWizardDialog, 102, 52, 1, 6,
-self.resources.resWebWizardDialog_title, 330))
+self.resources.resWebWizardDialog_title, 330)))
 self.fontDescriptor0 = \
 uno.createUnoStruct('com.sun.star.awt.FontDescriptor')
 self.fontDescriptor1 = \
@@ -446,7 +448,7 @@
 274, 43, 5, 53, 50), self)
 self.insertLabel(lblIconset, WebWizardDialog.PROPNAMES_LBL,
 (8, self.resources.reslblIconset, lblIconset, 97, 64, 5, 51, 70))
-self.insertLabel(txtIconset,
+self.txtIconset = self.insertLabel(txtIconset,
 (Border,
 PropertyNames.PROPERTY_HEIGHT,
 PropertyNames.PROPERTY_LABEL,
@@ -727,5 +729,4 @@
 return oResIds
 
 def render(self, listItem):
-print implementar
-#return listItem == None ?  : (listItem).cp_Name
+return  if (listItem is None) else listItem.cp_Name

-- 
To view, visit https://gerrit.libreoffice.org/3019
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief62c2feea79ceb0e90c940bd1d442cf996df839
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the class CGPublish.

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3023

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/23/3023/1

Init: Pythonize the class CGPublish.

Change-Id: I3930dd1702bf12f35d0456b56e629d3d865df056
---
M wizards/com/sun/star/wizards/web/data/CGPublish.py
1 file changed, 5 insertions(+), 3 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/data/CGPublish.py 
b/wizards/com/sun/star/wizards/web/data/CGPublish.py
index 2a0619c..6a5c92f 100644
--- a/wizards/com/sun/star/wizards/web/data/CGPublish.py
+++ b/wizards/com/sun/star/wizards/web/data/CGPublish.py
@@ -15,7 +15,7 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from common.ConfigGroup import ConfigGroup
+from ...common.ConfigGroup import ConfigGroup
 
 '''
 A Class which describes the publishing arguments
@@ -30,18 +30,20 @@
 cp_URL = str()
 cp_Username = str()
 password = str()
+overwriteApproved = bool()
+url = str()
 
 def setURL(self, path):
 try:
 self.cp_URL = (self.root).getFileAccess().getURL(path)
 self.overwriteApproved = False
-except Exception, ex:
+except Exception as ex:
 ex.printStackTrace()
 
 def getURL(self):
 try:
 return (self.root).getFileAccess().getPath(self.cp_URL, None)
-except Exception, e:
+except Exception as e:
 e.printStackTrace()
 return 
 

-- 
To view, visit https://gerrit.libreoffice.org/3023
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3930dd1702bf12f35d0456b56e629d3d865df056
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the class CGSession.

2013-03-25 Thread Javier Fernandez (via Code Review)
Hi,

I have submitted a patch for review:

https://gerrit.libreoffice.org/3024

To pull it, you can do:

git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/24/3024/1

Init: Pythonize the class CGSession.

Change-Id: Iff1b076654be0b8b95e9802650e2803a274aaf98
---
M wizards/com/sun/star/wizards/web/data/CGSession.py
1 file changed, 17 insertions(+), 13 deletions(-)



diff --git a/wizards/com/sun/star/wizards/web/data/CGSession.py 
b/wizards/com/sun/star/wizards/web/data/CGSession.py
index dfa94db..211cea9 100644
--- a/wizards/com/sun/star/wizards/web/data/CGSession.py
+++ b/wizards/com/sun/star/wizards/web/data/CGSession.py
@@ -15,12 +15,17 @@
 #   except in compliance with the License. You may obtain a copy of
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
-from common.ConfigGroup import ConfigGroup
-from common.ConfigSet import ConfigSet
-from CGContent import CGContent
-from CGDesign import CGDesign
-from CGGeneralInfo import CGGeneralInfo
-from CGPublish import CGPublish
+import uno
+
+from ...common.ConfigGroup import ConfigGroup
+from ...common.ConfigSet import ConfigSet
+from ...common.XMLHelper import XMLHelper
+from .CGContent import CGContent
+from .CGDesign import CGDesign
+from .CGGeneralInfo import CGGeneralInfo
+from .CGPublish import CGPublish
+
+from xml.dom.minidom import Document
 
 class CGSession(ConfigGroup):
 
@@ -37,7 +42,7 @@
 def createDOM(self, parent):
 root = XMLHelper.addElement(
 parent, session, [name, screen-size],
-[self.cp_Name, getScreenSize()])
+[self.cp_Name, self.getScreenSize()])
 self.cp_GeneralInfo.createDOM(root)
 self.cp_Content.createDOM(root)
 return root
@@ -54,13 +59,12 @@
 return 800
 
 def getLayout(self):
-return self. root.cp_Layouts.getElement(self.cp_Design.cp_Layout)
+return self.root.cp_Layouts.getElement(self.cp_Design.cp_Layout)
 
 def getStyle(self):
-return self.root.cp_Styles.getElement(self.cp_Design.cp_Style)
+return self.root.cp_Styles.getElementAt(self.cp_Design.cp_Style)
 
-def createDOM(self):
-factory = DocumentBuilderFactory.newInstance()
-doc = factory.newDocumentBuilder().newDocument()
-createDOM(doc)
+def createDOM1(self):
+doc = Document()
+self.createDOM(doc)
 return doc

-- 
To view, visit https://gerrit.libreoffice.org/3024
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff1b076654be0b8b95e9802650e2803a274aaf98
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Init: Pythonize the CGSettings class; added a new internal c...

2013-03-25 Thread Javier Fernandez (via Code Review)
 a constant of the enumeration NumberFormatIndex
+@return
+'''
+def getFormat(self, format):
+return 
NumberFormatter.getNumberFormatterKey(self.formatSupplier, format)
+
+'''
+@param date a VCL date in form of 20041231
+@return a document relative date
+'''
+def format(self, formatIndex, date):
+difference =  date - self.calendar
+return self.formatter.convertNumberToString(formatIndex,  
difference.days)
+
 def __init__(self, xmsf, document):
-self.dateUtils = Helper.DateUtils(xmsf, document)
+self.dateUtils = self.DateUtils(xmsf, document)
 self.dateFormat = self.dateUtils.getFormat(DATE_SYS_DMMM)
 self.numberFormat = self.dateUtils.getFormat(NUMBER_1000DEC2)
 

-- 
To view, visit https://gerrit.libreoffice.org/3025
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I604544ae224c3a822514e479db223a6e0268fb12
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Javier Fernandez javier@gmail.com

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


  1   2   >