summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorDaniel Rentz [dr] <daniel.rentz@oracle.com>2010-12-27 12:33:29 +0100
committerDaniel Rentz [dr] <daniel.rentz@oracle.com>2010-12-27 12:33:29 +0100
commit2ddbbcba14d00da112e07fd8cbd77e74e3f37164 (patch)
tree8425043d5f344d52b62d715f56ea4c9b07c50d8b /unotools
parent376a1fd0f4f538f3fa3591b66201b59834d9f278 (diff)
parent7997ab5bac6fbdfe3b3427c322507a993d33acbc (diff)
dr77: rebase to DEV300m96
Diffstat (limited to 'unotools')
-rw-r--r--unotools/prj/build.lst2
-rw-r--r--unotools/source/config/pathoptions.cxx13
-rw-r--r--unotools/source/config/viewoptions.cxx2
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx2
4 files changed, 16 insertions, 3 deletions
diff --git a/unotools/prj/build.lst b/unotools/prj/build.lst
index 70402fb3dbd5..d6f10335c254 100644
--- a/unotools/prj/build.lst
+++ b/unotools/prj/build.lst
@@ -1,4 +1,4 @@
-ut unotools : comphelper cppuhelper offuh tools ucbhelper NULL
+ut unotools : LIBXSLT:libxslt comphelper cppuhelper offuh tools ucbhelper NULL
ut unotools usr1 - all ut_mkout NULL
ut unotools\inc nmake - all ut_inc NULL
ut unotools\source\misc nmake - all ut_misc ut_config ut_inc NULL
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index 2ae6f0c97f0c..3cf43a1f3bc9 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -46,12 +46,14 @@
#include <unotools/ucbhelper.hxx>
#include <vos/process.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/componentcontext.hxx>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/XMacroExpander.hpp>
#include <rtl/instance.hxx>
#include <itemholder1.hxx>
@@ -998,6 +1000,17 @@ sal_Bool SvtPathOptions::SearchFile( String& rIniFile, Pathes ePath )
if ( LocalFileHelper::ConvertPhysicalNameToURL( aPathToken, aURL ) )
aObj.SetURL( aURL );
}
+ if ( aObj.GetProtocol() == INET_PROT_VND_SUN_STAR_EXPAND )
+ {
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XMacroExpander > xMacroExpander( aContext.getSingleton( "com.sun.star.util.theMacroExpander" ), UNO_QUERY );
+ OSL_ENSURE( xMacroExpander.is(), "SvtPathOptions::SearchFile: unable to access the MacroExpander singleton!" );
+ if ( xMacroExpander.is() )
+ {
+ const ::rtl::OUString sExpandedPath = xMacroExpander->expandMacros( aObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
+ aObj.SetURL( sExpandedPath );
+ }
+ }
xub_StrLen i, nCount = aIniFile.GetTokenCount( '/' );
for ( i = 0; i < nCount; ++i )
diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx
index 7f2250c611fc..f76ce48eebdf 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -781,7 +781,7 @@ css::uno::Reference< css::uno::XInterface > SvtViewOptionsBase_Impl::impl_getSet
xNode = ::comphelper::ConfigurationHelper::makeSureSetNodeExists(m_xRoot, m_sListName, sNode);
else
{
- if (m_xSet.is())
+ if (m_xSet.is() && m_xSet->hasByName(sNode) )
m_xSet->getByName(sNode) >>= xNode;
}
}
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 87fddc0c65cd..26742151ee3d 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -237,7 +237,7 @@ void CreateTempName_Impl( String& rName, sal_Bool bKeep, sal_Bool bDir = sal_Tru
/* RW permission for the user only! */
mode_t old_mode = umask(077);
#endif
- FileBase::RC err = aFile.open(osl_File_OpenFlag_Create);
+ FileBase::RC err = aFile.open( osl_File_OpenFlag_Create | osl_File_OpenFlag_NoLock );
#ifdef UNX
umask(old_mode);
#endif