Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2729

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/29/2729/1

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)
---
M ucb/source/ucp/gvfs/gvfs_content.cxx
1 file changed, 13 insertions(+), 9 deletions(-)



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 @@
                 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 @@
         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 @@
                 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 @@
     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 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4dc032225697ff7b866a75327891c796d559392
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6
Gerrit-Owner: Stephan Bergmann <sbergman@redhat.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.