[libreoffice/f19] rework to apply

Caolán McNamara caolanm at fedoraproject.org
Tue Feb 25 12:46:03 UTC 2014


commit 9444845b963eea3b95726fb57fce656fb71fdabe
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 25 12:27:42 2014 +0000

    rework to apply

 ...z-1065807-rework-i66157-for-multiple-writ.patch |   57 +++++++++----------
 ...bz-1065807-use-xdg-Templates-for-default-.patch |   38 ++++++-------
 ...list-common-lang-independant-template-dir.patch |    9 +--
 3 files changed, 47 insertions(+), 57 deletions(-)
---
diff --git a/0001-Related-rhbz-1065807-rework-i66157-for-multiple-writ.patch b/0001-Related-rhbz-1065807-rework-i66157-for-multiple-writ.patch
index 87607fd..b21b408 100644
--- a/0001-Related-rhbz-1065807-rework-i66157-for-multiple-writ.patch
+++ b/0001-Related-rhbz-1065807-rework-i66157-for-multiple-writ.patch
@@ -1,8 +1,8 @@
-From bbf82f684060980d267733ee589d263d6b25340c Mon Sep 17 00:00:00 2001
+From 6805be76c930312d18e732f4572b6c2611cc8e0f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
 Date: Mon, 24 Feb 2014 15:27:36 +0000
-Subject: [PATCH] Related: rhbz#1065807 rework #i66157# for multiple writable
- template dirs
+Subject: [PATCH 2/4] Related: rhbz#1065807 rework #i66157# for multiple
+ writable template dirs
 
 if there are multiple user-level template dirs then we should be able to
 remove/rename content in all of them, not just the default writable target.
@@ -22,18 +22,18 @@ Change-Id: I56afe991d4297ba692e914ae95ea02d68553f60a
  1 file changed, 66 insertions(+), 14 deletions(-)
 
 diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
-index 574232a..47b8fed 100644
+index ff07ef3..4cf76c4 100644
 --- a/sfx2/source/doc/doctemplates.cxx
 +++ b/sfx2/source/doc/doctemplates.cxx
-@@ -67,6 +67,7 @@
- #include <com/sun/star/beans/PropertyValue.hpp>
- #include <com/sun/star/uno/RuntimeException.hpp>
- #include <com/sun/star/uno/XComponentContext.hpp>
-+#include <com/sun/star/util/thePathSettings.hpp>
+@@ -55,6 +55,7 @@
+ #include <com/sun/star/ucb/XContentAccess.hpp>
+ #include <com/sun/star/frame/ModuleManager.hpp>
+ #include <com/sun/star/uno/Exception.hpp>
++#include <com/sun/star/util/PathSettings.hpp>
  
- #include <rtl/ref.hxx>
  #include <svtools/templatefoldercache.hxx>
-@@ -187,6 +188,7 @@ class SfxDocTplService_Impl
+ #include <unotools/configmgr.hxx>
+@@ -181,6 +182,7 @@
  
      ::osl::Mutex                maMutex;
      Sequence< OUString >        maTemplateDirs;
@@ -41,7 +41,7 @@ index 574232a..47b8fed 100644
      OUString                    maRootURL;
      NameList_Impl               maNames;
      Locale                      maLocale;
-@@ -271,8 +273,16 @@ class SfxDocTplService_Impl
+@@ -265,8 +267,16 @@
  
      void                        updateData( DocTemplates_EntryData_Impl *pData );
  
@@ -59,16 +59,16 @@ index 574232a..47b8fed 100644
                                  ~SfxDocTplService_Impl();
  
      sal_Bool                    init() { if ( !mbIsInitialized ) init_Impl(); return mbIsInitialized; }
-@@ -552,7 +562,7 @@ void SfxDocTplService_Impl::getDirList()
+@@ -574,7 +584,7 @@
      // TODO/LATER: let use service, register listener
      INetURLObject   aURL;
-     OUString    aDirs = SvtPathOptions().GetTemplatePath();
+     String          aDirs = SvtPathOptions().GetTemplatePath();
 -    sal_uInt16  nCount = comphelper::string::getTokenCount(aDirs, C_DELIM);
 +    sal_Int32 nCount = comphelper::string::getTokenCount(aDirs, C_DELIM);
  
      maTemplateDirs = Sequence< OUString >( nCount );
  
