diff options
85 files changed, 138 insertions, 1914 deletions
diff --git a/canvas/source/tools/elapsedtime.cxx b/canvas/source/tools/elapsedtime.cxx index 6ca58a2bf1ee..6c3d3284cb82 100644 --- a/canvas/source/tools/elapsedtime.cxx +++ b/canvas/source/tools/elapsedtime.cxx @@ -32,7 +32,7 @@ #include "osl/diagnose.h" #include "canvas/elapsedtime.hxx" -#if defined(WIN) || defined(WNT) +#if defined(WNT) #if defined _MSC_VER #pragma warning(push,1) @@ -58,7 +58,7 @@ namespace canvas { namespace tools { -#if defined(WIN) || defined(WNT) +#if defined(WNT) // TODO(Q2): is 0 okay for the failure case here? double ElapsedTime::getSystemTime() { diff --git a/rsc/source/parser/erscerr.cxx b/rsc/source/parser/erscerr.cxx index 158aea21b6e3..ed63510737aa 100644 --- a/rsc/source/parser/erscerr.cxx +++ b/rsc/source/parser/erscerr.cxx @@ -88,10 +88,8 @@ void RscError::StdOut( const char * pStr, const RscVerbosity _verbosityLevel ) *************************************************************************/ void RscError::StdErr( const char * pStr ) { -#ifndef WIN if( pStr ) fprintf( stderr, "%s", pStr ); -#endif } /************************************************************************* diff --git a/rsc/source/parser/rscyacc.cxx b/rsc/source/parser/rscyacc.cxx index 89891581d9ba..0d5cc8faef0e 100644 --- a/rsc/source/parser/rscyacc.cxx +++ b/rsc/source/parser/rscyacc.cxx @@ -253,12 +253,8 @@ RSCINST GetFirstTupelEle( const RSCINST & rTop ) #ifdef UNX #define YYMAXDEPTH 2000 #else -#ifdef W30 -#define YYMAXDEPTH 300 -#else #define YYMAXDEPTH 800 #endif -#endif #if defined _MSC_VER #pragma warning(push, 1) diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 40d589aea359..15d26318875b 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -474,10 +474,8 @@ ERRTYPE RscCompiler::Start() if( PRINTSYNTAX_FLAG & pCL->nCommands ) { -#ifndef W30 pTC->WriteSyntax( stdout ); -printf( "khg\n" ); -#endif + printf( "khg\n" ); return ERR_OK; } diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index 9904cd20d4e7..93ecff2afe43 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -32,7 +32,7 @@ // C and C++ Includes. #include <stdlib.h> #include <stdio.h> -#if defined ( DOS ) || defined ( WIN ) || defined (WNT ) +#if defined (WNT ) #include <direct.h> #endif #if defined ( OS2 ) && !defined ( GCC ) @@ -51,10 +51,6 @@ #include <rtl/alloc.h> #include <rtl/memory.h> -#if defined (WIN) -#define ONLY_NEW -#endif - using namespace rtl; /****************** C o d e **********************************************/ diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx index 07711133bf4b..dd6ba6202bbe 100644 --- a/sot/source/sdstor/stgstrms.cxx +++ b/sot/source/sdstor/stgstrms.cxx @@ -41,13 +41,7 @@ #include "stgdir.hxx" #include "stgio.hxx" -#if defined(W31) - #include <tools/svwin.h> - #define memcpy hmemcpy - #define __HUGE _huge -#else - #define __HUGE -#endif +#define __HUGE ///////////////////////////// class StgFAT /////////////////////////////// diff --git a/svl/source/numbers/nbdll.cxx b/svl/source/numbers/nbdll.cxx deleted file mode 100644 index b93eda3e7f37..000000000000 --- a/svl/source/numbers/nbdll.cxx +++ /dev/null @@ -1,79 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svl.hxx" - -#ifdef WIN -#include <svwin.h> - -#ifndef _SYSDEP_HXX -#include <sysdep.hxx> -#endif - -// Statische DLL-Verwaltungs-Variablen -static HINSTANCE hDLLInst = 0; // HANDLE der DLL - - -/*************************************************************************** -|* -|* LibMain() -|* -|* Beschreibung Initialisierungsfunktion der DLL -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ - -extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) -{ -#ifndef WNT - if ( nHeap ) - UnlockData( 0 ); -#endif - - hDLLInst = hDLL; - - return TRUE; -} - -/*************************************************************************** -|* -|* WEP() -|* -|* Beschreibung DLL-Deinitialisierung -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ - -extern "C" int CALLBACK WEP( int ) -{ - return 1; -} - -#endif diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx index ba67d451be34..369306c22874 100644 --- a/svl/source/svdde/ddedata.cxx +++ b/svl/source/svdde/ddedata.cxx @@ -41,10 +41,6 @@ #include <osl/thread.h> -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "SVDDE_MISC_CODE" ) -#endif - // --- DdeData::DdeData() ------------------------------------------ DdeData::DdeData() @@ -164,10 +160,10 @@ ULONG DdeData::GetExternalFormat( ULONG nFmt ) default: { -#if defined(WNT) || defined(WIN) || defined( PM2 ) +#if defined(WNT) || defined( PM2 ) String aName( SotExchange::GetFormatName( nFmt ) ); -#if defined(WNT) || defined(WIN) +#if defined(WNT) if( aName.Len() ) nFmt = RegisterClipboardFormat( reinterpret_cast<LPCWSTR>(aName.GetBuffer()) ); @@ -203,7 +199,7 @@ ULONG DdeData::GetInternalFormat( ULONG nFmt ) break; default: -#if defined(WIN) || defined(WNT) +#if defined(WNT) if( nFmt >= CF_MAX ) { TCHAR szName[ 256 ]; diff --git a/svl/source/svdde/ddedll.cxx b/svl/source/svdde/ddedll.cxx deleted file mode 100644 index a71662dd5e63..000000000000 --- a/svl/source/svdde/ddedll.cxx +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svl.hxx" -#ifdef WIN - - -#include <sysdep.hxx> // included svwin.h - -// Statische DLL-Verwaltungs-Variablen -static HINSTANCE hDLLInst = 0; // HANDLE der DLL - -/*************************************************************************** -|* LibMain() -|* Beschreibung Initialisierungsfunktion der DLL -***************************************************************************/ -extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) -{ -#ifndef WNT - if ( nHeap ) - UnlockData( 0 ); -#endif - - hDLLInst = hDLL; - - return TRUE; -} - -/*************************************************************************** -|* WEP() -|* Beschreibung DLL-Deinitialisierung -***************************************************************************/ -extern "C" int CALLBACK WEP( int ) -{ - return 1; -} - -#endif - diff --git a/svl/source/svdde/ddestrg.cxx b/svl/source/svdde/ddestrg.cxx index 4f0e2464a276..007c9f56c544 100644 --- a/svl/source/svdde/ddestrg.cxx +++ b/svl/source/svdde/ddestrg.cxx @@ -33,10 +33,6 @@ #include "ddeimp.hxx" #include <svl/svdde.hxx> -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "SVDDE_MISC_CODE" ) -#endif - // --- DdeString::DdeString() -------------------------------------- DdeString::DdeString( DWORD hDdeInst, const sal_Unicode* p ) : diff --git a/svtools/inc/fltdefs.hxx b/svtools/inc/fltdefs.hxx index 8ef3f2ab3740..86462c2faa33 100644 --- a/svtools/inc/fltdefs.hxx +++ b/svtools/inc/fltdefs.hxx @@ -34,7 +34,7 @@ #define _FLTDEFS_HXX -#if defined ( WIN ) || defined ( WNT ) +#if defined ( WNT ) #define RGBQUAD RGBQUADWIN @@ -53,21 +53,6 @@ typedef struct RGBQUAD } RGBQUAD; -#ifdef WIN -typedef BYTE huge* PDIBBYTE; -#define MEMCPY hmemcpy -#define GLOBALALLOC(nSize) ((PDIBBYTE)GlobalLock(GlobalAlloc(GHND,(nSize)))) -#define GLOBALHANDLE(pPointer) ((HGLOBAL)GlobalHandle((*((size_t*)&(pPointer)+1)))) -#define GLOBALFREE(pPointer) (GlobalUnlock(GLOBALHANDLE((pPointer)))) -#define MEMSET( pDst, cByte, nCount ) \ -{ \ - PDIBBYTE pTmp = (PDIBBYTE) pDst; \ - for ( ULONG i = 0; i < nCount; i++ )\ - *pTmp++ = cByte; \ -} - -#else - typedef BYTE* PDIBBYTE; #define MEMCPY memcpy #define MEMSET memset @@ -75,7 +60,6 @@ typedef BYTE* PDIBBYTE; #define GLOBALFREE(pPointer) (GlobalFree((HGLOBAL)pPointer)) #define GLOBALHANDLE(pPointer) ((HGLOBAL)(pPointer)) -#endif #else typedef BYTE* PDIBBYTE; diff --git a/svtools/inc/rtfout.hxx b/svtools/inc/rtfout.hxx index 12a125635132..b9bfbc901848 100644 --- a/svtools/inc/rtfout.hxx +++ b/svtools/inc/rtfout.hxx @@ -41,7 +41,7 @@ class SvStream; class SVT_DLLPUBLIC RTFOutFuncs { public: -#if defined(MAC) || defined(UNX) +#if defined(UNX) static const sal_Char sNewLine; // nur \012 oder \015 #else static const sal_Char __FAR_DATA sNewLine[]; // \015\012 diff --git a/svtools/inc/svtools/htmlout.hxx b/svtools/inc/svtools/htmlout.hxx index 888286b231ee..1a21f1154602 100644 --- a/svtools/inc/svtools/htmlout.hxx +++ b/svtools/inc/svtools/htmlout.hxx @@ -60,7 +60,7 @@ struct SVT_DLLPUBLIC HTMLOutContext struct HTMLOutFuncs { -#if defined(MAC) || defined(UNX) +#if defined(UNX) static const sal_Char sNewLine; // nur \012 oder \015 #else static const sal_Char __FAR_DATA sNewLine[]; // \015\012 diff --git a/svtools/inc/svtools/svxbox.hxx b/svtools/inc/svtools/svxbox.hxx index 25deba4d091c..a4a920e692be 100644 --- a/svtools/inc/svtools/svxbox.hxx +++ b/svtools/inc/svtools/svxbox.hxx @@ -129,11 +129,7 @@ enum SvxComboBoxStyle SVX_CBS_LOWER = 0x02, SVX_CBS_ALL = 0x04, SVX_CBS_FILENAME = 0x08, -#ifdef WIN - SVX_CBS_SW_FILENAME = SVX_CBS_FILENAME | SVX_CBS_LOWER -#else SVX_CBS_SW_FILENAME = SVX_CBS_FILENAME -#endif }; // class SvxComboBox ----------------------------------------------------- diff --git a/svtools/source/contnr/ctrdll.cxx b/svtools/source/contnr/ctrdll.cxx deleted file mode 100644 index 463c6ccc8b35..000000000000 --- a/svtools/source/contnr/ctrdll.cxx +++ /dev/null @@ -1,79 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#ifdef WIN -#include <svwin.h> - -#ifndef _SYSDEP_HXX -#include <sysdep.hxx> -#endif - -// Statische DLL-Verwaltungs-Variablen -static HINSTANCE hDLLInst = 0; // HANDLE der DLL - - -/*************************************************************************** -|* -|* LibMain() -|* -|* Beschreibung Initialisierungsfunktion der DLL -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ - -extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) -{ -#ifndef WNT - if ( nHeap ) - UnlockData( 0 ); -#endif - - hDLLInst = hDLL; - - return TRUE; -} - -/*************************************************************************** -|* -|* WEP() -|* -|* Beschreibung DLL-Deinitialisierung -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ - -extern "C" int CALLBACK WEP( int ) -{ - return 1; -} - -#endif diff --git a/svtools/source/contnr/svicnvw.cxx b/svtools/source/contnr/svicnvw.cxx index 20bcfe0fe33a..b16cd67d12a5 100644 --- a/svtools/source/contnr/svicnvw.cxx +++ b/svtools/source/contnr/svicnvw.cxx @@ -550,9 +550,6 @@ void SvIconView::EditItemText( SvLBoxEntry* pEntry, SvLBoxItem* pItem, aRect.Bottom() += 2; // sieht huebscher aus -#ifdef WIN - aRect.Bottom() += 4; -#endif #ifdef OS2 #if OS2_SINGLE_LINE_EDIT diff --git a/svtools/source/contnr/svimpicn.cxx b/svtools/source/contnr/svimpicn.cxx index 2d4c9cf2df0e..d1e471953663 100644 --- a/svtools/source/contnr/svimpicn.cxx +++ b/svtools/source/contnr/svimpicn.cxx @@ -1702,11 +1702,6 @@ void SvImpIconView::PositionScrollBars( long nRealWidth, long nRealHeight ) Point aPos( 0, nRealHeight ); aPos.Y() -= nHorSBarHeight; -#ifdef WIN - // vom linken und unteren Rand ein Pixel abschneiden - aPos.Y()++; - aPos.X()--; -#endif #ifdef OS2 aPos.Y()++; #endif @@ -1717,7 +1712,7 @@ void SvImpIconView::PositionScrollBars( long nRealWidth, long nRealHeight ) aPos.X() = nRealWidth; aPos.Y() = 0; aPos.X() -= nVerSBarWidth; -#if defined(WIN) || defined(WNT) +#if defined(WNT) aPos.X()++; aPos.Y()--; #endif @@ -1809,7 +1804,7 @@ void SvImpIconView::AdjustScrollBars() // size ver scrollbar long nThumb = aVerSBar.GetThumbPos(); Size aSize( nVerSBarWidth, nRealHeight ); -#if defined(WIN) || defined(WNT) +#if defined(WNT) aSize.Height() += 2; #endif #ifdef OS2 @@ -1834,7 +1829,7 @@ void SvImpIconView::AdjustScrollBars() nThumb = aHorSBar.GetThumbPos(); aSize.Width() = nRealWidth; aSize.Height() = nHorSBarHeight; -#if defined(WIN) || defined(WNT) +#if defined(WNT) aSize.Width()++; #endif #ifdef OS2 @@ -1842,7 +1837,7 @@ void SvImpIconView::AdjustScrollBars() if( nResult & 0x0001 ) // vertikale Scrollbar ? aSize.Width()--; #endif -#if defined(WIN) || defined(WNT) +#if defined(WNT) if( nResult & 0x0001 ) // vertikale Scrollbar ? { aSize.Width()++; @@ -1868,7 +1863,7 @@ void SvImpIconView::AdjustScrollBars() nRealWidth++; #endif aOutputSize.Width() = nRealWidth; -#if defined(WIN) || defined(WNT) +#if defined(WNT) if( nResult & 0x0002 ) // hor scrollbar ? nRealHeight++; // weil unterer Rand geclippt wird #endif diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 3395dffc28f5..1b96f1ac89e4 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -139,16 +139,6 @@ void SvTreeEntryList::DestroyAll() } - - -#if defined (WIN) && defined (MSC) -// siehe BugId 42896: Die Funktionen Prev, PrevVisible, Next, NextVisible -// (andere?) funktionieren nicht mit Optimierung. -#pragma optimize ("", off) -#endif - - - /************************************************************************* |* |* SvTreeList:: diff --git a/svtools/source/control/ctrldll.cxx b/svtools/source/control/ctrldll.cxx deleted file mode 100644 index 2f3ff037be31..000000000000 --- a/svtools/source/control/ctrldll.cxx +++ /dev/null @@ -1,78 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#ifdef WIN -#include <svwin.h> - -#ifndef _SYSDEP_HXX -#include <sysdep.hxx> -#endif - -// Statische DLL-Verwaltungs-Variablen -static HINSTANCE hDLLInst = 0; // HANDLE der DLL - -/*************************************************************************** -|* -|* LibMain() -|* -|* Beschreibung Initialisierungsfunktion der DLL -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ - -extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) -{ -#ifndef WNT - if ( nHeap ) - UnlockData( 0 ); -#endif - - hDLLInst = hDLL; - - return TRUE; -} - -/*************************************************************************** -|* -|* WEP() -|* -|* Beschreibung DLL-Deinitialisierung -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ - -extern "C" int CALLBACK WEP( int ) -{ - return 1; -} - -#endif diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx index b0e77d658931..798ff87e02ac 100644 --- a/svtools/source/dialogs/filedlg2.cxx +++ b/svtools/source/dialogs/filedlg2.cxx @@ -347,7 +347,7 @@ IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn ) if ( pBtn == pHomeBtn ) { ::rtl::OUString aHomeDir; - NAMESPACE_VOS( OSecurity ) aSecurity; + vos:: OSecurity aSecurity; if ( aSecurity.getHomeDir( aHomeDir ) ) { DirEntry aFile ( aHomeDir ); diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx index 038930ef80ee..8ca6ba2b124e 100644 --- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx @@ -49,7 +49,7 @@ #include <unotools/syslocale.hxx> #include "vcl/svapp.hxx" -#if defined WIN || (defined OS2 && !defined ICC) +#if (defined OS2 && !defined ICC) #define EXPDLG_FUNCTION_NAME "_DoExportDialog" #else #define EXPDLG_FUNCTION_NAME "DoExportDialog" diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx index c8a79d3a35cd..db1f4c11cf94 100644 --- a/svtools/source/filter.vcl/filter/filter.cxx +++ b/svtools/source/filter.vcl/filter/filter.cxx @@ -79,7 +79,7 @@ #define PMGCHUNG_msOG 0x6d734f47 // Microsoft Office Animated GIF -#if defined WIN || (defined OS2 && !defined ICC) +#if (defined OS2 && !defined ICC) #define IMPORT_FUNCTION_NAME "_GraphicImport" #define EXPORT_FUNCTION_NAME "_GraphicExport" diff --git a/svtools/source/filter.vcl/filter/fldll.cxx b/svtools/source/filter.vcl/filter/fldll.cxx deleted file mode 100644 index b44e08835f34..000000000000 --- a/svtools/source/filter.vcl/filter/fldll.cxx +++ /dev/null @@ -1,76 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#ifdef WIN -#include <svwin.h> - -// Statische DLL-Verwaltungs-Variablen -static HINSTANCE hDLLInst = 0; // HANDLE der DLL - - -/*************************************************************************** -|* -|* LibMain() -|* -|* Beschreibung Initialisierungsfunktion der DLL -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ - -extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) -{ -#ifndef WNT - if ( nHeap ) - UnlockData( 0 ); -#endif - - hDLLInst = hDLL; - - return TRUE; -} - -/*************************************************************************** -|* -|* WEP() -|* -|* Beschreibung DLL-Deinitialisierung -|* Ersterstellung TH 05.05.93 -|* Letzte Aenderung TH 05.05.93 -|* -***************************************************************************/ - -extern "C" int CALLBACK WEP( int ) -{ - return 1; -} - -#endif - diff --git a/svtools/source/filter.vcl/filter/sgfbram.cxx b/svtools/source/filter.vcl/filter/sgfbram.cxx index 43cf0fbbacd3..3d1a71f5a2db 100644 --- a/svtools/source/filter.vcl/filter/sgfbram.cxx +++ b/svtools/source/filter.vcl/filter/sgfbram.cxx @@ -37,10 +37,6 @@ #include "sgffilt.hxx" #include "sgfbram.hxx" -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "SVTOOLS_FILTER4", "SVTOOLS_CODE" ) -#endif - /************************************************************************* |* |* operator>>( SvStream&, SgfHeader& ) diff --git a/svtools/source/filter.vcl/filter/sgvmain.cxx b/svtools/source/filter.vcl/filter/sgvmain.cxx index e175380244b3..293c6dab7964 100644 --- a/svtools/source/filter.vcl/filter/sgvmain.cxx +++ b/svtools/source/filter.vcl/filter/sgvmain.cxx @@ -110,20 +110,11 @@ // //////////////////////////////////////////////////////////////////////////////////////////////////// -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "svtools", "AUTO_CODE" ) -#endif - //////////////////////////////////////////////////////////////////////////////////////////////////// // Fuer Fontuebersetzung /////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// SgfFontLst* pSgfFonts = 0; -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "SVTOOLS_FILTER3", "SVTOOLS_CODE" ) -static void AntiMscBug() {} -#endif - //////////////////////////////////////////////////////////////////////////////////////////////////// // Fuer Kreisunterarten, Text und gedrehte Rechtecke /////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1137,7 +1128,3 @@ for n:=0 to 63 do end; */ -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "svtools", "AUTO_CODE" ) -#endif - diff --git a/svtools/source/filter.vcl/filter/sgvspln.cxx b/svtools/source/filter.vcl/filter/sgvspln.cxx index 7a23e85f4dbe..d695e171a194 100644 --- a/svtools/source/filter.vcl/filter/sgvspln.cxx +++ b/svtools/source/filter.vcl/filter/sgvspln.cxx @@ -33,11 +33,6 @@ #include <tools/poly.hxx> -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "SVTOOLS_FILTER2", "SVTOOLS_CODE" ) -#pragma optimize( "", off ) -#endif - #if defined( PM2 ) && defined( __BORLANDC__ ) #pragma option -Od #endif diff --git a/svtools/source/filter.vcl/filter/sgvtext.cxx b/svtools/source/filter.vcl/filter/sgvtext.cxx index 4a0be80b55be..9a82cd486599 100644 --- a/svtools/source/filter.vcl/filter/sgvtext.cxx +++ b/svtools/source/filter.vcl/filter/sgvtext.cxx @@ -38,10 +38,6 @@ extern SgfFontLst* pSgfFonts; -#if defined( WIN ) && defined( MSC ) -#pragma code_seg( "SVTOOLS_FILTER1", "SVTOOLS_CODE" ) -#endif - #ifndef abs #define abs(x) ((x)<0 ? -(x) : (x)) #endif @@ -621,7 +617,7 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr switch (Atr.GetFont()) { case 92500: case 92501: case 92504: case 92505: { -#if defined(WIN) || defined(WNT) || defined(PM2) +#if defined(WNT) || defined(PM2) FNam=String::CreateFromAscii( "Times New Roman" ); // CG Times ist unter Windows und OS/2 Times New Roman #else FNam=String::CreateFromAscii( "Times" ); // ansonsten ist das einfach Times @@ -630,7 +626,7 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr aFont.SetFamily(FAMILY_ROMAN); } break; case 94021: case 94022: case 94023: case 94024: { -#if defined(WIN) || defined(WNT) +#if defined(WNT) FNam=String::CreateFromAscii( "Arial", 5 ); // Univers ist unter Windows Arial #else FNam=String::CreateFromAscii( "Helvetica" ); // und ansonsten Helvetica @@ -639,7 +635,7 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr StdBrei=47; } break; case 93950: case 93951: case 93952: case 93953: { -#if defined(WIN) || defined(WNT) +#if defined(WNT) FNam=String::CreateFromAscii( "Courier New" ); // Der Vector-Courierfont unter Windows heisst Courier New #else FNam=String::CreateFromAscii( "Courier" ); // ansonsten ist und bleibt Courier immer Courier diff --git a/svtools/source/filter.vcl/jpeg/jpeg.h b/svtools/source/filter.vcl/jpeg/jpeg.h index deb06600474c..82a2f80a838c 100644 --- a/svtools/source/filter.vcl/jpeg/jpeg.h +++ b/svtools/source/filter.vcl/jpeg/jpeg.h @@ -51,11 +51,7 @@ struct JPEGCreateBitmapParam typedef struct my_error_mgr* my_error_ptr; typedef unsigned char BYTE; -#ifdef WIN -typedef unsigned char _huge* HPBYTE; -#else typedef unsigned char* HPBYTE; -#endif void* JPEGMalloc( size_t size ); void JPEGFree( void *ptr ); diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index bf9e87d33a74..8834f5497e5a 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -64,7 +64,7 @@ static USHORT aWndFunc( { - NAMESPACE_VOS( OGuard ) aGuard( Application::GetSolarMutex() ); + vos:: OGuard aGuard( Application::GetSolarMutex() ); // aus den Flags die benoetigten WinBits ermitteln WinBits eBits=0; @@ -377,7 +377,7 @@ BOOL SfxErrorHandler::GetErrorString( */ { - NAMESPACE_VOS( OGuard ) aGuard( Application::GetSolarMutex() ); + vos:: OGuard aGuard( Application::GetSolarMutex() ); BOOL bRet = FALSE; rStr=String(SvtResId(RID_ERRHDL_CLASS)); @@ -454,7 +454,7 @@ BOOL SfxErrorContext::GetString(ULONG nErrId, String &rStr) } if( pMgr ) { - NAMESPACE_VOS( OGuard ) aGuard( Application::GetSolarMutex() ); + vos:: OGuard aGuard( Application::GetSolarMutex() ); ResId aResId( nResId, *pMgr ); diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx index 25f23e2ef00b..4378e0acd234 100644 --- a/svtools/source/misc/imap.cxx +++ b/svtools/source/misc/imap.cxx @@ -57,10 +57,6 @@ UINT16 IMapObject::nActualTextEncoding = (UINT16) RTL_TEXTENCODING_DONTKNOW; /******************************************************************************/ -#ifdef WIN -#pragma optimize ( "", off ) -#endif - IMapObject::IMapObject() : bActive( false ) , nReadVersion( 0 ) @@ -1224,9 +1220,3 @@ void ImageMap::Read( SvStream& rIStm, const String& rBaseURL ) rIStm.SetNumberFormatInt( nOldFormat ); } - -#ifdef WIN -#pragma optimize ( "", on ) -#endif - - diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx index 9834fe0fcb76..587a31d4f098 100644 --- a/svtools/source/misc/imap2.cxx +++ b/svtools/source/misc/imap2.cxx @@ -28,9 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifdef WIN -#include <sysdep.hxx> -#endif #include <string.h> // #include <math.h> #include <vcl/svapp.hxx> @@ -48,9 +45,6 @@ #include <svtools/imapcirc.hxx> #include <svtools/imappoly.hxx> -#ifdef WIN -#include <sysdep.hxx> -#endif #include <string.h> #include <math.h> diff --git a/toolkit/inc/toolkit/awt/vclxdevice.hxx b/toolkit/inc/toolkit/awt/vclxdevice.hxx index 62753a36136d..bb1c35078055 100644 --- a/toolkit/inc/toolkit/awt/vclxdevice.hxx +++ b/toolkit/inc/toolkit/awt/vclxdevice.hxx @@ -58,7 +58,7 @@ class TOOLKIT_DLLPUBLIC VCLXDevice : public ::com::sun::star::awt::XDevice, friend class VCLXGraphics; private: - NAMESPACE_VOS(IMutex)& mrMutex; // Reference to SolarMutex + vos::IMutex& mrMutex; // Reference to SolarMutex OutputDevice* mpOutputDevice; public: @@ -66,7 +66,7 @@ public: sal_uInt32 nFlags; protected: - NAMESPACE_VOS(IMutex)& GetMutex() { return mrMutex; } + vos::IMutex& GetMutex() { return mrMutex; } void DestroyOutputDevice(); public: diff --git a/toolkit/inc/toolkit/awt/vclxgraphics.hxx b/toolkit/inc/toolkit/awt/vclxgraphics.hxx index 5fda9ac947ee..6a076a5339b8 100644 --- a/toolkit/inc/toolkit/awt/vclxgraphics.hxx +++ b/toolkit/inc/toolkit/awt/vclxgraphics.hxx @@ -60,7 +60,7 @@ class VCLXGraphics : public ::com::sun::star::awt::XGraphics, public ::cppu::OWeakObject { private: - NAMESPACE_VOS(IMutex)& mrMutex; // Reference to SolarMutex + vos::IMutex& mrMutex; // Reference to SolarMutex ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDevice> mxDevice; // nur um bei getDevice() immer das gleiche zurueckzugeben OutputDevice* mpOutputDevice; @@ -73,7 +73,7 @@ private: Region* mpClipRegion; protected: - NAMESPACE_VOS(IMutex)& GetMutex() { return mrMutex; } + vos::IMutex& GetMutex() { return mrMutex; } public: VCLXGraphics(); diff --git a/toolkit/inc/toolkit/helper/throbberimpl.hxx b/toolkit/inc/toolkit/helper/throbberimpl.hxx index 5ca6ec83d330..b944a74b65d2 100644 --- a/toolkit/inc/toolkit/helper/throbberimpl.hxx +++ b/toolkit/inc/toolkit/helper/throbberimpl.hxx @@ -43,7 +43,7 @@ namespace toolkit class Throbber_Impl { private: - NAMESPACE_VOS(IMutex)& mrMutex; // Reference to SolarMutex + vos::IMutex& mrMutex; // Reference to SolarMutex ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > maImageList; ::com::sun::star::uno::Reference< VCLXWindow > mxParent; @@ -55,7 +55,7 @@ namespace toolkit DECL_LINK( TimeOutHdl, Throbber_Impl* ); - NAMESPACE_VOS(IMutex)& GetMutex() { return mrMutex; } + vos::IMutex& GetMutex() { return mrMutex; } public: Throbber_Impl( ::com::sun::star::uno::Reference< VCLXWindow > xParent, diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index bfbdb531e8d2..edaf64799d43 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -109,7 +109,7 @@ void VCLXGraphics::InitOutputDevice( sal_uInt16 nFlags ) { if(mpOutputDevice) { - NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() ); + vos::OGuard aVclGuard( Application::GetSolarMutex() ); if ( nFlags & INITOUTDEV_FONT ) { diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index f85e29c21099..1af422bf7f00 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -659,7 +659,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, if ( nType ) { - NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() ); + vos::OGuard aVclGuard( Application::GetSolarMutex() ); switch ( (WindowType)nType ) { case WINDOW_CANCELBUTTON: diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx index daea557d241a..3572607772dc 100644 --- a/toolkit/source/awt/vclxwindow1.cxx +++ b/toolkit/source/awt/vclxwindow1.cxx @@ -93,7 +93,7 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle ) // create system parent data SystemParentData aSysParentData; aSysParentData.nSize = sizeof ( SystemParentData ); -#if defined( WIN ) || defined( WNT ) || defined ( OS2 ) +#if defined( WNT ) || defined ( OS2 ) aSysParentData.hWnd = (HWND) nHandle; #elif defined( QUARTZ ) aSysParentData.pView = reinterpret_cast<NSView*>(nHandle); diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index eb45dd521d9a..075080906900 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -653,7 +653,7 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent // #82300# - 2000-12-21 - fs@openoffice.org if (bNeedNewPeer && xParent.is()) { - NAMESPACE_VOS(OGuard) aVclGuard( Application::GetSolarMutex() ); + vos::OGuard aVclGuard( Application::GetSolarMutex() ); // and now this is the final withdrawal: // With 83561, I have no other idea than locking the SolarMutex here .... // I really hate the fact that VCL is not theadsafe .... diff --git a/tools/inc/bootstrp/prj.hxx b/tools/inc/bootstrp/prj.hxx index 2d7664b8b69f..994418bae4b5 100644 --- a/tools/inc/bootstrp/prj.hxx +++ b/tools/inc/bootstrp/prj.hxx @@ -264,7 +264,7 @@ private: static Link aDBNotFoundHdl; protected: - NAMESPACE_VOS( OMutex ) aMutex; + vos:: OMutex aMutex; USHORT nStarMode; SolarFileList aFileList; diff --git a/tools/inc/poly.h b/tools/inc/poly.h index e6678e071f28..9228715b8da7 100644 --- a/tools/inc/poly.h +++ b/tools/inc/poly.h @@ -39,15 +39,8 @@ class ImplPolygonData { public: -#ifdef WIN - Point huge* mpPointAry; - BYTE* mpFlagAry; - GLOBALHANDLE mhPoints; -#else Point* mpPointAry; BYTE* mpFlagAry; -#endif - USHORT mnPoints; ULONG mnRefCount; }; diff --git a/tools/inc/tools/agapi.hxx b/tools/inc/tools/agapi.hxx deleted file mode 100644 index 9c71bd35c6cc..000000000000 --- a/tools/inc/tools/agapi.hxx +++ /dev/null @@ -1,67 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _AGAPI_HXX -#define _AGAPI_HXX - -#include <tools/solar.h> - -class INetURLObject; -class ChannelList; -class AgentItem; -class String; - -class AgentApi -{ -protected: - friend class ChannelList; - - AgentItem* pChannelAgent; - virtual BOOL StartAgent() = 0; - - AgentApi(AgentItem* pAgent) { pChannelAgent = pAgent; } - -public: - virtual ~AgentApi() {} - - virtual void InitAgent() = 0; - virtual void ShutDownAgent() = 0; - - virtual BOOL NewDataPermission(const String& rChannelName) = 0; - virtual void NewData(const String& rChannelName, - const INetURLObject& rURL) = 0; - virtual void NotifyChannelObjFile(const INetURLObject& rURL, - const String& rFileName) = 0; - virtual void NotifyChannelObjData(const INetURLObject& rURL, - void* pBuffer, long nOffset, long nLen, long nTotalLen) = 0; - - virtual void RegisterChannels() = 0; - virtual void RegisterUpdateTransmitter() = 0; -}; - -#endif //_AGAPI_HXX - diff --git a/tools/inc/tools/agitem.hxx b/tools/inc/tools/agitem.hxx deleted file mode 100644 index 3177bdffa0a8..000000000000 --- a/tools/inc/tools/agitem.hxx +++ /dev/null @@ -1,51 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _AGITEM_HXX -#define _AGITEM_HXX - -#include <tools/solar.h> - -class String; -class INetURLObject; -class AgentApi; -class ChApi; - -class AgentItem -{ -public: - virtual const String& GetChAgentName() const = 0; - virtual const INetURLObject& GetLocation() const = 0; - virtual AgentApi* GetApi() const = 0; - virtual ChApi* GetChApi() const = 0; - - virtual void SetIsActive(BOOL bNew) = 0; - virtual BOOL IsActive() const = 0; -}; - -#endif //_AGITEM_HXX - diff --git a/tools/inc/tools/chapi.hxx b/tools/inc/tools/chapi.hxx deleted file mode 100644 index 0acfe4cb2ca5..000000000000 --- a/tools/inc/tools/chapi.hxx +++ /dev/null @@ -1,68 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _CHAPI_HXX -#define _CHAPI_HXX - -#include <tools/solar.h> - -class ChannelAgentItem; -class INetURLObject; -class String; - -enum RequestType { - REQTYP_LOCAL_FILE = 1, - REQTYP_MEMORY = 2 -}; - -class ChApi -{ -public: - virtual ~ChApi() {} - - virtual void ShutDownAgent() = 0; - virtual void SetLastSuccUpd() = 0; - - virtual void GetChannelObject( const INetURLObject& rURL, RequestType eStreamType, - const String& rFileName ) = 0; - virtual void AddChannelItem( const String& aChName, const INetURLObject& aTransmitter, - const String& aChannel, USHORT nUpdPeriode, - const String& rChAgentName ) = 0; - virtual void DelChannelItem( const String& aChName ) = 0; - virtual void SetChTransmitter( const String& aChName, const String& rNewVal ) = 0; - virtual void SetChannel( const String& aChName, const String& rNewVal ) = 0; - virtual void SetChannelName( const String& aChName, const String& rNewVal ) = 0; - virtual void SetChUpdPeriode( const String& aChName, USHORT nUpdPeriode ) = 0; - virtual void SetChannelAgentName( const String& aChName, const String& rNewVal ) = 0; - - virtual void SetUpdateTransmitter(ChannelAgentItem* pAgent, const INetURLObject& rTransmitter) = 0; -}; - -//////////////////////////////////////////////////////////////////////////////// -// - -#endif //_CHAPI_HXX diff --git a/tools/inc/tools/download.hxx b/tools/inc/tools/download.hxx deleted file mode 100644 index b187433927cd..000000000000 --- a/tools/inc/tools/download.hxx +++ /dev/null @@ -1,56 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _DOWNLOAD_HXX -#define _DOWNLOAD_HXX - -// Forward declarations -class String; -class Link; - -#define DOWNLOAD_SUCCESS 0 -#define DOWNLOAD_CONNECT 1 -#define DOWNLOAD_LOCATION 2 -#define DOWNLOAD_ABORT 3 -#define DOWNLOAD_FILEACCESS 4 -#define DOWNLOAD_INSTALL 5 -#define DOWNLOAD_ERROR 6 - -class Downloader -/* *************************************************************************** -Purpose: Abstract base class for a file downloader -*************************************************************************** */ -{ -public: - Downloader() {}; - - virtual void Download(const String &rDestLocation, - const String &rSourceLocation, - const Link &rFinishedLink) = 0; -}; - -#endif diff --git a/tools/inc/tools/eacopier.hxx b/tools/inc/tools/eacopier.hxx deleted file mode 100644 index c80eeb0d35cc..000000000000 --- a/tools/inc/tools/eacopier.hxx +++ /dev/null @@ -1,47 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _EACOPIER_HXX -#define _EACOPIER_HXX - -#include <tools/solar.h> - -class SvFileStream; - -class EA_Copier -{ - static EA_Copier* _pCopier; - -public: - static void Register( EA_Copier* pCopier ); - static EA_Copier* Get(); - - virtual ~EA_Copier(); - virtual BOOL Copy( const SvFileStream& rFrom, const SvFileStream& rTo ) const = 0; -}; - -#endif - diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx index 880768c89d8c..5ef51803734b 100644 --- a/tools/inc/tools/fsys.hxx +++ b/tools/inc/tools/fsys.hxx @@ -159,21 +159,10 @@ enum FSysExact // - Char-Set - // ------------ -#if defined(WIN) || defined(W30) - -// MS-Windows has different char-sets for file-system and user-interface -String Gui2FSys( const String& rStr ); -String FSys2Gui( const String& rStr ); -#define GUI2FSYS(s) Gui2FSys( s ) -#define FSYS2GUI(s) FSys2Gui( s ) - -#else - -// all other OS have the same char-set for both +// Was different for WIN, no longer needed... #define GUI2FSYS(s) s #define FSYS2GUI(s) s -#endif // ------------ // - FileStat - diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx index 0d14385e5f08..2575ccae8f3e 100644 --- a/tools/inc/tools/pstm.hxx +++ b/tools/inc/tools/pstm.hxx @@ -60,16 +60,7 @@ public: }; /************************** S v R t t i B a s e **************************/ -/* -#if defined (DOS) && defined (STC) -#ifdef WIN -#error Fuer Win muss der Kram virtual sein (MM/MH) -#endif -class SvRttiBase : public SvRefBase -#else -class SvRttiBase : virtual public SvRefBase -#endif -*/ + class TOOLS_DLLPUBLIC SvRttiBase : public SvRefBase { public: diff --git a/tools/inc/tools/simplerm.hxx b/tools/inc/tools/simplerm.hxx index c16fe41abc0b..6b8f31147f96 100644 --- a/tools/inc/tools/simplerm.hxx +++ b/tools/inc/tools/simplerm.hxx @@ -46,7 +46,7 @@ class InternalResMgr; class TOOLS_DLLPUBLIC SimpleResMgr { protected: - NAMESPACE_VOS(OMutex) m_aAccessSafety; + vos::OMutex m_aAccessSafety; InternalResMgr* m_pResImpl; public: diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 096d34d05b9e..cc7c189fbf84 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -275,42 +275,6 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); } /* dll file extensions *******************************************************/ -/* many of these platforms are historic */ -#define SYSTEM_WINMSCI 1 -#define SYSTEM_WNTMSCI 2 -#define SYSTEM_WNTMSCA 3 -#define SYSTEM_WNTMSCP 4 -#define SYSTEM_WNTMSCM 5 -#define SYSTEM_OS2BLCI 6 -#define SYSTEM_OS2ICCI 7 -#define SYSTEM_OS2ICCI3 8 -#define SYSTEM_UNXLNXI 9 -#define SYSTEM_UNXSOLS 10 -#define SYSTEM_UNXBSDI 11 -#define SYSTEM_UNXBSDA 12 -#define SYSTEM_UNXSCOI 13 -#define SYSTEM_UNXAIXP 14 -#define SYSTEM_UNXHPXR 15 -#define SYSTEM_UNXSNIM 16 -#define SYSTEM_UNXMVSG 17 -#define SYSTEM_UNXIRXM 18 -// #define SYSTEM_MACOSP 19 -#define SYSTEM_UNXFBSDI 20 -#define SYSTEM_UNXSOLI 21 -#define SYSTEM_WINBLCI 22 -#define SYSTEM_UNXMACXP 23 -#define SYSTEM_UNXLNXP 24 -#define SYSTEM_UNXBSDS 25 -#define SYSTEM_UNXLNXR 26 -#define SYSTEM_UNXLNX3 28 -#define SYSTEM_UNXLNXS 29 -#define SYSTEM_UNXLNXX 30 -#define SYSTEM_UNXSOGS 31 -#define SYSTEM_UNXSOGI 32 -#define SYSTEM_UNXMACXI 33 -#define SYSTEM_OS2GCCI 34 -#define SYSTEM_WNTGCCI 99 - #if defined WNT #if defined(__MINGW32__) #define __DLLEXTENSION "gi" @@ -383,7 +347,6 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); } // ----------------------------------------------------------------------- -#define NOOLDSTRING #ifndef NOREPLACESTRING #define UniString String #define XubString String @@ -409,7 +372,7 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); } #define LIBRARY_CONCAT4( s1, s2, s3, s4 ) \ s1 s2 s3 s4 -#if defined WIN || defined WNT || defined OS2 +#if defined WNT || defined OS2 #define SVLIBRARY( Base ) \ LIBRARY_CONCAT3( Base, __DLLEXTENSION, ".DLL" ) #define SVLIBRARYLANG( Base, Lang ) \ diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index 8b86a1835596..1e438a1296b6 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -441,14 +441,6 @@ typedef struct _UniStringData #pragma pack() #endif -// ------------------- -// - UniString-Types - -// ------------------- - -#ifndef NOOLDSTRING -#define WSTRING_MAXLEN STRING_MAXLEN -#endif - // ------------- // - UniString - // ------------- diff --git a/tools/inc/tools/urlkeys.hxx b/tools/inc/tools/urlkeys.hxx deleted file mode 100644 index 28122657b7d4..000000000000 --- a/tools/inc/tools/urlkeys.hxx +++ /dev/null @@ -1,77 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef __URLKEYS_HXX -#define __URLKEYS_HXX - -// Defines for common keys in URL files - -// ANSI version - -#define A_URLSECTION_SHORTCUT "InternetShortcut" -#define A_URLKEY_URL "URL" -#define A_URLKEY_TITLE "Title" -#define A_URLKEY_TARGET "Target" -#define A_URLKEY_FRAME "Frame" -#define A_URLKEY_OPENAS "OpenAs" -#define A_URLKEY_SOICON "SOIcon" -#define A_URLKEY_WIN_ICONFILE "IconFile" -#define A_URLKEY_WIN_ICONINDEX "IconIndex" -#define A_URLKEY_WORKDIR "WorkingDirectory" -#define A_URLKEY_ARGUMENTS "Arguments" -#define A_URLKEY_INTERN_ORIGURL "[URL]" - -// Unicode version - -#define U_URLSECTION_SHORTCUT L"InternetShortcut" -#define U_URLKEY_URL L"URL" -#define U_URLKEY_TITLE L"Title" -#define U_URLKEY_TARGET L"Target" -#define U_URLKEY_FRAME L"Frame" -#define U_URLKEY_OPENAS L"OpenAs" -#define U_URLKEY_SOICON L"SOIcon" -#define U_URLKEY_WIN_ICONFILE L"IconFile" -#define U_URLKEY_WIN_ICONINDEX L"IconIndex" -#define U_URLKEY_WORKDIR L"WorkingDirectory" -#define U_URLKEY_ARGUMENTS L"Arguments" -#define U_URLKEY_INTERN_ORIGURL L"[URL]" - -# define URLSECTION_SHORTCUT U_URLSECTION_SHORTCUT -# define URLKEY_URL U_URLKEY_URL -# define URLKEY_TITLE U_URLKEY_TITLE -# define URLKEY_TARGET U_URLKEY_TARGET -# define URLKEY_FRAME U_URLKEY_FRAME -# define URLKEY_OPENAS U_URLKEY_OPENAS -# define URLKEY_SOICON U_URLKEY_SOICON -# define URLKEY_WIN_ICONFILE U_URLKEY_WIN_ICONFILE -# define URLKEY_WIN_ICONINDEX U_URLKEY_WIN_ICONINDEX -# define URLKEY_WORKDIR U_URLKEY_WORKDIR -# define URLKEY_ARGUMENTS U_URLKEY_ARGUMENTS -# define URLKEY_INTERN_ORIGURL U_URLKEY_INTERN_ORIGURL - -#endif // __URLKEYS_HXX - diff --git a/tools/prj/d.lst b/tools/prj/d.lst index 4a705025a89e..f2c508342015 100644 --- a/tools/prj/d.lst +++ b/tools/prj/d.lst @@ -45,7 +45,6 @@ mkdir: %_DEST%\inc%_EXT%\bootstrp ..\inc\tools\appendunixshellword.hxx %_DEST%\inc%_EXT%\tools\appendunixshellword.hxx ..\inc\tools\bigint.hxx %_DEST%\inc%_EXT%\tools\bigint.hxx ..\inc\tools\cachestr.hxx %_DEST%\inc%_EXT%\tools\cachestr.hxx -..\inc\tools\chapi.hxx %_DEST%\inc%_EXT%\tools\chapi.hxx ..\inc\tools\color.hxx %_DEST%\inc%_EXT%\tools\color.hxx ..\inc\tools\contnr.hxx %_DEST%\inc%_EXT%\tools\contnr.hxx ..\inc\tools\date.hxx %_DEST%\inc%_EXT%\tools\date.hxx diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx index 1bd43bffc4e7..74a2142db692 100644 --- a/tools/source/fsys/dirent.cxx +++ b/tools/source/fsys/dirent.cxx @@ -136,13 +136,13 @@ BOOL bInRedirection = TRUE; #else BOOL bInRedirection = FALSE; #endif -static NAMESPACE_VOS( OMutex )* pRedirectMutex = 0; +static vos:: OMutex * pRedirectMutex = 0; //------------------------------------------------------------------------ void FSysRedirector::Register( FSysRedirector *pRedirector ) { if ( pRedirector ) - pRedirectMutex = new NAMESPACE_VOS( OMutex ); + pRedirectMutex = new vos:: OMutex ; else DELETEZ( pRedirectMutex ); _pRedirector = pRedirector; @@ -165,7 +165,7 @@ void FSysRedirector::DoRedirect( String &rPath ) // Redirection is acessible only by one thread per time // dont move the guard behind the bInRedirection check!!! // think of nested calls (when called from callback) - NAMESPACE_VOS( OGuard ) aGuard( pRedirectMutex ); + vos:: OGuard aGuard( pRedirectMutex ); // if already in redirection, dont redirect if ( bInRedirection ) @@ -1040,8 +1040,8 @@ DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize ) BOOL DirEntry::Exists( FSysAccess nAccess ) const { #ifndef BOOTSTRAP - static NAMESPACE_VOS(OMutex) aLocalMutex; - NAMESPACE_VOS(OGuard) aGuard( aLocalMutex ); + static vos::OMutex aLocalMutex; + vos::OGuard aGuard( aLocalMutex ); #endif if ( !IsValid() ) return FALSE; diff --git a/tools/source/fsys/fstat.cxx b/tools/source/fsys/fstat.cxx index acdbe6bae510..a55c56b6efbb 100644 --- a/tools/source/fsys/fstat.cxx +++ b/tools/source/fsys/fstat.cxx @@ -28,11 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_tools.hxx" -#if defined( WIN) -#include <stdio.h> -#include <dos.h> -#endif - #ifdef UNX #include <errno.h> #endif diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index daeaf8e4c3a5..d05fcac331f2 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -837,18 +837,18 @@ void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr, static void RscException_Impl() { - switch ( NAMESPACE_VOS(OSignalHandler)::raise( OSL_SIGNAL_USER_RESOURCEFAILURE, (void*)"" ) ) + switch ( vos::OSignalHandler::raise( OSL_SIGNAL_USER_RESOURCEFAILURE, (void*)"" ) ) { - case NAMESPACE_VOS(OSignalHandler)::TAction_CallNextHandler: + case vos::OSignalHandler::TAction_CallNextHandler: abort(); - case NAMESPACE_VOS(OSignalHandler)::TAction_Ignore: + case vos::OSignalHandler::TAction_Ignore: return; - case NAMESPACE_VOS(OSignalHandler)::TAction_AbortApplication: + case vos::OSignalHandler::TAction_AbortApplication: abort(); - case NAMESPACE_VOS(OSignalHandler)::TAction_KillApplication: + case vos::OSignalHandler::TAction_KillApplication: exit(-1); } } @@ -1919,7 +1919,7 @@ SimpleResMgr* SimpleResMgr::Create( const sal_Char* pPrefixName, com::sun::star: // ----------------------------------------------------------------------- bool SimpleResMgr::IsAvailable( RESOURCE_TYPE _resourceType, sal_uInt32 _resourceId ) { - NAMESPACE_VOS(OGuard) aGuard(m_aAccessSafety); + vos::OGuard aGuard(m_aAccessSafety); if ( ( RSC_STRING != _resourceType ) && ( RSC_RESOURCE != _resourceType ) ) return false; @@ -1931,7 +1931,7 @@ bool SimpleResMgr::IsAvailable( RESOURCE_TYPE _resourceType, sal_uInt32 _resourc // ----------------------------------------------------------------------- UniString SimpleResMgr::ReadString( sal_uInt32 nId ) { - NAMESPACE_VOS(OGuard) aGuard(m_aAccessSafety); + vos::OGuard aGuard(m_aAccessSafety); DBG_ASSERT( m_pResImpl, "SimpleResMgr::ReadString : have no impl class !" ); // perhaps constructed with an invalid filename ? @@ -2002,7 +2002,7 @@ const ::com::sun::star::lang::Locale& SimpleResMgr::GetLocale() const sal_uInt32 SimpleResMgr::ReadBlob( sal_uInt32 nId, void** pBuffer ) { - NAMESPACE_VOS(OGuard) aGuard(m_aAccessSafety); + vos::OGuard aGuard(m_aAccessSafety); DBG_ASSERT( m_pResImpl, "SimpleResMgr::ReadBlob : have no impl class !" ); diff --git a/tools/source/solar/makefile.mk b/tools/source/solar/makefile.mk deleted file mode 100644 index 6f5dd85c608b..000000000000 --- a/tools/source/solar/makefile.mk +++ /dev/null @@ -1,63 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=mksvconf -TARGETTYPE=CUI - -LIBSALCPPRT=$(0) - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -CFILES= solar.c - -OBJFILES= $(OBJ)$/solar.obj - -APP1TARGET= $(TARGET) -APP1OBJS= $(OBJFILES) -APP1STDLIBS= -APP1DEPN= -APP1DEF= - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.IF "$(L10N-framework)"=="" -ALLTAR : $(INCCOM)$/svconf.h -.ENDIF # "$(L10N-framework)"=="" - -$(INCCOM)$/svconf.h : $(BIN)$/$(TARGET) - $(BIN)$/$(TARGET) $@ - diff --git a/tools/source/solar/solar.c b/tools/source/solar/solar.c deleted file mode 100644 index 608f0baf5129..000000000000 --- a/tools/source/solar/solar.c +++ /dev/null @@ -1,562 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -/* POSIX defines that a program is undefined after a SIG_SEGV. The - * code stopped working on Linux Kernel 2.6 so I have moved this back to - * use FORK. - * If at a later time the signals work correctly with the Linux Kernel 2.6 - * then this change may be reverted although not strictly posix safe. */ -#define USE_FORK_TO_CHECK 1 - -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> -#include <string.h> - -#include <unistd.h> -#include <sys/types.h> - -#define I_STDARG -#ifdef I_STDARG -#include <stdarg.h> -#else -#include <varargs.h> -#endif - -#define NO_USE_FORK_TO_CHECK -#ifdef USE_FORK_TO_CHECK -#include <sys/wait.h> -#else -#include <signal.h> -#include <setjmp.h> -#endif - -#define printTypeSize(Type,Name) printf( "sizeof(%s)\t= %d\n", Name, sizeof (Type) ) - -#define isSignedType(Type) (((Type)-1) < 0) -#define printTypeSign(Type,Name) printf( "%s\t= %s %s\n", Name, ( isSignedType(Type) ? "signed" : "unsigned" ), Name ) - - -/************************************************************************* -|* -|* IsBigEndian() -|* -|* Beschreibung True, wenn CPU BigEndian ist -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -int IsBigEndian() -{ - long l = 1; - return ! *(char*)&l; -} - -/************************************************************************* -|* -|* IsStackGrowingDown() -|* -|* Beschreibung True, wenn der Stack nach unten waechst -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -int IsStackGrowingDown_2( int * pI ) -{ - int i = 1; - return ((unsigned long)&i) < (unsigned long)pI; -} - -int IsStackGrowingDown() -{ - int i = 1; - return IsStackGrowingDown_2(&i); -} - -/************************************************************************* -|* -|* GetStackAlignment() -|* -|* Beschreibung Alignment von char Parametern, die (hoffentlich) -|* ueber den Stack uebergeben werden -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -int GetStackAlignment_3( char*p, long l, int i, short s, char b, char c, ... ) -{ - if ( IsStackGrowingDown() ) - return &c - &b; - else - return &b - &c; -} - -int GetStackAlignment_2( char*p, long l, int i, short s, char b, char c ) -{ - if ( IsStackGrowingDown() ) - return &c - &b; - else - return &b - &c; -} - -int GetStackAlignment() -{ - int nStackAlignment = GetStackAlignment_3(0,1,2,3,4,5); - if ( nStackAlignment != GetStackAlignment_2(0,1,2,3,4,5) ) - printf( "Pascal calling convention\n" ); - return nStackAlignment; -} - - -/************************************************************************* -|* -|* Typdeclarations for memory access test functions -|* -*************************************************************************/ -typedef enum { t_char, t_short, t_int, t_long, t_double } Type; -typedef int (*TestFunc)( Type, void* ); - - -/************************************************************************* -|* -|* PrintArgs() -|* -|* Beschreibung Testfunktion fuer variable Parameter -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -#ifdef I_STDARG -void PrintArgs( int p, ... ) -#else -void PrintArgs( p, va_alist ) -int p; -va_dcl -#endif -{ - int value; - va_list ap; - -#ifdef I_STDARG - va_start( ap, p ); -#else - va_start( ap ); -#endif - - printf( "value = %d", p ); - - while ( ( value = va_arg(ap, int) ) != 0 ) - printf( " %d", value ); - - printf( "\n" ); - va_end(ap); -} - -#ifndef USE_FORK_TO_CHECK -/************************************************************************* -|* -|* SignalHdl() -|* -|* Beschreibung faengt SIGBUS und SIGSEGV in check() ab -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -static jmp_buf check_env; -static int bSignal; -void SignalHdl( int sig ) -{ - bSignal = 1; - - fprintf( stderr, "Signal %d caught\n", sig ); - signal( SIGSEGV, SIG_DFL ); - signal( SIGBUS, SIG_DFL ); - siglongjmp( check_env, sig ); -} -#endif - -/************************************************************************* -|* -|* check() -|* -|* Beschreibung Testet MemoryZugriff (read/write) -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -int check( TestFunc func, Type eT, void* p ) -{ -#ifdef USE_FORK_TO_CHECK - pid_t nChild = fork(); - if ( nChild ) - { - int exitVal; - wait( &exitVal ); - if ( exitVal & 0xff ) - return -1; - else - return exitVal >> 8; - } - else - { - exit( func( eT, p ) ); - } -#else - int result; - - bSignal = 0; - - if ( !sigsetjmp( check_env, 1 ) ) - { - signal( SIGSEGV, SignalHdl ); - signal( SIGBUS, SignalHdl ); - result = func( eT, p ); - signal( SIGSEGV, SIG_DFL ); - signal( SIGBUS, SIG_DFL ); - } - - if ( bSignal ) - return -1; - else - return 0; -#endif -} - -/************************************************************************* -|* -|* GetAtAddress() -|* -|* Beschreibung memory read access -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -int GetAtAddress( Type eT, void* p ) -{ - switch ( eT ) - { - case t_char: return *((char*)p); - case t_short: return *((short*)p); - case t_int: return *((int*)p); - case t_long: return *((long*)p); - case t_double: return *((double*)p); - } - abort(); -} - -/************************************************************************* -|* -|* SetAtAddress() -|* -|* Beschreibung memory write access -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -int SetAtAddress( Type eT, void* p ) -{ - switch ( eT ) - { - case t_char: return *((char*)p) = 0; - case t_short: return *((short*)p) = 0; - case t_int: return *((int*)p) = 0; - case t_long: return *((long*)p) = 0; - case t_double: return *((double*)p)= 0; - } - abort(); -} - -char* TypeName( Type eT ) -{ - switch ( eT ) - { - case t_char: return "char"; - case t_short: return "short"; - case t_int: return "int"; - case t_long: return "long"; - case t_double: return "double"; - } - abort(); -} - -/************************************************************************* -|* -|* Check(Get|Set)Access() -|* -|* Beschreibung Testet MemoryZugriff (read/write) -|* Zugriffsverletzungen werden abgefangen -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -int CheckGetAccess( Type eT, void* p ) -{ - int b; - b = -1 != check( (TestFunc)GetAtAddress, eT, p ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, - "%s read %s at %p\n", - (b? "can" : "can not" ), TypeName(eT), p ); -#endif - return b; -} -int CheckSetAccess( Type eT, void* p ) -{ - int b; - - b = -1 != check( (TestFunc)SetAtAddress, eT, p ); -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, - "%s write %s at %p\n", - (b? "can" : "can not" ), TypeName(eT), p ); -#endif - return b; -} - -/************************************************************************* -|* -|* GetAlignment() -|* -|* Beschreibung Bestimmt das Alignment verschiedener Typen -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -int GetAlignment( Type eT ) -{ - char a[ 16*8 ]; - long p = (long)(void*)a; - int i; - - /* clear a[...] to set legal value for double access */ - for ( i = 0; i < 16*8; i++ ) - a[i] = 0; - - p = ( p + 0xF ) & ~0xF; - for ( i = 1; i < 16; i++ ) - if ( CheckGetAccess( eT, (void*)(p+i) ) ) - return i; - return 0; -} - -/************************************************************************* -|* -|* struct Description -|* -|* Beschreibung Beschreibt die Parameter der Architektur -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -struct Description -{ - int bBigEndian; - int bStackGrowsDown; - int nStackAlignment; - int nAlignment[3]; /* 2,4,8 */ -}; - -/************************************************************************* -|* -|* Description_Ctor() -|* -|* Beschreibung Bestimmt die Parameter der Architektur -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -void Description_Ctor( struct Description* pThis ) -{ - pThis->bBigEndian = IsBigEndian(); - pThis->bStackGrowsDown = IsStackGrowingDown(); - pThis->nStackAlignment = GetStackAlignment(); - - if ( sizeof(short) != 2 ) - abort(); - pThis->nAlignment[0] = GetAlignment( t_short ); - if ( sizeof(int) != 4 ) - abort(); - pThis->nAlignment[1] = GetAlignment( t_int ); - - if ( sizeof(long) == 8 ) - pThis->nAlignment[2] = GetAlignment( t_long ); - else if ( sizeof(double) == 8 ) - pThis->nAlignment[2] = GetAlignment( t_double ); - else - abort(); -} - -/************************************************************************* -|* -|* Description_Print() -|* -|* Beschreibung Schreibt die Parameter der Architektur als Header -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -void Description_Print( struct Description* pThis, char* name ) -{ - int i; - FILE* f = fopen( name, "w" ); - if( ! f ) { - fprintf( stderr, "Unable to open file %s: %s\n", name, strerror( errno ) ); - exit( 99 ); - } - fprintf( f, "#define __%s\n", - pThis->bBigEndian ? "BIGENDIAN" : "LITTLEENDIAN" ); - for ( i = 0; i < 3; i++ ) - fprintf( f, "#define __ALIGNMENT%d\t%d\n", - 1 << (i+1), pThis->nAlignment[i] ); - fprintf( f, "/* Stack alignment is not used... */\n" ); - fprintf( f, "#define __STACKALIGNMENT\t%d\n", pThis->nStackAlignment ); - fprintf( f, "#define __STACKDIRECTION\t%d\n", - pThis->bStackGrowsDown ? -1 : 1 ); - fprintf( f, "#define __SIZEOFCHAR\t%d\n", sizeof( char ) ); - fprintf( f, "#define __SIZEOFSHORT\t%d\n", sizeof( short ) ); - fprintf( f, "#define __SIZEOFINT\t%d\n", sizeof( int ) ); - fprintf( f, "#define __SIZEOFLONG\t%d\n", sizeof( long ) ); - fprintf( f, "#define __SIZEOFPOINTER\t%d\n", sizeof( void* ) ); - fprintf( f, "#define __SIZEOFDOUBLE\t%d\n", sizeof( double ) ); - fprintf( f, "#define __IEEEDOUBLE\n" ); - fclose( f ); -} - -/************************************************************************* -|* -|* InfoMemoryAccess() -|* -|* Beschreibung Informeller Bytezugriffstest -|* -|* Ersterstellung EG 26.06.96 -|* Letzte Aenderung -|* -*************************************************************************/ -void InfoMemoryAccess( char* p ) -{ - if ( CheckGetAccess( t_char, p ) ) - printf( "can read address %p\n", p ); - else - printf( "can not read address %p\n", p ); - - if ( CheckSetAccess( t_char, p ) ) - printf( "can write address %p\n", p ); - else - printf( "can not write address %p\n", p ); -} - -/************************************************************************* -|* -|* InfoMemoryTypeAccess() -|* -|* Beschreibung Informeller Zugriffstest verschiedener Typen -|* -|* Ersterstellung EG 15.08.96 -|* Letzte Aenderung -|* -*************************************************************************/ -void InfoMemoryTypeAccess( Type eT ) -{ - char a[64]; - int i; - - /* clear a[...] to set legal value for double access */ - for ( i = 0; i < 64; i++ ) - a[i] = 0; - - for ( i = 56; i >= 7; i >>= 1 ) - { - printf( "Zugriff %s auf %i-Aligned Adresse : ", TypeName( eT ), i / 7 ); - printf( ( CheckGetAccess( eT, (long*)&a[i] ) ? "OK\n" : "ERROR\n" ) ); - } -} -/************************************************************************ - * - * Use C code to determine the characteristics of the building platform. - * - ************************************************************************/ -int main( int argc, char* argv[] ) -{ - printTypeSign( char, "char" ); - printTypeSign( short, "short" ); - printTypeSign( int, "int" ); - printTypeSign( long, "long" ); - - printTypeSize( char, "char" ); - printTypeSize( short, "short" ); - printTypeSize( int, "int" ); - printTypeSize( long, "long" ); - printTypeSize( float, "float" ); - printTypeSize( double, "double" ); - printTypeSize( void *, "void *" ); - - if ( IsBigEndian() ) - printf( "BIGENDIAN (Sparc, MC680x0, RS6000, IP22, IP32, g3)\n" ); - else - printf( "LITTLEENDIAN (Intel, VAX, PowerPC)\n" ); - - if( IsStackGrowingDown() ) - printf( "Stack waechst nach unten\n" ); - else - printf( "Stack waechst nach oben\n" ); - - printf( "STACKALIGNMENT : %d\n", GetStackAlignment() ); - - /* PrintArgs( 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 ); */ - - if ( argc > 1 ) - { - struct Description description; - Description_Ctor( &description ); - Description_Print( &description, argv[1] ); - } - { - char* p = NULL; - InfoMemoryAccess( p ); - p = (char*)&p; - InfoMemoryAccess( p ); - InfoMemoryTypeAccess( t_short ); - InfoMemoryTypeAccess( t_int ); - InfoMemoryTypeAccess( t_long ); - InfoMemoryTypeAccess( t_double ); - } - - exit( 0 ); -} diff --git a/tools/source/stream/strmos2.cxx b/tools/source/stream/strmos2.cxx index d211d7790b08..a35fc7731767 100644 --- a/tools/source/stream/strmos2.cxx +++ b/tools/source/stream/strmos2.cxx @@ -757,108 +757,4 @@ void SvFileStream::SetSize( ULONG nSize ) } } -#if 0 -/************************************************************************* -|* -|* SvSharedMemoryStream::AllocateMemory() -|* -|* Beschreibung STREAM.SDW -|* Ersterstellung CL 05.05.95 -|* Letzte Aenderung CL 05.05.95 -|* -*************************************************************************/ - -sal_Bool SvSharedMemoryStream::AllocateMemory( ULONG nNewSize ) -{ - DBG_ASSERT(aHandle==0,"Keine Handles unter OS/2"); - DBG_ASSERT(nNewSize,"Cannot allocate zero Bytes"); - APIRET nRet = DosAllocSharedMem( (void**)&pBuf, (PSZ)NULL, nNewSize, - PAG_READ | PAG_WRITE | PAG_COMMIT | - OBJ_GIVEABLE | OBJ_GETTABLE | OBJ_ANY); - return( nRet == 0 ); -} - -/************************************************************************* -|* -|* SvSharedMemoryStream::ReAllocateMemory() (Bozo-Algorithmus) -|* -|* Beschreibung STREAM.SDW -|* Ersterstellung CL 05.05.95 -|* Letzte Aenderung CL 05.05.95 -|* -*************************************************************************/ - -sal_Bool SvSharedMemoryStream::ReAllocateMemory( long nDiff ) -{ - DBG_ASSERT(aHandle==0,"Keine Handles unter OS/2"); - sal_Bool bRetVal = FALSE; - ULONG nNewSize = nSize + nDiff; - if( nNewSize ) - { - // neuen Speicher nicht ueber AllocateMemory holen, da wir den - // alten Speicher behalten wollen, falls nicht genuegend Platz - // fuer den neuen Block da ist - char* pNewBuf; - APIRET nRet = DosAllocSharedMem( (void**)&pNewBuf,(PSZ)NULL,nNewSize, - PAG_READ | PAG_WRITE | PAG_COMMIT | - OBJ_GIVEABLE | OBJ_GETTABLE | OBJ_ANY); - DBG_ASSERT(!nRet,"DosAllocSharedMem failed"); - - if( !nRet ) - { - bRetVal = TRUE; // Success! - if( nNewSize < nSize ) // Verkleinern ? - { - memcpy( pNewBuf, pBuf, (size_t)nNewSize ); - if( nPos > nNewSize ) - nPos = 0L; - if( nEndOfData >= nNewSize ) - nEndOfData = nNewSize-1L; - } - else - memcpy( pNewBuf, pBuf, (size_t)nSize ); - - FreeMemory(); // den alten Block loeschen ... - // und den neuen Block in Dienst stellen - pBuf = (sal_uInt8*)pNewBuf; - nSize = nNewSize; - } - } - else - { - bRetVal = TRUE; - FreeMemory(); - pBuf = 0; - nSize = 0; - nEndOfData = 0; - } - return bRetVal; -} - -void SvSharedMemoryStream::FreeMemory() -{ - DBG_ASSERT(aHandle==0,"Keine Handles unter OS/2"); - DosFreeMem( pBuf ); -} - -/************************************************************************* -|* -|* SvSharedMemoryStream::SetHandle() -|* -|* Beschreibung STREAM.SDW -|* Ersterstellung OV 05.10.95 -|* Letzte Aenderung OV 05.10.95 -|* -*************************************************************************/ - -void* SvSharedMemoryStream::SetHandle( void* aNewHandle, sal_Size nSize, - sal_Bool bOwnsData, sal_Size nEOF ) -{ - DBG_ERROR("OS/2 does not support memory handles"); - // return SetBuffer(aNewHandle, nSize, bOwnsData, nEOF ); - return 0; -} - - -#endif // 0 diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index 88ccb2113e0d..f3c5d642ed6e 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -60,7 +60,7 @@ DECLARE_LIST( InternalStreamLockList, InternalStreamLock* ) namespace { struct LockList : public rtl::Static< InternalStreamLockList, LockList > {}; } #ifndef BOOTSTRAP -namespace { struct LockMutex : public rtl::Static< NAMESPACE_VOS(OMutex), LockMutex > {}; } +namespace { struct LockMutex : public rtl::Static< vos::OMutex, LockMutex > {}; } #endif class InternalStreamLock @@ -111,7 +111,7 @@ InternalStreamLock::~InternalStreamLock() sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStream* pStream ) { #ifndef BOOTSTRAP - NAMESPACE_VOS( OGuard ) aGuard( LockMutex::get() ); + vos:: OGuard aGuard( LockMutex::get() ); #endif ByteString aFileName(pStream->GetFileName(), osl_getThreadTextEncoding()); struct stat aStat; @@ -161,7 +161,7 @@ sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStr void InternalStreamLock::UnlockFile( sal_Size nStart, sal_Size nEnd, SvFileStream* pStream ) { #ifndef BOOTSTRAP - NAMESPACE_VOS( OGuard ) aGuard( LockMutex::get() ); + vos:: OGuard aGuard( LockMutex::get() ); #endif InternalStreamLock* pLock = NULL; InternalStreamLockList &rLockList = LockList::get(); diff --git a/tools/source/testtoolloader/testtoolloader.cxx b/tools/source/testtoolloader/testtoolloader.cxx index ca269ef6eea2..21a1a715dc08 100644 --- a/tools/source/testtoolloader/testtoolloader.cxx +++ b/tools/source/testtoolloader/testtoolloader.cxx @@ -56,16 +56,16 @@ static bool bLoggerStarted = false; sal_uInt32 GetCommandLineParamCount() { - NAMESPACE_VOS( OStartupInfo ) aStartInfo; + vos:: OStartupInfo aStartInfo; return aStartInfo.getCommandArgCount(); } String GetCommandLineParam( sal_uInt32 nParam ) { - NAMESPACE_VOS( OStartupInfo ) aStartInfo; + vos:: OStartupInfo aStartInfo; ::rtl::OUString aParam; - NAMESPACE_VOS( OStartupInfo )::TStartupError eError = aStartInfo.getCommandArg( nParam, aParam ); - if ( eError == NAMESPACE_VOS( OStartupInfo )::E_None ) + vos:: OStartupInfo ::TStartupError eError = aStartInfo.getCommandArg( nParam, aParam ); + if ( eError == vos:: OStartupInfo ::E_None ) return String( aParam ); else { diff --git a/tools/win/inc/dll.hxx b/tools/win/inc/dll.hxx index 2a91aefc0fa9..f28b07974c61 100644 --- a/tools/win/inc/dll.hxx +++ b/tools/win/inc/dll.hxx @@ -28,31 +28,6 @@ #ifndef _DLL_HXX #define _DLL_HXX -#ifdef WIN - -#include <tools/svwin.h> - -// ---------------------- -// - Zugriffsfunktionen - -// ---------------------- - -struct SVDATA; - -extern "C" -{ -// IN APPDATA.ASM -SVDATA* FAR PASCAL GetSVData(); -} - -// IN TOOLSDLL.CXX -void SetSVData( SVDATA* pSVData ); - -#endif - -// ------------------------------- -// - Sonstige Funktionen fuer SV - -// ------------------------------- - // Um Resourcen wieder freizugeben inline void ImpDeInitWinTools() {} diff --git a/tools/win/inc/toolsdll.hxx b/tools/win/inc/toolsdll.hxx deleted file mode 100644 index a6b1546763bc..000000000000 --- a/tools/win/inc/toolsdll.hxx +++ /dev/null @@ -1,88 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _TOOLSDLL_HXX -#define _TOOLSDLL_HXX - -#ifdef WIN - -#ifndef _STRING_H -#include <string.h> -#endif -#include <tools/svwin.h> -#include <tools/solar.h> -#include <tools/shl.hxx> - -// ---------------- -// - MemMgr-Daten - -// ---------------- - -// Anzahl Freispeicherlisten -#define MEM_FREELIST_COUNT 15 - - -// -------------- -// - Tools-Data - -// -------------- - -struct SVDATA; -struct FreeBlock; - -struct MemData -{ - FreeBlock* pFirstBlocks[MEM_FREELIST_COUNT]; // Erste Bloecke in Freispeicherlisten - void* pNewHandler; // New-Handler - int nMultiThread; // MultiThread an/aus -}; - -struct ToolsData -{ - // !!! SVDATA muss in jedem Fall ganz vorne in der Struktur stehen !!! - SVDATA* pSVData; // Pointer auf StarView-Daten - HANDLE hMem; // Handler der Tools-Daten - MemData aMemD; // Daten der Speicherverwaltung - void* aAppData[SHL_COUNT]; // Daten fuer andere Shared Libs -}; - - -// ---------------------- -// - Zugriffsfunktionen - -// ---------------------- - -// IN APPDATA.ASM -extern "C" -{ -ToolsData* FAR PASCAL ImpGetAppData(); -void FAR PASCAL ImpSetAppData( ToolsData* pData ); -} - -// IN TOOLSDLL.CXX -ToolsData* ImpGetToolsData(); - -#endif - -#endif // _DLL_HXX diff --git a/tools/win/source/dll/toolsdll.cxx b/tools/win/source/dll/toolsdll.cxx index 8fc9888021bb..3d934edfe71d 100644 --- a/tools/win/source/dll/toolsdll.cxx +++ b/tools/win/source/dll/toolsdll.cxx @@ -29,7 +29,6 @@ #include "precompiled_tools.hxx" #include <tools/svwin.h> #include <dll.hxx> -#include <toolsdll.hxx> #include <tools/shl.hxx> // ======================================================================= diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index a90488b98b46..540494ae57d1 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -371,13 +371,13 @@ SalYieldMutex::SalYieldMutex() void SalYieldMutex::acquire() { OMutex::acquire(); - mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier(); + mnThreadId = vos::OThread::getCurrentIdentifier(); mnCount++; } void SalYieldMutex::release() { - if ( mnThreadId == NAMESPACE_VOS(OThread)::getCurrentIdentifier() ) + if ( mnThreadId == vos::OThread::getCurrentIdentifier() ) { if ( mnCount == 1 ) mnThreadId = 0; @@ -390,7 +390,7 @@ sal_Bool SalYieldMutex::tryToAcquire() { if ( OMutex::tryToAcquire() ) { - mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier(); + mnThreadId = vos::OThread::getCurrentIdentifier(); mnCount++; return sal_True; } @@ -537,7 +537,7 @@ ULONG AquaSalInstance::ReleaseYieldMutex() { SalYieldMutex* pYieldMutex = mpSalYieldMutex; if ( pYieldMutex->GetThreadId() == - NAMESPACE_VOS(OThread)::getCurrentIdentifier() ) + vos::OThread::getCurrentIdentifier() ) { ULONG nCount = pYieldMutex->GetAcquireCount(); ULONG n = nCount; diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx index 476ac3ca44a9..3105850c4fbf 100644 --- a/vcl/source/gdi/impimage.cxx +++ b/vcl/source/gdi/impimage.cxx @@ -553,14 +553,14 @@ void ImplImageBmp::Draw( USHORT nPos, OutputDevice* pOutDev, // ----------------------------------------------------------------------- void ImplImageBmp::ImplUpdateDisplayBmp( OutputDevice* -#if defined WIN || defined WNT +#if defined WNT pOutDev #endif ) { if( !mpDisplayBmp && !maBmpEx.IsEmpty() ) { -#if defined WIN || defined WNT +#if defined WNT if( maBmpEx.IsAlpha() ) mpDisplayBmp = new BitmapEx( maBmpEx ); else diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx index 68617c8c16be..faedc7e5e600 100644 --- a/vcl/unx/gtk/app/gtkinst.cxx +++ b/vcl/unx/gtk/app/gtkinst.cxx @@ -76,7 +76,7 @@ void GtkHookedYieldMutex::ThreadsLeave() #if OSL_DEBUG_LEVEL > 1 if( mnThreadId && - mnThreadId != NAMESPACE_VOS(OThread)::getCurrentIdentifier()) + mnThreadId != vos::OThread::getCurrentIdentifier()) fprintf( stderr, "\n\n--- A different thread owns the mutex ...---\n\n\n"); #endif diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx index 466b56868900..5c3be54f9ddc 100644 --- a/vcl/unx/headless/svpinst.cxx +++ b/vcl/unx/headless/svpinst.cxx @@ -302,7 +302,7 @@ vos::IMutex* SvpSalInstance::GetYieldMutex() ULONG SvpSalInstance::ReleaseYieldMutex() { if ( m_aYieldMutex.GetThreadId() == - NAMESPACE_VOS(OThread)::getCurrentIdentifier() ) + vos::OThread::getCurrentIdentifier() ) { ULONG nCount = m_aYieldMutex.GetAcquireCount(); ULONG n = nCount; @@ -464,13 +464,13 @@ SvpSalYieldMutex::SvpSalYieldMutex() void SvpSalYieldMutex::acquire() { OMutex::acquire(); - mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier(); + mnThreadId = vos::OThread::getCurrentIdentifier(); mnCount++; } void SvpSalYieldMutex::release() { - if ( mnThreadId == NAMESPACE_VOS(OThread)::getCurrentIdentifier() ) + if ( mnThreadId == vos::OThread::getCurrentIdentifier() ) { if ( mnCount == 1 ) mnThreadId = 0; @@ -483,7 +483,7 @@ sal_Bool SvpSalYieldMutex::tryToAcquire() { if ( OMutex::tryToAcquire() ) { - mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier(); + mnThreadId = vos::OThread::getCurrentIdentifier(); mnCount++; return sal_True; } diff --git a/vcl/unx/headless/svpinst.hxx b/vcl/unx/headless/svpinst.hxx index 284a2d11cd82..d931a2735ff9 100644 --- a/vcl/unx/headless/svpinst.hxx +++ b/vcl/unx/headless/svpinst.hxx @@ -46,11 +46,11 @@ // SalYieldMutex // ------------------------------------------------------------------------- -class SvpSalYieldMutex : public NAMESPACE_VOS(OMutex) +class SvpSalYieldMutex : public vos::OMutex { protected: ULONG mnCount; - NAMESPACE_VOS(OThread)::TThreadIdentifier mnThreadId; + vos::OThread::TThreadIdentifier mnThreadId; public: SvpSalYieldMutex(); @@ -60,7 +60,7 @@ public: virtual sal_Bool tryToAcquire(); ULONG GetAcquireCount() const { return mnCount; } - NAMESPACE_VOS(OThread)::TThreadIdentifier GetThreadId() const { return mnThreadId; } + vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; } }; // --------------- diff --git a/vcl/unx/inc/salinst.h b/vcl/unx/inc/salinst.h index d73d67f81425..8f4719f098f0 100644 --- a/vcl/unx/inc/salinst.h +++ b/vcl/unx/inc/salinst.h @@ -39,11 +39,11 @@ #include <vcl/dllapi.h> #include <vcl/salinst.hxx> -class VCL_DLLPUBLIC SalYieldMutex : public NAMESPACE_VOS(OMutex) +class VCL_DLLPUBLIC SalYieldMutex : public vos::OMutex { protected: ULONG mnCount; - NAMESPACE_VOS(OThread)::TThreadIdentifier mnThreadId; + vos::OThread::TThreadIdentifier mnThreadId; public: SalYieldMutex(); @@ -53,7 +53,7 @@ public: virtual sal_Bool tryToAcquire(); ULONG GetAcquireCount() const { return mnCount; } - NAMESPACE_VOS(OThread)::TThreadIdentifier GetThreadId() const { return mnThreadId; } + vos::OThread::TThreadIdentifier GetThreadId() const { return mnThreadId; } }; // -=-= SalInstanceData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx index 13a0d1093c8e..acf8c91ab5db 100644 --- a/vcl/unx/source/app/saldisp.cxx +++ b/vcl/unx/source/app/saldisp.cxx @@ -2255,7 +2255,7 @@ void SalX11Display::Yield() XEvent aEvent; DBG_ASSERT( static_cast<SalYieldMutex*>(GetSalData()->m_pInstance->GetYieldMutex())->GetThreadId() == - NAMESPACE_VOS(OThread)::getCurrentIdentifier(), + vos::OThread::getCurrentIdentifier(), "will crash soon since solar mutex not locked in SalDisplay::Yield" ); XNextEvent( pDisp_, &aEvent ); diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx index 8a8db44cefcd..49a9cceb8617 100644 --- a/vcl/unx/source/app/salinst.cxx +++ b/vcl/unx/source/app/salinst.cxx @@ -66,13 +66,13 @@ SalYieldMutex::SalYieldMutex() void SalYieldMutex::acquire() { OMutex::acquire(); - mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier(); + mnThreadId = vos::OThread::getCurrentIdentifier(); mnCount++; } void SalYieldMutex::release() { - if ( mnThreadId == NAMESPACE_VOS(OThread)::getCurrentIdentifier() ) + if ( mnThreadId == vos::OThread::getCurrentIdentifier() ) { if ( mnCount == 1 ) mnThreadId = 0; @@ -85,7 +85,7 @@ sal_Bool SalYieldMutex::tryToAcquire() { if ( OMutex::tryToAcquire() ) { - mnThreadId = NAMESPACE_VOS(OThread)::getCurrentIdentifier(); + mnThreadId = vos::OThread::getCurrentIdentifier(); mnCount++; return True; } @@ -231,7 +231,7 @@ ULONG X11SalInstance::ReleaseYieldMutex() { SalYieldMutex* pYieldMutex = mpSalYieldMutex; if ( pYieldMutex->GetThreadId() == - NAMESPACE_VOS(OThread)::getCurrentIdentifier() ) + vos::OThread::getCurrentIdentifier() ) { ULONG nCount = pYieldMutex->GetAcquireCount(); ULONG n = nCount; diff --git a/vos/inc/vos/execabl.hxx b/vos/inc/vos/execabl.hxx index 04e0ef837b02..5788fb598662 100644 --- a/vos/inc/vos/execabl.hxx +++ b/vos/inc/vos/execabl.hxx @@ -50,7 +50,7 @@ namespace vos @version 0.1 */ -class IExecutable : public NAMESPACE_VOS(IReference) +class IExecutable : public vos::IReference { public: @@ -82,8 +82,8 @@ public: /** OExecutable added default impl. of IReferenceCounter */ -class OExecutable : public NAMESPACE_VOS(IExecutable), - public NAMESPACE_VOS(OReference) +class OExecutable : public vos::IExecutable, + public vos::OReference { public: diff --git a/vos/inc/vos/macros.hxx b/vos/inc/vos/macros.hxx index ca1b750d67f4..be91b6d00aa2 100644 --- a/vos/inc/vos/macros.hxx +++ b/vos/inc/vos/macros.hxx @@ -149,9 +149,6 @@ // def. for arbitrary namespace #define VOS_NAMESPACE(class_name, name_space) name_space::class_name -// sal_Int16 def. for namespace vos -#define NAMESPACE_VOS(class_name) vos::class_name - // sal_Int16 def. for namespace std #define NAMESPACE_STD(class_name) std::class_name diff --git a/vos/inc/vos/pipe.hxx b/vos/inc/vos/pipe.hxx index e9b1145a36ee..ce378272c9b9 100644 --- a/vos/inc/vos/pipe.hxx +++ b/vos/inc/vos/pipe.hxx @@ -48,10 +48,10 @@ class OStreamPipe; /** Represents a pipe. */ -class OPipe : public NAMESPACE_VOS(OReference), - public NAMESPACE_VOS(OObject) +class OPipe : public vos::OReference, + public vos::OObject { - VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OPipe)); + VOS_DECLARE_CLASSINFO(vos::OPipe); public: /* @@ -101,7 +101,7 @@ public: @param Security */ OPipe(const ::rtl::OUString& strName, TPipeOption Options, - const NAMESPACE_VOS(OSecurity)& rSecurity); + const vos::OSecurity& rSecurity); /** Copy constructor. */ @@ -132,7 +132,7 @@ public: @return True if socket was successfully created. */ sal_Bool SAL_CALL create(const ::rtl::OUString& strName, TPipeOption Options, - const NAMESPACE_VOS(OSecurity)& rSecurity); + const vos::OSecurity& rSecurity); /** Assignment operator. If pipe was already created, the old one will be discarded. @@ -191,10 +191,10 @@ public: /** A pipe to send or receive a stream of data. */ -class OStreamPipe : public NAMESPACE_VOS(OPipe), - public NAMESPACE_VOS(IStream) +class OStreamPipe : public vos::OPipe, + public vos::IStream { - VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OStreamPipe)); + VOS_DECLARE_CLASSINFO(vos::OStreamPipe); public: /** Creates an unattached pipe. You must attach the pipe to an oslPipe diff --git a/vos/inc/vos/process.hxx b/vos/inc/vos/process.hxx index e41a050acaa0..0b98278d117e 100644 --- a/vos/inc/vos/process.hxx +++ b/vos/inc/vos/process.hxx @@ -284,7 +284,7 @@ class OExtCommandLineImpl; class OExtCommandLine : public OObject { VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OExtCommandLine, vos)); - static NAMESPACE_VOS(OExtCommandLineImpl)* pExtImpl; + static vos::OExtCommandLineImpl* pExtImpl; public: diff --git a/vos/inc/vos/refernce.hxx b/vos/inc/vos/refernce.hxx index 25f0f39eb0f3..8f5a0ec799fb 100644 --- a/vos/inc/vos/refernce.hxx +++ b/vos/inc/vos/refernce.hxx @@ -82,7 +82,7 @@ private: ORefCount& SAL_CALL operator= (const ORefCount&); }; -class OReference : public NAMESPACE_VOS(IReference) +class OReference : public vos::IReference { public: OReference(); diff --git a/vos/inc/vos/signal.hxx b/vos/inc/vos/signal.hxx index ea9db4850490..f2bff35998ec 100644 --- a/vos/inc/vos/signal.hxx +++ b/vos/inc/vos/signal.hxx @@ -46,7 +46,7 @@ SignalHandlerFunction_impl signalHandlerFunction_impl; @version 1.0 */ -class OSignalHandler : public NAMESPACE_VOS(OObject) +class OSignalHandler : public vos::OObject { VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OSignalHandler, vos)); diff --git a/vos/inc/vos/socket.hxx b/vos/inc/vos/socket.hxx index cfd51fbb069b..f803a455129c 100644 --- a/vos/inc/vos/socket.hxx +++ b/vos/inc/vos/socket.hxx @@ -189,7 +189,7 @@ public: /** Base class for socket addresses. */ -class ISocketAddr : public NAMESPACE_VOS(ISocketTypes) +class ISocketAddr : public vos::ISocketTypes { public: virtual ~ISocketAddr() { } @@ -202,11 +202,11 @@ public: virtual sal_Bool SAL_CALL operator== (oslSocketAddr Addr)= 0; }; -class OSocketAddr : public NAMESPACE_VOS(ISocketAddr), - public NAMESPACE_VOS(OObject) +class OSocketAddr : public vos::ISocketAddr, + public vos::OObject { - VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OSocketAddr)); + VOS_DECLARE_CLASSINFO(vos::OSocketAddr); public: /** Creates socket address of unknown type. @@ -274,9 +274,9 @@ protected: /** Represents an internet-address. */ -class OInetSocketAddr : public NAMESPACE_VOS(OSocketAddr) +class OInetSocketAddr : public vos::OSocketAddr { - VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OInetSocketAddr)); + VOS_DECLARE_CLASSINFO(vos::OInetSocketAddr); public: /** Creates an empty internet-address (INADDR_ANY). @@ -359,9 +359,9 @@ public: /** Represents an IPX/SPX address. */ -class OIpxSocketAddr : public NAMESPACE_VOS(OSocketAddr) +class OIpxSocketAddr : public vos::OSocketAddr { - VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OIpxSocketAddr)); + VOS_DECLARE_CLASSINFO(vos::OIpxSocketAddr); public: typedef oslSocketIpxNetNumber TIpxNetNumber; @@ -430,11 +430,11 @@ public: /** Represents a socket. */ -class OSocket : public NAMESPACE_VOS(ISocketTypes), - public NAMESPACE_VOS(OReference), - public NAMESPACE_VOS(OObject) +class OSocket : public vos::ISocketTypes, + public vos::OReference, + public vos::OObject { - VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OSocket)); + VOS_DECLARE_CLASSINFO(vos::OSocket); protected: typedef ORefObj<oslSocket> SockRef; @@ -809,10 +809,10 @@ public: /** A socket to send or receive a stream of data. */ -class OStreamSocket : public NAMESPACE_VOS(OSocket), - public NAMESPACE_VOS(IStream) +class OStreamSocket : public vos::OSocket, + public vos::IStream { - VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OStreamSocket)); + VOS_DECLARE_CLASSINFO(vos::OStreamSocket); public: /** Creates an unattached socket. You must attach the socket to an oslSocket @@ -952,9 +952,9 @@ protected: /** A socket to accept incoming connections. */ -class OAcceptorSocket : public NAMESPACE_VOS(OSocket) +class OAcceptorSocket : public vos::OSocket { - VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OAcceptorSocket)); + VOS_DECLARE_CLASSINFO(vos::OAcceptorSocket); public: /** Creates a socket that can accept connections. @@ -1014,9 +1014,9 @@ public: /** A socket to initiate a conenction. */ -class OConnectorSocket : public NAMESPACE_VOS(OStreamSocket) +class OConnectorSocket : public vos::OStreamSocket { - VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(OConnectorSocket)); + VOS_DECLARE_CLASSINFO(vos::OConnectorSocket); public: /** Creates a socket that can accept connections. @@ -1050,9 +1050,9 @@ public: /** A connectionless socket to send and receive datagrams. */ -class ODatagramSocket : public NAMESPACE_VOS(OSocket) +class ODatagramSocket : public vos::OSocket { - VOS_DECLARE_CLASSINFO(NAMESPACE_VOS(ODatagramSocket)); + VOS_DECLARE_CLASSINFO(vos::ODatagramSocket); public: /** Creates a datagram socket. diff --git a/vos/inc/vos/stream.hxx b/vos/inc/vos/stream.hxx index 5e25aa1d103a..6df13d5ddb28 100644 --- a/vos/inc/vos/stream.hxx +++ b/vos/inc/vos/stream.hxx @@ -37,7 +37,7 @@ namespace vos /** Adds seeking capabilities to IStream */ -class IPositionableStream : public NAMESPACE_VOS(IStream) +class IPositionableStream : public vos::IStream { public: @@ -75,8 +75,8 @@ protected: /** Implements IPositionableStream */ -class OStream : public NAMESPACE_VOS(OObject), - public NAMESPACE_VOS(IPositionableStream) +class OStream : public vos::OObject, + public vos::IPositionableStream { VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OStream, vos)); diff --git a/vos/inc/vos/thread.hxx b/vos/inc/vos/thread.hxx index 16f64c0e0812..d84fdfdadccc 100644 --- a/vos/inc/vos/thread.hxx +++ b/vos/inc/vos/thread.hxx @@ -53,8 +53,8 @@ ThreadWorkerFunction_impl threadWorkerFunction_impl; @version 1.0 */ -class OThread : public NAMESPACE_VOS(IRunnable), - public NAMESPACE_VOS(OObject) +class OThread : public vos::IRunnable, + public vos::OObject { VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OThread, vos)); @@ -203,7 +203,7 @@ protected: friend void threadWorkerFunction_impl(void *); }; -class OThreadData : public NAMESPACE_VOS(OObject) +class OThreadData : public vos::OObject { VOS_DECLARE_CLASSINFO(VOS_NAMESPACE(OThreadData, vos)); diff --git a/vos/source/pipe.cxx b/vos/source/pipe.cxx index a7d8e655414d..777d1a76b36b 100644 --- a/vos/source/pipe.cxx +++ b/vos/source/pipe.cxx @@ -138,7 +138,7 @@ sal_Bool OPipe::create( const rtl::OUString& strName, TPipeOption Options ) /*****************************************************************************/ sal_Bool OPipe::create( const rtl::OUString& strName, TPipeOption Options, - const NAMESPACE_VOS(OSecurity)& rSecurity ) + const vos::OSecurity& rSecurity ) { // if this was a valid pipe, decrease reference if ((m_pPipeRef) && (m_pPipeRef->release() == 0)) diff --git a/vos/source/process.cxx b/vos/source/process.cxx index 71c8729d9023..59b1af3223d4 100644 --- a/vos/source/process.cxx +++ b/vos/source/process.cxx @@ -485,7 +485,7 @@ void OExtCommandLineImpl::init() namespace { - struct lclMutex : public rtl::Static< NAMESPACE_VOS(OMutex), lclMutex > {}; + struct lclMutex : public rtl::Static< vos::OMutex, lclMutex > {}; } OExtCommandLineImpl* OExtCommandLine::pExtImpl=0; diff --git a/vos/source/signal.cxx b/vos/source/signal.cxx index 1f879f8b225c..eb1b65191918 100644 --- a/vos/source/signal.cxx +++ b/vos/source/signal.cxx @@ -35,7 +35,7 @@ using namespace vos; oslSignalAction vos::signalHandlerFunction_impl( void * pthis, oslSignalInfo * pInfo) { - NAMESPACE_VOS(OSignalHandler)* pThis= (NAMESPACE_VOS(OSignalHandler)*)pthis; + vos::OSignalHandler* pThis= (vos::OSignalHandler*)pthis; return ((oslSignalAction)pThis->signal(pInfo)); } diff --git a/vos/source/thread.cxx b/vos/source/thread.cxx index 8b2c8826b753..94cdfbdf970b 100644 --- a/vos/source/thread.cxx +++ b/vos/source/thread.cxx @@ -34,7 +34,7 @@ using namespace vos; void vos::threadWorkerFunction_impl(void * pthis) { - NAMESPACE_VOS(OThread)* pThis= (NAMESPACE_VOS(OThread)*)pthis; + vos::OThread* pThis= (vos::OThread*)pthis; // call Handler-Function of OThread-derived class pThis->run(); diff --git a/vos/source/timer.cxx b/vos/source/timer.cxx index 1c1e2385b60c..a365415672e9 100644 --- a/vos/source/timer.cxx +++ b/vos/source/timer.cxx @@ -41,7 +41,7 @@ class OTimerManagerCleanup; -class NAMESPACE_VOS(OTimerManager) : public NAMESPACE_VOS(OThread) +class vos::OTimerManager : public vos::OThread { public: @@ -53,13 +53,13 @@ public: ~OTimerManager(); /// register timer - sal_Bool SAL_CALL registerTimer(NAMESPACE_VOS(OTimer)* pTimer); + sal_Bool SAL_CALL registerTimer(vos::OTimer* pTimer); /// unregister timer - sal_Bool SAL_CALL unregisterTimer(NAMESPACE_VOS(OTimer)* pTimer); + sal_Bool SAL_CALL unregisterTimer(vos::OTimer* pTimer); /// lookup timer - sal_Bool SAL_CALL lookupTimer(const NAMESPACE_VOS(OTimer)* pTimer); + sal_Bool SAL_CALL lookupTimer(const vos::OTimer* pTimer); /// retrieves the "Singleton" TimerManager Instance static OTimerManager* SAL_CALL getTimerManager(); @@ -77,17 +77,17 @@ protected: virtual void SAL_CALL onTerminated(); // sorted-queue data - NAMESPACE_VOS(OTimer)* m_pHead; + vos::OTimer* m_pHead; // List Protection - NAMESPACE_VOS(OMutex) m_Lock; + vos::OMutex m_Lock; // Signal the insertion of a timer - NAMESPACE_VOS(OCondition) m_notEmpty; + vos::OCondition m_notEmpty; // Synchronize access to OTimerManager - static NAMESPACE_VOS(OMutex) m_Access; + static vos::OMutex m_Access; // "Singleton Pattern" - static NAMESPACE_VOS(OTimerManager)* m_pManager; + static vos::OTimerManager* m_pManager; friend class OTimerManagerCleanup; @@ -267,8 +267,8 @@ TTimeValue OTimer::getRemainingTime() const // Timer manager // -OMutex NAMESPACE_VOS(OTimerManager)::m_Access; -OTimerManager* NAMESPACE_VOS(OTimerManager)::m_pManager=0; +OMutex vos::OTimerManager::m_Access; +OTimerManager* vos::OTimerManager::m_pManager=0; OTimerManager::OTimerManager() { |