diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-16 14:14:43 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-02-17 11:33:57 +0000 |
commit | 2087484c65a3d5e75a9e8ad116d11a4e13366219 (patch) | |
tree | 1f335918a854319df9269329d165a91d711d2108 | |
parent | d6bf086012343b4a1e27cd4242dced9ee0d73a06 (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>
299 files changed, 626 insertions, 627 deletions
diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx index 37f8da2b36aa..41d27b01bcef 100644 --- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx +++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx @@ -192,7 +192,7 @@ OUString OAccessibleMenuItemComponent::GetAccessibleName() if ( sName.isEmpty() ) sName = m_pParent->GetItemText( nItemId ); sName = OutputDevice::GetNonMnemonicString( sName ); -#if defined WNT +#if defined(_WIN32) if ( m_pParent->GetAccelKey( nItemId ).GetName().getLength() ) sName = sName + "\t" + m_pParent->GetAccelKey(nItemId).GetName(); #endif diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx b/accessibility/source/standard/vclxaccessiblebox.cxx index 529b0409de35..ae4e5a66ac15 100644 --- a/accessibility/source/standard/vclxaccessiblebox.cxx +++ b/accessibility/source/standard/vclxaccessiblebox.cxx @@ -124,7 +124,7 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven if ( pList != nullptr ) { pList->ProcessWindowEvent (rVclWindowEvent, m_bIsDropDownBox); -#if defined WNT +#if defined(_WIN32) if (m_bIsDropDownBox) { NotifyAccessibleEvent(AccessibleEventId::VALUE_CHANGED, Any(), Any()); @@ -181,7 +181,7 @@ void VCLXAccessibleBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEven if ( sText.isEmpty() ) sText = xText->getText(); pList->UpdateSelection_Acc(sText, m_bIsDropDownBox); -#if defined WNT +#if defined(_WIN32) if (m_bIsDropDownBox || m_aBoxType==COMBOBOX) NotifyAccessibleEvent(AccessibleEventId::VALUE_CHANGED, Any(), Any()); #endif diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx index a34f318499a7..632c4cd4c43a 100644 --- a/avmedia/source/inc/mediamisc.hxx +++ b/avmedia/source/inc/mediamisc.hxx @@ -28,7 +28,7 @@ class ResMgr; #define AVMEDIA_RESSTR( nId ) AVMEDIA_RESID( nId ).toString() #define AVMEDIA_MANAGER_SERVICE_PREFERRED "com.sun.star.comp.avmedia.Manager_VLC" -#ifdef WNT +#ifdef _WIN32 #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.comp.avmedia.Manager_DirectX" #else #ifdef MACOSX diff --git a/avmedia/source/vlc/wrapper/SymbolLoader.hxx b/avmedia/source/vlc/wrapper/SymbolLoader.hxx index 8e3faf41b975..eb71926dfb1d 100644 --- a/avmedia/source/vlc/wrapper/SymbolLoader.hxx +++ b/avmedia/source/vlc/wrapper/SymbolLoader.hxx @@ -9,7 +9,7 @@ #ifndef INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_SYMBOLLOADER_HXX #define INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_SYMBOLLOADER_HXX -#if defined( WNT ) +#if defined(_WIN32) # include <windows.h> # include <winreg.h> #endif diff --git a/avmedia/source/vlc/wrapper/Types.hxx b/avmedia/source/vlc/wrapper/Types.hxx index ff25be325054..7411b03dc95a 100644 --- a/avmedia/source/vlc/wrapper/Types.hxx +++ b/avmedia/source/vlc/wrapper/Types.hxx @@ -12,7 +12,7 @@ #ifndef INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_TYPES_HXX #define INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_TYPES_HXX -#if defined WNT +#if defined(_WIN32) typedef __int64 libvlc_time_t; #else typedef int64_t libvlc_time_t; diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 21e8d97692c4..72a7ab7ce535 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -64,7 +64,7 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::resource; using namespace ::com::sun::star::ui::dialogs; -#ifdef WNT +#ifdef _WIN32 char const FilterMask_All[] = "*.*"; #else char const FilterMask_All[] = "*"; diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx index 2b7ba5815863..b70d51096d37 100644 --- a/basic/qa/cppunit/test_vba.cxx +++ b/basic/qa/cppunit/test_vba.cxx @@ -81,7 +81,7 @@ void VBATest::testMiscVBAFunctions() void VBATest::testMiscOLEStuff() { // not much point even trying to run except on windows -#if defined(WNT) +#if defined(_WIN32) // test if we have the necessary runtime environment // to run the OLE tests. uno::Reference< lang::XMultiServiceFactory > xOLEFactory; diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index 93825e1ead36..2048163c94a7 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -848,7 +848,7 @@ void SbiParser::AddConstants() addStringConst( aPublics, "vbCrLf", "\x0D\x0A" ); addStringConst( aPublics, "vbFormFeed", "\x0C" ); addStringConst( aPublics, "vbLf", "\x0A" ); -#ifndef WNT +#ifndef _WIN32 addStringConst( aPublics, "vbNewLine", "\x0D\x0A" ); #else addStringConst( aPublics, "vbNewLine", "\x0A" ); diff --git a/basic/source/runtime/dllmgr-none.cxx b/basic/source/runtime/dllmgr-none.cxx index 3d720bb54e62..8c0736463370 100644 --- a/basic/source/runtime/dllmgr-none.cxx +++ b/basic/source/runtime/dllmgr-none.cxx @@ -19,7 +19,7 @@ #include <sal/config.h> -#if defined(WNT) +#if defined(_WIN32) #include <prewin.h> #include <postwin.h> #endif diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx index 78fb890f9446..48e5cc736f89 100644 --- a/basic/source/runtime/dllmgr-x64.cxx +++ b/basic/source/runtime/dllmgr-x64.cxx @@ -19,7 +19,7 @@ #include <sal/config.h> -#if defined(WNT) +#if defined(_WIN32) #include <prewin.h> #include <postwin.h> #endif diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx index 2c32b4aa0192..2bb299321c56 100644 --- a/basic/source/runtime/dllmgr-x86.cxx +++ b/basic/source/runtime/dllmgr-x86.cxx @@ -19,7 +19,7 @@ #include <sal/config.h> -#if defined(WNT) +#if defined(_WIN32) #include <prewin.h> #include <postwin.h> #endif diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 6015cba739c6..85aca7da7476 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -88,7 +88,7 @@ using namespace com::sun::star::uno; #include "sbobjmod.hxx" #include "sbxmod.hxx" -#ifdef WNT +#ifdef _WIN32 #include <prewin.h> #include <direct.h> #include <io.h> @@ -392,7 +392,7 @@ RTLFUNC(CurDir) // there's no possibility to detect the current one in a way that a virtual URL // could be delivered. -#if defined (WNT) +#if defined(_WIN32) int nCurDir = 0; // Current dir // JSM if ( rPar.Count() == 2 ) { @@ -3117,7 +3117,7 @@ RTLFUNC(GetAttr) // In Windows, we want to use Windows API to get the file attributes // for VBA interoperability. - #if defined( WNT ) + #if defined(_WIN32) if( SbiRuntime::isVBAEnabled() ) { OUString aPathURL = getFullPath( rPar.Get(1)->GetOUString() ); diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index f619b3722f6a..689aa0d10bf3 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -284,7 +284,7 @@ RTLFUNC(CDec) (void)pBasic; (void)bWrite; -#ifdef WNT +#ifdef _WIN32 SbxDecimal* pDec = NULL; if ( rPar.Count() == 2 ) { @@ -525,9 +525,9 @@ RTLFUNC(GetGUIType) else { // 17.7.2000 Make simple solution for testtool / fat office -#if defined (WNT) +#if defined(_WIN32) rPar.Get(0)->PutInteger( 1 ); -#elif defined UNX +#elif defined(UNX) rPar.Get(0)->PutInteger( 4 ); #else rPar.Get(0)->PutInteger( -1 ); diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx index eb71f2c9f50f..1c3461a219ee 100644 --- a/basic/source/sbx/sbxdec.hxx +++ b/basic/source/sbx/sbxdec.hxx @@ -21,7 +21,7 @@ #ifndef INCLUDED_BASIC_SOURCE_SBX_SBXDEC_HXX #define INCLUDED_BASIC_SOURCE_SBX_SBXDEC_HXX -#ifdef WNT +#ifdef _WIN32 #include <prewin.h> #include <postwin.h> diff --git a/bin/update_pch b/bin/update_pch index 037dca85bb21..d910ee1717c2 100755 --- a/bin/update_pch +++ b/bin/update_pch @@ -750,7 +750,7 @@ def generate(includes, libname, filename, module): # svx needs this (sendreportw32.cxx) if module == 'svx' and libname == 'svx': svx_define = """ -#ifdef WNT +#ifdef _WIN32 # define UNICODE # define _UNICODE #endif @@ -767,7 +767,7 @@ def generate(includes, libname, filename, module): (module == 'xmlsecurity' and libname == 'xsec_xmlsec'): ado_define = """ // Cleanup windows header macro pollution. -#if defined(WNT) && defined(WINAPI) +#if defined(_WIN32) && defined(WINAPI) # include <postwin.h> # undef RGB #endif diff --git a/canvas/source/cairo/cairo_services.cxx b/canvas/source/cairo/cairo_services.cxx index 9cd28b11418e..10c0e31c7d37 100644 --- a/canvas/source/cairo/cairo_services.cxx +++ b/canvas/source/cairo/cairo_services.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star; -#if defined(WNT) || defined (MACOSX) +#if defined(_WIN32) || defined (MACOSX) # error "The cairo canvas should not be enabled on Windows or Mac cf fdo#46901" #endif diff --git a/canvas/source/tools/elapsedtime.cxx b/canvas/source/tools/elapsedtime.cxx index d080c789a290..bde8032a1ce0 100644 --- a/canvas/source/tools/elapsedtime.cxx +++ b/canvas/source/tools/elapsedtime.cxx @@ -24,7 +24,7 @@ #include <canvas/elapsedtime.hxx> -#if defined(WNT) +#if defined(_WIN32) #if defined _MSC_VER #pragma warning(push,1) @@ -50,7 +50,7 @@ namespace canvas { namespace tools { -#if defined(WNT) +#if defined(_WIN32) // TODO(Q2): is 0 okay for the failure case here? double ElapsedTime::getSystemTime() { diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 748bcc7f548a..5339fcf5a5d1 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -20,7 +20,7 @@ #include <DataSeriesHelper.hxx> #include <osl/time.h> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #endif #include <memory> diff --git a/cli_ure/source/native/path.cxx b/cli_ure/source/native/path.cxx index 006c70fe36cd..6fae51314965 100644 --- a/cli_ure/source/native/path.cxx +++ b/cli_ure/source/native/path.cxx @@ -19,7 +19,7 @@ #include "sal/config.h" -#if defined WNT +#if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include <windows.h> diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index 4a6782e5269c..5f6a93e235e1 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -664,7 +664,7 @@ OUString MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName( return UpdateMediaDescriptorWithFilterName( aMediaDescr, true ); } -#ifdef WNT +#ifdef _WIN32 SfxFilterFlags MimeConfigurationHelper::GetFilterFlags( const OUString& aFilterName ) { diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index b1b4b725c579..3f94a8d39917 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -69,7 +69,7 @@ #include <dconf.hxx> #endif -#if defined WNT +#if defined(_WIN32) #include "winreg.hxx" #endif @@ -546,7 +546,7 @@ Components::Components( } ++layer; //TODO: overflow #endif -#if defined WNT +#if defined(_WIN32) } else if (type == "winreg") { WinRegType eType; if (url == "LOCAL_MACHINE" || url.isEmpty()/*backwards comp.*/) { diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx index 0824bae736a7..d04818ecae88 100644 --- a/configmgr/source/writemodfile.cxx +++ b/configmgr/source/writemodfile.cxx @@ -93,7 +93,7 @@ TempFile::~TempFile() { } } -#ifdef WNT +#ifdef _WIN32 oslFileError TempFile::closeWithoutUnlink() { flush(); oslFileError e = osl_closeFile(handle); diff --git a/configmgr/source/writemodfile.hxx b/configmgr/source/writemodfile.hxx index caa9eee8b69a..d1a9348a0490 100644 --- a/configmgr/source/writemodfile.hxx +++ b/configmgr/source/writemodfile.hxx @@ -38,7 +38,7 @@ struct TempFile { ~TempFile(); void closeAndRename(const OUString &url); oslFileError flush(); -#ifdef WNT +#ifdef _WIN32 oslFileError closeWithoutUnlink(); #endif void writeString(char const *begin, sal_Int32 length); diff --git a/connectivity/inc/pch/precompiled_ado.hxx b/connectivity/inc/pch/precompiled_ado.hxx index 5e7ce61533f4..1e7ad135287a 100644 --- a/connectivity/inc/pch/precompiled_ado.hxx +++ b/connectivity/inc/pch/precompiled_ado.hxx @@ -70,7 +70,7 @@ #include <connectivity/sdbcx/IRefreshable.hxx> // Cleanup windows header macro pollution. -#ifdef WNT +#ifdef _WIN32 # include <postwin.h> # undef RGB #endif diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 4025aba6a7db..cf6ad3ff12a0 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -119,7 +119,7 @@ namespace connectivity OUString StorageContainer::removeOldURLPrefix(const OUString& _sURL) { OUString sRet = _sURL; -#if defined(WNT) +#if defined(_WIN32) sal_Int32 nIndex = sRet.lastIndexOf('\\'); #else sal_Int32 nIndex = sRet.lastIndexOf('/'); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx index 29f4e19bd679..24492f1b36e1 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx @@ -25,7 +25,7 @@ #include <string.h> #endif // End UNIX -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #include <stdlib.h> #include <shlobj.h> diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx index 84583c4ea73f..252570155159 100644 --- a/connectivity/source/drivers/odbc/OFunctions.cxx +++ b/connectivity/source/drivers/odbc/OFunctions.cxx @@ -90,7 +90,7 @@ bool LoadLibrary_ODBC3(OUString &_rPath) if (bLoaded) return true; -#ifdef WNT +#ifdef _WIN32 _rPath = "ODBC32.DLL"; #endif #ifdef UNX diff --git a/cppuhelper/source/findsofficepath.c b/cppuhelper/source/findsofficepath.c index b199e4e84aa2..2a45f884ed71 100644 --- a/cppuhelper/source/findsofficepath.c +++ b/cppuhelper/source/findsofficepath.c @@ -24,7 +24,7 @@ #include <cppuhelper/findsofficepath.h> -#if defined WNT +#if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include <windows.h> diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index dfb8297db435..a2abaaddcbce 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -961,7 +961,7 @@ void TPGalleryThemeProperties::FillFilterList() } } -#if defined(WNT) +#if defined(_WIN32) if (aExtensions.getLength() > 240) aExtensions = "*.*"; #endif diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index a024162675bc..8e2bd660b9dc 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -214,7 +214,7 @@ namespace return OUString(); #endif } - #if defined WNT + #if defined(_WIN32) return OUString("com.sun.star.ui.dialogs.SystemFilePicker"); #elif defined MACOSX return OUString("com.sun.star.ui.dialogs.AquaFilePicker"); diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index 20be147715ca..344a66cefd7c 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -130,7 +130,7 @@ OfaMemoryOptionsPage::OfaMemoryOptionsPage(vcl::Window* pParent, const SfxItemSe m_pQuickLaunchCB->Show(); //Only available in Win or if building the gtk systray -#if !defined(WNT) && ! ENABLE_GTK +#if !defined(_WIN32) && ! ENABLE_GTK m_pQuickStarterFrame->Hide(); #endif diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 160f0a315463..0bbd5c7ffbe9 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1768,7 +1768,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) nPageId = (sal_uInt16)rInetArray.GetValue(i); if ( lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) ) continue; -#if defined WNT +#if defined(_WIN32) // Disable E-mail tab-page on Windows if ( nPageId == RID_SVXPAGE_INET_MAIL ) continue; diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index db26ba4d6aa9..66a7fa4c924b 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -2411,7 +2411,7 @@ void OfaAutoCompleteTabPage::CopyToClipboard() const OStringBuffer sData; const sal_Char aLineEnd[] = -#if defined(WNT) +#if defined(_WIN32) "\015\012"; #else "\012"; diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 99e3382b08ec..38527176a933 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -330,7 +330,7 @@ SvxCharNamePage::SvxCharNamePage( vcl::Window* pParent, const SfxItemSet& rInSet //Family, Style //In Windows the standard dialogs name font-name, font-style as //Font, Style -#ifdef WNT +#ifdef _WIN32 OUString sFontFamilyString(CUI_RES(RID_SVXSTR_CHARNAME_FONT)); #else OUString sFontFamilyString(CUI_RES(RID_SVXSTR_CHARNAME_FAMILY)); diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 21cd0b3604f6..b7fee0d412ed 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -505,7 +505,7 @@ IMPL_LINK_NOARG_TYPED(SvxGradientTabPage, ClickAddHdl_Impl, Button*, void) m_pLbGradients->SelectEntryPos( m_pLbGradients->GetEntryCount() - 1 ); -#ifdef WNT +#ifdef _WIN32 // hack: #31355# W.P. Rectangle aRect( m_pLbGradients->GetPosPixel(), m_pLbGradients->GetSizePixel() ); if( sal_True ) { // ??? overlapped with pDlg diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index a12478f80789..6700093b6400 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -539,7 +539,7 @@ IMPL_LINK_NOARG_TYPED(SvxHatchTabPage, ClickAddHdl_Impl, Button*, void) m_pLbHatchings->SelectEntryPos( m_pLbHatchings->GetEntryCount() - 1 ); -#ifdef WNT +#ifdef _WIN32 // hack: #31355# W.P. Rectangle aRect( m_pLbHatchings->GetPosPixel(), m_pLbHatchings->GetSizePixel() ); if( sal_True ) { // ??? overlapped with pDlg diff --git a/dbaccess/qa/extras/dialog-save.cxx b/dbaccess/qa/extras/dialog-save.cxx index 542691989774..38344dfcb569 100644 --- a/dbaccess/qa/extras/dialog-save.cxx +++ b/dbaccess/qa/extras/dialog-save.cxx @@ -46,7 +46,7 @@ public: CPPUNIT_TEST_SUITE(DialogSaveTest); // Should we disable this test on MOX and WNT? -// #if !defined(MACOSX) && !defined(WNT) +// #if !defined(MACOSX) && !defined(_WIN32) CPPUNIT_TEST(test); // #endif CPPUNIT_TEST_SUITE_END(); diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx b/dbaccess/qa/extras/empty-stdlib-save.cxx index 3f84d53b30d2..d8e355c058ee 100644 --- a/dbaccess/qa/extras/empty-stdlib-save.cxx +++ b/dbaccess/qa/extras/empty-stdlib-save.cxx @@ -46,7 +46,7 @@ public: CPPUNIT_TEST_SUITE(DialogSaveTest); // Should we disable this test on MOX and WNT? -// #if !defined(MACOSX) && !defined(WNT) +// #if !defined(MACOSX) && !defined(_WIN32) CPPUNIT_TEST(test); // #endif CPPUNIT_TEST_SUITE_END(); diff --git a/dbaccess/qa/extras/macros-test.cxx b/dbaccess/qa/extras/macros-test.cxx index 76007205542e..d6c7e6b49ac5 100644 --- a/dbaccess/qa/extras/macros-test.cxx +++ b/dbaccess/qa/extras/macros-test.cxx @@ -23,7 +23,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -#if !defined(MACOSX) && !defined(WNT) +#if !defined(MACOSX) && !defined(_WIN32) class DBAccessTest : public UnoApiTest { diff --git a/dbaccess/qa/extras/nolib-save.cxx b/dbaccess/qa/extras/nolib-save.cxx index 3f1ca91a235f..c41dc2617948 100644 --- a/dbaccess/qa/extras/nolib-save.cxx +++ b/dbaccess/qa/extras/nolib-save.cxx @@ -46,7 +46,7 @@ public: CPPUNIT_TEST_SUITE(DialogSaveTest); // Should we disable this test on MOX and WNT? -// #if !defined(MACOSX) && !defined(WNT) +// #if !defined(MACOSX) && !defined(_WIN32) CPPUNIT_TEST(test); // #endif CPPUNIT_TEST_SUITE_END(); diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index e1eec6b5f397..7fd4ff4ae31f 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -60,7 +60,7 @@ #include <tools/diagnose_ex.h> #include <sfx2/docfilt.hxx> -#if defined(WNT) +#if defined(_WIN32) #define _ADO_DATALINK_BROWSE_ #endif diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index ddd01be56f88..7eb9d3cc0466 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -59,7 +59,7 @@ #include <connectivity/CommonTools.hxx> #include <sfx2/docfilt.hxx> #include "dsnItem.hxx" -#if defined(WNT) +#if defined(_WIN32) #define _ADO_DATALINK_BROWSE_ #endif diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx index 5ce581ba1e3a..37a3bc30f108 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.cxx +++ b/dbaccess/source/ui/dlg/adodatalinks.cxx @@ -18,7 +18,7 @@ */ -#if defined(WNT) +#if defined(_WIN32) #if defined _MSC_VER #pragma warning(push, 1) #pragma warning(disable: 4917) diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx index 25e53dbdc149..b4c482d698c1 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.cxx +++ b/dbaccess/source/ui/dlg/odbcconfig.cxx @@ -31,7 +31,7 @@ #ifdef HAVE_ODBC_SUPPORT -#if defined WNT +#if defined(_WIN32) #define ODBC_LIBRARY "ODBC32.DLL" #endif #ifdef UNX diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx index 4d69bf1b5976..5d0fcae75c5e 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.hxx +++ b/dbaccess/source/ui/dlg/odbcconfig.hxx @@ -22,11 +22,11 @@ #include "commontypes.hxx" -#if defined(WNT) || (defined (UNX) && !defined(ANDROID) && !defined(IOS)) +#if defined(_WIN32) || (defined (UNX) && !defined(ANDROID) && !defined(IOS)) #define HAVE_ODBC_SUPPORT #endif -#if defined(WNT) && defined(HAVE_ODBC_SUPPORT) +#if defined(_WIN32) && defined(HAVE_ODBC_SUPPORT) #define HAVE_ODBC_ADMINISTRATION #endif diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index d5e5c2c6ebe6..107639d8179b 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -124,7 +124,7 @@ #include <sys/wait.h> #endif -#ifdef WNT +#ifdef _WIN32 #ifdef _MSC_VER #pragma warning(push, 1) /* disable warnings within system headers */ #pragma warning (disable: 4005) @@ -136,7 +136,7 @@ #endif #endif //WNT -#if defined WNT +#if defined(_WIN32) #include <process.h> #define GETPID _getpid #else @@ -1895,7 +1895,7 @@ IMPL_LINK_NOARG_TYPED(Desktop, OpenClients_Impl, void*, void) CloseSplashScreen(); CheckFirstRun( ); -#ifdef WNT +#ifdef _WIN32 // Registers a COM class factory of the service manager with the windows operating system. Reference< XMultiServiceFactory > xSMgr= comphelper::getProcessServiceFactory(); xSMgr->createInstance("com.sun.star.bridge.OleApplicationRegistration"); @@ -2180,7 +2180,7 @@ void Desktop::OpenClients() { aIniName = aIniName.copy( 0, lastIndex+1 ); aIniName += "perftune"; -#if defined(WNT) +#if defined(_WIN32) aIniName += ".ini"; #else aIniName += "rc"; @@ -2784,7 +2784,7 @@ void Desktop::CheckFirstRun( ) m_firstRunTimer.SetTimeoutHdl(LINK(this, Desktop, AsyncInitFirstRun)); m_firstRunTimer.Start(); -#ifdef WNT +#ifdef _WIN32 // Check if Quickstarter should be started (on Windows only) TCHAR szValue[8192]; DWORD nValueSize = sizeof(szValue); diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 70213f238ada..a3505795d3fa 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -499,7 +499,7 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread() { aIniName = aIniName.copy( 0, lastIndex+1 ); aIniName += "perftune"; - #if defined(WNT) + #if defined(_WIN32) aIniName += ".ini"; #else aIniName += "rc"; diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 7e62952655bd..6794269da175 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -79,7 +79,7 @@ #include <queue> #include <memory> -#ifdef WNT +#ifdef _WIN32 #if defined _MSC_VER #pragma warning (push, 1) #pragma warning (disable: 4005) @@ -686,7 +686,7 @@ ExtensionCmdQueue::Thread::~Thread() {} void ExtensionCmdQueue::Thread::execute() { -#ifdef WNT +#ifdef _WIN32 //Needed for use of the service "com.sun.star.system.SystemShellExecute" in //DialogHelper::openWebBrowser CoUninitialize(); @@ -833,7 +833,7 @@ void ExtensionCmdQueue::Thread::execute() currentCmdEnv->stopProgress(); } //end for -#ifdef WNT +#ifdef _WIN32 CoUninitialize(); #endif } diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index 949d76211b4f..9930d6a70c84 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -46,7 +46,7 @@ #include <comphelper/processfactory.hxx> #include <salhelper/linkhelper.hxx> -#ifdef WNT +#ifdef _WIN32 #define UNICODE #define WIN32_LEAN_AND_MEAN #include <windows.h> @@ -55,7 +55,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -#if defined WNT +#if defined(_WIN32) #define SOFFICE1 "soffice.exe" #define SBASE "sbase.exe" #define SCALC "scalc.exe" @@ -467,7 +467,7 @@ Reference<XInterface> resolveUnoURL( return nullptr; // warning C4715 } -#ifdef WNT +#ifdef _WIN32 void writeConsoleWithStream(OUString const & sText, HANDLE stream) { DWORD nWrittenChars = 0; @@ -485,7 +485,7 @@ void writeConsoleWithStream(OUString const & sText, FILE * stream) void writeConsole(OUString const & sText) { -#ifdef WNT +#ifdef _WIN32 writeConsoleWithStream(sText, GetStdHandle(STD_OUTPUT_HANDLE)); #else writeConsoleWithStream(sText, stdout); @@ -494,7 +494,7 @@ void writeConsole(OUString const & sText) void writeConsoleError(OUString const & sText) { -#ifdef WNT +#ifdef _WIN32 writeConsoleWithStream(sText, GetStdHandle(STD_ERROR_HANDLE)); #else writeConsoleWithStream(sText, stderr); @@ -503,7 +503,7 @@ void writeConsoleError(OUString const & sText) OUString readConsole() { -#ifdef WNT +#ifdef _WIN32 sal_Unicode aBuffer[1024]; DWORD dwRead = 0; //unopkg.com feeds unopkg.exe with wchar_t|s diff --git a/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx index 197ce6a49b0a..f33cd703fa5d 100644 --- a/desktop/source/deployment/misc/lockfile.cxx +++ b/desktop/source/deployment/misc/lockfile.cxx @@ -19,7 +19,7 @@ #include <stdlib.h> #include <time.h> -#ifndef WNT +#ifndef _WIN32 #include <unistd.h> #else #include <windows.h> @@ -41,7 +41,7 @@ using namespace ::utl; static OString impl_getHostname() { OString aHost; -#ifdef WNT +#ifdef _WIN32 /* prevent windows from connecting to the net to get its own hostname by using the netbios name diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx index 62d11c44673b..c0e0db7d3993 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx @@ -340,7 +340,7 @@ namespace drawinglayer if(bDoSaveForVisualControl) { SvFileStream aNew( -#ifdef WNT +#ifdef _WIN32 "c:\\content.bmp", #else "~/content.bmp", @@ -363,7 +363,7 @@ namespace drawinglayer if(bDoSaveForVisualControl) { SvFileStream aNew( -#ifdef WNT +#ifdef _WIN32 "c:\\transparence.bmp", #else "~/transparence.bmp", @@ -384,7 +384,7 @@ namespace drawinglayer if(bDoSaveForVisualControl) { SvFileStream aNew( -#ifdef WNT +#ifdef _WIN32 "c:\\mask.bmp", #else "~/mask.bmp", diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx index 687ccf32dac3..f83a4a143aac 100644 --- a/embeddedobj/source/inc/oleembobj.hxx +++ b/embeddedobj/source/inc/oleembobj.hxx @@ -51,7 +51,7 @@ class VerbExecutionController sal_Int32 m_nNotificationLock; -#ifdef WNT +#ifdef _WIN32 bool m_bWasEverActive; bool m_bVerbExecutionInProgress; oslThreadIdentifier m_nVerbExecutionThreadIdentifier; @@ -62,7 +62,7 @@ public: VerbExecutionController() : m_nNotificationLock( 0 ) -#ifdef WNT +#ifdef _WIN32 , m_bWasEverActive( false ) , m_bVerbExecutionInProgress( false ) , m_nVerbExecutionThreadIdentifier( 0 ) @@ -70,7 +70,7 @@ public: #endif {} -#ifdef WNT +#ifdef _WIN32 void StartControlExecution(); sal_Bool EndControlExecution_WasModified(); void ModificationNotificationIsDone(); @@ -205,11 +205,11 @@ protected: css::uno::Reference< css::io::XStream > GetNewFilledTempStream_Impl( const css::uno::Reference< css::io::XInputStream >& xInStream ) throw( css::io::IOException, css::uno::RuntimeException ); -#ifdef WNT +#ifdef _WIN32 void SwitchComponentToRunningState_Impl(); #endif void MakeEventListenerNotification_Impl( const OUString& aEventName ); -#ifdef WNT +#ifdef _WIN32 void StateChangeNotification_Impl( sal_Bool bBeforeChange, sal_Int32 nOldState, sal_Int32 nNewState ); css::uno::Reference< css::io::XOutputStream > GetStreamForSaving(); @@ -239,7 +239,7 @@ protected: const css::uno::Sequence< css::beans::PropertyValue >& lObjArgs, bool bSaveAs ) throw ( css::uno::Exception ); -#ifdef WNT +#ifdef _WIN32 void StoreObjectToStream( css::uno::Reference< css::io::XOutputStream > xOutStream ) throw ( css::uno::Exception ); #endif @@ -262,7 +262,7 @@ protected: const css::uno::Reference< css::io::XStream >& xStream, bool bAllowRepair50 = false ) throw (); -#ifdef WNT +#ifdef _WIN32 sal_Bool SaveObject_Impl(); sal_Bool OnShowWindow_Impl( sal_Bool bShow ); void CreateOleComponent_Impl( OleComponent* pOleComponent = NULL ); @@ -289,14 +289,14 @@ public: // factory can do it for OOo objects, but for OLE objects OS dependent code is required OleEmbeddedObject( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory, bool bLink ); -#ifdef WNT +#ifdef _WIN32 // this constructor let object be initialized from clipboard OleEmbeddedObject( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ); #endif virtual ~OleEmbeddedObject(); -#ifdef WNT +#ifdef _WIN32 void OnIconChanged_Impl(); void OnViewChanged_Impl(); void OnClosed_Impl(); diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index bf5d08cc5b4b..473df8956c2b 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -52,13 +52,13 @@ #include "ownview.hxx" -#if defined WNT +#if defined(_WIN32) #include <olecomponent.hxx> #endif using namespace ::com::sun::star; -#ifdef WNT +#ifdef _WIN32 void OleEmbeddedObject::SwitchComponentToRunningState_Impl() { @@ -465,7 +465,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) if ( m_nObjectState == nNewState ) return; -#ifdef WNT +#ifdef _WIN32 if ( m_pOleComponent ) { if ( m_nTargetState != -1 ) @@ -615,7 +615,7 @@ uno::Sequence< sal_Int32 > SAL_CALL OleEmbeddedObject::getReachableStates() throw embed::WrongStateException( "The object has no persistence!", static_cast< ::cppu::OWeakObject* >(this) ); -#ifdef WNT +#ifdef _WIN32 if ( m_pOleComponent ) { if ( m_nObjectState == embed::EmbedStates::LOADED ) @@ -663,7 +663,7 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getCurrentState() namespace { -#ifndef WNT +#ifndef _WIN32 bool lcl_CopyStream(uno::Reference<io::XInputStream> xIn, uno::Reference<io::XOutputStream> xOut) { const sal_Int32 nChunkSize = 4096; @@ -689,7 +689,7 @@ namespace OUString sUrl; // the solution is only active for Unix systems -#ifndef WNT +#ifndef _WIN32 uno::Reference <beans::XPropertySet> xNativeTempFile( io::TempFile::create(comphelper::getComponentContext(xFactory)), uno::UNO_QUERY_THROW); @@ -775,7 +775,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID ) throw embed::WrongStateException( "The object has no persistence!", static_cast< ::cppu::OWeakObject* >(this) ); -#ifdef WNT +#ifdef _WIN32 if ( m_pOleComponent ) { sal_Int32 nOldState = m_nObjectState; @@ -907,7 +907,7 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OleEmbeddedObject::getSupportedV if ( m_nObjectState == -1 ) throw embed::WrongStateException( "The object has no persistence!", static_cast< ::cppu::OWeakObject* >(this) ); -#ifdef WNT +#ifdef _WIN32 if ( m_pOleComponent ) { // registry could be used in this case @@ -1072,7 +1072,7 @@ sal_Int64 SAL_CALL OleEmbeddedObject::getStatus( sal_Int64 sal_Int64 nResult = 0; -#ifdef WNT +#ifdef _WIN32 if ( m_bGotStatus && m_nStatusAspect == nAspect ) nResult = m_nStatus; else if ( m_pOleComponent ) diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx index 25f5528590e3..31d6f9ca399c 100644 --- a/embeddedobj/source/msole/olemisc.cxx +++ b/embeddedobj/source/msole/olemisc.cxx @@ -33,7 +33,7 @@ #include "ownview.hxx" -#if defined WNT +#if defined(_WIN32) #include <olecomponent.hxx> #endif @@ -104,7 +104,7 @@ OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceF , m_bTriedConversion( false ) { } -#ifdef WNT +#ifdef _WIN32 // this constructor let object be initialized from clipboard OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceFactory >& xFactory ) @@ -183,7 +183,7 @@ void OleEmbeddedObject::MakeEventListenerNotification_Impl( const OUString& aEve } } } -#ifdef WNT +#ifdef _WIN32 void OleEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange, sal_Int32 nOldState, sal_Int32 nNewState ) { @@ -228,7 +228,7 @@ void OleEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange, sa void OleEmbeddedObject::GetRidOfComponent() { -#ifdef WNT +#ifdef _WIN32 if ( m_pOleComponent ) { if ( m_nObjectState != -1 && m_nObjectState != embed::EmbedStates::LOADED ) @@ -385,7 +385,7 @@ uno::Reference< util::XCloseable > SAL_CALL OleEmbeddedObject::getComponent() static_cast< ::cppu::OWeakObject* >(this) ); } -#if defined WNT +#if defined(_WIN32) if (m_pOleComponent != 0) { return uno::Reference< util::XCloseable >( static_cast< ::cppu::OWeakObject* >( m_pOleComponent ), uno::UNO_QUERY ); diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 3fbf05a21c13..fd705ae028fa 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -47,7 +47,7 @@ #include <closepreventer.hxx> -#if defined WNT +#if defined(_WIN32) #include <olecomponent.hxx> #endif @@ -154,7 +154,7 @@ OUString GetNewFilledTempFile_Impl( const uno::Reference< io::XInputStream >& xI return aResult; } -#ifdef WNT +#ifdef _WIN32 OUString GetNewFilledTempFile_Impl( const uno::Reference< embed::XOptimizedStorage >& xParentStorage, const OUString& aEntryName, const uno::Reference< lang::XMultiServiceFactory >& xFactory ) throw( io::IOException, uno::RuntimeException ) { @@ -207,7 +207,7 @@ void LetCommonStoragePassBeUsed_Impl( const uno::Reference< io::XStream >& xStre xPropSet->setPropertyValue("UseCommonStoragePasswordEncryption", uno::makeAny( true ) ); } -#ifdef WNT +#ifdef _WIN32 void VerbExecutionController::StartControlExecution() { @@ -730,7 +730,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres m_aTempURL.clear(); } -#ifdef WNT +#ifdef _WIN32 // retry to create the component after recovering GetRidOfComponent(); @@ -801,7 +801,7 @@ void OleEmbeddedObject::SwitchOwnPersistence( const uno::Reference< embed::XStor SwitchOwnPersistence( xNewParentStorage, xNewOwnStream, aNewName ); } -#ifdef WNT +#ifdef _WIN32 sal_Bool OleEmbeddedObject::SaveObject_Impl() { @@ -1119,7 +1119,7 @@ void OleEmbeddedObject::StoreToLocation_Impl( bool bStoreLoaded = false; if ( m_nObjectState == embed::EmbedStates::LOADED -#ifdef WNT +#ifdef _WIN32 // if the object was NOT modified after storing it can be just copied // as if it was in loaded state || ( m_pOleComponent && !m_pOleComponent->IsDirty() ) @@ -1159,7 +1159,7 @@ void OleEmbeddedObject::StoreToLocation_Impl( bVisReplIsStored = HasVisReplInStream(); bStoreLoaded = true; } -#ifdef WNT +#ifdef _WIN32 else if ( m_pOleComponent ) { xTargetStream = @@ -1358,7 +1358,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( if ( lArguments[nInd].Name == "ReadOnly" ) lArguments[nInd].Value >>= m_bReadOnly; -#ifdef WNT +#ifdef _WIN32 sal_Int32 nStorageMode = m_bReadOnly ? embed::ElementModes::READ : embed::ElementModes::READWRITE; #endif @@ -1368,7 +1368,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( if ( lObjArgs[nInd].Name == "StoreVisualReplacement" ) lObjArgs[nInd].Value >>= m_bStoreVisRepl; -#ifdef WNT +#ifdef _WIN32 if ( nEntryConnectionMode == embed::EntryInitModes::DEFAULT_INIT ) { if ( m_bFromClipboard ) @@ -1756,7 +1756,7 @@ void SAL_CALL OleEmbeddedObject::storeOwn() bool bStoreLoaded = true; -#ifdef WNT +#ifdef _WIN32 if ( m_nObjectState != embed::EmbedStates::LOADED && m_pOleComponent && m_pOleComponent->IsDirty() ) { bStoreLoaded = sal_False; @@ -1956,7 +1956,7 @@ void SAL_CALL OleEmbeddedObject::breakLink( const uno::Reference< embed::XStorag static_cast< ::cppu::OWeakObject* >(this) ); -#ifdef WNT +#ifdef _WIN32 if ( m_pOleComponent ) { // TODO: create an object based on the link diff --git a/embeddedobj/source/msole/oleregister.cxx b/embeddedobj/source/msole/oleregister.cxx index aa87776d0af4..2261015fb224 100644 --- a/embeddedobj/source/msole/oleregister.cxx +++ b/embeddedobj/source/msole/oleregister.cxx @@ -23,7 +23,7 @@ #include "xolefactory.hxx" -#if defined WNT +#if defined(_WIN32) #include "xdialogcreator.hxx" #endif @@ -50,7 +50,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL emboleobj_component_getFactory( OleEmbeddedObjectFactory::impl_staticCreateSelfInstance, OleEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() ); } -#ifdef WNT +#ifdef _WIN32 // the following service makes sense only on windows else if ( aImplName.equals( MSOLEDialogObjectCreator::impl_staticGetImplementationName() ) ) { diff --git a/embeddedobj/source/msole/olevisual.cxx b/embeddedobj/source/msole/olevisual.cxx index 5be4ed5b077a..d53ef5fea033 100644 --- a/embeddedobj/source/msole/olevisual.cxx +++ b/embeddedobj/source/msole/olevisual.cxx @@ -30,7 +30,7 @@ #include <comphelper/seqstream.hxx> #include <filter/msfilter/classids.hxx> -#if defined WNT +#if defined(_WIN32) #include <olecomponent.hxx> #endif @@ -107,7 +107,7 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt throw embed::WrongStateException( "The object is not loaded!", static_cast< ::cppu::OWeakObject* >(this) ); -#ifdef WNT +#ifdef _WIN32 // RECOMPOSE_ON_RESIZE misc flag means that the object has to be switched to running state on resize. // SetExtent() is called only for objects that require it, // it should not be called for MSWord documents to workaround problem i49369 @@ -186,7 +186,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) awt::Size aResult; -#ifdef WNT +#ifdef _WIN32 // TODO/LATER: Support different aspects if ( m_pOleComponent && !m_bHasSizeToSet && nAspect == embed::Aspects::MSOLE_CONTENT ) { @@ -347,7 +347,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres { return GetVisualRepresentationInNativeFormat_Impl( m_xCachedVisualRepresentation ); } -#ifdef WNT +#ifdef _WIN32 else if ( m_pOleComponent ) { try diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index 833bc6f6fbfa..d92b8e72ca9b 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -39,7 +39,7 @@ #include <oleembobj.hxx> -#ifdef WNT +#ifdef _WIN32 #include <oledlg.h> @@ -138,7 +138,7 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia embed::InsertedObjectInfo aObjectInfo; uno::Sequence< beans::PropertyValue > aObjArgs( aInObjArgs ); -#ifdef WNT +#ifdef _WIN32 if ( !xStorage.is() ) throw lang::IllegalArgumentException( "No parent storage is provided!", @@ -289,7 +289,7 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceInitF { embed::InsertedObjectInfo aObjectInfo; -#ifdef WNT +#ifdef _WIN32 if ( !xStorage.is() ) throw lang::IllegalArgumentException( "No parent storage is provided!", static_cast< ::cppu::OWeakObject* >(this), diff --git a/embeddedobj/test/Container1/nativelib/nativeview.c b/embeddedobj/test/Container1/nativelib/nativeview.c index adee0e86a583..dfd1adbac972 100644 --- a/embeddedobj/test/Container1/nativelib/nativeview.c +++ b/embeddedobj/test/Container1/nativelib/nativeview.c @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifdef WNT +#ifdef _WIN32 #include <windows.h> // property name to register own window procedure on hwnd @@ -67,7 +67,7 @@ JNIEXPORT jlong JNICALL Java_embeddedobj_test_NativeView_getNativeWindow JAWT awt ; JAWT_DrawingSurface* ds ; JAWT_DrawingSurfaceInfo* dsi ; -#ifdef WNT +#ifdef _WIN32 JAWT_Win32DrawingSurfaceInfo* dsi_win ; #else // FIXME: Where is dsi_x11 defined? @@ -94,7 +94,7 @@ JNIEXPORT jlong JNICALL Java_embeddedobj_test_NativeView_getNativeWindow dsi = ds->GetDrawingSurfaceInfo(ds); /* Get the platform-specific drawing info */ -#ifdef WNT +#ifdef _WIN32 dsi_win = (JAWT_Win32DrawingSurfaceInfo*)dsi->platformInfo; drawable = (jlong)dsi_win->hwnd; #else diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx index 1a2a56597136..66b5f82e03a9 100644 --- a/extensions/source/abpilot/typeselectionpage.cxx +++ b/extensions/source/abpilot/typeselectionpage.cxx @@ -70,7 +70,7 @@ namespace abp bool bHaveKab = false; bool bHaveMacab = false; -#if !defined WNT +#if !defined(_WIN32) Reference< XDriverManager2 > xManager = DriverManager::create( _pParent->getORB() ); diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx index 206514c8a70e..3e03f2c4a34f 100644 --- a/extensions/source/config/ldap/ldapaccess.cxx +++ b/extensions/source/config/ldap/ldapaccess.cxx @@ -120,7 +120,7 @@ void LdapConnection::connectSimple() #ifdef LDAP_X_OPT_CONNECT_TIMEOUT // OpenLDAP doesn't support this and the func /* timeout is specified in milliseconds -> 4 seconds*/ int timeout = 4000; -#ifdef WNT +#ifdef _WIN32 ldap_set_optionW( mConnection, LDAP_X_OPT_CONNECT_TIMEOUT, &timeout ); @@ -132,7 +132,7 @@ void LdapConnection::connectSimple() #endif // Do the bind -#ifdef WNT +#ifdef _WIN32 LdapErrCode retCode = ldap_simple_bind_sW(mConnection, (PWCHAR) mLdapDefinition.mAnonUser.getStr(), (PWCHAR) mLdapDefinition.mAnonCredentials.getStr() ); @@ -159,7 +159,7 @@ void LdapConnection::initConnection() if (mLdapDefinition.mPort == 0) mLdapDefinition.mPort = LDAP_PORT; -#ifdef WNT +#ifdef _WIN32 mConnection = ldap_initW((PWCHAR) mLdapDefinition.mServer.getStr(), mLdapDefinition.mPort) ; #else @@ -189,7 +189,7 @@ void LdapConnection::initConnection() OUString aUserDn =findUserDn( aUser ); LdapMessageHolder result; -#ifdef WNT +#ifdef _WIN32 LdapErrCode retCode = ldap_search_sW(mConnection, (PWCHAR) aUserDn.getStr(), LDAP_SCOPE_BASE, @@ -209,7 +209,7 @@ void LdapConnection::initConnection() checkLdapReturnCode("getUserProfile", retCode,mConnection) ; BerElement * ptr; -#ifdef WNT +#ifdef _WIN32 PWCHAR attr = ldap_first_attributeW(mConnection, result.msg, &ptr); while (attr) { PWCHAR * values = ldap_get_valuesW(mConnection, result.msg, attr); @@ -257,7 +257,7 @@ void LdapConnection::initConnection() filter.append( mLdapDefinition.mUserUniqueAttr ).append("=").append(aUser).append("))") ; LdapMessageHolder result; -#ifdef WNT +#ifdef _WIN32 PWCHAR attributes [2] = { const_cast<PWCHAR>( L"1.1" ), NULL }; LdapErrCode retCode = ldap_search_sW(mConnection, (PWCHAR) mLdapDefinition.mBaseDN.getStr(), @@ -276,7 +276,7 @@ void LdapConnection::initConnection() if (entry != nullptr) { -#ifdef WNT +#ifdef _WIN32 PWCHAR charsDn = ldap_get_dnW(mConnection, entry) ; userDn = OUString( reinterpret_cast<const sal_Unicode*>( charsDn ) ); diff --git a/extensions/source/config/ldap/ldapaccess.hxx b/extensions/source/config/ldap/ldapaccess.hxx index d8fe63c5543c..ca206acce9ba 100644 --- a/extensions/source/config/ldap/ldapaccess.hxx +++ b/extensions/source/config/ldap/ldapaccess.hxx @@ -24,7 +24,7 @@ #include <map> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #include <winldap.h> #else // !defined WNT diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index 4c8858f5a216..009fec29eba0 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -61,7 +61,7 @@ using namespace ::com::sun::star; #define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.) #define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5)) -#if defined WNT +#if defined(_WIN32) #define TWAIN_LIBNAME "TWAIN_32.DLL" #define TWAIN_FUNCNAME "DSM_Entry" #endif diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index bb485b52b2c3..e2046f9b2ef7 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -18,7 +18,7 @@ */ -#if defined WNT +#if defined(_WIN32) # ifdef _MSC_VER # pragma warning(push, 1) /* disable warnings within system headers */ # endif diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 0a813fc9a02f..74221ea0ddc2 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -42,7 +42,7 @@ #include <osl/file.hxx> #include <sal/macros.h> -#ifdef WNT +#ifdef _WIN32 #ifdef _MSC_VER #pragma warning(push,1) // disable warnings within system headers //#pragma warning(disable: 4917) @@ -70,7 +70,7 @@ namespace uno = com::sun::star::uno ; #define PROPERTY_CLICK_HDL "MenuClickHDL" #define PROPERTY_SHOW_MENUICON "MenuIconVisible" -#if defined WNT +#if defined(_WIN32) extern "C" bool SAL_CALL WNT_hasInternetConnection(); #endif @@ -124,7 +124,7 @@ inline bool isObsoleteUpdateInfo(const OUString& rBuildId) OUString getImageFromFileName(const OUString& aFile) { -#ifndef WNT +#ifndef _WIN32 OUString aUnpackPath; if( osl_getExecutableFile(&aUnpackPath.pData) == osl_Process_E_None ) { @@ -247,7 +247,7 @@ private: /* Used to avoid dialup login windows (on platforms we know how to double this) */ static inline bool hasInternetConnection() { -#ifdef WNT +#ifdef _WIN32 return WNT_hasInternetConnection(); #else return true; @@ -604,7 +604,7 @@ DownloadThread::run() { osl_setThreadName("DownloadThread"); -#ifdef WNT +#ifdef _WIN32 CoUninitialize(); CoInitialize( NULL ); #endif @@ -1461,7 +1461,7 @@ UpdateCheck::storeReleaseNote(sal_Int8 nNum, const OUString &rURL) sal_uInt64 nWritten = 0; OUString aURL( rURL ); -#ifdef WNT +#ifdef _WIN32 rc = aFile.write( aLineBuf.getStr(), aLineBuf.getLength(), nWritten ); if ( rc != osl::FileBase::E_None ) return false; aURL = "URL=" + rURL; diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx index 60aa6a7a4c52..4392cbf3a391 100644 --- a/extensions/source/update/check/updatecheckconfig.cxx +++ b/extensions/source/update/check/updatecheckconfig.cxx @@ -29,7 +29,7 @@ #include <osl/file.hxx> #include <sal/macros.h> -#ifdef WNT +#ifdef _WIN32 #ifdef _MSC_VER #pragma warning(push,1) // disable warnings within system headers #pragma warning(disable: 4917) @@ -164,7 +164,7 @@ OUString UpdateCheckConfig::getDesktopDirectory() { OUString aRet; -#ifdef WNT +#ifdef _WIN32 WCHAR szPath[MAX_PATH]; if (TRUE == SHGetSpecialFolderPathW(nullptr, szPath, CSIDL_DESKTOPDIRECTORY, true)) @@ -191,7 +191,7 @@ OUString UpdateCheckConfig::getAllUsersDirectory() { OUString aRet; -#ifdef WNT +#ifdef _WIN32 WCHAR szPath[MAX_PATH]; if (TRUE == SHGetSpecialFolderPathW(nullptr, szPath, CSIDL_COMMON_DOCUMENTS, true)) diff --git a/external/jpeg/configs/jconfig.h b/external/jpeg/configs/jconfig.h index 0c430518c0e4..1ac8ea9e5daf 100644 --- a/external/jpeg/configs/jconfig.h +++ b/external/jpeg/configs/jconfig.h @@ -35,7 +35,7 @@ typedef unsigned char boolean; #ifdef JPEG_INTERNALS /* #undef RIGHT_SHIFT_IS_UNSIGNED */ -#ifdef WNT +#ifdef _WIN32 #define INLINE __inline #elif defined SOLARIS #define INLINE diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index a111a99519e4..72d93e704481 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -150,7 +150,7 @@ static oslProcessError runProcessWithPathSearch(const OUString &rProgName, { oslProcessError result; oslSecurity pSecurity = osl_getCurrentSecurity(); -#ifdef WNT +#ifdef _WIN32 /* * ooo#72096 * On Window the underlying SearchPath searches in order of... @@ -185,7 +185,7 @@ static oslProcessError runProcessWithPathSearch(const OUString &rProgName, return result; } -#if defined(WNT) +#if defined(_WIN32) # define EXESUFFIX ".exe" #else # define EXESUFFIX "" @@ -382,7 +382,7 @@ static bool RenderAsBMPThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, arg11.pData }; return RenderAsBMPThroughHelper(pBuf, nBytesRead, rGraphic, -#ifdef WNT +#ifdef _WIN32 "gswin32c" EXESUFFIX, #else "gs" EXESUFFIX, diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 6ca8d57b5865..a8bcecf8ded3 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -2322,7 +2322,7 @@ bool SvtFileDialog::IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilt if ( nPathTokenPos == -1 ) { OUString aDelim( -#if defined(WNT) +#if defined(_WIN32) '\\' #else '/' diff --git a/framework/source/fwi/helper/networkdomain.cxx b/framework/source/fwi/helper/networkdomain.cxx index 81c938d7041e..eb99975ffbfe 100644 --- a/framework/source/fwi/helper/networkdomain.cxx +++ b/framework/source/fwi/helper/networkdomain.cxx @@ -19,7 +19,7 @@ #include <helper/networkdomain.hxx> -#ifdef WNT +#ifdef _WIN32 // Windows diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx index 99d8b563444d..4977e97bd40f 100644 --- a/framework/source/helper/titlebarupdate.cxx +++ b/framework/source/helper/titlebarupdate.cxx @@ -152,7 +152,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr sDesktopName = "Base"; else sDesktopName = "Startcenter"; -#if defined(WNT) +#if defined(_WIN32) // We use a hardcoded product name matching the registry keys so applications can be associated with file types sApplicationID = "TheDocumentFoundation.LibreOffice."; sApplicationID += sDesktopName; diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index 430597624689..19b324d57fce 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -462,7 +462,7 @@ OUString SpinfieldToolbarController::impl_formatOutputString( double fValue ) } else { -#ifdef WNT +#ifdef _WIN32 sal_Unicode aBuffer[128]; aBuffer[0] = 0; diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx index b3e325165dbd..78f98a2821e1 100644 --- a/helpcompiler/inc/HelpCompiler.hxx +++ b/helpcompiler/inc/HelpCompiler.hxx @@ -87,7 +87,7 @@ namespace fs HCDBG(std::cerr << "native_file_string is " << tmp.getStr() << std::endl); return std::string(tmp.getStr()); } -#ifdef WNT +#ifdef _WIN32 wchar_t const * native_file_string_w() const { OUString ustrSystemPath; diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx index 276394a6e0aa..2a127fe2bb44 100644 --- a/helpcompiler/source/HelpCompiler.cxx +++ b/helpcompiler/source/HelpCompiler.cxx @@ -87,7 +87,7 @@ xmlDocPtr HelpCompiler::compactXhpForJar( xmlDocPtr doc ) void HelpCompiler::saveXhpForJar( xmlDocPtr doc, const fs::path &filePath ) { //save processed xhp document in ziptmp<module>_<lang>/text directory -#ifdef WNT +#ifdef _WIN32 std::string pathSep = "\\"; #else std::string pathSep = "/"; diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx index 626357dc5e70..95821f172a4b 100644 --- a/helpcompiler/source/HelpLinker.cxx +++ b/helpcompiler/source/HelpLinker.cxx @@ -87,7 +87,7 @@ void IndexerPreProcessor::processDocument if( pResNodeCaption ) { fs::path fsCaptionPureTextFile_docURL = m_fsCaptionFilesDirName / aStdStr_EncodedDocPathURL; -#ifdef WNT //We need _wfopen to support long file paths on Windows XP +#ifdef _WIN32 //We need _wfopen to support long file paths on Windows XP FILE* pFile_docURL = _wfopen( fsCaptionPureTextFile_docURL.native_file_string_w(), L"w" ); #else @@ -110,7 +110,7 @@ void IndexerPreProcessor::processDocument if( pResNodeContent ) { fs::path fsContentPureTextFile_docURL = m_fsContentFilesDirName / aStdStr_EncodedDocPathURL; -#ifdef WNT //We need _wfopen to support long file paths on Windows XP +#ifdef _WIN32 //We need _wfopen to support long file paths on Windows XP FILE* pFile_docURL = _wfopen( fsContentPureTextFile_docURL.native_file_string_w(), L"w" ); #else @@ -186,7 +186,7 @@ public: void dump_DBHelp( const fs::path& rFileName ) { -#ifdef WNT //We need _wfopen to support long file paths on Windows XP +#ifdef _WIN32 //We need _wfopen to support long file paths on Windows XP FILE* pFile = _wfopen( rFileName.native_file_string_w(), L"wb" ); #else FILE* pFile = fopen( rFileName.native_file_string().c_str(), "wb" ); @@ -303,7 +303,7 @@ void HelpLinker::link() throw(HelpProcessingException, BasicCodeTagger::TaggerEx bUse_ = false; fs::path helpTextFileName_DBHelp(indexDirParentName / (mod + (bUse_ ? ".ht_" : ".ht"))); -#ifdef WNT +#ifdef _WIN32 //We need _wfopen to support long file paths on Windows XP FILE* pFileHelpText_DBHelp = _wfopen ( helpTextFileName_DBHelp.native_file_string_w(), L"wb" ); @@ -314,7 +314,7 @@ void HelpLinker::link() throw(HelpProcessingException, BasicCodeTagger::TaggerEx #endif fs::path dbBaseFileName_DBHelp(indexDirParentName / (mod + (bUse_ ? ".db_" : ".db"))); -#ifdef WNT +#ifdef _WIN32 //We need _wfopen to support long file paths on Windows XP FILE* pFileDbBase_DBHelp = _wfopen ( dbBaseFileName_DBHelp.native_file_string_w(), L"wb" ); diff --git a/i18nlangtag/source/isolang/insys.cxx b/i18nlangtag/source/isolang/insys.cxx index a0f1ab496c4d..e6b58b56af8b 100644 --- a/i18nlangtag/source/isolang/insys.cxx +++ b/i18nlangtag/source/isolang/insys.cxx @@ -18,7 +18,7 @@ */ -#if defined( WNT ) +#if defined(_WIN32) #include "inwnt.cxx" diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx index 229e5b45f5a7..e430f1c87f00 100644 --- a/idlc/source/options.cxx +++ b/idlc/source/options.cxx @@ -27,7 +27,7 @@ #include "rtl/ustring.hxx" #include "osl/file.hxx" -#ifdef WNT +#ifdef _WIN32 # include <windows.h> #endif @@ -191,7 +191,7 @@ bool Options::setOption(char const * option, std::string const & rArg) return result; } -#ifdef WNT +#ifdef _WIN32 /* Helper functiopn to convert windows paths including spaces, brackets etc. into a windows short Url. The ucpp preprocessor has problems with such paths and returns with error. @@ -270,7 +270,7 @@ bool Options::initOptions(std::vector< std::string > & rArgs) throw(IllegalArgum if (!buffer.isEmpty()) buffer.append(' '); // buffer.append("-I\""); -#ifdef WNT +#ifdef _WIN32 OString incpath = convertIncPathtoShortWindowsPath(param.getToken(0, ';', k)); #else OString incpath = param.getToken(0, ';', k); diff --git a/include/comphelper/mimeconfighelper.hxx b/include/comphelper/mimeconfighelper.hxx index 81948c76880c..88ac1fc8d02d 100644 --- a/include/comphelper/mimeconfighelper.hxx +++ b/include/comphelper/mimeconfighelper.hxx @@ -112,7 +112,7 @@ public: OUString UpdateMediaDescriptorWithFilterName( css::uno::Sequence< css::beans::PropertyValue >& aMediaDescr, css::uno::Sequence< css::beans::NamedValue >& aObject ); -#ifdef WNT +#ifdef _WIN32 SfxFilterFlags GetFilterFlags( const OUString& aFilterName ); bool AddFilterNameCheckOwnFile( diff --git a/include/connectivity/odbc.hxx b/include/connectivity/odbc.hxx index 40ded2986df6..5ce6d8768070 100644 --- a/include/connectivity/odbc.hxx +++ b/include/connectivity/odbc.hxx @@ -21,7 +21,7 @@ #ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OFUNCTIONDEFS_HXX #define INCLUDED_CONNECTIVITY_SOURCE_INC_ODBC_OFUNCTIONDEFS_HXX -#if defined(WNT) +#if defined(_WIN32) #ifdef _MSC_VER #pragma warning(push) diff --git a/include/osl/interlck.h b/include/osl/interlck.h index 85da29810446..0b26f9a02712 100644 --- a/include/osl/interlck.h +++ b/include/osl/interlck.h @@ -25,7 +25,7 @@ #include <sal/saldllapi.h> #include <sal/types.h> -#if defined WNT +#if defined(_WIN32) #include <intrin.h> #endif diff --git a/include/prewin.h b/include/prewin.h index e7ad06975d44..17e27e352c92 100644 --- a/include/prewin.h +++ b/include/prewin.h @@ -19,7 +19,7 @@ /* not protected, do only include once! */ -#if defined WNT +#if defined(_WIN32) #define Rectangle BLA_Rectangle #define Folder WIN_Folder diff --git a/include/sal/mathconf.h b/include/sal/mathconf.h index 30895b696bb0..5ef63221f67d 100644 --- a/include/sal/mathconf.h +++ b/include/sal/mathconf.h @@ -54,7 +54,7 @@ extern "C" { problems, the SAL_MATH_FPEXCEPTIONS_OFF macro can be used to explicitly switch off exceptions (on Windows). */ -#if defined WNT +#if defined(_WIN32) #define SAL_MATH_FPEXCEPTIONS_OFF() _control87( _MCW_EM, _MCW_EM ) #else /* WNT */ #define SAL_MATH_FPEXCEPTIONS_OFF() diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index ed618d974854..58738f6e7b07 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -139,13 +139,13 @@ public: static ResMgr* GetSfxResManager(); // DDE -#if defined( WNT ) +#if defined(_WIN32) long DdeExecute( const OUString& rCmd ); #endif bool InitializeDde(); const DdeService* GetDdeService() const; DdeService* GetDdeService(); -#if defined( WNT ) +#if defined(_WIN32) void AddDdeTopic( SfxObjectShell* ); #endif void RemoveDdeTopic( SfxObjectShell* ); diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx index 5baabf44b808..2a8bb226be8d 100644 --- a/include/sfx2/lnkbase.hxx +++ b/include/sfx2/lnkbase.hxx @@ -112,7 +112,7 @@ public: virtual void Closed(); -#if defined WNT +#if defined(_WIN32) SvBaseLink( const OUString& rNm, sal_uInt16 nObjectType, SvLinkSource* ); #endif diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 47f804293b62..90c536e2d757 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -489,7 +489,7 @@ public: OUString GetTitle( sal_uInt16 nMaxLen = 0 ) const; void InvalidateName(); // Re-set to unnamed -#if defined WNT +#if defined(_WIN32) // DDE-Interface long DdeExecute( const OUString& rCmd ); virtual bool DdeGetData( const OUString& rItem, diff --git a/include/tools/lineend.hxx b/include/tools/lineend.hxx index 2682d5d210cd..165d8b549513 100644 --- a/include/tools/lineend.hxx +++ b/include/tools/lineend.hxx @@ -18,7 +18,7 @@ enum LineEnd { LINEEND_CR, LINEEND_LF, LINEEND_CRLF }; inline LineEnd GetSystemLineEnd() { -#if defined WNT +#if defined(_WIN32) return LINEEND_CRLF; #else return LINEEND_LF; diff --git a/include/tools/pathutils.hxx b/include/tools/pathutils.hxx index ddb9852fe61b..3fa5cc0d1e9d 100644 --- a/include/tools/pathutils.hxx +++ b/include/tools/pathutils.hxx @@ -21,7 +21,7 @@ #include <sal/config.h> -#if defined WNT +#if defined(_WIN32) #include <cstddef> #define WIN32_LEAN_AND_MEAN #include <windows.h> diff --git a/include/tools/solar.h b/include/tools/solar.h index e349024fd9d7..e503f38fd908 100644 --- a/include/tools/solar.h +++ b/include/tools/solar.h @@ -106,7 +106,7 @@ inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = reinterpret_cast<s #endif #endif -#if defined WNT +#if defined(_WIN32) #define SVLIBRARY( Base ) Base "lo.dll" #elif defined MACOSX #define SVLIBRARY( Base ) "lib" Base "lo.dylib" diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index e45c8f0dd9bb..7dcc84442801 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -238,7 +238,7 @@ namespace vcl struct BitmapSystemData { - #if defined( WNT ) + #if defined(_WIN32) void* pDIB; // device independent byte buffer void* pDDB; // if not NULL then this is actually an HBITMAP #elif defined( MACOSX ) || defined( IOS ) diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index a090c557aa7c..40ea0173f537 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -254,7 +254,7 @@ public: sal_uInt16 GetImportFormatNumberForTypeName( const OUString& rType ); OUString GetImportFormatName( sal_uInt16 nFormat ); OUString GetImportFormatTypeName( sal_uInt16 nFormat ); -#ifdef WNT +#ifdef _WIN32 OUString GetImportFormatMediaType( sal_uInt16 nFormat ); #endif OUString GetImportFormatShortName( sal_uInt16 nFormat ); diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index 932bb9c2de08..537cb8f0c140 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -632,7 +632,7 @@ public: MiscSettings(); ~MiscSettings(); -#ifdef WNT +#ifdef _WIN32 void SetEnableATToolSupport( bool bEnable ); #endif bool GetEnableATToolSupport() const; diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx index 18f39393b274..49511985455e 100644 --- a/include/vcl/sysdata.hxx +++ b/include/vcl/sysdata.hxx @@ -42,7 +42,7 @@ typedef const struct __CTFont * CTFontRef; typedef struct CGContext *CGContextRef; #endif -#if defined( WNT ) +#if defined(_WIN32) #include <prewin.h> #include <windef.h> #include <postwin.h> @@ -51,7 +51,7 @@ typedef struct CGContext *CGContextRef; struct SystemEnvData { unsigned long nSize; // size in bytes of this structure -#if defined( WNT ) +#if defined(_WIN32) HWND hWnd; // the window hwnd #elif defined( MACOSX ) NSView* mpNSView; // the cocoa (NSView *) implementing this object @@ -77,7 +77,7 @@ struct SystemEnvData SystemEnvData() : nSize(0) -#if defined( WNT ) +#if defined(_WIN32) , hWnd(0) #elif defined( MACOSX ) , mpNSView(nullptr) @@ -105,7 +105,7 @@ struct SystemEnvData struct SystemParentData { unsigned long nSize; // size in bytes of this structure -#if defined( WNT ) +#if defined(_WIN32) HWND hWnd; // the window hwnd #elif defined( MACOSX ) NSView* pView; // the cocoa (NSView *) implementing this object @@ -122,7 +122,7 @@ struct SystemParentData struct SystemMenuData { -#if defined( WNT ) +#if defined(_WIN32) HMENU hMenu; // the menu handle of the menu bar #else // Nothing @@ -132,7 +132,7 @@ struct SystemMenuData struct SystemGraphicsData { unsigned long nSize; // size in bytes of this structure -#if defined( WNT ) +#if defined(_WIN32) HDC hDC; // handle to a device context HWND hWnd; // optional handle to a window #elif defined( MACOSX ) @@ -152,7 +152,7 @@ struct SystemGraphicsData #endif SystemGraphicsData() : nSize( sizeof( SystemGraphicsData ) ) -#if defined( WNT ) +#if defined(_WIN32) , hDC( 0 ) , hWnd( 0 ) #elif defined( MACOSX ) @@ -176,7 +176,7 @@ struct SystemGraphicsData struct SystemWindowData { unsigned long nSize; // size in bytes of this structure -#if defined( WNT ) // meaningless on Windows +#if defined(_WIN32) // meaningless on Windows #elif defined( MACOSX ) bool bOpenGL; // create a OpenGL providing NSView bool bLegacy; // create a 2.1 legacy context, only valid if bOpenGL == true diff --git a/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c b/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c index 6cdb2d1c1e4f..b187bd9bb61d 100644 --- a/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c +++ b/jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection.c @@ -103,7 +103,7 @@ static rtl_uString * jstring2ustring(JNIEnv * env, jstring jstr) * Signature: (Lcom/sun/star/beans/NativeService;)V */ SAL_DLLPUBLIC_EXPORT void -#if defined WNT +#if defined(_WIN32) PipeConnection_create #else JNICALL Java_com_sun_star_lib_connections_pipe_PipeConnection_createJNI @@ -242,7 +242,7 @@ JNICALL Java_com_sun_star_lib_connections_pipe_PipeConnection_createJNI * Signature: ()V */ SAL_DLLPUBLIC_EXPORT void -#if defined WNT +#if defined(_WIN32) PipeConnection_close #else JNICALL Java_com_sun_star_lib_connections_pipe_PipeConnection_closeJNI @@ -328,7 +328,7 @@ JNICALL Java_com_sun_star_lib_connections_pipe_PipeConnection_closeJNI * Signature: ([[BI)I */ SAL_DLLPUBLIC_EXPORT jint -#if defined WNT +#if defined(_WIN32) PipeConnection_read #else JNICALL Java_com_sun_star_lib_connections_pipe_PipeConnection_readJNI @@ -449,7 +449,7 @@ JNICALL Java_com_sun_star_lib_connections_pipe_PipeConnection_readJNI * Signature: ([B)V */ SAL_DLLPUBLIC_EXPORT void -#if defined WNT +#if defined(_WIN32) PipeConnection_write #else JNICALL Java_com_sun_star_lib_connections_pipe_PipeConnection_writeJNI @@ -546,7 +546,7 @@ JNICALL Java_com_sun_star_lib_connections_pipe_PipeConnection_writeJNI * Signature: ()V */ SAL_DLLPUBLIC_EXPORT void -#if defined WNT +#if defined(_WIN32) PipeConnection_flush #else JNICALL Java_com_sun_star_lib_connections_pipe_PipeConnection_flushJNI diff --git a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx index 7cc13ce11adf..1de6afd210b6 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/otherjre.cxx @@ -36,7 +36,7 @@ Reference<VendorBase> OtherInfo::createInstance() char const* const* OtherInfo::getJavaExePaths(int * size) { static char const * ar[] = { -#if defined(WNT) +#if defined(_WIN32) "bin/java.exe", "jre/bin/java.exe" #elif defined UNX @@ -51,7 +51,7 @@ char const* const* OtherInfo::getJavaExePaths(int * size) char const* const* OtherInfo::getRuntimePaths(int * size) { static char const* ar[]= { -#if defined(WNT) +#if defined(_WIN32) "/bin/client/jvm.dll", "/bin/hotspot/jvm.dll", "/bin/classic/jvm.dll", diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index 667b2875cd85..89e1a49bd1ed 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -18,7 +18,7 @@ */ -#ifdef WNT +#ifdef _WIN32 # include <stdio.h> # include <sys/stat.h> # include <windows.h> @@ -497,7 +497,7 @@ javaPluginError jfw_plugin_getJavaInfosFromPath( } -#if defined(WNT) +#if defined(_WIN32) // Load msvcr71.dll using an explicit full path from where it is // present as bundled with the JRE. In case it is not found where we @@ -677,7 +677,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( #if defined(LINUX) if (!moduleRt.load(sRuntimeLib, SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_NOW)) #else -#if defined(WNT) +#if defined(_WIN32) do_msvcr_magic(sRuntimeLib.pData); #endif if (!moduleRt.load(sRuntimeLib)) diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx index 29953a693bde..7f7c4943c8be 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx @@ -36,7 +36,7 @@ rtl::Reference<VendorBase> SunInfo::createInstance() char const* const* SunInfo::getJavaExePaths(int * size) { static char const * ar[] = { -#if defined(WNT) +#if defined(_WIN32) "java.exe", "bin/java.exe", "jre/bin/java.exe" @@ -53,7 +53,7 @@ char const* const* SunInfo::getJavaExePaths(int * size) char const* const* SunInfo::getRuntimePaths(int * size) { static char const* ar[]= { -#if defined(WNT) +#if defined(_WIN32) "/bin/client/jvm.dll", "/bin/hotspot/jvm.dll", "/bin/classic/jvm.dll", diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index b60b14da629a..4cf18713728a 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -40,7 +40,7 @@ #include <algorithm> #include <map> -#if defined WNT +#if defined(_WIN32) #if defined _MSC_VER #pragma warning(push, 1) #endif @@ -63,7 +63,7 @@ using namespace std; using ::rtl::Reference; -#ifdef WNT +#ifdef _WIN32 #define HKEY_SUN_JRE L"Software\\JavaSoft\\Java Runtime Environment" #define HKEY_SUN_SDK L"Software\\JavaSoft\\Java Development Kit" #endif @@ -119,7 +119,7 @@ namespace jfw_plugin { extern VendorSupportMapEntry gVendorMap[]; -#if defined WNT +#if defined(_WIN32) bool getSDKInfoFromRegistry(vector<OUString> & vecHome); bool getJREInfoFromRegistry(vector<OUString>& vecJavaHome); #endif @@ -573,7 +573,7 @@ bool decodeOutput(const OString& s, OUString* out) } -#if defined WNT +#if defined(_WIN32) void addJavaInfoFromWinReg( std::vector<rtl::Reference<VendorBase> > & allInfos, std::vector<rtl::Reference<VendorBase> > & addedInfos) @@ -800,7 +800,7 @@ vector<Reference<VendorBase> > addAllJREInfos( { vector<Reference<VendorBase> > addedInfos; -#if defined WNT +#if defined(_WIN32) // Get Javas from the registry addJavaInfoFromWinReg(allInfos, addedInfos); #endif // WNT diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index d84b52a61d8e..3e9f478c58ea 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -1060,7 +1060,7 @@ JavaInfo * MergedSettings::createJavaInfo() const { return m_javaInfo.makeJavaInfo(); } -#ifdef WNT +#ifdef _WIN32 bool MergedSettings::getJavaInfoAttrAutoSelect() const { return m_javaInfo.bAutoSelect; diff --git a/jvmfwk/source/elements.hxx b/jvmfwk/source/elements.hxx index 7d457914ca29..21f48baac395 100644 --- a/jvmfwk/source/elements.hxx +++ b/jvmfwk/source/elements.hxx @@ -300,7 +300,7 @@ public: */ OString const & getJavaInfoAttrVendorUpdate() const { return m_javaInfo.sAttrVendorUpdate;} -#ifdef WNT +#ifdef _WIN32 /** returns the javaInfo@autoSelect attribute. Before calling this function loadFromSettings must be called. It uses the javaInfo@autoSelect attribute to determine diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index eb16743f33dc..41269431dd31 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -233,7 +233,7 @@ javaFrameworkError SAL_CALL jfw_startVM( if (aInfo == nullptr) return JFW_E_NO_SELECT; -#ifdef WNT +#ifdef _WIN32 //Because on Windows there is no system setting that we can use to determine //if Assistive Technology Tool support is needed, we ship a .reg file that the //user can use to create a registry setting. When the user forgets to set diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx index 53e74b2f363c..591a12a2c7ea 100644 --- a/jvmfwk/source/fwkutil.cxx +++ b/jvmfwk/source/fwkutil.cxx @@ -18,7 +18,7 @@ */ -#if defined WNT +#if defined(_WIN32) #if defined _MSC_VER #pragma warning(push, 1) #endif @@ -61,7 +61,7 @@ bool isAccessibilitySupportDesired() sValue == "1" ) return false; -#ifdef WNT +#ifdef _WIN32 bool retVal = false; HKEY hKey = 0; if (RegOpenKeyEx(HKEY_CURRENT_USER, diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index fec3f6771126..c9f0b8bf6ec8 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -36,7 +36,7 @@ #include <queue> #include <string> -#ifdef WNT +#ifdef _WIN32 #include <direct.h> #else #include <unistd.h> diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx index 0a32b7b3b1b2..c5fda0522c8b 100644 --- a/l10ntools/source/helpmerge.cxx +++ b/l10ntools/source/helpmerge.cxx @@ -35,7 +35,7 @@ #include <iostream> #include <vector> #include <rtl/strbuf.hxx> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #undef CopyFile #include <direct.h> diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index 5f2c768e09d7..4f784cab48d9 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if defined(WNT) +#if defined(_WIN32) #include <prewin.h> #include <postwin.h> #endif @@ -290,7 +290,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo osl::FileBase::getSystemPathFromFileURL( DictFN, dictpath ); -#if defined(WNT) +#if defined(_WIN32) // Hyphen waits UTF-8 encoded paths with \\?\ long path prefix. OString sTmp = Win_AddLongPathPrefix(OUStringToOString(dictpath, RTL_TEXTENCODING_UTF8)); #else @@ -511,7 +511,7 @@ Reference < XHyphenatedWord > SAL_CALL Hyphenator::queryAlternativeSpelling( return nullptr; } -#if defined(WNT) +#if defined(_WIN32) static OString Win_GetShortPathName( const OUString &rLongPathName ) { OString aRes; @@ -572,7 +572,7 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const osl::FileBase::getSystemPathFromFileURL( DictFN, dictpath ); OString sTmp( OU2ENC( dictpath, osl_getThreadTextEncoding() ) ); -#if defined(WNT) +#if defined(_WIN32) // workaround for Windows specific problem that the // path length in calls to 'fopen' is limited to somewhat // about 120+ characters which will usually be exceed when diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx index 2ccea80002d2..c1df022e11e3 100644 --- a/lingucomponent/source/languageguessing/guesslang.cxx +++ b/lingucomponent/source/languageguessing/guesslang.cxx @@ -122,7 +122,7 @@ void LangGuess_Impl::EnsureInitialized() OUString aPhysPath; OUString aURL( SvtPathOptions().GetFingerprintPath() ); osl::FileBase::getSystemPathFromFileURL( aURL, aPhysPath ); -#ifdef WNT +#ifdef _WIN32 aPhysPath += "\\"; #else aPhysPath += "/"; diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx index d0da501e22e4..e187ad542b53 100644 --- a/lingucomponent/source/lingutil/lingutil.cxx +++ b/lingucomponent/source/lingutil/lingutil.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if defined(WNT) +#if defined(_WIN32) #include <windows.h> #endif @@ -45,7 +45,7 @@ using ::com::sun::star::lang::Locale; using namespace ::com::sun::star; -#if defined(WNT) +#if defined(_WIN32) OString Win_AddLongPathPrefix( const OString &rPathName ) { #define WIN32_LONG_PATH_PREFIX "\\\\?\\" diff --git a/lingucomponent/source/lingutil/lingutil.hxx b/lingucomponent/source/lingutil/lingutil.hxx index a6d396277bc9..299762d7072c 100644 --- a/lingucomponent/source/lingutil/lingutil.hxx +++ b/lingucomponent/source/lingutil/lingutil.hxx @@ -41,7 +41,7 @@ struct lt_rtl_OUString } }; -#if defined(WNT) +#if defined(_WIN32) // to be use to get a path name with long path prefix // under Windows for Hunspell, Hyphen and MyThes libraries diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 51166e6d2cad..e5c6a3d0bc04 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -321,7 +321,7 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL OUString aff; osl::FileBase::getSystemPathFromFileURL(dicpath,dict); osl::FileBase::getSystemPathFromFileURL(affpath,aff); -#if defined(WNT) +#if defined(_WIN32) // workaround for Windows specific problem that the // path length in calls to 'fopen' is limited to somewhat // about 120+ characters which will usually be exceed when diff --git a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx index 3365b69c1585..4bbd7a012165 100644 --- a/lingucomponent/source/thesaurus/libnth/nthesimp.cxx +++ b/lingucomponent/source/thesaurus/libnth/nthesimp.cxx @@ -329,7 +329,7 @@ Sequence < Reference < css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryM osl::FileBase::getSystemPathFromFileURL(datpath,ndat); osl::FileBase::getSystemPathFromFileURL(idxpath,nidx); -#if defined(WNT) +#if defined(_WIN32) // MyThes waits UTF-8 encoded paths with \\?\ long path prefix. OString aTmpidx = Win_AddLongPathPrefix(OUStringToOString(nidx, RTL_TEXTENCODING_UTF8)); OString aTmpdat = Win_AddLongPathPrefix(OUStringToOString(ndat, RTL_TEXTENCODING_UTF8)); diff --git a/odk/CustomTarget_allheaders.mk b/odk/CustomTarget_allheaders.mk index 5f22d8544e30..d48abe0cd983 100644 --- a/odk/CustomTarget_allheaders.mk +++ b/odk/CustomTarget_allheaders.mk @@ -16,14 +16,14 @@ $(call gb_CustomTarget_get_target,odk/allheaders) : \ define odk_genincludesheader // Generated list of sal includes -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #endif endef define odk_geninclude -$(if $(2),#ifdef WNT) +$(if $(2),#ifdef _WIN32) #include <$(subst $(INSTDIR)/$(SDKDIRNAME)/include/,,$(1))> $(if $(2),#endif) @@ -35,11 +35,11 @@ $(odk_allheaders_DIR)/allheaders.hxx : \ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1) ifeq ($(HAVE_GNUMAKE_FILE_FUNC),) printf '// Generated list of sal includes\n' > $@ && \ - printf '#ifdef WNT\n' >> $@ && \ + printf '#ifdef _WIN32\n' >> $@ && \ printf '#include <windows.h>\n' >> $@ && \ printf '#endif\n' >> $@ \ $(foreach file,$(shell cat $^),\ - $(if $(findstring /win32/,$(file)),&& printf '#ifdef WNT\n' >> $@) \ + $(if $(findstring /win32/,$(file)),&& printf '#ifdef _WIN32\n' >> $@) \ && printf '#include <%s>\n' $(subst $(INSTDIR)/$(SDKDIRNAME)/include/,,$(file)) >> $@ \ $(if $(findstring /win32/,$(file)),&& printf '#endif // WNT\n' >> $@) \ ) diff --git a/onlineupdate/source/libmar/sign/mar_sign.c b/onlineupdate/source/libmar/sign/mar_sign.c index 68bff67acce6..a8e0f306d18a 100644 --- a/onlineupdate/source/libmar/sign/mar_sign.c +++ b/onlineupdate/source/libmar/sign/mar_sign.c @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef WNT +#ifdef _WIN32 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif @@ -17,7 +17,7 @@ #include "mar_cmdline.h" #include "mar.h" #include "cryptox.h" -#ifndef WNT +#ifndef _WIN32 #include <unistd.h> #endif diff --git a/onlineupdate/source/libmar/sign/nss_secutil.c b/onlineupdate/source/libmar/sign/nss_secutil.c index 2fa53e7b81b8..9fe5fe4d49e2 100644 --- a/onlineupdate/source/libmar/sign/nss_secutil.c +++ b/onlineupdate/source/libmar/sign/nss_secutil.c @@ -8,7 +8,7 @@ #include "nss_secutil.h" #include "prprf.h" -#ifdef WNT +#ifdef _WIN32 #include <io.h> #else #include <unistd.h> diff --git a/onlineupdate/source/libmar/src/mar.h b/onlineupdate/source/libmar/src/mar.h index 31cc3934e395..0e21efb920a5 100644 --- a/onlineupdate/source/libmar/src/mar.h +++ b/onlineupdate/source/libmar/src/mar.h @@ -69,7 +69,7 @@ typedef int (* MarItemCallback)(MarFile *mar, const MarItem *item, void *data); */ MarFile *mar_open(const char *path); -#ifdef WNT +#ifdef _WIN32 MarFile *mar_wopen(const wchar_t *path); #endif diff --git a/onlineupdate/source/libmar/src/mar_create.c b/onlineupdate/source/libmar/src/mar_create.c index c874b44e96ec..4e4e2b4058c2 100644 --- a/onlineupdate/source/libmar/src/mar_create.c +++ b/onlineupdate/source/libmar/src/mar_create.c @@ -13,7 +13,7 @@ #include "mar_cmdline.h" #include "mar.h" -#ifdef WNT +#ifdef _WIN32 #include <winsock2.h> #else #include <netinet/in.h> diff --git a/onlineupdate/source/libmar/src/mar_extract.c b/onlineupdate/source/libmar/src/mar_extract.c index af2276614bdb..75cbd645f296 100644 --- a/onlineupdate/source/libmar/src/mar_extract.c +++ b/onlineupdate/source/libmar/src/mar_extract.c @@ -12,7 +12,7 @@ #include "mar_private.h" #include "mar.h" -#ifdef WNT +#ifdef _WIN32 #include <io.h> #include <direct.h> #endif @@ -25,7 +25,7 @@ static int mar_ensure_parent_dir(const char *path) { *slash = '\0'; mar_ensure_parent_dir(path); -#ifdef WNT +#ifdef _WIN32 _mkdir(path); #else mkdir(path, 0755); @@ -45,7 +45,7 @@ static int mar_test_callback(MarFile *mar, const MarItem *item, void *unused) { if (mar_ensure_parent_dir(item->name)) return -1; -#ifdef WNT +#ifdef _WIN32 fd = _open(item->name, _O_BINARY|_O_CREAT|_O_TRUNC|_O_WRONLY, item->flags); #else fd = creat(item->name, item->flags); diff --git a/onlineupdate/source/libmar/src/mar_private.h b/onlineupdate/source/libmar/src/mar_private.h index 39a77d1ac03e..a770998da6fe 100644 --- a/onlineupdate/source/libmar/src/mar_private.h +++ b/onlineupdate/source/libmar/src/mar_private.h @@ -53,7 +53,7 @@ MOZ_STATIC_ASSERT(sizeof(BLOCKSIZE) < \ /* The mar program is compiled as a host bin so we don't have access to NSPR at runtime. For that reason we use ntohl, htonl, and define HOST_TO_NETWORK64 instead of the NSPR equivalents. */ -#ifdef WNT +#ifdef _WIN32 #include <winsock2.h> #define ftello _ftelli64 #define fseeko _fseeki64 diff --git a/onlineupdate/source/libmar/src/mar_read.c b/onlineupdate/source/libmar/src/mar_read.c index 34f8e8060485..0ed8c6be6ea9 100644 --- a/onlineupdate/source/libmar/src/mar_read.c +++ b/onlineupdate/source/libmar/src/mar_read.c @@ -11,7 +11,7 @@ #include "mar_private.h" #include "mar.h" -#ifdef WNT +#ifdef _WIN32 #include <winsock2.h> #else #include <netinet/in.h> @@ -177,7 +177,7 @@ MarFile *mar_open(const char *path) { return mar_fpopen(fp); } -#ifdef WNT +#ifdef _WIN32 MarFile *mar_wopen(const wchar_t *path) { FILE *fp; diff --git a/onlineupdate/source/libmar/tool/mar.c b/onlineupdate/source/libmar/tool/mar.c index 8fb1666605dc..dadb8d25b98a 100644 --- a/onlineupdate/source/libmar/tool/mar.c +++ b/onlineupdate/source/libmar/tool/mar.c @@ -10,7 +10,7 @@ #include "mar.h" #include "mar_cmdline.h" -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #include <direct.h> #define chdir _chdir @@ -23,7 +23,7 @@ #define MAR_CHANNEL_ID "LOOnlineUpdater" /* Dummy value; replace or remove in the future */ -#if !defined(NO_SIGN_VERIFY) && (!defined(WNT) || defined(MAR_NSS)) +#if !defined(NO_SIGN_VERIFY) && (!defined(_WIN32) || defined(MAR_NSS)) #include "cert.h" #include "pk11pub.h" int NSSInitCryptoContext(const char *NSSConfigDir); @@ -66,7 +66,7 @@ static void print_usage(void) { "signed_input_archive.mar base_64_encoded_signature_file " "changed_signed_output.mar\n"); printf("(i) is the index of the certificate to extract\n"); -#if defined(MACOSX) || (defined(WNT) && !defined(MAR_NSS)) +#if defined(MACOSX) || (defined(_WIN32) && !defined(MAR_NSS)) printf("Verify a MAR file:\n"); printf(" mar [-C workingDir] -D DERFilePath -v signed_archive.mar\n"); printf("At most %d signature certificate DER files are specified by " @@ -135,16 +135,16 @@ int main(int argc, char **argv) { uint32_t fileSizes[MAX_SIGNATURES]; const uint8_t* certBuffers[MAX_SIGNATURES]; char* DERFilePaths[MAX_SIGNATURES]; -#if (!defined(WNT) && !defined(MACOSX)) || defined(MAR_NSS) +#if (!defined(_WIN32) && !defined(MACOSX)) || defined(MAR_NSS) CERTCertificate* certs[MAX_SIGNATURES]; #endif #endif memset((void*)certNames, 0, sizeof(certNames)); -#if defined(WNT) && !defined(MAR_NSS) && !defined(NO_SIGN_VERIFY) +#if defined(_WIN32) && !defined(MAR_NSS) && !defined(NO_SIGN_VERIFY) memset((void*)certBuffers, 0, sizeof(certBuffers)); #endif -#if !defined(NO_SIGN_VERIFY) && ((!defined(MAR_NSS) && defined(WNT)) || \ +#if !defined(NO_SIGN_VERIFY) && ((!defined(MAR_NSS) && defined(_WIN32)) || \ defined(MACOSX)) memset(DERFilePaths, 0, sizeof(DERFilePaths)); memset(fileSizes, 0, sizeof(fileSizes)); @@ -174,7 +174,7 @@ int main(int argc, char **argv) { argv += 2; argc -= 2; } -#if !defined(NO_SIGN_VERIFY) && ((!defined(MAR_NSS) && defined(WNT)) || \ +#if !defined(NO_SIGN_VERIFY) && ((!defined(MAR_NSS) && defined(_WIN32)) || \ defined(MACOSX)) /* -D DERFilePath, also matches -D[index] DERFilePath We allow an index for verifying to be symmetric @@ -333,7 +333,7 @@ int main(int argc, char **argv) { return -1; } -#if (!defined(WNT) && !defined(MACOSX)) || defined(MAR_NSS) +#if (!defined(_WIN32) && !defined(MACOSX)) || defined(MAR_NSS) if (!NSSConfigDir || certCount == 0) { print_usage(); return -1; @@ -347,7 +347,7 @@ int main(int argc, char **argv) { rv = 0; for (k = 0; k < certCount; ++k) { -#if (defined(WNT) || defined(MACOSX)) && !defined(MAR_NSS) +#if (defined(_WIN32) || defined(MACOSX)) && !defined(MAR_NSS) rv = mar_read_entire_file(DERFilePaths[k], MAR_MAX_CERT_SIZE, &certBuffers[k], &fileSizes[k]); #else @@ -384,7 +384,7 @@ int main(int argc, char **argv) { } } for (k = 0; k < certCount; ++k) { -#if (defined(WNT) || defined(MACOSX)) && !defined(MAR_NSS) +#if (defined(_WIN32) || defined(MACOSX)) && !defined(MAR_NSS) free((void*)certBuffers[k]); #else /* certBuffers[k] is owned by certs[k] so don't free it */ diff --git a/onlineupdate/source/libmar/verify/cryptox.c b/onlineupdate/source/libmar/verify/cryptox.c index c5bef7387514..0e17f77033dc 100644 --- a/onlineupdate/source/libmar/verify/cryptox.c +++ b/onlineupdate/source/libmar/verify/cryptox.c @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef WNT +#ifdef _WIN32 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif diff --git a/onlineupdate/source/libmar/verify/mar_verify.c b/onlineupdate/source/libmar/verify/mar_verify.c index ff0909a16f29..74eb36935102 100644 --- a/onlineupdate/source/libmar/verify/mar_verify.c +++ b/onlineupdate/source/libmar/verify/mar_verify.c @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef WNT +#ifdef _WIN32 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif diff --git a/onlineupdate/source/update/common/pathhash.cxx b/onlineupdate/source/update/common/pathhash.cxx index fea123cda366..aa5644c896bc 100644 --- a/onlineupdate/source/update/common/pathhash.cxx +++ b/onlineupdate/source/update/common/pathhash.cxx @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #include <wincrypt.h> #include "pathhash.h" diff --git a/onlineupdate/source/update/common/readstrings.cxx b/onlineupdate/source/update/common/readstrings.cxx index 83580a80bc74..d2792117773e 100644 --- a/onlineupdate/source/update/common/readstrings.cxx +++ b/onlineupdate/source/update/common/readstrings.cxx @@ -10,7 +10,7 @@ #include "readstrings.h" #include "errors.h" -#ifdef WNT +#ifdef _WIN32 # define NS_tfopen _wfopen # define OPEN_MODE L"rb" #else diff --git a/onlineupdate/source/update/common/readstrings.h b/onlineupdate/source/update/common/readstrings.h index ecef9aa5e6b9..5b3cde6acaaa 100644 --- a/onlineupdate/source/update/common/readstrings.h +++ b/onlineupdate/source/update/common/readstrings.h @@ -9,7 +9,7 @@ #define MAX_TEXT_LEN 600 -#ifdef WNT +#ifdef _WIN32 # define UNICODE # include <windows.h> typedef WCHAR NS_tchar; diff --git a/onlineupdate/source/update/common/uachelper.cxx b/onlineupdate/source/update/common/uachelper.cxx index 55053f3d7932..4cae3ad4e5fc 100644 --- a/onlineupdate/source/update/common/uachelper.cxx +++ b/onlineupdate/source/update/common/uachelper.cxx @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #include <wtsapi32.h> #include "uachelper.h" diff --git a/onlineupdate/source/update/common/updatedefines.h b/onlineupdate/source/update/common/updatedefines.h index db4553312384..52a8b8437cc2 100644 --- a/onlineupdate/source/update/common/updatedefines.h +++ b/onlineupdate/source/update/common/updatedefines.h @@ -21,7 +21,7 @@ # endif #endif -#if defined(WNT) +#if defined(_WIN32) # include <windows.h> # include <shlwapi.h> # include <direct.h> diff --git a/onlineupdate/source/update/common/updatehelper.cxx b/onlineupdate/source/update/common/updatehelper.cxx index 1768e5334048..c10ea8d580d4 100644 --- a/onlineupdate/source/update/common/updatehelper.cxx +++ b/onlineupdate/source/update/common/updatehelper.cxx @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef WNT +#ifdef _WIN32 #include <windows.h> // Needed for CreateToolhelp32Snapshot diff --git a/onlineupdate/source/update/common/updatelogging.cxx b/onlineupdate/source/update/common/updatelogging.cxx index 2f1472ef277d..22a74e17e953 100644 --- a/onlineupdate/source/update/common/updatelogging.cxx +++ b/onlineupdate/source/update/common/updatelogging.cxx @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#if defined(WNT) +#if defined(_WIN32) #include <windows.h> #endif diff --git a/onlineupdate/source/update/common/win_dirent.h b/onlineupdate/source/update/common/win_dirent.h index a1c79d6cdc78..a2281557e25a 100644 --- a/onlineupdate/source/update/common/win_dirent.h +++ b/onlineupdate/source/update/common/win_dirent.h @@ -6,7 +6,7 @@ #ifndef WINDIRENT_H__ #define WINDIRENT_H__ -#ifdef WNT +#ifdef _WIN32 #include <windows.h> struct DIR { diff --git a/onlineupdate/source/update/src/mar.h b/onlineupdate/source/update/src/mar.h index 31cc3934e395..0e21efb920a5 100644 --- a/onlineupdate/source/update/src/mar.h +++ b/onlineupdate/source/update/src/mar.h @@ -69,7 +69,7 @@ typedef int (* MarItemCallback)(MarFile *mar, const MarItem *item, void *data); */ MarFile *mar_open(const char *path); -#ifdef WNT +#ifdef _WIN32 MarFile *mar_wopen(const wchar_t *path); #endif diff --git a/onlineupdate/source/update/src/mar_create.c b/onlineupdate/source/update/src/mar_create.c index c874b44e96ec..4e4e2b4058c2 100644 --- a/onlineupdate/source/update/src/mar_create.c +++ b/onlineupdate/source/update/src/mar_create.c @@ -13,7 +13,7 @@ #include "mar_cmdline.h" #include "mar.h" -#ifdef WNT +#ifdef _WIN32 #include <winsock2.h> #else #include <netinet/in.h> diff --git a/onlineupdate/source/update/src/mar_extract.c b/onlineupdate/source/update/src/mar_extract.c index af2276614bdb..75cbd645f296 100644 --- a/onlineupdate/source/update/src/mar_extract.c +++ b/onlineupdate/source/update/src/mar_extract.c @@ -12,7 +12,7 @@ #include "mar_private.h" #include "mar.h" -#ifdef WNT +#ifdef _WIN32 #include <io.h> #include <direct.h> #endif @@ -25,7 +25,7 @@ static int mar_ensure_parent_dir(const char *path) { *slash = '\0'; mar_ensure_parent_dir(path); -#ifdef WNT +#ifdef _WIN32 _mkdir(path); #else mkdir(path, 0755); @@ -45,7 +45,7 @@ static int mar_test_callback(MarFile *mar, const MarItem *item, void *unused) { if (mar_ensure_parent_dir(item->name)) return -1; -#ifdef WNT +#ifdef _WIN32 fd = _open(item->name, _O_BINARY|_O_CREAT|_O_TRUNC|_O_WRONLY, item->flags); #else fd = creat(item->name, item->flags); diff --git a/onlineupdate/source/update/src/mar_private.h b/onlineupdate/source/update/src/mar_private.h index 39a77d1ac03e..a770998da6fe 100644 --- a/onlineupdate/source/update/src/mar_private.h +++ b/onlineupdate/source/update/src/mar_private.h @@ -53,7 +53,7 @@ MOZ_STATIC_ASSERT(sizeof(BLOCKSIZE) < \ /* The mar program is compiled as a host bin so we don't have access to NSPR at runtime. For that reason we use ntohl, htonl, and define HOST_TO_NETWORK64 instead of the NSPR equivalents. */ -#ifdef WNT +#ifdef _WIN32 #include <winsock2.h> #define ftello _ftelli64 #define fseeko _fseeki64 diff --git a/onlineupdate/source/update/src/mar_read.c b/onlineupdate/source/update/src/mar_read.c index 34f8e8060485..0ed8c6be6ea9 100644 --- a/onlineupdate/source/update/src/mar_read.c +++ b/onlineupdate/source/update/src/mar_read.c @@ -11,7 +11,7 @@ #include "mar_private.h" #include "mar.h" -#ifdef WNT +#ifdef _WIN32 #include <winsock2.h> #else #include <netinet/in.h> @@ -177,7 +177,7 @@ MarFile *mar_open(const char *path) { return mar_fpopen(fp); } -#ifdef WNT +#ifdef _WIN32 MarFile *mar_wopen(const wchar_t *path) { FILE *fp; diff --git a/onlineupdate/source/update/updater/archivereader.cxx b/onlineupdate/source/update/updater/archivereader.cxx index a7884df2d8de..23f416a17b2a 100644 --- a/onlineupdate/source/update/updater/archivereader.cxx +++ b/onlineupdate/source/update/updater/archivereader.cxx @@ -10,7 +10,7 @@ #include "bzlib.h" #include "archivereader.h" #include "errors.h" -#ifdef WNT +#ifdef _WIN32 #include "updatehelper.h" #endif @@ -202,7 +202,7 @@ ArchiveReader::Open(const NS_tchar *path) } } -#ifdef WNT +#ifdef _WIN32 mArchive = mar_wopen(path); #else mArchive = mar_open(path); @@ -239,7 +239,7 @@ ArchiveReader::ExtractFile(const char *name, const NS_tchar *dest) if (!item) return READ_ERROR; -#ifdef WNT +#ifdef _WIN32 FILE* fp = _wfopen(dest, L"wb+"); #else int fd = creat(dest, item->flags); diff --git a/onlineupdate/source/update/updater/archivereader.h b/onlineupdate/source/update/updater/archivereader.h index 5fa9523eba40..8d0b7c3d74ee 100644 --- a/onlineupdate/source/update/updater/archivereader.h +++ b/onlineupdate/source/update/updater/archivereader.h @@ -10,7 +10,7 @@ #include <stdio.h> #include "mar.h" -#ifdef WNT +#ifdef _WIN32 typedef WCHAR NS_tchar; #else typedef char NS_tchar; diff --git a/onlineupdate/source/update/updater/bspatch.cxx b/onlineupdate/source/update/updater/bspatch.cxx index 8f8e0420000a..09a3c4354fcb 100644 --- a/onlineupdate/source/update/updater/bspatch.cxx +++ b/onlineupdate/source/update/updater/bspatch.cxx @@ -39,13 +39,13 @@ #include <string.h> #include <limits.h> -#if defined(WNT) +#if defined(_WIN32) # include <io.h> #else # include <unistd.h> #endif -#ifdef WNT +#ifdef _WIN32 # include <winsock2.h> #else # include <arpa/inet.h> diff --git a/onlineupdate/source/update/updater/loaddlls.cxx b/onlineupdate/source/update/updater/loaddlls.cxx index 541cf4a3a683..94a4222136b5 100644 --- a/onlineupdate/source/update/updater/loaddlls.cxx +++ b/onlineupdate/source/update/updater/loaddlls.cxx @@ -4,7 +4,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef WNT +#ifdef _WIN32 #ifndef UNICODE #define UNICODE #endif diff --git a/onlineupdate/source/update/updater/nsWindowsRestart.cxx b/onlineupdate/source/update/updater/nsWindowsRestart.cxx index 6f275abcaef5..20f584f4f146 100644 --- a/onlineupdate/source/update/updater/nsWindowsRestart.cxx +++ b/onlineupdate/source/update/updater/nsWindowsRestart.cxx @@ -11,7 +11,7 @@ #define nsWindowsRestart_cxx #endif -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #endif #include <stdint.h> diff --git a/onlineupdate/source/update/updater/progressui.h b/onlineupdate/source/update/updater/progressui.h index 55d0d9ebf0c3..7392ac167bc4 100644 --- a/onlineupdate/source/update/updater/progressui.h +++ b/onlineupdate/source/update/updater/progressui.h @@ -9,7 +9,7 @@ #include "updatedefines.h" -#if defined(WNT) +#if defined(_WIN32) typedef WCHAR NS_tchar; #define NS_main wmain #else @@ -20,7 +20,7 @@ // Called to perform any initialization of the widget toolkit int InitProgressUI(int *argc, NS_tchar ***argv); -#if defined(WNT) +#if defined(_WIN32) // Called on the main thread at startup int ShowProgressUI(bool indeterminate = false, bool initUIStrings = true); int InitProgressUIStrings(); diff --git a/onlineupdate/source/update/updater/progressui_null.cxx b/onlineupdate/source/update/updater/progressui_null.cxx index 7c3019e0f010..c4cd6413ff1f 100644 --- a/onlineupdate/source/update/updater/progressui_null.cxx +++ b/onlineupdate/source/update/updater/progressui_null.cxx @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#if !defined(MACOSX) && !defined(UNIX) && !defined(WNT) +#if !defined(MACOSX) && !defined(UNIX) && !defined(_WIN32) #include "progressui.h" int InitProgressUI(int *argc, char ***argv) @@ -24,4 +24,4 @@ void QuitProgressUI() void UpdateProgressUI(float progress) { } -#endif // !defined(MACOSX) && !defined(UNIX) && !defined(WNT) +#endif // !defined(MACOSX) && !defined(UNIX) && !defined(_WIN32) diff --git a/onlineupdate/source/update/updater/progressui_win.cxx b/onlineupdate/source/update/updater/progressui_win.cxx index 49ae81e68d07..7a0ff249442f 100644 --- a/onlineupdate/source/update/updater/progressui_win.cxx +++ b/onlineupdate/source/update/updater/progressui_win.cxx @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef WNT +#ifdef _WIN32 #include <stdio.h> #ifndef UNICODE #define UNICODE diff --git a/onlineupdate/source/update/updater/updater.cxx b/onlineupdate/source/update/updater/updater.cxx index 5545d18f301d..2d5e614dbf59 100644 --- a/onlineupdate/source/update/updater/updater.cxx +++ b/onlineupdate/source/update/updater/updater.cxx @@ -64,7 +64,7 @@ #define PROGRESS_FINISH_SIZE 5.0f // Amount of time in ms to wait for the parent process to close -#ifdef WNT +#ifdef _WIN32 #define PARENT_WAIT 5000 #endif @@ -113,12 +113,12 @@ static bool sUseHardLinks = true; # define MAYBE_USE_HARD_LINKS 0 #endif -#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(WNT) && !defined(MACOSX) +#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(_WIN32) && !defined(MACOSX) #include "nss.h" #include "prerror.h" #endif -#ifdef WNT +#ifdef _WIN32 #include "updatehelper.h" // Closes the handle if valid and if the updater is elevated returns with the @@ -208,7 +208,7 @@ struct MARChannelStringTable { typedef void (* ThreadFunc)(void *param); -#ifdef WNT +#ifdef _WIN32 #include <process.h> class Thread @@ -278,7 +278,7 @@ static bool sReplaceRequest = false; static bool sUsingService = false; static bool sIsOSUpdate = false; -#ifdef WNT +#ifdef _WIN32 // The current working directory specified in the command line. static NS_tchar* gDestPath; static NS_tchar gCallbackRelPath[MAXPATHLEN]; @@ -343,7 +343,7 @@ EnvHasValue(const char *name) return (val && *val); } -#ifdef WNT +#ifdef _WIN32 /** * Coverts a relative update path to a full path for Windows. * @@ -397,7 +397,7 @@ get_valid_path(NS_tchar **line, bool isdir = false) return nullptr; } -#ifdef WNT +#ifdef _WIN32 // All paths must be relative from the current working directory if (path[0] == NS_T('\\') || path[1] == NS_T(':')) { LOG(("get_valid_path: path must be relative: " LOG_S, path)); @@ -452,7 +452,7 @@ get_quoted_path(const NS_tchar *path) static void ensure_write_permissions(const NS_tchar *path) { -#ifdef WNT +#ifdef _WIN32 (void) _wchmod(path, _S_IREAD | _S_IWRITE); #else struct stat fs; @@ -639,7 +639,7 @@ create_hard_link(const NS_tchar *srcFilename, const NS_tchar *destFilename) // Copy the file named path onto a new file named dest. static int ensure_copy(const NS_tchar *path, const NS_tchar *dest) { -#ifdef WNT +#ifdef _WIN32 // Fast path for Windows bool result = CopyFileW(path, dest, false); if (!result) { @@ -850,7 +850,7 @@ static int rename_file(const NS_tchar *spath, const NS_tchar *dpath, return OK; } -#ifdef WNT +#ifdef _WIN32 // Remove the directory pointed to by path and all of its files and // sub-directories. If a file is in use move it to the tobedeleted directory // and attempt to schedule removal of the file on reboot @@ -958,7 +958,7 @@ static int backup_discard(const NS_tchar *path) } int rv = ensure_remove(backup); -#if defined(WNT) +#if defined(_WIN32) if (rv && !sStagedUpdate && !sReplaceRequest) { LOG(("backup_discard: unable to remove: " LOG_S, backup)); NS_tchar path[MAXPATHLEN]; @@ -1302,7 +1302,7 @@ AddFile::Execute() return rv; } -#ifdef WNT +#ifdef _WIN32 char sourcefile[MAXPATHLEN]; if (!WideCharToMultiByte(CP_UTF8, 0, mFile, -1, sourcefile, MAXPATHLEN, nullptr, nullptr)) { @@ -1456,7 +1456,7 @@ PatchFile::Prepare() if (!fp) return WRITE_ERROR; -#ifdef WNT +#ifdef _WIN32 char sourcefile[MAXPATHLEN]; if (!WideCharToMultiByte(CP_UTF8, 0, mPatchFile, -1, sourcefile, MAXPATHLEN, nullptr, nullptr)) { @@ -1486,7 +1486,7 @@ PatchFile::Execute() return rv; FILE *origfile = nullptr; -#ifdef WNT +#ifdef _WIN32 if (NS_tstrcmp(mFile, gCallbackRelPath) == 0) { // Read from the copy of the callback when patching since the callback can't // be opened for reading to prevent the application from being launched. @@ -1580,7 +1580,7 @@ PatchFile::Execute() return WRITE_ERROR_OPEN_PATCH_FILE; } -#ifdef WNT +#ifdef _WIN32 if (!shouldTruncate) { fseek(ofile, 0, SEEK_SET); } @@ -1793,7 +1793,7 @@ PatchIfFile::Finish(int status) //----------------------------------------------------------------------------- -#ifdef WNT +#ifdef _WIN32 #include "nsWindowsRestart.cxx" #include "nsWindowsHelpers.h" #include "uachelper.h" @@ -1908,7 +1908,7 @@ IsUpdateStatusPendingService() } #endif -#ifdef WNT +#ifdef _WIN32 /* * Read the update.status file and sets isSuccess to true if * the status is set to succeeded. @@ -1949,7 +1949,7 @@ static int CopyInstallDirToDestDir() { // These files should not be copied over to the updated app -#ifdef WNT +#ifdef _WIN32 #define SKIPLIST_COUNT 3 #elif defined(MACOSX) #define SKIPLIST_COUNT 0 @@ -1960,7 +1960,7 @@ CopyInstallDirToDestDir() #ifndef MACOSX skiplist.append(0, gInstallDirPath, NS_T("updated")); skiplist.append(1, gInstallDirPath, NS_T("updates/0")); -#ifdef WNT +#ifdef _WIN32 skiplist.append(2, gInstallDirPath, NS_T("updated.update_in_progress.lock")); #endif #endif @@ -2023,7 +2023,7 @@ ProcessReplaceRequest() LOG(("Begin moving destDir (" LOG_S ") to tmpDir (" LOG_S ")", destDir, tmpDir)); int rv = rename_file(destDir, tmpDir, true); -#ifdef WNT +#ifdef _WIN32 // On Windows, if Firefox is launched using the shortcut, it will hold a handle // to its installation directory open, which might not get released in time. // Therefore we wait a little bit here to see if the handle is released. @@ -2075,7 +2075,7 @@ ProcessReplaceRequest() rv = ensure_remove_recursive(tmpDir, true); if (rv) { LOG(("Removing tmpDir failed, err: %d", rv)); -#ifdef WNT +#ifdef _WIN32 NS_tchar deleteDir[MAXPATHLEN]; NS_tsnprintf(deleteDir, sizeof(deleteDir)/sizeof(deleteDir[0]), NS_T("%s\\%s"), destDir, DELETE_DIR); @@ -2103,7 +2103,7 @@ ProcessReplaceRequest() return 0; } -#ifdef WNT +#ifdef _WIN32 static void WaitForServiceFinishThread(void *param) { @@ -2199,7 +2199,7 @@ UpdateThreadFunc(void * /*param*/) #ifdef MOZ_VERIFY_MAR_SIGNATURE if (rv == OK) { -#ifdef WNT +#ifdef _WIN32 HKEY baseKey = nullptr; wchar_t valueName[] = L"Image Path"; wchar_t rasenh[] = L"rsaenh.dll"; @@ -2225,7 +2225,7 @@ UpdateThreadFunc(void * /*param*/) } #endif rv = gArchiveReader.VerifySignature(); -#ifdef WNT +#ifdef _WIN32 if (baseKey) { if (reset) { RegSetValueExW(baseKey, valueName, 0, REG_SZ, @@ -2342,7 +2342,7 @@ int NS_main(int argc, NS_tchar **argv) } #endif -#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(WNT) && !defined(MACOSX) +#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(_WIN32) && !defined(MACOSX) // On Windows and Mac we rely on native APIs to do verifications so we don't // need to initialize NSS at all there. // Otherwise, minimize the amount of NSS we depend on by avoiding all the NSS @@ -2389,7 +2389,7 @@ int NS_main(int argc, NS_tchar **argv) *slash = NS_T('\0'); } -#ifdef WNT +#ifdef _WIN32 bool useService = false; bool testOnlyFallbackKeyExists = false; bool noServiceFallback = EnvHasValue("MOZ_NO_SERVICE_FALLBACK"); @@ -2425,13 +2425,13 @@ int NS_main(int argc, NS_tchar **argv) #endif // If there is a PID specified and it is not '0' then wait for the process to exit. -#ifdef WNT +#ifdef _WIN32 __int64 pid = 0; #else int pid = 0; #endif if (argc > 4) { -#ifdef WNT +#ifdef _WIN32 pid = _wtoi64(argv[4]); #else pid = atoi(argv[4]); @@ -2466,7 +2466,7 @@ int NS_main(int argc, NS_tchar **argv) if (sReplaceRequest) { // If we're attempting to replace the application, try to append to the // log generated when staging the staged update. -#ifdef WNT +#ifdef _WIN32 NS_tchar* logDir = gPatchDirPath; #else #ifdef MACOSX @@ -2529,7 +2529,7 @@ int NS_main(int argc, NS_tchar **argv) } #endif -#ifdef WNT +#ifdef _WIN32 if (pid > 0) { HANDLE parent = OpenProcess(SYNCHRONIZE, false, (DWORD) pid); // May return nullptr if the parent process has already gone away. @@ -2549,7 +2549,7 @@ int NS_main(int argc, NS_tchar **argv) #endif if (sReplaceRequest) { -#ifdef WNT +#ifdef _WIN32 // On Windows, the current working directory of the process should be changed // so that it's not locked. NS_tchar sysDir[MAX_PATH + 1] = { L'\0' }; @@ -2564,7 +2564,7 @@ int NS_main(int argc, NS_tchar **argv) // argument prior to callbackIndex is the working directory. const int callbackIndex = 6; -#if defined(WNT) +#if defined(_WIN32) sUsingService = EnvHasValue("MOZ_USING_SERVICE"); putenv(const_cast<char*>("MOZ_USING_SERVICE=")); // lastFallbackError keeps track of the last error for the service not being @@ -2907,7 +2907,7 @@ int NS_main(int argc, NS_tchar **argv) } } -#ifdef WNT +#ifdef _WIN32 // For replace requests, we don't need to do any real updates, so this is not // necessary. if (!sReplaceRequest) { @@ -3108,7 +3108,7 @@ int NS_main(int argc, NS_tchar **argv) } t.Join(); -#ifdef WNT +#ifdef _WIN32 if (argc > callbackIndex && !sReplaceRequest) { if (callbackFile != INVALID_HANDLE_VALUE) { CloseHandle(callbackFile); @@ -3186,7 +3186,7 @@ int NS_main(int argc, NS_tchar **argv) LogFinish(); if (argc > callbackIndex) { -#if defined(WNT) +#if defined(_WIN32) if (gSucceeded) { // The service update will only be executed if it is already installed. // For first time installs of the service, the install will happen from @@ -3335,7 +3335,7 @@ ActionList::Finish(int status) } -#ifdef WNT +#ifdef _WIN32 int add_dir_entries(const NS_tchar *dirpath, ActionList *list) { int rv = OK; @@ -3642,7 +3642,7 @@ GetManifestContents(const NS_tchar *manifest) mbuf[ms.st_size] = '\0'; rb = mbuf; -#ifndef WNT +#ifndef _WIN32 return rb; #else NS_tchar *wrb = (NS_tchar *) malloc((ms.st_size + 1) * sizeof(NS_tchar)); diff --git a/onlineupdate/source/update/updater/win_dirent.cxx b/onlineupdate/source/update/updater/win_dirent.cxx index 7df6c26f2bbe..d7bf872194f6 100644 --- a/onlineupdate/source/update/updater/win_dirent.cxx +++ b/onlineupdate/source/update/updater/win_dirent.cxx @@ -4,7 +4,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef WNT +#ifdef _WIN32 #include "win_dirent.h" #include <errno.h> #include <string.h> diff --git a/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.cxx b/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.cxx index 3f859db06aae..b8562354b586 100644 --- a/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.cxx +++ b/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.cxx @@ -9,13 +9,13 @@ #include <stdlib.h> #include <string.h> #include <stdint.h> -#if defined(WNT) && !defined(UPDATER_NO_STRING_GLUE_STL) +#if defined(_WIN32) && !defined(UPDATER_NO_STRING_GLUE_STL) #include <wchar.h> #include <stdint.h> #include "mozilla/Char16.h" #endif -#ifdef WNT +#ifdef _WIN32 // from Mozilla's nsAlgorithm.h template <class T> inline const T& @@ -37,7 +37,7 @@ struct VersionPart char* extraD; // null-terminated }; -#ifdef WNT +#ifdef _WIN32 struct VersionPartW { int32_t numA; @@ -126,7 +126,7 @@ ParseVP(char* aPart, VersionPart& aResult) * * @returns A pointer to the next versionpart, or null if none. */ -#ifdef WNT +#ifdef _WIN32 static wchar_t* ParseVP(wchar_t* aPart, VersionPartW& aResult) { @@ -277,7 +277,7 @@ CompareVP(VersionPart& aVer1, VersionPart& aVer2) /** * Compares two VersionParts */ -#ifdef WNT +#ifdef _WIN32 static int32_t CompareVP(VersionPartW& aVer1, VersionPartW& aVer2) { @@ -310,7 +310,7 @@ CompareVP(VersionPartW& aVer1, VersionPartW& aVer2) namespace mozilla { -#ifdef WNT +#ifdef _WIN32 int32_t CompareVersions(const wchar_t* aStrA, const wchar_t* aStrB) { diff --git a/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h b/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h index 8ece9408abab..c199d214efc1 100644 --- a/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h +++ b/onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h @@ -10,7 +10,7 @@ #include <stdlib.h> #include <string.h> #include <assert.h> -#if defined(WNT) && !defined(UPDATER_NO_STRING_GLUE_STL) +#if defined(_WIN32) && !defined(UPDATER_NO_STRING_GLUE_STL) #include <wchar.h> #include <stdint.h> #include "mozilla/Char16.h" @@ -46,7 +46,7 @@ namespace mozilla { int32_t CompareVersions(const char* aStrA, const char* aStrB); -#ifdef WNT +#ifdef _WIN32 int32_t CompareVersions(const wchar_t* aStrA, const wchar_t* aStrB); #endif @@ -120,7 +120,7 @@ private: char* versionContent; }; -#ifdef WNT +#ifdef _WIN32 struct VersionW { explicit VersionW(const wchar_t* aVersionStringW) diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx index 3c5dde5a0417..79262be6b6cd 100644 --- a/opencl/source/openclconfig.cxx +++ b/opencl/source/openclconfig.cxx @@ -130,7 +130,7 @@ bool match(const OUString& rPattern, const OUString& rInput) bool match(const OpenCLConfig::ImplMatcher& rListEntry, const OpenCLPlatformInfo& rPlatform, const OpenCLDeviceInfo& rDevice) { -#if defined WNT +#if defined(_WIN32) if (!rListEntry.maOS.isEmpty() && rListEntry.maOS != "Windows") return false; #elif defined LINUX diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx index 35e5b106d15c..6e95c64b5dab 100644 --- a/postprocess/qa/services.cxx +++ b/postprocess/qa/services.cxx @@ -338,12 +338,12 @@ void Test::createInstance( } else if (name == "com.sun.star.datatransfer.clipboard.SystemClipboard") { // SystemClipboard is a wrapper returning either a platform-specific or // the generic VCLGenericClipboard: -#if defined WNT +#if defined(_WIN32) expImpl = "com.sun.star.datatransfer.clipboard.ClipboardW32"; #else expImpl = "com.sun.star.datatransfer.VCLGenericClipboard"; #endif -#if !defined WNT +#if !defined(_WIN32) } else if (name == "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1" || name == "com.sun.star.datatransfer.dnd.XdndSupport") { @@ -358,7 +358,7 @@ void Test::createInstance( } else if (name == "com.sun.star.ui.dialogs.FolderPicker") { // FolderPicker is a wrapper returning either a platform-specific or the // generic OfficeFolderPicker: -#if defined WNT +#if defined(_WIN32) expImpl = "com.sun.star.ui.dialogs.Win32FolderPicker"; expServs = {"com.sun.star.ui.dialogs.SystemFolderPicker"}; #else diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx index 2f166bcd9b08..3bcf7fabd77b 100644 --- a/pyuno/source/loader/pyuno_loader.cxx +++ b/pyuno/source/loader/pyuno_loader.cxx @@ -199,7 +199,7 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c if( !pythonPath.isEmpty() ) prependPythonPath( pythonPath ); -#ifdef WNT +#ifdef _WIN32 //extend PATH under windows to include the branddir/program so ssl libs will be found //for use by terminal mailmerge dependency _ssl.pyd OUString sEnvName("PATH"); diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h index ca2464c73e76..0114c2914c01 100644 --- a/rsc/source/rscpp/cpp.h +++ b/rsc/source/rscpp/cpp.h @@ -247,7 +247,7 @@ int rscpp_main( int argc, char **argv ); #endif #define MAIN rscpp_main /* fuer die cpp.lib muss main() geandert werden */ #else -#ifdef WNT +#ifdef _WIN32 #define MAIN __cdecl main #else #define MAIN main diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index 9bc16eaeb19c..e836b3d22aa5 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -107,7 +107,7 @@ void setincdirs() * verwendete knallte es in strcpy() ! */ -#if !defined( WNT ) && ! defined UNX +#if !defined(_WIN32) && !defined(UNX) extern char* getenv( char *pStr ); /* BP */ #endif char* pIncGetEnv = NULL; /* Pointer auf INCLUDE */ diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index 09307c1bfcea..9c206f5eedab 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -20,7 +20,7 @@ #include <stdlib.h> #include <stdio.h> -#if defined (WNT ) +#if defined(_WIN32) #include <direct.h> #endif #include <string.h> diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index 7bc32f8db3c7..30347c178c16 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #endif @@ -361,7 +361,7 @@ SAL_IMPLEMENT_MAIN() OUString path; try { -#ifdef WNT +#ifdef _WIN32 //Disable Dr-Watson in order to crash simply without popup dialogs under //windows DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 7d65b5089f07..7a3913c5d545 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -34,7 +34,7 @@ #include <memory> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #endif @@ -135,7 +135,7 @@ inline bool compareFileName( const ::rtl::OUString & ustr1, const ::rtl::OUStrin { bool bOk; //on Windows, the separator is '\', so here change to '/', then compare -#if defined (WNT ) +#if defined(_WIN32) ::rtl::OUString ustr1new,ustr2new; sal_Unicode reverseSlash = (sal_Unicode)'\\'; @@ -314,7 +314,7 @@ inline bool ifFileExist( const ::rtl::OUString & str ) inline bool ifFileCanWrite( const ::rtl::OUString & str ) { //on Windows, the file has no write right, but can be written -#ifdef WNT +#ifdef _WIN32 bool bCheckResult = false; ::rtl::OUString aUStr = str.copy( 0 ); if ( isURL( str ) ) @@ -707,7 +707,7 @@ namespace osl_FileBase } void SystemPath_FileURL::checkWNTBehaviour_getSystemPathFromFileURL(rtl::OString const& _sURL, ::osl::FileBase::RC _nAssumeError, rtl::OString const& _sWNTAssumeResultString) { -#if ( defined WNT ) +#if defined(_WIN32) check_SystemPath_FileURL(_sURL, _nAssumeError, _sWNTAssumeResultString); #else (void)_sURL; @@ -729,7 +729,7 @@ namespace osl_FileBase void SystemPath_FileURL::checkWNTBehaviour_getFileURLFromSystemPath(rtl::OString const& _sSysPath, ::osl::FileBase::RC _nAssumeError, rtl::OString const& _sWNTAssumeResultString) { -#if ( defined WNT ) +#if defined(_WIN32) check_SystemPath_FileURL(_sSysPath, _nAssumeError, _sWNTAssumeResultString, sal_False ); #else (void)_sSysPath; @@ -2232,7 +2232,7 @@ namespace osl_File nError1 = testFile.open( osl_File_OpenFlag_Create ); bool bOK = ( File::E_ACCES == nError1 ); -#ifdef WNT +#ifdef _WIN32 bOK = true; /// in Windows, you can create file in c:/ any way. testFile.close(); deleteTestFile( aTestFile); @@ -3039,7 +3039,7 @@ namespace osl_File { //copy $TEMP/tmpdir/tmpname to $ROOT/tmpname. nError1 = ::osl::File::copy( aTmpName4, aTmpName7 ); -#if defined (WNT ) +#if defined(_WIN32) nError1 = ::osl::FileBase::E_ACCES; /// for Windows, c:/ is writtenable any way. deleteTestFile( aTmpName7); #endif @@ -3169,7 +3169,7 @@ namespace osl_File { //move $TEMP/tmpdir/tmpname to $ROOT/tmpname. nError1 = ::osl::File::move( aTmpName4, aTmpName7 ); -#if defined (WNT ) +#if defined(_WIN32) nError1 = ::osl::FileBase::E_ACCES; /// for Windows, c:/ is writtenable any way. deleteTestFile( aTmpName7); #endif @@ -3204,7 +3204,7 @@ namespace osl_File //move file $TEMP/tmpdir/tmpname to $TEMP/tmpname nError2 = ::osl::File::move( aTmpName4, aTmpName6 ); deleteTestDirectory( aTmpName6 ); -#if defined ( WNT ) +#if defined(_WIN32) deleteTestDirectory( aTmpName4 );// in Windows, it can be moved!!!!! this is only for not influence the following test. deleteTestFile( aTmpName6 ); nError1 = ::osl::FileBase::E_NOTDIR; @@ -3398,7 +3398,7 @@ namespace osl_File void setAttributes_002() { //on UNX, can not set hidden attribute to file, rename file can set the attribute -#ifdef WNT +#ifdef _WIN32 //set the file to hidden nError2 = ::osl::File::setAttributes( aTmpName6, osl_File_Attribute_Hidden); @@ -3489,7 +3489,7 @@ namespace osl_File CPPUNIT_ASSERT_MESSAGE( "test for setTime function: set access time then get it. time precision is still a problem for it cut off the nanosec.", t_compareTime( pTV_access, pTV_current, delta ) ); -#if defined ( WNT ) +#if defined(_WIN32) //Unfortunately there is no way to get the creation time of a file under Unix (its a Windows only feature). //That means the flag osl_FileStatus_Mask_CreationTime should be deprecated under Unix. CPPUNIT_ASSERT_MESSAGE( "test for setTime function: set creation time then get it. ", @@ -4661,7 +4661,7 @@ namespace osl_Directory void create_002() { -#if !defined (WNT) && !defined (MACOSX) && defined (SAL_UNX) +#if !defined(_WIN32) && !defined(MACOSX) && defined(SAL_UNX) if (geteuid() == 0) //don't test if building as root return; @@ -4807,7 +4807,7 @@ namespace osl_Directory // TEST Directory::createPath - #ifdef WNT + #ifdef _WIN32 # define PATH_BUFFER_SIZE MAX_PATH #else # define PATH_BUFFER_SIZE PATH_MAX @@ -4842,7 +4842,7 @@ namespace osl_Directory if (tmp_x.lastIndexOf('/') != (tmp_x.getLength() - 1)) tmp_x += rtl::OString('/'); -#if !defined(WNT) && !defined(ANDROID) && !defined(AIX) +#if !defined(_WIN32) && !defined(ANDROID) && !defined(AIX) // FIXME would be nice to create unique dir even on Windows tmp_x += rtl::OString("XXXXXX"); char *out = mkdtemp(const_cast<char*>(tmp_x.getStr())); @@ -4965,7 +4965,7 @@ namespace osl_Directory } -#ifdef WNT +#ifdef _WIN32 const char* get_unused_drive_letter() { @@ -5012,7 +5012,7 @@ namespace osl_Directory CPPUNIT_TEST(with_relative_path); CPPUNIT_TEST(without_callback); CPPUNIT_TEST(with_callback); -#ifdef WNT +#ifdef _WIN32 CPPUNIT_TEST(at_invalid_logical_drive); #endif CPPUNIT_TEST_SUITE_END(); @@ -5039,7 +5039,7 @@ inline ::rtl::OUString getCurrentPID( ) { //~ Get current PID and turn it into OUString; int nPID = 0; -#ifdef WNT +#ifdef _WIN32 nPID = GetCurrentProcessId(); #else nPID = getpid(); diff --git a/sal/qa/osl/file/osl_File_Const.h b/sal/qa/osl/file/osl_File_Const.h index 05bb1d275b9b..cd39fb4e0202 100644 --- a/sal/qa/osl/file/osl_File_Const.h +++ b/sal/qa/osl/file/osl_File_Const.h @@ -82,7 +82,7 @@ const sal_Char pBuffer_Blank[] = ""; # define PATH_SEPARATOR "/" #endif -#if (defined WNT ) // Windows +#if defined(_WIN32) // Windows # include <tchar.h> # include <io.h> # include <stdio.h> diff --git a/sal/qa/osl/getsystempathfromfileurl/test-getsystempathfromfileurl.cxx b/sal/qa/osl/getsystempathfromfileurl/test-getsystempathfromfileurl.cxx index 6c16a3e5bd48..5d8d24962e0a 100644 --- a/sal/qa/osl/getsystempathfromfileurl/test-getsystempathfromfileurl.cxx +++ b/sal/qa/osl/getsystempathfromfileurl/test-getsystempathfromfileurl.cxx @@ -26,7 +26,7 @@ #include <osl/file.hxx> -#if defined WNT +#if defined(_WIN32) #define MY_PATH_IN "/c:/foo/bar" #define MY_PATH_OUT "c:\\foo\\bar" #define MY_PATH_OUT_CONT MY_PATH_OUT "\\" @@ -91,7 +91,7 @@ void Test::testBadScheme() { } void Test::testNoScheme() { -#if !defined WNT //TODO +#if !defined(_WIN32) //TODO OUString p; auto e = osl::FileBase::getSystemPathFromFileURL("//" MY_PATH_IN, p); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, e); @@ -134,7 +134,7 @@ void Test::testLocalhost3Authority() { } void Test::testNoAuthority() { -#if !defined WNT //TODO +#if !defined(_WIN32) //TODO OUString p; auto e = osl::FileBase::getSystemPathFromFileURL("file:" MY_PATH_IN, p); CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, e); diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx index 571523e55e9b..e51a80904b8d 100644 --- a/sal/qa/osl/module/osl_Module.cxx +++ b/sal/qa/osl/module/osl_Module.cxx @@ -31,7 +31,7 @@ using ::rtl::OString; */ inline ::rtl::OUString getDllURL() { -#if ( defined WNT ) // lib in Unix and lib in Windows are not same in file name. +#if defined(_WIN32) // lib in Unix and lib in Windows are not same in file name. ::rtl::OUString libPath( "test_Module_DLL.dll" ); #else ::rtl::OUString libPath( "libtest_Module_DLL.so" ); diff --git a/sal/qa/osl/module/osl_Module_Const.h b/sal/qa/osl/module/osl_Module_Const.h index 40b33218d047..3434d439f2a3 100644 --- a/sal/qa/osl/module/osl_Module_Const.h +++ b/sal/qa/osl/module/osl_Module_Const.h @@ -29,10 +29,9 @@ #include <cppunit/extensions/HelperMacros.h> #include <cppunit/plugin/TestPlugIn.h> -#if ( defined UNX ) //Unix +#if defined(UNX) // Unix # include <unistd.h> -#endif -#if ( defined WNT ) // Windows +#elif defined(_WIN32) // Windows # include <io.h> #endif diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx index 29687f8c938b..245c5baca750 100644 --- a/sal/qa/osl/process/osl_Thread.cxx +++ b/sal/qa/osl/process/osl_Thread.cxx @@ -18,7 +18,7 @@ */ #include <algorithm> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #else #include <unistd.h> @@ -181,7 +181,7 @@ namespace ThreadHelper { void thread_sleep_tenth_sec(sal_Int32 _nTenthSec) { -#ifdef WNT +#ifdef _WIN32 Sleep(_nTenthSec * 100 ); #else TimeValue nTV; @@ -421,7 +421,7 @@ namespace osl_Thread // Note: on UNX, after createSuspended, and then terminate the thread, it performs well; // while on Windows, after createSuspended, the thread can not terminate, wait endlessly, // so here call resume at first, then call terminate. -#ifdef WNT +#ifdef _WIN32 t_print("resumeAndWaitThread\n"); _pThread->resume(); ThreadHelper::thread_sleep_tenth_sec(1); @@ -436,7 +436,7 @@ namespace osl_Thread _pThread->terminate(); // LLA: Windows feature???, a suspended thread can not terminated, so we have to weak it up -#ifdef WNT +#ifdef _WIN32 _pThread->resume(); ThreadHelper::thread_sleep_tenth_sec(1); #endif @@ -1154,7 +1154,7 @@ namespace osl_Thread t_print("nValue in AboveNormal Prio Thread is %d\n", (int) nValueAboveNormal); t_print("nValue in Normal Prio Thread is %d\n", (int) nValueNormal); -#ifndef WNT +#ifndef _WIN32 CPPUNIT_ASSERT_MESSAGE( "SetPriority", nValueHighest > 0 && @@ -1237,7 +1237,7 @@ namespace osl_Thread delete pBelowNormalThread; delete pLowestThread; -#ifndef WNT +#ifndef _WIN32 CPPUNIT_ASSERT_MESSAGE( "SetPriority", nValueHighest > 0 && @@ -1321,7 +1321,7 @@ namespace osl_Thread delete pBelowNormalThread; delete pLowestThread; -#ifndef WNT +#ifndef _WIN32 CPPUNIT_ASSERT_MESSAGE( "SetPriority", /* nValueHighest > 0 && */ @@ -1401,7 +1401,7 @@ namespace osl_Thread delete pBelowNormalThread; delete pLowestThread; -#ifndef WNT +#ifndef _WIN32 CPPUNIT_ASSERT_MESSAGE( "SetPriority", /* nValueHighest > 0 && */ @@ -1454,7 +1454,7 @@ namespace osl_Thread ThreadHelper::outputPriority(aPriority); // LLA: Priority settings may not work within some OS versions. -#if ( defined WNT ) || ( defined SOLARIS ) +#if defined(_WIN32) || defined(SOLARIS) CPPUNIT_ASSERT_MESSAGE( "getPriority", aPriority == osl_Thread_PriorityHighest @@ -1683,7 +1683,7 @@ namespace osl_Thread t_print("later value = %d\n", (int) nLaterValue); //On windows, suspend works, so the values are same -#ifdef WNT +#ifdef _WIN32 CPPUNIT_ASSERT_MESSAGE( "Schedule: don't schedule in thread run method, suspend works.", nLaterValue == nValue diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index 59bd74f44073..280e87302ac0 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -43,7 +43,7 @@ #define RUNNING_ON_VALGRIND false #endif -#if ( defined WNT ) // Windows +#if defined(_WIN32) // Windows # include <windows.h> # include <tchar.h> #else @@ -66,7 +66,7 @@ # endif #endif -#if defined(WNT) +#if defined(_WIN32) const rtl::OUString EXECUTABLE_NAME ("osl_process_child.exe"); #else const rtl::OUString EXECUTABLE_NAME ("osl_process_child"); @@ -154,7 +154,7 @@ namespace } } -#ifdef WNT +#ifdef _WIN32 void read_parent_environment(string_container_t* env_container) { LPTSTR env = reinterpret_cast<LPTSTR>(GetEnvironmentStrings()); @@ -435,7 +435,7 @@ public: void osl_execProc_test_batch() { oslProcess process; -#if defined(WNT) +#if defined(_WIN32) rtl::OUString suBatch = suCWD + "/batch.bat"; #else rtl::OUString suBatch = suCWD + "/batch.sh"; @@ -470,7 +470,7 @@ public: CPPUNIT_TEST_SUITE(Test_osl_executeProcess); //TODO: Repair these (at least under Windows) -#if !defined(WNT) +#if !defined(_WIN32) CPPUNIT_TEST(osl_execProc_parent_equals_child_environment); CPPUNIT_TEST(osl_execProc_merged_child_environment); #endif diff --git a/sal/qa/osl/process/osl_process_child.cxx b/sal/qa/osl/process/osl_process_child.cxx index f709de940c51..22ab319873a3 100644 --- a/sal/qa/osl/process/osl_process_child.cxx +++ b/sal/qa/osl/process/osl_process_child.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if ( defined WNT ) // Windows +#if defined(_WIN32) // Windows # define UNICODE # define _UNICODE # define WIN32_LEAN_AND_MEAN @@ -42,7 +42,7 @@ # endif #endif -#ifdef WNT +#ifdef _WIN32 # define SLEEP(t) (Sleep((t)*1000)) #else # define SLEEP(t) (sleep((t))) @@ -53,7 +53,7 @@ void wait_for_seconds(char* time) SLEEP(atoi(time)); } -#ifdef WNT +#ifdef _WIN32 void w_to_a(LPCTSTR _strW, LPSTR strA, DWORD size) { diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index 693137fd9ab9..33c093b8d7ea 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -18,7 +18,7 @@ */ #include <algorithm> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #undef min #endif @@ -152,7 +152,7 @@ namespace osl_Security void getUserName_001( ) { ::osl::Security aSec; -#ifdef WNT +#ifdef _WIN32 ::rtl::OUString strName( strUserName ), strGetName; #else ::rtl::OUString strName( strUserName ), strGetName; @@ -350,7 +350,7 @@ void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *, isAdmin = true; #endif -#if defined ( WNT ) +#if defined(_WIN32) /// some initialization work for Windows OS /// Get the user name, computer name, user home directory. diff --git a/sal/qa/osl/security/osl_Security_Const.h b/sal/qa/osl/security/osl_Security_Const.h index 1dfa2422e7cb..84619f0964b2 100644 --- a/sal/qa/osl/security/osl_Security_Const.h +++ b/sal/qa/osl/security/osl_Security_Const.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_SAL_QA_OSL_SECURITY_OSL_SECURITY_CONST_H #define INCLUDED_SAL_QA_OSL_SECURITY_OSL_SECURITY_CONST_H -#if ( defined WNT ) // Windows +#if defined(_WIN32) // Windows #include <io.h> #endif diff --git a/sal/qa/osl/setthreadname/test-setthreadname.cxx b/sal/qa/osl/setthreadname/test-setthreadname.cxx index 02e6eb76855a..be0b030d61dc 100644 --- a/sal/qa/osl/setthreadname/test-setthreadname.cxx +++ b/sal/qa/osl/setthreadname/test-setthreadname.cxx @@ -37,7 +37,7 @@ private: }; void TestThread::run() { -#if defined WNT +#if defined(_WIN32) if (std::getenv("URE_TEST_SETTHREADNAME") != 0) { // On Windows, setting thread names appears to only take effect when the // process is being debugged, so attach a debugger now: diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx index 9d6d91758e55..15bf66f98f94 100644 --- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx +++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx @@ -31,7 +31,7 @@ #include <cppunit/extensions/HelperMacros.h> #include <cppunit/plugin/TestPlugIn.h> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #else #include <unistd.h> @@ -62,7 +62,7 @@ namespace ThreadHelper // printf("wait %d tenth seconds. ", _nTenthSec ); // fflush(stdout); // } -#ifdef WNT //Windows +#ifdef _WIN32 //Windows Sleep(_nTenthSec * 100 ); #endif #if ( defined UNX ) diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx index d4d7c86b7df5..e77f661db7f0 100644 --- a/sal/qa/rtl/process/rtl_Process.cxx +++ b/sal/qa/rtl/process/rtl_Process.cxx @@ -82,7 +82,7 @@ public: void getAppCommandArg_001() { -#if defined(WNT) +#if defined(_WIN32) const rtl::OUString EXECUTABLE_NAME("child_process.exe"); #else const rtl::OUString EXECUTABLE_NAME("child_process"); @@ -216,7 +216,7 @@ public: //different processes different pids void getGlobalProcessId_002() { -#if defined(WNT) +#if defined(_WIN32) const rtl::OUString EXEC_NAME("child_process_id.exe"); #else const rtl::OUString EXEC_NAME("child_process_id"); diff --git a/sal/qa/rtl/uuid/rtl_Uuid.cxx b/sal/qa/rtl/uuid/rtl_Uuid.cxx index ba20eadec53d..3f661e453e41 100644 --- a/sal/qa/rtl/uuid/rtl_Uuid.cxx +++ b/sal/qa/rtl/uuid/rtl_Uuid.cxx @@ -28,7 +28,7 @@ #include <cppunit/extensions/HelperMacros.h> #include <cppunit/plugin/TestPlugIn.h> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #elif defined UNX #include <unistd.h> diff --git a/sal/workben/t_ojp_exe.cxx b/sal/workben/t_ojp_exe.cxx index 558ff3e722a1..8cd71267cdeb 100644 --- a/sal/workben/t_ojp_exe.cxx +++ b/sal/workben/t_ojp_exe.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifdef WNT +#ifdef _WIN32 # define WIN32_LEAN_AND_MEAN # include <windows.h> #else @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) { printf("osl process test executable started:\n"); -#ifdef WNT +#ifdef _WIN32 Sleep(5000); #else sleep(5); diff --git a/sal/workben/t_osl_getVolInfo.cxx b/sal/workben/t_osl_getVolInfo.cxx index 74e6e87f3ffc..abb1cb5c1758 100644 --- a/sal/workben/t_osl_getVolInfo.cxx +++ b/sal/workben/t_osl_getVolInfo.cxx @@ -22,7 +22,7 @@ #include <osl/file.h> #include <rtl/ustring.hxx> -#ifdef WNT +#ifdef _WIN32 # define TEST_PATH_1 "c:\\" # define TEST_PATH_2 "c:\\mnt\\MSDN" # define TEST_PATH_3 "c:\\Program Files" diff --git a/sal/workben/t_osl_joinProcess.cxx b/sal/workben/t_osl_joinProcess.cxx index d043c5e343b3..08fd6c543608 100644 --- a/sal/workben/t_osl_joinProcess.cxx +++ b/sal/workben/t_osl_joinProcess.cxx @@ -24,7 +24,7 @@ #include <unistd.h> #include <signal.h> -#ifdef WNT +#ifdef _WIN32 const rtl::OUString IMAGE_NAME("ojpx.exe"); #else const rtl::OUString IMAGE_NAME("ojpx"); diff --git a/sal/workben/testfile.cxx b/sal/workben/testfile.cxx index dd9448bce907..3b3590f3bbce 100644 --- a/sal/workben/testfile.cxx +++ b/sal/workben/testfile.cxx @@ -32,7 +32,7 @@ #include <wchar.h> #endif -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #endif @@ -1248,7 +1248,7 @@ void FileAttributesTest() } #endif -#ifdef WNT +#ifdef _WIN32 void FileAttributesTest() { FileBase::RC rc; @@ -1385,7 +1385,7 @@ void FileTimeTest() // GetCreationTime aCreationTimeRead=rStatus.getCreationTime(); -#ifdef WNT +#ifdef _WIN32 if ( aCreationTime.Seconds == aCreationTimeRead.Seconds && aCreationTime.Nanosec == aCreationTimeRead.Nanosec ) printf( "GetCreationTime: ok : " ); else @@ -2447,7 +2447,7 @@ void print_error( const ::rtl::OString& str, FileBase::RC rc ) // main -#if defined WNT +#if defined(_WIN32) #define MAIN _cdecl main #else #define MAIN main diff --git a/sal/workben/testproc.cxx b/sal/workben/testproc.cxx index 3d2bd79322bf..91d0e60fe5f8 100644 --- a/sal/workben/testproc.cxx +++ b/sal/workben/testproc.cxx @@ -20,7 +20,7 @@ #include <osl/process.h> #include <stdio.h> -#if defined WNT +#if defined(_WIN32) #define MAIN _cdecl main #else #define MAIN main diff --git a/salhelper/source/simplereferenceobject.cxx b/salhelper/source/simplereferenceobject.cxx index 95e8b6f699d9..72e31c429cdc 100644 --- a/salhelper/source/simplereferenceobject.cxx +++ b/salhelper/source/simplereferenceobject.cxx @@ -37,7 +37,7 @@ void * SimpleReferenceObject::operator new(std::size_t nSize) void * SimpleReferenceObject::operator new(std::size_t nSize, std::nothrow_t const &) { -#if defined WNT +#if defined(_WIN32) return ::operator new(nSize); // WNT lacks a global nothrow operator new... #else // WNT @@ -52,7 +52,7 @@ void SimpleReferenceObject::operator delete(void * pPtr) void SimpleReferenceObject::operator delete(void * pPtr, std::nothrow_t const &) { -#if defined WNT +#if defined(_WIN32) ::operator delete(pPtr); // WNT lacks a global nothrow operator delete... #else // WNT ::operator delete(pPtr, std::nothrow); diff --git a/sc/inc/callform.hxx b/sc/inc/callform.hxx index 409c95db46c1..fd85ab1122b2 100644 --- a/sc/inc/callform.hxx +++ b/sc/inc/callform.hxx @@ -28,7 +28,7 @@ #define MAXFUNCPARAM 16 #define MAXARRSIZE 0xfffe -#ifndef WNT +#ifndef _WIN32 #define CALLTYPE #else #define CALLTYPE __cdecl diff --git a/sc/qa/unit/helper/debughelper.hxx b/sc/qa/unit/helper/debughelper.hxx index 0143d6e6908c..4f8dd6633590 100644 --- a/sc/qa/unit/helper/debughelper.hxx +++ b/sc/qa/unit/helper/debughelper.hxx @@ -14,7 +14,7 @@ #include <rtl/ustrbuf.hxx> #include <rtl/ustring.hxx> -#ifdef WNT +#ifdef _WIN32 #if !defined NOMINMAX #define NOMINMAX #endif diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index 0779ad35ca36..d734a2e8d061 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -25,7 +25,7 @@ #include <config_orcus.h> #if ENABLE_ORCUS -#if defined WNT +#if defined(_WIN32) #define __ORCUS_STATIC_LIB #endif #include <orcus/csv_parser.hpp> diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index aab6d3430357..ba14452f7664 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -199,13 +199,13 @@ public: CPPUNIT_TEST(testCeilingFloorXLSX); CPPUNIT_TEST(testCeilingFloorXLS); CPPUNIT_TEST(testCeilingFloorODS); -#if !defined(WNT) +#if !defined(_WIN32) CPPUNIT_TEST(testRelativePaths); #endif CPPUNIT_TEST(testSheetProtection); CPPUNIT_TEST(testPivotTableXLSX); CPPUNIT_TEST(testPivotTableTwoDataFieldsXLSX); -#if !defined(WNT) +#if !defined(_WIN32) CPPUNIT_TEST(testSupBookVirtualPath); #endif CPPUNIT_TEST(testSwappedOutImageExport); diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 91812b2f9dc0..d4a8426c79e7 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -158,7 +158,7 @@ public: void testErrorOnExternalReferences(); //misc tests unrelated to the import filters -#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(WNT) +#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(_WIN32) void testPasswordNew(); void testPasswordOld(); void testPasswordWrongSHA(); @@ -279,7 +279,7 @@ public: //disable testPassword on MacOSX due to problems with libsqlite3 //also crashes on DragonFly due to problems with nss/nspr headers -#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(WNT) +#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(_WIN32) CPPUNIT_TEST(testPasswordWrongSHA); CPPUNIT_TEST(testPasswordOld); CPPUNIT_TEST(testPasswordNew); @@ -312,7 +312,7 @@ public: CPPUNIT_TEST_SUITE_END(); private: -#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(WNT) +#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(_WIN32) void testPassword_Impl(const OUString& rFileNameBase); #endif @@ -1507,7 +1507,7 @@ void ScFiltersTest::testRowIndex1BasedXLSX() xDocSh->DoClose(); } -#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(WNT) +#if !defined(MACOSX) && !defined(DRAGONFLY) && !defined(_WIN32) void ScFiltersTest::testPassword_Impl(const OUString& aFileNameBase) { OUString aFileExtension(getFileFormats()[0].pName, strlen(getFileFormats()[0].pName), RTL_TEXTENCODING_UTF8 ); diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 25317265920c..983ebeb1372c 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -3987,7 +3987,7 @@ bool ScFormulaCell::InterpretFormulaGroup() int nMaxGroupLength = INT_MAX; -#ifdef WNT +#ifdef _WIN32 // Heuristic: Certain old low-end OpenCL implementations don't // work for us with too large group lengths. 1000 was determined // empirically to be a good compromise. Looking at the preferred diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 1d24749aca16..470c31572c0a 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -77,7 +77,7 @@ #include "excform.hxx" #include "documentimport.hxx" -#if defined( WNT ) +#if defined(_WIN32) #include <math.h> #else #include <stdlib.h> diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx index 54b5ac2815c8..c86ca3b68d23 100644 --- a/sc/source/filter/orcus/orcusfiltersimpl.cxx +++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx @@ -27,7 +27,7 @@ #include <com/sun/star/task/XStatusIndicator.hpp> -#ifdef WNT +#ifdef _WIN32 #define SYSTEM_PATH INetURLObject::FSYS_DOS #else #define SYSTEM_PATH INetURLObject::FSYS_UNX diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx index 082fe89a643e..8440c71af158 100644 --- a/sc/source/ui/docshell/datastream.cxx +++ b/sc/source/ui/docshell/datastream.cxx @@ -31,7 +31,7 @@ #if ENABLE_ORCUS -#if defined WNT +#if defined(_WIN32) #define __ORCUS_STATIC_LIB #endif #include <orcus/csv_parser.hpp> diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index e84b73f865f4..acf223bcd00e 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2086,7 +2086,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet, rbFooter = static_cast<const SfxBoolItem&>(pSet->Get(ATTR_PAGE_ON)).GetValue(); } -#if defined WNT +#if defined(_WIN32) bool ScDocShell::DdeGetData( const OUString& rItem, const OUString& rMimeType, css::uno::Any & rValue ) diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 827d12314a31..c1fbcd71c52c 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -360,7 +360,7 @@ public: bool& rbHeader, bool& rbFooter ); -#if defined WNT +#if defined(_WIN32) virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType, css::uno::Any & rValue ) override; virtual bool DdeSetData( const OUString& rItem, const OUString& rMimeType, diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index faebc8feb61d..3bd992734ef6 100644 --- a/sc/source/ui/view/select.cxx +++ b/sc/source/ui/view/select.cxx @@ -32,7 +32,7 @@ #include "markdata.hxx" #include <gridwin.hxx> -#if defined WNT +#if defined(_WIN32) #define SC_SELENG_REFMODE_UPDATE_INTERVAL_MIN 65 #endif @@ -124,7 +124,7 @@ sal_uLong ScViewFunctionSet::CalcUpdateInterval( const Size& rWinSize, const Poi nUpdateInterval = nTmp; } -#ifdef WNT +#ifdef _WIN32 ScTabViewShell* pViewShell = pViewData->GetViewShell(); bool bRefMode = pViewShell && pViewShell->IsRefInputMode(); if (bRefMode && nUpdateInterval < SC_SELENG_REFMODE_UPDATE_INTERVAL_MIN) diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 3fbe6c0578a4..955425101b2e 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -36,7 +36,7 @@ using namespace css; -#if !defined(WNT) && !defined(MACOSX) +#if !defined(_WIN32) && !defined(MACOSX) static const char* DATA_DIRECTORY = "/sd/qa/unit/tiledrendering/data/"; #endif @@ -47,7 +47,7 @@ public: virtual void setUp() override; virtual void tearDown() override; -#if !defined(WNT) && !defined(MACOSX) +#if !defined(_WIN32) && !defined(MACOSX) void testInsertPage(); void testRegisterCallback(); void testPostKeyEvent(); @@ -64,7 +64,7 @@ public: #endif CPPUNIT_TEST_SUITE(SdTiledRenderingTest); -#if !defined(WNT) && !defined(MACOSX) +#if !defined(_WIN32) && !defined(MACOSX) CPPUNIT_TEST(testInsertPage); CPPUNIT_TEST(testRegisterCallback); CPPUNIT_TEST(testPostKeyEvent); @@ -82,14 +82,14 @@ public: CPPUNIT_TEST_SUITE_END(); private: -#if !defined(WNT) && !defined(MACOSX) +#if !defined(_WIN32) && !defined(MACOSX) SdXImpressDocument* createDoc(const char* pName); static void callback(int nType, const char* pPayload, void* pData); void callbackImpl(int nType, const char* pPayload); #endif uno::Reference<lang::XComponent> mxComponent; -#if !defined(WNT) && !defined(MACOSX) +#if !defined(_WIN32) && !defined(MACOSX) Rectangle m_aInvalidation; std::vector<Rectangle> m_aSelection; bool m_bFound; @@ -103,7 +103,7 @@ private: }; SdTiledRenderingTest::SdTiledRenderingTest() -#if !defined(WNT) && !defined(MACOSX) +#if !defined(_WIN32) && !defined(MACOSX) : m_bFound(true), m_nPart(0), m_nSelectionBeforeSearchResult(0), @@ -127,7 +127,7 @@ void SdTiledRenderingTest::tearDown() test::BootstrapFixture::tearDown(); } -#if !defined(WNT) && !defined(MACOSX) +#if !defined(_WIN32) && !defined(MACOSX) SdXImpressDocument* SdTiledRenderingTest::createDoc(const char* pName) { if (mxComponent.is()) diff --git a/sd/source/helper/simplereferencecomponent.cxx b/sd/source/helper/simplereferencecomponent.cxx index 4cf2ffcab08b..57c792ea5b0c 100644 --- a/sd/source/helper/simplereferencecomponent.cxx +++ b/sd/source/helper/simplereferencecomponent.cxx @@ -88,12 +88,12 @@ void * SimpleReferenceComponent::operator new(std::size_t nSize) void * SimpleReferenceComponent::operator new(std::size_t nSize, std::nothrow_t const & -#ifndef WNT +#ifndef _WIN32 rNothrow #endif ) { -#if defined WNT +#if defined(_WIN32) return ::operator new(nSize); // WNT lacks a global nothrow operator new... #else // WNT @@ -108,12 +108,12 @@ void SimpleReferenceComponent::operator delete(void * pPtr) void SimpleReferenceComponent::operator delete(void * pPtr, std::nothrow_t const & -#ifndef WNT +#ifndef _WIN32 rNothrow #endif ) { -#if defined WNT +#if defined(_WIN32) ::operator delete(pPtr); // WNT lacks a global nothrow operator delete... #else // WNT ::operator delete(pPtr, rNothrow); diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 1f3cb27c719b..9f1e6bb13bf9 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -274,7 +274,7 @@ struct lcl_EqualsSoundFileName : public ::std::unary_function< OUString, bool > { // note: formerly this was a case insensitive search for all // platforms. It seems more sensible to do this platform-dependent -#if defined( WNT ) +#if defined(_WIN32) return maStr.equalsIgnoreAsciiCase( rStr ); #else return maStr == rStr; diff --git a/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx b/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx index d628396df347..1c40a13d6454 100644 --- a/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx +++ b/sd/source/ui/remotecontrol/BufferedStreamSocket.cxx @@ -58,7 +58,7 @@ sal_Int32 BufferedStreamSocket::write( const void* pBuffer, sal_uInt32 n ) else return ::send( mSocket, -#if defined WNT +#if defined(_WIN32) static_cast<char const *>(pBuffer), #else pBuffer, diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx index b545d8debc71..2ad0062bbcd9 100644 --- a/sd/source/ui/remotecontrol/DiscoveryService.cxx +++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx @@ -63,7 +63,7 @@ DiscoveryService::~DiscoveryService() { if (mSocket != -1) { -#ifdef WNT +#ifdef _WIN32 closesocket( mSocket ); #else close( mSocket ); @@ -137,7 +137,7 @@ void DiscoveryService::setupSockets() multicastRequest.imr_interface.s_addr = htonl(INADDR_ANY); rc = setsockopt( mSocket, IPPROTO_IP, IP_ADD_MEMBERSHIP, - #ifdef WNT + #ifdef _WIN32 (const char*) #endif &multicastRequest, sizeof(multicastRequest)); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index a4d336644a76..3ebd45fb3123 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1490,7 +1490,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem(SID_HIDE_LAST_LEVEL); } -#if defined WNT || defined UNX +#if defined(_WIN32) || defined UNX if( !mxScannerManager.is() ) { rSet.DisableItem( SID_TWAIN_SELECT ); diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index ea44e1b008ca..20e762cbc4ed 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -47,7 +47,7 @@ #pragma warning(pop) #endif -#ifdef WNT +#ifdef _WIN32 # define snprintf _snprintf #if defined __GNUC__ diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx index adb9b06348b1..7d4806cb778d 100644 --- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx @@ -18,7 +18,7 @@ */ #include "pdfioutdev_gpl.hxx" -#ifdef WNT +#ifdef _WIN32 # include <io.h> # include <fcntl.h> /*_O_BINARY*/ #endif @@ -107,7 +107,7 @@ int main(int argc, char **argv) if( outputFile[0] != '\001' ) g_binary_out = fopen(outputFile,"wb"); -#ifdef WNT +#ifdef _WIN32 // Win actually modifies output for O_TEXT file mode, so need to // revert to binary here _setmode( _fileno( g_binary_out ), _O_BINARY ); 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; diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx index 9aea14ea2419..07729f0afa05 100644 --- a/shell/source/backends/localebe/localebackend.cxx +++ b/shell/source/backends/localebe/localebackend.cxx @@ -25,7 +25,7 @@ #include <stdio.h> -#ifdef WNT +#ifdef _WIN32 #if defined _MSC_VER #pragma warning(push, 1) #endif @@ -222,7 +222,7 @@ LocaleBackend* LocaleBackend::createInstance() OUString LocaleBackend::getLocale() { -#if defined WNT +#if defined(_WIN32) return ImplGetLocale( GetUserDefaultLCID() ); #elif defined (MACOSX) return ImplGetLocale("AppleLocale"); @@ -234,7 +234,7 @@ OUString LocaleBackend::getLocale() OUString LocaleBackend::getUILocale() { -#if defined WNT +#if defined(_WIN32) return ImplGetLocale( MAKELCID(GetUserDefaultUILanguage(), SORT_DEFAULT) ); #elif defined(MACOSX) return ImplGetLocale("AppleLanguages"); @@ -247,7 +247,7 @@ OUString LocaleBackend::getUILocale() OUString LocaleBackend::getSystemLocale() { // note: the implementation differs from getLocale() only on Windows -#if defined WNT +#if defined(_WIN32) return ImplGetLocale( GetSystemDefaultLCID() ); #else return getLocale(); diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index 395a283e29e9..75af049601a4 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -22,7 +22,7 @@ #endif -#ifdef WNT +#ifdef _WIN32 #include <prewin.h> #include <postwin.h> #else @@ -54,7 +54,7 @@ typedef unsigned short WORD; #include <algorithm> #include <string> -#ifndef WNT +#ifndef _WIN32 #include <cstring> #endif @@ -438,7 +438,7 @@ void start_language_section( ( subLangID == SUBLANG_SPANISH ) ) subLangID = SUBLANG_NEUTRAL; -#ifdef WNT +#ifdef _WIN32 _itoa(primLangID, buff, 16); #else sprintf(buff, "%x", primLangID); @@ -447,7 +447,7 @@ void start_language_section( lang_section += std::string(" , "); -#ifdef WNT +#ifdef _WIN32 _itoa(subLangID, buff, 16); #else sprintf(buff, "%x", subLangID); diff --git a/solenv/bin/modules/installer/control.pm b/solenv/bin/modules/installer/control.pm index 16d398b1a2ef..6d95e0671a17 100644 --- a/solenv/bin/modules/installer/control.pm +++ b/solenv/bin/modules/installer/control.pm @@ -462,7 +462,7 @@ sub check_oxtfiles { if (( $onefile->{'Name'} =~ /\.oxt\s*$/ ) && ( $onefile->{'Dir'} eq $installer::globals::extensioninstalldir )) { - installer::exiter::exit_program("There is currently only for Linux (RPM) and Windows a reliable mechanism to register extensions during installation.\nPlease remove file \"$onefile->{'gid'}\" from your installation set!\nYou can use \"\#ifdef WNT\" and \"\#ifdef LINUX\" in scp.", "check_oxtfiles"); + installer::exiter::exit_program("There is currently only for Linux (RPM) and Windows a reliable mechanism to register extensions during installation.\nPlease remove file \"$onefile->{'gid'}\" from your installation set!\nYou can use \"\#ifdef _WIN32\" and \"\#ifdef LINUX\" in scp.", "check_oxtfiles"); } } } diff --git a/soltools/cpp/_unix.c b/soltools/cpp/_unix.c index d68eed402074..1010e3084eb6 100644 --- a/soltools/cpp/_unix.c +++ b/soltools/cpp/_unix.c @@ -31,7 +31,7 @@ #include "cpp.h" -#if defined MACOSX || defined AIX || defined WNT +#if defined(MACOSX) || defined(AIX) || defined(_WIN32) #include <_getopt.h> #else #include <getopt.h> @@ -55,7 +55,7 @@ void Tokenrow tr; setup_kwtab(); -#if defined MACOSX || defined(AIX) || defined WNT +#if defined(MACOSX) || defined(AIX) || defined(_WIN32) while ((c = stgetopt(argc, argv, "NOPV:I:D:U:F:A:X:u:l:+")) != -1) #else while ((c = getopt(argc, argv, "NOPV:I:D:U:F:A:X:u:l:+")) != -1) diff --git a/soltools/mkdepend/collectdircontent.cxx b/soltools/mkdepend/collectdircontent.cxx index c061e691c254..0041857ee879 100644 --- a/soltools/mkdepend/collectdircontent.cxx +++ b/soltools/mkdepend/collectdircontent.cxx @@ -18,7 +18,7 @@ PathFilePair IncludesCollection::split_path(const string& filePath) { void IncludesCollection::add_to_collection(const string& dirPath) { DirContent dirContent; -#if defined( WNT ) +#if defined(_WIN32) WIN32_FIND_DATA FindFileData; HANDLE hFind; hFind = FindFirstFile((dirPath + "\\*").c_str(), &FindFileData); @@ -50,7 +50,7 @@ void IncludesCollection::add_to_collection(const string& dirPath) { } bool IncludesCollection::exists(string filePath) { -#if defined( WNT ) +#if defined(_WIN32) transform(filePath.begin(), filePath.end(), filePath.begin(), ::tolower); #endif // defined( WNT ) PathFilePair dirFile = split_path(filePath); diff --git a/soltools/mkdepend/collectdircontent.hxx b/soltools/mkdepend/collectdircontent.hxx index 5eab3974771d..09a0ed518d1c 100644 --- a/soltools/mkdepend/collectdircontent.hxx +++ b/soltools/mkdepend/collectdircontent.hxx @@ -8,7 +8,7 @@ #include <map> #include <string> -#if defined( WNT ) +#if defined(_WIN32) #include <windows.h> #include <algorithm> #else diff --git a/soltools/mkdepend/main.c b/soltools/mkdepend/main.c index 8b514287e3b0..85d43bc1327e 100644 --- a/soltools/mkdepend/main.c +++ b/soltools/mkdepend/main.c @@ -695,7 +695,7 @@ void warning1(char *msg, ...) void convert_slashes(char *path) { -#if defined (WNT) +#if defined (_WIN32) /* * Convert backslashes to slashes */ diff --git a/sot/inc/sysformats.hxx b/sot/inc/sysformats.hxx index ccad25210050..b54dfd95cf82 100644 --- a/sot/inc/sysformats.hxx +++ b/sot/inc/sysformats.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SOT_SYSFORMATS_HXX #define INCLUDED_SOT_SYSFORMATS_HXX -#ifdef WNT +#ifdef _WIN32 #ifdef _MSC_VER #pragma warning(push, 1) #pragma warning(disable: 4917) diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx index 07182bd70696..2b3389a202a0 100644 --- a/sot/source/base/formats.cxx +++ b/sot/source/base/formats.cxx @@ -1365,7 +1365,7 @@ static bool CheckTransferableContext_Impl( const Reference< XTransferable >* pxT SotExchange::GetFormatDataFlavor( SotClipboardFormatId::FILEGRPDESCRIPTOR, aFlavor ) && (*pxTransferable)->isDataFlavorSupported( aFlavor ) ) { -#ifdef WNT +#ifdef _WIN32 switch( rEntry.nContextCheckId ) { case FILEGRPDSC_ONLY_URL: diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index d952852afdc2..c595c17a4588 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -27,7 +27,7 @@ #include <typelib/typedescription.hxx> #include <uno/data.h> -#ifdef WNT +#ifdef _WIN32 #include <cmath> #else #include <math.h> diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index e10221132dcf..53d05cba1598 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef WNT +#ifdef _WIN32 # undef ERROR #endif diff --git a/svl/qa/unit/test_URIHelper.cxx b/svl/qa/unit/test_URIHelper.cxx index 50b239943594..1a8e029519ef 100644 --- a/svl/qa/unit/test_URIHelper.cxx +++ b/svl/qa/unit/test_URIHelper.cxx @@ -256,7 +256,7 @@ void Test::testNormalizedMakeRelative() { "nonex3/nonex4#fragmentB" }, { "file:///usr/nonex1/nonex2", "file:///usr/nonex3", "../nonex3" }, { "file:///c:/windows/nonex1", "file:///c:/nonex2", "../nonex2" }, -#if defined WNT +#if defined(_WIN32) { "file:///c:/nonex1/nonex2", "file:///C:/nonex1/nonex3/nonex4", "nonex3/nonex4" } #endif diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx index 4d1990cce6d2..92cbd67d3992 100644 --- a/svl/source/config/languageoptions.cxx +++ b/svl/source/config/languageoptions.cxx @@ -28,7 +28,7 @@ #include <com/sun/star/i18n/ScriptType.hpp> #include <unotools/syslocale.hxx> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #endif @@ -224,7 +224,7 @@ LanguageType SvtSystemLanguageOptions::GetWin16SystemLanguage() const bool SvtSystemLanguageOptions::isKeyboardLayoutTypeInstalled(sal_Int16 scriptType) const { bool isInstalled = false; -#ifdef WNT +#ifdef _WIN32 int nLayouts = GetKeyboardLayoutList(0, NULL); if (nLayouts > 0) { diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx index 9b338b82d82d..ce0773391ba8 100644 --- a/svl/source/svdde/ddedata.cxx +++ b/svl/source/svdde/ddedata.cxx @@ -125,7 +125,7 @@ sal_uLong DdeData::GetExternalFormat(SotClipboardFormatId nFmt) return CF_METAFILEPICT; default: { -#if defined(WNT) +#if defined(_WIN32) OUString aName( SotExchange::GetFormatName( nFmt ) ); if( !aName.isEmpty() ) return RegisterClipboardFormat( reinterpret_cast<LPCWSTR>(aName.getStr()) ); @@ -146,7 +146,7 @@ SotClipboardFormatId DdeData::GetInternalFormat(sal_uLong nFmt) case CF_METAFILEPICT: return SotClipboardFormatId::GDIMETAFILE; default: -#if defined(WNT) +#if defined(_WIN32) if( nFmt >= CF_MAX ) { TCHAR szName[ 256 ]; diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index f86a8f17933e..ad7162407709 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -494,7 +494,7 @@ OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseUR INetURLObject aObj( aBaseURL ); // HRO: I suppose this hack should only be done for Windows !!!??? -#ifdef WNT +#ifdef _WIN32 // HRO: INetURLObject::smatRel2Abs does not recognize '\\' as a relative path // but in case of "\\\\" INetURLObject is right - this is an absolute path ! @@ -1184,7 +1184,7 @@ OUString SvtURLBox::GetURL() return *j; } -#ifdef WNT +#ifdef _WIN32 // erase trailing spaces on Windows since thay are invalid on this OS and // most of the time they are inserted by accident via copy / paste aText = comphelper::string::stripEnd(aText, ' '); diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 877c7eadaa0b..6033a74f03db 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -172,7 +172,7 @@ void SvObjectServerList::FillInsertObjects() } -#ifdef WNT +#ifdef _WIN32 SvGlobalName aOleFact( SO3_OUT_CLASSID ); OUString aOleObj( SVT_RESSTR( STR_FURTHER_OBJECT ) ); aObjectServerList.push_back( SvObjectServer( aOleFact, aOleObj ) ); diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 58ce528e57db..07b02bbb9ef8 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -89,7 +89,7 @@ static SvtExtensionResIdMapping_Impl const ExtensionMap_Impl[] = { "jpeg", true, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG }, { "jpg", true, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG }, { "lha", true, STR_DESCRIPTION_ARCHIVFILE, 0 }, -#ifdef WNT +#ifdef _WIN32 { "lnk", false, 0, 0 }, #endif { "log", true, STR_DESCRIPTION_LOGFILE, 0 }, diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 72e4b52554ac..dc79ac671c7b 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifdef WNT +#ifdef _WIN32 #include <prewin.h> #include <postwin.h> #include <shlobj.h> @@ -807,7 +807,7 @@ bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk, } break; -#ifdef WNT +#ifdef _WIN32 case SotClipboardFormatId::FILEGRPDESCRIPTOR: { Sequence< sal_Int8 > aSeq( sizeof( FILEGROUPDESCRIPTOR ) ); @@ -1879,7 +1879,7 @@ bool TransferableDataHelper::GetINetBookmark( const css::datatransfer::DataFlavo } break; -#ifdef WNT +#ifdef _WIN32 case SotClipboardFormatId::FILEGRPDESCRIPTOR: { Sequence<sal_Int8> aSeq = GetSequence(rFlavor, OUString()); diff --git a/svtools/source/uno/fpicker.cxx b/svtools/source/uno/fpicker.cxx index aa650f5675f4..cab3e3a95db1 100644 --- a/svtools/source/uno/fpicker.cxx +++ b/svtools/source/uno/fpicker.cxx @@ -50,7 +50,7 @@ static OUString FilePicker_getSystemPickerServiceName() else return OUString ("com.sun.star.ui.dialogs.SystemFilePicker"); #endif -#ifdef WNT +#ifdef _WIN32 return OUString ("com.sun.star.ui.dialogs.Win32FilePicker"); #endif } diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx index b906f3090620..af1e100458e2 100644 --- a/svx/inc/pch/precompiled_svx.hxx +++ b/svx/inc/pch/precompiled_svx.hxx @@ -20,7 +20,7 @@ ./bin/update_pch_bisect ./svx/inc/pch/precompiled_svx.hxx "/opt/lo/bin/make svx.build" --find-conflicts */ -#ifdef WNT +#ifdef _WIN32 #define UNICODE #define _UNICODE #endif diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index f34bbe8ff16a..869c0d5b26ff 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -204,7 +204,7 @@ E3dScene::E3dScene(E3dDefaultAttributes& rDefault) void E3dScene::SetDefaultAttributes(E3dDefaultAttributes& /*rDefault*/) { // For WIN95/NT turn off the FP-Exceptions -#if defined(WNT) +#if defined(_WIN32) _control87( _MCW_EM, _MCW_EM ); #endif diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx index aae699446c5c..f8b5385203a8 100644 --- a/svx/source/gengal/gengal.cxx +++ b/svx/source/gengal/gengal.cxx @@ -173,7 +173,7 @@ void GalApp::Init() if( !mbInBuildTree && getenv( "OOO_INSTALL_PREFIX" ) == nullptr ) { OUString fileName = GetAppFileName(); int lastSlash = fileName.lastIndexOf( '/' ); -#ifdef WNT +#ifdef _WIN32 // Don't know which directory separators GetAppFileName() returns on Windows. // Be safe and take into consideration they might be backslashes. if( fileName.lastIndexOf( '\\' ) > lastSlash ) diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx index 4f571d33e9b1..235c0a62ec73 100644 --- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx @@ -50,7 +50,7 @@ namespace drawinglayer bScaleContent = pSource->IsEmptyPresObj(); } } -#ifdef WNT // Little point in displaying the "broken OLE" graphic on OSes that don't have real OLE, maybe? +#ifdef _WIN32 // Little point in displaying the "broken OLE" graphic on OSes that don't have real OLE, maybe? if(GRAPHIC_NONE == aGraphic.GetType()) { // no source, use fallback resource empty OLE graphic diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 05b629a8fd8b..2c694390ecd8 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -926,7 +926,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS bNoStretching = (aSize1 == aSize2); -#ifdef WNT +#ifdef _WIN32 // Windows zooms the font proportionally when using Size(100,500), // we don't like that. if(aSize2.Height() >= aSize1.Height() * 2) diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx index 4c9ffc8e937b..7f436f9fd2df 100644 --- a/svx/source/unodraw/recoveryui.cxx +++ b/svx/source/unodraw/recoveryui.cxx @@ -179,7 +179,7 @@ css::uno::Any SAL_CALL RecoveryUI::dispatchWithReturnValue(const css::util::URL& static OUString GetCrashConfigDir() { -#if defined(WNT) +#if defined(_WIN32) OUString ustrValue = "${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/bootstrap.ini:UserInstallation}"; #elif defined(MACOSX) OUString ustrValue = "~"; @@ -188,14 +188,14 @@ static OUString GetCrashConfigDir() #endif rtl::Bootstrap::expandMacros( ustrValue ); -#if defined(WNT) +#if defined(_WIN32) ustrValue += "/user/crashdata"; #endif return ustrValue; } -#if defined(WNT) +#if defined(_WIN32) #define LCKFILE "crashdat.lck" #else #define LCKFILE ".crash_report_unsent" diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx index f164fcf09841..53caa2568c3b 100644 --- a/sw/inc/docsh.hxx +++ b/sw/inc/docsh.hxx @@ -229,7 +229,7 @@ public: Reader* StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, SwCursorShell* pCursorSh = nullptr, SwPaM* pPaM = nullptr); -#if defined WNT +#if defined(_WIN32) virtual bool DdeGetData( const OUString& rItem, const OUString& rMimeType, css::uno::Any & rValue ) override; virtual bool DdeSetData( const OUString& rItem, const OUString& rMimeType, diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 2086779ff9fa..5fd4efe99fca 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -411,7 +411,7 @@ public: inline SwEditWin &GetEditWin() { return *m_pEditWin; } inline const SwEditWin &GetEditWin () const { return *m_pEditWin; } -#if defined WNT || defined UNX +#if defined(_WIN32) || defined UNX void ScannerEventHdl( const css::lang::EventObject& rEventObject ); #endif diff --git a/sw/qa/core/layout-test.cxx b/sw/qa/core/layout-test.cxx index db04d518976e..2b2e3dcd32e4 100644 --- a/sw/qa/core/layout-test.cxx +++ b/sw/qa/core/layout-test.cxx @@ -43,7 +43,7 @@ public: void test(); CPPUNIT_TEST_SUITE(SwLayoutTest); -#if !defined(MACOSX) && !defined(WNT) +#if !defined(MACOSX) && !defined(_WIN32) CPPUNIT_TEST(test); #endif CPPUNIT_TEST_SUITE_END(); diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index 6787d4f707bc..8d408c3ba68b 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -75,7 +75,7 @@ public: virtual void tearDown() override; //void testStarBasic(); -#if !defined MACOSX && !defined WNT +#if !defined(MACOSX) && !defined(_WIN32) void testVba(); #endif void testBookmarkDeleteAndJoin(); @@ -87,7 +87,7 @@ public: void testFdo68983(); void testFindReplace(); CPPUNIT_TEST_SUITE(SwMacrosTest); -#if !defined(MACOSX) && !defined(WNT) +#if !defined(MACOSX) && !defined(_WIN32) //enable this test if you want to play with star basic macros in unit tests //works but does nothing useful yet //CPPUNIT_TEST(testStarBasic); @@ -147,7 +147,7 @@ void SwMacrosTest::testStarBasic() #endif -#if !defined MACOSX && !defined WNT +#if !defined(MACOSX) && !defined(_WIN32) void SwMacrosTest::testVba() { TestMacroInfo testInfo[] = { diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index c68ddf7b8a4f..54f2c1518ae8 100644 --- a/sw/qa/extras/globalfilter/globalfilter.cxx +++ b/sw/qa/extras/globalfilter/globalfilter.cxx @@ -34,7 +34,7 @@ public: void testCharHighlightBody(); void testMSCharBackgroundEditing(); void testCharBackgroundToHighlighting(); -#if !defined(WNT) +#if !defined(_WIN32) void testSkipImages(); #endif @@ -47,7 +47,7 @@ public: CPPUNIT_TEST(testCharHighlightODF); CPPUNIT_TEST(testMSCharBackgroundEditing); CPPUNIT_TEST(testCharBackgroundToHighlighting); -#if !defined(WNT) +#if !defined(_WIN32) CPPUNIT_TEST(testSkipImages); #endif CPPUNIT_TEST_SUITE_END(); @@ -739,7 +739,7 @@ void Test::testCharBackgroundToHighlighting() } } -#if !defined(WNT) +#if !defined(_WIN32) void Test::testSkipImages() { // Check how LO skips image loading (but not texts of textboxes and custom shapes) diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index c26a45d6d81f..2feab11a6dbc 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -498,7 +498,7 @@ DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt") CPPUNIT_ASSERT(!pContentNode->FindTableNode()); } } -#if !defined(WNT) +#if !defined(_WIN32) DECLARE_ODFIMPORT_TEST(testFdo37606Copy, "fdo37606.odt") { SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx index f3cb5bc55df8..dd41313e25ea 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx @@ -94,7 +94,7 @@ protected: } }; -#if !defined(WNT) +#if !defined(_WIN32) DECLARE_OOXMLEXPORT_TEST(testPageGraphicBackground, "page-graphic-background.odt") { diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx index db771bd782c9..71518c34b82e 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx @@ -73,7 +73,7 @@ protected: } }; -#if !defined(WNT) +#if !defined(_WIN32) DECLARE_OOXMLEXPORT_TEST(testFdo68418, "fdo68418.docx") { diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index c01a4e3c4d64..df6f945e747a 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -9,7 +9,7 @@ #include <swmodeltestbase.hxx> -#if !defined(WNT) +#if !defined(_WIN32) #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index 6463c8096184..cd91d59c836b 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -9,7 +9,7 @@ #include <swmodeltestbase.hxx> -#if !defined(WNT) +#if !defined(_WIN32) #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp> diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 5ede1d50f416..5a5405f3ad06 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -159,7 +159,7 @@ public: } }; -#if !defined(WNT) +#if !defined(_WIN32) DECLARE_SW_IMPORT_TEST(testMathMalformedXml, "math-malformed_xml.docx", FailTest) { diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index a67d83cbb53a..d34d8666793f 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -118,7 +118,7 @@ protected: AllSettings m_aSavedSettings; }; -#if !defined(WNT) +#if !defined(_WIN32) DECLARE_RTFIMPORT_TEST(testFdo45553, "fdo45553.rtf") { diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 0022f2fe35ae..a314aefff2f9 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -625,7 +625,7 @@ static void lcl_FormatPostIt( pIDCO->SplitNode( *aPam.GetPoint(), false ); aStr = pField->GetPar2(); -#if defined( WNT ) +#if defined(_WIN32) // Throw out all CR in Windows aStr = comphelper::string::remove(aStr, '\r'); #endif diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index e49cfe152763..9dee24ac89a0 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -490,7 +490,7 @@ void SwFntObj::CreateScrFont( const SwViewShell& rSh, const OutputDevice& rOut ) } void SwFntObj::GuessLeading( const SwViewShell& -#if defined(WNT) +#if defined(_WIN32) rSh #endif , const FontMetric& rMet ) @@ -503,7 +503,7 @@ void SwFntObj::GuessLeading( const SwViewShell& return; } -#if defined(WNT) +#if defined(_WIN32) OutputDevice *pWin = rSh.GetWin() ? rSh.GetWin() : GetpApp()->GetDefaultDevice(); diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx index 22080650ec63..97f244f205e3 100644 --- a/sw/source/ui/vba/vbasystem.cxx +++ b/sw/source/ui/vba/vbasystem.cxx @@ -24,7 +24,7 @@ #include <osl/file.hxx> #include <tools/urlobj.hxx> -#ifdef WNT +#ifdef _WIN32 #if defined _MSC_VER #pragma warning (push, 1) #pragma warning (disable: 4005) @@ -49,7 +49,7 @@ void PrivateProfileStringListener::Initialize( const OUString& rFileName, const maGroupName = rGroupName; maKey = rKey; } -#ifdef WNT +#ifdef _WIN32 void lcl_getRegKeyInfo( const OString& sKeyInfo, HKEY& hBaseKey, OString& sSubKey ) { sal_Int32 nBaseKeyIndex = sKeyInfo.indexOf('\\'); @@ -95,7 +95,7 @@ uno::Any PrivateProfileStringListener::getValueEvent() else { // get key/value from windows register -#ifdef WNT +#ifdef _WIN32 HKEY hBaseKey = NULL; OString sSubKey; lcl_getRegKeyInfo( maGroupName, hBaseKey, sSubKey ); @@ -140,7 +140,7 @@ void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value ) else { //set value into windows register -#ifdef WNT +#ifdef _WIN32 HKEY hBaseKey = NULL; OString sSubKey; lcl_getRegKeyInfo( maGroupName, hBaseKey, sSubKey ); diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 811deb4b029d..b5f631faa623 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1145,7 +1145,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } } -#if defined WNT +#if defined(_WIN32) bool SwDocShell::DdeGetData( const OUString& rItem, const OUString& rMimeType, uno::Any & rValue ) { diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 0aea9c99a21d..b583923e836c 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -2627,7 +2627,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell) OUString sFilterXLS(SW_RES(STR_FILTER_XLS)); OUString sFilterTXT(SW_RES(STR_FILTER_TXT)); OUString sFilterCSV(SW_RES(STR_FILTER_CSV)); -#ifdef WNT +#ifdef _WIN32 OUString sFilterMDB(SW_RES(STR_FILTER_MDB)); OUString sFilterACCDB(SW_RES(STR_FILTER_ACCDB)); #endif @@ -2640,7 +2640,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell) xFltMgr->appendFilter( sFilterXLS, "*.xls" ); xFltMgr->appendFilter( sFilterTXT, "*.txt" ); xFltMgr->appendFilter( sFilterCSV, "*.csv" ); -#ifdef WNT +#ifdef _WIN32 xFltMgr->appendFilter( sFilterMDB, "*.mdb" ); xFltMgr->appendFilter( sFilterACCDB, "*.accdb" ); #endif @@ -2704,7 +2704,7 @@ SwDBManager::DBConnURITypes SwDBManager::GetDBunoURI(const OUString &rURI, uno:: aURLAny <<= sDBURL; type = DBCONN_FLAT; } -#ifdef WNT +#ifdef _WIN32 else if(sExt.equalsIgnoreAsciiCase("mdb")) { OUString sDBURL("sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="); diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index c7de73d2651b..9b863d5c8a2e 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -190,7 +190,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : Check( MN_READONLY_SOURCEVIEW, SID_SOURCEVIEW, rDis ); Check( MN_READONLY_BROWSE_BACKWARD, SID_BROWSE_BACKWARD,rDis ); Check( MN_READONLY_BROWSE_FORWARD, SID_BROWSE_FORWARD, rDis ); -#ifdef WNT +#ifdef _WIN32 Check( MN_READONLY_PLUGINOFF, SID_PLUGINS_ACTIVE, rDis ); #endif Check( MN_READONLY_OPENURL, SID_OPENDOC, rDis ); @@ -314,7 +314,7 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId ) break; } case MN_READONLY_GRAPHICOFF: nExecId = FN_VIEW_GRAPHIC; break; -#ifdef WNT +#ifdef _WIN32 case MN_READONLY_PLUGINOFF: nExecId = SID_PLUGINS_ACTIVE; break; #endif case MN_READONLY_TOGALLERYLINK: diff --git a/sw/source/uibase/envelp/envimg.cxx b/sw/source/uibase/envelp/envimg.cxx index 99a2ef4b0027..b7591850e20f 100644 --- a/sw/source/uibase/envelp/envimg.cxx +++ b/sw/source/uibase/envelp/envimg.cxx @@ -34,7 +34,7 @@ #include <unomid.h> -#ifdef WNT +#ifdef _WIN32 #define NEXTLINE "\r\n" #else #define NEXTLINE "\n" diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx index 49d3a96de2a9..830e32d8e85f 100644 --- a/sw/source/uibase/uiview/uivwimp.cxx +++ b/sw/source/uibase/uiview/uivwimp.cxx @@ -262,7 +262,7 @@ SwScannerEventListener::~SwScannerEventListener() void SAL_CALL SwScannerEventListener::disposing( const EventObject& rEventObject) throw(uno::RuntimeException, std::exception) { -#if defined WNT || defined UNX +#if defined(_WIN32) || defined UNX SolarMutexGuard aGuard; if( pView ) pView->ScannerEventHdl( rEventObject ); diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 78531dc19805..81ce9822eb14 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1641,7 +1641,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SfxViewShell::Notify(rBC, rHint); } -#if defined WNT || defined UNX +#if defined(_WIN32) || defined UNX void SwView::ScannerEventHdl( const EventObject& /*rEventObject*/ ) { diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index a8c83ce524ce..92f87f4a6079 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -991,7 +991,7 @@ void SwView::Execute(SfxRequest &rReq) m_pShell->ExecuteSlot(rReq); } break; -#if defined WNT || defined UNX +#if defined(_WIN32) || defined UNX case SID_TWAIN_SELECT: case SID_TWAIN_TRANSFER: GetViewImpl()->ExecuteScan( rReq ); diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index 7c01196b5d2e..77dfe152560b 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -214,7 +214,7 @@ void SwView::GetState(SfxItemSet &rSet) break; case SID_TWAIN_SELECT: case SID_TWAIN_TRANSFER: -#if defined WNT || defined UNX +#if defined(_WIN32) || defined UNX { if(!SW_MOD()->GetScannerManager().is()) rSet.DisableItem(nWhich); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 383f6ee3ccf5..565af8c894a7 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3453,7 +3453,7 @@ void SAL_CALL SwXTextDocument::paintTile( const ::css::uno::Any& Parent, ::sal_I { SystemGraphicsData aData; aData.nSize = sizeof(SystemGraphicsData); - #if defined WNT + #if defined(_WIN32) sal_Int64 nWindowHandle; Parent >>= nWindowHandle; aData.hWnd = (HWND) nWindowHandle; diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx index 8f23fee615fc..e6fa0642ccd2 100644 --- a/sw/source/uibase/utlui/initui.cxx +++ b/sw/source/uibase/utlui/initui.cxx @@ -291,7 +291,7 @@ ImpAutoFormatNameListLoader::ImpAutoFormatNameListLoader( std::vector<OUString>& OUString p(ResId(n + 1, *pSwResMgr)); if(STR_AUTOFMTREDL_TYPO == n) { -#ifdef WNT +#ifdef _WIN32 // For Windows, a special treatment is necessary because MS has // forgotten some characters in the dialog font here. p = p.replaceFirst("%1", ",,"); diff --git a/toolkit/source/awt/vclxsystemdependentwindow.cxx b/toolkit/source/awt/vclxsystemdependentwindow.cxx index 488119109b40..18e4a0224122 100644 --- a/toolkit/source/awt/vclxsystemdependentwindow.cxx +++ b/toolkit/source/awt/vclxsystemdependentwindow.cxx @@ -75,23 +75,23 @@ css::uno::Any VCLXSystemDependentWindow::getWindowHandle( const css::uno::Sequen const SystemEnvData* pSysData = static_cast<SystemChildWindow *>(pWindow)->GetSystemData(); if( pSysData ) { -#if (defined WNT) +#if defined(_WIN32) if( SystemType == css::lang::SystemDependent::SYSTEM_WIN32 ) { aRet <<= reinterpret_cast<sal_IntPtr>(pSysData->hWnd); } -#elif (defined MACOSX) +#elif defined(MACOSX) if( SystemType == css::lang::SystemDependent::SYSTEM_MAC ) { aRet <<= reinterpret_cast<sal_IntPtr>(pSysData->mpNSView); } -#elif (defined ANDROID) +#elif defined(ANDROID) // Nothing (void) SystemType; -#elif (defined IOS) +#elif defined(IOS) // Nothing (void) SystemType; -#elif (defined UNX) +#elif defined(UNX) if( SystemType == css::lang::SystemDependent::SYSTEM_XWINDOW ) { css::awt::SystemDependentXWindow aSD; diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index a3fed7c7c42f..c72c1b6216a5 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -18,7 +18,7 @@ */ #include <stdio.h> -#ifdef WNT +#ifdef _WIN32 #include <prewin.h> #include <postwin.h> #endif @@ -124,11 +124,11 @@ #define VCLWINDOW_FRAMEWINDOW 0x1000 #define VCLWINDOW_SYSTEMCHILDWINDOW 0x1001 -#if (defined WNT) +#if defined(_WIN32) #define SYSTEM_DEPENDENT_TYPE css::lang::SystemDependent::SYSTEM_WIN32 -#elif (defined MACOSX) +#elif defined(MACOSX) #define SYSTEM_DEPENDENT_TYPE css::lang::SystemDependent::SYSTEM_MAC -#elif (defined UNX) +#elif defined(UNX) #define SYSTEM_DEPENDENT_TYPE css::lang::SystemDependent::SYSTEM_XWINDOW #endif diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx index a9853e17468b..781a7cbbf21b 100644 --- a/toolkit/source/awt/vclxtopwindow.cxx +++ b/toolkit/source/awt/vclxtopwindow.cxx @@ -86,23 +86,23 @@ css::uno::Any VCLXTopWindow_Base::getWindowHandle( const css::uno::Sequence< sal const SystemEnvData* pSysData = static_cast<SystemWindow *>(pWindow)->GetSystemData(); if( pSysData ) { -#if (defined WNT) +#if defined (_WIN32) if( SystemType == css::lang::SystemDependent::SYSTEM_WIN32 ) { aRet <<= reinterpret_cast<sal_IntPtr>(pSysData->hWnd); } -#elif (defined MACOSX) +#elif defined(MACOSX) if( SystemType == css::lang::SystemDependent::SYSTEM_MAC ) { aRet <<= reinterpret_cast<sal_IntPtr>(pSysData->mpNSView); } -#elif (defined ANDROID) +#elif defined(ANDROID) // Nothing (void) SystemType; -#elif (defined IOS) +#elif defined(IOS) // Nothing (void) SystemType; -#elif (defined UNX) +#elif defined(UNX) if( SystemType == css::lang::SystemDependent::SYSTEM_XWINDOW ) { css::awt::SystemDependentXWindow aSD; diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx index f6783b1068cd..ef471500df49 100644 --- a/toolkit/source/awt/vclxwindow1.cxx +++ b/toolkit/source/awt/vclxwindow1.cxx @@ -23,7 +23,7 @@ #include <vcl/wrkwin.hxx> #include <vcl/window.hxx> -#ifdef WNT +#ifdef _WIN32 #include <prewin.h> #include <postwin.h> #elif defined ( MACOSX ) @@ -77,7 +77,7 @@ void VCLXWindow::SetSystemParent_Impl( const css::uno::Any& rHandle ) // create system parent data SystemParentData aSysParentData; aSysParentData.nSize = sizeof ( SystemParentData ); -#if defined( WNT ) +#if defined(_WIN32) aSysParentData.hWnd = (HWND) nHandle; #elif defined( MACOSX ) aSysParentData.pView = reinterpret_cast<NSView*>(nHandle); diff --git a/tools/qa/cppunit/test_pathutils.cxx b/tools/qa/cppunit/test_pathutils.cxx index 37e6259df120..30fbd5884015 100644 --- a/tools/qa/cppunit/test_pathutils.cxx +++ b/tools/qa/cppunit/test_pathutils.cxx @@ -31,7 +31,7 @@ namespace { void buildPath( wchar_t const * front, wchar_t const * back, wchar_t const * path) { -#if defined WNT +#if defined(_WIN32) wchar_t p[MAX_PATH]; wchar_t * e = tools::buildPath( p, front, front + std::wcslen(front), back, std::wcslen(back)); diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx index e8798b798e45..8b5cd2ba9dba 100644 --- a/tools/source/datetime/tdate.cxx +++ b/tools/source/datetime/tdate.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if defined( WNT ) +#if defined(_WIN32) #include <windows.h> #else #include <time.h> @@ -144,7 +144,7 @@ static Date lcl_DaysToDate( long nDays ) Date::Date( DateInitSystem ) { -#if defined WNT +#if defined(_WIN32) SYSTEMTIME aDateTime; GetLocalTime( &aDateTime ); diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx index b6bdf040d579..91c8ea09223a 100644 --- a/tools/source/datetime/ttime.cxx +++ b/tools/source/datetime/ttime.cxx @@ -21,7 +21,7 @@ #include <cerrno> -#if defined( WNT ) +#if defined(_WIN32) #include <windows.h> #elif defined UNX #include <unistd.h> @@ -92,7 +92,7 @@ namespace tools { Time::Time( TimeInitSystem ) { -#if defined( WNT ) +#if defined(_WIN32) SYSTEMTIME aDateTime; GetLocalTime( &aDateTime ); @@ -354,7 +354,7 @@ bool tools::Time::IsEqualIgnoreNanoSec( const tools::Time& rTime ) const Time tools::Time::GetUTCOffset() { -#if defined( WNT ) +#if defined(_WIN32) TIME_ZONE_INFORMATION aTimeZone; aTimeZone.Bias = 0; DWORD nTimeZoneRet = GetTimeZoneInformation( &aTimeZone ); @@ -411,7 +411,7 @@ Time tools::Time::GetUTCOffset() sal_uInt64 tools::Time::GetSystemTicks() { -#if defined WNT +#if defined(_WIN32) static LARGE_INTEGER nTicksPerSecond; static bool bTicksPerSecondInitialized = false; if (!bTicksPerSecondInitialized) diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx index 23dead7e935a..40fc492ec605 100644 --- a/tools/source/generic/config.cxx +++ b/tools/source/generic/config.cxx @@ -23,7 +23,7 @@ #include <new> #include <string.h> -#ifdef WNT +#ifdef _WIN32 #include "stdlib.h" #endif @@ -183,7 +183,7 @@ OString makeOString(const sal_uInt8* p, sal_uInt64 n) { if (n > SAL_MAX_INT32) { - #ifdef WNT + #ifdef _WIN32 abort(); #else ::std::abort(); //TODO: handle this gracefully diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx index d0b638a66a99..539496cd0917 100644 --- a/tools/source/inet/inetmime.cxx +++ b/tools/source/inet/inetmime.cxx @@ -162,7 +162,7 @@ inline bool startsWithLineFolding(const sal_Unicode * pBegin, inline rtl_TextEncoding translateToMIME(rtl_TextEncoding eEncoding) { -#if defined WNT +#if defined(_WIN32) return eEncoding == RTL_TEXTENCODING_MS_1252 ? RTL_TEXTENCODING_ISO_8859_1 : eEncoding; #else // WNT @@ -173,7 +173,7 @@ inline rtl_TextEncoding translateToMIME(rtl_TextEncoding eEncoding) inline rtl_TextEncoding translateFromMIME(rtl_TextEncoding eEncoding) { -#if defined WNT +#if defined(_WIN32) return eEncoding == RTL_TEXTENCODING_ISO_8859_1 ? RTL_TEXTENCODING_MS_1252 : eEncoding; #else @@ -830,7 +830,7 @@ createPreferredCharsetList(rtl_TextEncoding eEncoding) // <ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT> // version 1.0 of 18 August 1999 -#if defined WNT +#if defined(_WIN32) static const sal_uInt32 aWindows1252Ranges[] = { 0, 0x7F, 0xA0, 0xFF, 0x152, 0x153, 0x160, 0x161, 0x178, 0x178, 0x17D, 0x17E, 0x192, 0x192, 0x2C6, 0x2C6, 0x2DC, 0x2DC, @@ -845,7 +845,7 @@ createPreferredCharsetList(rtl_TextEncoding eEncoding) switch (eEncoding) { case RTL_TEXTENCODING_MS_1252: -#if defined WNT +#if defined(_WIN32) pList->prepend(Charset(RTL_TEXTENCODING_MS_1252, aWindows1252Ranges)); #endif // WNT diff --git a/tools/source/misc/pathutils.cxx b/tools/source/misc/pathutils.cxx index 577e5491b5ca..d939483e4764 100644 --- a/tools/source/misc/pathutils.cxx +++ b/tools/source/misc/pathutils.cxx @@ -19,7 +19,7 @@ #include <sal/config.h> -#if defined WNT +#if defined(_WIN32) #include <cstddef> #define WIN32_LEAN_AND_MEAN diff --git a/tools/source/stream/strmsys.cxx b/tools/source/stream/strmsys.cxx index 0c9edfc49a1d..61c74648e18b 100644 --- a/tools/source/stream/strmsys.cxx +++ b/tools/source/stream/strmsys.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if defined WNT +#if defined(_WIN32) #include "strmwnt.cxx" #elif defined UNX #include "strmunx.cxx" diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx index 2967df018977..3618d217f427 100644 --- a/tools/source/stream/strmwnt.cxx +++ b/tools/source/stream/strmwnt.cxx @@ -22,7 +22,7 @@ #include <string.h> #include <limits.h> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #endif diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index 5eb00115f356..d0181b57239d 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -222,7 +222,7 @@ FileProvider::compareContentIds( iComp = aStatus1.getFileURL().compareTo( aStatus2.getFileURL() ); // Quick hack for Windows to threat all file systems as case insensitive -#ifdef WNT +#ifdef _WIN32 if ( 0 != iComp ) { error = osl::FileBase::getSystemPathFromFileURL( aStatus1.getFileURL(), aPath1 ); diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx index 42e4ab59c219..a05559d5cfd3 100644 --- a/ucb/source/ucp/file/shell.cxx +++ b/ucb/source/ucp/file/shell.cxx @@ -286,7 +286,7 @@ shell::shell( const uno::Reference< uno::XComponentContext >& rxContext, beans::PropertyState_DEFAULT_VALUE, beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND -#if defined( WNT ) +#if defined(_WIN32) )); #else | beans::PropertyAttribute::READONLY)); // under unix/linux only readable diff --git a/uui/source/openlocked.cxx b/uui/source/openlocked.cxx index acb19a61171d..5ee17dcbad19 100644 --- a/uui/source/openlocked.cxx +++ b/uui/source/openlocked.cxx @@ -36,7 +36,7 @@ OpenLockedQueryBox::OpenLockedQueryBox( vcl::Window* pParent, ResMgr* pResMgr, c SetButtonHelpText( RET_YES, OUString() ); SetButtonHelpText( RET_NO, OUString() ); -#ifdef WNT +#ifdef _WIN32 // bnc#656566 // Yes, it is silly to do this only for this dialog but not the // other similar ones. But hey, it was about this dialog that the diff --git a/vcl/inc/fontselect.hxx b/vcl/inc/fontselect.hxx index e8b19b408f53..57f1815c3ee2 100644 --- a/vcl/inc/fontselect.hxx +++ b/vcl/inc/fontselect.hxx @@ -37,7 +37,7 @@ class FontSelectPatternAttributes : public FontAttributes public: FontSelectPatternAttributes( const vcl::Font&, const OUString& rSearchName, const Size&, float fExactHeight ); -#ifdef WNT +#ifdef _WIN32 FontSelectPatternAttributes( const PhysicalFontFace&, const Size&, float fExactHeight, int nOrientation, bool bVertical ); #endif @@ -70,7 +70,7 @@ class FontSelectPattern : public FontSelectPatternAttributes public: FontSelectPattern( const vcl::Font&, const OUString& rSearchName, const Size&, float fExactHeight ); -#ifdef WNT +#ifdef _WIN32 // ifdeffed to prevent it going into unusedcode.easy FontSelectPattern( const PhysicalFontFace&, const Size&, float fExactHeight, int nOrientation, bool bVertical ); diff --git a/vcl/inc/graphite_layout.hxx b/vcl/inc/graphite_layout.hxx index ff258bff3a1d..a3076f4c8b9b 100644 --- a/vcl/inc/graphite_layout.hxx +++ b/vcl/inc/graphite_layout.hxx @@ -135,7 +135,7 @@ public: virtual ~GraphiteLayout() throw(); void SetFont(gr_font * pFont) { mpFont = pFont; } -#ifdef WNT +#ifdef _WIN32 gr_font * GetFont() { return mpFont; } void SetFontScale(float s) { mfScaling = s; }; #endif diff --git a/vcl/inc/graphite_static.hxx b/vcl/inc/graphite_static.hxx index f57bd85a9878..c13333150a56 100644 --- a/vcl/inc/graphite_static.hxx +++ b/vcl/inc/graphite_static.hxx @@ -10,7 +10,7 @@ #ifndef INCLUDED_VCL_INC_GRAPHITE_STATIC_HXX #define INCLUDED_VCL_INC_GRAPHITE_STATIC_HXX -#ifdef WNT +#ifdef _WIN32 # ifndef GRAPHITE2_STATIC # define GRAPHITE2_STATIC 1 # endif diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx index c7f6630bb993..e4daced652ee 100644 --- a/vcl/inc/sft.hxx +++ b/vcl/inc/sft.hxx @@ -472,7 +472,7 @@ namespace vcl */ int VCL_DLLPUBLIC MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphArray, bool bvertical); -#if defined(WNT) || defined(MACOSX) || defined(IOS) +#if defined(_WIN32) || defined(MACOSX) || defined(IOS) /** * Maps a Unicode (UCS-2) character to a glyph ID and returns it. Missing glyph has * a glyphID of 0 so this function can be used to test if a character is encoded in the font. diff --git a/vcl/inc/svsys.h b/vcl/inc/svsys.h index 9add1a92fc6e..738ae98af395 100644 --- a/vcl/inc/svsys.h +++ b/vcl/inc/svsys.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_VCL_INC_SVSYS_H #define INCLUDED_VCL_INC_SVSYS_H -#ifdef WNT +#ifdef _WIN32 #include "win/svsys.h" #elif defined MACOSX #include "osx/svsys.h" diff --git a/vcl/inc/win/svsys.h b/vcl/inc/win/svsys.h index 9753a8789025..44cae93cf741 100644 --- a/vcl/inc/win/svsys.h +++ b/vcl/inc/win/svsys.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_VCL_INC_WIN_SVSYS_H #define INCLUDED_VCL_INC_WIN_SVSYS_H -#ifdef WNT +#ifdef _WIN32 #ifndef INCLUDED_PRE_POST_WIN_H #define INCLUDED_PRE_POST_WIN_H #include <prewin.h> diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 0ed06b6dec86..13444e6fa254 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -54,7 +54,7 @@ inline bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nT nType = GL_UNSIGNED_BYTE; return true; case 16: -#ifdef WNT +#ifdef _WIN32 nFormat = GL_BGR; #else nFormat = GL_RGB; @@ -62,7 +62,7 @@ inline bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nT nType = GL_UNSIGNED_SHORT_5_6_5; return true; case 24: -#ifdef WNT +#ifdef _WIN32 nFormat = GL_BGR; #else nFormat = GL_RGB; @@ -70,7 +70,7 @@ inline bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nT nType = GL_UNSIGNED_BYTE; return true; case 32: -#ifdef WNT +#ifdef _WIN32 nFormat = GL_BGRA; #else nFormat = GL_RGBA; @@ -769,7 +769,7 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( BitmapAccessMode nMode ) break; case 16: { -#ifdef WNT +#ifdef _WIN32 pBuffer->mnFormat = BMP_FORMAT_16BIT_TC_LSB_MASK; ColorMaskElement aRedMask(0x00007c00); aRedMask.CalcMaskShift(); @@ -792,7 +792,7 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( BitmapAccessMode nMode ) } case 24: { -#ifdef WNT +#ifdef _WIN32 pBuffer->mnFormat = BMP_FORMAT_24BIT_TC_BGR; #else pBuffer->mnFormat = BMP_FORMAT_24BIT_TC_RGB; @@ -801,7 +801,7 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( BitmapAccessMode nMode ) } case 32: { -#ifdef WNT +#ifdef _WIN32 pBuffer->mnFormat = BMP_FORMAT_32BIT_TC_BGRA; ColorMaskElement aRedMask(0x00ff0000); aRedMask.CalcMaskShift(); diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index 7455b4b2bdf2..4336e6bb7e87 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -76,7 +76,7 @@ void BitmapTest::testConvert() CPPUNIT_ASSERT_EQUAL(sal_uLong(40), pReadAccess->GetScanlineSize()); #else CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(24), pReadAccess->GetBitCount()); -#if defined WNT +#if defined(_WIN32) if (!OpenGLHelper::isVCLOpenGLEnabled()) { // GDI Scanlines padded to DWORD multiples, it seems diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx index 31717ccdd12e..b0fa4d72cb80 100644 --- a/vcl/qa/cppunit/complextext.cxx +++ b/vcl/qa/cppunit/complextext.cxx @@ -22,13 +22,13 @@ public: /// Play with font measuring etc. void testArabic(); -#if defined(WNT) +#if defined(_WIN32) void testTdf95650(); // Windows-only issue #endif CPPUNIT_TEST_SUITE(VclComplexTextTest); CPPUNIT_TEST(testArabic); -#if defined(WNT) +#if defined(_WIN32) CPPUNIT_TEST(testTdf95650); #endif CPPUNIT_TEST_SUITE_END(); @@ -83,7 +83,7 @@ void VclComplexTextTest::testArabic() #endif } -#if defined(WNT) +#if defined(_WIN32) void VclComplexTextTest::testTdf95650() { const sal_Unicode pTxt[] = { diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx index 22fa582114c5..0d3afa1ace8d 100644 --- a/vcl/qa/cppunit/timer.cxx +++ b/vcl/qa/cppunit/timer.cxx @@ -127,7 +127,7 @@ void TimerTest::testIdle() // tdf#91727 void TimerTest::testIdleMainloop() { -#ifndef WNT +#ifndef _WIN32 bool bTriggered = false; IdleBool aTest( bTriggered ); // coverity[loop_top] - Application::Yield allows the timer to fire and toggle bDone diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 296684b3dfd9..cb84dbe0aaa6 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -21,7 +21,7 @@ #include <officecfg/Office/Common.hxx> -#ifdef WNT +#ifdef _WIN32 #include "win/svsys.h" #endif @@ -2472,7 +2472,7 @@ bool MiscSettings::GetDisablePrinting() const bool MiscSettings::GetEnableATToolSupport() const { -#ifdef WNT +#ifdef _WIN32 if( mxData->mnEnableATT == TRISTATE_INDET ) { // Check in the Windows registry if an AT tool wants Accessibility support to @@ -2540,7 +2540,7 @@ bool MiscSettings::GetEnableATToolSupport() const return mxData->mnEnableATT != TRISTATE_FALSE; } -#ifdef WNT +#ifdef _WIN32 void MiscSettings::SetEnableATToolSupport( bool bEnable ) { if ( (bEnable ? TRISTATE_TRUE : TRISTATE_FALSE) != mxData->mnEnableATT ) diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 675a84893fe2..2ed5292eb121 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -540,7 +540,7 @@ void Application::ReAcquireSolarMutex(sal_uLong const nReleased) // 0 would mean that events/timers will be handled without locking // SolarMutex (racy) SAL_WARN_IF(nReleased == 0, "vcl", "SolarMutexReleaser without SolarMutex"); -#ifdef WNT +#ifdef _WIN32 if (nReleased == 0 || ImplGetSVData()->mbDeInit) //do not Yield in DeInitVCL AcquireSolarMutex(nReleased); else diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index a8bac5775b59..c7bcb9191dcb 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -44,7 +44,7 @@ #include <vcl/embeddedfontshelper.hxx> #include <vcl/debugevent.hxx> -#ifdef WNT +#ifdef _WIN32 #include <svsys.h> #include <process.h> #include <ole2.h> @@ -578,7 +578,7 @@ struct WorkerThreadData } }; -#ifdef WNT +#ifdef _WIN32 static HANDLE hThreadID = 0; static unsigned __stdcall _threadmain( void *pArgs ) { @@ -604,7 +604,7 @@ static void SAL_CALL MainWorkerFunction( void* pArgs ) void CreateMainLoopThread( oslWorkerFunction pWorker, void * pThreadData ) { -#ifdef WNT +#ifdef _WIN32 // sal thread always call CoInitializeEx, so a system dependent implementation is necessary unsigned uThreadID; @@ -624,7 +624,7 @@ void JoinMainLoopThread() { if( hThreadID ) { -#ifdef WNT +#ifdef _WIN32 WaitForSingleObject(hThreadID, INFINITE); #else osl_joinWithThread(hThreadID); diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index dc835ed7f645..68b36953e2c6 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -156,7 +156,7 @@ OUString Button::GetStandardText( StandardButtonType eButton ) } sal_uInt32 nResId = aResIdAry[(sal_uInt16)eButton].nResId; -#ifdef WNT +#ifdef _WIN32 // http://lists.freedesktop.org/archives/libreoffice/2013-January/044513.html // Under windows we don't want accelerators on ok/cancel but do on other // buttons diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index fad4a2d77429..85b28dc78889 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1191,7 +1191,7 @@ OUString GraphicFilter::GetImportFormatTypeName( sal_uInt16 nFormat ) return pConfig->GetImportFilterTypeName( nFormat ); } -#ifdef WNT +#ifdef _WIN32 OUString GraphicFilter::GetImportFormatMediaType( sal_uInt16 nFormat ) { return pConfig->GetImportFormatMediaType( nFormat ); diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index 25e8decb6ea6..10e84cc53f68 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -481,7 +481,7 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u switch (Atr.GetFont()) { case 92500: case 92501: case 92504: case 92505: { -#if defined(WNT) +#if defined(_WIN32) FNam = "Times New Roman"; // CG Times is Times New Roman in Windows #else FNam = "Times"; // otherwise just Times @@ -490,7 +490,7 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u aFont.SetFamily(FAMILY_ROMAN); } break; case 94021: case 94022: case 94023: case 94024: { -#if defined(WNT) +#if defined(_WIN32) FNam = "Arial"; // Univers is Arial in Windows #else FNam = "Helvetica"; // otherwise Helvetica @@ -499,7 +499,7 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u StdBrei=47; } break; case 93950: case 93951: case 93952: case 93953: { -#if defined(WNT) +#if defined(_WIN32) FNam = "Courier New"; // The vector-Courierfont is called Courier New in Windows #else FNam = "Courier"; // otherwise Courier remains Courier diff --git a/vcl/source/font/fontselect.cxx b/vcl/source/font/fontselect.cxx index ce4704556cbc..d13b2e0b41b1 100644 --- a/vcl/source/font/fontselect.cxx +++ b/vcl/source/font/fontselect.cxx @@ -70,7 +70,7 @@ FontSelectPatternAttributes::FontSelectPatternAttributes( const vcl::Font& rFont // NOTE: this ctor is still used on Windows. Do not remove. -#ifdef WNT +#ifdef _WIN32 FontSelectPatternAttributes::FontSelectPatternAttributes( const PhysicalFontFace& rFontData, const Size& rSize, float fExactHeight, int nOrientation, bool bVertical ) : FontAttributes( rFontData ) diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 3a6921e9c5cd..69d3fefbcfd6 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -2415,7 +2415,7 @@ int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphA return nchars; } -#if defined(WNT) || defined(MACOSX) || defined(IOS) +#if defined(_WIN32) || defined(MACOSX) || defined(IOS) sal_uInt16 MapChar(TrueTypeFont *ttf, sal_uInt16 ch, bool bvertical) { switch (ttf->cmapType) { diff --git a/vcl/source/glyphs/graphite_features.cxx b/vcl/source/glyphs/graphite_features.cxx index f190b523cefc..932ec61194ae 100644 --- a/vcl/source/glyphs/graphite_features.cxx +++ b/vcl/source/glyphs/graphite_features.cxx @@ -25,7 +25,7 @@ #include <sal/types.h> #include <osl/endian.h> -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #endif diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx index dcdd31dafd1b..9c48b1589d7e 100644 --- a/vcl/source/glyphs/graphite_layout.cxx +++ b/vcl/source/glyphs/graphite_layout.cxx @@ -60,7 +60,7 @@ #ifdef GRLAYOUT_DEBUG static FILE * grLog() { -#ifdef WNT +#ifdef _WIN32 static FILE * grLogFile = NULL; if (grLogFile == NULL) { diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 49a9b3e6d5d9..ba615ad9afaf 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -28,7 +28,7 @@ #include <postmac.h> #endif -#if defined( WNT ) +#if defined(_WIN32) #include <win/saldata.hxx> #endif @@ -1089,7 +1089,7 @@ void OpenGLContext::setWinSize(const Size& rSize) } -#if defined( WNT ) +#if defined(_WIN32) bool OpenGLContext::initWindow() { @@ -1252,7 +1252,7 @@ void OpenGLContext::reset() mbInitialized = false; // destroy the context itself -#if defined( WNT ) +#if defined(_WIN32) if (m_aGLWin.hRC) { std::vector<HGLRC>::iterator itr = std::remove(g_vShareList.begin(), g_vShareList.end(), m_aGLWin.hRC); @@ -1287,7 +1287,7 @@ void OpenGLContext::reset() #endif } -#if defined( WNT ) || defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) +#if defined(_WIN32) || defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) SystemWindowData OpenGLContext::generateWinData(vcl::Window* /*pParent*/, bool bRequestLegacyContext) { @@ -1350,7 +1350,7 @@ bool OpenGLContext::isCurrent() { OpenGLZone aZone; -#if defined( WNT ) +#if defined(_WIN32) return wglGetCurrentContext() == m_aGLWin.hRC && wglGetCurrentDC() == m_aGLWin.hDC; #elif defined( MACOSX ) @@ -1366,7 +1366,7 @@ bool OpenGLContext::isCurrent() bool OpenGLContext::hasCurrent() { -#if defined( WNT ) +#if defined(_WIN32) return wglGetCurrentContext() != NULL; #elif defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS) return false; @@ -1414,7 +1414,7 @@ void OpenGLContext::makeCurrent() clearCurrent(); -#if defined( WNT ) +#if defined(_WIN32) if (!wglMakeCurrent(m_aGLWin.hDC, m_aGLWin.hRC)) { SAL_WARN("vcl.opengl", "OpenGLContext::makeCurrent(): wglMakeCurrent failed: " << GetLastError()); @@ -1509,7 +1509,7 @@ void OpenGLContext::resetCurrent() OpenGLZone aZone; -#if defined( WNT ) +#if defined(_WIN32) wglMakeCurrent(NULL, NULL); #elif defined( MACOSX ) (void) this; // loplugin:staticmethods @@ -1526,7 +1526,7 @@ void OpenGLContext::swapBuffers() { OpenGLZone aZone; -#if defined( WNT ) +#if defined(_WIN32) SwapBuffers(m_aGLWin.hDC); #elif defined( MACOSX ) NSOpenGLView* pView = getOpenGLView(); @@ -1557,7 +1557,7 @@ void OpenGLContext::sync() { OpenGLZone aZone; -#if defined( WNT ) +#if defined(_WIN32) // nothing #elif defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS) (void) this; // loplugin:staticmethods diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 9b829d633a95..59a970a8caae 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -324,7 +324,7 @@ bool VclBox::set_property(const OString &rKey, const OString &rValue) sal_uInt16 VclBox::getDefaultAccessibleRole() const { -#if defined(WNT) +#if defined(_WIN32) //fdo#74284 call Boxes Panels, keep then as "Filler" under //at least Linux seeing as that's what Gtk does for GtkBoxes return css::accessibility::AccessibleRole::PANEL; diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 1032bb5b688e..913b47c7bb42 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -733,7 +733,7 @@ Reference< css::datatransfer::dnd::XDragSource > Window::GetDragSource() { Sequence< Any > aDragSourceAL( 2 ), aDropTargetAL( 2 ); OUString aDragSourceSN, aDropTargetSN; -#if defined WNT +#if defined(_WIN32) aDragSourceSN = "com.sun.star.datatransfer.dnd.OleDragSource"; aDropTargetSN = "com.sun.star.datatransfer.dnd.OleDropTarget"; aDragSourceAL[ 1 ] = makeAny( static_cast<sal_uInt64>( reinterpret_cast<sal_IntPtr>(pEnvData->hWnd) ) ); diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx index f451c384f77d..4bbe7fafe5f5 100644 --- a/vcl/source/window/syschild.cxx +++ b/vcl/source/window/syschild.cxx @@ -204,7 +204,7 @@ sal_IntPtr SystemChildWindow::GetParentWindowHandle( bool bUseJava ) sal_IntPtr nRet = 0; (void)bUseJava; -#if defined WNT +#if defined(_WIN32) nRet = reinterpret_cast< sal_IntPtr >( GetSystemData()->hWnd ); #elif defined MACOSX // FIXME: this is wrong diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 0aa3f19c05c2..b147b0e1ff0c 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -41,7 +41,7 @@ #include <toolbox.h> #include <salframe.hxx> #include <spin.hxx> -#if defined WNT +#if defined(_WIN32) #include <svsys.h> #endif @@ -5656,7 +5656,7 @@ void ToolBox::ImplHideFocus() void ToolBox::ImplDisableFlatButtons() { -#ifdef WNT // Check in the Windows registry if an AT tool wants no flat toolboxes +#ifdef _WIN32 // Check in the Windows registry if an AT tool wants no flat toolboxes static bool bInit = false, bValue = false; if( ! bInit ) { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 599514d66354..e6ea5e82419e 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -70,7 +70,7 @@ #include <set> #include <typeinfo> -#ifdef WNT // see #140456# +#ifdef _WIN32 // see #140456# #include <win/salframe.h> #endif @@ -3692,7 +3692,7 @@ Reference< css::rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscr if(xCanvasFactory.is()) { -#ifdef WNT +#ifdef _WIN32 // see #140456# - if we're running on a multiscreen setup, // request special, multi-screen safe sprite canvas // implementation (not DX5 canvas, as it cannot cope with @@ -3721,7 +3721,7 @@ Reference< css::rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscr xContext ), UNO_QUERY ); -#ifdef WNT +#ifdef _WIN32 } #endif mpWindowImpl->mxCanvas = xCanvas; diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index 14e5c1c1b2e4..0a88ea65190c 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -65,7 +65,7 @@ #include "databases.hxx" #include "urlparameter.hxx" -#ifdef WNT +#ifdef _WIN32 #include <windows.h> #endif @@ -982,7 +982,7 @@ void Databases::cascadingStylesheet( const OUString& Language, if ( ( aHCMode >>= bHighContrastMode ) && bHighContrastMode ) { aCSS = "highcontrastblack"; - #ifdef WNT + #ifdef _WIN32 HKEY hKey = NULL; LONG lResult = RegOpenKeyExA( HKEY_CURRENT_USER, "Control Panel\\Accessibility\\HighContrast", 0, KEY_QUERY_VALUE, &hKey ); if ( ERROR_SUCCESS == lResult ) diff --git a/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx b/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx index 74f207e20d63..0de79b1623c5 100644 --- a/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx +++ b/xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx @@ -128,7 +128,7 @@ #include <xmlsecurity/biginteger.hxx> // Cleanup windows header macro pollution. -#if defined(WNT) && defined(WINAPI) +#if defined(_WIN32) && defined(WINAPI) # include <postwin.h> # undef RGB #endif diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx index c5a1e1382d7e..bf3979b81981 100644 --- a/xmlsecurity/source/dialogs/resourcemanager.cxx +++ b/xmlsecurity/source/dialogs/resourcemanager.cxx @@ -101,7 +101,7 @@ namespace XmlSec which we use to retrieve, for example, the subject name. If double quotes appear in the value then they are escaped with a double quote. This function removes the escape characters. */ -#ifdef WNT +#ifdef _WIN32 vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) { vector< pair<OUString, OUString> > retVal; diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx index 42ac155f0cab..d9987108c60d 100644 --- a/xmlsecurity/workben/signaturetest.cxx +++ b/xmlsecurity/workben/signaturetest.cxx @@ -243,7 +243,7 @@ MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) : maEditSIGFileName.SetText( aNSSFolder + "demo-result.xml" ); maEditTokenName.SetText( aNSSFolder ); -#ifdef WNT +#ifdef _WIN32 maEditTokenName.SetText( OUString() ); maEditTokenName.Disable(); maCryptoCheckBox.Disable(); |