-@@ -560,7 +570,7 @@ void SfxDocTplService_Impl::getDirList()
+@@ -582,7 +592,7 @@
      const OUString aPrefix(
          "vnd.sun.star.expand:"  );
  
@@ -76,13 +76,13 @@ index 574232a..47b8fed 100644
 +    for (sal_Int32 i = 0; i < nCount; ++i)
      {
          aURL.SetSmartProtocol( INET_PROT_FILE );
-         aURL.SetURL( aDirs.getToken( i, C_DELIM ) );
-@@ -578,6 +588,23 @@ void SfxDocTplService_Impl::getDirList()
+         aURL.SetURL( aDirs.GetToken( i, C_DELIM ) );
+@@ -600,6 +610,23 @@
  
      aValue <<= maTemplateDirs;
  
 +    css::uno::Reference< css::util::XPathSettings > xPathSettings =
-+        css::util::thePathSettings::get(mxContext);
++        css::util::PathSettings::create( xContext );
 +
 +    // load internal paths
 +    OUString sProp( "Template_internal" );
@@ -101,7 +101,7 @@ index 574232a..47b8fed 100644
      // Store the template dir list
      setProperty( maRootContent, aPropName, aValue );
  }
-@@ -1538,13 +1565,16 @@ sal_Bool SfxDocTplService_Impl::removeGroup( const OUString& rGroupName )
+@@ -1575,13 +1602,16 @@
  
          if ( !maTemplateDirs.getLength() )
              return sal_False;
@@ -122,7 +122,7 @@ index 574232a..47b8fed 100644
              return sal_False;
  
          // now get the content of the Group
-@@ -1652,14 +1682,14 @@ sal_Bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName,
+@@ -1689,14 +1719,14 @@
  
      if ( !maTemplateDirs.getLength() )
          return sal_False;
@@ -141,7 +141,7 @@ index 574232a..47b8fed 100644
  
      // check that the group can be renamed ( all the contents must be in target location )
      sal_Bool bCanBeRenamed = sal_False;
-@@ -1761,7 +1791,7 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName,
+@@ -1798,7 +1828,7 @@
              aValue >>= aTemplateToRemoveTargetURL;
  
          if ( aGroupTargetURL.isEmpty() || !maTemplateDirs.getLength()
@@ -150,9 +150,9 @@ index 574232a..47b8fed 100644
              return sal_False; // it is not allowed to remove the template
      }
  
-@@ -2050,6 +2080,29 @@ sal_Bool SfxDocTplService_Impl::addTemplate( const OUString& rGroupName,
-     return sal_False;
- }
+@@ -2060,6 +2090,29 @@
+     catch ( Exception& )
+     { return sal_False; }
  
 +bool SfxDocTplService_Impl::isInternalTemplateDir(const OUString& rURL) const
 +{
@@ -178,9 +178,9 @@ index 574232a..47b8fed 100644
 +    return OUString();
 +}
  
