summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2010-06-07 18:30:32 +0200
committerCarsten Driesner <cd@openoffice.org>2010-06-07 18:30:32 +0200
commitebd1482944f7b98f0cede3e38f42e67687661598 (patch)
treeebe3c51dbcd5f37957468399a19bbfd7ca26b5e4 /sfx2
parentb58f6d66bc9726882a3ab1891847e7c083f1a6c1 (diff)
parente54612ea425f775ef22ba038dba697540d916eaa (diff)
fwk139: Merge changes
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/makefile.mk1
-rwxr-xr-xsfx2/source/doc/syspath.cxx46
-rw-r--r--sfx2/source/doc/syspathw32.cxx21
3 files changed, 60 insertions, 8 deletions
diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk
index fd812297a8ab..69fee96ccf18 100644
--- a/sfx2/source/doc/makefile.mk
+++ b/sfx2/source/doc/makefile.mk
@@ -84,6 +84,7 @@ SLOFILES = \
$(SLO)$/sfxacldetect.obj \
$(SLO)$/docstoragemodifylistener.obj \
$(SLO)$/querytemplate.obj \
+ $(SLO)$/syspath.obj \
$(SLO)$/syspathw32.obj
# $(SLO)$/applet.obj \
diff --git a/sfx2/source/doc/syspath.cxx b/sfx2/source/doc/syspath.cxx
new file mode 100755
index 000000000000..96bbee376306
--- /dev/null
+++ b/sfx2/source/doc/syspath.cxx
@@ -0,0 +1,46 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2008 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* $RCSfile: shutdowniconw32.cxx,v $
+* $Revision: 1.48 $
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+// Comment out precompiled statement due to redefinition errors
+#include "precompiled_sfx2.hxx"
+
+#include "syspath.hxx"
+
+extern "C" bool GetUserTemplateLocation(sal_Unicode*, int nSize);
+
+bool SystemPath::GetUserTemplateLocation(sal_Unicode* pFolder, int nSize )
+{
+#ifdef WNT
+ return ::GetUserTemplateLocation( pFolder, nSize );
+#else
+ return false;
+#endif
+}
diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx
index 5e3b8cd91062..74522654ff49 100644
--- a/sfx2/source/doc/syspathw32.cxx
+++ b/sfx2/source/doc/syspathw32.cxx
@@ -28,18 +28,23 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-// Comment out precompiled statement due to redefinition errors
-//#include "precompiled_sfx2.hxx"
-
-#include "syspath.hxx"
-
#ifdef WNT
#ifdef _MSC_VER
#pragma warning(disable:4917)
#endif
#include <shlobj.h>
+// Copied from sal/types.h to circumvent problems with precompiled headers
+// and redefinitions of BOOL, INT32 and other types. Unfortunately tools
+// also define these type incompatible with Win32 types which leads from
+// time to time to very nasty compilation errors. If someone finds a better
+// way to solve these probs please remove this copied part!
+#if ( defined(WIN32) && !defined(__MINGW32__) )
+ typedef wchar_t sal_Unicode;
+#else
+ typedef sal_uInt16 sal_Unicode;
+#endif
+
static bool _SHGetSpecialFolderW32( int nFolderID, WCHAR* pszFolder, int nSize )
{
LPITEMIDLIST pidl;
@@ -65,10 +70,10 @@ static bool _SHGetSpecialFolderW32( int nFolderID, WCHAR* pszFolder, int nSize )
#endif
-bool SystemPath::GetUserTemplateLocation(sal_Unicode* pFolder, int nSize )
+extern "C" bool GetUserTemplateLocation(sal_Unicode* pFolder, int nSize)
{
#ifdef WNT
- return _SHGetSpecialFolderW32(CSIDL_TEMPLATES, pFolder, nSize );
+ return _SHGetSpecialFolderW32( CSIDL_TEMPLATES, pFolder, nSize );
#else
(void)pFolder;
(void)nSize;