From e12435cdc98763f1aae10bd05fb1fcc7c6c8071b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Feb 25 2014 10:56:37 +0000 Subject: missing files --- diff --git a/0001-Resolves-rhbz-1065807-use-xdg-Templates-for-default-.patch b/0001-Resolves-rhbz-1065807-use-xdg-Templates-for-default-.patch new file mode 100644 index 0000000..be31624 --- /dev/null +++ b/0001-Resolves-rhbz-1065807-use-xdg-Templates-for-default-.patch @@ -0,0 +1,202 @@ +From 838b77f5f3d6d8fd98891e99a23ff78a6a357cb2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Mon, 24 Feb 2014 11:38:13 +0000 +Subject: [PATCH] Resolves: rhbz#1065807 use xdg ~/Templates for default + Template location + +(if it exists) + +Change-Id: I98fc9fd54d1f56c8bed24ce4d2ebf53756ded2cc +--- + 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.hxx | 1 + + 5 files changed, 66 insertions(+), 18 deletions(-) + +diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx +index 90d61d2..105c5a6 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) + // read the writeable path + xPath->getByName(CFGPROP_WRITEPATH) >>= aPathVal.sWritePath; + ++ // avoid duplicates, by removing the writeable path from ++ // the user defined path list if it happens to be there too ++ OUStringList::iterator aI = aPathVal.lUserPaths.find(aPathVal.sWritePath); ++ if (aI != aPathVal.lUserPaths.end()) ++ aPathVal.lUserPaths.erase(aI); ++ + // read state props + xPath->getByName(CFGPROP_ISSINGLEPATH) >>= aPathVal.bIsSinglePath; + +diff --git a/officecfg/registry/data/org/openoffice/Office/Paths.xcu b/officecfg/registry/data/org/openoffice/Office/Paths.xcu +index 4b5ec7d..2ef605e 100644 +--- a/officecfg/registry/data/org/openoffice/Office/Paths.xcu ++++ b/officecfg/registry/data/org/openoffice/Office/Paths.xcu +@@ -160,8 +160,21 @@ + + + ++ + + $(userurl)/template ++ ++ ++ ++ $(userurl)/template + + + +diff --git a/shell/source/backends/desktopbe/desktopbackend.cxx b/shell/source/backends/desktopbe/desktopbackend.cxx +index 8233bff..0acf337 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) + css::beans::UnknownPropertyException, css::lang::WrappedTargetException, + css::uno::RuntimeException) + { +- if ( PropertyName == "EnableATToolSupport" || PropertyName == "ExternalMailer" || PropertyName == "SourceViewFontHeight" +- || PropertyName == "SourceViewFontName" || PropertyName == "WorkPathVariable" || PropertyName == "ooInetFTPProxyName" +- || PropertyName == "ooInetFTPProxyPort" || PropertyName == "ooInetHTTPProxyName" || PropertyName == "ooInetHTTPProxyPort" +- || PropertyName == "ooInetHTTPSProxyName" || PropertyName == "ooInetHTTPSProxyPort" || PropertyName == "ooInetNoProxy" +- || PropertyName == "ooInetProxyType" || PropertyName == "givenname" || PropertyName == "sn" ) ++ if ( PropertyName == "EnableATToolSupport" || ++ PropertyName == "ExternalMailer" || ++ PropertyName == "SourceViewFontHeight" || ++ PropertyName == "SourceViewFontName" || ++ PropertyName == "TemplatePathVariable" || ++ PropertyName == "WorkPathVariable" || ++ PropertyName == "ooInetFTPProxyName" || ++ PropertyName == "ooInetFTPProxyPort" || ++ PropertyName == "ooInetHTTPProxyName" || ++ PropertyName == "ooInetHTTPProxyPort" || ++ PropertyName == "ooInetHTTPSProxyName" || ++ PropertyName == "ooInetHTTPSProxyPort" || ++ PropertyName == "ooInetNoProxy" || ++ PropertyName == "ooInetProxyType" || ++ PropertyName == "givenname" || ++ PropertyName == "sn" ) + { + 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 +--- a/shell/source/backends/gconfbe/gconfaccess.cxx ++++ b/shell/source/backends/gconfbe/gconfaccess.cxx +@@ -23,6 +23,7 @@ + #include + + #include "com/sun/star/uno/RuntimeException.hpp" ++#include "com/sun/star/uno/Sequence.hxx" + #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) + if( osl::FileBase::E_None == aDocumentsDir.open() ) + return aDocumentsDirURL; + } +- /* Special case desktop for historical compatibility */ +- if (strcmp (type, "DESKTOP") == 0) +- { +- return aHomeDirURL + "/Desktop"; +- } +- else +- { +- return aHomeDirURL + "/Documents"; +- } ++ /* Use fallbacks historical compatibility if nothing else exists */ ++ 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 + + case SETTING_WORK_DIRECTORY: + { +- OUString aDocumentsDirURL = xdg_user_dir_lookup("DOCUMENTS"); ++ OUString aDocumentsDirURL = xdg_user_dir_lookup("Documents"); + + return uno::makeAny( aDocumentsDirURL ); + } + ++ case SETTING_TEMPLATE_DIRECTORY: ++ { ++ OUString aTemplatesDirURL = xdg_user_dir_lookup("Templates"); ++ ++ return uno::makeAny( aTemplatesDirURL ); ++ } ++ + case SETTING_USER_GIVENNAME: + { + OUString aCompleteName( OStringToOUString( +@@ -392,7 +391,7 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* pClient, const Configurati + + case SETTING_WORK_DIRECTORY: + { +- OUString aDocumentsDirURL = xdg_user_dir_lookup("DOCUMENTS"); ++ OUString aDocumentsDirURL = xdg_user_dir_lookup("Documents"); + osl::Directory aDocumentsDir( aDocumentsDirURL ); + + if( osl::FileBase::E_None == aDocumentsDir.open() ) +@@ -400,6 +399,16 @@ sal_Bool SAL_CALL isDependencySatisfied( GConfClient* pClient, const Configurati + } + break; + ++ case SETTING_TEMPLATE_DIRECTORY: ++ { ++ OUString aTemplatesDirURL = xdg_user_dir_lookup("Templates"); ++ osl::Directory aTemplatesDir( aTemplatesDirURL ); ++ ++ if( osl::FileBase::E_None == aTemplatesDir.open() ) ++ return sal_True; ++ } ++ break; ++ + case SETTING_USER_GIVENNAME: + { + OUString aCompleteName( OStringToOUString( +@@ -563,6 +572,14 @@ ConfigurationValue const ConfigurationValues[] = + }, + + { ++ SETTING_TEMPLATE_DIRECTORY, ++ "/desktop/gnome/url-handlers/mailto/command", // dummy ++ RTL_CONSTASCII_STRINGPARAM("TemplatePathVariable"), ++ sal_True, ++ SETTING_TEMPLATE_DIRECTORY, // so that the existence of the dir can be checked ++ }, ++ ++ { + SETTING_USER_GIVENNAME, + "/desktop/gnome/url-handlers/mailto/command", // dummy + RTL_CONSTASCII_STRINGPARAM("givenname"), +diff --git a/shell/source/backends/gconfbe/gconfaccess.hxx b/shell/source/backends/gconfbe/gconfaccess.hxx +index 7f0a52a..3fcd217 100644 +--- a/shell/source/backends/gconfbe/gconfaccess.hxx ++++ b/shell/source/backends/gconfbe/gconfaccess.hxx +@@ -47,6 +47,7 @@ enum ConfigurationSetting + SETTING_ENABLE_ACCESSIBILITY, + SETTING_MAILER_PROGRAM, + SETTING_WORK_DIRECTORY, ++ SETTING_TEMPLATE_DIRECTORY, + SETTING_SOURCEVIEWFONT_NAME, + SETTING_SOURCEVIEWFONT_HEIGHT, + SETTING_USER_GIVENNAME, +-- +1.8.5.3 + diff --git a/0001-explictly-list-common-lang-independant-template-dir.patch b/0001-explictly-list-common-lang-independant-template-dir.patch new file mode 100644 index 0000000..4bb15db --- /dev/null +++ b/0001-explictly-list-common-lang-independant-template-dir.patch @@ -0,0 +1,25 @@ +From 6f48d0bb2d3f3b4e4d3e46d3a5cdeaa552df1933 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 25 Feb 2014 09:55:48 +0000 +Subject: [PATCH] explictly list common lang-independant template dir + +Change-Id: I50d8efe46fc2eb3dfe615ad1f6eb7ee03cdcd29a +--- + officecfg/registry/data/org/openoffice/Office/Paths.xcu | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/officecfg/registry/data/org/openoffice/Office/Paths.xcu b/officecfg/registry/data/org/openoffice/Office/Paths.xcu +index 2ef605e..2a9eb5c 100644 +--- a/officecfg/registry/data/org/openoffice/Office/Paths.xcu ++++ b/officecfg/registry/data/org/openoffice/Office/Paths.xcu +@@ -158,6 +158,7 @@ + + + ++ + + +