- sal_Bool SfxDocTplService_Impl::removeTemplate( const OUString& rGroupName,
-                                                 const OUString& rTemplateName )
-@@ -2091,8 +2144,7 @@ sal_Bool SfxDocTplService_Impl::removeTemplate( const OUString& rGroupName,
+     // either the document has title and it is the same as requested, or we have to set it
+     sal_Bool bCorrectTitle = ( bDocHasTitle && aTitle.equals( rTemplateName ) );
+@@ -2129,8 +2182,7 @@
      // delete the target template
      if ( !aTargetURL.isEmpty() )
      {
@@ -190,6 +190,3 @@ index 574232a..47b8fed 100644
              return sal_False;
  
          removeContent( aTargetURL );
--- 
-1.8.5.3
-
diff --git a/0001-Resolves-rhbz-1065807-use-xdg-Templates-for-default-.patch b/0001-Resolves-rhbz-1065807-use-xdg-Templates-for-default-.patch
index be31624..8ba57de 100644
--- a/0001-Resolves-rhbz-1065807-use-xdg-Templates-for-default-.patch
+++ b/0001-Resolves-rhbz-1065807-use-xdg-Templates-for-default-.patch
@@ -1,25 +1,25 @@
-From 838b77f5f3d6d8fd98891e99a23ff78a6a357cb2 Mon Sep 17 00:00:00 2001
+From c309eed705edd358ba2db8b26d711d0f8ae41dca Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
 Date: Mon, 24 Feb 2014 11:38:13 +0000
-Subject: [PATCH] Resolves: rhbz#1065807 use xdg ~/Templates for default
+Subject: [PATCH 3/4] Resolves: rhbz#1065807 use xdg ~/Templates for default
  Template location
 
 (if it exists)
 
 Change-Id: I98fc9fd54d1f56c8bed24ce4d2ebf53756ded2cc
 ---
- framework/source/services/pathsettings.cxx         |  6 +++
+ framework/source/services/pathsettings.cxx         |  6 ++++
  .../registry/data/org/openoffice/Office/Paths.xcu  | 13 +++++++
  shell/source/backends/desktopbe/desktopbackend.cxx | 21 ++++++++---
- shell/source/backends/gconfbe/gconfaccess.cxx      | 43 +++++++++++++++-------
+ shell/source/backends/gconfbe/gconfaccess.cxx      | 41 ++++++++++++++++------
  shell/source/backends/gconfbe/gconfaccess.hxx      |  1 +
- 5 files changed, 66 insertions(+), 18 deletions(-)
+ 5 files changed, 66 insertions(+), 16 deletions(-)
 
 diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
-index 90d61d2..105c5a6 100644
+index 15fb3c0..bdb2949 100644
 --- a/framework/source/services/pathsettings.cxx
 +++ b/framework/source/services/pathsettings.cxx
-@@ -644,6 +644,12 @@ PathSettings::PathInfo PathSettings::impl_readNewFormat(const OUString& sPath)
+@@ -280,6 +280,12 @@ PathSettings::PathInfo PathSettings::impl_readNewFormat(const OUString& sPath)
      // read the writeable path
      xPath->getByName(CFGPROP_WRITEPATH) >>= aPathVal.sWritePath;
  
@@ -38,7 +38,7 @@ index 4b5ec7d..2ef605e 100644
 +++ b/officecfg/registry/data/org/openoffice/Office/Paths.xcu
 @@ -160,8 +160,21 @@
        <node oor:name="InternalPaths">
-         <node oor:name="$(insturl)/@LIBO_SHARE_FOLDER@/template/$(vlang)" oor:op="fuse"/>
+         <node oor:name="$(insturl)/share/template/$(vlang)" oor:op="fuse"/>
        </node>
 +      <!--
 +           On unix check of we have a ~/Templates and use that as the write path.
@@ -59,10 +59,10 @@ index 4b5ec7d..2ef605e 100644
      </node>
      <node oor:name="UIConfig" oor:op="fuse" oor:mandatory="true">
 diff --git a/shell/source/backends/desktopbe/desktopbackend.cxx b/shell/source/backends/desktopbe/desktopbackend.cxx
-index 8233bff..0acf337 100644
+index 3e8e8c1..52d8358 100644
 --- a/shell/source/backends/desktopbe/desktopbackend.cxx
 +++ b/shell/source/backends/desktopbe/desktopbackend.cxx
-@@ -153,11 +153,22 @@ css::uno::Any Default::getPropertyValue(OUString const & PropertyName)
+@@ -154,11 +154,22 @@ css::uno::Any Default::getPropertyValue(OUString const & PropertyName)
          css::beans::UnknownPropertyException, css::lang::WrappedTargetException,
          css::uno::RuntimeException)
  {
@@ -91,7 +91,7 @@ index 8233bff..0acf337 100644
          return css::uno::makeAny(css::beans::Optional< css::uno::Any >());
      }
 diff --git a/shell/source/backends/gconfbe/gconfaccess.cxx b/shell/source/backends/gconfbe/gconfaccess.cxx
-index 8cf9f4b..1bdad66 100644
+index de8eb29..0d407d6 100644
 --- a/shell/source/backends/gconfbe/gconfaccess.cxx
 +++ b/shell/source/backends/gconfbe/gconfaccess.cxx
 @@ -23,6 +23,7 @@
@@ -102,7 +102,7 @@ index 8cf9f4b..1bdad66 100644
  #include "osl/file.hxx"
  #include "osl/security.hxx"
  #include "osl/thread.h"
-@@ -189,19 +190,10 @@ static OUString xdg_user_dir_lookup (const char *type)
+@@ -189,15 +190,8 @@ static OUString xdg_user_dir_lookup (const char *type)
          if( osl::FileBase::E_None == aDocumentsDir.open() )
              return aDocumentsDirURL;
      }
