summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-16 14:14:43 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-17 11:33:57 +0000
commit2087484c65a3d5e75a9e8ad116d11a4e13366219 (patch)
tree1f335918a854319df9269329d165a91d711d2108 /sfx2/source
parentd6bf086012343b4a1e27cd4242dced9ee0d73a06 (diff)
use consistent #define checks for the Windows platform
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/appdde.cxx16
-rw-r--r--sfx2/source/appl/impldde.cxx2
-rw-r--r--sfx2/source/appl/lnkbase2.cxx4
-rw-r--r--sfx2/source/appl/shutdownicon.cxx8
-rw-r--r--sfx2/source/appl/shutdownicon.hxx2
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx6
-rw-r--r--sfx2/source/dialog/mailmodel.cxx2
-rw-r--r--sfx2/source/doc/graphhelp.cxx6
-rw-r--r--sfx2/source/doc/graphhelp.hxx2
-rw-r--r--sfx2/source/doc/sfxacldetect.cxx2
-rw-r--r--sfx2/source/doc/syspath.cxx4
-rw-r--r--sfx2/source/doc/syspathw32.cxx4
12 files changed, 29 insertions, 29 deletions
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 59bb5f6ed917..ad9e9d49abc5 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -45,7 +45,7 @@
#include <comphelper/processfactory.hxx>
#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
-#if defined WNT
+#if defined(_WIN32)
OUString SfxDdeServiceName_Impl( const OUString& sIn )
{
@@ -197,7 +197,7 @@ bool ImplDdeService::SysTopicExecute( const OUString* pStr )
class SfxDdeTriggerTopic_Impl : public DdeTopic
{
-#if defined WNT
+#if defined(_WIN32)
public:
SfxDdeTriggerTopic_Impl()
: DdeTopic( "TRIGGER" )
@@ -209,7 +209,7 @@ public:
class SfxDdeDocTopic_Impl : public DdeTopic
{
-#if defined WNT
+#if defined(_WIN32)
public:
SfxObjectShell* pSh;
DdeData aData;
@@ -228,7 +228,7 @@ public:
};
-#if defined WNT
+#if defined(_WIN32)
namespace {
@@ -423,7 +423,7 @@ void SfxObjectShell::ReconnectDdeLinks(SfxObjectShell& rServer)
bool SfxApplication::InitializeDde()
{
int nError = 0;
-#if defined( WNT )
+#if defined(_WIN32)
DBG_ASSERT( !pAppData_Impl->pDdeService,
"Dde can not be initialized multiple times" );
@@ -458,7 +458,7 @@ void SfxAppData_Impl::DeInitDDE()
DELETEZ( pDdeService );
}
-#if defined( WNT )
+#if defined(_WIN32)
void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
{
//OV: DDE is disconnected in server mode!
@@ -492,7 +492,7 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
{
-#if defined WNT
+#if defined(_WIN32)
//OV: DDE is disconnected in server mode!
if( !pAppData_Impl->pDocTopics )
return;
@@ -522,7 +522,7 @@ DdeService* SfxApplication::GetDdeService()
return pAppData_Impl->pDdeService;
}
-#if defined WNT
+#if defined(_WIN32)
DdeData* SfxDdeDocTopic_Impl::Get(SotClipboardFormatId nFormat)
{
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 78218a912ccf..19192703ca1b 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -18,7 +18,7 @@
*/
-#if defined(WNT)
+#if defined(_WIN32)
#include <prewin.h>
#include <postwin.h>
#endif
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index e24af8c885d8..21b3207ce10c 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -99,7 +99,7 @@ class ImplDdeItem : public DdeGetPutItem
bool bIsValidData : 1;
bool bIsInDTOR : 1;
public:
-#if defined WNT
+#if defined(_WIN32)
ImplDdeItem( SvBaseLink& rLink, const OUString& rStr )
: DdeGetPutItem( rStr ), pLink( &rLink ), bIsValidData( false ),
bIsInDTOR( false )
@@ -147,7 +147,7 @@ SvBaseLink::SvBaseLink( SfxLinkUpdateMode nUpdateMode, SotClipboardFormatId nCon
pImplData->ClientType.bIntrnlLnk = false;
}
-#if defined WNT
+#if defined(_WIN32)
static DdeTopic* FindTopic( const OUString & rLinkName, sal_uInt16* pItemStt )
{
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index f0836521e270..6d0571eea2b9 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -484,7 +484,7 @@ IMPL_LINK_TYPED( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, /*unused
}
}
-#ifdef WNT
+#ifdef _WIN32
// Destroy dialog to prevent problems with custom controls
// This fix is dependent on the dialog settings. Destroying the dialog here will
// crash the non-native dialog implementation! Therefore make this dependent on
@@ -675,7 +675,7 @@ void ShutdownIcon::LeaveModalMode()
bModalMode = false;
}
-#ifdef WNT
+#ifdef _WIN32
// defined in shutdowniconw32.cxx
#elif defined MACOSX
// defined in shutdowniconaqua.cxx
@@ -739,7 +739,7 @@ OUString ShutdownIcon::getShortcutName()
::SolarMutexGuard aGuard;
aShortcutName = SFX2_RESSTR(STR_QUICKSTART_LNKNAME);
}
-#ifdef WNT
+#ifdef _WIN32
aShortcutName += ".lnk";
OUString aShortcut(GetAutostartFolderNameW32());
@@ -782,7 +782,7 @@ void ShutdownIcon::SetAutostart( bool bActivate )
if( bActivate && IsQuickstarterInstalled() )
{
-#ifdef WNT
+#ifdef _WIN32
EnableAutostartW32( aShortcut );
#else // UNX
getAutostartDir( true );
diff --git a/sfx2/source/appl/shutdownicon.hxx b/sfx2/source/appl/shutdownicon.hxx
index 94b6c31cdcd4..7ea006f10431 100644
--- a/sfx2/source/appl/shutdownicon.hxx
+++ b/sfx2/source/appl/shutdownicon.hxx
@@ -150,7 +150,7 @@ class SFX2_DLLPUBLIC ShutdownIcon : public ShutdownIconServiceBase
css::uno::Reference< css::frame::XDesktop2 > m_xDesktop;
-#ifdef WNT
+#ifdef _WIN32
static void EnableAutostartW32( const OUString &aShortcutName );
static OUString GetAutostartFolderNameW32();
#endif
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 92a8d02b44d6..3314c97dfd5d 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1180,7 +1180,7 @@ void FileDialogHelper_Impl::preExecute()
implInitializeFileName( );
-#if !(defined(MACOSX) && defined(MACOSX)) && !defined(WNT)
+#if !(defined(MACOSX) && defined(MACOSX)) && !defined(_WIN32)
// allow for dialog implementations which need to be executed before they return valid values for
// current filter and such
@@ -1252,7 +1252,7 @@ sal_Int16 FileDialogHelper_Impl::implDoExecute()
{
try
{
-#ifdef WNT
+#ifdef _WIN32
if ( mbSystemPicker )
{
SolarMutexReleaser aSolarMutex;
@@ -1815,7 +1815,7 @@ void FileDialogHelper_Impl::addGraphicFilter()
}
}
-#if defined(WNT)
+#if defined(_WIN32)
if ( aExtensions.getLength() > 240 )
aExtensions = FILEDIALOG_FILTER_ALL;
#endif
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 86771ec52a35..7c685533a45c 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -821,7 +821,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
OUString subject(
url.getBase(
INetURLObject::LAST_SEGMENT, false,
-#ifdef WNT
+#ifdef _WIN32
INetURLObject::NO_DECODE)); // MAPISendMail does not accept Unicode
#else
INetURLObject::DECODE_WITH_CHARSET));
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index 082074877270..f5fb3c6ee1fc 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -18,7 +18,7 @@
*/
-#ifdef WNT
+#ifdef _WIN32
#include <prewin.h>
#include <postwin.h>
#endif
@@ -80,7 +80,7 @@ void* GraphicHelper::getEnhMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta )
(void)pGDIMeta; // unused
void* pResult = nullptr;
-#ifdef WNT
+#ifdef _WIN32
if ( pGDIMeta )
{
OUString const aStr(".emf");
@@ -115,7 +115,7 @@ void* GraphicHelper::getWinMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta, co
(void)aMetaSize; // unused
void* pResult = nullptr;
-#ifdef WNT
+#ifdef _WIN32
if ( pGDIMeta )
{
SvMemoryStream* pStream = new SvMemoryStream( 65535, 65535 );
diff --git a/sfx2/source/doc/graphhelp.hxx b/sfx2/source/doc/graphhelp.hxx
index d022870e2202..f70ebccf5a10 100644
--- a/sfx2/source/doc/graphhelp.hxx
+++ b/sfx2/source/doc/graphhelp.hxx
@@ -41,7 +41,7 @@ public:
static bool supportsMetaFileHandle_Impl()
{
-#ifdef WNT
+#ifdef _WIN32
return true;
#else
return false;
diff --git a/sfx2/source/doc/sfxacldetect.cxx b/sfx2/source/doc/sfxacldetect.cxx
index e72529f0c3b8..65fb7aac1096 100644
--- a/sfx2/source/doc/sfxacldetect.cxx
+++ b/sfx2/source/doc/sfxacldetect.cxx
@@ -22,7 +22,7 @@
#if EXTRA_ACL_CHECK
-#ifdef WNT
+#ifdef _WIN32
// necessary to include system headers without warnings
#ifdef _MSC_VER
diff --git a/sfx2/source/doc/syspath.cxx b/sfx2/source/doc/syspath.cxx
index 456b97ad6ec9..8b19b2b9da13 100644
--- a/sfx2/source/doc/syspath.cxx
+++ b/sfx2/source/doc/syspath.cxx
@@ -19,13 +19,13 @@
#include "syspath.hxx"
-#if defined WNT
+#if defined(_WIN32)
extern "C" bool GetUserTemplateLocation(sal_Unicode*, int nSize);
#endif
bool SystemPath::GetUserTemplateLocation(sal_Unicode* pFolder, int nSize )
{
-#ifdef WNT
+#ifdef _WIN32
return ::GetUserTemplateLocation( pFolder, nSize );
#else
(void)pFolder;
diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx
index 72b9952896e1..1037ce74ff61 100644
--- a/sfx2/source/doc/syspathw32.cxx
+++ b/sfx2/source/doc/syspathw32.cxx
@@ -18,7 +18,7 @@
*/
-#ifdef WNT
+#ifdef _WIN32
#ifdef _MSC_VER
#pragma warning(disable:4917)
#endif
@@ -67,7 +67,7 @@ typedef unsigned short sal_uInt16;
extern "C" bool GetUserTemplateLocation(sal_Unicode* pFolder, int nSize)
{
-#ifdef WNT
+#ifdef _WIN32
return _SHGetSpecialFolderW32( CSIDL_TEMPLATES, reinterpret_cast<LPWSTR>(pFolder), nSize );
#else
(void)pFolder;