[Libreoffice-commits] .: dtrans/source tools/os2 vcl/os2
François Tigeot
ftigeot at kemper.freedesktop.org
Mon Apr 18 07:36:50 PDT 2011
dev/null |binary
dtrans/source/os2/clipb/OS2Bitmap.cxx | 248 -
dtrans/source/os2/clipb/Os2Clipboard.cxx | 429 ---
dtrans/source/os2/clipb/Os2Clipboard.hxx | 138 -
dtrans/source/os2/clipb/Os2Service.cxx | 88
dtrans/source/os2/clipb/Os2Transferable.cxx | 179 -
dtrans/source/os2/clipb/Os2Transferable.hxx | 98
dtrans/source/os2/clipb/exports.dxp | 3
dtrans/source/os2/clipb/makefile.mk | 59
dtrans/source/os2/clipb/sysdtrans.xml | 43
tools/os2/inc/dll.hxx | 42
tools/os2/source/dll/toolsdll.cxx | 46
vcl/os2/howto.txt | 13
vcl/os2/inc/salbmp.h | 112
vcl/os2/inc/saldata.hxx | 310 --
vcl/os2/inc/salframe.h | 172 -
vcl/os2/inc/salgdi.h | 355 --
vcl/os2/inc/salids.hrc | 109
vcl/os2/inc/salinst.h | 102
vcl/os2/inc/sallang.hxx | 70
vcl/os2/inc/sallayout.h | 34
vcl/os2/inc/salmenu.h | 67
vcl/os2/inc/salobj.h | 73
vcl/os2/inc/salprn.h | 149 -
vcl/os2/inc/salsound.h | 97
vcl/os2/inc/salsound.hxx | 85
vcl/os2/inc/salsys.h | 47
vcl/os2/inc/saltimer.h | 47
vcl/os2/inc/salvd.h | 68
vcl/os2/inc/svsys.h | 38
vcl/os2/inc/wingdi.h | 73
vcl/os2/inc/xwphook.h | 622 ----
vcl/os2/source/app/makefile.mk | 56
vcl/os2/source/app/printf.c | 287 --
vcl/os2/source/app/salinfo.cxx | 164 -
vcl/os2/source/app/salinst.cxx | 859 ------
vcl/os2/source/app/sallang.cxx | 74
vcl/os2/source/app/salshl.cxx | 125
vcl/os2/source/app/saltimer.cxx | 142 -
vcl/os2/source/gdi/makefile.mk | 56
vcl/os2/source/gdi/os2layout.cxx | 1041 --------
vcl/os2/source/gdi/salbmp.cxx | 740 -----
vcl/os2/source/gdi/salgdi.cxx | 938 -------
vcl/os2/source/gdi/salgdi2.cxx | 786 ------
vcl/os2/source/gdi/salgdi3.cxx | 1701 -------------
vcl/os2/source/gdi/salprn.cxx | 1818 --------------
vcl/os2/source/gdi/salvd.cxx | 203 -
vcl/os2/source/src/makefile.mk | 111
vcl/os2/source/src/salsrc.rc | 108
vcl/os2/source/window/makefile | 53
vcl/os2/source/window/makefile.mk | 47
vcl/os2/source/window/salframe.cxx | 3575 ----------------------------
vcl/os2/source/window/salobj.cxx | 559 ----
53 files changed, 17459 deletions(-)
New commits:
commit 4302f915f2767644c3c6e0fec529cf2d64c39a8f
Author: Francois Tigeot <ftigeot at wolfpond.org>
Date: Sat Apr 16 09:19:08 2011 +0200
Remove OS/2-specific subdirectories.
diff --git a/dtrans/source/os2/clipb/OS2Bitmap.cxx b/dtrans/source/os2/clipb/OS2Bitmap.cxx
deleted file mode 100644
index d375511..0000000
--- a/dtrans/source/os2/clipb/OS2Bitmap.cxx
+++ /dev/null
@@ -1,248 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * This code is property of Serenity Systems Intl
- * All rights reserverd.
- *
- ************************************************************************/
-
-#define INCL_WIN
-#include <svpm.h>
-
-#include "Os2Clipboard.hxx"
-
-// same typedefs from win32 sdk
-typedef unsigned short WORD;
-typedef unsigned long DWORD;
-
-#pragma pack(push, 1)
-
-typedef struct {
- PM_BYTE rgbBlue;
- PM_BYTE rgbGreen;
- PM_BYTE rgbRed;
- PM_BYTE rgbReserved;
-} RGBQUAD, *LPRGBQUAD;
-
-typedef struct
-{
- WORD bfType;
- DWORD bfSize;
- WORD bfReserved1;
- WORD bfReserved2;
- DWORD bfOffBits;
-} W32_BITMAPFILEHEADER, *PW32_BITMAPFILEHEADER;
-
-typedef struct
-{
- DWORD biSize;
- LONG biWidth;
- LONG biHeight;
- WORD biPlanes;
- WORD biBitCount;
- DWORD biCompression;
- DWORD biSizeImage;
- LONG biXPelsPerMeter;
- LONG biYPelsPerMeter;
- DWORD biClrUsed;
- DWORD biClrImportant;
-} W32_BITMAPINFOHEADER, *PW32_BITMAPINFOHEADER;
-
-#pragma pack(pop)
-
-// store screen bitcount
-LONG lBitCountScreen;
-
-/*
- * Convert an OOo bitmap to an OS/2 bitmap handle
- *
- * An OOo bitmap is a BITMAPFILEHEADER structure followed by a Windows DIB
- *
- * OS/2 InfoHeader is a superset of Win32 InhoHeader, so we can just copy
- * the win32 memory over the os2 memory and fix the cbFix field.
- * colortable and bitmap data share the same format.
- *
-*/
-HBITMAP OOoBmpToOS2Handle( Any &aAnyB)
-{
- // copy bitmap to clipboard
- Sequence<sal_Int8> ByteStream;
- aAnyB >>= ByteStream;
-
- // get w32 file header data
- PW32_BITMAPFILEHEADER pbfh = (PW32_BITMAPFILEHEADER)ByteStream.getArray();
- // get w32 info header
- PW32_BITMAPINFOHEADER pbih = (PW32_BITMAPINFOHEADER) (pbfh+1);
-
- // create os2 infoheader2 (same fields of w32)
- BITMAPINFOHEADER2 bih2;
- memset( &bih2, 0, sizeof( bih2));
- memcpy( &bih2, pbih, pbih->biSize);
- bih2.cbFix = sizeof(bih2);
-
- // Determine size of color table
- int iNumColors, numbits=bih2.cPlanes * bih2.cBitCount;
- if (numbits != 24)
- iNumColors = bih2.cclrUsed ? bih2.cclrUsed : 2<<numbits;
- else
- iNumColors = bih2.cclrUsed;
- int iColorTableSize = iNumColors*sizeof(RGB2);
-
- // allocate bitmap info2 (header2+colortable)
- PBITMAPINFO2 pbi2=(PBITMAPINFO2) malloc( sizeof(BITMAPINFOHEADER2)+iColorTableSize);
- // setup header fields
- memcpy( pbi2, &bih2, sizeof(BITMAPINFOHEADER2));
- // copy color palette (follows pbih)
- memcpy( &pbi2->argbColor[0], (pbih+1), iColorTableSize);
-
- // get bitmap data
- PBYTE pbPelData = (PBYTE)ByteStream.getArray() + pbfh->bfOffBits;
- HPS hps = WinGetPS(HWND_DESKTOP);
- HBITMAP hbm = GpiCreateBitmap( hps, &bih2, CBM_INIT, pbPelData, pbi2);
- debug_printf( "OOoBmpToOS2Handle hbm %x\n", hbm);
- WinReleasePS(hps);
-
- // return handle
- return hbm;
-}
-
-/*
- * Convert an OS/2 bitmap handle to OOo bitmap
- *
- * First we need to copy the bitmap to a PS, then we can get bitmap data.
- *
-*/
-int OS2HandleToOOoBmp( HBITMAP hbm, Sequence< sal_Int8 >* OOoDIBStream)
-{
- HAB hab = WinQueryAnchorBlock(HWND_DESKTOP);
- HDC hdc;
- SIZEL sizl;
- HPS hps;
- PM_BYTE* pbBuffer;
- ULONG cbBuffer;
-
- struct {
- BITMAPINFOHEADER2 bmp2;
- RGB2 argb2Color[0x100];
- } bm;
-
- if (!lBitCountScreen) {
- HPS hps = WinGetPS(HWND_DESKTOP);
- HDC hdc = GpiQueryDevice(hps);
- DevQueryCaps(hdc, CAPS_COLOR_BITCOUNT, 1L, &lBitCountScreen);
- WinReleasePS(hps);
- }
-
- // STEP 1: get OS/2 bitmap data and header
- // get bitmap header
- memset(&(bm.bmp2), 0, sizeof(bm.bmp2));
- bm.bmp2.cbFix = 16;
- GpiQueryBitmapInfoHeader(hbm, &bm.bmp2);
-
- /* Data only actually stored in clipboard quality */
- if ( lBitCountScreen < bm.bmp2.cBitCount )
- bm.bmp2.cBitCount = lBitCountScreen;
-
- if ( bm.bmp2.cBitCount == 16 )
- bm.bmp2.cBitCount = 24;
-
- if ( bm.bmp2.cPlanes != 1 ) {
- return 0;
- }
-
- if ( (hdc = DevOpenDC(hab, OD_MEMORY, "*", 0L, (PDEVOPENDATA) NULL, (HDC) NULL)) == (HDC) NULL ) {
- return 0;
- }
-
- sizl.cx = bm.bmp2.cx;
- sizl.cy = bm.bmp2.cy;
- if ( (hps = GpiCreatePS(hab, hdc, &sizl, PU_PELS | GPIF_DEFAULT | GPIT_MICRO | GPIA_ASSOC)) == (HPS) NULL ) {
- DevCloseDC(hdc);
- return 0;
- }
- // copy bitmap to hps
- GpiSetBitmap(hps, hbm);
-
- // buffer lengths
- cbBuffer = (((bm.bmp2.cBitCount * bm.bmp2.cx) + 31) / 32) * 4 * bm.bmp2.cy * bm.bmp2.cPlanes;
- pbBuffer = (PM_BYTE*) malloc( cbBuffer);
- // now get bitmap data
- GpiQueryBitmapBits(hps, 0L, (LONG) bm.bmp2.cy, pbBuffer, (BITMAPINFO2*)&bm);
- // free OS/2 resources
- GpiSetBitmap(hps, (HBITMAP) NULL);
- GpiDestroyPS(hps);
- DevCloseDC(hdc);
-
- // STEP 2: now convert to Win32 DIB
- // Determine size of color table
- int iNumColors, numbits=bm.bmp2.cPlanes * bm.bmp2.cBitCount;
- if (numbits != 24)
- iNumColors = bm.bmp2.cclrUsed ? bm.bmp2.cclrUsed : 2<<numbits;
- else
- iNumColors = bm.bmp2.cclrUsed;
- int iColorTableSize = iNumColors*sizeof(RGBQUAD);
-
- // reallocate data stream object size
- OOoDIBStream->realloc( sizeof( W32_BITMAPFILEHEADER )
- + sizeof( W32_BITMAPINFOHEADER) + iColorTableSize + cbBuffer);
-
- // fill w32 file header data
- PW32_BITMAPFILEHEADER pbfh = (PW32_BITMAPFILEHEADER) OOoDIBStream->getArray();
- memset( pbfh, 0, sizeof( W32_BITMAPFILEHEADER));
- pbfh->bfType = 'MB';
- pbfh->bfSize = sizeof( W32_BITMAPFILEHEADER )
- + sizeof( W32_BITMAPINFOHEADER) + iColorTableSize + cbBuffer;
- pbfh->bfOffBits = sizeof( W32_BITMAPFILEHEADER) + sizeof( W32_BITMAPINFOHEADER) + iColorTableSize;
-
- // fill w32 info header
- PW32_BITMAPINFOHEADER pbih = (PW32_BITMAPINFOHEADER) (pbfh+1);
- // copy header fields (only win32 ones) and fix size
- memcpy( pbih, &bm.bmp2, sizeof(W32_BITMAPINFOHEADER));
- pbih->biSize = sizeof(W32_BITMAPINFOHEADER);
-
- // fill color palette (follows pbih)
- memcpy( (pbih+1), &bm.argb2Color[0], iColorTableSize);
-
- // fill bitmap data
- memcpy( (char*) pbfh + pbfh->bfOffBits, pbBuffer, cbBuffer);
-
- // done
- free( pbBuffer);
- return 1;
-}
-
-#ifdef TESTBMP
-
-#include <io.h>
-#include <fcntl.h>
-#include <stdio.h>
-
-int main( void)
-{
- HAB hAB = WinQueryAnchorBlock( HWND_DESKTOP );
-
- // query clipboard data to get mimetype
- if( WinOpenClipbrd( hAB ) )
- {
- ULONG handle = WinQueryClipbrdData( hAB, CF_BITMAP);
- if (handle) {
- Sequence< sal_Int8 > winDIBStream;
- // convert to oustring and return it
- if (OS2HandleToOOoBmp( handle, &winDIBStream) == 1) {
- printf( "Conversion ok.\n");
- int fd = open( "test.bmp", O_BINARY | O_CREAT | O_TRUNC | O_RDWR);
- printf( "writing to fd %d\n", fd);
- write( fd, winDIBStream.getArray(), winDIBStream.getLength());
- close( fd);
- } else
- printf( "failed conversion.\n");
-
- }
- WinCloseClipbrd( hAB);
- }
- return 0;
-}
-
-#endif //TESTBMP
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/os2/clipb/Os2Clipboard.cxx b/dtrans/source/os2/clipb/Os2Clipboard.cxx
deleted file mode 100644
index e7da0ef..0000000
--- a/dtrans/source/os2/clipb/Os2Clipboard.cxx
+++ /dev/null
@@ -1,429 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-//------------------------------------------------------------------------
-// includes
-//------------------------------------------------------------------------
-
-#include "Os2Clipboard.hxx"
-
-//------------------------------------------------------------------------
-// namespace directives
-//------------------------------------------------------------------------
-
-using namespace com::sun::star::datatransfer;
-using namespace com::sun::star::datatransfer::clipboard;
-using namespace com::sun::star::datatransfer::clipboard::RenderingCapabilities;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::uno;
-using namespace cppu;
-using namespace osl;
-using namespace os2;
-
-using ::rtl::OUString;
-
-const Type CPPUTYPE_SEQINT8 = getCppuType( ( Sequence< sal_Int8 >* )0 );
-const Type CPPUTYPE_OUSTRING = getCppuType( (OUString*)0 );
-
-#define DTRANS_OBJ_CLASSNAME "DTRANSOBJWND"
-
-// -----------------------------------------------------------------------
-
-inline void SetWindowPtr( HWND hWnd, Os2Clipboard* pThis )
-{
- WinSetWindowULong( hWnd, QWL_USER, (ULONG)pThis );
-}
-
-inline Os2Clipboard* GetWindowPtr( HWND hWnd )
-{
- return (Os2Clipboard*)WinQueryWindowULong( hWnd, QWL_USER );
-}
-
-// -----------------------------------------------------------------------
-
-MRESULT EXPENTRY DtransObjWndProc( HWND hWnd, ULONG nMsg, MPARAM nMP1, MPARAM nMP2 )
-{
-
- switch ( nMsg )
- {
- case WM_DRAWCLIPBOARD: // clipboard content has changed
- {
- Os2Clipboard* os2Clipboard = GetWindowPtr( hWnd);
- if (os2Clipboard)
- {
- debug_printf("WM_DRAWCLIPBOARD os2Clipboard %08x\n", os2Clipboard);
- if (os2Clipboard->m_bInSetClipboardData)
- {
- debug_printf("WM_DRAWCLIPBOARD our change\n");
- }
- else
- {
- // notify listener for clipboard change
- debug_printf("WM_DRAWCLIPBOARD notify change\n");
- os2Clipboard->notifyAllClipboardListener();
- }
- }
- }
- break;
- }
-
- return WinDefWindowProc( hWnd, nMsg, nMP1, nMP2 );
-}
-
-// -----------------------------------------------------------------------
-
-Os2Clipboard::Os2Clipboard() :
- m_aMutex(),
- WeakComponentImplHelper4< XClipboardEx, XClipboardNotifier, XServiceInfo, XInitialization > (m_aMutex),
- m_bInitialized(sal_False),
- m_bInSetClipboardData(sal_False)
-{
- MutexGuard aGuard(m_aMutex);
-
- debug_printf("Os2Clipboard::Os2Clipboard\n");
- hAB = WinQueryAnchorBlock( HWND_DESKTOP );
- hText = 0;
- hBitmap = 0;
-
-}
-
-Os2Clipboard::~Os2Clipboard()
-{
- debug_printf("Os2Clipboard::~Os2Clipboard\n");
-}
-
-void SAL_CALL Os2Clipboard::initialize( const Sequence< Any >& aArguments )
- throw(Exception, RuntimeException)
-{
- if (!m_bInitialized)
- {
- for (sal_Int32 n = 0, nmax = aArguments.getLength(); n < nmax; n++)
- if (aArguments[n].getValueType() == getCppuType((OUString *) 0))
- {
- aArguments[0] >>= m_aName;
- break;
- }
- }
-}
-
-OUString SAL_CALL Os2Clipboard::getImplementationName() throw( RuntimeException )
-{
- debug_printf("Os2Clipboard::getImplementationName\n");
- return OUString(RTL_CONSTASCII_USTRINGPARAM( OS2_CLIPBOARD_IMPL_NAME ));
-}
-
-sal_Bool SAL_CALL Os2Clipboard::supportsService( const OUString& ServiceName ) throw( RuntimeException )
-{
- debug_printf("Os2Clipboard::supportsService\n");
- Sequence < OUString > SupportedServicesNames = Os2Clipboard_getSupportedServiceNames();
-
- for ( sal_Int32 n = SupportedServicesNames.getLength(); n--; )
- if (SupportedServicesNames[n].compareTo(ServiceName) == 0)
- return sal_True;
-
- return sal_False;
-}
-
-Sequence< OUString > SAL_CALL Os2Clipboard::getSupportedServiceNames() throw( RuntimeException )
-{
- debug_printf("Os2Clipboard::getSupportedServiceNames\n");
- return Os2Clipboard_getSupportedServiceNames();
-}
-
-Reference< XTransferable > SAL_CALL Os2Clipboard::getContents() throw( RuntimeException )
-{
- debug_printf("Os2Clipboard::getContents\n");
- MutexGuard aGuard(m_aMutex);
-
- // os2 can have only one viewer at time, and we don't get a notification
- // when the viewer changes. So we need to check handles of clipboard
- // data and compare with previous handles
- if (UWinOpenClipbrd(hAB)) {
- sal_Bool fireChanged = sal_False;
- ULONG handle = UWinQueryClipbrdData( hAB, UCLIP_CF_UNICODETEXT);
- if (handle) {
- if (handle != hText) {
- hText = handle;
- fireChanged = sal_True;
- }
- }
- handle = UWinQueryClipbrdData( hAB, UCLIP_CF_BITMAP);
- if (handle) {
- if (handle != hBitmap) {
- hBitmap = handle;
- fireChanged = sal_True;
- }
- }
- UWinCloseClipbrd( hAB);
- if (fireChanged)
- {
- // notify listener for clipboard change
- debug_printf("Os2Clipboard::getContents notify change\n");
- notifyAllClipboardListener();
- }
- }
-
- if( ! m_aContents.is() )
- m_aContents = new Os2Transferable( static_cast< OWeakObject* >(this) );
-
- return m_aContents;
-}
-
-void SAL_CALL Os2Clipboard::setContents( const Reference< XTransferable >& xTrans, const Reference< XClipboardOwner >& xClipboardOwner ) throw( RuntimeException )
-{
- debug_printf("Os2Clipboard::setContents\n");
- // remember old values for callbacks before setting the new ones.
- ClearableMutexGuard aGuard(m_aMutex);
-
- Reference< XClipboardOwner > oldOwner(m_aOwner);
- m_aOwner = xClipboardOwner;
-
- Reference< XTransferable > oldContents(m_aContents);
- m_aContents = xTrans;
-
- aGuard.clear();
-
- // notify old owner on loss of ownership
- if( oldOwner.is() )
- oldOwner->lostOwnership(static_cast < XClipboard * > (this), oldContents);
-
- // notify all listeners on content changes
- OInterfaceContainerHelper *pContainer =
- rBHelper.aLC.getContainer(getCppuType( (Reference < XClipboardListener > *) 0));
- if (pContainer)
- {
- ClipboardEvent aEvent(static_cast < XClipboard * > (this), m_aContents);
- OInterfaceIteratorHelper aIterator(*pContainer);
-
- while (aIterator.hasMoreElements())
- {
- Reference < XClipboardListener > xListener(aIterator.next(), UNO_QUERY);
- if (xListener.is())
- xListener->changedContents(aEvent);
- }
- }
-
-#if OSL_DEBUG_LEVEL > 0
- // dump list of available mimetypes
- Sequence< DataFlavor > aFlavors( m_aContents->getTransferDataFlavors() );
- for( int i = 0; i < aFlavors.getLength(); i++ )
- debug_printf("Os2Clipboard::setContents available mimetype: %d %s\n",
- i, CHAR_POINTER(aFlavors.getConstArray()[i].MimeType));
-#endif
-
- // we can only export text or bitmap
- DataFlavor nFlavorText( OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16")),
- OUString(RTL_CONSTASCII_USTRINGPARAM("Unicode-Text")), CPPUTYPE_OUSTRING);
- DataFlavor nFlavorBitmap( OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" )),
- OUString(RTL_CONSTASCII_USTRINGPARAM("Bitmap")), CPPUTYPE_DEFAULT);
-
- // try text transfer data (if any)
- PSZ pSharedText = NULL;
- HBITMAP hbm = NULL;
- try
- {
- Any aAny = m_aContents->getTransferData( nFlavorText );
- if (aAny.hasValue())
- {
- APIRET rc;
- // copy unicode text to clipboard
- OUString aString;
- aAny >>= aString;
- // share text
- rc = DosAllocSharedMem( (PPVOID) &pSharedText, NULL,
- aString.getLength() * 2 + 2,
- PAG_WRITE | PAG_COMMIT | OBJ_GIVEABLE | OBJ_ANY);
- if (!rc)
- memcpy( pSharedText, aString.getStr(), aString.getLength() * 2 + 2 );
- else
- pSharedText = NULL;
- debug_printf("Os2Clipboard::setContents SetClipbrdData text done\n");
- }
- } catch ( UnsupportedFlavorException&) {
- debug_printf("Os2Clipboard::setContents UnsupportedFlavorException (no text)\n");
- }
-
- // try bitmap transfer data (if any)
- try
- {
- Any aAnyB = m_aContents->getTransferData( nFlavorBitmap );
- if (aAnyB.hasValue())
- {
- hbm = OOoBmpToOS2Handle( aAnyB);
- debug_printf("Os2Clipboard::setContents SetClipbrdData bitmap done\n");
- }
- } catch ( UnsupportedFlavorException&) {
- debug_printf("Os2Clipboard::setContents UnsupportedFlavorException (no bitmap)\n");
- }
-
- // copy to clipboard
- if ( UWinOpenClipbrd( hAB) && (pSharedText || hbm))
- {
- // set the flag, so we will ignore the next WM_DRAWCLIPBOARD
- // since we generate it with following code.
- m_bInSetClipboardData = sal_True;
- UWinEmptyClipbrd( hAB);
- // give pointer to clipboard (it will become owner of pSharedText!)
- if (pSharedText) {
- UWinSetClipbrdData( hAB, (ULONG) pSharedText, UCLIP_CF_UNICODETEXT, CFI_POINTER);
- // update internal handle to avoid detection of this text as new data
- hText = (ULONG)pSharedText;
- }
- // give bitmap to clipboard
- if (hbm) {
- UWinSetClipbrdData( hAB, (ULONG) hbm, UCLIP_CF_BITMAP, CFI_HANDLE);
- // update internal handle to avoid detection of this bitmap as new data
- hBitmap = hbm;
- }
- // reset the flag, so we will not ignore next WM_DRAWCLIPBOARD
- m_bInSetClipboardData = sal_False;
- UWinCloseClipbrd( hAB);
- }
-
-}
-
-OUString SAL_CALL Os2Clipboard::getName() throw( RuntimeException )
-{
- debug_printf("Os2Clipboard::getName\n");
- return m_aName;
-}
-
-sal_Int8 SAL_CALL Os2Clipboard::getRenderingCapabilities() throw( RuntimeException )
-{
- debug_printf("Os2Clipboard::getRenderingCapabilities\n");
- return Delayed;
-}
-
-//========================================================================
-// XClipboardNotifier
-//========================================================================
-
-void SAL_CALL Os2Clipboard::addClipboardListener( const Reference< XClipboardListener >& listener ) throw( RuntimeException )
-{
- debug_printf("Os2Clipboard::addClipboardListener\n");
- MutexGuard aGuard( rBHelper.rMutex );
- OSL_ENSURE( !rBHelper.bInDispose, "do not add listeners in the dispose call" );
- OSL_ENSURE( !rBHelper.bDisposed, "object is disposed" );
- if (!rBHelper.bInDispose && !rBHelper.bDisposed)
- rBHelper.aLC.addInterface( getCppuType( (const ::com::sun::star::uno::Reference< XClipboardListener > *) 0), listener );
-}
-
-void SAL_CALL Os2Clipboard::removeClipboardListener( const Reference< XClipboardListener >& listener ) throw( RuntimeException )
-{
- debug_printf("Os2Clipboard::removeClipboardListener\n");
- MutexGuard aGuard( rBHelper.rMutex );
- OSL_ENSURE( !rBHelper.bDisposed, "object is disposed" );
- if (!rBHelper.bInDispose && !rBHelper.bDisposed)
- rBHelper.aLC.removeInterface( getCppuType( (const Reference< XClipboardListener > *) 0 ), listener ); \
-}
-
-// ------------------------------------------------------------------------
-
-void SAL_CALL Os2Clipboard::notifyAllClipboardListener( )
-{
- if ( !rBHelper.bDisposed )
- {
- ClearableMutexGuard aGuard( rBHelper.rMutex );
- if ( !rBHelper.bDisposed )
- {
- aGuard.clear( );
-
- ClearableMutexGuard aGuard(m_aMutex);
- // copy member references on stack so they can be called
- // without having the mutex
- Reference< XClipboardOwner > xOwner( m_aOwner );
- Reference< XTransferable > xTrans( m_aContents );
- // clear members
- m_aOwner.clear();
- m_aContents.clear();
- // release the mutex
- aGuard.clear();
-
- // inform previous owner of lost ownership
- if ( xOwner.is() )
- xOwner->lostOwnership(static_cast < XClipboard * > (this), m_aContents);
-
- OInterfaceContainerHelper* pICHelper = rBHelper.aLC.getContainer(
- getCppuType( ( Reference< XClipboardListener > * ) 0 ) );
-
- if ( pICHelper )
- {
- try
- {
- OInterfaceIteratorHelper iter(*pICHelper);
- m_aContents = 0;
- m_aContents = new Os2Transferable( static_cast< OWeakObject* >(this) );
- ClipboardEvent aClipbEvent(static_cast<XClipboard*>(this), m_aContents);
-
- while(iter.hasMoreElements())
- {
- try
- {
- Reference<XClipboardListener> xCBListener(iter.next(), UNO_QUERY);
- if (xCBListener.is())
- xCBListener->changedContents(aClipbEvent);
- }
- catch(RuntimeException&)
- {
- OSL_FAIL( "RuntimeException caught" );
- debug_printf( "RuntimeException caught" );
- }
- }
- }
- catch(const ::com::sun::star::lang::DisposedException&)
- {
- OSL_FAIL("Service Manager disposed");
- debug_printf( "Service Manager disposed");
-
- // no further clipboard changed notifications
- //m_pImpl->unregisterClipboardViewer();
- }
-
- } // end if
- } // end if
- } // end if
-}
-
-// ------------------------------------------------------------------------
-
-Sequence< OUString > SAL_CALL Os2Clipboard_getSupportedServiceNames()
-{
- Sequence< OUString > aRet(1);
- aRet[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( OS2_CLIPBOARD_SERVICE_NAME ));
- return aRet;
-}
-
-// ------------------------------------------------------------------------
-
-Reference< XInterface > SAL_CALL Os2Clipboard_createInstance(
- const Reference< XMultiServiceFactory > & xMultiServiceFactory)
-{
- return Reference < XInterface >( ( OWeakObject * ) new Os2Clipboard());
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/os2/clipb/Os2Clipboard.hxx b/dtrans/source/os2/clipb/Os2Clipboard.hxx
deleted file mode 100644
index 2d2796d..0000000
--- a/dtrans/source/os2/clipb/Os2Clipboard.hxx
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _OS2CLIPBOARD_HXX_
-#define _OS2CLIPBOARD_HXX_
-
-#include <rtl/ustring.hxx>
-#include <sal/types.h>
-#include <cppuhelper/compbase4.hxx>
-#include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp>
-#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp>
-#include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp>
-#include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/datatransfer/clipboard/RenderingCapabilities.hpp>
-#include "Os2Transferable.hxx"
-
-// the service names
-#define OS2_CLIPBOARD_SERVICE_NAME "com.sun.star.datatransfer.clipboard.SystemClipboard"
-
-// the implementation names
-#define OS2_CLIPBOARD_IMPL_NAME "com.sun.star.datatransfer.clipboard.Os2Clipboard"
-
-// the registry key names
-#define OS2_CLIPBOARD_REGKEY_NAME "/com.sun.star.datatransfer.clipboard.Os2Clipboard/UNO/SERVICES/com.sun.star.datatransfer.clipboard.SystemClipboard"
-
-namespace os2 {
-
-class Os2Clipboard :
- //public cppu::WeakComponentImplHelper3< ::com::sun::star::datatransfer::clipboard::XClipboardEx, ::com::sun::star::datatransfer::clipboard::XClipboardNotifier, ::com::sun::star::lang::XServiceInfo >
- public ::cppu::WeakComponentImplHelper4 < \
- ::com::sun::star::datatransfer::clipboard::XClipboardEx, \
- ::com::sun::star::datatransfer::clipboard::XClipboardNotifier, \
- ::com::sun::star::lang::XServiceInfo, \
- ::com::sun::star::lang::XInitialization >
-{
-
-public:
- Os2Clipboard();
- ~Os2Clipboard();
-
- /*
- * XInitialization
- */
- virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
- throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
-
- /*
- * XServiceInfo
- */
- virtual ::rtl::OUString SAL_CALL getImplementationName()
- throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
- throw(::com::sun::star::uno::RuntimeException);
-
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
- throw(::com::sun::star::uno::RuntimeException);
-
- /*
- * XClipboard
- */
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > SAL_CALL getContents()
- throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setContents( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner )
- throw( ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getName()
- throw( ::com::sun::star::uno::RuntimeException );
-
- /*
- * XClipboardEx
- */
- virtual sal_Int8 SAL_CALL getRenderingCapabilities()
- throw( ::com::sun::star::uno::RuntimeException );
-
- /*
- * XClipboardNotifier
- */
- virtual void SAL_CALL addClipboardListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
- throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeClipboardListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardListener >& listener )
- throw( ::com::sun::star::uno::RuntimeException );
- void SAL_CALL notifyAllClipboardListener( );
-
-public:
- sal_Bool m_bInSetClipboardData;
-
-private:
- HAB hAB;
- HWND hObjWnd;
- ULONG hText, hBitmap; // handles to previous clipboard data
-
- ::osl::Mutex m_aMutex;
- ::rtl::OUString m_aName;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > m_aContents;
- ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner > m_aOwner;
-
- sal_Bool m_bInitialized;
-
-};
-
-} // namespace Os2
-
-// ------------------------------------------------------------------------
-
-::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL Os2Clipboard_getSupportedServiceNames();
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Os2Clipboard_createInstance(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & xMultiServiceFactory);
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/os2/clipb/Os2Service.cxx b/dtrans/source/os2/clipb/Os2Service.cxx
deleted file mode 100644
index bdbdfd2..0000000
--- a/dtrans/source/os2/clipb/Os2Service.cxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#include "Os2Clipboard.hxx"
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/container/XSet.hpp>
-#include <osl/diagnose.h>
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::registry;
-using namespace cppu;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::datatransfer::clipboard;
-using namespace os2;
-
-using ::rtl::OUString;
-
-namespace os2 {
-
-Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
-{
- return Reference< XInterface >( static_cast< XClipboard* >( new Os2Clipboard() ) );
-}
-
-} // namespace os2
-
-extern "C"
-{
-
-void SAL_CALL component_getImplementationEnvironment(
- const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
-{
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-}
-
-void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* pRegistryKey )
-{
- void* pRet = 0;
-
- if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, OS2_CLIPBOARD_IMPL_NAME ) ) )
- {
- Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( OS2_CLIPBOARD_SERVICE_NAME ) );
-
- //OUString( RTL_CONSTASCII_USTRINGPARAM( FPS_IMPL_NAME ) )
- Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory(
- reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
- OUString::createFromAscii( pImplName ),
- createInstance,
- aSNS ) );
- if ( xFactory.is() )
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- }
-
- return pRet;
-}
-
-} // extern "C"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/os2/clipb/Os2Transferable.cxx b/dtrans/source/os2/clipb/Os2Transferable.cxx
deleted file mode 100644
index bf04232..0000000
--- a/dtrans/source/os2/clipb/Os2Transferable.cxx
+++ /dev/null
@@ -1,179 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#if OSL_DEBUG_LEVEL > 1
-#include <stdio.h>
-#endif
-
-#define INCL_WIN
-#include <svpm.h>
-
-#include <string.h>
-#include <com/sun/star/io/IOException.hpp>
-#include "Os2Transferable.hxx"
-
-using namespace com::sun::star::datatransfer;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::io;
-using namespace com::sun::star::uno;
-using namespace cppu;
-using namespace osl;
-using namespace os2;
-
-using ::rtl::OUString;
-
-// =======================================================================
-
-Os2Transferable::Os2Transferable(
- const Reference< XInterface >& xCreator ) :
- m_xCreator( xCreator )
-{
- debug_printf("Os2Transferable::Os2Transferable %08x\n", this);
- hAB = WinQueryAnchorBlock( HWND_DESKTOP );
-
- // query clipboard data to get mimetype
- if( UWinOpenClipbrd( hAB ) )
- {
- ULONG handle = UWinQueryClipbrdData( hAB, UCLIP_CF_UNICODETEXT);
- if (handle) {
- aFlavor.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16"));
- aFlavor.DataType = getCppuType( (OUString*)0 );
- //debug_printf("Os2Transferable::Os2Transferable pszText %s\n", pszText);
- }
- handle = UWinQueryClipbrdData( hAB, UCLIP_CF_BITMAP);
- if (handle) {
- aFlavor.MimeType = OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ));
- aFlavor.DataType = getCppuType( (OUString*)0 );
- //debug_printf("Os2Transferable::Os2Transferable pszText %s\n", pszText);
- }
- UWinCloseClipbrd( hAB);
- }
- else
- {
- debug_printf("Os2Transferable::Os2Transferable failed to open clipboard\n");
- }
-
-}
-
-//==================================================================================================
-
-Os2Transferable::~Os2Transferable()
-{
- debug_printf("Os2Transferable::~Os2Transferable %08x\n", this);
-}
-
-//==================================================================================================
-
-Any SAL_CALL Os2Transferable::getTransferData( const DataFlavor& rFlavor )
- throw(UnsupportedFlavorException, IOException, RuntimeException)
-{
- debug_printf("Os2Transferable::getTransferData %08x\n", this);
- debug_printf("Os2Transferable::getTransferData mimetype: %s\n", CHAR_POINTER(rFlavor.MimeType));
- Any aRet;
- Sequence< sal_Int8 > aData;
-
- // retrieve unicode text
- if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16")) ) )
- {
- if( UWinOpenClipbrd( hAB ) )
- {
- // check if clipboard has text format
- sal_Unicode* pszText = (sal_Unicode*) UWinQueryClipbrdData( hAB, UCLIP_CF_UNICODETEXT);
- if (pszText) {
- // convert to oustring and return it
- OUString aString( pszText);
- aRet <<= aString;
- }
- UWinCloseClipbrd( hAB );
- if (pszText)
- return aRet;
- }
- }
-
- // retrieve bitmap
- if( rFlavor.MimeType.equalsIgnoreAsciiCase( OUString(RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" )) ) )
- {
- if( UWinOpenClipbrd( hAB ) )
- {
- // check if clipboard has text format
- ULONG handle = UWinQueryClipbrdData( hAB, UCLIP_CF_BITMAP);
- if (handle) {
- Sequence< sal_Int8 > winDIBStream;
- // convert to oustring and return it
- if (OS2HandleToOOoBmp( handle, &winDIBStream))
- aRet <<= winDIBStream;
- else
- handle = 0;
- }
- UWinCloseClipbrd( hAB );
- if (handle)
- return aRet;
- }
- }
-
- // clipboard format unsupported, throw exception
- throw UnsupportedFlavorException( rFlavor.MimeType, static_cast < XTransferable * > ( this ) );
-}
-
-//==================================================================================================
-
-Sequence< DataFlavor > SAL_CALL Os2Transferable::getTransferDataFlavors()
- throw(RuntimeException)
-{
- debug_printf("Os2Transferable::getTransferDataFlavors %08x\n", this);
- Sequence< DataFlavor > aFlavorList(1);
- aFlavorList[0] = aFlavor;
- debug_printf("Os2Transferable::getTransferDataFlavors mimetype: %s\n", CHAR_POINTER(aFlavor.MimeType));
- return aFlavorList;
-}
-
-//==================================================================================================
-
-sal_Bool SAL_CALL Os2Transferable::isDataFlavorSupported( const DataFlavor& aFlavor )
- throw(RuntimeException)
-{
- debug_printf("Os2Transferable::isDataFlavorSupported %08x\n", this);
- debug_printf("Os2Transferable::isDataFlavorSupported %s\n", CHAR_POINTER(aFlavor.MimeType));
-
- if( aFlavor.DataType != getCppuType( (Sequence< sal_Int8 >*)0 ) )
- {
- if( ! aFlavor.MimeType.equalsIgnoreAsciiCase( OUString(RTL_CONSTASCII_USTRINGPARAM("text/plain;charset=utf-16")) ) &&
- aFlavor.DataType == getCppuType( (OUString*)0 ) )
- return false;
- }
-
- Sequence< DataFlavor > aFlavors( getTransferDataFlavors() );
- for( int i = 0; i < aFlavors.getLength(); i++ )
- if( aFlavor.MimeType.equalsIgnoreAsciiCase( aFlavors.getConstArray()[i].MimeType ) &&
- aFlavor.DataType == aFlavors.getConstArray()[i].DataType )
- return sal_True;
-
- return sal_False;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/os2/clipb/Os2Transferable.hxx b/dtrans/source/os2/clipb/Os2Transferable.hxx
deleted file mode 100644
index 7817b2b..0000000
--- a/dtrans/source/os2/clipb/Os2Transferable.hxx
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _DTRANS_OS2_TRANSFERABLE_HXX_
-#define _DTRANS_OS2_TRANSFERABLE_HXX_
-
-#include <com/sun/star/datatransfer/XTransferable.hpp>
-
-#include <com/sun/star/lang/XEventListener.hpp>
-#include <cppuhelper/implbase1.hxx>
-#include <osl/thread.h>
-
-#include <errno.h>
-
-#include <uclip.h>
-
-#define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer
-
-#if OSL_DEBUG_LEVEL > 1
-#define debug_printf( ...) { 1; }
-#else
-#define debug_printf( ...) { 1; }
-#endif
-
-#define CPPUTYPE_SEQSALINT8 getCppuType( (const Sequence< sal_Int8 >*) 0 )
-#define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8
-
-#ifdef OOO_VENDOR
-using namespace com::sun::star::uno;
-HBITMAP OOoBmpToOS2Handle( Any &aAnyB);
-int OS2HandleToOOoBmp( HBITMAP hbm, Sequence< sal_Int8 >* winDIBStream);
-#else
-#define OOoBmpToOS2Handle(a) 0
-#define OS2HandleToOOoBmp(a,b) 0
-#endif
-
-namespace os2 {
-
- class Os2Transferable : public ::cppu::WeakImplHelper1 <
- ::com::sun::star::datatransfer::XTransferable >
- {
- HAB hAB;
- ::rtl::OUString clipText;
- ::com::sun::star::datatransfer::DataFlavor aFlavor;
- ::osl::Mutex m_aMutex;
- ::com::sun::star::uno::Reference< XInterface > m_xCreator;
-
- public:
- Os2Transferable( const ::com::sun::star::uno::Reference< XInterface >& xCreator);
- virtual ~Os2Transferable();
-
- /*
- * XTransferable
- */
-
- virtual ::com::sun::star::uno::Any SAL_CALL getTransferData( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
- throw(::com::sun::star::datatransfer::UnsupportedFlavorException,
- ::com::sun::star::io::IOException,
- ::com::sun::star::uno::RuntimeException
- );
-
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors( )
- throw(::com::sun::star::uno::RuntimeException);
-
- virtual sal_Bool SAL_CALL isDataFlavorSupported( const ::com::sun::star::datatransfer::DataFlavor& aFlavor )
- throw(::com::sun::star::uno::RuntimeException);
- };
-
-} // namespace
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/os2/clipb/exports.dxp b/dtrans/source/os2/clipb/exports.dxp
deleted file mode 100644
index 926e49f..0000000
--- a/dtrans/source/os2/clipb/exports.dxp
+++ /dev/null
@@ -1,3 +0,0 @@
-component_getImplementationEnvironment
-component_getFactory
-
diff --git a/dtrans/source/os2/clipb/makefile.mk b/dtrans/source/os2/clipb/makefile.mk
deleted file mode 100644
index a1ccc1a..0000000
--- a/dtrans/source/os2/clipb/makefile.mk
+++ /dev/null
@@ -1,59 +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=dtrans
-TARGET=sysdtrans
-ENABLE_EXCEPTIONS=TRUE
-COMP1TYPELIST=$(TARGET)
-COMPRDB=$(SOLARBINDIR)$/types.rdb
-USE_BOUNDCHK=
-
-.IF "$(USE_BOUNDCHK)"=="TR"
-bndchk=tr
-stoponerror=tr
-.ENDIF
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# ------------------------------------------------------------------
-
-SLOFILES= $(SLO)$/Os2Clipboard.obj \
- $(SLO)$/Os2Service.obj \
- $(SLO)$/Os2Transferable.obj
-
-.IF "$(OOO_VENDOR)"=="Serenity Systems Intl"
-SLOFILES+= $(SLO)$/OS2Bitmap.obj
-CDEFS+=-DOOO_VENDOR
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/dtrans/source/os2/clipb/sysdtrans.xml b/dtrans/source/os2/clipb/sysdtrans.xml
deleted file mode 100644
index cc61561..0000000
--- a/dtrans/source/os2/clipb/sysdtrans.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
-<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
- <module-name> sysdtrans </module-name>
- <component-description>
- <author> Tino Rachui </author>
- <name> com.sun.star.comp.datatransfer.SystemClipboard </name>
- <description>
- The win32 implementation of the datatransfer service.
-</description>
- <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
- <language> c++ </language>
- <status value="beta"/>
- <supported-service> com.sun.star.datatransfer.clipboard.SystemClipboard </supported-service>
- <service-dependency> ... </service-dependency>
- <type> com.sun.star.datatransfer.clipboard.XClipboardEx </type>
- <type> com.sun.star.datatransfer.XTransferable </type>
- <type> com.sun.star.datatransfer.XTransferableEx </type>
- <type> com.sun.star.datatransfer.clipboard.XClipboardOwner</type>
- <type> com.sun.star.datatransfer.clipboard.XClipboardListener</type>
- <type> com.sun.star.datatransfer.clipboard.XClipboardNotifier</type>
- <type> com.sun.star.datatransfer.clipboard.XFlushableClipboard</type>
- <type> com.sun.star.datatransfer.clipboard.RenderingCapabilities</type>
- <type> com.sun.star.datatransfer.XTransferDataAccess </type>
- <type> com.sun.star.lang.XComponent </type>
- <type> com.sun.star.lang.XMultiServiceFactory </type>
- <type> com.sun.star.lang.XSingleServiceFactory </type>
- <type> com.sun.star.lang.XServiceInfo </type>
- <type> com.sun.star.lang.XTypeProvider </type>
- <type> com.sun.star.lang.IllegalArgumentException </type>
- <type> com.sun.star.uno.TypeClass </type>
- <type> com.sun.star.uno.XWeak </type>
- <type> com.sun.star.uno.XAggregation </type>
- <type> com.sun.star.registry.XRegistryKey </type>
- <type> com.sun.star.container.XSet </type>
- </component-description>
- <project-build-dependency> cppuhelper </project-build-dependency>
- <project-build-dependency> cppu </project-build-dependency>
- <project-build-dependency> sal </project-build-dependency>
- <runtime-module-dependency> cppuhelper </runtime-module-dependency>
- <runtime-module-dependency> cppu2 </runtime-module-dependency>
- <runtime-module-dependency> sal2 </runtime-module-dependency>
-</module-description>
diff --git a/tools/os2/inc/dll.hxx b/tools/os2/inc/dll.hxx
deleted file mode 100644
index 297b136..0000000
--- a/tools/os2/inc/dll.hxx
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _DLL_HXX
-#define _DLL_HXX
-
-// MultiThread-Sicherung aktivieren
-void EnterMultiThread( int bEnter );
-int IsMultiThread();
-
-// Um Resourcen wieder freizugeben
-//YD void ImpDeInitOS2Tools();
-inline void ImpDeInitOS2Tools() {}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/os2/source/dll/toolsdll.cxx b/tools/os2/source/dll/toolsdll.cxx
deleted file mode 100644
index 9770611..0000000
--- a/tools/os2/source/dll/toolsdll.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#include <tools/shl.hxx>
-
-#include <dll.hxx>
-
-// =======================================================================
-
-static void* aAppData[SHL_COUNT];
-
-// -----------------------------------------------------------------------
-
-void** GetAppData( USHORT nSharedLib )
-{
- return &(aAppData[nSharedLib]);
-}
-
-// =======================================================================
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/os2/howto.txt b/vcl/os2/howto.txt
deleted file mode 100644
index 8711e8e..0000000
--- a/vcl/os2/howto.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-
-VCL positioning
-
-Window coordinates are parent relative, with exception of maState fields, they
-have screen coordinates.
-
-Every window has a parent window, usually the client area of an existing window,
-otherwise the desktop window.
-
-When a window is to be sized/moved, SetPosSize is called.
-Since coordinates are the position/size of client area, we need to calculate
-current window frame size/position and map to screen coordinates using the
-owner window position as offset.
diff --git a/vcl/os2/inc/salbmp.h b/vcl/os2/inc/salbmp.h
deleted file mode 100644
index 5b40fa5..0000000
--- a/vcl/os2/inc/salbmp.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _SV_SALBMP_H
-#define _SV_SALBMP_H
-
-#include <tools/gen.hxx>
-#include <vcl/sv.h>
-#include <vcl/salbmp.hxx>
-
-// --------------
-// - SalBitmap -
-// --------------
-
-struct BitmapBuffer;
-class BitmapColor;
-class BitmapPalette;
-class SalGraphics;
-
-#define HANDLE ULONG
-#define HBITMAP ULONG
-
-class Os2SalBitmap : public SalBitmap
-{
-private:
-
- Size maSize;
- HANDLE mhDIB;
- HANDLE mhDIB1Subst;
- HBITMAP mhDDB;
- USHORT mnBitCount;
-
-public:
-
- HANDLE ImplGethDIB() const { return mhDIB; }
- HBITMAP ImplGethDDB() const { return mhDDB; }
- HANDLE ImplGethDIB1Subst() const { return mhDIB1Subst; }
-
- void ImplReplacehDIB1Subst( HANDLE hDIB1Subst );
-
- static HANDLE ImplCreateDIB( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
- static HANDLE ImplCreateDIB4FromDIB1( HANDLE hDIB1 );
- static HANDLE ImplCopyDIBOrDDB( HANDLE hHdl, BOOL bDIB );
- static USHORT ImplGetDIBColorCount( HANDLE hDIB );
- static void ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,
- const Size& rSizePixel, BOOL bRLE4 );
-
- //BOOL Create( HANDLE hBitmap, BOOL bDIB, BOOL bCopyHandle );
-
-public:
-
- Os2SalBitmap();
- ~Os2SalBitmap();
-
-public:
-
- //BOOL Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
- //BOOL Create( const SalBitmap& rSalBmpImpl );
- //BOOL Create( const SalBitmap& rSalBmpImpl, SalGraphics* pGraphics );
- //BOOL Create( const SalBitmap& rSalBmpImpl, USHORT nNewBitCount );
-
- //void Destroy();
-
- //Size GetSize() const { return maSize; }
- //USHORT GetBitCount() const { return mnBitCount; }
-
- //BitmapBuffer* AcquireBuffer( bool bReadOnly );
- //void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
- bool Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle );
- virtual bool Create( const Size& rSize, USHORT nBitCount, const BitmapPalette& rPal );
- virtual bool Create( const SalBitmap& rSalBmpImpl );
- virtual bool Create( const SalBitmap& rSalBmpImpl, SalGraphics* pGraphics );
- virtual bool Create( const SalBitmap& rSalBmpImpl, USHORT nNewBitCount );
-
- virtual void Destroy();
-
- virtual Size GetSize() const { return maSize; }
- virtual USHORT GetBitCount() const { return mnBitCount; }
-
- virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
- virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
- virtual bool GetSystemData( BitmapSystemData& rData );
-};
-
-#endif // _SV_SALBMP_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/os2/inc/saldata.hxx b/vcl/os2/inc/saldata.hxx
deleted file mode 100644
index 347989d..0000000
--- a/vcl/os2/inc/saldata.hxx
+++ /dev/null
@@ -1,310 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _SV_SALDATA_HXX
-#define _SV_SALDATA_HXX
-
-#include <vcl/sv.h>
-#include <vcl/svdata.hxx>
-#include <vcl/salwtype.hxx>
-
-class Os2SalInstance;
-class Os2SalFrame;
-class Os2SalObject;
-
-extern "C" int debug_printf(const char *f, ...);
-
-// --------------
-// - SalIMEData -
-// --------------
-
-// YD FIXME #define ENABLE_IME
-
-#ifdef ENABLE_IME
-
-struct SalIMEData;
-
-#ifdef OS2IM_INCLUDED
-
-typedef APIRET (APIENTRY ImAssociateInstanceFunc)( HWND hwnd, HIMI himi, PHIMI phimiPrev );
-typedef APIRET (APIENTRY ImGetInstanceFunc)( HWND hwnd, PHIMI phimi );
-typedef APIRET (APIENTRY ImReleaseInstanceFunc)( HWND hwnd, HIMI himi );
-typedef APIRET (APIENTRY ImSetConversionFontFunc)( HIMI himi, PFATTRS pFontAttrs );
-typedef APIRET (APIENTRY ImSetConversionFontSizeFunc)( HIMI himi, PSIZEF psizfxBox );
-typedef APIRET (APIENTRY ImGetConversionStringFunc)( HIMI himi, ULONG ulIndex, PVOID pBuf, PULONG pulBufLen );
-typedef APIRET (APIENTRY ImGetResultStringFunc)( HIMI himi, ULONG ulIndex, PVOID pBuf, PULONG pulBufLen );
-typedef APIRET (APIENTRY ImSetCandidateWindowPosFunc)( HIMI himi, PCANDIDATEPOS pCandidatePos );
-typedef APIRET (APIENTRY ImQueryIMEPropertyFunc)( HIMI himi, ULONG ulIndex, PULONG pulProp );
-typedef APIRET (APIENTRY ImRequestIMEFunc)( HIMI himi, ULONG ulAction, ULONG ulIndex, ULONG ulValue );
-typedef APIRET (APIENTRY ImSetIMModeFunc)( HIMI himi, ULONG ulInputMode, ULONG ulConversionMode );
-typedef APIRET (APIENTRY ImQueryIMModeFunc)( HIMI himi, PULONG pulInputMode, PULONG pulConversionMode );
-
-struct SalIMEData
-{
- HMODULE mhModIME;
- ImAssociateInstanceFunc* mpAssocIME;
- ImGetInstanceFunc* mpGetIME;
- ImReleaseInstanceFunc* mpReleaseIME;
- ImSetConversionFontFunc* mpSetConversionFont;
- ImSetConversionFontSizeFunc* mpSetConversionFontSize;
- ImGetConversionStringFunc* mpGetConversionString;
- ImGetResultStringFunc* mpGetResultString;
- ImSetCandidateWindowPosFunc* mpSetCandidateWin;
- ImQueryIMEPropertyFunc* mpQueryIMEProperty;
- ImRequestIMEFunc* mpRequestIME;
- ImSetIMModeFunc* mpSetIMEMode;
- ImQueryIMModeFunc* mpQueryIMEMode;
-};
-
-#endif
-
-#endif
-
-// --------------------
-// - Icon cache -
-// --------------------
-
-struct SalIcon
-{
- int nId;
- HPOINTER hIcon;
- SalIcon *pNext;
-};
-
-// -----------
-// - SalData -
-// -----------
-
-struct SalData
-{
- HAB mhAB; // anchor block handle
- HMQ mhMQ; // handle of os2 message queue
- int mnArgc; // commandline param count
- char** mpArgv; // commandline
- ULONG mnNewTimerMS; // Neue Zeit, mit dem der Timer gestartet werden soll
- ULONG mnTimerMS; // Current Time (in MS) of the Timer
- ULONG mnTimerOrgMS; // Current Original Time (in MS)
- ULONG mnNextTimerTime;
- ULONG mnLastEventTime;
- ULONG mnTimerId; // os2 timer id
- BOOL mbInTimerProc; // timer event is currently being dispatched
- //SALTIMERPROC mpTimerProc; // timer callback proc
- HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message
- AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test
- Os2SalInstance* mpFirstInstance; // pointer of first instance
- Os2SalFrame* mpFirstFrame; // pointer of first frame
- Os2SalFrame* mpCreateFrame; // Create-Frame for WM_CREATE
- Os2SalObject* mpFirstObject; // pointer of first object window
- ULONG mnAppThreadId; // Id from Applikation-Thread
- ULONG mnFontMetricCount; // number of entries in the font list
- PFONTMETRICS mpFontMetrics; // cached font list
- BOOL mbObjClassInit; // Ist SALOBJECTCLASS initialised
-#ifdef ENABLE_IME
- SalIMEData* mpIMEData; // SalIME-Data
- BOOL mbIMEInit; // SalIME-Data-Init
-#endif
-
- SalIcon* mpFirstIcon; // icon cache, points to first icon, NULL if none
-
-};
-
-inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = (void*)pData; }
-inline SalData* GetSalData() { return (SalData*)ImplGetSVData()->mpSalData; }
-inline SalData* GetAppSalData() { return (SalData*)ImplGetAppSVData()->mpSalData; }
-
-// --------------
-// - SalShlData -
-// --------------
-
-#define OS2_VER_211 211
-#define OS2_VER_WARP3 230
-#define OS2_VER_WARP4 240
-
-struct SalShlData
-{
- HMODULE mhMod; // Module handle of SAL-DLL
- USHORT mnVersion; // 211 = OS2 2.11; 230 = OS2 3.0; 240 = OS2 4.0
- PFNWP mpFrameProc; // old frame proc
-};
-
-extern SalShlData aSalShlData;
-
-BOOL SalImplHandleProcessMenu( HWND hWnd, ULONG nMsg, MPARAM nMP1, MPARAM nMP2 );
-
-// --------------------------------------------
-// - SALSHL.CXX - for accessing DLL resources -
-// --------------------------------------------
-
-HPOINTER ImplLoadSalCursor( int nId );
-HBITMAP ImplLoadSalBitmap( int nId );
-BOOL ImplLoadSalIcon( int nId, HPOINTER& rIcon);
-
-// SALGDI.CXX
-void ImplInitSalGDI();
-void ImplFreeSalGDI();
-
-// --------------
-// - Prototypes -
-// --------------
-
-// \\OS2\SOURCE\APP\SALINST.CXX
-void ImplSalYieldMutexAcquireWithWait();
-ULONG ImplSalReleaseYieldMutex();
-void ImplSalAcquireYieldMutex( ULONG nCount );
-ULONG GetCurrentThreadId();
-BOOL ImplSalYieldMutexTryToAcquire();
-void ImplSalYieldMutexAcquire();
-void ImplSalYieldMutexRelease();
-
-// \\OS2\SOURCE\WINDOW\SALFRAME.CXX
-MRESULT EXPENTRY SalFrameWndProc( HWND hWnd, ULONG nMsg, MPARAM nMP1, MPARAM nMP2 );
-MRESULT EXPENTRY SalFrameFrameProc( HWND hWnd, ULONG nMsg, MPARAM nMP1, MPARAM nMP2 );
-// \SV\WIN\SOURCE\APP\SALTIMER.CXX
-#define SALTIMERPROC_RECURSIVE 0xffffffff
-void SalTimerProc( HWND hWnd, UINT nMsg, UINT nId, ULONG nTime );
-
-// \WIN\SOURCE\WINDOW\SALFRAME.CXX
-void SalTestMouseLeave();
-
-// \\OS2\SOURCE\WINDOW\SALFRAME.CXX
-// return Frame for Message-Handling
-Os2SalFrame* GetSalDefaultFrame();
-
-// \\OS2\SOURCE\WINDOW\SALFRAME.CXX
-// IME-Daten wieder freigeben
-#ifdef ENABLE_IME
-void ImplReleaseSALIMEData();
-#endif
-
-// -----------
-// - Defines -
-// -----------
-
-#define SAL_PROFILE_APPNAME ((PSZ)"StarOffice")
-#define SAL_PROFILE_USEDJP ((PSZ)"UseDJP")
-#define SAL_PROFILE_PRINTDJP ((PSZ)"PrintDJP")
-#define SAL_PROFILE_PRINTRAW ((PSZ)"PrintRAW")
-
-#define SAL_FRAME_WNDEXTRA sizeof(ULONG)
-#define SAL_FRAME_THIS 0
-#define SAL_FRAME_CLASSNAME "SALFRAME"
-#define SAL_SUBFRAME_CLASSNAME "SALSUBFRAME"
-#define SAL_OBJECT_WNDEXTRA sizeof(ULONG)
-#define SAL_OBJECT_THIS 0
-#define SAL_OBJECT_CLASSNAME "SALOBJECT"
-#define SAL_OBJECT_CHILDCLASSNAME "SALOBJECTCHILD"
-#define SAL_OBJECT_CLIPCLASSNAME "SALOBJECTCLIP"
-#define SAL_COM_CLASSNAME "SALCOMWND"
-
-#define SAL_MOUSELEAVE_TIMEOUT 300
-
-// MP1 == 0; MP2 == pData
-#define SAL_MSG_USEREVENT (WM_USER+111)
-// MP1 == 0; MP2 == MousePosition relativ to upper left of screen
-#define SAL_MSG_MOUSELEAVE (WM_USER+112)
-// MP1 == hDC; MP2 == 0
-#define SAL_MSG_PRINTABORTJOB (WM_USER+113)
-// MP1 == 0; MP2 == 0
-#define SAL_MSG_STARTTIMER (WM_USER+114)
-// MP1 == nFrameStyle; MP2 == pParent; lResult pFrame
-#define SAL_MSG_CREATEFRAME (WM_USER+115)
-// MP1 == 0; MP2 == pParent; lResult pObject
-#define SAL_MSG_CREATEOBJECT (WM_USER+116)
-// MP1 == bWait; MP2 == pMutex
-#define SAL_MSG_THREADYIELD (WM_USER+117)
-// MP1 == 0; MP2 == 0
-#define SAL_MSG_RELEASEWAITYIELD (WM_USER+118)
-// MP1 == 0; MP2 == pData
-#define SAL_MSG_SYSPROCESSMENU (WM_USER+119)
-// POSTFOCUS-Message; MP1 == nMP1; MP2 == nMP2 (SHORT1( bFocus ), 0)
-#define SAL_MSG_POSTFOCUS (WM_USER+120)
-// POSTSIZE-Message; MP1 == nMP1; MP2 == nMP2
-#define SAL_MSG_POSTSIZE (WM_USER+121)
-
-// wParam == wParam; lParam == lParam
-#define SAL_MSG_POSTMOVE (WM_USER+136)
-// wParam == pRECT; lParam == 0
-#define SAL_MSG_POSTPAINT (WM_USER+137)
-// wParam == nFlags; lParam == 0
-#define SAL_MSG_TOTOP (WM_USER+142)
-// wParam == bVisible; lParam == 0
-#define SAL_MSG_SHOW (WM_USER+143)
-
-// SysChild-ToTop; nMP1 = 0; nMP2 = 0
-#define SALOBJ_MSG_TOTOP (WM_USER+150)
-// POSTFOCUS-Message; MP1 == nMP1; MP2 == nMP2 (SHORT1( bFocus ), 0)
-#define SALOBJ_MSG_POSTFOCUS (WM_USER+151)
-
-// wParam == 0; lParam == 0
-#define SAL_MSG_DESTROYFRAME (WM_USER+160)
-// wParam == 0; lParam == pObject;
-#define SAL_MSG_DESTROYOBJECT (WM_USER+161)
-// wParam == 0; lParam == this; lResult == bRet
-#define SAL_MSG_CREATESOUND (WM_USER+162)
-// wParam == 0; lParam == this
-#define SAL_MSG_DESTROYSOUND (WM_USER+163)
-// wParam == hWnd; lParam == 0; lResult == hDC
-#define SAL_MSG_GETDC (WM_USER+164)
-// wParam == hWnd; lParam == 0
-#define SAL_MSG_RELEASEDC (WM_USER+165)
-// wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd
-#define SAL_MSG_RECREATEHWND (WM_USER+166)
-// wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd
-#define SAL_MSG_RECREATECHILDHWND (WM_USER+167)
-// wParam == 0; lParam == HWND;
-#define SAL_MSG_DESTROYHWND (WM_USER+168)
-// POSTTIMER-Message; wparam = 0, lParam == time
-#define SAL_MSG_POSTTIMER (WM_USER+169)
-
-// -----------------
-// - Helpfunctions -
-// -----------------
-
-inline void SetWindowPtr( HWND hWnd, SalFrame* pThis )
-{
- WinSetWindowULong( hWnd, SAL_FRAME_THIS, (ULONG)pThis );
-}
-
-inline Os2SalFrame* GetWindowPtr( HWND hWnd )
-{
- return (Os2SalFrame*)WinQueryWindowULong( hWnd, SAL_FRAME_THIS );
-}
-
-inline void SetSalObjWindowPtr( HWND hWnd, SalObject* pThis )
-{
- WinSetWindowULong( hWnd, SAL_OBJECT_THIS, (ULONG)pThis );
-}
-
-inline Os2SalObject* GetSalObjWindowPtr( HWND hWnd )
-{
- return (Os2SalObject*)WinQueryWindowULong( hWnd, SAL_OBJECT_THIS );
-}
-
-#endif // _SV_SALDATA_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/os2/inc/salframe.h b/vcl/os2/inc/salframe.h
deleted file mode 100644
index 2098050..0000000
--- a/vcl/os2/inc/salframe.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _SV_SALFRAME_H
-#define _SV_SALFRAME_H
-
-#include <vcl/sv.h>
-#include <vcl/sysdata.hxx>
-#include <vcl/salframe.hxx>
-
-
-#ifndef PM_BIDI_INCLUDED
-#include <pmbidi.h>
-#endif
-
-#ifndef __UCONV_H__
-#include <uconv.h>
-#endif
-
-#ifndef __UNIDEF_H__
-#include <unidef.h>
-#endif
-
-#ifndef __UNIKBD_H__
-#include <unikbd.h>
-#endif
-
-//class SalFrame;
-class Os2SalGraphics;
-
-// ----------------
-// - SalFrameData -
-// ----------------
-
-//class SalFrameData
-class Os2SalFrame : public SalFrame
-{
-public:
- HWND mhWndFrame; // HWND-Frame
- HWND mhWndClient; // HWND-Client
- HAB mhAB; // HAB
- HPOINTER mhPointer; // Current MousePointer
- void* mpInst; // VCL-Instance
- //SALFRAMEPROC mpProc; // VCL-Proc
- Os2SalGraphics* mpGraphics; // current frame graphics
- Os2SalFrame* mpNextFrame; // pointer to next frame
- SystemEnvData maSysData; // system data
- SalFrameState maState; // frame state
- int mnShowState; // show state
- ULONG mnStyle; // SalFrameStyle
- long mnWidth; // Window-Witdth
- long mnHeight; // Window-Height
- SWP maFullScreenRect; // WindowRect befor FullScreenMode
- BOOL mbGraphics; // is Graphics used
- BOOL mbAllwayOnTop; // Allways on top modus
- BOOL mbVisible; // Visible Show/Hide-Status
- BOOL mbMinHide; // hide called from OS2
- BOOL mbHandleIME; // TRUE: Wir handeln die IME-Messages
- BOOL mbConversionMode; // TRUE: Wir befinden uns im Conversion-Modus
- BOOL mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus
- BOOL mbCaption; // has window a caption
- BOOL mbBorder; // has window a border
- BOOL mbFixBorder; // has window a fixed border
- BOOL mbSizeBorder; // has window a sizeable border
- BOOL mbNoIcon; // is an window without an icon
- BOOL mbFloatWin; // is a FloatingWindow
- BOOL mbFullScreen; // TRUE: in full screen mode
- BOOL mbPresentation; // TRUE: Presentation Mode running
- BOOL mbInShow; // innerhalb eines Show-Aufrufs
- BOOL mbRestoreMaximize; // Restore-Maximize
- BOOL mbInMoveMsg; // Move-Message wird verarbeitet
- BOOL mbInSizeMsg; // Size-Message wird verarbeitet
- BOOL mbFullScreenToolWin; // WS_EX_TOOLWINDOW reset in FullScreenMode
- BOOL mbDefPos; // default-position
- BOOL mbOverwriteState; // TRUE: WindowState darf umgesetzt werden
-
- int mnMinWidth; // min. client width in pixeln
- int mnMinHeight; // min. client height in pixeln
- int mnMaxWidth; // max. client width in pixeln
- int mnMaxHeight; // max. client height in pixeln
- static ULONG mnInputLang; // current Input Language
- KHAND mnKeyboardHandle; // current unicode keyboard
- static BOOL mbInReparent; // TRUE: ignore focus lost and gain due to reparenting
-
-private:
- Os2SalFrame* mpParentFrame; // parent frame pointer
-
-public:
- Os2SalFrame();
- virtual ~Os2SalFrame();
-
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual BOOL PostEvent( void* pData );
- virtual void SetTitle( const XubString& rTitle );
- virtual void SetIcon( USHORT nIcon );
- virtual void SetMenu( SalMenu* pSalMenu );
- virtual void DrawMenuBar();
- virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle );
- virtual void Show( BOOL bVisible, BOOL bNoActivate = FALSE );
- virtual void Enable( BOOL bEnable );
- virtual void SetMinClientSize( long nWidth, long nHeight );
- virtual void SetMaxClientSize( long nWidth, long nHeight );
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, USHORT nFlags );
- virtual void GetClientSize( long& rWidth, long& rHeight );
- virtual void GetWorkArea( RECTL& rRect );
- virtual void GetWorkArea( Rectangle& rRect );
- virtual SalFrame* GetParent() const;
- virtual void SetWindowState( const SalFrameState* pState );
- virtual BOOL GetWindowState( SalFrameState* pState );
- virtual void ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay );
- virtual void StartPresentation( BOOL bStart );
- virtual void SetAlwaysOnTop( BOOL bOnTop );
- virtual void ToTop( USHORT nFlags );
- virtual void SetPointer( PointerStyle ePointerStyle );
- virtual void CaptureMouse( BOOL bMouse );
- virtual void SetPointerPos( long nX, long nY );
- virtual void Flush();
- virtual void Sync();
- virtual void SetInputContext( SalInputContext* pContext );
- virtual void EndExtTextInput( USHORT nFlags );
- virtual String GetKeyName( USHORT nKeyCode );
- virtual String GetSymbolKeyName( const XubString& rFontName, USHORT nKeyCode );
- virtual BOOL MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
- virtual LanguageType GetInputLanguage();
- virtual SalBitmap* SnapShot();
- virtual void UpdateSettings( AllSettings& rSettings );
- virtual void Beep( SoundType eSoundType );
- virtual const SystemEnvData* GetSystemData() const;
- virtual SalPointerState GetPointerState();
- virtual SalIndicatorState GetIndicatorState();
- virtual void SimulateKeyPress( USHORT nKeyCode );
- virtual void SetParent( SalFrame* pNewParent );
- virtual bool SetPluginParent( SystemParentData* pNewParent );
- virtual void SetBackgroundBitmap( SalBitmap* );
- virtual void SetScreenNumber( unsigned int );
- virtual void SetApplicationID( const rtl::OUString &rApplicationID );
- virtual void ResetClipRegion();
- virtual void BeginSetClipRegion( ULONG nRects );
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual void EndSetClipRegion();
-
-};
-
-#endif // _SV_SALFRAME_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/os2/inc/salgdi.h b/vcl/os2/inc/salgdi.h
deleted file mode 100644
index 5944437..0000000
--- a/vcl/os2/inc/salgdi.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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 _SV_SALGDI_H
-#define _SV_SALGDI_H
-
-#include <vcl/sv.h>
-#include <vcl/sallayout.hxx>
-#include <vcl/salgdi.hxx>
-#include <vcl/outfont.hxx>
-#include <vcl/impfont.hxx>
-
-#include <boost/unordered_set.hpp>
-
-class ImplOs2FontEntry;
-
-// -----------
-// - Defines -
-// -----------
-
-// win32 platform specific options. Move them to the PMK file?
-#define GCP_USEKERNING 0x0008
-#define USE_UNISCRIBE
-#define GCP_KERN_HACK
-#define GNG_VERT_HACK
-
-// os2 specific physically available font face
-class ImplOs2FontData : public ImplFontData
-{
-public:
- ImplOs2FontData( PFONTMETRICS,
- int nFontHeight,
- BYTE nPitchAndFamily );
- ~ImplOs2FontData();
-
- virtual ImplFontData* Clone() const;
- virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const;
- virtual sal_IntPtr GetFontId() const;
- void SetFontId( sal_IntPtr nId ) { mnId = nId; }
- void UpdateFromHPS( HPS ) const;
-
- bool HasChar( sal_uInt32 cChar ) const;
-
- PFONTMETRICS GetFontMetrics() const { return pFontMetric; }
- USHORT GetCharSet() const { return meOs2CharSet; }
- BYTE GetPitchAndFamily() const { return mnPitchAndFamily; }
- bool IsGlyphApiDisabled() const { return mbDisableGlyphApi; }
- bool SupportsKorean() const { return mbHasKoreanRange; }
- bool SupportsCJK() const { return mbHasCJKSupport; }
- bool AliasSymbolsHigh() const { return mbAliasSymbolsHigh; }
- bool AliasSymbolsLow() const { return mbAliasSymbolsLow; }
-
- const ImplFontCharMap* GetImplFontCharMap() const;
-
-private:
- sal_IntPtr mnId;
- mutable bool mbDisableGlyphApi;
- mutable bool mbHasKoreanRange;
- mutable bool mbHasCJKSupport;
-
- mutable const ImplFontCharMap* mpUnicodeMap;
-
- // TODO: get rid of the members below needed to work with the Win9x non-unicode API
- BYTE* mpFontCharSets; // all Charsets for the current font (used on W98 for kerning)
- BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried
- USHORT meOs2CharSet;
- BYTE mnPitchAndFamily;
- bool mbAliasSymbolsHigh;
- bool mbAliasSymbolsLow;
- PFONTMETRICS pFontMetric;
-
-private:
- void ReadCmapTable( HDC ) const;
- void ReadOs2Table( HDC ) const;
-
-#ifdef GNG_VERT_HACK
- void ReadGsubTable( HDC ) const;
-
- typedef boost::unordered_set<int> IntHashSet;
- mutable IntHashSet maGsubTable;
- mutable bool mbGsubRead;
-public:
- bool HasGSUBstitutions( HDC ) const;
- bool IsGSUBstituted( sal_Unicode ) const;
-#endif // GNG_VERT_HACK
-
-};
-
-
-// -------------------
-// - SalGraphicsData -
-// -------------------
-
-class Os2SalGraphics : public SalGraphics
-{
-public:
- HPS mhPS; // HPS
- HDC mhDC; // HDC
- HWND mhWnd; // HWND
- LONG mnHeight; // Height of frame Window
- ULONG mnClipElementCount; // number of clip rects in clip rect array
- RECTL* mpClipRectlAry; // clip rect array
- ULONG mnFontMetricCount; // number of entries in the font list
- PFONTMETRICS mpFontMetrics; // cached font list
- LONG mnOrientationX; // X-Font orientation
- LONG mnOrientationY; // Y-Font orientation
- BOOL mbLine; // draw lines
- BOOL mbFill; // fill areas
- BOOL mbPrinter; // is Printer
- BOOL mbVirDev; // is VirDev
- BOOL mbWindow; // is Window
- BOOL mbScreen; // is Screen compatible
- bool mbXORMode; // _every_ output with RasterOp XOR
- ULONG mhFonts[ MAX_FALLBACK ]; // Font + Fallbacks
- const ImplOs2FontData* mpOs2FontData[ MAX_FALLBACK ]; // pointer to the most recent font face
- ImplOs2FontEntry* mpOs2FontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
- ULONG mhDefFont; // DefaultFont
- float mfFontScale; // allows metrics emulation of huge font sizes
- BOOL mbFontKernInit; // FALSE: FontKerns must be queried
- KERNINGPAIRS* mpFontKernPairs; // Kerning Pairs of the current Font
- ULONG mnFontKernPairCount;// Number of Kerning Pairs of the current Font
-
- USHORT ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFontScale, int );
-
-public:
- Os2SalGraphics();
- virtual ~Os2SalGraphics();
-
-protected:
- // draw --> LineColor and FillColor and RasterOp and ClipRegion
- virtual void drawPixel( long nX, long nY );
- virtual void drawPixel( long nX, long nY, SalColor nSalColor );
- virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
- virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
- virtual void drawPolyLine( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolygon( ULONG nPoints, const SalPoint* pPtAry );
- virtual void drawPolyPolygon( ULONG nPoly, const ULONG* pPoints, PCONSTSALPOINT* pPtAry );
- virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
- virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin );
- virtual sal_Bool drawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
- virtual sal_Bool drawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry );
- virtual sal_Bool drawPolyPolygonBezier( ULONG nPoly, const ULONG* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry );
-
- // CopyArea --> No RasterOp, but ClipRegion
- virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
- long nSrcHeight, USHORT nFlags );
-
- // CopyBits and DrawBitmap --> RasterOp and ClipRegion
- // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
- virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics );
- virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
- const SalBitmap& rSalBitmap,
- SalColor nTransparentColor );
- virtual void drawBitmap( const SalTwoRect* pPosAry,
- const SalBitmap& rSalBitmap,
- const SalBitmap& rTransparentBitmap );
- virtual void drawMask( const SalTwoRect* pPosAry,
- const SalBitmap& rSalBitmap,
- SalColor nMaskColor );
-
- virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
- virtual SalColor getPixel( long nX, long nY );
-
- // invert --> ClipRegion (only Windows or VirDevs)
- virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags);
- virtual void invert( ULONG nPoints, const SalPoint* pPtAry, SalInvert nFlags );
-
- virtual BOOL drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, ULONG nSize );
-
- virtual bool drawAlphaBitmap( const SalTwoRect&,
- const SalBitmap& rSourceBitmap,
- const SalBitmap& rAlphaBitmap );
- virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency );
-
-public:
- // public SalGraphics methods, the interface to teh independent vcl part
-
- // get device resolution
- virtual void GetResolution( long& rDPIX, long& rDPIY );
- // get the depth of the device
- virtual USHORT GetBitCount() const;
- // get the width of the device
- virtual long GetGraphicsWidth() const;
-
- // set the clip region to empty
- virtual void ResetClipRegion();
- virtual bool setClipRegion( const Region& );
-
- // set the line color to transparent (= don't draw lines)
- virtual void SetLineColor();
- // set the line color to a specific color
- virtual void SetLineColor( SalColor nSalColor );
- // set the fill color to transparent (= don't fill)
- virtual void SetFillColor();
- // set the fill color to a specific color, shapes will be
- // filled accordingly
- virtual void SetFillColor( SalColor nSalColor );
- // enable/disable XOR drawing
- virtual void SetXORMode( bool bSet, bool );
- // set line color for raster operations
- virtual void SetROPLineColor( SalROPColor nROPColor );
- // set fill color for raster operations
- virtual void SetROPFillColor( SalROPColor nROPColor );
- // set the text color to a specific color
- virtual void SetTextColor( SalColor nSalColor );
- // set the font
- virtual USHORT SetFont( ImplFontSelectData*, int nFallbackLevel );
- // get the current font's etrics
- virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
- // get kernign pairs of the current font
- // return only PairCount if (pKernPairs == NULL)
- virtual ULONG GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs );
- // get the repertoire of the current font
- virtual ImplFontCharMap* GetImplFontCharMap() const;
- // graphics must fill supplied font list
- virtual void GetDevFontList( ImplDevFontList* );
- // graphics should call ImplAddDevFontSubstitute on supplied
- // OutputDevice for all its device specific preferred font substitutions
- virtual void GetDevFontSubstList( OutputDevice* );
- virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
- // CreateFontSubset: a method to get a subset of glyhps of a font
- // inside a new valid font file
- // returns TRUE if creation of subset was successfull
- // parameters: rToFile: contains a osl file URL to write the subset to
- // pFont: describes from which font to create a subset
- // pGlyphIDs: the glyph ids to be extracted
- // pEncoding: the character code corresponding to each glyph
- // pWidths: the advance widths of the correspoding glyphs (in PS font units)
- // nGlyphs: the number of glyphs
- // rInfo: additional outgoing information
- // implementation note: encoding 0 with glyph id 0 should be added implicitly
- // as "undefined character"
- virtual BOOL CreateFontSubset( const rtl::OUString& rToFile,
- const ImplFontData* pFont,
- long* pGlyphIDs,
- sal_uInt8* pEncoding,
- sal_Int32* pWidths,
- int nGlyphs,
- FontSubsetInfo& rInfo // out parameter
- );
-
- // GetFontEncodingVector: a method to get the encoding map Unicode
- // to font encoded character; this is only used for type1 fonts and
- // may return NULL in case of unknown encoding vector
- // if ppNonEncoded is set and non encoded characters (that is type1
- // glyphs with only a name) exist it is set to the corresponding
- // map for non encoded glyphs; the encoding vector contains -1
- // as encoding for these cases
- virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded );
-
- // GetEmbedFontData: gets the font data for a font marked
- // embeddable by GetDevFontList or NULL in case of error
- // parameters: pFont: describes the font in question
- // pWidths: the widths of all glyphs from char code 0 to 255
- // pWidths MUST support at least 256 members;
- // rInfo: additional outgoing information
- // pDataLen: out parameter, contains the byte length of the returned buffer
- virtual const void* GetEmbedFontData( const ImplFontData*,
- const sal_Ucs* pUnicodes,
- sal_Int32* pWidths,
- FontSubsetInfo& rInfo,
- long* pDataLen );
- // frees the font data again
- virtual void FreeEmbedFontData( const void* pData, long nDataLen );
-
- virtual void GetGlyphWidths( const ImplFontData* pFont,
- bool bVertical,
- Int32Vector& rWidths,
- Ucs2UIntMap& rUnicodeEnc );
-
- virtual BOOL GetGlyphBoundRect( long nIndex, Rectangle& );
- virtual BOOL GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
-
- virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
- virtual void DrawServerFontLayout( const ServerFontLayout& );
- virtual bool supportsOperation( OutDevSupportType ) const;
-
- // Query the platform layer for control support
- virtual BOOL IsNativeControlSupported( ControlType nType, ControlPart nPart );
-
- virtual SystemGraphicsData GetGraphicsData() const;
- virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
-};
-
-// Init/Deinit Graphics
-void ImplSalInitGraphics( Os2SalGraphics* mpData );
-void ImplSalDeInitGraphics( Os2SalGraphics* mpData );
-
-// -----------
-// - Defines -
-// -----------
-
-#define RGBCOLOR(r,g,b) ((ULONG)(((BYTE)(b)|((USHORT)(g)<<8))|(((ULONG)(BYTE)(r))<<16)))
-#define TY( y ) (mnHeight-(y)-1)
-
-// offset for lcid field, used for fallback font selection
-#define LCID_BASE 100
-
-// -----------
-// - Inlines -
-// -----------
-
-// #102411# Win's GCP mishandles kerning => we need to do it ourselves
-// SalGraphicsData::mpFontKernPairs is sorted by
-inline bool ImplCmpKernData( const KERNINGPAIRS& a, const KERNINGPAIRS& b )
-{
- if( a.sFirstChar < b.sFirstChar )
- return true;
- if( a.sFirstChar > b.sFirstChar )
- return false;
- return (a.sSecondChar < b.sSecondChar);
-}
-
-// called extremely often from just one spot => inline
-inline bool ImplOs2FontData::HasChar( sal_uInt32 cChar ) const
-{
- if( mpUnicodeMap->HasChar( cChar ) )
- return true;
- // second chance to allow symbol aliasing
- if( mbAliasSymbolsLow && ((cChar-0xF000) <= 0xFF) )
- cChar -= 0xF000;
- else if( mbAliasSymbolsHigh && (cChar <= 0xFF) )
- cChar += 0xF000;
- return mpUnicodeMap->HasChar( cChar );
-}
-
-#endif // _SV_SALGDI_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/os2/inc/salids.hrc b/vcl/os2/inc/salids.hrc
deleted file mode 100644
index 7a8dcc8..0000000
--- a/vcl/os2/inc/salids.hrc
+++ /dev/null
@@ -1,109 +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 _SV_SALIDS_HRC
-#define _SV_SALIDS_HRC
-
-// Pointer
-#define SAL_RESID_POINTER_NULL 10000
-#define SAL_RESID_POINTER_HELP 10001
-#define SAL_RESID_POINTER_CROSS 10002
-#define SAL_RESID_POINTER_MOVE 10003
-#define SAL_RESID_POINTER_HSPLIT 10004
-#define SAL_RESID_POINTER_VSPLIT 10005
-#define SAL_RESID_POINTER_HSIZEBAR 10006
-#define SAL_RESID_POINTER_VSIZEBAR 10007
-#define SAL_RESID_POINTER_HAND 10008
-#define SAL_RESID_POINTER_REFHAND 10009
-#define SAL_RESID_POINTER_PEN 10010
-#define SAL_RESID_POINTER_MAGNIFY 10011
-#define SAL_RESID_POINTER_FILL 10012
-#define SAL_RESID_POINTER_ROTATE 10013
-#define SAL_RESID_POINTER_HSHEAR 10014
-#define SAL_RESID_POINTER_VSHEAR 10015
-#define SAL_RESID_POINTER_MIRROR 10016
-#define SAL_RESID_POINTER_CROOK 10017
-#define SAL_RESID_POINTER_CROP 10018
-#define SAL_RESID_POINTER_MOVEPOINT 10019
-#define SAL_RESID_POINTER_MOVEBEZIERWEIGHT 10020
-#define SAL_RESID_POINTER_MOVEDATA 10021
-#define SAL_RESID_POINTER_COPYDATA 10022
-#define SAL_RESID_POINTER_LINKDATA 10023
-#define SAL_RESID_POINTER_MOVEDATALINK 10024
-#define SAL_RESID_POINTER_COPYDATALINK 10025
-#define SAL_RESID_POINTER_MOVEFILE 10026
-#define SAL_RESID_POINTER_COPYFILE 10027
-#define SAL_RESID_POINTER_LINKFILE 10028
-#define SAL_RESID_POINTER_MOVEFILELINK 10029
-#define SAL_RESID_POINTER_COPYFILELINK 10030
-#define SAL_RESID_POINTER_MOVEFILES 10031
-#define SAL_RESID_POINTER_COPYFILES 10032
-#define SAL_RESID_POINTER_DRAW_LINE 10033
-#define SAL_RESID_POINTER_DRAW_RECT 10034
-#define SAL_RESID_POINTER_DRAW_POLYGON 10035
-#define SAL_RESID_POINTER_DRAW_BEZIER 10036
-#define SAL_RESID_POINTER_DRAW_ARC 10037
-#define SAL_RESID_POINTER_DRAW_PIE 10038
-#define SAL_RESID_POINTER_DRAW_CIRCLECUT 10039
-#define SAL_RESID_POINTER_DRAW_ELLIPSE 10040
-#define SAL_RESID_POINTER_DRAW_FREEHAND 10041
-#define SAL_RESID_POINTER_DRAW_CONNECT 10042
-#define SAL_RESID_POINTER_DRAW_TEXT 10043
-#define SAL_RESID_POINTER_DRAW_CAPTION 10044
-#define SAL_RESID_POINTER_CHART 10045
-#define SAL_RESID_POINTER_DETECTIVE 10046
-#define SAL_RESID_POINTER_PIVOT_COL 10047
-#define SAL_RESID_POINTER_PIVOT_ROW 10048
-#define SAL_RESID_POINTER_PIVOT_FIELD 10049
-#define SAL_RESID_POINTER_CHAIN 10050
-#define SAL_RESID_POINTER_CHAIN_NOTALLOWED 10051
-#define SAL_RESID_POINTER_TIMEEVENT_MOVE 10052
-#define SAL_RESID_POINTER_TIMEEVENT_SIZE 10053
-#define SAL_RESID_POINTER_AUTOSCROLL_N 10054
-#define SAL_RESID_POINTER_AUTOSCROLL_S 10055
-#define SAL_RESID_POINTER_AUTOSCROLL_W 10056
-#define SAL_RESID_POINTER_AUTOSCROLL_E 10057
-#define SAL_RESID_POINTER_AUTOSCROLL_NW 10058
-#define SAL_RESID_POINTER_AUTOSCROLL_NE 10059
-#define SAL_RESID_POINTER_AUTOSCROLL_SW 10060
-#define SAL_RESID_POINTER_AUTOSCROLL_SE 10061
-#define SAL_RESID_POINTER_AUTOSCROLL_NS 10062
-#define SAL_RESID_POINTER_AUTOSCROLL_WE 10063
-#define SAL_RESID_POINTER_AUTOSCROLL_NSWE 10064
-#define SAL_RESID_POINTER_AIRBRUSH 10070
-#define SAL_RESID_POINTER_TEXT_VERTICAL 10071
-#define SAL_RESID_POINTER_PIVOT_DELETE 10072
-#define SAL_RESID_POINTER_TAB_SELECT_S 10073
-#define SAL_RESID_POINTER_TAB_SELECT_E 10074
-#define SAL_RESID_POINTER_TAB_SELECT_SE 10075
-#define SAL_RESID_POINTER_TAB_SELECT_W 10076
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list