@@ -119,12 +119,8 @@ index 8cf9f4b..1bdad66 100644
 +    return aHomeDirURL + "/" + OUString::createFromAscii(type);
  }
  
--
--
- uno::Any makeAnyOfGconfValue( GConfValue *pGconfValue )
- {
-     switch( pGconfValue->type )
-@@ -317,11 +309,18 @@ uno::Any translateToOOo( const ConfigurationValue &rValue, GConfValue *pGconfVal
+ //------------------------------------------------------------------------------
+@@ -317,11 +311,18 @@ uno::Any translateToOOo( const ConfigurationValue &rValue, GConfValue *pGconfVal
  
          case SETTING_WORK_DIRECTORY:
          {
@@ -144,7 +140,7 @@ index 8cf9f4b..1bdad66 100644
          case SETTING_USER_GIVENNAME:
          {
              OUString aCompleteName( OStringToOUString(
-@@ -392,7 +391,7 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* pClient, const Configurati
+@@ -392,7 +393,7 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* pClient, const Configurati
  
          case SETTING_WORK_DIRECTORY:
          {
@@ -153,7 +149,7 @@ index 8cf9f4b..1bdad66 100644
              osl::Directory aDocumentsDir( aDocumentsDirURL );
  
              if( osl::FileBase::E_None == aDocumentsDir.open() )
-@@ -400,6 +399,16 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* pClient, const Configurati
+@@ -400,6 +401,16 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* pClient, const Configurati
          }
              break;
  
@@ -170,7 +166,7 @@ index 8cf9f4b..1bdad66 100644
          case SETTING_USER_GIVENNAME:
          {
              OUString aCompleteName( OStringToOUString(
-@@ -563,6 +572,14 @@ ConfigurationValue const ConfigurationValues[] =
+@@ -563,6 +574,14 @@ ConfigurationValue const ConfigurationValues[] =
      },
  
      {
diff --git a/0001-explictly-list-common-lang-independant-template-dir.patch b/0001-explictly-list-common-lang-independant-template-dir.patch
index 4bb15db..9b26a32 100644
--- a/0001-explictly-list-common-lang-independant-template-dir.patch
+++ b/0001-explictly-list-common-lang-independant-template-dir.patch
@@ -1,7 +1,7 @@
-From 6f48d0bb2d3f3b4e4d3e46d3a5cdeaa552df1933 Mon Sep 17 00:00:00 2001
+From 783e5a2e149694974fcce79a01144c78f154bfee Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
 Date: Tue, 25 Feb 2014 09:55:48 +0000
-Subject: [PATCH] explictly list common lang-independant template dir
+Subject: [PATCH 4/4] explictly list common lang-independant template dir
 
 Change-Id: I50d8efe46fc2eb3dfe615ad1f6eb7ee03cdcd29a
 ---
@@ -17,9 +17,6 @@ index 2ef605e..2a9eb5c 100644
      <node oor:name="Template" oor:op="fuse" oor:mandatory="true">
        <node oor:name="InternalPaths">
 +        <node oor:name="$(insturl)/@LIBO_SHARE_FOLDER@/template/common" oor:op="fuse"/>
-         <node oor:name="$(insturl)/@LIBO_SHARE_FOLDER@/template/$(vlang)" oor:op="fuse"/>
+         <node oor:name="$(insturl)/share/template/$(vlang)" oor:op="fuse"/>
        </node>
        <!--
--- 
-1.8.5.3
-


More information about the scm-commits mailing list