[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - ucb/source

2013-03-14 Thread Michael Stahl
 ucb/source/ucp/gvfs/gvfs_provider.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 10253a3d6b452e7043519949948fc65efe6914e0
Author: Michael Stahl mst...@redhat.com
Date:   Mon Jan 21 12:15:25 2013 +0100

gvfs UCP: silence -Werror=deprecated-declarations

Seems to me there's no point to that since GVFS itself is deprecated
anyway.

Change-Id: Ibceba3bbe33a3a37dd088d0f24bfdd4211095589
(cherry picked from commit ee860cbfc74f86ff3b7a9625997048f3357bb221)

Signed-off-by: Stephan Bergmann sberg...@redhat.com

diff --git a/ucb/source/ucp/gvfs/gvfs_provider.cxx 
b/ucb/source/ucp/gvfs/gvfs_provider.cxx
index cb4f3ae..9df3964 100644
--- a/ucb/source/ucp/gvfs/gvfs_provider.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_provider.cxx
@@ -150,8 +150,10 @@ extern C SAL_DLLPUBLIC_EXPORT void * SAL_CALL 
component_getFactory( const sal_
 osl::Guard osl::Mutex  aGuard( osl::Mutex::getGlobalMutex() );
 if (!gnome_vfs_initialized ())
 gnome_vfs_init ();
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
 if (!auth_queue)
 auth_queue = g_private_new( auth_queue_destroy );
+SAL_WNODEPRECATED_DECLARATIONS_POP
 }
 
 uno::Reference lang::XMultiServiceFactory  xSMgr
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - ucb/source

2013-03-14 Thread Stephan Bergmann
 ucb/source/ucp/gvfs/gvfs_content.cxx |   22 +-
 1 file changed, 13 insertions(+), 9 deletions(-)

New commits:
commit f2d8cc9f69cbfb85881e73ffa6a6926fb3395238
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Mar 14 17:01:07 2013 +0100

fdo#54275: Fix GVFS UCP, so saving docs works again

Similar to 8722f0e7ef690205d042c8a6b1fdf342a34ecbe1 rhbz#895690: Make GIO 
UCP
less brittle, so saving docs works again the alternative, older GVFS UCP
(--enable-gnome-vfs --disable-gio, as used e.g. in
distro-configs/LibreOfficeLinux.conf) no longer works well in LO 3.6 and 
later:

* For one, getPropertyValues did not work for non-existing files, just 
like in
  the GIO UCP case.

* For another, creating the .~XXX# lock file uses insert with
  !bReplaceExisting, which apparently never worked for the GVFS UCP.

Change-Id: Ie4dc032225697ff7b866a75327891c796d559392
(cherry picked from commit 112d3287a9424e0baaa8d956e6aff8932d48658e)
Reviewed-on: https://gerrit.libreoffice.org/2729
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx 
b/ucb/source/ucp/gvfs/gvfs_content.cxx
index fd51030..1eeb19d 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -584,11 +584,9 @@ uno::Reference sdbc::XRow  Content::getPropertyValues(
 const uno::Reference ucb::XCommandEnvironment  xEnv )
 {
 int nProps;
-GnomeVFSResult result;
 uno::Sequence beans::Property  allProperties;
 
-if( ( result = getInfo( xEnv ) ) != GNOME_VFS_OK )
-cancelCommandExecution( result, xEnv, sal_False );
+getInfo( xEnv );
 
 const beans::Property* pProps;
 
@@ -609,10 +607,13 @@ uno::Reference sdbc::XRow  Content::getPropertyValues(
 const beans::Property rProp = pProps[ n ];
 
 if ( rProp.Name == Title ) {
-if (m_info.name  m_info.name[0] == '/')
-g_warning (Odd NFS title on item '%s' == '%s',
-   getURI(), m_info.name);
-xRow-appendString( rProp, GnomeToOUString( m_info.name ) );
+if ( m_info.name ) {
+if (m_info.name[0] == '/')
+g_warning (Odd NFS title on item '%s' == '%s',
+   getURI(), m_info.name);
+xRow-appendString( rProp, GnomeToOUString( m_info.name ) );
+} else
+xRow-appendVoid( rProp );
 }
 
 else if ( rProp.Name == ContentType )
@@ -658,7 +659,10 @@ uno::Reference sdbc::XRow  Content::getPropertyValues(
 xRow-appendVoid( rProp );
 }
 else if ( rProp.Name == IsHidden )
-xRow-appendBoolean( rProp, ( m_info.name  m_info.name[0] == '.' 
) );
+if ( m_info.name )
+xRow-appendBoolean( rProp, m_info.name[0] == '.' );
+else
+xRow-appendVoid( rProp );
 
 else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
IsVolume ) ) ||
  rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( 
IsCompactDisk ) ) )
@@ -981,7 +985,7 @@ void Content::insert(
 GnomeVFSHandle *handle = NULL;
 ::rtl::OString aURI = getOURI();
 
-result = GNOME_VFS_OK;
+result = GNOME_VFS_ERROR_GENERIC;
 if ( bReplaceExisting ) {
 Authentication aAuth( xEnv );
 result = gnome_vfs_open( handle, aURI.getStr(), GNOME_VFS_OPEN_WRITE 
);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - ucb/source

2013-03-13 Thread Stephan Bergmann
 ucb/source/ucp/gio/gio_content.cxx |   31 +++
 1 file changed, 15 insertions(+), 16 deletions(-)

New commits:
commit 524962c4ade96412ed4c1bbf912492e39d054f0f
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Mar 13 08:59:42 2013 +0100

rhbz#895690: Make GIO UCP less brittle, so saving docs works again

966d20e35d5a2be2fce6c204af5c156c3ead7063 CMIS ucp: write documents back to 
CMIS
server had introduced changes to sfx2/source/doc/docfile.cxx in LO 3.6 that
changed the exact commands that this code issued for UCP content nodes.  
The GIO
UCP was not prepared to handle that, causing saving of documents via it to 
fail
with rather obscure error messages:

* For one, docfile.cxx started to call getPropertyValues to obtain the 
Title
  of a non-existent content.  That lead to an 
InteractiveAugmentedIOException
  instead of silently returning a void value.

* For another, docfile.cxx started to call transfer on a folder content 
whose
  URL did not have a trailing slash, so the code computed a wrong URL for 
the
  child element, resulting in various problems depending on context.

(cherry picked from commit 8722f0e7ef690205d042c8a6b1fdf342a34ecbe1)
Conflicts:
ucb/source/ucp/gio/gio_content.cxx

Change-Id: I1a9c0c094f5320456940e3af4c802711828ab5ac
Reviewed-on: https://gerrit.libreoffice.org/2697
Reviewed-by: Bosdonnat Cedric cedric.bosdon...@free.fr
Tested-by: Bosdonnat Cedric cedric.bosdon...@free.fr

diff --git a/ucb/source/ucp/gio/gio_content.cxx 
b/ucb/source/ucp/gio/gio_content.cxx
index 5029e06..b8900f8 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -416,7 +416,7 @@ uno::Reference sdbc::XRow  
Content::getPropertyValuesFromGFileInfo(GFileInfo *
 
 if ( rProp.Name == IsDocument )
 {
-if (g_file_info_has_attribute(pInfo, 
G_FILE_ATTRIBUTE_STANDARD_TYPE))
+if (pInfo != 0  g_file_info_has_attribute(pInfo, 
G_FILE_ATTRIBUTE_STANDARD_TYPE))
 xRow-appendBoolean( rProp, ( g_file_info_get_file_type( pInfo 
) == G_FILE_TYPE_REGULAR ||
g_file_info_get_file_type( 
pInfo ) == G_FILE_TYPE_UNKNOWN ) );
 else
@@ -424,45 +424,45 @@ uno::Reference sdbc::XRow  
Content::getPropertyValuesFromGFileInfo(GFileInfo *
 }
 else if ( rProp.Name == IsFolder )
 {
-if( g_file_info_has_attribute( pInfo, 
G_FILE_ATTRIBUTE_STANDARD_TYPE) )
+if (pInfo != 0  g_file_info_has_attribute( pInfo, 
G_FILE_ATTRIBUTE_STANDARD_TYPE) )
 xRow-appendBoolean( rProp, ( g_file_info_get_file_type( pInfo 
) == G_FILE_TYPE_DIRECTORY ));
 else
 xRow-appendVoid( rProp );
 }
 else if ( rProp.Name == Title )
 {
-if (g_file_info_has_attribute(pInfo, 
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME))
+if (pInfo != 0  g_file_info_has_attribute(pInfo, 
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME))
 {
 const char *pName = g_file_info_get_display_name(pInfo);
 xRow-appendString( rProp, rtl::OUString(pName, strlen(pName), 
RTL_TEXTENCODING_UTF8) );
 }
 else
-xRow-appendVoid( rProp );
+xRow-appendVoid(rProp);
 }
 else if ( rProp.Name == IsReadOnly )
 {
-if( g_file_info_has_attribute( pInfo, 
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE ) )
+if (pInfo != 0  g_file_info_has_attribute( pInfo, 
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE ) )
 xRow-appendBoolean( rProp, 
!g_file_info_get_attribute_boolean( pInfo, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE) );
 else
 xRow-appendVoid( rProp );
 }
 else if ( rProp.Name == DateCreated )
 {
-if( g_file_info_has_attribute( pInfo, 
G_FILE_ATTRIBUTE_TIME_CREATED ) )
+if (pInfo != 0  g_file_info_has_attribute( pInfo, 
G_FILE_ATTRIBUTE_TIME_CREATED ) )
 xRow-appendTimestamp( rProp, 
getDateFromUnix(g_file_info_get_attribute_uint64(pInfo, 
G_FILE_ATTRIBUTE_TIME_CREATED)) );
 else
 xRow-appendVoid( rProp );
 }
 else if ( rProp.Name == DateModified )
 {
-if( g_file_info_has_attribute( pInfo,  
G_FILE_ATTRIBUTE_TIME_CHANGED ) )
+if (pInfo != 0  g_file_info_has_attribute( pInfo,  
G_FILE_ATTRIBUTE_TIME_CHANGED ) )
 xRow-appendTimestamp( rProp, 
getDateFromUnix(g_file_info_get_attribute_uint64(pInfo, 
G_FILE_ATTRIBUTE_TIME_CHANGED)) );
 else
 xRow-appendVoid( rProp );
 }
 else if ( rProp.Name == Size )
 {
-if( g_file_info_has_attribute( pInfo, 
G_FILE_ATTRIBUTE_STANDARD_SIZE) )
+if (pInfo != 0  g_file_info_has_attribute( pInfo,