diff options
Diffstat (limited to 'vcl/inc/vcl')
74 files changed, 434 insertions, 10463 deletions
diff --git a/vcl/inc/vcl/accel.h b/vcl/inc/vcl/accel.h deleted file mode 100644 index bf3006c9ca7b..000000000000 --- a/vcl/inc/vcl/accel.h +++ /dev/null @@ -1,62 +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_ACCEL_H -#define _SV_ACCEL_H - -#include <vcl/sv.h> -#ifndef _SV_KEYCOD_HXX -#include <vcl/keycod.hxx> -#endif - -class Accelerator; - -// ------------------ -// - ImplAccelEntry - -// ------------------ - -class ImplAccelEntry -{ -public: - sal_uInt16 mnId; - KeyCode maKeyCode; - Accelerator* mpAccel; - Accelerator* mpAutoAccel; - sal_Bool mbEnabled; -}; - -// ----------------- -// - Hilfemethoden - -// ----------------- - -// in KEYCOD.CXX -void ImplGetKeyCode( KeyFuncType eFunc, sal_uInt16& rCode1, sal_uInt16& rCode2, sal_uInt16& rCode3, sal_uInt16& rCode4 ); - -#endif // _SV_ACCEL_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/accmgr.hxx b/vcl/inc/vcl/accmgr.hxx deleted file mode 100644 index 2ffa2b366920..000000000000 --- a/vcl/inc/vcl/accmgr.hxx +++ /dev/null @@ -1,69 +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_ACCMGR_HXX -#define _SV_ACCMGR_HXX - -#include <vcl/sv.h> -#include <vector> - -class Accelerator; -class KeyCode; - -typedef ::std::vector< Accelerator* > ImplAccelList; - -// -------------------- -// - ImplAccelManager - -// -------------------- - -class ImplAccelManager -{ -private: - ImplAccelList* mpAccelList; - ImplAccelList* mpSequenceList; - -public: - ImplAccelManager() - { - mpAccelList = NULL; - mpSequenceList = NULL; - } - ~ImplAccelManager(); - - sal_Bool InsertAccel( Accelerator* pAccel ); - void RemoveAccel( Accelerator* pAccel ); - - void EndSequence( sal_Bool bCancel = sal_False ); - void FlushAccel() { EndSequence( sal_True ); } - - sal_Bool IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ); -}; - -#endif // _SV_ACCMGR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/bmpfast.hxx b/vcl/inc/vcl/bmpfast.hxx deleted file mode 100644 index b43df0e115b2..000000000000 --- a/vcl/inc/vcl/bmpfast.hxx +++ /dev/null @@ -1,54 +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_BMPFAST_HXX -#define _SV_BMPFAST_HXX - -class BitmapWriteAccess; -class BitmapReadAccess; -struct BitmapBuffer; -class BitmapColor; -class Size; -class Point; -struct SalTwoRect; - -// the bmpfast functions have signatures with good compatibility to -// their canonic counterparts, which employ the GetPixel/SetPixel methods - -bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc, - const SalTwoRect& rTwoRect ); - -bool ImplFastBitmapBlending( BitmapWriteAccess& rDst, - const BitmapReadAccess& rSrc, const BitmapReadAccess& rMask, - const SalTwoRect& rTwoRect ); - -bool ImplFastEraseBitmap( BitmapBuffer&, const BitmapColor& ); - -#endif // _SV_BMPFAST_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/brdwin.hxx b/vcl/inc/vcl/brdwin.hxx deleted file mode 100644 index e6374ea032f5..000000000000 --- a/vcl/inc/vcl/brdwin.hxx +++ /dev/null @@ -1,356 +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_BRDWIN_HXX -#define _SV_BRDWIN_HXX - -#include <vcl/sv.h> -#include <vcl/window.hxx> - -class ImplBorderWindowView; - -// -------------------------- -// - ImplBorderWindow-Types - -// -------------------------- - -#define BORDERWINDOW_STYLE_OVERLAP ((sal_uInt16)0x0001) -#define BORDERWINDOW_STYLE_BORDER ((sal_uInt16)0x0002) -#define BORDERWINDOW_STYLE_FLOAT ((sal_uInt16)0x0004) -#define BORDERWINDOW_STYLE_FRAME ((sal_uInt16)0x0008) -#define BORDERWINDOW_STYLE_APP ((sal_uInt16)0x0010) - -#define BORDERWINDOW_HITTEST_TITLE ((sal_uInt16)0x0001) -#define BORDERWINDOW_HITTEST_LEFT ((sal_uInt16)0x0002) -#define BORDERWINDOW_HITTEST_MENU ((sal_uInt16)0x0004) -#define BORDERWINDOW_HITTEST_TOP ((sal_uInt16)0x0008) -#define BORDERWINDOW_HITTEST_RIGHT ((sal_uInt16)0x0010) -#define BORDERWINDOW_HITTEST_BOTTOM ((sal_uInt16)0x0020) -#define BORDERWINDOW_HITTEST_TOPLEFT ((sal_uInt16)0x0040) -#define BORDERWINDOW_HITTEST_TOPRIGHT ((sal_uInt16)0x0080) -#define BORDERWINDOW_HITTEST_BOTTOMLEFT ((sal_uInt16)0x0100) -#define BORDERWINDOW_HITTEST_BOTTOMRIGHT ((sal_uInt16)0x0200) -#define BORDERWINDOW_HITTEST_CLOSE ((sal_uInt16)0x0400) -#define BORDERWINDOW_HITTEST_ROLL ((sal_uInt16)0x0800) -#define BORDERWINDOW_HITTEST_DOCK ((sal_uInt16)0x1000) -#define BORDERWINDOW_HITTEST_HIDE ((sal_uInt16)0x2000) -#define BORDERWINDOW_HITTEST_HELP ((sal_uInt16)0x4000) -#define BORDERWINDOW_HITTEST_PIN ((sal_uInt16)0x8000) - -#define BORDERWINDOW_DRAW_TITLE ((sal_uInt16)0x0001) -#define BORDERWINDOW_DRAW_BORDER ((sal_uInt16)0x0002) -#define BORDERWINDOW_DRAW_FRAME ((sal_uInt16)0x0004) -#define BORDERWINDOW_DRAW_CLOSE ((sal_uInt16)0x0008) -#define BORDERWINDOW_DRAW_ROLL ((sal_uInt16)0x0010) -#define BORDERWINDOW_DRAW_DOCK ((sal_uInt16)0x0020) -#define BORDERWINDOW_DRAW_HIDE ((sal_uInt16)0x0040) -#define BORDERWINDOW_DRAW_HELP ((sal_uInt16)0x0080) -#define BORDERWINDOW_DRAW_PIN ((sal_uInt16)0x0100) -#define BORDERWINDOW_DRAW_MENU ((sal_uInt16)0x0200) -#define BORDERWINDOW_DRAW_ALL (BORDERWINDOW_DRAW_TITLE | \ - BORDERWINDOW_DRAW_BORDER | \ - BORDERWINDOW_DRAW_FRAME | \ - BORDERWINDOW_DRAW_CLOSE | \ - BORDERWINDOW_DRAW_ROLL | \ - BORDERWINDOW_DRAW_DOCK | \ - BORDERWINDOW_DRAW_HIDE | \ - BORDERWINDOW_DRAW_HELP | \ - BORDERWINDOW_DRAW_PIN | \ - BORDERWINDOW_DRAW_MENU) - -#define BORDERWINDOW_TITLE_NORMAL ((sal_uInt16)0x0001) -#define BORDERWINDOW_TITLE_SMALL ((sal_uInt16)0x0002) -#define BORDERWINDOW_TITLE_TEAROFF ((sal_uInt16)0x0004) -#define BORDERWINDOW_TITLE_POPUP ((sal_uInt16)0x0008) -#define BORDERWINDOW_TITLE_NONE ((sal_uInt16)0x0010) - -// -------------------- -// - ImplBorderWindow - -// -------------------- - -class ImplBorderWindow : public Window -{ - friend class Window; - friend class ImplBorderWindowView; - friend class ImplSmallBorderWindowView; - friend class ImplStdBorderWindowView; - -private: - ImplBorderWindowView* mpBorderView; - Window* mpMenuBarWindow; - long mnMinWidth; - long mnMinHeight; - long mnMaxWidth; - long mnMaxHeight; - long mnRollHeight; - long mnOrgMenuHeight; - sal_uInt16 mnTitleType; - sal_uInt16 mnBorderStyle; - sal_Bool mbFloatWindow; - sal_Bool mbSmallOutBorder; - sal_Bool mbFrameBorder; - sal_Bool mbPined; - sal_Bool mbRollUp; - sal_Bool mbMenuHide; - sal_Bool mbDockBtn; - sal_Bool mbHideBtn; - sal_Bool mbHelpBtn; - sal_Bool mbMenuBtn; - sal_Bool mbDisplayActive; - - using Window::ImplInit; - void ImplInit( Window* pParent, - WinBits nStyle, sal_uInt16 nTypeStyle, - SystemParentData* pParentData ); - void ImplInit( Window* pParent, - WinBits nStyle, sal_uInt16 nTypeStyle, - const ::com::sun::star::uno::Any& ); - - // Copy assignment is forbidden and not implemented. - ImplBorderWindow (const ImplBorderWindow &); - ImplBorderWindow& operator= (const ImplBorderWindow &); - -public: - ImplBorderWindow( Window* pParent, - SystemParentData* pParentData, - WinBits nStyle = 0, - sal_uInt16 nTypeStyle = 0 ); - ImplBorderWindow( Window* pParent, WinBits nStyle = 0, - sal_uInt16 nTypeStyle = 0 ); - ImplBorderWindow( Window* pParent, - WinBits nStyle, sal_uInt16 nTypeStyle, - const ::com::sun::star::uno::Any& ); - ~ImplBorderWindow(); - - virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void Tracking( const TrackingEvent& rTEvt ); - virtual void Paint( const Rectangle& rRect ); - virtual void Activate(); - virtual void Deactivate(); - virtual void Resize(); - virtual void RequestHelp( const HelpEvent& rHEvt ); - virtual void StateChanged( StateChangedType nType ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - - void InitView(); - void UpdateView( sal_Bool bNewView, const Size& rNewOutSize ); - void InvalidateBorder(); - - using Window::Draw; - void Draw( const Rectangle& rRect, OutputDevice* pDev, const Point& rPos ); - - void SetDisplayActive( sal_Bool bActive ); - sal_Bool IsDisplayActive() const { return mbDisplayActive; } - void SetTitleType( sal_uInt16 nTitleType, const Size& rSize ); - void SetBorderStyle( sal_uInt16 nStyle ); - sal_uInt16 GetBorderStyle() const { return mnBorderStyle; } - void SetPin( sal_Bool bPin ); - void SetRollUp( sal_Bool bRollUp, const Size& rSize ); - void SetCloser(); - void SetDockButton( sal_Bool bDockButton ); - void SetHideButton( sal_Bool bHideButton ); - void SetHelpButton( sal_Bool bHelpButton ); - void SetMenuButton( sal_Bool bMenuButton ); - - void UpdateMenuHeight(); - void SetMenuBarWindow( Window* pWindow ); - void SetMenuBarMode( sal_Bool bHide ); - - void SetMinOutputSize( long nWidth, long nHeight ) - { mnMinWidth = nWidth; mnMinHeight = nHeight; } - void SetMaxOutputSize( long nWidth, long nHeight ) - { mnMaxWidth = nWidth; mnMaxHeight = nHeight; } - - void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, - sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; - long CalcTitleWidth() const; - - Rectangle GetMenuRect() const; -}; - -// ======================================================================= - -// ----------------------- -// - ImplBorderFrameData - -// ----------------------- - -struct ImplBorderFrameData -{ - ImplBorderWindow* mpBorderWindow; - OutputDevice* mpOutDev; - Rectangle maTitleRect; - Rectangle maPinRect; - Rectangle maCloseRect; - Rectangle maRollRect; - Rectangle maDockRect; - Rectangle maMenuRect; - Rectangle maHideRect; - Rectangle maHelpRect; - Point maMouseOff; - long mnWidth; - long mnHeight; - long mnTrackX; - long mnTrackY; - long mnTrackWidth; - long mnTrackHeight; - sal_Int32 mnLeftBorder; - sal_Int32 mnTopBorder; - sal_Int32 mnRightBorder; - sal_Int32 mnBottomBorder; - long mnNoTitleTop; - long mnBorderSize; - long mnTitleHeight; - long mnTitleOff; - sal_uInt16 mnHitTest; - sal_uInt16 mnPinState; - sal_uInt16 mnCloseState; - sal_uInt16 mnRollState; - sal_uInt16 mnDockState; - sal_uInt16 mnMenuState; - sal_uInt16 mnHideState; - sal_uInt16 mnHelpState; - sal_uInt16 mnTitleType; - sal_Bool mbFloatWindow; - sal_Bool mbDragFull; - sal_Bool mbTitleClipped; -}; - -// ======================================================================= - -// ------------------------ -// - ImplBorderWindowView - -// ------------------------ - -class ImplBorderWindowView -{ -public: - virtual ~ImplBorderWindowView(); - - virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); - virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); - virtual sal_Bool Tracking( const TrackingEvent& rTEvt ); - virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect ); - - virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) = 0; - virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, - sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const = 0; - virtual long CalcTitleWidth() const = 0; - virtual void DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* pOutDev = NULL, const Point* pOffset = NULL ) = 0; - virtual Rectangle GetMenuRect() const; - - void ImplInitTitle( ImplBorderFrameData* pData ); - sal_uInt16 ImplHitTest( ImplBorderFrameData* pData, const Point& rPos ); - sal_Bool ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); - sal_Bool ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); - sal_Bool ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt ); - String ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, Rectangle& rHelpRect ); - long ImplCalcTitleWidth( const ImplBorderFrameData* pData ) const; -}; - -// ======================================================================= - -// -------------------------- -// - ImplNoBorderWindowView - -// -------------------------- - -class ImplNoBorderWindowView : public ImplBorderWindowView -{ -public: - ImplNoBorderWindowView( ImplBorderWindow* pBorderWindow ); - - virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ); - virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, - sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; - virtual long CalcTitleWidth() const; - virtual void DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); -}; - - -// ======================================================================= - -// ----------------------------- -// - ImplSmallBorderWindowView - -// ----------------------------- - -class ImplSmallBorderWindowView : public ImplBorderWindowView -{ - ImplBorderWindow* mpBorderWindow; - OutputDevice* mpOutDev; - long mnWidth; - long mnHeight; - sal_Int32 mnLeftBorder; - sal_Int32 mnTopBorder; - sal_Int32 mnRightBorder; - sal_Int32 mnBottomBorder; - bool mbNWFBorder; - -public: - ImplSmallBorderWindowView( ImplBorderWindow* pBorderWindow ); - - virtual void Init( OutputDevice* pOutDev, long nWidth, long nHeight ); - virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, - sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; - virtual long CalcTitleWidth() const; - virtual void DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); -}; - - -// ======================================================================= - -// --------------------------- -// - ImplStdBorderWindowView - -// --------------------------- - - -class ImplStdBorderWindowView : public ImplBorderWindowView -{ - ImplBorderFrameData maFrameData; - VirtualDevice* mpATitleVirDev; - VirtualDevice* mpDTitleVirDev; - -public: - ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow ); - ~ImplStdBorderWindowView(); - - virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); - virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); - virtual sal_Bool Tracking( const TrackingEvent& rTEvt ); - virtual String RequestHelp( const Point& rPos, Rectangle& rHelpRect ); - virtual Rectangle GetMenuRect() const; - - virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ); - virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, - sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; - virtual long CalcTitleWidth() const; - virtual void DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* pOutDev, const Point* pOffset ); -}; - - -#endif // _SV_BRDWIN_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/canvasbitmap.hxx b/vcl/inc/vcl/canvasbitmap.hxx deleted file mode 100644 index e0773257b029..000000000000 --- a/vcl/inc/vcl/canvasbitmap.hxx +++ /dev/null @@ -1,132 +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 _VCL_CANVASBITMAP_HXX -#define _VCL_CANVASBITMAP_HXX - -#include <cppuhelper/compbase3.hxx> -#include <com/sun/star/rendering/XIntegerReadOnlyBitmap.hpp> -#include <com/sun/star/rendering/XIntegerBitmapColorSpace.hpp> -#include <com/sun/star/rendering/XIntegerBitmap.hpp> -#include <com/sun/star/rendering/XBitmapPalette.hpp> - -#include <vcl/bitmapex.hxx> -#include <vcl/bmpacc.hxx> - -namespace vcl -{ -namespace unotools -{ - class VCL_DLLPUBLIC VclCanvasBitmap : - public cppu::WeakImplHelper3< com::sun::star::rendering::XIntegerReadOnlyBitmap, - com::sun::star::rendering::XBitmapPalette, - com::sun::star::rendering::XIntegerBitmapColorSpace > - { - private: - BitmapEx m_aBmpEx; - Bitmap m_aBitmap; - Bitmap m_aAlpha; - BitmapReadAccess* m_pBmpAcc; - BitmapReadAccess* m_pAlphaAcc; - com::sun::star::uno::Sequence<sal_Int8> m_aComponentTags; - com::sun::star::uno::Sequence<sal_Int32> m_aComponentBitCounts; - com::sun::star::rendering::IntegerBitmapLayout m_aLayout; - sal_Int32 m_nBitsPerInputPixel; - sal_Int32 m_nBitsPerOutputPixel; - sal_Int32 m_nRedIndex; - sal_Int32 m_nGreenIndex; - sal_Int32 m_nBlueIndex; - sal_Int32 m_nAlphaIndex; - sal_Int32 m_nIndexIndex; - sal_Int8 m_nEndianness; - bool m_bSwap; - bool m_bPalette; - - SAL_DLLPRIVATE void setComponentInfo( sal_uLong redShift, sal_uLong greenShift, sal_uLong blueShift ); - - virtual ~VclCanvasBitmap(); - - public: - // XBitmap - virtual com::sun::star::geometry::IntegerSize2D SAL_CALL getSize() throw (com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL hasAlpha( ) throw (::com::sun::star::uno::RuntimeException); - virtual com::sun::star::uno::Reference< com::sun::star::rendering::XBitmap > SAL_CALL getScaledBitmap( const com::sun::star::geometry::RealSize2D& newSize, sal_Bool beFast ) throw (com::sun::star::uno::RuntimeException); - - // XIntegerReadOnlyBitmap - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getData( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout, const ::com::sun::star::geometry::IntegerRectangle2D& rect ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getPixel( ::com::sun::star::rendering::IntegerBitmapLayout& bitmapLayout, const ::com::sun::star::geometry::IntegerPoint2D& pos ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::rendering::VolatileContentDestroyedException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapPalette > SAL_CALL getPalette( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::rendering::IntegerBitmapLayout SAL_CALL getMemoryLayout( ) throw (::com::sun::star::uno::RuntimeException); - - // XBitmapPalette - virtual sal_Int32 SAL_CALL getNumberOfEntries() throw (com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL getIndex( ::com::sun::star::uno::Sequence< double >& entry, ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL setIndex( const ::com::sun::star::uno::Sequence< double >& color, ::sal_Bool transparency, ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XColorSpace > SAL_CALL getColorSpace( ) throw (::com::sun::star::uno::RuntimeException); - - // XIntegerBitmapColorSpace - virtual ::sal_Int8 SAL_CALL getType( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getComponentTags( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int8 SAL_CALL getRenderingIntent( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getProperties( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertColorSpace( const ::com::sun::star::uno::Sequence< double >& deviceColor, const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XColorSpace >& targetColorSpace ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor > SAL_CALL convertToRGB( const ::com::sun::star::uno::Sequence< double >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertToARGB( const ::com::sun::star::uno::Sequence< double >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertToPARGB( const ::com::sun::star::uno::Sequence< double >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertFromRGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertFromARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< double > SAL_CALL convertFromPARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getBitsPerPixel( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL getComponentBitCounts( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int8 SAL_CALL getEndianness( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence<double> SAL_CALL convertFromIntegerColorSpace( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor, const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XColorSpace >& targetColorSpace ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertToIntegerColorSpace( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor, const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XIntegerBitmapColorSpace >& targetColorSpace ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor > SAL_CALL convertIntegerToRGB( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertIntegerToARGB( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor > SAL_CALL convertIntegerToPARGB( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& deviceColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromRGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::RGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromPARGB( const ::com::sun::star::uno::Sequence< ::com::sun::star::rendering::ARGBColor >& rgbColor ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - - /** Create API wrapper for given BitmapEx - - @param rBitmap - Bitmap to wrap. As usual, changes to the original bitmap - are not reflected in this object (copy on write). - */ - explicit VclCanvasBitmap( const BitmapEx& rBitmap ); - - /// Retrieve contained bitmap. Call me with locked Solar mutex! - BitmapEx getBitmapEx() const; - }; -} -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/controldata.hxx b/vcl/inc/vcl/controldata.hxx deleted file mode 100644 index b30184be2481..000000000000 --- a/vcl/inc/vcl/controldata.hxx +++ /dev/null @@ -1,65 +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 VCL_CONTROLDATA_HXX -#define VCL_CONTROLDATA_HXX - -#include <vcl/controllayout.hxx> - -//........................................................................ -namespace vcl -{ -//........................................................................ - - //==================================================================== - //= ImplControlData - //==================================================================== - struct ImplControlData - { - mutable ControlLayoutData* mpLayoutData; - OutputDevice* mpReferenceDevice; - - ImplControlData() - :mpLayoutData( NULL ) - ,mpReferenceDevice( NULL ) - { - } - - ~ImplControlData() - { - delete mpLayoutData; - } - }; - -//........................................................................ -} // namespace vcl -//........................................................................ - -#endif // VCL_CONTROLDATA_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/cursor.hxx b/vcl/inc/vcl/cursor.hxx index 46f17b367412..9c9bba21db80 100644 --- a/vcl/inc/vcl/cursor.hxx +++ b/vcl/inc/vcl/cursor.hxx @@ -70,7 +70,7 @@ public: SAL_DLLPRIVATE void ImplRestore(); DECL_DLLPRIVATE_LINK( ImplTimerHdl, AutoTimer* ); SAL_DLLPRIVATE void ImplShow( bool bDrawDirect = true, bool bRestore = false ); - SAL_DLLPRIVATE bool ImplHide(); + SAL_DLLPRIVATE bool ImplHide( bool bStopTimer ); SAL_DLLPRIVATE void ImplNew(); public: diff --git a/vcl/inc/vcl/dbggui.hxx b/vcl/inc/vcl/dbggui.hxx deleted file mode 100644 index 61d878de3451..000000000000 --- a/vcl/inc/vcl/dbggui.hxx +++ /dev/null @@ -1,77 +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_DBGGUI_HXX -#define _SV_DBGGUI_HXX - -#include <vcl/sv.h> - -// ------------ -// - DBG_UITL - -// ------------ - -#ifdef DBG_UTIL - -class Window; -class XubString; - -void DbgGUIInit(); -void DbgGUIDeInit(); -void DbgGUIStart(); -void DbgDialogTest( Window* pWindow ); - -/** registers a named user-defined channel for emitting the diagnostic messages - @return - a unique number for this channel, which can be used for ->DbgData::nErrorOut, - ->DbgData::nWarningOut and ->DbgData::nTraceOut - @see DBG_OUT_USER_CHANNEL_0 -*/ -sal_uInt16 DbgRegisterNamedUserChannel( const XubString& _rChannelUIName, DbgPrintLine pProc ); - -#define DBGGUI_INIT() DbgGUIInit() -#define DBGGUI_DEINIT() DbgGUIDeInit() -#define DBGGUI_START() DbgGUIStart() - -#define DBG_DIALOGTEST( pWindow ) \ - if ( DbgIsDialog() ) \ - DbgDialogTest( pWindow ); - -#else - - -#define DBGGUI_INIT() -#define DBGGUI_DEINIT() -#define DBGGUI_START() - -#define DBG_DIALOGTEST( pWindow ) - -#endif - -#endif // _SV_DBGGUI_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/dndevdis.hxx b/vcl/inc/vcl/dndevdis.hxx deleted file mode 100644 index 41be5ba3fc38..000000000000 --- a/vcl/inc/vcl/dndevdis.hxx +++ /dev/null @@ -1,116 +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 _DNDEVDIS_HXX_ -#define _DNDEVDIS_HXX_ - -#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp> -#include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp> - -#include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp> -#include <cppuhelper/implbase3.hxx> -#include <vcl/window.hxx> - -class DNDEventDispatcher: public ::cppu::WeakImplHelper3< - ::com::sun::star::datatransfer::dnd::XDropTargetListener, - ::com::sun::star::datatransfer::dnd::XDropTargetDragContext, - ::com::sun::star::datatransfer::dnd::XDragGestureListener > -{ - Window * m_pTopWindow; - Window * m_pCurrentWindow; - - ::osl::Mutex m_aMutex; - ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > m_aDataFlavorList; - - Window* findTopLevelWindow(Point location); - /* - * fire the events on the dnd listener container of the specified window - */ - - sal_Int32 fireDragEnterEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, - const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction, - const ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor >& aFlavorList ) throw(::com::sun::star::uno::RuntimeException); - - sal_Int32 fireDragOverEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, - const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException); - - sal_Int32 fireDragExitEvent( Window *pWindow ) throw(::com::sun::star::uno::RuntimeException); - - sal_Int32 fireDropActionChangedEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& xContext, - const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction ) throw(::com::sun::star::uno::RuntimeException); - - sal_Int32 fireDropEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& xContext, - const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceAction, - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& xTransferable ) throw(::com::sun::star::uno::RuntimeException); - - sal_Int32 fireDragGestureEvent( Window *pWindow, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& xSource, - const ::com::sun::star::uno::Any event, const Point& rOrigin, const sal_Int8 nDragAction )throw(::com::sun::star::uno::RuntimeException); - -public: - - DNDEventDispatcher( Window * pTopWindow ); - virtual ~DNDEventDispatcher(); - - /* - * XDropTargetDragContext - */ - - virtual void SAL_CALL acceptDrag( sal_Int8 dropAction ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL rejectDrag() throw(::com::sun::star::uno::RuntimeException); - - /* - * XDropTargetListener - */ - - virtual void SAL_CALL drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& dtde ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL dragEnter( const ::com::sun::star::datatransfer::dnd::DropTargetDragEnterEvent& dtdee ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL dragExit( const ::com::sun::star::datatransfer::dnd::DropTargetEvent& dte ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL dropActionChanged( const ::com::sun::star::datatransfer::dnd::DropTargetDragEvent& dtde ) throw(::com::sun::star::uno::RuntimeException); - - /* - * XDragGestureListener - */ - - virtual void SAL_CALL dragGestureRecognized( const ::com::sun::star::datatransfer::dnd::DragGestureEvent& dge ) throw(::com::sun::star::uno::RuntimeException); - - - /* - * XEventListener - */ - - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& eo ) throw(::com::sun::star::uno::RuntimeException); -}; - -//================================================================================================== -// -//================================================================================================== - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/dndlcon.hxx b/vcl/inc/vcl/dndlcon.hxx deleted file mode 100644 index 1c3654c1a9ea..000000000000 --- a/vcl/inc/vcl/dndlcon.hxx +++ /dev/null @@ -1,127 +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 _DNDLCON_HXX_ -#define _DNDLCON_HXX_ - -#include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp> -#include <com/sun/star/datatransfer/dnd/XDragSource.hpp> -#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp> -#include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp> -#include <com/sun/star/datatransfer/dnd/XDropTargetDropContext.hpp> -#include <cppuhelper/compbase4.hxx> - -#include <vcl/unohelp2.hxx> - -class DNDListenerContainer : public ::vcl::unohelper::MutexHelper, - public ::cppu::WeakComponentImplHelper4< - ::com::sun::star::datatransfer::dnd::XDragGestureRecognizer, \ - ::com::sun::star::datatransfer::dnd::XDropTargetDragContext, - ::com::sun::star::datatransfer::dnd::XDropTargetDropContext, - ::com::sun::star::datatransfer::dnd::XDropTarget > -{ - sal_Bool m_bActive; - sal_Int8 m_nDefaultActions; - - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext > m_xDropTargetDragContext; - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext > m_xDropTargetDropContext; - -public: - - DNDListenerContainer( sal_Int8 nDefaultActions ); - virtual ~DNDListenerContainer(); - - sal_uInt32 fireDropEvent( - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& context, - sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable ); - - sal_uInt32 fireDragExitEvent(); - - sal_uInt32 fireDragOverEvent( - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, - sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions ); - - sal_uInt32 fireDragEnterEvent( - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, - sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, - const ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor >& dataFlavor ); - - sal_uInt32 fireDropActionChangedEvent( - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, - sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions ); - - sal_uInt32 fireDragGestureEvent( - sal_Int8 dragAction, sal_Int32 dragOriginX, sal_Int32 dragOriginY, - const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& dragSource, - const ::com::sun::star::uno::Any& triggerEvent ); - - /* - * XDragGestureRecognizer - */ - - virtual void SAL_CALL addDragGestureListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureListener >& dgl ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeDragGestureListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureListener >& dgl ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL resetRecognizer( ) throw(::com::sun::star::uno::RuntimeException); - - /* - * XDropTargetDragContext - */ - - virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL rejectDrag( ) throw (::com::sun::star::uno::RuntimeException); - - - /* - * XDropTargetDropContext - */ - - virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL rejectDrop( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL dropComplete( sal_Bool success ) throw (::com::sun::star::uno::RuntimeException); - - /* - * XDropTarget - */ - - virtual void SAL_CALL addDropTargetListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& dtl ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeDropTargetListener( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener >& dtl ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isActive( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setActive( sal_Bool active ) throw(::com::sun::star::uno::RuntimeException); - virtual sal_Int8 SAL_CALL getDefaultActions( ) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setDefaultActions( sal_Int8 actions ) throw(::com::sun::star::uno::RuntimeException); -}; - - -//================================================================================================== -// -//================================================================================================== - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/fontcache.hxx b/vcl/inc/vcl/fontcache.hxx deleted file mode 100644 index ad261e8d8e6d..000000000000 --- a/vcl/inc/vcl/fontcache.hxx +++ /dev/null @@ -1,102 +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 _PSPRINT_FONTCACHE_HXX -#define _PSPRINT_FONTCACHE_HXX - -#include "vcl/dllapi.h" -#include "vcl/fontmanager.hxx" - -#include "tools/string.hxx" - -#include <boost/unordered_map.hpp> - -namespace psp -{ - -class VCL_PLUGIN_PUBLIC FontCache -{ - struct FontDir; - friend class FontDir; - struct FontFile; - friend class FontFile; - - typedef std::list< PrintFontManager::PrintFont* > FontCacheEntry; - struct FontFile - { - FontCacheEntry m_aEntry; - }; - - typedef boost::unordered_map< ::rtl::OString, FontFile, ::rtl::OStringHash > FontDirMap; - struct FontDir - { - sal_Int64 m_nTimestamp; - bool m_bNoFiles; - bool m_bUserOverrideOnly; - FontDirMap m_aEntries; - - FontDir() : m_nTimestamp(0), m_bNoFiles(false), m_bUserOverrideOnly( false ) {} - }; - - typedef boost::unordered_map< int, FontDir > FontCacheData; - FontCacheData m_aCache; - String m_aCacheFile; - bool m_bDoFlush; - - void read(); - void clearCache(); - - void copyPrintFont( const PrintFontManager::PrintFont* pFrom, PrintFontManager::PrintFont* pTo ) const; - bool equalsPrintFont( const PrintFontManager::PrintFont* pLeft, PrintFontManager::PrintFont* pRight ) const; - PrintFontManager::PrintFont* clonePrintFont( const PrintFontManager::PrintFont* pFont ) const; - - void createCacheDir( int nDirID ); -public: - FontCache(); - ~FontCache(); - - bool getFontCacheFile( int nDirID, const rtl::OString& rFile, std::list< PrintFontManager::PrintFont* >& rNewFonts ) const; - void updateFontCacheEntry( const PrintFontManager::PrintFont*, bool bFlush ); - void markEmptyDir( int nDirID, bool bNoFiles = true ); - - // returns false for non cached directory - // a cached but empty directory will return true but not append anything - bool listDirectory( const rtl::OString& rDir, std::list< PrintFontManager::PrintFont* >& rNewFonts ) const; - // returns true for directoris that contain only user overridden fonts - bool scanAdditionalFiles( const rtl::OString& rDir ); - - void flush(); - - void updateDirTimestamp( int nDirID ); -}; - -} // namespace psp - -#endif // _PSPRINT_FONTCACHE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/fontsubset.hxx b/vcl/inc/vcl/fontsubset.hxx deleted file mode 100644 index f710434698de..000000000000 --- a/vcl/inc/vcl/fontsubset.hxx +++ /dev/null @@ -1,99 +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_FONTSUBSET_HXX -#define _SV_FONTSUBSET_HXX - -#include <tools/gen.hxx> -#include <tools/string.hxx> -#include <cstdio> - -namespace vcl { struct _TrueTypeFont; } // SFT's idea of a TTF font - -class FontSubsetInfo -{ -public: - explicit FontSubsetInfo( void ); - virtual ~FontSubsetInfo( void ); - - enum FontType { - NO_FONT = 0, - SFNT_TTF = 1<<1, // SFNT container with TrueType glyphs - SFNT_CFF = 1<<2, // SFNT container with CFF-container - TYPE1_PFA = 1<<3, // PSType1 Postscript Font Ascii - TYPE1_PFB = 1<<4, // PSType1 Postscript Font Binary - CFF_FONT = 1<<5, // CFF-container with PSType2 glyphs - TYPE3_FONT = 1<<6, // PSType3 Postscript font - TYPE42_FONT = 1<<7, // PSType42 wrapper for an SFNT_TTF - ANY_SFNT = SFNT_TTF | SFNT_CFF, - ANY_TYPE1 = TYPE1_PFA | TYPE1_PFB, - ANY_FONT = 0xFF - }; - - bool LoadFont( FontType eInFontType, - const unsigned char* pFontBytes, int nByteLength ); - bool LoadFont( vcl::_TrueTypeFont* pSftTrueTypeFont ); - - bool CreateFontSubset( int nOutFontTypeMask, - FILE* pOutFile, const char* pOutFontName, - const long* pReqGlyphIds, const sal_uInt8* pEncodedIds, - int nReqGlyphCount, sal_Int32* pOutGlyphWidths = NULL ); - -public: // TODO: make subsetter results private and provide accessor methods instead - // subsetter-provided subset details needed by e.g. Postscript or PDF - String m_aPSName; - int m_nAscent; // all metrics in PS font units - int m_nDescent; - int m_nCapHeight; - Rectangle m_aFontBBox; - FontType m_nFontType; // font-type of subset result - -private: - // input-font-specific details - unsigned const char* mpInFontBytes; - int mnInByteLength; - FontType meInFontType; // allowed mask of input font-types - vcl::_TrueTypeFont* mpSftTTFont; - - // subset-request details - int mnReqFontTypeMask; // allowed subset-target font types - FILE* mpOutFile; - const char* mpReqFontName; - const long* mpReqGlyphIds; - const sal_uInt8* mpReqEncodedIds; - int mnReqGlyphCount; - -protected: - bool CreateFontSubsetFromCff( sal_Int32* pOutGlyphWidths = NULL ); - bool CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths = NULL ); - bool CreateFontSubsetFromType1( sal_Int32* pOutGlyphWidths = NULL ); -}; - -#endif // _SV_FONTSUBSET_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/gdimtf.hxx b/vcl/inc/vcl/gdimtf.hxx index ffbd4867ecb8..4aaa2953d80b 100644 --- a/vcl/inc/vcl/gdimtf.hxx +++ b/vcl/inc/vcl/gdimtf.hxx @@ -70,6 +70,15 @@ class Gradient; #define MTF_MIRROR_HORZ 0x00000001UL #define MTF_MIRROR_VERT 0x00000002UL +// ----------------------------- +// - Write flags for streaming - +// ----------------------------- + +#define GDIMETAFILE_WRITE_DEFAULT 0x00000000 +#define GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC 0x00000001 + +typedef sal_uInt32 GDIMetaFileWriteFlags; + // --------- // - Enums - // --------- @@ -237,7 +246,7 @@ public: // Methoden zum Lesen und Schreiben des neuen Formats; // die Read-Methode kann auch das alte Format lesen SvStream& Read( SvStream& rIStm ); - SvStream& Write( SvStream& rOStm ); + SvStream& Write( SvStream& rOStm, GDIMetaFileWriteFlags = GDIMETAFILE_WRITE_DEFAULT ); // Stream-Operatoren schreiben das alte Format (noch) // und lesen sowohl das alte wie auch das neue Format @@ -276,4 +285,4 @@ MetaCommentAction* makePluggableRendererAction( const rtl::OUString& rRendererSe #endif // _SV_GDIMTF_HXX -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/vcl/inc/vcl/gfxlink.hxx b/vcl/inc/vcl/gfxlink.hxx index 1d4362f00dc1..d86973b5686c 100644 --- a/vcl/inc/vcl/gfxlink.hxx +++ b/vcl/inc/vcl/gfxlink.hxx @@ -110,11 +110,12 @@ enum GfxLinkType GFX_LINK_TYPE_NATIVE_WMF = 6, // Don't forget to update the following defines GFX_LINK_TYPE_NATIVE_MET = 7, // Don't forget to update the following defines GFX_LINK_TYPE_NATIVE_PCT = 8, // Don't forget to update the following defines + GFX_LINK_TYPE_NATIVE_SVG = 9, // Don't forget to update the following defines GFX_LINK_TYPE_USER = 0xffff }; #define GFX_LINK_FIRST_NATIVE_ID GFX_LINK_TYPE_NATIVE_GIF -#define GFX_LINK_LAST_NATIVE_ID GFX_LINK_TYPE_NATIVE_PCT +#define GFX_LINK_LAST_NATIVE_ID GFX_LINK_TYPE_NATIVE_SVG // ----------- // - GfxLink - diff --git a/vcl/inc/vcl/glyphcache.hxx b/vcl/inc/vcl/glyphcache.hxx deleted file mode 100644 index dc11ba1637d8..000000000000 --- a/vcl/inc/vcl/glyphcache.hxx +++ /dev/null @@ -1,391 +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_GLYPHCACHE_HXX -#define _SV_GLYPHCACHE_HXX - -#include <vcl/dllapi.h> - -class GlyphCache; -class GlyphMetric; -class GlyphData; -class ServerFont; -class GlyphCachePeer; -class ServerFontLayoutEngine; -class ServerFontLayout; -class ExtraKernInfo; -struct ImplKernPairData; -class ImplFontOptions; - -#include <tools/gen.hxx> -#include <boost/unordered_map.hpp> -#include <boost/unordered_set.hpp> -#include <boost/shared_ptr.hpp> - -namespace basegfx { class B2DPolyPolygon; } - -class RawBitmap; - -#include <vcl/outfont.hxx> -#include <vcl/impfont.hxx> - -class ServerFontLayout; -#include <vcl/sallayout.hxx> - -namespace vcl -{ - struct FontCapabilities; -} - -// ======================================================================= - -class VCL_PLUGIN_PUBLIC GlyphCache -{ -public: - explicit GlyphCache( GlyphCachePeer& ); - /*virtual*/ ~GlyphCache(); - - static GlyphCache& GetInstance(); - void LoadFonts(); - - void ClearFontPath(); - void AddFontPath( const String& rFontPath ); - void AddFontFile( const rtl::OString& rNormalizedName, - int nFaceNum, sal_IntPtr nFontId, const ImplDevFontAttributes&, - const ExtraKernInfo* = NULL ); - void AnnounceFonts( ImplDevFontList* ) const; - - ServerFont* CacheFont( const ImplFontSelectData& ); - void UncacheFont( ServerFont& ); - void InvalidateAllGlyphs(); - -protected: - GlyphCachePeer& mrPeer; - -private: - friend class ServerFont; - // used by ServerFont class only - void AddedGlyph( ServerFont&, GlyphData& ); - void RemovingGlyph( ServerFont&, GlyphData&, int nGlyphIndex ); - void UsingGlyph( ServerFont&, GlyphData& ); - void GrowNotify(); - -private: - sal_uLong CalcByteCount() const; - void GarbageCollect(); - - // the GlyphCache's FontList matches a font request to a serverfont instance - // the FontList key's mpFontData member is reinterpreted as integer font id - struct IFSD_Equal{ bool operator()( const ImplFontSelectData&, const ImplFontSelectData& ) const; }; - struct IFSD_Hash{ size_t operator()( const ImplFontSelectData& ) const; }; - typedef ::boost::unordered_map<ImplFontSelectData,ServerFont*,IFSD_Hash,IFSD_Equal > FontList; - FontList maFontList; - sal_uLong mnMaxSize; // max overall cache size in bytes - mutable sal_uLong mnBytesUsed; - mutable long mnLruIndex; - mutable int mnGlyphCount; - ServerFont* mpCurrentGCFont; - - class FreetypeManager* mpFtManager; -}; - -// ======================================================================= - -class GlyphMetric -{ -public: - Point GetOffset() const { return maOffset; } - Point GetDelta() const { return maDelta; } - Size GetSize() const { return maSize; } - long GetCharWidth() const { return mnAdvanceWidth; } - -protected: - friend class GlyphData; - void SetOffset( int nX, int nY ) { maOffset = Point( nX, nY); } - void SetDelta( int nX, int nY ) { maDelta = Point( nX, nY); } - void SetSize( const Size& s ) { maSize = s; } - void SetCharWidth( long nW ) { mnAdvanceWidth = nW; } - -private: - long mnAdvanceWidth; - Point maDelta; - Point maOffset; - Size maSize; -}; - -// ----------------------------------------------------------------------- - -// the glyph specific data needed by a GlyphCachePeer is usually trivial, -// not attaching it to the corresponding GlyphData would be overkill -struct ExtGlyphData -{ - int meInfo; - void* mpData; - - ExtGlyphData() : meInfo(0), mpData(NULL) {} -}; - -// ----------------------------------------------------------------------- - -class GlyphData -{ -public: - const GlyphMetric& GetMetric() const { return maMetric; } - Size GetSize() const { return maMetric.GetSize(); } - - void SetSize( const Size& s) { maMetric.SetSize( s ); } - void SetOffset( int nX, int nY ) { maMetric.SetOffset( nX, nY ); } - void SetDelta( int nX, int nY ) { maMetric.SetDelta( nX, nY ); } - void SetCharWidth( long nW ) { maMetric.SetCharWidth( nW ); } - - void SetLruValue( int n ) const { mnLruValue = n; } - long GetLruValue() const { return mnLruValue;} - - ExtGlyphData& ExtDataRef() { return maExtData; } - const ExtGlyphData& ExtDataRef() const { return maExtData; } - -private: - GlyphMetric maMetric; - ExtGlyphData maExtData; - - // used by GlyphCache for cache LRU algorithm - mutable long mnLruValue; -}; - -// ======================================================================= - -class VCL_PLUGIN_PUBLIC ServerFont -{ -public: - virtual const ::rtl::OString* GetFontFileName() const { return NULL; } - virtual int GetFontFaceNumber() const { return 0; } - virtual bool TestFont() const { return true; } - virtual void* GetFtFace() const { return 0; } - virtual int GetLoadFlags() const { return 0; } - virtual void SetFontOptions( boost::shared_ptr<ImplFontOptions> ) {} - virtual boost::shared_ptr<ImplFontOptions> GetFontOptions() const - { return boost::shared_ptr<ImplFontOptions>(); } - virtual bool NeedsArtificialBold() const { return false; } - virtual bool NeedsArtificialItalic() const { return false; } - - const ImplFontSelectData& GetFontSelData() const { return maFontSelData; } - - virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const = 0; - virtual sal_uLong GetKernPairs( ImplKernPairData** ) const { return 0; } - virtual int GetGlyphKernValue( int, int ) const { return 0; } - virtual const ImplFontCharMap* GetImplFontCharMap() const = 0; - virtual bool GetFontCapabilities(vcl::FontCapabilities &) const { return false; } - Point TransformPoint( const Point& ) const; - - GlyphData& GetGlyphData( int nGlyphIndex ); - const GlyphMetric& GetGlyphMetric( int nGlyphIndex ) - { return GetGlyphData( nGlyphIndex ).GetMetric(); } - - virtual int GetGlyphIndex( sal_UCS4 ) const = 0; - virtual bool GetGlyphOutline( int nGlyphIndex, ::basegfx::B2DPolyPolygon& ) const = 0; - virtual bool GetAntialiasAdvice( void ) const = 0; - bool IsGlyphInvisible( int nGlyphIndex ); - virtual bool GetGlyphBitmap1( int nGlyphIndex, RawBitmap& ) const = 0; - virtual bool GetGlyphBitmap8( int nGlyphIndex, RawBitmap& ) const = 0; - - void SetExtended( int nInfo, void* ppVoid ); - int GetExtInfo() { return mnExtInfo; } - void* GetExtPointer() { return mpExtData; } - -protected: - friend class GlyphCache; - friend class ServerFontLayout; - explicit ServerFont( const ImplFontSelectData& ); - virtual ~ServerFont(); - - void AddRef() const { ++mnRefCount; } - long GetRefCount() const { return mnRefCount; } - long Release() const; - sal_uLong GetByteCount() const { return mnBytesUsed; } - - virtual void InitGlyphData( int nGlyphIndex, GlyphData& ) const = 0; - virtual void GarbageCollect( long ); - void ReleaseFromGarbageCollect(); - - virtual ServerFontLayoutEngine* GetLayoutEngine() { return NULL; } - -private: - typedef ::boost::unordered_map<int,GlyphData> GlyphList; - mutable GlyphList maGlyphList; - - const ImplFontSelectData maFontSelData; - - // info for GlyphcachePeer - int mnExtInfo; - void* mpExtData; - - // used by GlyphCache for cache LRU algorithm - mutable long mnRefCount; - mutable sal_uLong mnBytesUsed; - - ServerFont* mpPrevGCFont; - ServerFont* mpNextGCFont; - -protected: - // 16.16 fixed point values used for a rotated font - long mnCos; - long mnSin; -private: - int mnZWJ; - int mnZWNJ; - bool mbCollectedZW; -}; - -// ======================================================================= - -// a class for cache entries for physical font instances that are based on serverfonts -class VCL_PLUGIN_PUBLIC ImplServerFontEntry : public ImplFontEntry -{ -private: - ServerFont* mpServerFont; - boost::shared_ptr<ImplFontOptions> mpFontOptions; - bool mbGotFontOptions; - -public: - ImplServerFontEntry( ImplFontSelectData& ); - virtual ~ImplServerFontEntry(); - void SetServerFont( ServerFont* p) { mpServerFont = p; } - void HandleFontOptions(); -}; - -// ======================================================================= - -class VCL_PLUGIN_PUBLIC ServerFontLayout : public GenericSalLayout -{ -private: - ServerFont& mrServerFont; - - // enforce proper copy semantic - SAL_DLLPRIVATE ServerFontLayout( const ServerFontLayout& ); - SAL_DLLPRIVATE ServerFontLayout& operator=( const ServerFontLayout& ); - -public: - ServerFontLayout( ServerFont& ); - virtual bool LayoutText( ImplLayoutArgs& ); - virtual void AdjustLayout( ImplLayoutArgs& ); - virtual void DrawText( SalGraphics& ) const; - ServerFont& GetServerFont() const { return mrServerFont; } -}; - -// ======================================================================= - -class ServerFontLayoutEngine -{ -public: - virtual ~ServerFontLayoutEngine() {} - virtual bool operator()( ServerFontLayout&, ImplLayoutArgs& ); -}; - -// ======================================================================= - -class GlyphCachePeer -{ -protected: - GlyphCachePeer() : mnBytesUsed(0) {} - virtual ~GlyphCachePeer() {} - -public: - sal_Int32 GetByteCount() const { return mnBytesUsed; } - virtual void RemovingFont( ServerFont& ) {} - virtual void RemovingGlyph( ServerFont&, GlyphData&, int ) {} - -protected: - sal_Int32 mnBytesUsed; -}; - -// ======================================================================= - -class VCL_PLUGIN_PUBLIC RawBitmap -{ -public: - RawBitmap(); - ~RawBitmap(); - bool Rotate( int nAngle ); - -public: - unsigned char* mpBits; - sal_uLong mnAllocated; - - sal_uLong mnWidth; - sal_uLong mnHeight; - - sal_uLong mnScanlineSize; - sal_uLong mnBitCount; - - int mnXOffset; - int mnYOffset; -}; - -// ======================================================================= - -inline void ServerFont::SetExtended( int nInfo, void* pVoid ) -{ - mnExtInfo = nInfo; - mpExtData = pVoid; -} - -// ======================================================================= - -// ExtraKernInfo allows an on-demand query of extra kerning info #i29881# -// The kerning values have to be scaled to match the font size before use -class VCL_PLUGIN_PUBLIC ExtraKernInfo -{ -public: - ExtraKernInfo( sal_IntPtr nFontId ); - virtual ~ExtraKernInfo() {} - - bool HasKernPairs() const; - int GetUnscaledKernPairs( ImplKernPairData** ) const; - int GetUnscaledKernValue( sal_Unicode cLeft, sal_Unicode cRight ) const; - -protected: - mutable bool mbInitialized; - virtual void Initialize() const = 0; - -protected: - sal_IntPtr mnFontId; - - // container to map a unicode pair to an unscaled kerning value - struct PairEqual{ int operator()(const ImplKernPairData& rA, const ImplKernPairData& rB) const - { return (rA.mnChar1 == rB.mnChar1) && (rA.mnChar2 == rB.mnChar2); } }; - struct PairHash{ int operator()(const ImplKernPairData& rA) const - { return (rA.mnChar1) * 256 ^ rA.mnChar2; } }; - typedef boost::unordered_set< ImplKernPairData, PairHash, PairEqual > UnicodeKernPairs; - mutable UnicodeKernPairs maUnicodeKernPairs; -}; - -// ======================================================================= - -#endif // _SV_GLYPHCACHE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/graph.hxx b/vcl/inc/vcl/graph.hxx index 3dfbb8d261d8..61da922acce6 100644 --- a/vcl/inc/vcl/graph.hxx +++ b/vcl/inc/vcl/graph.hxx @@ -36,6 +36,7 @@ #include <vcl/bitmapex.hxx> #include <vcl/animate.hxx> #include <vcl/gdimtf.hxx> +#include <vcl/rendergraphic.hxx> #include <vcl/graph.h> #include <vcl/gfxlink.hxx> #include <com/sun/star/uno/Reference.hxx> @@ -116,9 +117,12 @@ public: void SetDefaultType(); sal_Bool IsSupportedGraphic() const; - sal_Bool IsTransparent() const; - sal_Bool IsAlpha() const; - sal_Bool IsAnimated() const; + sal_Bool IsTransparent() const; + sal_Bool IsAlpha() const; + sal_Bool IsAnimated() const; + sal_Bool IsEPS() const; + sal_Bool IsRenderGraphic() const; + sal_Bool HasRenderGraphic() const; // #i102089# Access of Bitmap potentially will have to rasterconvert the Graphic // if it is a MetaFile. To be able to control this conversion it is necessary to @@ -128,8 +132,9 @@ public: Bitmap GetBitmap(const GraphicConversionParameters& rParameters = GraphicConversionParameters()) const; BitmapEx GetBitmapEx(const GraphicConversionParameters& rParameters = GraphicConversionParameters()) const; - Animation GetAnimation() const; - const GDIMetaFile& GetGDIMetaFile() const; + Animation GetAnimation() const; + const GDIMetaFile& GetGDIMetaFile() const; + ::vcl::RenderGraphic GetRenderGraphic() const; ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > GetXGraphic() const; @@ -217,4 +222,4 @@ public: #endif // _SV_GRAPH_HXX -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/vcl/inc/vcl/graphite_features.hxx b/vcl/inc/vcl/graphite_features.hxx deleted file mode 100644 index 742ad2c3f5f5..000000000000 --- a/vcl/inc/vcl/graphite_features.hxx +++ /dev/null @@ -1,78 +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. - * - ************************************************************************/ - -// Description: -// Parse a string of features specified as ; separated pairs. -// e.g. -// 1001=1&2002=2&fav1=0 -#include <sal/types.h> -#include <rtl/ustring.hxx> -#include <graphite2/Font.h> - -namespace grutils -{ - union FeatId - { - gr_uint32 num; - unsigned char label[5]; - }; - - class GrFeatureParser - { - public: - enum { MAX_FEATURES = 64 }; - static const char FEAT_PREFIX; - static const char FEAT_SEPARATOR; - static const char FEAT_ID_VALUE_SEPARATOR; - GrFeatureParser(const gr_face * face, const ::rtl::OString features, const ::rtl::OString lang); - GrFeatureParser(const gr_face * face, const ::rtl::OString lang); - ~GrFeatureParser(); - //size_t getFontFeatures(gr::FeatureSetting settings[MAX_FEATURES]) const; - bool parseErrors() { return mbErrors; }; - //static bool isValid(gr::Font & font, gr::FeatureSetting & setting); - gr_uint32 getLanguage() const { return maLang.num; }; - bool hasLanguage() const { return (maLang.label[0] != '\0'); } - sal_Int32 hashCode() const { return mnHash; } - size_t numFeatures() const { return mnNumSettings; } - gr_feature_val * values() const { return mpSettings; }; - private: - GrFeatureParser(const GrFeatureParser & copy); - void setLang(const gr_face * face, const ::rtl::OString & lang); - bool isCharId(const ::rtl::OString & id, size_t offset, size_t length); - gr_uint32 getCharId(const ::rtl::OString & id, size_t offset, size_t length); - short getIntValue(const ::rtl::OString & id, size_t offset, size_t length); - size_t mnNumSettings; - FeatId maLang; - bool mbErrors; - sal_uInt32 mnHash; - gr_feature_val * mpSettings; - }; - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/graphite_layout.hxx b/vcl/inc/vcl/graphite_layout.hxx deleted file mode 100644 index f605f190f669..000000000000 --- a/vcl/inc/vcl/graphite_layout.hxx +++ /dev/null @@ -1,175 +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_GRAPHITELAYOUT_HXX -#define _SV_GRAPHITELAYOUT_HXX -// Description: An implementation of the SalLayout interface that uses the -// Graphite engine. - -// We need this to enable namespace support in libgrengine headers. -#define GR_NAMESPACE - -// Standard Library -#include <memory> -#include <vector> -#include <map> -#include <utility> -// Libraries -#include <graphite2/Font.h> -#include <graphite2/Segment.h> -// Platform -#include <vcl/sallayout.hxx> -#include <vcl/dllapi.h> -// Module - -// Module type definitions and forward declarations. -// -class TextSourceAdaptor; -class GraphiteFontAdaptor; -class GrSegRecord; -// SAL/VCL types -class ServerFont; - -// Graphite types -namespace grutils { class GrFeatureParser; } - -class GraphiteFaceWrapper -{ -public: - typedef std::map<int, gr_font*> GrFontMap; - GraphiteFaceWrapper(gr_face * pFace) : m_pFace(pFace) {} - ~GraphiteFaceWrapper() - { - GrFontMap::iterator i = m_fonts.begin(); - while (i != m_fonts.end()) - gr_font_destroy((*i++).second); - m_fonts.clear(); - gr_face_destroy(m_pFace); - } - const gr_face * face() const { return m_pFace; } - gr_font * font(int ppm) const - { - GrFontMap::const_iterator i = m_fonts.find(ppm); - if (i != m_fonts.end()) - return i->second; - return NULL; - }; - void addFont(int ppm, gr_font * pFont) - { - if (m_fonts[ppm]) - gr_font_destroy(m_fonts[ppm]); - m_fonts[ppm] = pFont; - } -private: - gr_face * m_pFace; - GrFontMap m_fonts; -}; - -// This class uses the SIL Graphite engine to provide complex text layout services to the VCL -// @author tse -// -class VCL_PLUGIN_PUBLIC GraphiteLayout : public SalLayout -{ -public: - - class Glyphs : public std::vector<GlyphItem> - { - public: - typedef std::pair<Glyphs::const_iterator, Glyphs::const_iterator> iterator_pair_t; - - }; - - mutable Glyphs mvGlyphs; - void clear(); - -private: - const gr_face * mpFace; // not owned by layout - gr_font * mpFont; // not owned by layout - int mnSegCharOffset; // relative to ImplLayoutArgs::mpStr - long mnWidth; - std::vector<int> mvChar2BaseGlyph; - std::vector<int> mvGlyph2Char; - std::vector<int> mvCharDxs; - std::vector<int> mvCharBreaks; - float mfScaling; - const grutils::GrFeatureParser * mpFeatures; - -public: - GraphiteLayout(const gr_face * pFace, gr_font * pFont = NULL, - const grutils::GrFeatureParser * features = NULL) throw(); - - // used by upper layers - virtual bool LayoutText( ImplLayoutArgs& ); // first step of layout - // split into two stages to allow dc to be restored on the segment - gr_segment * CreateSegment(ImplLayoutArgs& rArgs); - bool LayoutGlyphs(ImplLayoutArgs& rArgs, gr_segment * pSegment); - - virtual void AdjustLayout( ImplLayoutArgs& ); // adjusting positions - - // methods using string indexing - virtual int GetTextBreak( long nMaxWidth, long nCharExtra=0, int nFactor=1 ) const; - virtual long FillDXArray( sal_Int32* pDXArray ) const; - virtual void ApplyDXArray(ImplLayoutArgs &rArgs, std::vector<int> & rDeltaWidth); - - virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const; - - // methods using glyph indexing - virtual int GetNextGlyphs(int nLen, sal_GlyphId* pGlyphIdxAry, ::Point & rPos, int&, - sal_Int32* pGlyphAdvAry = 0, int* pCharPosAry = 0 ) const; - - // used by glyph+font+script fallback - virtual void MoveGlyph( int nStart, long nNewXPos ); - virtual void DropGlyph( int nStart ); - virtual void Simplify( bool bIsBase ); - - // Dummy implementation so layout can be shared between Linux/Windows - virtual void DrawText(SalGraphics&) const {}; - - virtual ~GraphiteLayout() throw(); - void SetFont(gr_font * pFont) { mpFont = pFont; } - gr_font * GetFont() { return mpFont; } - void SetFeatures(grutils::GrFeatureParser * aFeature) { mpFeatures = aFeature; } - void SetFontScale(float s) { mfScaling = s; }; - virtual sal_GlyphId getKashidaGlyph(int & width) = 0; - void kashidaJustify(std::vector<int> & rDeltaWidth, sal_GlyphId, int width); - - static const int EXTRA_CONTEXT_LENGTH; -private: - void expandOrCondense(ImplLayoutArgs &rArgs); - void fillFrom(gr_segment * rSeg, ImplLayoutArgs & rArgs, float fScaling); - - void append(gr_segment * pSeg, - ImplLayoutArgs & rArgs, - const gr_slot * pSlot, - float nextGlyphOrigin, float fScaling, - long & rDXOffset, bool bIsBase, int baseChar); -}; - -#endif // _SV_GRAPHITELAYOUT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/graphite_serverfont.hxx b/vcl/inc/vcl/graphite_serverfont.hxx deleted file mode 100644 index b4a6e10be925..000000000000 --- a/vcl/inc/vcl/graphite_serverfont.hxx +++ /dev/null @@ -1,108 +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_GRAPHITESERVERFONT_HXX -#define _SV_GRAPHITESERVERFONT_HXX - -// We need this to enable namespace support in libgrengine headers. -#define GR_NAMESPACE - -#ifndef MSC -#include "vcl/graphite_layout.hxx" - -// Modules - -class VCL_PLUGIN_PUBLIC GraphiteLayoutImpl : public GraphiteLayout -{ -public: - GraphiteLayoutImpl(const gr_face * pFace, - ServerFont & rServerFont) throw() - : GraphiteLayout(pFace), mrServerFont(rServerFont) {}; - virtual ~GraphiteLayoutImpl() throw() {}; - virtual sal_GlyphId getKashidaGlyph(int & width); -private: - ServerFont & mrServerFont; -}; - -// This class implments the server font specific parts. -// @author tse -// -class VCL_PLUGIN_PUBLIC GraphiteServerFontLayout : public ServerFontLayout -{ -private: - // mutable so that the DrawOffset/DrawBase can be set - mutable GraphiteLayoutImpl maImpl; - grutils::GrFeatureParser * mpFeatures; - const sal_Unicode * mpStr; -public: - GraphiteServerFontLayout(ServerFont& pServerFont) throw(); - - virtual bool LayoutText( ImplLayoutArgs& rArgs) - { - mpStr = rArgs.mpStr; - SalLayout::AdjustLayout(rArgs); - return maImpl.LayoutText(rArgs); - }; // first step of layout - virtual void AdjustLayout( ImplLayoutArgs& rArgs) - { - SalLayout::AdjustLayout(rArgs); - maImpl.DrawBase() = maDrawBase; - maImpl.DrawOffset() = maDrawOffset; - maImpl.AdjustLayout(rArgs); - }; - virtual long GetTextWidth() const { return maImpl.GetTextWidth(); } - virtual long FillDXArray( sal_Int32* dxa ) const { return maImpl.FillDXArray(dxa); } - virtual int GetTextBreak( long mw, long ce, int f ) const { return maImpl.GetTextBreak(mw, ce, f); } - virtual void GetCaretPositions( int as, sal_Int32* cxa ) const { maImpl.GetCaretPositions(as, cxa); } - - // used by display layers - virtual int GetNextGlyphs( int l, sal_GlyphId* gia, Point& p, int& s, - sal_Int32* gaa = NULL, int* cpa = NULL ) const - { - maImpl.DrawBase() = maDrawBase; - maImpl.DrawOffset() = maDrawOffset; - return maImpl.GetNextGlyphs(l, gia, p, s, gaa, cpa); - } - - virtual void MoveGlyph( int nStart, long nNewXPos ) { maImpl.MoveGlyph(nStart, nNewXPos); }; - virtual void DropGlyph( int nStart ) { maImpl.DropGlyph(nStart); }; - virtual void Simplify( bool bIsBase ) { maImpl.Simplify(bIsBase); }; - - virtual ~GraphiteServerFontLayout() throw(); - - static bool IsGraphiteEnabledFont(ServerFont * pServerFont); -// For use with PspGraphics - const sal_Unicode* getTextPtr() const { return mpStr; }; - int getMinCharPos() const { return mnMinCharPos; } - int getMaxCharPos() const { return mnEndCharPos; } -}; - -#endif -#endif //_SV_GRAPHITESERVERFONT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/helpwin.hxx b/vcl/inc/vcl/helpwin.hxx deleted file mode 100644 index 7862a4961bbd..000000000000 --- a/vcl/inc/vcl/helpwin.hxx +++ /dev/null @@ -1,96 +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_HELPWIN_HXX -#define _SV_HELPWIN_HXX - -#include <vcl/floatwin.hxx> -#include <vcl/timer.hxx> - -// ------------------ -// - HelpTextWindow - -// ------------------ - -class HelpTextWindow : public FloatingWindow -{ -private: - Point maPos; - Rectangle maHelpArea; // Wenn naechste Hilfe fuers gleiche Rectangle, gleicher Text, dann Fenster stehen lassen - - Rectangle maTextRect; // Bei umgebrochenen Text in QuickHelp - - String maHelpText; - String maStatusText; - - Timer maShowTimer; - Timer maHideTimer; - - sal_uInt16 mnHelpWinStyle; - sal_uInt16 mnStyle; - -protected: - DECL_LINK( TimerHdl, Timer* ); - virtual void Paint( const Rectangle& ); - virtual void RequestHelp( const HelpEvent& rHEvt ); - virtual String GetText() const; - void ImplShow(); - -public: - HelpTextWindow( Window* pParent, const String& rText, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle ); - ~HelpTextWindow(); - - const String& GetHelpText() const { return maHelpText; } - void SetHelpText( const String& rHelpText ); - sal_uInt16 GetWinStyle() const { return mnHelpWinStyle; } - sal_uInt16 GetStyle() const { return mnStyle; } - - // Nur merken: - void SetStatusText( const String& rStatusText ) { maStatusText = rStatusText; } - void SetHelpArea( const Rectangle& rRect ) { maHelpArea = rRect; } - - void ShowHelp( sal_uInt16 nDelayMode ); - - Size CalcOutSize() const; - const Rectangle& GetHelpArea() const { return maHelpArea; } - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); - - sal_Bool RegisterAccessibleParent(); - void RevokeAccessibleParent(); -}; - -void ImplShowHelpWindow( Window* pParent, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle, - const String& rHelpText, const String& rStatusText, - const Point& rScreenPos, const Rectangle* pHelpArea = NULL ); -void ImplDestroyHelpWindow( bool bUpdateHideTime ); -void ImplSetHelpWindowPos( Window* pHelpWindow, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle, - const Point& rPos, const Rectangle* pHelpArea ); - -#endif // _SV_HELPWIN_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/idlemgr.hxx b/vcl/inc/vcl/idlemgr.hxx deleted file mode 100644 index 674bdf070c3a..000000000000 --- a/vcl/inc/vcl/idlemgr.hxx +++ /dev/null @@ -1,65 +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_IDLEMGR_HXX -#define _SV_IDLEMGR_HXX - -#include <vcl/sv.h> -#include <vcl/timer.hxx> -#include <vector> - -struct ImplIdleData; -typedef ::std::vector< ImplIdleData* > ImplIdleList; - -// --------------- -// - ImplIdleMgr - -// --------------- - -class ImplIdleMgr -{ -private: - ImplIdleList* mpIdleList; - AutoTimer maTimer; - -public: - ImplIdleMgr(); - ~ImplIdleMgr(); - - sal_Bool InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority ); - void RemoveIdleHdl( const Link& rLink ); - - void RestartIdler() - { if ( maTimer.IsActive() ) maTimer.Start(); } - - // Timer* kann auch NULL sein - DECL_LINK( TimeoutHdl, Timer* ); -}; - -#endif // _SV_IDLEMGR_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/ilstbox.hxx b/vcl/inc/vcl/ilstbox.hxx deleted file mode 100644 index 850531c64d9d..000000000000 --- a/vcl/inc/vcl/ilstbox.hxx +++ /dev/null @@ -1,651 +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_ILSTBOX_HXX -#define _SV_ILSTBOX_HXX - -#include <vcl/sv.h> -#include <vcl/image.hxx> -#include <vcl/ctrl.hxx> -#include <vcl/button.hxx> -#include <vcl/floatwin.hxx> -#include <vcl/lstbox.h> -#include <vcl/timer.hxx> - -#include "vcl/quickselectionengine.hxx" - -class ScrollBar; -class ScrollBarBox; - -// ----------------- -// - ListBox-Types - -// ----------------- - -#define HORZ_SCROLL 4 -#define IMG_TXT_DISTANCE 6 - -enum LB_EVENT_TYPE -{ - LET_MBDOWN, - LET_TRACKING, - LET_TRACKING_END, - LET_KEYMOVE, - LET_KEYSPACE -}; - -// ----------------- -// - ImplEntryType - -// ----------------- - -struct ImplEntryType -{ - XubString maStr; - Image maImage; - void* mpUserData; - sal_Bool mbIsSelected; - long mnFlags; - long mnHeight; - - ImplEntryType( const XubString& rStr, const Image& rImage ) : - maStr( rStr ), - maImage( rImage ), - mnFlags( 0 ), - mnHeight( 0 ) - { - mbIsSelected = sal_False; - mpUserData = NULL; - } - - ImplEntryType( const XubString& rStr ) : - maStr( rStr ), - mnFlags( 0 ), - mnHeight( 0 ) - { - mbIsSelected = sal_False; - mpUserData = NULL; - } - - ImplEntryType( const Image& rImage ) : - maImage( rImage ), - mnFlags( 0 ), - mnHeight( 0 ) - { - mbIsSelected = sal_False; - mpUserData = NULL; - } -}; - -// ----------------- -// - ImplEntryList - -// ----------------- - -class ImplEntryList : private List -{ -private: - Window* mpWindow; // For getting the current locale when matching strings - sal_uInt16 mnLastSelected; - sal_uInt16 mnSelectionAnchor; - sal_uInt16 mnImages; - - sal_uInt16 mnMRUCount; - sal_uInt16 mnMaxMRUCount; - - Link maSelectionChangedHdl; - sal_Bool mbCallSelectionChangedHdl; - - ImplEntryType* GetEntry( sal_uInt16 nPos ) const { return (ImplEntryType*)List::GetObject( nPos ); } - -public: - ImplEntryList( Window* pWindow ); - ~ImplEntryList(); - - sal_uInt16 InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry, sal_Bool bSort ); - void RemoveEntry( sal_uInt16 nPos ); - const ImplEntryType* GetEntryPtr( sal_uInt16 nPos ) const { return (const ImplEntryType*) GetObject( nPos ); } - ImplEntryType* GetMutableEntryPtr( sal_uInt16 nPos ) const { return (ImplEntryType*) GetObject( nPos ); } - void Clear(); - - sal_uInt16 FindMatchingEntry( const XubString& rStr, sal_uInt16 nStart = 0, sal_Bool bForward = sal_True, sal_Bool bLazy = sal_True ) const; - sal_uInt16 FindEntry( const XubString& rStr, sal_Bool bSearchMRUArea = sal_False ) const; - sal_uInt16 FindEntry( const void* pData ) const; - - // helper: add up heights up to index nEndIndex. - // GetAddedHeight( 0 ) returns 0 - // GetAddedHeight( LISTBOX_ENTRY_NOTFOUND ) returns 0 - // GetAddedHeight( i, k ) with k > i is equivalent -GetAddedHeight( k, i ) - long GetAddedHeight( sal_uInt16 nEndIndex, sal_uInt16 nBeginIndex = 0, long nBeginHeight = 0 ) const; - long GetEntryHeight( sal_uInt16 nPos ) const; - - sal_uInt16 GetEntryCount() const { return (sal_uInt16)List::Count(); } - sal_Bool HasImages() const { return mnImages ? sal_True : sal_False; } - - XubString GetEntryText( sal_uInt16 nPos ) const; - - sal_Bool HasEntryImage( sal_uInt16 nPos ) const; - Image GetEntryImage( sal_uInt16 nPos ) const; - - void SetEntryData( sal_uInt16 nPos, void* pNewData ); - void* GetEntryData( sal_uInt16 nPos ) const; - - void SetEntryFlags( sal_uInt16 nPos, long nFlags ); - long GetEntryFlags( sal_uInt16 nPos ) const; - - void SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ); - - sal_uInt16 GetSelectEntryCount() const; - XubString GetSelectEntry( sal_uInt16 nIndex ) const; - sal_uInt16 GetSelectEntryPos( sal_uInt16 nIndex ) const; - sal_Bool IsEntrySelected( const XubString& rStr ) const; - sal_Bool IsEntryPosSelected( sal_uInt16 nIndex ) const; - - void SetLastSelected( sal_uInt16 nPos ) { mnLastSelected = nPos; } - sal_uInt16 GetLastSelected() const { return mnLastSelected; } - - void SetSelectionAnchor( sal_uInt16 nPos ) { mnSelectionAnchor = nPos; } - sal_uInt16 GetSelectionAnchor() const { return mnSelectionAnchor; } - - - void SetSelectionChangedHdl( const Link& rLnk ) { maSelectionChangedHdl = rLnk; } - void SetCallSelectionChangedHdl( sal_Bool bCall ) { mbCallSelectionChangedHdl = bCall; } - - void SetMRUCount( sal_uInt16 n ) { mnMRUCount = n; } - sal_uInt16 GetMRUCount() const { return mnMRUCount; } - - void SetMaxMRUCount( sal_uInt16 n ) { mnMaxMRUCount = n; } - sal_uInt16 GetMaxMRUCount() const { return mnMaxMRUCount; } - - /** An Entry is selectable if its mnFlags does not have the - LISTBOX_ENTRY_FLAG_DISABLE_SELECTION flag set. */ - bool IsEntrySelectable( sal_uInt16 nPos ) const; - - /** returns the first entry found from the given position nPos that is selectable - or LISTBOX_ENTRY_NOTFOUND if non is found. If the entry at nPos is not selectable, - it returns the first selectable entry after nPos if bForward is true and the - first selectable entry after nPos is bForward is false. - */ - sal_uInt16 FindFirstSelectable( sal_uInt16 nPos, bool bForward = true ); -}; - -// --------------------- -// - ImplListBoxWindow - -// --------------------- - -class ImplListBoxWindow : public Control, public ::vcl::ISearchableStringList -{ -private: - ImplEntryList* mpEntryList; // EntryListe - Rectangle maFocusRect; - - Size maUserItemSize; - - long mnMaxTxtHeight; // Maximale Hoehe eines Text-Items - long mnMaxTxtWidth; // Maximale Breite eines Text-Items - // Entry ohne Image - long mnMaxImgTxtWidth;// Maximale Breite eines Text-Items - // Entry UND Image - long mnMaxImgWidth; // Maximale Breite eines Image-Items - long mnMaxImgHeight; // Maximale Hoehe eines Image-Items - long mnMaxWidth; // Maximale Breite eines Eintrags - long mnMaxHeight; // Maximale Hoehe eines Eintrags - - sal_uInt16 mnCurrentPos; // Position (Focus) - sal_uInt16 mnTrackingSaveSelection; // Selektion vor Tracking(); - - sal_uInt16 mnSeparatorPos; // Separator - - sal_uInt16 mnUserDrawEntry; - - sal_uInt16 mnTop; // Ausgabe ab Zeile - long mnLeft; // Ausgabe ab Spalte - long mnBorder; // Abstand Rahmen - Text - long mnTextHeight; // Texthoehe - ProminentEntry meProminentType; // where is the "prominent" entry - - sal_uInt16 mnSelectModifier; // Modifiers - - sal_Bool mbHasFocusRect: 1, - mbSort: 1, // ListBox sortiert - mbTrack: 1, // Tracking - mbMulti: 1, // MultiListBox - mbStackMode: 1, // StackSelection - mbSimpleMode: 1, // SimpleMode fuer MultiListBox - mbImgsDiffSz: 1, // Images haben verschiedene Groessen - mbTravelSelect: 1, // TravelSelect - mbTrackingSelect: 1, // Selektiert bei MouseMove - mbSelectionChanged: 1, // Select() nicht zu oft rufen... - mbMouseMoveSelect: 1, // Selektieren bei MouseMove - mbGrabFocus: 1, // Focus bei MBDown grabben - mbUserDrawEnabled: 1, // UserDraw possible - mbInUserDraw: 1, // In UserDraw - mbReadOnly: 1, // ReadOnly - mbMirroring: 1, // pb: #106948# explicit mirroring for calc - mbRight: 1, // right align Text output - mbCenter: 1; // center Text output - - Link maScrollHdl; - Link maSelectHdl; - Link maCancelHdl; - Link maDoubleClickHdl; - Link maUserDrawHdl; - Link maMRUChangedHdl; - - ::vcl::QuickSelectionEngine - maQuickSelectionEngine; - -protected: - virtual void KeyInput( const KeyEvent& rKEvt ); - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void MouseMove( const MouseEvent& rMEvt ); - virtual void Tracking( const TrackingEvent& rTEvt ); - virtual void Paint( const Rectangle& rRect ); - virtual void Resize(); - virtual void GetFocus(); - virtual void LoseFocus(); - - sal_Bool SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False ); - void ImplPaint( sal_uInt16 nPos, sal_Bool bErase = sal_False, bool bLayout = false ); - void ImplDoPaint( const Rectangle& rRect, bool bLayout = false ); - void ImplCalcMetrics(); - void ImplUpdateEntryMetrics( ImplEntryType& rEntry ); - void ImplCallSelect(); - - void ImplShowFocusRect(); - void ImplHideFocusRect(); - - - virtual void StateChanged( StateChangedType nType ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - -public: - virtual void FillLayoutData() const; - - ImplListBoxWindow( Window* pParent, WinBits nWinStyle ); - ~ImplListBoxWindow(); - - ImplEntryList* GetEntryList() const { return mpEntryList; } - - sal_uInt16 InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry ); - void RemoveEntry( sal_uInt16 nPos ); - void Clear(); - void ResetCurrentPos() { mnCurrentPos = LISTBOX_ENTRY_NOTFOUND; } - sal_uInt16 GetCurrentPos() const { return mnCurrentPos; } - sal_uInt16 GetDisplayLineCount() const; - void SetEntryFlags( sal_uInt16 nPos, long nFlags ); - - void DrawEntry( sal_uInt16 nPos, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos = sal_False, bool bLayout = false ); - - void SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ); - void DeselectAll(); - sal_uInt16 GetEntryPosForPoint( const Point& rPoint ) const; - sal_uInt16 GetLastVisibleEntry() const; - - sal_Bool ProcessKeyInput( const KeyEvent& rKEvt ); - - void SetTopEntry( sal_uInt16 nTop ); - sal_uInt16 GetTopEntry() const { return mnTop; } - // ShowProminentEntry will set the entry correspoding to nEntryPos - // either at top or in the middle depending on the chosen style - void ShowProminentEntry( sal_uInt16 nEntryPos ); - void SetProminentEntryType( ProminentEntry eType ) { meProminentType = eType; } - ProminentEntry GetProminentEntryType() const { return meProminentType; } - using Window::IsVisible; - sal_Bool IsVisible( sal_uInt16 nEntry ) const; - - long GetLeftIndent() const { return mnLeft; } - void SetLeftIndent( long n ); - void ScrollHorz( long nDiff ); - - void AllowGrabFocus( sal_Bool b ) { mbGrabFocus = b; } - sal_Bool IsGrabFocusAllowed() const { return mbGrabFocus; } - - void SetSeparatorPos( sal_uInt16 n ) { mnSeparatorPos = n; } - sal_uInt16 GetSeparatorPos() const { return mnSeparatorPos; } - - void SetTravelSelect( sal_Bool bTravelSelect ) { mbTravelSelect = bTravelSelect; } - sal_Bool IsTravelSelect() const { return mbTravelSelect; } - sal_Bool IsTrackingSelect() const { return mbTrackingSelect; } - - void SetUserItemSize( const Size& rSz ); - const Size& GetUserItemSize() const { return maUserItemSize; } - - void EnableUserDraw( sal_Bool bUserDraw ) { mbUserDrawEnabled = bUserDraw; } - sal_Bool IsUserDrawEnabled() const { return mbUserDrawEnabled; } - - void EnableMultiSelection( sal_Bool bMulti, sal_Bool bStackMode ) { mbMulti = bMulti; mbStackMode = bStackMode; } - sal_Bool IsMultiSelectionEnabled() const { return mbMulti; } - - void SetMultiSelectionSimpleMode( sal_Bool bSimple ) { mbSimpleMode = bSimple; } - sal_Bool IsMultiSelectionSimpleMode() const { return mbSimpleMode; } - - void EnableMouseMoveSelect( sal_Bool bMouseMoveSelect ) { mbMouseMoveSelect = bMouseMoveSelect; } - sal_Bool IsMouseMoveSelectEnabled() const { return mbMouseMoveSelect; } - sal_Bool IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; } - - Size CalcSize( sal_uInt16 nMaxLines ) const; - Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const; - - long GetEntryHeight() const { return mnMaxHeight; } - long GetMaxEntryWidth() const { return mnMaxWidth; } - - void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; } - const Link& GetScrollHdl() const { return maScrollHdl; } - void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } - const Link& GetSelectHdl() const { return maSelectHdl; } - void SetCancelHdl( const Link& rLink ) { maCancelHdl = rLink; } - const Link& GetCancelHdl() const { return maCancelHdl; } - void SetDoubleClickHdl( const Link& rLink ) { maDoubleClickHdl = rLink; } - const Link& GetDoubleClickHdl() const { return maDoubleClickHdl; } - void SetUserDrawHdl( const Link& rLink ) { maUserDrawHdl = rLink; } - const Link& GetUserDrawHdl() const { return maUserDrawHdl; } - void SetMRUChangedHdl( const Link& rLink ) { maMRUChangedHdl = rLink; } - const Link& GetMRUChangedHdl() const { return maMRUChangedHdl; } - - sal_Bool IsSelectionChanged() const { return mbSelectionChanged; } - sal_uInt16 GetSelectModifier() const { return mnSelectModifier; } - - void EnableSort( sal_Bool b ) { mbSort = b; } - - void SetReadOnly( sal_Bool bReadOnly ) { mbReadOnly = bReadOnly; } - sal_Bool IsReadOnly() const { return mbReadOnly; } - - using Control::ImplInitSettings; - void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); - sal_uInt16 ImplGetTextStyle() const; - - // pb: #106948# explicit mirroring for calc - inline void EnableMirroring() { mbMirroring = sal_True; } - inline sal_Bool IsMirroring() const { return mbMirroring; } - -protected: - // ISearchableStringList - virtual ::vcl::StringEntryIdentifier CurrentEntry( String& _out_entryText ) const; - virtual ::vcl::StringEntryIdentifier NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const; - virtual void SelectEntry( ::vcl::StringEntryIdentifier _entry ); -}; - -// --------------- -// - ImplListBox - -// --------------- - -class ImplListBox : public Control -{ -private: - ImplListBoxWindow maLBWindow; - ScrollBar* mpHScrollBar; - ScrollBar* mpVScrollBar; - ScrollBarBox* mpScrollBarBox; - sal_Bool mbVScroll : 1, // VScroll an oder aus - mbHScroll : 1, // HScroll an oder aus - mbAutoHScroll : 1; // AutoHScroll an oder aus - Link maScrollHdl; // Weil der vom ImplListBoxWindow selbst benoetigt wird. - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; - -protected: - virtual void GetFocus(); - virtual void StateChanged( StateChangedType nType ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - - long Notify( NotifyEvent& rNEvt ); - - void ImplResizeControls(); - void ImplCheckScrollBars(); - void ImplInitScrollBars(); - - DECL_LINK( ScrollBarHdl, ScrollBar* ); - DECL_LINK( LBWindowScrolled, void* ); - DECL_LINK( MRUChanged, void* ); - -public: - ImplListBox( Window* pParent, WinBits nWinStyle ); - ~ImplListBox(); - - const ImplEntryList* GetEntryList() const { return maLBWindow.GetEntryList(); } - ImplListBoxWindow* GetMainWindow() { return &maLBWindow; } - - virtual void Resize(); - virtual const Wallpaper& GetDisplayBackground() const; - virtual Window* GetPreferredKeyInputWindow(); - - sal_uInt16 InsertEntry( sal_uInt16 nPos, const XubString& rStr ); - sal_uInt16 InsertEntry( sal_uInt16 nPos, const Image& rImage ); - sal_uInt16 InsertEntry( sal_uInt16 nPos, const XubString& rStr, const Image& rImage ); - void RemoveEntry( sal_uInt16 nPos ); - void SetEntryData( sal_uInt16 nPos, void* pNewData ) { maLBWindow.GetEntryList()->SetEntryData( nPos, pNewData ); } - void Clear(); - - void SetEntryFlags( sal_uInt16 nPos, long nFlags ); - long GetEntryFlags( sal_uInt16 nPos ) const; - - void SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ); - void SetNoSelection(); - void ResetCurrentPos() { maLBWindow.ResetCurrentPos(); } - sal_uInt16 GetCurrentPos() const { return maLBWindow.GetCurrentPos(); } - - sal_Bool ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); } - sal_Bool HandleWheelAsCursorTravel( const CommandEvent& rCEvt ); - - void SetSeparatorPos( sal_uInt16 n ) { maLBWindow.SetSeparatorPos( n ); } - sal_uInt16 GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); } - - void SetTopEntry( sal_uInt16 nTop ) { maLBWindow.SetTopEntry( nTop ); } - sal_uInt16 GetTopEntry() const { return maLBWindow.GetTopEntry(); } - void ShowProminentEntry( sal_uInt16 nPos ) { maLBWindow.ShowProminentEntry( nPos ); } - using Window::IsVisible; - sal_Bool IsVisible( sal_uInt16 nEntry ) const { return maLBWindow.IsVisible( nEntry ); } - - void SetProminentEntryType( ProminentEntry eType ) { maLBWindow.SetProminentEntryType( eType ); } - ProminentEntry GetProminentEntryType() const { return maLBWindow.GetProminentEntryType(); } - - long GetLeftIndent() const { return maLBWindow.GetLeftIndent(); } - void SetLeftIndent( sal_uInt16 n ) { maLBWindow.SetLeftIndent( n ); } - void ScrollHorz( short nDiff ) { maLBWindow.ScrollHorz( nDiff ); } - - void SetTravelSelect( sal_Bool bTravelSelect ) { maLBWindow.SetTravelSelect( bTravelSelect ); } - sal_Bool IsTravelSelect() const { return maLBWindow.IsTravelSelect(); } - sal_Bool IsTrackingSelect() const { return maLBWindow.IsTrackingSelect(); } - - void EnableMultiSelection( sal_Bool bMulti, sal_Bool bStackMode ) { maLBWindow.EnableMultiSelection( bMulti, bStackMode ); } - sal_Bool IsMultiSelectionEnabled() const { return maLBWindow.IsMultiSelectionEnabled(); } - - void SetMultiSelectionSimpleMode( sal_Bool bSimple ) { maLBWindow.SetMultiSelectionSimpleMode( bSimple ); } - sal_Bool IsMultiSelectionSimpleMode() const { return maLBWindow.IsMultiSelectionSimpleMode(); } - - void SetReadOnly( sal_Bool b ) { maLBWindow.SetReadOnly( b ); } - sal_Bool IsReadOnly() const { return maLBWindow.IsReadOnly(); } - - - Size CalcSize( sal_uInt16 nMaxLines ) const { return maLBWindow.CalcSize( nMaxLines ); } - long GetEntryHeight() const { return maLBWindow.GetEntryHeight(); } - long GetMaxEntryWidth() const { return maLBWindow.GetMaxEntryWidth(); } - - void SetScrollHdl( const Link& rLink ) { maScrollHdl = rLink; } - const Link& GetScrollHdl() const { return maScrollHdl; } - void SetSelectHdl( const Link& rLink ) { maLBWindow.SetSelectHdl( rLink ); } - const Link& GetSelectHdl() const { return maLBWindow.GetSelectHdl(); } - void SetCancelHdl( const Link& rLink ) { maLBWindow.SetCancelHdl( rLink ); } - const Link& GetCancelHdl() const { return maLBWindow.GetCancelHdl(); } - void SetDoubleClickHdl( const Link& rLink ) { maLBWindow.SetDoubleClickHdl( rLink ); } - const Link& GetDoubleClickHdl() const { return maLBWindow.GetDoubleClickHdl(); } - void SetUserDrawHdl( const Link& rLink ) { maLBWindow.SetUserDrawHdl( rLink ); } - const Link& GetUserDrawHdl() const { return maLBWindow.GetUserDrawHdl(); } - - void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); } - void SetCallSelectionChangedHdl( sal_Bool bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); } - sal_Bool IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); } - sal_uInt16 GetSelectModifier() const { return maLBWindow.GetSelectModifier(); } - - void SetMRUEntries( const XubString& rEntries, xub_Unicode cSep ); - XubString GetMRUEntries( xub_Unicode cSep ) const; - void SetMaxMRUCount( sal_uInt16 n ) { maLBWindow.GetEntryList()->SetMaxMRUCount( n ); } - sal_uInt16 GetMaxMRUCount() const { return maLBWindow.GetEntryList()->GetMaxMRUCount(); } - sal_uInt16 GetDisplayLineCount() const - { return maLBWindow.GetDisplayLineCount(); } - - // pb: #106948# explicit mirroring for calc - inline void EnableMirroring() { maLBWindow.EnableMirroring(); } - inline void SetDropTraget(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& i_xDNDListenerContainer){ mxDNDListenerContainer= i_xDNDListenerContainer; } -}; - -// ----------------------------- -// - ImplListBoxFloatingWindow - -// ----------------------------- - -class ImplListBoxFloatingWindow : public FloatingWindow -{ -private: - ImplListBox* mpImplLB; - Size maPrefSz; - sal_uInt16 mnDDLineCount; - sal_uInt16 mnPopupModeStartSaveSelection; - sal_Bool mbAutoWidth; - -protected: - long PreNotify( NotifyEvent& rNEvt ); - -public: - ImplListBoxFloatingWindow( Window* pParent ); - - void SetImplListBox( ImplListBox* pLB ) { mpImplLB = pLB; } - - void SetPrefSize( const Size& rSz ) { maPrefSz = rSz; } - const Size& GetPrefSize() const { return maPrefSz; } - - void SetAutoWidth( sal_Bool b ) { mbAutoWidth = b; } - sal_Bool IsAutoWidth() const { return mbAutoWidth; } - - Size CalcFloatSize(); - void StartFloat( sal_Bool bStartTracking ); - - virtual void SetPosSizePixel( long nX, long nY, - long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); - void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) - { FloatingWindow::SetPosSizePixel( rNewPos, rNewSize ); } - - void SetDropDownLineCount( sal_uInt16 n ) { mnDDLineCount = n; } - sal_uInt16 GetDropDownLineCount() const { return mnDDLineCount; } - - sal_uInt16 GetPopupModeStartSaveSelection() const { return mnPopupModeStartSaveSelection; } - - virtual void Resize(); -}; - -// ----------- -// - ImplWin - -// ----------- - -class ImplWin : public Control -{ -private: - - sal_uInt16 mnItemPos; // wegen UserDraw muss ich wissen, welches Item ich darstelle. - XubString maString; - Image maImage; - - Rectangle maFocusRect; - Size maUserItemSize; - - Link maMBDownHdl; - Link maUserDrawHdl; - - sal_Bool mbUserDrawEnabled : 1, - mbInUserDraw : 1; - - - void ImplDraw( bool bLayout = false ); -protected: - virtual void FillLayoutData() const; -public: - - ImplWin( Window* pParent, WinBits nWinStyle = 0 ); - ~ImplWin() {}; - - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - virtual void Paint( const Rectangle& rRect ); - virtual void Resize(); - virtual void GetFocus(); - virtual void LoseFocus(); - virtual long PreNotify( NotifyEvent& rNEvt ); - - sal_uInt16 GetItemPos() const { return mnItemPos; } - void SetItemPos( sal_uInt16 n ) { mnItemPos = n; } - - const XubString& GetString() const { return maString; } - void SetString( const XubString& rStr ) { maString = rStr; } - - const Image& GetImage() const { return maImage; } - void SetImage( const Image& rImg ) { maImage = rImg; } - - sal_Bool SetModeImage( const Image& rImage ); - const Image& GetModeImage( ) const; - - - virtual void MBDown(); - void SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; } - const Link& GetMBDownHdl() const { return maMBDownHdl; } - - void SetUserDrawHdl( const Link& rLink ) { maUserDrawHdl = rLink; } - const Link& GetUserDrawHdl() const { return maUserDrawHdl; } - - void SetUserItemSize( const Size& rSz ) { maUserItemSize = rSz; } - const Size& GetUserItemSize() const { return maUserItemSize; } - - void EnableUserDraw( sal_Bool bUserDraw ) { mbUserDrawEnabled = bUserDraw; } - sal_Bool IsUserDrawEnabled() const { return mbUserDrawEnabled; } - - void DrawEntry( sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos = sal_False, bool bLayout = false ); -}; - -// ----------- -// - ImplBtn - -// ----------- - -class ImplBtn : public PushButton -{ -private: - sal_Bool mbDown; - - Link maMBDownHdl; - -public: - ImplBtn( Window* pParent, WinBits nWinStyle = 0 ); - ~ImplBtn() {}; - - virtual void MouseButtonDown( const MouseEvent& rMEvt ); - - virtual void MBDown(); - void SetMBDownHdl( const Link& rLink ) { maMBDownHdl = rLink; } - const Link& GetMBDownHdl() const { return maMBDownHdl; } -}; - - -void ImplInitFieldSettings( Window* pWin, sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); -void ImplInitDropDownButton( PushButton* pButton ); - -#endif // _SV_ILSTBOX_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/image.h b/vcl/inc/vcl/image.h deleted file mode 100644 index 86f924993ed3..000000000000 --- a/vcl/inc/vcl/image.h +++ /dev/null @@ -1,185 +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_IMAGE_H -#define _SV_IMAGE_H - -#include <vcl/bitmapex.hxx> - -#include <boost/unordered_map.hpp> - -// ---------------- -// - ImplImageBmp - -// ---------------- - -class ImplImageBmp -{ -public: - - ImplImageBmp(); - ~ImplImageBmp(); - - void Create( long nItemWidth, long nItemHeight, sal_uInt16 nInitSize ); - void Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight,sal_uInt16 nInitSize ); - - void Expand( sal_uInt16 nGrowSize ); - - void Replace( sal_uInt16 nPos, sal_uInt16 nSrcPos ); - void Replace( sal_uInt16 nPos, const ImplImageBmp& rImageBmp, sal_uInt16 nSrcPos ); - void Replace( sal_uInt16 nPos, const BitmapEx& rBmpEx ); - - void ReplaceColors( const Color* pSrcColors, const Color* pDstColors, sal_uIntPtr nColorCount ); - void ColorTransform(); - void Invert(); - - BitmapEx GetBitmapEx( sal_uInt16 nPosCount, sal_uInt16* pPosAry ) const; - - void Draw( sal_uInt16 nPos, OutputDevice* pDev, const Point& rPos, sal_uInt16 nStyle, const Size* pSize = NULL ); - -private: - - BitmapEx maBmpEx; - BitmapEx maDisabledBmpEx; - BitmapEx* mpDisplayBmp; - Size maSize; - sal_uInt8* mpInfoAry; - sal_uInt16 mnSize; - - void ImplUpdateDisplayBmp( OutputDevice* pOutDev ); - void ImplUpdateDisabledBmpEx( int nPos ); - -private: // prevent assignment and copy construction - ImplImageBmp( const ImplImageBmp& ); - void operator=( const ImplImageBmp& ); -}; - -// -------------- -// - ImageTypes - -// -------------- - -enum ImageType { IMAGETYPE_BITMAP, IMAGETYPE_IMAGE }; - -// ----------------- -// - ImplImageList - -// ----------------- - -struct ImageAryData -{ - ::rtl::OUString maName; - // Images identified by either name, or by id - sal_uInt16 mnId; - BitmapEx maBitmapEx; - - ImageAryData(); - ImageAryData( const rtl::OUString &aName, - sal_uInt16 nId, const BitmapEx &aBitmap ); - ImageAryData( const ImageAryData& rData ); - ~ImageAryData(); - - bool IsLoadable() { return maBitmapEx.IsEmpty() && maName.getLength(); } - void Load(const rtl::OUString &rPrefix); - - ImageAryData& operator=( const ImageAryData& rData ); -}; - -// ------------------------------------------------------------------------------ - -struct ImplImageList -{ - typedef std::vector<ImageAryData *> ImageAryDataVec; - typedef boost::unordered_map< rtl::OUString, ImageAryData *, rtl::OUStringHash > - ImageAryDataNameHash; - - ImageAryDataVec maImages; - ImageAryDataNameHash maNameHash; - rtl::OUString maPrefix; - Size maImageSize; - sal_uIntPtr mnRefCount; - - ImplImageList(); - ImplImageList( const ImplImageList &aSrc ); - ~ImplImageList(); - - void AddImage( const ::rtl::OUString &aName, - sal_uInt16 nId, const BitmapEx &aBitmapEx ); - void RemoveImage( sal_uInt16 nPos ); - sal_uInt16 GetImageCount() const; -}; - -// -------------------- -// - ImplImageRefData - -// -------------------- - -struct ImplImageRefData -{ - ImplImageList* mpImplData; - sal_uInt16 mnIndex; - - ImplImageRefData() {} // Um Warning zu umgehen - ~ImplImageRefData(); - - sal_Bool IsEqual( const ImplImageRefData& rData ); -}; - -// ---------------- -// - ImpImageData - -// ---------------- - -struct ImplImageData -{ - ImplImageBmp* mpImageBitmap; - BitmapEx maBmpEx; - - ImplImageData( const BitmapEx& rBmpEx ); - ~ImplImageData(); - - sal_Bool IsEqual( const ImplImageData& rData ); -}; - -// ------------- -// - ImplImage - -// ------------- - -struct ImplImage -{ - sal_uIntPtr mnRefCount; - // TODO: use inheritance to get rid of meType+mpData - void* mpData; - ImageType meType; - - ImplImage(); - ~ImplImage(); - -private: // prevent assignment and copy construction - ImplImage( const ImplImage&); - void operator=( const ImplImage&); -}; - -#endif // _SV_IMAGE_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/impbmp.hxx b/vcl/inc/vcl/impbmp.hxx deleted file mode 100644 index c77e906bd8ae..000000000000 --- a/vcl/inc/vcl/impbmp.hxx +++ /dev/null @@ -1,111 +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_IMPBMP_HXX -#define _SV_IMPBMP_HXX - -#include <tools/gen.hxx> -#include <vcl/sv.h> - -// --------------- -// - ImpBitmap - -// --------------- - -struct BitmapBuffer; -class SalBitmap; -class BitmapPalette; -class SalGraphics; -class ImplServerBitmap; -class Bitmap; -class OutputDevice; -class Color; -class AlphaMask; - -class ImpBitmap -{ -private: - - sal_uLong mnRefCount; - sal_uLong mnChecksum; - SalBitmap* mpSalBitmap; - Size maSourceSize; - -public: - - ImpBitmap(); - ~ImpBitmap(); - -#if _SOLAR__PRIVATE - -public: - - void ImplSetSalBitmap( SalBitmap* pSalBitmap ); - SalBitmap* ImplGetSalBitmap() const { return mpSalBitmap; } - -public: - - sal_Bool ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ); - sal_Bool ImplCreate( const ImpBitmap& rImpBitmap ); - sal_Bool ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics ); - sal_Bool ImplCreate( const ImpBitmap& rImpBitmap, sal_uInt16 nNewBitCount ); - - void ImplDestroy(); - - Size ImplGetSize() const; - Size ImplGetSourceSize() const; - void ImplSetSourceSize( const Size&); - sal_uInt16 ImplGetBitCount() const; - - BitmapBuffer* ImplAcquireBuffer( sal_Bool bReadOnly ); - void ImplReleaseBuffer( BitmapBuffer* pBuffer, sal_Bool bReadOnly ); - -public: - - sal_uLong ImplGetRefCount() const { return mnRefCount; } - void ImplIncRefCount() { mnRefCount++; } - void ImplDecRefCount() { mnRefCount--; } - - inline void ImplSetChecksum( sal_uLong nChecksum ) { mnChecksum = nChecksum; } - inline sal_uLong ImplGetChecksum() const { return mnChecksum; } - -#endif // PRIVATE -}; - -inline Size ImpBitmap::ImplGetSourceSize() const -{ - return maSourceSize; -} - -inline void ImpBitmap::ImplSetSourceSize( const Size& rSize) -{ - maSourceSize = rSize; -} - -#endif // _SV_IMPBMP_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/impfont.hxx b/vcl/inc/vcl/impfont.hxx deleted file mode 100644 index 40355af21518..000000000000 --- a/vcl/inc/vcl/impfont.hxx +++ /dev/null @@ -1,242 +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_IMPFONT_HXX -#define _SV_IMPFONT_HXX - -#include <tools/gen.hxx> -#include <tools/string.hxx> -#include <i18npool/lang.h> -#include <tools/color.hxx> -#include <vcl/dllapi.h> -#include <vcl/vclenum.hxx> -#include <vcl/fntstyle.hxx> - -// ------------ -// - Impl_Font - -// ------------ - -class Impl_Font -{ -public: - Impl_Font(); - Impl_Font( const Impl_Font& ); - - bool operator==( const Impl_Font& ) const; - - FontPitch GetPitch() { if(mePitch==PITCH_DONTKNOW) AskConfig(); return mePitch; } - FontFamily GetFamily() { if(meFamily==FAMILY_DONTKNOW) AskConfig(); return meFamily; } - FontItalic GetItalic() { if(meItalic==ITALIC_DONTKNOW) AskConfig(); return meItalic; } - FontWeight GetWeight() { if(meWeight==WEIGHT_DONTKNOW) AskConfig(); return meWeight; } - FontWidth GetWidthType() { if(meWidthType==WIDTH_DONTKNOW)AskConfig(); return meWidthType; } - -private: - friend class Font; - void AskConfig(); - - int mnRefCount; - String maFamilyName; - String maStyleName; - Size maSize; - Color maColor; // compatibility, now on output device - Color maFillColor; // compatibility, now on output device - rtl_TextEncoding meCharSet; - LanguageType meLanguage; - LanguageType meCJKLanguage; - FontFamily meFamily; - FontPitch mePitch; - TextAlign meAlign; - FontWeight meWeight; - FontWidth meWidthType; - FontItalic meItalic; - FontUnderline meUnderline; - FontUnderline meOverline; - FontStrikeout meStrikeout; - FontRelief meRelief; - FontEmphasisMark meEmphasisMark; - FontType meType; // used by metrics only - short mnOrientation; - FontKerning mnKerning; - sal_Bool mbWordLine:1, - mbOutline:1, - mbConfigLookup:1, // there was a config lookup - mbShadow:1, - mbVertical:1, - mbTransparent:1; // compatibility, now on output device - - friend SvStream& operator>>( SvStream& rIStm, Impl_Font& ); - friend SvStream& operator<<( SvStream& rOStm, const Impl_Font& ); -}; - -// ------------------ -// - ImplFontMetric - -// ------------------ - -class ImplFontMetric -{ - friend class OutputDevice; - -private: - long mnAscent; // Ascent - long mnDescent; // Descent - long mnIntLeading; // Internal Leading - long mnExtLeading; // External Leading - long mnLineHeight; // Ascent+Descent+EmphasisMark - long mnSlant; // Slant - sal_uInt16 mnMiscFlags; // Misc Flags - sal_uInt32 mnRefCount; // Reference Counter - - enum { DEVICE_FLAG=1, SCALABLE_FLAG=2, LATIN_FLAG=4, CJK_FLAG=8, CTL_FLAG=16 }; - -public: - ImplFontMetric(); - void AddReference(); - void DeReference(); - - long GetAscent() const { return mnAscent; } - long GetDescent() const { return mnDescent; } - long GetIntLeading() const { return mnIntLeading; } - long GetExtLeading() const { return mnExtLeading; } - long GetLineHeight() const { return mnLineHeight; } - long GetSlant() const { return mnSlant; } - - bool IsDeviceFont() const { return ((mnMiscFlags & DEVICE_FLAG) != 0); } - bool IsScalable() const { return ((mnMiscFlags & SCALABLE_FLAG) != 0); } - bool SupportsLatin() const { return ((mnMiscFlags & LATIN_FLAG) != 0); } - bool SupportsCJK() const { return ((mnMiscFlags & CJK_FLAG) != 0); } - bool SupportsCTL() const { return ((mnMiscFlags & CTL_FLAG) != 0); } - - bool operator==( const ImplFontMetric& ) const; -}; - -// ------------------ -// - ImplFontOptions - -// ------------------ - -class ImplFontOptions -{ -public: - FontEmbeddedBitmap meEmbeddedBitmap; // whether the embedded bitmaps should be used - FontAntiAlias meAntiAlias; // whether the font should be antialiased - FontAutoHint meAutoHint; // whether the font should be autohinted - FontHinting meHinting; // whether the font should be hinted - FontHintStyle meHintStyle; // type of font hinting to be used -public: - ImplFontOptions() : - meEmbeddedBitmap(EMBEDDEDBITMAP_DONTKNOW), - meAntiAlias(ANTIALIAS_DONTKNOW), - meAutoHint(AUTOHINT_DONTKNOW), - meHinting(HINTING_DONTKNOW), - meHintStyle(HINT_SLIGHT) - {} - virtual ~ImplFontOptions() - {} - FontAutoHint GetUseAutoHint() const - { return meAutoHint; } - FontHintStyle GetHintStyle() const - { return meHintStyle; } - bool DontUseEmbeddedBitmaps() const - { return meEmbeddedBitmap == EMBEDDEDBITMAP_FALSE; } - bool DontUseAntiAlias() const - { return meAntiAlias == ANTIALIAS_FALSE; } - bool DontUseHinting() const - { return (meHinting == HINTING_FALSE) || (GetHintStyle() == HINT_NONE); } - virtual void *GetPattern(void * /*pFace*/, bool /*bEmbolden*/) const - { return NULL; } -}; - -// ------------------- -// - ImplFontCharMap - -// ------------------- - -class CmapResult; - -class VCL_PLUGIN_PUBLIC ImplFontCharMap -{ -public: - explicit ImplFontCharMap( const CmapResult& ); - virtual ~ImplFontCharMap(); - - static ImplFontCharMap* GetDefaultMap( bool bSymbols=false); - - bool IsDefaultMap() const; - bool HasChar( sal_uInt32 ) const; - int CountCharsInRange( sal_uInt32 cMin, sal_uInt32 cMax ) const; - int GetCharCount() const; - - sal_uInt32 GetFirstChar() const; - sal_uInt32 GetLastChar() const; - - sal_uInt32 GetNextChar( sal_uInt32 ) const; - sal_uInt32 GetPrevChar( sal_uInt32 ) const; - - int GetIndexFromChar( sal_uInt32 ) const; - sal_uInt32 GetCharFromIndex( int ) const; - - void AddReference() const; - void DeReference() const; - - int GetGlyphIndex( sal_uInt32 ) const; - -private: - int ImplFindRangeIndex( sal_uInt32 ) const; - - // prevent assignment and copy construction - explicit ImplFontCharMap( const ImplFontCharMap& ); - void operator=( const ImplFontCharMap& ); - -private: - const sal_uInt32* mpRangeCodes; // pairs of StartCode/(EndCode+1) - const int* mpStartGlyphs; // range-specific mapper to glyphs - const sal_uInt16* mpGlyphIds; // individual glyphid mappings - int mnRangeCount; - int mnCharCount; // covered codepoints - mutable int mnRefCount; -}; - -// CmapResult is a normalized version of the many CMAP formats -class VCL_PLUGIN_PUBLIC CmapResult -{ -public: - explicit CmapResult( bool bSymbolic = false, - const sal_uInt32* pRangeCodes = NULL, int nRangeCount = 0, - const int* pStartGlyphs = 0, const sal_uInt16* pGlyphIds = NULL ); - - const sal_uInt32* mpRangeCodes; - const int* mpStartGlyphs; - const sal_uInt16* mpGlyphIds; - int mnRangeCount; - bool mbSymbolic; - bool mbRecoded; -}; - -bool ParseCMAP( const unsigned char* pRawData, int nRawLength, CmapResult& ); - -#endif // _SV_IMPFONT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/impgraph.hxx b/vcl/inc/vcl/impgraph.hxx deleted file mode 100644 index 22c409fb476a..000000000000 --- a/vcl/inc/vcl/impgraph.hxx +++ /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. - * - ************************************************************************/ - -#ifndef _SV_IMPGRAPH_HXX -#define _SV_IMPGRAPH_HXX - -#include <tools/urlobj.hxx> -#include <vcl/bitmap.hxx> -#include <vcl/bitmapex.hxx> -#include <vcl/animate.hxx> -#include <vcl/gdimtf.hxx> -#include <vcl/graph.h> - -// --------------- -// - ImpSwapInfo - -// --------------- - -struct ImpSwapInfo -{ - MapMode maPrefMapMode; - Size maPrefSize; -}; - -// -------------- -// - ImpGraphic - -// -------------- - -class OutputDevice; -class GfxLink; -struct ImpSwapFile; -class GraphicConversionParameters; - -class ImpGraphic -{ - friend class Graphic; - -private: - - GDIMetaFile maMetaFile; - BitmapEx maEx; - ImpSwapInfo maSwapInfo; - Animation* mpAnimation; - GraphicReader* mpContext; - ImpSwapFile* mpSwapFile; - GfxLink* mpGfxLink; - GraphicType meType; - String maDocFileURLStr; - sal_uLong mnDocFilePos; - mutable sal_uLong mnSizeBytes; - sal_uLong mnRefCount; - sal_Bool mbSwapOut; - sal_Bool mbSwapUnderway; - -private: - - ImpGraphic(); - ImpGraphic( const ImpGraphic& rImpGraphic ); - ImpGraphic( const Bitmap& rBmp ); - ImpGraphic( const BitmapEx& rBmpEx ); - ImpGraphic( const Animation& rAnimation ); - ImpGraphic( const GDIMetaFile& rMtf ); - virtual ~ImpGraphic(); - - ImpGraphic& operator=( const ImpGraphic& rImpGraphic ); - sal_Bool operator==( const ImpGraphic& rImpGraphic ) const; - sal_Bool operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); } - - void ImplClearGraphics( sal_Bool bCreateSwapInfo ); - void ImplClear(); - - GraphicType ImplGetType() const; - void ImplSetDefaultType(); - sal_Bool ImplIsSupportedGraphic() const; - - sal_Bool ImplIsTransparent() const; - sal_Bool ImplIsAlpha() const; - sal_Bool ImplIsAnimated() const; - - Bitmap ImplGetBitmap(const GraphicConversionParameters& rParameters) const; - BitmapEx ImplGetBitmapEx(const GraphicConversionParameters& rParameters) const; - Animation ImplGetAnimation() const; - const GDIMetaFile& ImplGetGDIMetaFile() const; - - Size ImplGetPrefSize() const; - void ImplSetPrefSize( const Size& rPrefSize ); - - MapMode ImplGetPrefMapMode() const; - void ImplSetPrefMapMode( const MapMode& rPrefMapMode ); - - sal_uLong ImplGetSizeBytes() const; - - void ImplDraw( OutputDevice* pOutDev, - const Point& rDestPt ) const; - void ImplDraw( OutputDevice* pOutDev, - const Point& rDestPt, - const Size& rDestSize ) const; - - void ImplStartAnimation( OutputDevice* pOutDev, - const Point& rDestPt, - long nExtraData = 0, - OutputDevice* pFirstFrameOutDev = NULL ); - void ImplStartAnimation( OutputDevice* pOutDev, - const Point& rDestPt, - const Size& rDestSize, - long nExtraData = 0, - OutputDevice* pFirstFrameOutDev = NULL ); - void ImplStopAnimation( OutputDevice* pOutputDevice = NULL, - long nExtraData = 0 ); - - void ImplSetAnimationNotifyHdl( const Link& rLink ); - Link ImplGetAnimationNotifyHdl() const; - - sal_uLong ImplGetAnimationLoopCount() const; - void ImplResetAnimationLoopCount(); - - List* ImplGetAnimationInfoList() const; - -private: - - GraphicReader* ImplGetContext(); - void ImplSetContext( GraphicReader* pReader ); - -private: - - void ImplSetDocFileName( const String& rName, sal_uLong nFilePos ); - const String& ImplGetDocFileName() const; - sal_uLong ImplGetDocFilePos() const; - - sal_Bool ImplReadEmbedded( SvStream& rIStream, sal_Bool bSwap = sal_False ); - sal_Bool ImplWriteEmbedded( SvStream& rOStream ); - - sal_Bool ImplSwapIn(); - sal_Bool ImplSwapIn( SvStream* pIStm ); - - sal_Bool ImplSwapOut(); - sal_Bool ImplSwapOut( SvStream* pOStm ); - - sal_Bool ImplIsSwapOut() const; - - void ImplSetLink( const GfxLink& ); - GfxLink ImplGetLink(); - sal_Bool ImplIsLink() const; - - sal_uLong ImplGetChecksum() const; - - sal_Bool ImplExportNative( SvStream& rOStm ) const; - - friend SvStream& operator<<( SvStream& rOStm, const ImpGraphic& rImpGraphic ); - friend SvStream& operator>>( SvStream& rIStm, ImpGraphic& rImpGraphic ); -}; - -#endif // _SV_IMPGRAPH_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/impimagetree.hxx b/vcl/inc/vcl/impimagetree.hxx deleted file mode 100644 index 41c4f565ef22..000000000000 --- a/vcl/inc/vcl/impimagetree.hxx +++ /dev/null @@ -1,107 +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 INCLUDED_VCL_IMPIMAGETREE_HXX -#define INCLUDED_VCL_IMPIMAGETREE_HXX - -#include "sal/config.h" - -#include <list> -#include <utility> -#include <vector> - -#include <boost/unordered_map.hpp> - -#include "boost/noncopyable.hpp" -#include "com/sun/star/uno/Reference.hxx" -#include "rtl/ustring.hxx" -#include "salhelper/singletonref.hxx" - -namespace com { namespace sun { namespace star { namespace container { - class XNameAccess; -} } } } -class BitmapEx; - -class ImplImageTree: private boost::noncopyable { -public: - ImplImageTree(); - - ~ImplImageTree(); - - // check whether the icon style is installed - bool checkStyle(rtl::OUString const & style); - - bool loadImage( - rtl::OUString const & name, rtl::OUString const & style, - BitmapEx & bitmap, bool localized = false, bool loadMissing = false ); - - bool loadDefaultImage( - rtl::OUString const & style, - BitmapEx& bitmap); - - void shutDown(); - // a crude form of life cycle control (called from DeInitVCL; otherwise, - // if the ImplImageTree singleton were destroyed during exit that would - // be too late for the destructors of the bitmaps in m_iconCache) - -private: - bool doLoadImage( - rtl::OUString const & name, rtl::OUString const & style, - BitmapEx & bitmap, bool localized); - - typedef std::list< - std::pair< - rtl::OUString, - com::sun::star::uno::Reference< - com::sun::star::container::XNameAccess > > > Zips; - - typedef boost::unordered_map< - rtl::OUString, bool, rtl::OUStringHash > CheckStyleCache; - typedef boost::unordered_map< - rtl::OUString, std::pair< bool, BitmapEx >, rtl::OUStringHash > IconCache; - - rtl::OUString m_style; - Zips m_zips; - CheckStyleCache m_checkStyleCache; - IconCache m_iconCache; - - void setStyle(rtl::OUString const & style ); - - void resetZips(); - - bool checkStyleCacheLookup( rtl::OUString const & style, bool &exists ); - bool iconCacheLookup( rtl::OUString const & name, bool localized, BitmapEx & bitmap ); - - bool find(std::vector< rtl::OUString > const & paths, BitmapEx & bitmap ); -}; - -typedef salhelper::SingletonRef< ImplImageTree > ImplImageTreeSingletonRef; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/impoct.hxx b/vcl/inc/vcl/impoct.hxx deleted file mode 100644 index daf6a275ada1..000000000000 --- a/vcl/inc/vcl/impoct.hxx +++ /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. - * - ************************************************************************/ - -#ifndef _SV_IMPOCT_HXX -#define _SV_IMPOCT_HXX - -#include <vcl/octree.hxx> - -// ---------------- -// - ImpErrorQuad - -// ---------------- - -class ImpErrorQuad -{ - long nRed; - long nGreen; - long nBlue; - long nReserved; - -public: - - inline ImpErrorQuad() {} - inline ImpErrorQuad( const BitmapColor& rColor ) : - nRed ( (long) rColor.GetRed() << 5L ), - nGreen ( (long) rColor.GetGreen() << 5L ), - nBlue ( (long) rColor.GetBlue() << 5L ) {} - - inline void operator=( const BitmapColor& rColor ); - inline ImpErrorQuad& operator-=( const BitmapColor& rColor ); - - inline void ImplAddColorError1( const ImpErrorQuad& rErrQuad ); - inline void ImplAddColorError3( const ImpErrorQuad& rErrQuad ); - inline void ImplAddColorError5( const ImpErrorQuad& rErrQuad ); - inline void ImplAddColorError7( const ImpErrorQuad& rErrQuad ); - - inline BitmapColor ImplGetColor(); -}; - -// ------------------------------------------------------------------------ - -inline void ImpErrorQuad::operator=( const BitmapColor& rColor ) -{ - nRed = (long) rColor.GetRed() << 5L; - nGreen = (long) rColor.GetGreen() << 5L; - nBlue = (long) rColor.GetBlue() << 5L; -} - -// ------------------------------------------------------------------------ - -inline ImpErrorQuad& ImpErrorQuad::operator-=( const BitmapColor& rColor ) -{ - nRed -= ( (long) rColor.GetRed() << 5L ); - nGreen -= ( (long) rColor.GetGreen() << 5L ); - nBlue -= ( (long) rColor.GetBlue() << 5L ); - - return *this; -} - -// ------------------------------------------------------------------------ - -inline void ImpErrorQuad::ImplAddColorError1( const ImpErrorQuad& rErrQuad ) -{ - nRed += ( rErrQuad.nRed >> 4L ); - nGreen += ( rErrQuad.nGreen >> 4L ); - nBlue += ( rErrQuad.nBlue >> 4L ); -} - -// ------------------------------------------------------------------------ - -inline void ImpErrorQuad::ImplAddColorError3( const ImpErrorQuad& rErrQuad ) -{ - nRed += ( rErrQuad.nRed * 3L >> 4L ); - nGreen += ( rErrQuad.nGreen * 3L >> 4L ); - nBlue += ( rErrQuad.nBlue * 3L >> 4L ); -} - -// ------------------------------------------------------------------------ - -inline void ImpErrorQuad::ImplAddColorError5( const ImpErrorQuad& rErrQuad ) -{ - nRed += ( rErrQuad.nRed * 5L >> 4L ); - nGreen += ( rErrQuad.nGreen * 5L >> 4L ); - nBlue += ( rErrQuad.nBlue * 5L >> 4L ); -} - -// ------------------------------------------------------------------------ - -inline void ImpErrorQuad::ImplAddColorError7( const ImpErrorQuad& rErrQuad ) -{ - nRed += ( rErrQuad.nRed * 7L >> 4L ); - nGreen += ( rErrQuad.nGreen * 7L >> 4L ); - nBlue += ( rErrQuad.nBlue *7L >> 4L ); -} - -// ------------------------------------------------------------------------ - -inline BitmapColor ImpErrorQuad::ImplGetColor() -{ - return BitmapColor( (sal_uInt8) ( ( nRed < 0L ? 0L : nRed > 8160L ? 8160L : nRed ) >> 5L ), - (sal_uInt8) ( ( nGreen < 0L ? 0L : nGreen > 8160L ? 8160L : nGreen ) >> 5L ), - (sal_uInt8) ( ( nBlue < 0L ? 0L : nBlue > 8160L ? 8160L : nBlue ) >> 5L ) ); -} - -// ------------- -// - NodeCache - -// ------------- - -class ImpNodeCache -{ - OctreeNode* pActNode; - sal_uLong nNew; - sal_uLong nDelete; - sal_uLong nGet; - sal_uLong nRelease; - -public: - - ImpNodeCache( const sal_uLong nInitSize ); - ~ImpNodeCache(); - - inline OctreeNode* ImplGetFreeNode(); - inline void ImplReleaseNode( OctreeNode* pNode ); -}; - -// ------------------------------------------------------------------------ - -inline OctreeNode* ImpNodeCache::ImplGetFreeNode() -{ - OctreeNode* pNode; - - if ( !pActNode ) - { - pActNode = new NODE; - pActNode->pNextInCache = NULL; - } - - pNode = pActNode; - pActNode = pNode->pNextInCache; - memset( pNode, 0, sizeof( NODE ) ); - - return pNode; -} - -// ------------------------------------------------------------------------ - -inline void ImpNodeCache::ImplReleaseNode( OctreeNode* pNode ) -{ - pNode->pNextInCache = pActNode; - pActNode = pNode; -} - -#endif // _SV_IMPOCT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/jobdata.hxx b/vcl/inc/vcl/jobdata.hxx index 7517b41ef03c..c296abb27e9d 100644 --- a/vcl/inc/vcl/jobdata.hxx +++ b/vcl/inc/vcl/jobdata.hxx @@ -40,7 +40,7 @@ enum type { }; } -struct JobData +struct VCL_DLLPUBLIC JobData { int m_nCopies; int m_nLeftMarginAdjust; diff --git a/vcl/inc/vcl/jobset.h b/vcl/inc/vcl/jobset.h deleted file mode 100644 index b1cbdb9853f9..000000000000 --- a/vcl/inc/vcl/jobset.h +++ /dev/null @@ -1,82 +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_JOBSET_H -#define _SV_JOBSET_H - -#include <tools/string.hxx> -#include <vcl/sv.h> -#include <vcl/prntypes.hxx> -#include <boost/unordered_map.hpp> -#include <rtl/ustring.hxx> - -// ------------------ -// - JobSetup-Types - -// ------------------ - -// see com.sun.star.portal.client.JobSetupSystem.idl: -#define JOBSETUP_SYSTEM_DONTKNOW 0 -#define JOBSETUP_SYSTEM_WINDOWS 1 -#define JOBSETUP_SYSTEM_OS2 2 -#define JOBSETUP_SYSTEM_UNIX 3 -#define JOBSETUP_SYSTEM_MAC 4 -#define JOBSETUP_SYSTEM_JAVA 5 - -// ---------------- -// - ImplJobSetup - -// ---------------- - -struct ImplJobSetup -{ - sal_uInt16 mnRefCount; // RefCount (only independ data) - sal_uInt16 mnSystem; // Sytem - JOBSETUP_SYSTEM_xxxx - String maPrinterName; // Printer-Name - String maDriver; // Driver-Name - Orientation meOrientation; // Orientation - DuplexMode meDuplexMode; // Duplex - sal_uInt16 mnPaperBin; // paper bin / in tray - Paper mePaperFormat; // paper format - long mnPaperWidth; // paper width (100th mm) - long mnPaperHeight; // paper height (100th mm) - sal_uIntPtr mnDriverDataLen; // length of system specific data - sal_uInt8* mpDriverData; // system specific data (will be streamed a byte block) - ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > maValueMap; - - ImplJobSetup(); - ImplJobSetup( const ImplJobSetup& rJobSetup ); - ~ImplJobSetup(); -}; - -// Papierformat wird wenn PAPER_USER im unabhaengigen Teil automatisch aus -// Papierbreite/hoehe berechnet -// Papierbreite/hoehe wird wenn 0 im unabhaengigen Teil automatisch aus -// Papierformat berechnet, wenn dieses ungleich PAPER_USER ist - -#endif // _SV_JOBSET_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/metaact.hxx b/vcl/inc/vcl/metaact.hxx index fd8f3b8e985b..87bc75fab2a0 100644 --- a/vcl/inc/vcl/metaact.hxx +++ b/vcl/inc/vcl/metaact.hxx @@ -43,6 +43,7 @@ #include <vcl/gdimtf.hxx> #include <vcl/gfxlink.hxx> #include <vcl/lineinfo.hxx> +#include <vcl/rendergraphic.hxx> class SvStream; @@ -103,6 +104,7 @@ class SvStream; #define META_LAYOUTMODE_ACTION (149) #define META_TEXTLANGUAGE_ACTION (150) #define META_OVERLINECOLOR_ACTION (151) +#define META_RENDERGRAPHIC_ACTION (152) #define META_COMMENT_ACTION (512) @@ -111,6 +113,11 @@ class SvStream; struct ImplMetaReadData { rtl_TextEncoding meActualCharSet; + + ImplMetaReadData() : + meActualCharSet( RTL_TEXTENCODING_ASCII_US ) + { + } }; // ------------------------------------------------------------------------ @@ -118,6 +125,13 @@ struct ImplMetaReadData struct ImplMetaWriteData { rtl_TextEncoding meActualCharSet; + GDIMetaFileWriteFlags mnWriteFlags; + + ImplMetaWriteData() : + meActualCharSet( RTL_TEXTENCODING_ASCII_US ), + mnWriteFlags( GDIMETAFILE_WRITE_DEFAULT ) + { + } }; // ------------------------------------------------------------------------ @@ -1544,6 +1558,43 @@ public: LanguageType GetTextLanguage() const { return meTextLanguage; } }; +// --------------------------- +// - MetaRenderGraphicAction - +// --------------------------- + +class VCL_DLLPUBLIC MetaRenderGraphicAction : public MetaAction +{ +private: + + ::vcl::RenderGraphic maRenderGraphic; + Point maPoint; + Size maSize; + double mfRotateAngle; + double mfShearAngleX; + double mfShearAngleY; + + virtual sal_Bool Compare( const MetaAction& ) const; + +public: + DECL_META_ACTION( RenderGraphic, META_RENDERGRAPHIC_ACTION ) + + MetaRenderGraphicAction( const Point& rPoint, const Size& rSize, + const vcl::RenderGraphic& rRenderData, + double fRotateAngle = 0.0, + double fShearAngleX = 0.0, + double fShearAngleY = 0.0 ); + + virtual void Move( long nHorzMove, long nVertMove ); + virtual void Scale( double fScaleX, double fScaleY ); + + const ::vcl::RenderGraphic& GetRenderGraphic() const { return maRenderGraphic; } + const Point& GetPoint() const { return maPoint; } + const Size& GetSize() const { return maSize; } + double GetRotateAngle() const { return mfRotateAngle; } + double GetShearAngleX() const { return mfShearAngleX; } + double GetShearAngleY() const { return mfShearAngleY; } +}; + #endif // _SV_METAACT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/outdata.hxx b/vcl/inc/vcl/outdata.hxx deleted file mode 100644 index 2f4a9b5ed7aa..000000000000 --- a/vcl/inc/vcl/outdata.hxx +++ /dev/null @@ -1,52 +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_OUTDATA_HXX -#define _SV_OUTDATA_HXX - -#include <vcl/sv.h> -#include <tools/color.hxx> -#include <vcl/salgtype.hxx> - -// ----------------- -// - Hilfemethoden - -// ----------------- - -inline SalColor ImplColorToSal( Color aColor ) -{ - return MAKE_SALCOLOR( aColor.GetRed(), aColor.GetGreen(), aColor.GetBlue() ); -} - -inline int ImplIsColorTransparent( Color aColor ) -{ - return aColor.GetTransparency(); -} - -#endif // _SV_OUTDATA_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/outdev.h b/vcl/inc/vcl/outdev.h deleted file mode 100644 index fc6bab815c48..000000000000 --- a/vcl/inc/vcl/outdev.h +++ /dev/null @@ -1,267 +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_OUTDEV_H -#define _SV_OUTDEV_H - -#include <tools/solar.h> -#include <vcl/outfont.hxx> - -#include <vector> -#include <list> -#include <set> - -class Size; -class Font; -class VirtualDevice; -class ImplServerGraphics; -class ImplGetDevFontList; -class GetDevSizeList; - -// ----------------------- -// - ImplDevFontListData - -// ----------------------- - -// flags for mnMatchType member -#define IMPL_DEVFONT_SCALABLE ((sal_uIntPtr)0x00000001) -#define IMPL_DEVFONT_SYMBOL ((sal_uIntPtr)0x00000002) -#define IMPL_DEVFONT_NONESYMBOL ((sal_uIntPtr)0x00000004) -#define IMPL_DEVFONT_LIGHT ((sal_uIntPtr)0x00000010) -#define IMPL_DEVFONT_BOLD ((sal_uIntPtr)0x00000020) -#define IMPL_DEVFONT_NORMAL ((sal_uIntPtr)0x00000040) -#define IMPL_DEVFONT_NONEITALIC ((sal_uIntPtr)0x00000100) -#define IMPL_DEVFONT_ITALIC ((sal_uIntPtr)0x00000200) - -// TODO: rename ImplDevFontListData to PhysicalFontFamily -class ImplDevFontListData -{ -public: - ImplDevFontListData( const String& rSearchName ); - ~ImplDevFontListData(); - - const String& GetFamilyName() const { return maName; } - const String& GetSearchName() const { return maSearchName; } - const String& GetAliasNames() const { return maMapNames; } - bool IsScalable() const { return mpFirst->IsScalable(); } - int GetMinQuality() const { return mnMinQuality; } - - bool AddFontFace( ImplFontData* ); - void InitMatchData( const utl::FontSubstConfiguration&, - const String& rSearchName ); - ImplFontData* FindBestFontFace( const ImplFontSelectData& rFSD ) const; - - void GetFontHeights( std::set<int>& rHeights ) const; - void UpdateDevFontList( ImplGetDevFontList& ) const; - void UpdateCloneFontList( ImplDevFontList&, - bool bScalable, bool bEmbeddable ) const; - -private: -friend class ImplDevFontList; // TODO: remove soon - ImplFontData* mpFirst; // linked list of physical font faces - String maName; // Fontname (original font family name) - String maSearchName; // normalized font family name - String maMapNames; // fontname aliases - sal_uIntPtr mnTypeFaces; // Typeface Flags - sal_uIntPtr mnMatchType; // MATCH - Type - String maMatchFamilyName; // MATCH - FamilyName - FontWeight meMatchWeight; // MATCH - Weight - FontWidth meMatchWidth; // MATCH - Width - FontFamily meFamily; - FontPitch mePitch; - int mnMinQuality; // quality of the worst font face -}; - - -// ---------------------- -// - ImplGetDevFontList - -// ---------------------- - -// an ImplGetDevFontList is created by an ImplDevFontList -// it becomes invalid when original ImplDevFontList is modified -class ImplGetDevFontList -{ -private: - std::vector<ImplFontData*> maDevFontVector; - -public: - ImplGetDevFontList() { maDevFontVector.reserve(1024); } - void Add( ImplFontData* pFace ) { maDevFontVector.push_back( pFace ); } - ImplFontData* Get( int nIndex ) const { return maDevFontVector[ nIndex ]; } - int Count() const { return maDevFontVector.size(); } -}; - -// ---------------------- -// - ImplGetDevSizeList - -// ---------------------- - -class ImplGetDevSizeList -{ -private: - String maFontName; - std::vector<int> maSizeList; - -public: - ImplGetDevSizeList( const String& rFontName ) - : maFontName( rFontName ) { maSizeList.reserve( 32 ); } - void Add( int nHeight ) { maSizeList.push_back( nHeight ); } - int Count() const { return maSizeList.size(); } - int Get( int nIndex ) const { return maSizeList[ nIndex ]; } - const String& GetFontName() const { return maFontName; } -}; - -// ------------------------ -// - ImplFontSubstitution - -// ------------------------ -// nowadays these substitutions are needed for backward compatibility and tight platform integration: -// - substitutions from configuration entries (Tools->Options->FontReplacement and/or fontconfig) -// - device specific substitutions (e.g. for PS printer builtin fonts) -// - substitutions for missing fonts defined by configuration entries (generic and/or platform dependent fallbacks) -// - substitutions for missing fonts defined by multi-token fontnames (e.g. fontname="SpecialFont;FallbackA;FallbackB") -// - substitutions for incomplete fonts (implicit, generic, EUDC and/or platform dependent fallbacks) -// - substitutions for missing symbol fonts by translating code points into other symbol fonts - -class ImplFontSubstitution -{ - // TODO: there is more commonality between the different substitutions -protected: - virtual ~ImplFontSubstitution() {} -}; - -// ImplDirectFontSubstitution is for Tools->Options->FontReplacement and PsPrinter substitutions -// The clss is just a simple port of the unmaintainable manual-linked-list based mechanism -// TODO: get rid of this class when the Tools->Options->FontReplacement tabpage is gone for good - -struct ImplFontSubstEntry -{ - String maName; - String maReplaceName; - String maSearchName; - String maSearchReplaceName; - sal_uInt16 mnFlags; - - ImplFontSubstEntry( const String& rFontName, const String& rSubstFontName, sal_uInt16 nSubstFlags ); -}; - -class ImplDirectFontSubstitution -: public ImplFontSubstitution -{ -private: - typedef std::list<ImplFontSubstEntry> FontSubstList; - FontSubstList maFontSubstList; -public: - void AddFontSubstitute( const String& rFontName, const String& rSubstName, sal_uInt16 nFlags ); - void RemoveFontSubstitute( int nIndex ); - bool GetFontSubstitute( int nIndex, String& rFontName, String& rSubstName, sal_uInt16& rFlags ) const; - int GetFontSubstituteCount() const { return maFontSubstList.size(); }; - bool Empty() const { return maFontSubstList.empty(); } - void Clear() { maFontSubstList.clear(); } - - bool FindFontSubstitute( String& rSubstName, const String& rFontName, sal_uInt16 nFlags ) const; -}; - -// PreMatchFontSubstitution -// abstracts the concept of a configured font substitution -// before the availability of the originally selected font has been checked -class ImplPreMatchFontSubstitution -: public ImplFontSubstitution -{ -public: - virtual bool FindFontSubstitute( ImplFontSelectData& ) const = 0; -}; - -// ImplGlyphFallbackFontSubstitution -// abstracts the concept of finding the best font to support an incomplete font -class ImplGlyphFallbackFontSubstitution -: public ImplFontSubstitution -{ -public: - virtual bool FindFontSubstitute( ImplFontSelectData&, rtl::OUString& rMissingCodes ) const = 0; -}; - -// ----------------- -// - ImplFontCache - -// ----------------- -// TODO: closely couple with ImplDevFontList - -class ImplFontCache -{ -private: - ImplFontEntry* mpFirstEntry; - int mnRef0Count; // number of unreferenced ImplFontEntries - bool mbPrinter; - - // cache of recently used font instances - struct IFSD_Equal { bool operator()( const ImplFontSelectData&, const ImplFontSelectData& ) const; }; - struct IFSD_Hash { size_t operator()( const ImplFontSelectData& ) const; }; - typedef ::boost::unordered_map<ImplFontSelectData,ImplFontEntry*,IFSD_Hash,IFSD_Equal > FontInstanceList; - FontInstanceList maFontInstanceList; - - // cache of recently requested font names vs. selected font names - typedef ::boost::unordered_map<String,String,FontNameHash> FontNameList; - FontNameList maFontNameList; - -public: - ImplFontCache( bool bPrinter ); - ~ImplFontCache(); - - ImplFontEntry* GetFontEntry( ImplDevFontList*, - const Font&, const Size& rPixelSize, float fExactHeight, - ImplDirectFontSubstitution* pDevSpecific ); - ImplFontEntry* GetFontEntry( ImplDevFontList*, - ImplFontSelectData&, ImplDirectFontSubstitution* pDevSpecific ); - ImplFontEntry* GetGlyphFallbackFont( ImplDevFontList*, ImplFontSelectData&, - int nFallbackLevel, rtl::OUString& rMissingCodes ); - void Release( ImplFontEntry* ); - void Invalidate(); -}; - -// ------------------ -// - ImplOutDevData - -// ------------------ - -namespace vcl { struct ControlLayoutData; } -// #i75163# -namespace basegfx { class B2DHomMatrix; } - -struct ImplOutDevData -{ - VirtualDevice* mpRotateDev; - vcl::ControlLayoutData* mpRecordLayout; - Rectangle maRecordRect; - ImplDirectFontSubstitution maDevFontSubst; - - // #i75163# - basegfx::B2DHomMatrix* mpViewTransform; - basegfx::B2DHomMatrix* mpInverseViewTransform; -}; - -void ImplFreeOutDevFontData(); - -#endif // _SV_OUTDEV_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index e6aaec2c9971..b0d694c5e75e 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -110,6 +110,7 @@ namespace vcl class ExtOutDevData; class ITextLayout; struct FontCapabilities; + class RenderGraphic; } #define OUTDEV_BUFFER_SIZE 128 @@ -813,7 +814,19 @@ public: void DrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ); void DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, double fTransparency); - void DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize, const Gradient& rTransparenceGradient ); + void DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, const Size& rSize, + const Gradient& rTransparenceGradient ); + + /** Added return value to see if EPS could be painted directly. + Theoreticaly, handing over a matrix would be needed to handle + painting rotated EPS files (e.g. contained in Metafiles). This + would then need to be supported for Mac and PS printers, but + that's too much for now, wrote #i107046# for this */ + bool DrawEPS( const Point& rPt, const Size& rSz, + const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL ); + + void DrawRenderGraphic( const Point& rPt, const Size& rSz, + const ::vcl::RenderGraphic& rRenderGraphic ); Color GetPixel( const Point& rPt ) const; Color* GetPixel( const Polygon& rPts ) const; @@ -1123,14 +1136,6 @@ public: */ sal_Bool HasAlpha(); - /** Added return value to see if EPS could be painted directly. - Theoreticaly, handing over a matrix would be needed to handle - painting rotated EPS files (e.g. contained in Metafiles). This - would then need to be supported for Mac and PS printers, but - that's too much for now, wrote #i107046# for this */ - bool DrawEPS( const Point& rPt, const Size& rSz, - const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL ); - /// request XCanvas render interface for this OutputDevice ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas > GetCanvas() const; diff --git a/vcl/inc/vcl/outfont.hxx b/vcl/inc/vcl/outfont.hxx deleted file mode 100644 index faf2b00793f2..000000000000 --- a/vcl/inc/vcl/outfont.hxx +++ /dev/null @@ -1,407 +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_OUTFONT_HXX -#define _SV_OUTFONT_HXX - -#include <tools/string.hxx> -#include <i18npool/lang.h> -#include <tools/gen.hxx> -#include <tools/solar.h> -#include <vcl/dllapi.h> -#include <unotools/fontdefs.hxx> -#include <vcl/vclenum.hxx> - -#include <boost/unordered_map.hpp> - -class ImplDevFontListData; -class ImplGetDevFontList; -class ImplGetDevSizeList; -class ImplFontEntry; -class ImplDirectFontSubstitution; -class ImplPreMatchFontSubstitution; -class ImplGlyphFallbackFontSubstitution; -class ImplFontSelectData; -class Font; -class ConvertChar; -struct FontMatchStatus; -class OutputDevice; - -namespace com { namespace sun { namespace star { namespace lang { struct Locale; }}}} - -// ---------------------- -// - ImplFontAttributes - -// ---------------------- -// device independent font properties - -class ImplFontAttributes -{ -public: // TODO: create matching interface class - const String& GetFamilyName() const { return maName; } - const String& GetStyleName() const { return maStyleName; } - FontWeight GetWeight() const { return meWeight; } - FontItalic GetSlant() const { return meItalic; } - FontFamily GetFamilyType() const { return meFamily; } - FontPitch GetPitch() const { return mePitch; } - FontWidth GetWidthType() const { return meWidthType; } - bool IsSymbolFont() const { return mbSymbolFlag; } - -public: // TODO: hide members behind accessor methods - String maName; // Font Family Name - String maStyleName; // Font Style Name - FontWeight meWeight; // Weight Type - FontItalic meItalic; // Slant Type - FontFamily meFamily; // Family Type - FontPitch mePitch; // Pitch Type - FontWidth meWidthType; // Width Type - bool mbSymbolFlag; -}; - -// ------------------------- -// - ImplDevFontAttributes - -// ------------------------- -// device dependent font properties - -class ImplDevFontAttributes : public ImplFontAttributes -{ -public: // TODO: create matching interface class - const String& GetAliasNames() const { return maMapNames; } - int GetQuality() const { return mnQuality; } - bool IsRotatable() const { return mbOrientation; } - bool IsDeviceFont() const { return mbDevice; } - bool IsEmbeddable() const { return mbEmbeddable; } - bool IsSubsettable() const { return mbSubsettable; } - -public: // TODO: hide members behind accessor methods - String maMapNames; // List of family name aliass separated with ';' - int mnQuality; // Quality (used when similar fonts compete) - bool mbOrientation; // true: physical font can be rotated - bool mbDevice; // true: built in font - bool mbSubsettable; // true: a subset of the font can be created - bool mbEmbeddable; // true: the font can be embedded -}; - -// ---------------- -// - ImplFontData - -// ---------------- -// TODO: rename ImplFontData to PhysicalFontFace -// TODO: no more direct access to members -// TODO: add reference counting -// TODO: get rid of height/width for scalable fonts -// TODO: make cloning cheaper - -// abstract base class for physical font faces -class VCL_PLUGIN_PUBLIC ImplFontData : public ImplDevFontAttributes -{ -public: - // by using an ImplFontData object as a factory for its corresponding - // ImplFontEntry an ImplFontEntry can be extended to cache device and - // font instance specific data - virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const = 0; - - virtual int GetHeight() const { return mnHeight; } - virtual int GetWidth() const { return mnWidth; } - virtual sal_IntPtr GetFontId() const = 0; - int GetFontMagic() const { return mnMagic; } - bool IsScalable() const { return (mnHeight == 0); } - bool CheckMagic( int n ) const { return (n == mnMagic); } - ImplFontData* GetNextFace() const { return mpNext; } - ImplFontData* CreateAlias() const { return Clone(); } - - bool IsBetterMatch( const ImplFontSelectData&, FontMatchStatus& ) const; - StringCompare CompareWithSize( const ImplFontData& ) const; - StringCompare CompareIgnoreSize( const ImplFontData& ) const; - virtual ~ImplFontData() {} - virtual ImplFontData* Clone() const = 0; - -protected: - explicit ImplFontData( const ImplDevFontAttributes&, int nMagic ); - void SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; } - - long mnWidth; // Width (in pixels) - long mnHeight; // Height (in pixels) - -private: -friend class ImplDevFontListData; - const int mnMagic; // poor man's RTTI - ImplFontData* mpNext; -}; - -// ---------------------- -// - ImplFontSelectData - -// ---------------------- - -class ImplFontSelectData : public ImplFontAttributes -{ -public: - ImplFontSelectData( const Font&, const String& rSearchName, - const Size&, float fExactHeight ); - ImplFontSelectData( const ImplFontData&, const Size&, - float fExactHeight, int nOrientation, bool bVertical ); - -public: // TODO: change to private - String maTargetName; // name of the font name token that is chosen - String maSearchName; // name of the font that matches best - int mnWidth; // width of font in pixel units - int mnHeight; // height of font in pixel units - float mfExactHeight; // requested height (in pixels with subpixel details) - int mnOrientation; // text orientation in 3600 system - LanguageType meLanguage; // text language - bool mbVertical; // vertical mode of requested font - bool mbNonAntialiased; // true if antialiasing is disabled - - const ImplFontData* mpFontData; // a matching ImplFontData object - ImplFontEntry* mpFontEntry; // pointer to the resulting FontCache entry -}; - -// ------------------- -// - ImplDevFontList - -// ------------------- -// TODO: merge with ImplFontCache -// TODO: rename to LogicalFontManager - -class VCL_PLUGIN_PUBLIC ImplDevFontList -{ -private: - friend class WinGlyphFallbackSubstititution; - mutable bool mbMatchData; // true if matching attributes are initialized - bool mbMapNames; // true if MapNames are available - - typedef boost::unordered_map<const String, ImplDevFontListData*,FontNameHash> DevFontList; - DevFontList maDevFontList; - - ImplPreMatchFontSubstitution* mpPreMatchHook; // device specific prematch substitution - ImplGlyphFallbackFontSubstitution* mpFallbackHook; // device specific glyh fallback substitution - -public: - explicit ImplDevFontList(); - virtual ~ImplDevFontList(); - - // fill the list with device fonts - void Add( ImplFontData* ); - void Clear(); - int Count() const { return maDevFontList.size(); } - - // find the device font - ImplDevFontListData* FindFontFamily( const String& rFontName ) const; - ImplDevFontListData* ImplFindByFont( ImplFontSelectData&, bool bPrinter, ImplDirectFontSubstitution* ) const; - ImplDevFontListData* ImplFindBySearchName( const String& ) const; - - // suggest fonts for glyph fallback - ImplDevFontListData* GetGlyphFallbackFont( ImplFontSelectData&, - rtl::OUString& rMissingCodes, int nFallbackLevel ) const; - - // prepare platform specific font substitutions - void SetPreMatchHook( ImplPreMatchFontSubstitution* ); - void SetFallbackHook( ImplGlyphFallbackFontSubstitution* ); - - // misc utilities - ImplDevFontList* Clone( bool bScalable, bool bEmbeddable ) const; - ImplGetDevFontList* GetDevFontList() const; - ImplGetDevSizeList* GetDevSizeList( const String& rFontName ) const; - - //used by 2-level font fallback - ImplDevFontListData* ImplFindByLocale( com::sun::star::lang::Locale& ) const; - -protected: - void InitMatchData() const; - bool AreMapNamesAvailable() const { return mbMapNames; } - - ImplDevFontListData* ImplFindByTokenNames( const String& ) const; - ImplDevFontListData* ImplFindByAliasName( const String& rSearchName, const String& rShortName ) const; - ImplDevFontListData* ImplFindBySubstFontAttr( const utl::FontNameAttr& ) const; - ImplDevFontListData* ImplFindByAttributes( sal_uLong nSearchType, FontWeight, FontWidth, - FontFamily, FontItalic, const String& rSearchFamily ) const; - ImplDevFontListData* FindDefaultFont() const; - -private: - void InitGenericGlyphFallback() const; - mutable ImplDevFontListData** mpFallbackList; - mutable int mnFallbackCount; -}; - -// -------------------- -// - ImplKernPairData - -// -------------------- -// TODO: get rid of ImplKernPairData and use outdev.hxx's KerningPair struct -// the problem is that outdev.hxx is too high level for the device layers -// and outdev.hxx's customers depend on KerningPair being defined there - -struct ImplKernPairData -{ - sal_uInt16 mnChar1; - sal_uInt16 mnChar2; - long mnKern; -}; - - -// ----------------------- -// - ImplFontMetricData - -// ----------------------- - -class ImplFontMetricData : public ImplFontAttributes -{ -public: - explicit ImplFontMetricData( const ImplFontSelectData& ); - void ImplInitTextLineSize( const OutputDevice* pDev ); - void ImplInitAboveTextLineSize(); - -public: // TODO: hide members behind accessor methods - // font instance attributes from the font request - long mnWidth; // Reference Width - short mnOrientation; // Rotation in 1/10 degrees - - // font metrics measured for the font instance - long mnAscent; // Ascent - long mnDescent; // Descent - long mnIntLeading; // Internal Leading - long mnExtLeading; // External Leading - int mnSlant; // Slant (Italic/Oblique) - long mnMinKashida; // Minimal width of kashida (Arabic) - - // font attributes queried from the font instance - int meFamilyType; // Font Family Type - bool mbDevice; // Flag for Device Fonts - bool mbScalableFont; - bool mbKernableFont; - - // font metrics that are usually derived from the measurements - long mnUnderlineSize; // Lineheight of Underline - long mnUnderlineOffset; // Offset from Underline to Baseline - long mnBUnderlineSize; // Hoehe von fetter Unterstreichung - long mnBUnderlineOffset; // Offset von fetter Unterstreichung zur Baseline - long mnDUnderlineSize; // Hoehe von doppelter Unterstreichung - long mnDUnderlineOffset1; // Offset von doppelter Unterstreichung zur Baseline - long mnDUnderlineOffset2; // Offset von doppelter Unterstreichung zur Baseline - long mnWUnderlineSize; // Hoehe von WaveLine-Unterstreichung - long mnWUnderlineOffset; // Offset von WaveLine-Unterstreichung zur Baseline, jedoch zentriert zur WaveLine - long mnAboveUnderlineSize; // Hoehe von einfacher Unterstreichung (for Vertical Right) - long mnAboveUnderlineOffset; // Offset von einfacher Unterstreichung zur Baseline (for Vertical Right) - long mnAboveBUnderlineSize; // Hoehe von fetter Unterstreichung (for Vertical Right) - long mnAboveBUnderlineOffset; // Offset von fetter Unterstreichung zur Baseline (for Vertical Right) - long mnAboveDUnderlineSize; // Hoehe von doppelter Unterstreichung (for Vertical Right) - long mnAboveDUnderlineOffset1; // Offset von doppelter Unterstreichung zur Baseline (for Vertical Right) - long mnAboveDUnderlineOffset2; // Offset von doppelter Unterstreichung zur Baseline (for Vertical Right) - long mnAboveWUnderlineSize; // Hoehe von WaveLine-Unterstreichung (for Vertical Right) - long mnAboveWUnderlineOffset; // Offset von WaveLine-Unterstreichung zur Baseline, jedoch zentriert zur WaveLine (for Vertical Right) - long mnStrikeoutSize; // Hoehe von einfacher Durchstreichung - long mnStrikeoutOffset; // Offset von einfacher Durchstreichung zur Baseline - long mnBStrikeoutSize; // Hoehe von fetter Durchstreichung - long mnBStrikeoutOffset; // Offset von fetter Durchstreichung zur Baseline - long mnDStrikeoutSize; // Hoehe von doppelter Durchstreichung - long mnDStrikeoutOffset1; // Offset von doppelter Durchstreichung zur Baseline - long mnDStrikeoutOffset2; // Offset von doppelter Durchstreichung zur Baseline -}; - -// ----------------- -// - ImplFontEntry - -// ------------------ -// TODO: rename ImplFontEntry to LogicalFontInstance -// TODO: allow sharing of metrics for related fonts - -class VCL_PLUGIN_PUBLIC ImplFontEntry -{ -public: - explicit ImplFontEntry( const ImplFontSelectData& ); - virtual ~ImplFontEntry(); - -public: // TODO: make data members private - ImplFontSelectData maFontSelData; // FontSelectionData - ImplFontMetricData maMetric; // Font Metric - const ConvertChar* mpConversion; // used e.g. for StarBats->StarSymbol - long mnLineHeight; - sal_uLong mnRefCount; - sal_uInt16 mnSetFontFlags; // Flags returned by SalGraphics::SetFont() - short mnOwnOrientation; // text angle if lower layers don't rotate text themselves - short mnOrientation; // text angle in 3600 system - bool mbInit; // true if maMetric member is valid - - void AddFallbackForUnicode( sal_UCS4, FontWeight eWeight, const String& rFontName ); - bool GetFallbackForUnicode( sal_UCS4, FontWeight eWeight, String* pFontName ) const; - void IgnoreFallbackForUnicode( sal_UCS4, FontWeight eWeight, const String& rFontName ); - -private: - // cache of Unicode characters and replacement font names - // TODO: a fallback map can be shared with many other ImplFontEntries - // TODO: at least the ones which just differ in orientation, stretching or height - typedef ::std::pair<sal_UCS4,FontWeight> GFBCacheKey; - struct GFBCacheKey_Hash{ size_t operator()( const GFBCacheKey& ) const; }; - typedef ::boost::unordered_map<GFBCacheKey,String,GFBCacheKey_Hash> UnicodeFallbackList; - UnicodeFallbackList* mpUnicodeFallbackList; -}; - - -class ImplTextLineInfo -{ -private: - long mnWidth; - xub_StrLen mnIndex; - xub_StrLen mnLen; - -public: - ImplTextLineInfo( long nWidth, xub_StrLen nIndex, xub_StrLen nLen ) - { - mnWidth = nWidth; - mnIndex = nIndex; - mnLen = nLen; - } - - long GetWidth() const { return mnWidth; } - xub_StrLen GetIndex() const { return mnIndex; } - xub_StrLen GetLen() const { return mnLen; } -}; - -#define MULTITEXTLINEINFO_RESIZE 16 -typedef ImplTextLineInfo* PImplTextLineInfo; - -class ImplMultiTextLineInfo -{ -private: - PImplTextLineInfo* mpLines; - xub_StrLen mnLines; - xub_StrLen mnSize; - -public: - ImplMultiTextLineInfo(); - ~ImplMultiTextLineInfo(); - - void AddLine( ImplTextLineInfo* pLine ); - void Clear(); - - ImplTextLineInfo* GetLine( sal_uInt16 nLine ) const - { return mpLines[nLine]; } - xub_StrLen Count() const { return mnLines; } - -private: - ImplMultiTextLineInfo( const ImplMultiTextLineInfo& ); - ImplMultiTextLineInfo& operator=( const ImplMultiTextLineInfo& ); -}; - -#endif // _SV_OUTFONT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/pdfextoutdevdata.hxx b/vcl/inc/vcl/pdfextoutdevdata.hxx index f4b8039fc9e8..37dadb9a63db 100644 --- a/vcl/inc/vcl/pdfextoutdevdata.hxx +++ b/vcl/inc/vcl/pdfextoutdevdata.hxx @@ -53,8 +53,24 @@ namespace vcl */ struct PDFExtOutDevBookmarkEntry { + /** ID of the link pointing to the bookmark, or -1 if the entry denotes a destination instead of a link. + */ sal_Int32 nLinkId; + + /** ID of the named destination denoted by the bookmark, or -1 if the entry denotes a link instead of a named destination. + */ + sal_Int32 nDestId; + + /** link target name, respectively destination name + */ rtl::OUString aBookmark; + + PDFExtOutDevBookmarkEntry() + :nLinkId( -1 ) + ,nDestId( -1 ) + ,aBookmark() + { + } }; /* @@ -196,6 +212,24 @@ public : -1 if page id does not exist */ sal_Int32 CreateNamedDest( const String& sDestName, const Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::XYZ ); + + /** registers a destination for which a destinatin ID needs to be known immediately, instead of later on setting it via + SetLinkDest. + + This is used in contexts where a destination is referenced by means other than a link. + + Later in the export process, a call to DescribeRegisteredDest must be made, providing the information about + the destination. + + @return + the unique Id of the destination + */ + sal_Int32 RegisterDest(); + + /** provides detailed information about a destination range which previously has been registered using RegisterDest. + */ + void DescribeRegisteredDest( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::XYZ ); + //<---i56629 /** Create a new destination to be used in a link diff --git a/vcl/inc/vcl/pdfwriter.hxx b/vcl/inc/vcl/pdfwriter.hxx index b1f76046678d..9df687de8b05 100644 --- a/vcl/inc/vcl/pdfwriter.hxx +++ b/vcl/inc/vcl/pdfwriter.hxx @@ -940,6 +940,29 @@ The following structure describes the permissions used in PDF security -1 if page id does not exist */ sal_Int32 CreateLink( const Rectangle& rRect, sal_Int32 nPageNr = -1 ); + + /** creates a destination which is not intended to be referred to by a link, but by a public destination Id. + + Form widgets, for instance, might refer to a destination, without ever actually creating a source link to + point to this destination. In such cases, a public destination Id will be assigned to the form widget, + and later on, the concrete destination data for this public Id will be registered using RegisterDestReference. + + @param rRect + target rectangle on page to be displayed if dest is jumped to + + @param nPageNr + number of page the dest is on (as returned by NewPage) + or -1 in which case the current page is used + + @param eType + what dest type to use + + @returns + the internal destination Id. + */ + sal_Int32 RegisterDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr = -1, DestAreaType eType = XYZ ); + + /** Set the destination for a link <p>will change a URL type link to a dest link if necessary</p> diff --git a/vcl/inc/vcl/polyscan.hxx b/vcl/inc/vcl/polyscan.hxx deleted file mode 100644 index da91477f6a67..000000000000 --- a/vcl/inc/vcl/polyscan.hxx +++ /dev/null @@ -1,158 +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_POLYSCAN_HXX -#define _SV_POLYSCAN_HXX - -#include <tools/gen.hxx> - -// ----------------- -// - ScanlinePoint - -// ----------------- - -struct ScanlinePoint -{ - long mnX; - ScanlinePoint* mpNext; - - ScanlinePoint() : mnX( 0L ), mpNext( NULL ) {}; - ScanlinePoint( long nX, ScanlinePoint* pNext ) : mnX( nX ), mpNext( pNext ) {}; - ~ScanlinePoint() {}; - - void Set( long nX, ScanlinePoint* pNext ) { mnX = nX, mpNext = pNext; } -}; - -// ------------------- -// - PolyScanSegment - -// ------------------- - -struct PolyScanSegment -{ - long mnStart; - long mnEnd; - - PolyScanSegment() : mnStart( 0L ), mnEnd( 0L ) {}; - PolyScanSegment( long nStart, long nEnd ) : mnStart( nStart ), mnEnd( nEnd ) {}; - ~PolyScanSegment() {}; -}; - -// ---------------- -// - PolyScanline - -// ---------------- - -struct ScanlinePoint; -class Polygon; -class PolyPolygon; - -class PolyScanline -{ -private: - - ScanlinePoint* mpFirst; - ScanlinePoint* mpLast; - ScanlinePoint* mpAct; - long mnLeft; - long mnRight; - - void ImplDelete(); - -public: - - PolyScanline(); - ~PolyScanline(); - - void Insert( long nX ); - void Set( long nStart, long nEnd ); - void Set( const PolyScanSegment& rSegment ) { Set( rSegment.mnStart, rSegment.mnEnd ); } - - inline sal_Bool GetFirstX( long& rX ); - inline sal_Bool GetNextX( long& rX ); - - sal_Bool GetFirstSegment( PolyScanSegment& rSegment ); - sal_Bool GetNextSegment( PolyScanSegment& rSegment ); -}; - -// ------------------------------------------------------------------------ - -inline sal_Bool PolyScanline::GetFirstX( long& rX ) -{ - mpAct = mpFirst; - return( mpAct ? ( rX = mpAct->mnX, mpAct = mpAct->mpNext, sal_True ) : sal_False ); -} - -// ------------------------------------------------------------------------ - -inline sal_Bool PolyScanline::GetNextX( long& rX ) -{ - return( mpAct ? ( rX = mpAct->mnX, mpAct = mpAct->mpNext, sal_True ) : sal_False ); -} - -// --------------- -// - PolyScanner - -// --------------- - -class PolyScanner -{ -private: - - PolyScanline* mpArray; - long mnLeft; - long mnTop; - long mnRight; - long mnBottom; - - PolyScanner() {}; - -protected: - - void InsertLine( const Point& rStart, const Point& rEnd ); - -public: - - PolyScanner( const Rectangle& rRect ); - PolyScanner( const Polygon& rPoly ); - PolyScanner( const PolyPolygon& rPolyPoly ); - ~PolyScanner(); - - long Left() const { return mnLeft; } - long Top() const { return mnTop; } - long Right() const { return mnRight; } - long Bottom() const { return mnBottom; } - - long Width() const { return( mnRight - mnLeft + 1L ); } - long Height() const { return( mnBottom - mnTop + 1L ); } - - Rectangle GetBoundRect() const { return Rectangle( mnLeft, mnTop, mnRight, mnBottom ); } - - sal_uLong Count() const { return Height(); } - PolyScanline* operator[]( sal_uLong nPos ) const; -}; - -#endif // _SV_POLYSCAN_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/ppdparser.hxx b/vcl/inc/vcl/ppdparser.hxx index 846835e22d3b..d36411714575 100644 --- a/vcl/inc/vcl/ppdparser.hxx +++ b/vcl/inc/vcl/ppdparser.hxx @@ -35,6 +35,8 @@ #include "tools/string.hxx" #include "tools/stream.hxx" +#include "vcl/dllapi.h" + #include "com/sun/star/lang/Locale.hpp" #define PRINTER_PPDDIR "driver" @@ -46,7 +48,7 @@ class PPDTranslator; enum PPDValueType { eInvocation, eQuoted, eSymbol, eString, eNo }; -struct PPDValue +struct VCL_DLLPUBLIC PPDValue { PPDValueType m_eType; String m_aOption; @@ -59,7 +61,7 @@ struct PPDValue * PPDKey - a container for the available options (=values) of a PPD keyword */ -class PPDKey +class VCL_DLLPUBLIC PPDKey { friend class PPDParser; @@ -121,7 +123,7 @@ struct PPDKeyhash class PPDContext; class CUPSManager; -class PPDParser +class VCL_DLLPUBLIC PPDParser { friend class PPDContext; friend class CUPSManager; @@ -293,7 +295,7 @@ public: * contents of a PPDParser. */ -class PPDContext +class VCL_DLLPUBLIC PPDContext { typedef ::boost::unordered_map< const PPDKey*, const PPDValue*, PPDKeyhash > hash_type; hash_type m_aCurrentValues; diff --git a/vcl/inc/vcl/print.h b/vcl/inc/vcl/print.h deleted file mode 100644 index db236f2a0f17..000000000000 --- a/vcl/inc/vcl/print.h +++ /dev/null @@ -1,84 +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_PRINT_H -#define _SV_PRINT_H - -#include "vcl/sv.h" -#include "vcl/dllapi.h" - -#include <vector> -#include <boost/unordered_map.hpp> - -struct SalPrinterQueueInfo; -class QueueInfo; -class JobSetup; - -namespace vcl -{ class PrinterListener; } - -// -------------------- -// - ImplPrnQueueData - -// -------------------- - -struct ImplPrnQueueData -{ - QueueInfo* mpQueueInfo; - SalPrinterQueueInfo* mpSalQueueInfo; -}; - -// -------------------- -// - ImplPrnQueueList - -// -------------------- - -class VCL_PLUGIN_PUBLIC ImplPrnQueueList -{ -public: - boost::unordered_map< rtl::OUString, sal_Int32, rtl::OUStringHash > - m_aNameToIndex; - std::vector< ImplPrnQueueData > m_aQueueInfos; - std::vector< rtl::OUString > m_aPrinterList; - - ImplPrnQueueList() {} - ~ImplPrnQueueList(); - - void Add( SalPrinterQueueInfo* pData ); - ImplPrnQueueData* Get( const rtl::OUString& rPrinter ); -}; - -// -------------- -// - Prototypes - -// -------------- - -void ImplDeletePrnQueueList(); -void SAL_DLLPRIVATE ImplUpdateJobSetupPaper( JobSetup& rJobSetup ); - - -#endif // _SV_PRINT_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/printergfx.hxx b/vcl/inc/vcl/printergfx.hxx deleted file mode 100644 index 8bfd1c69a7d2..000000000000 --- a/vcl/inc/vcl/printergfx.hxx +++ /dev/null @@ -1,444 +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 _PSPRINT_PRINTERGFX_HXX_ -#define _PSPRINT_PRINTERGFX_HXX_ - -#include "vcl/helper.hxx" -#include "vcl/sallayout.hxx" -#include "osl/file.hxx" -#include "tools/gen.hxx" - -#include <list> -#include <boost/unordered_map.hpp> - -namespace psp { - -// forwards -class JobData; - -/* - * lightweight container to handle RGB values - */ - -class PrinterColor -{ -public: - - enum ColorSpace { eInvalid, eRGB }; - -private: - - sal_uInt8 mnRed; - sal_uInt8 mnGreen; - sal_uInt8 mnBlue; - ColorSpace meColorspace; - -public: - - PrinterColor () : - meColorspace(eInvalid) - {} - PrinterColor (sal_uInt16 nRed, sal_uInt16 nGreen, - sal_uInt16 nBlue) : - mnRed (nRed), - mnGreen (nGreen), - mnBlue (nBlue), - meColorspace (eRGB) - {} - PrinterColor (sal_uInt32 nRGB) : - mnRed ((nRGB & 0x00ff0000) >> 16), - mnGreen ((nRGB & 0x0000ff00) >> 8), - mnBlue ((nRGB & 0x000000ff) ), - meColorspace (eRGB) - {} - ~PrinterColor () - {} - - sal_Bool Is () const - { return meColorspace != eInvalid; } - - ColorSpace GetColorSpace () const - { return meColorspace; } - sal_uInt16 GetRed () const - { return mnRed; } - sal_uInt16 GetGreen () const - { return mnGreen; } - sal_uInt16 GetBlue () const - { return mnBlue; } - sal_Bool operator== (const PrinterColor& aColor) const - { - return aColor.Is() && this->Is() - && mnRed == aColor.mnRed - && mnGreen == aColor.mnGreen - && mnBlue == aColor.mnBlue; - } - sal_Bool operator!= (const PrinterColor& aColor) const - { return ! (aColor==*this); } - PrinterColor& operator= (const PrinterColor& aColor) - { - meColorspace = aColor.meColorspace; - mnRed = aColor.mnRed; - mnGreen = aColor.mnGreen; - mnBlue = aColor.mnBlue; - - return *this; - } - - PrinterColor& operator= (sal_uInt32 nRGB) - { - meColorspace = eRGB; - mnBlue = (nRGB & 0x000000ff); - mnGreen = (nRGB & 0x0000ff00) >> 8; - mnRed = (nRGB & 0x00ff0000) >> 16; - - return *this; - } -}; - -/* - * forward declarations - */ - -class Font3; -class GlyphSet; -class PrinterJob; -class PrintFontManager; -class KernPair; -struct CharacterMetric; - -/* - * Bitmap Interface, this has to be filled with your actual bitmap implementation - * sample implementations can be found in: - * psprint/workben/cui/pspdem.cxx - * vcl/unx/source/gdi/salgdi2.cxx - */ - -class PrinterBmp -{ -public: - - virtual ~PrinterBmp () = 0; - virtual sal_uInt32 GetPaletteColor (sal_uInt32 nIdx) const = 0; - virtual sal_uInt32 GetPaletteEntryCount () const = 0; - virtual sal_uInt32 GetPixelRGB (sal_uInt32 nRow, sal_uInt32 nColumn) const = 0; - virtual sal_uInt8 GetPixelGray (sal_uInt32 nRow, sal_uInt32 nColumn) const = 0; - virtual sal_uInt8 GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const = 0; - virtual sal_uInt32 GetWidth () const = 0; - virtual sal_uInt32 GetHeight () const = 0; - virtual sal_uInt32 GetDepth () const = 0; -}; - -typedef enum { - InvalidType = 0, - TrueColorImage, - MonochromeImage, - PaletteImage, - GrayScaleImage -} ImageType; - -/* - * printer raster operations - */ - -struct GraphicsStatus -{ - rtl::OString maFont; - rtl_TextEncoding maEncoding; - bool mbArtItalic; - bool mbArtBold; - sal_Int32 mnTextHeight; - sal_Int32 mnTextWidth; - PrinterColor maColor; - double mfLineWidth; - - GraphicsStatus(); -}; - -class Font3; - -class PrinterGfx -{ -private: - - /* common settings */ - - double mfScaleX; - double mfScaleY; - - sal_uInt32 mnDpi; - sal_uInt16 mnDepth; - - sal_uInt16 mnPSLevel; - sal_Bool mbColor; - sal_Bool mbUploadPS42Fonts; - - osl::File* mpPageHeader; - osl::File* mpPageBody; - - void TranslateCoordinates (sal_Int32 &rXOut, sal_Int32 &rYOut, - sal_Int32 nXIn, sal_Int32 nYIn ) - { rXOut = nXIn; rYOut = nYIn; } - void TranslateCoordinates (Point& rOut, const Point& rIn) - { rOut = rIn; } - - /* text/font related data, for a type1 font it has to be checked - whether this font has already been downloaded. A TrueType font - will be converted into one or more Type3 fonts, containing glyphs - in no particular order. In addition to the existence of the - glyph in one of the subfonts, the mapping from unicode to the - glyph has to be remembered */ - - std::list< sal_Int32 > maPS1Font; - std::list< GlyphSet > maPS3Font; - - sal_Int32 mnFontID; - sal_Int32 mnFallbackID; - sal_Int32 mnTextAngle; - bool mbTextVertical; - PrintFontManager& mrFontMgr; - - /* bitmap drawing implementation */ - - sal_Bool mbCompressBmp; - - void DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType); - void writePS2Colorspace (const PrinterBmp& rBitmap, psp::ImageType nType); - void DrawPS2GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void DrawPS2PaletteImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void DrawPS2TrueColorImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - void DrawPS2MonoImage (const PrinterBmp& rBitmap, const Rectangle& rArea); - - /* clip region */ - - std::list< Rectangle > maClipRegion; - sal_Bool JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, - Point& aOldPoint, sal_Int32& nColumn ); - - /* color settings */ - PrinterColor maFillColor; - PrinterColor maTextColor; - PrinterColor maLineColor; - - /* graphics state */ - GraphicsStatus maVirtualStatus; - std::list< GraphicsStatus > maGraphicsStack; - GraphicsStatus& currentState() { return maGraphicsStack.front(); } - - /* font / font substitution */ - friend class Font3; - const ::boost::unordered_map< fontID, fontID >* mpFontSubstitutes; - int getCharWidth (sal_Bool b_vert, sal_Unicode n_char, - CharacterMetric *p_bbox); - fontID getCharMetric (const Font3 &rFont, sal_Unicode n_char, - CharacterMetric *p_bbox); - fontID getFontSubstitute () const; - fontID getFallbackID () const { return mnFallbackID; } - - bool mbStrictSO52Compatibility; -public: - /* grahics status update */ - void PSSetColor (); - void PSSetLineWidth (); - void PSSetFont (); - - /* graphics status functions */ - void PSSetColor (const PrinterColor& rColor) - { maVirtualStatus.maColor = rColor; } - - void PSUploadPS1Font (sal_Int32 nFontID); - void PSSetFont (const rtl::OString& rName, - rtl_TextEncoding nEncoding = RTL_TEXTENCODING_DONTKNOW) - { maVirtualStatus.maFont = rName; maVirtualStatus.maEncoding = nEncoding; } - - /* graphics status stack */ - void PSGSave (); - void PSGRestore (); - - - /* PS helpers */ - enum pspath_t { moveto = 0, lineto = 1 }; - void PSBinLineTo (const Point& rCurrent, Point& rOld, - sal_Int32& nColumn); - void PSBinMoveTo (const Point& rCurrent, Point& rOld, - sal_Int32& nColumn); - void PSBinStartPath (); - void PSBinEndPath (); - void PSBinCurrentPath (sal_uInt32 nPoints, const Point* pPath); - void PSBinPath (const Point& rCurrent, Point& rOld, - pspath_t eType, sal_Int32& nColumn); - - void PSRotate (sal_Int32 nAngle); - void PSTranslate (const Point& rPoint); - void PSMoveTo (const Point& rPoint); - void PSRMoveTo (sal_Int32 nDx, sal_Int32 nDy = 0); - void PSScale (double fScaleX, double fScaleY); - void PSLineTo(const Point& rPoint ); - void PSPointOp (const Point& rPoint, const sal_Char* pOperator); - void PSHexString (const sal_uChar* pString, sal_Int16 nLen); - void PSDeltaArray (const sal_Int32 *pArray, sal_Int16 nEntries); - void PSShowText (const sal_uChar* pString, - sal_Int16 nGlyphs, sal_Int16 nBytes, - const sal_Int32* pDeltaArray = NULL); - void PSComment (const sal_Char* pComment ); - void LicenseWarning (const Point& rPoint, const sal_Unicode* pStr, - sal_Int16 nLen, const sal_Int32* pDeltaArray); - - void OnEndPage (); - void OnEndJob (); - void writeResources( osl::File* pFile, std::list< rtl::OString >& rSuppliedFonts, std::list< rtl::OString >& rNeededFonts ); - PrintFontManager& GetFontMgr () { return mrFontMgr; } - - void drawVerticalizedText (const Point& rPoint, - const sal_Unicode* pStr, - sal_Int16 nLen, - const sal_Int32* pDeltaArray ); - void drawText (const Point& rPoint, - const sal_Unicode* pStr, sal_Int16 nLen, - const sal_Int32* pDeltaArray = NULL); - - void drawGlyphs( const Point& rPoint, - sal_GlyphId* pGlyphIds, - sal_Unicode* pUnicodes, - sal_Int16 nLen, - sal_Int32* pDeltaArray ); -public: - PrinterGfx(); - ~PrinterGfx(); - sal_Bool Init (PrinterJob &rPrinterSpec); - sal_Bool Init (const JobData& rData); - void Clear(); - - // query depth and size - void GetResolution (sal_Int32 &rDpiX, sal_Int32 &rDpiY) const; - sal_uInt16 GetBitCount (); - - // clip region - void ResetClipRegion (); - void BeginSetClipRegion (sal_uInt32); - sal_Bool UnionClipRegion (sal_Int32 nX, sal_Int32 nY, - sal_Int32 nDX, sal_Int32 nDY); - void EndSetClipRegion (); - - // set xy color - void SetLineColor (const PrinterColor& rLineColor = PrinterColor()) - { maLineColor = rLineColor; } - void SetFillColor (const PrinterColor& rFillColor = PrinterColor()) - { maFillColor = rFillColor; } - - // drawing primitives - void DrawPixel (const Point& rPoint, const PrinterColor& rPixelColor); - void DrawPixel (const Point& rPoint) - { DrawPixel (rPoint, maLineColor); } - void DrawLine (const Point& rFrom, const Point& rTo); - void DrawRect (const Rectangle& rRectangle); - void DrawPolyLine (sal_uInt32 nPoints, const Point* pPath ); - void DrawPolygon (sal_uInt32 nPoints, const Point* pPath); - void DrawPolyPolygon (sal_uInt32 nPoly, - const sal_uInt32 *pPolygonSize, - const Point** pPolygonList); - void DrawPolyLineBezier (sal_uInt32 nPoints, - const Point* pPath, - const sal_uInt8* pFlgAry ); - void DrawPolygonBezier (sal_uInt32 nPoints, - const Point* pPath, - const sal_uInt8* pFlgAry); - void DrawPolyPolygonBezier (sal_uInt32 nPoly, - const sal_uInt32* pPoints, - const Point* const* pPtAry, - const sal_uInt8* const* pFlgAry); - - // eps - sal_Bool DrawEPS ( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize); - - // image drawing - void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, - const PrinterBmp& rBitmap); - void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, - const PrinterBmp& rBitmap, - const PrinterBmp& rTransBitmap); - void DrawMask (const Rectangle& rDest, const Rectangle& rSrc, - const PrinterBmp &rBitmap, PrinterColor& rMaskColor); - - // font and text handling - sal_uInt16 SetFont ( - sal_Int32 nFontID, - sal_Int32 nPointHeight, - sal_Int32 nPointWidth, - sal_Int32 nAngle, - bool bVertical, - bool bArtItalic, - bool bArtBold - ); - sal_uInt16 SetFallbackFont ( sal_Int32 nFontID ); - sal_Int32 GetFontAngle () const - { return mnTextAngle; } - sal_Int32 GetFontID () const - { return mnFontID; } - bool GetFontVertical() const - { return mbTextVertical; } - sal_Int32 GetFontHeight () const - { return maVirtualStatus.mnTextHeight; } - sal_Int32 GetFontWidth () const - { return maVirtualStatus.mnTextWidth; } - bool GetArtificialItalic() const - { return maVirtualStatus.mbArtItalic; } - bool GetArtificialBold() const - { return maVirtualStatus.mbArtBold; } - void DrawText (const Point& rPoint, - const sal_Unicode* pStr, sal_Int16 nLen, - const sal_Int32* pDeltaArray = NULL); - void SetTextColor (PrinterColor& rTextColor) - { maTextColor = rTextColor; } - sal_Int32 GetCharWidth (sal_uInt16 nFrom, sal_uInt16 nTo, - long *pWidthArray); - const ::std::list< KernPair >& getKernPairs( bool bVertical = false ) const; - // advanced font handling - sal_Bool GetGlyphBoundRect (sal_Unicode c, Rectangle& rOutRect); - sal_uInt32 GetGlyphOutline (sal_Unicode c, - sal_uInt16 **ppPolySizes, Point **ppPoints, - sal_uInt8 **ppFlags); - - // for CTL - void DrawGlyphs( const Point& rPoint, - sal_GlyphId* pGlyphIds, - sal_Unicode* pUnicodes, - sal_Int16 nLen, - sal_Int32* pDeltaArray ); - - bool getStrictSO52Compatibility() const; - void setStrictSO52Compatibility( bool ); -}; - -} /* namespace psp */ - - -#endif /* _PSPRINT_PRINTERGFX_HXX_ */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/printerjob.hxx b/vcl/inc/vcl/printerjob.hxx deleted file mode 100644 index 62a1c078bc32..000000000000 --- a/vcl/inc/vcl/printerjob.hxx +++ /dev/null @@ -1,151 +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 _PSPRINT_PRINTERJOB_HXX_ -#define _PSPRINT_PRINTERJOB_HXX_ - -#include "vcl/jobdata.hxx" -#include "osl/file.hxx" -#include "rtl/string.hxx" - -#include <list> - -namespace psp { - -// forward declarations -class PrinterGfx; - - -class PrinterJob -{ -private: // private data - - rtl::OUString maSpoolDirName; - rtl::OUString maFileName; // empty: spool to command, else spool to named file - rtl::OUString maJobTitle; - int mnFileMode; - - osl::File* mpJobHeader; - osl::File* mpJobTrailer; - - std::list< osl::File* > maPageList; - std::list< osl::File* > maHeaderList; - - JobData m_aDocumentJobData; - JobData m_aLastJobData; - PrinterGfx* m_pGraphics; - - sal_uInt32 mnResolution; - - sal_uInt32 mnWidthPt; - sal_uInt32 mnHeightPt; - sal_uInt32 mnMaxWidthPt; - sal_uInt32 mnMaxHeightPt; - - int mnLandscapes; - int mnPortraits; - - sal_uInt32 mnLMarginPt; - sal_uInt32 mnRMarginPt; - sal_uInt32 mnTMarginPt; - sal_uInt32 mnBMarginPt; - - double mfXScale; - double mfYScale; - - sal_Int32 mnErrorCode; - bool m_bQuickJob; - -private: // private methods - - osl::File* CreateSpoolFile (const rtl::OUString& rName, - const rtl::OUString& rExtension); - void InitPaperSize (const JobData& rJobSetup); - - bool writeFeatureList( osl::File* pFile, const JobData&, bool bDocumentSetup ); - bool writeSetup( osl::File* pFile, const JobData& ); - bool writePageSetup( osl::File* pFile, const JobData&, bool bWriteFeatures = true ); - void writeJobPatch( osl::File* File, const JobData& ); - bool writeProlog (osl::File* pFile, const JobData& ); - -public: // for usage in PrinterGfx - - sal_uInt32 GetResolution () const { return mnResolution; } - void GetScale (double &rXScale, double &rYScale) const; - sal_uInt16 GetDepth () const; - sal_uInt16 GetPostscriptLevel (const JobData *pJobData = NULL) const; - sal_Bool IsColorPrinter () const; - - osl::File* GetDocumentHeader (); - osl::File* GetDocumentTrailer (); - osl::File* GetCurrentPageHeader (); - osl::File* GetCurrentPageBody (); - - const ::rtl::OUString& GetPrinterName() const { return m_aLastJobData.m_aPrinterName; } - -public: - PrinterJob (); - ~PrinterJob (); - - /* rFileName: if length is greater than 0 save resulting PostScript - * to named file. - * nMode: only meaningful when saving to file: if nonzero, try - * to impose the mode on the resulting file's inode; for nonexistant - * files use open, for existant files try a chmod - * rJobName: text to appear in the %%Title comment - * rAppName: text to appear in the %%Creator comment - * rSetupData: JobData that apply to this job - * pGraphics: the graphics used to print this job; - * this graphics must live until End/AbortJob has returned - * bIsQuickJob: the job was started as "direct print" meaning - * the quick command for spooling should be used instead - * of the normal command - */ - sal_Bool StartJob (const rtl::OUString& rFileName, - int nMode, - const rtl::OUString& rJobName, - const rtl::OUString& rAppName, - const JobData& rSetupData, - PrinterGfx* pGraphics, - bool bIsQuickJob - ); - sal_Bool EndJob (); - - sal_Bool AbortJob (); - - sal_Bool StartPage (const JobData& rJobSetup); - sal_Bool EndPage (); - - sal_uInt32 GetErrorCode (); -}; - -} /* namespace psp */ - -#endif /* _PSPRINT_PRINTERJOB_HXX_ */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/prndlg.hxx b/vcl/inc/vcl/prndlg.hxx deleted file mode 100644 index 247998303178..000000000000 --- a/vcl/inc/vcl/prndlg.hxx +++ /dev/null @@ -1,337 +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_PRNDLG_HXX -#define _SV_PRNDLG_HXX - -#include <vcl/dllapi.h> - -#include "vcl/print.hxx" -#include "vcl/print.h" - -#include "vcl/dialog.hxx" -#include "vcl/fixed.hxx" -#include "vcl/button.hxx" -#include "vcl/gdimtf.hxx" -#include "vcl/lstbox.hxx" -#include "vcl/field.hxx" -#include "vcl/tabctrl.hxx" -#include "vcl/tabpage.hxx" -#include "vcl/arrange.hxx" -#include "vcl/virdev.hxx" - -#include <boost/shared_ptr.hpp> -#include <map> - -namespace vcl -{ - class PrintDialog : public ModalDialog - { - class PrintPreviewWindow : public Window - { - GDIMetaFile maMtf; - Size maOrigSize; - Size maPreviewSize; - VirtualDevice maPageVDev; - rtl::OUString maReplacementString; - rtl::OUString maToolTipString; - bool mbGreyscale; - FixedLine maHorzDim; - FixedLine maVertDim; - - public: - PrintPreviewWindow( Window* pParent, const ResId& ); - virtual ~PrintPreviewWindow(); - - virtual void Paint( const Rectangle& rRect ); - virtual void Command( const CommandEvent& ); - virtual void Resize(); - virtual void DataChanged( const DataChangedEvent& ); - - void setPreview( const GDIMetaFile&, const Size& i_rPaperSize, - const rtl::OUString& i_rPaperName, - const rtl::OUString& i_rNoPageString, - sal_Int32 i_nDPIX, sal_Int32 i_nDPIY, - bool i_bGreyscale - ); - }; - - class ShowNupOrderWindow : public Window - { - int mnOrderMode; - int mnRows; - int mnColumns; - void ImplInitSettings(); - public: - ShowNupOrderWindow( Window* pParent ); - virtual ~ShowNupOrderWindow(); - - virtual void Paint( const Rectangle& ); - - void setValues( int i_nOrderMode, int i_nColumns, int i_nRows ) - { - mnOrderMode = i_nOrderMode; - mnRows = i_nRows; - mnColumns = i_nColumns; - Invalidate(); - } - }; - - class NUpTabPage : public TabPage - { - public: - FixedLine maNupLine; - RadioButton maPagesBtn; - RadioButton maBrochureBtn; - FixedText maPagesBoxTitleTxt; - ListBox maNupPagesBox; - - // controls for "Custom" page mode - FixedText maNupNumPagesTxt; - NumericField maNupColEdt; - FixedText maNupTimesTxt; - NumericField maNupRowsEdt; - FixedText maPageMarginTxt1; - MetricField maPageMarginEdt; - FixedText maPageMarginTxt2; - FixedText maSheetMarginTxt1; - MetricField maSheetMarginEdt; - FixedText maSheetMarginTxt2; - FixedText maNupOrientationTxt; - ListBox maNupOrientationBox; - - // page order ("left to right, then down") - FixedText maNupOrderTxt; - ListBox maNupOrderBox; - ShowNupOrderWindow maNupOrderWin; - // border around each page - CheckBox maBorderCB; - - boost::shared_ptr< vcl::RowOrColumn > mxBrochureDep; - boost::shared_ptr< vcl::LabeledElement >mxPagesBtnLabel; - - void setupLayout(); - - NUpTabPage( Window*, const ResId& ); - virtual ~NUpTabPage(); - - void readFromSettings(); - void storeToSettings(); - void initFromMultiPageSetup( const vcl::PrinterController::MultiPageSetup& ); - void enableNupControls( bool bEnable ); - - void showAdvancedControls( bool ); - - // virtual void Resize(); - }; - - class JobTabPage : public TabPage - { - public: - FixedLine maPrinterFL; - ListBox maPrinters; - DisclosureButton maDetailsBtn; - FixedText maStatusLabel; - FixedText maStatusTxt; - FixedText maLocationLabel; - FixedText maLocationTxt; - FixedText maCommentLabel; - FixedText maCommentTxt; - - PushButton maSetupButton; - - FixedLine maCopies; - FixedLine maCopySpacer; - FixedText maCopyCount; - NumericField maCopyCountField; - CheckBox maCollateBox; - FixedImage maCollateImage; - CheckBox maReverseOrderBox; - - Image maCollateImg; - Image maNoCollateImg; - - long mnCollateUIMode; - - boost::shared_ptr<vcl::RowOrColumn> mxPrintRange; - boost::shared_ptr<vcl::WindowArranger> mxDetails; - - JobTabPage( Window*, const ResId& ); - virtual ~JobTabPage(); - - void readFromSettings(); - void storeToSettings(); - - // virtual void Resize(); - - void setupLayout(); - }; - - class OutputOptPage : public TabPage - { - public: - FixedLine maOptionsLine; - CheckBox maToFileBox; - CheckBox maCollateSingleJobsBox; - - boost::shared_ptr<vcl::RowOrColumn> mxOptGroup; - - OutputOptPage( Window*, const ResId& ); - virtual ~OutputOptPage(); - - void readFromSettings(); - void storeToSettings(); - - // virtual void Resize(); - - void setupLayout(); - }; - - OKButton maOKButton; - CancelButton maCancelButton; - HelpButton maHelpButton; - PrintPreviewWindow maPreviewWindow; - NumericField maPageEdit; - FixedText maNumPagesText; - PushButton maBackwardBtn; - PushButton maForwardBtn; - - TabControl maTabCtrl; - NUpTabPage maNUpPage; - JobTabPage maJobPage; - OutputOptPage maOptionsPage; - - FixedLine maButtonLine; - - boost::shared_ptr< PrinterController > maPController; - - rtl::OUString maPageStr; - rtl::OUString maNoPageStr; - sal_Int32 mnCurPage; - sal_Int32 mnCachedPages; - - std::list< Window* > maControls; - std::map< Window*, rtl::OUString > maControlToPropertyMap; - std::map< rtl::OUString, std::vector< Window* > > - maPropertyToWindowMap; - std::map< Window*, sal_Int32 > maControlToNumValMap; - std::set< rtl::OUString > maReverseDependencySet; - - Size maNupPortraitSize; - Size maNupLandscapeSize; - - // internal, used for automatic Nup-Portrait/landscape - Size maFirstPageSize; - - rtl::OUString maPrintToFileText; - rtl::OUString maPrintText; - rtl::OUString maDefPrtText; - - boost::shared_ptr<vcl::RowOrColumn> mxPreviewCtrls; - - Size maDetailsCollapsedSize; - Size maDetailsExpandedSize; - - sal_Bool mbShowLayoutPage; - - Size getJobPageSize(); - void updateNup(); - void updateNupFromPages(); - void preparePreview( bool i_bPrintChanged = true, bool i_bMayUseCache = false ); - void setPreviewText( sal_Int32 ); - void updatePrinterText(); - void checkControlDependencies(); - void checkOptionalControlDependencies(); - void makeEnabled( Window* ); - void updateWindowFromProperty( const rtl::OUString& ); - void setupOptionalUI(); - void readFromSettings(); - void storeToSettings(); - com::sun::star::beans::PropertyValue* getValueForWindow( Window* ) const; - - virtual void Resize(); - virtual void Command( const CommandEvent& ); - virtual void DataChanged( const DataChangedEvent& ); - - DECL_LINK( SelectHdl, ListBox* ); - DECL_LINK( ClickHdl, Button* ); - DECL_LINK( ModifyHdl, Edit* ); - DECL_LINK( UIOptionsChanged, void* ); - - DECL_LINK( UIOption_CheckHdl, CheckBox* ); - DECL_LINK( UIOption_RadioHdl, RadioButton* ); - DECL_LINK( UIOption_SelectHdl, ListBox* ); - DECL_LINK( UIOption_ModifyHdl, Edit* ); - - void setupLayout(); - public: - PrintDialog( Window*, const boost::shared_ptr< PrinterController >& ); - virtual ~PrintDialog(); - - bool isPrintToFile(); - int getCopyCount(); - bool isCollate(); - bool isSingleJobs(); - - void previewForward(); - void previewBackward(); - }; - - class PrintProgressDialog : public ModelessDialog - { - String maStr; - FixedText maText; - CancelButton maButton; - - bool mbCanceled; - sal_Int32 mnCur; - sal_Int32 mnMax; - long mnProgressHeight; - Rectangle maProgressRect; - bool mbNativeProgress; - - DECL_LINK( ClickHdl, Button* ); - - void implCalcProgressRect(); - public: - PrintProgressDialog( Window* i_pParent, int i_nMax ); - ~PrintProgressDialog(); - - bool isCanceled() const { return mbCanceled; } - void setProgress( int i_nCurrent, int i_nMax = -1 ); - void tick(); - void reset(); - - virtual void Paint( const Rectangle& ); - }; -} - - -#endif // _SV_PRNDLG_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/region.h b/vcl/inc/vcl/region.h deleted file mode 100644 index 5814e981aac2..000000000000 --- a/vcl/inc/vcl/region.h +++ /dev/null @@ -1,137 +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_REGION_H -#define _SV_REGION_H - -#include <vcl/regband.hxx> -#include <tools/poly.hxx> -#include <vcl/region.hxx> - -// ----------------- -// - Hilfsmethoden - -// ----------------- - -#ifdef DBG_UTIL -const char* ImplDbgTestRegion( const void* pObj ); -#endif - -// -------------------- -// - ImplRegionHandle - -// -------------------- - -struct ImplRegionHandle -{ - Region* mpRegion; - ImplRegionBand* mpCurrRectBand; - ImplRegionBandSep* mpCurrRectBandSep; - sal_Bool mbFirst; -}; - -// ------------------ -// - ImplRegionInfo - -// ------------------ - -struct ImplRegionInfo -{ - void* mpVoidCurrRectBand; - void* mpVoidCurrRectBandSep; -}; - -// -------------- -// - ImplRegion - -// -------------- - -struct ImplRegionBase -{ -public: - ImplRegionBase( int nCount = 1 ); // TODO: replace manual refcounting - virtual ~ImplRegionBase(); -public: - sal_uIntPtr mnRefCount; - sal_uIntPtr mnRectCount; - PolyPolygon* mpPolyPoly; - basegfx::B2DPolyPolygon* mpB2DPolyPoly; -}; - -class ImplRegion : public ImplRegionBase -{ - friend class Region; - -private: - ImplRegionBand* mpFirstBand; // root of the list with y-bands - ImplRegionBand* mpLastCheckedBand; - -public: - ImplRegion(); - ImplRegion( const PolyPolygon& rPolyPoly ); - ImplRegion( const basegfx::B2DPolyPolygon& ); - ImplRegion( const ImplRegion& rImplRegion ); - ~ImplRegion(); - - ImplRegionBand* ImplGetFirstRegionBand() const { return mpFirstBand; } - PolyPolygon* ImplGetPolyPoly() const { return mpPolyPoly; } - - void CreateBandRange( long nYTop, long nYBottom ); - void InsertBands( long nYTop, long nYBottom ); - sal_Bool InsertSingleBand( ImplRegionBand* mpImplRegionBand, - long nYBandPosition ); - sal_Bool InsertLine( const Point & rFirstPoint, - const Point & rSecondPoint, - long nLineID ); - sal_Bool InsertPoint( const Point &rPoint, - long nLineID, - sal_Bool bEndPoint, LineType eLineType ); - - /** Insert one band either after another band or as the first or only - band. Both the forward as well as the backward links are updated. - @param pPreviousBand - When <NULL/> then pBandToInsert is inserted as first band or as - only band when there are no other bands. - When not <NULL/> then pBandToInsert is inserted directly after - pPreviousBand. - @param pBandToInsert - The band to insert. - */ - void InsertBand (ImplRegionBand* pPreviousBand, - ImplRegionBand* pBandToInsert); - - void Union( long nLeft, long nTop, long nRight, long nBottom ); - void Exclude( long nLeft, long nTop, long nRight, long nBottom ); - void XOr( long nLeft, long nTop, long nRight, long nBottom ); - - // remove emtpy rects - sal_Bool OptimizeBandList(); - - friend SvStream& operator>>( SvStream& rIStm, Region& rRegion ); - friend SvStream& operator<<( SvStream& rOStm, const Region& rRegion ); -}; - -#endif // _SV_REGION_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/rendergraphic.hxx b/vcl/inc/vcl/rendergraphic.hxx new file mode 100644 index 000000000000..0a0f475decd6 --- /dev/null +++ b/vcl/inc/vcl/rendergraphic.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * 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_RENDERGRAPHIC_HXX +#define _SV_RENDERGRAPHIC_HXX + +#include <vcl/dllapi.h> +#include <rtl/ustring.hxx> +#include <boost/shared_array.hpp> +#include <memory> + +class SvStream; +class MapMode; +class Size; +class BitmapEx; + +namespace vcl +{ + // ----------------- + // - RenderGraphic - + // ----------------- + class VCL_DLLPUBLIC RenderGraphic + { + public: + + typedef boost::shared_array< sal_uInt8 > GraphicData; + + friend VCL_DLLPUBLIC ::SvStream& operator>>( ::SvStream& rIStm, RenderGraphic& rRenderGraphic ); + friend VCL_DLLPUBLIC ::SvStream& operator<<( ::SvStream& rOStm, const RenderGraphic& rRenderGraphic ); + + public: + + RenderGraphic( ); + + RenderGraphic( const RenderGraphic& rRenderGraphic ); + + RenderGraphic( const GraphicData& rGraphicData, + sal_uInt32 nGraphicDataLength, + const rtl::OUString& rGraphicDataMimeType ); + + RenderGraphic( const rtl::OUString& rGraphicDataMimeType, + sal_uInt32 nGraphicDataLength, + const sal_uInt8* pGraphicData = NULL ); + + virtual ~RenderGraphic(); + + RenderGraphic& operator=(const RenderGraphic& rRenderGraphic ); + + bool operator==(const RenderGraphic& rRenderGraphic ) const; + + inline bool operator!=(const RenderGraphic& rRenderGraphic ) const + { + return( !( rRenderGraphic == *this ) ); + } + + bool IsEqual( const RenderGraphic& rRenderGraphic ) const; + + bool operator!() const; + + inline bool IsEmpty( ) const + { + return( !( *this ) ); + } + + inline const GraphicData& GetGraphicData( ) const + { + return( maGraphicData ); + } + + inline sal_uInt32 GetGraphicDataLength( ) const + { + return( mnGraphicDataLength ); + } + + inline const rtl::OUString& GetGraphicDataMimeType( ) const + { + return( maGraphicDataMimeType ); + } + + const MapMode& GetPrefMapMode() const; + const Size& GetPrefSize() const; + + BitmapEx GetReplacement() const; + + private: + + void ImplCheckData(); + void ImplGetDefaults() const; + + private: + + GraphicData maGraphicData; + sal_uInt32 mnGraphicDataLength; + rtl::OUString maGraphicDataMimeType; + mutable ::std::auto_ptr< MapMode > mapPrefMapMode; + mutable ::std::auto_ptr< Size > mapPrefSize; + }; +} + +#endif // _SV_RENDERHRAPHIC_HXX diff --git a/vcl/inc/vcl/rendergraphicrasterizer.hxx b/vcl/inc/vcl/rendergraphicrasterizer.hxx new file mode 100644 index 000000000000..f2166b03ffb3 --- /dev/null +++ b/vcl/inc/vcl/rendergraphicrasterizer.hxx @@ -0,0 +1,111 @@ +/************************************************************************* + * + * 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_RENDERGRAPHICRASTERIZER_HXX +#define _SV_RENDERGRAPHICRASTERIZER_HXX + +#include <vcl/rendergraphic.hxx> +#include <vcl/bitmapex.hxx> + +#include <com/sun/star/graphic/XGraphicRasterizer.hpp> + +#include <memory> +#include <deque> + +#define VCL_RASTERIZER_UNLIMITED_EXTENT 0x00000000 +#define VCL_RASTERIZER_DEFAULT_EXTENT 0xffffffff + +namespace vcl +{ + // --------------------------- + // - RenderGraphicRasterizer - + // --------------------------- + + class VCL_DLLPUBLIC RenderGraphicRasterizer + { + public: + + RenderGraphicRasterizer( const RenderGraphic& rData ); + + + RenderGraphicRasterizer( const RenderGraphicRasterizer& rRenderGraphicRasterizer ); + + virtual ~RenderGraphicRasterizer(); + + RenderGraphicRasterizer& operator=( const RenderGraphicRasterizer& rRenderGraphicRasterizer ); + + inline const RenderGraphic& GetRenderGraphic() const + { + return( maRenderGraphic ); + } + + const Size& GetDefaultSizePixel() const; + + BitmapEx GetReplacement() const; + + virtual Size GetPrefSize() const; + + virtual MapMode GetPrefMapMode() const; + + virtual const BitmapEx& Rasterize( const Size& rSizePixel_UnrotatedUnsheared, + double fRotateAngle = 0.0, + double fShearAngleX = 0.0, + double fShearAngleY = 0.0, + sal_uInt32 nMaxExtent = VCL_RASTERIZER_DEFAULT_EXTENT ) const; + + protected: + + RenderGraphic maRenderGraphic; + mutable com::sun::star::uno::Reference< com::sun::star::graphic::XGraphicRasterizer > mxRasterizer; + + virtual void InitializeRasterizer(); + + private: + + RenderGraphicRasterizer(); + + mutable BitmapEx maBitmapEx; + mutable Size maDefaultSizePixel; + mutable double mfRotateAngle; + mutable double mfShearAngleX; + mutable double mfShearAngleY; + + private: + + typedef ::std::deque< RenderGraphicRasterizer > RenderGraphicRasterizerCache; + + static RenderGraphicRasterizerCache& ImplGetCache(); + + static bool ImplInitializeFromCache( RenderGraphicRasterizer& rRasterizer ); + static bool ImplRasterizeFromCache( RenderGraphicRasterizer& rRasterizer, + const Size& rSizePixel, double fRotateAngle, + double fShearAngleX, double fShearAngleY ); + static void ImplUpdateCache( const RenderGraphicRasterizer& rRasterizer ); +}; +} + +#endif // _SV_RENDERGRAPHICRASTERIZER_HXX diff --git a/vcl/inc/vcl/salbmp.hxx b/vcl/inc/vcl/salbmp.hxx deleted file mode 100644 index d880be0d6d37..000000000000 --- a/vcl/inc/vcl/salbmp.hxx +++ /dev/null @@ -1,71 +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_HXX -#define _SV_SALBMP_HXX - -#include <tools/gen.hxx> -#include <vcl/dllapi.h> - -#include <com/sun/star/rendering/XBitmapCanvas.hpp> - -struct BitmapBuffer; -class SalGraphics; -class BitmapPalette; -struct BitmapSystemData; - -class VCL_PLUGIN_PUBLIC SalBitmap -{ -public: - SalBitmap() {} - virtual ~SalBitmap(); - - virtual bool Create( const Size& rSize, - sal_uInt16 nBitCount, - const BitmapPalette& rPal ) = 0; - virtual bool Create( const SalBitmap& rSalBmp ) = 0; - virtual bool Create( const SalBitmap& rSalBmp, - SalGraphics* pGraphics ) = 0; - virtual bool Create( const SalBitmap& rSalBmp, - sal_uInt16 nNewBitCount ) = 0; - virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas, - Size& rSize, - bool bMask = false ) = 0; - virtual void Destroy() = 0; - virtual Size GetSize() const = 0; - virtual sal_uInt16 GetBitCount() const = 0; - - virtual BitmapBuffer* AcquireBuffer( bool bReadOnly ) = 0; - virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) = 0; - virtual bool GetSystemData( BitmapSystemData& rData ) = 0; - -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salctype.hxx b/vcl/inc/vcl/salctype.hxx index 93eb69bd439d..4b3e1e3ad772 100644 --- a/vcl/inc/vcl/salctype.hxx +++ b/vcl/inc/vcl/salctype.hxx @@ -49,6 +49,7 @@ #define CVT_TIF (0x00000008UL) #define CVT_WMF (0x00000009UL) #define CVT_EMF (0x0000000aUL) +#define CVT_SVG (0x0000000bUL) // --------------- // - ConvertData - diff --git a/vcl/inc/vcl/saldatabasic.hxx b/vcl/inc/vcl/saldatabasic.hxx deleted file mode 100644 index e080cb91ff99..000000000000 --- a/vcl/inc/vcl/saldatabasic.hxx +++ /dev/null @@ -1,62 +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_SALDATABASIC_HXX -#define _SV_SALDATABASIC_HXX - -#include <vcl/svdata.hxx> -#include <vcl/salinst.hxx> -#include <osl/module.h> - -namespace psp -{ - class PrinterInfoManager; -} - -class VCL_PLUGIN_PUBLIC SalData -{ -public: - SalInstance* m_pInstance; // pointer to instance - oslModule m_pPlugin; // plugin library handle - psp::PrinterInfoManager* m_pPIManager; - - SalData(); - virtual ~SalData(); - -}; - -// -=-= inlines =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -inline void SetSalData( SalData* pData ) -{ ImplGetSVData()->mpSalData = (void*)pData; } - -inline SalData* GetSalData() -{ return (SalData*)ImplGetSVData()->mpSalData; } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salframe.hxx b/vcl/inc/vcl/salframe.hxx deleted file mode 100644 index f5b98756f5f6..000000000000 --- a/vcl/inc/vcl/salframe.hxx +++ /dev/null @@ -1,303 +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_HXX -#define _SV_SALFRAME_HXX - -#include <vcl/sv.h> -#include <vcl/dllapi.h> - -#ifdef __cplusplus - -#include <vcl/ptrstyle.hxx> -#include <vcl/sndstyle.hxx> - -#endif // __cplusplus -#include <vcl/salwtype.hxx> -#include <vcl/salgeom.hxx> -#include <tools/gen.hxx> -#include <vcl/region.hxx> - -#include <vcl/impdel.hxx> -#include <rtl/ustring.hxx> -#include <vcl/keycod.hxx> - -class AllSettings; -class SalGraphics; -class SalBitmap; -class SalMenu; -class Window; - - -struct SalFrameState; -struct SalInputContext; -struct SystemEnvData; - -// ----------------- -// - SalFrameTypes - -// ----------------- - -#define SAL_FRAME_TOTOP_RESTOREWHENMIN ((sal_uInt16)0x0001) -#define SAL_FRAME_TOTOP_FOREGROUNDTASK ((sal_uInt16)0x0002) -#define SAL_FRAME_TOTOP_GRABFOCUS ((sal_uInt16)0x0004) -#define SAL_FRAME_TOTOP_GRABFOCUS_ONLY ((sal_uInt16)0x0008) - -#define SAL_FRAME_ENDEXTTEXTINPUT_COMPLETE ((sal_uInt16)0x0001) -#define SAL_FRAME_ENDEXTTEXTINPUT_CANCEL ((sal_uInt16)0x0002) - - -// ----------------- -// - SalFrameStyle - -// ----------------- - -#define SAL_FRAME_STYLE_DEFAULT ((sal_uLong)0x00000001) -#define SAL_FRAME_STYLE_MOVEABLE ((sal_uLong)0x00000002) -#define SAL_FRAME_STYLE_SIZEABLE ((sal_uLong)0x00000004) -#define SAL_FRAME_STYLE_CLOSEABLE ((sal_uLong)0x00000008) - -// no shadow effect on WindowsXP -#define SAL_FRAME_STYLE_NOSHADOW ((sal_uLong)0x00000010) -// indicate tooltip windows, so they can always be topmost -#define SAL_FRAME_STYLE_TOOLTIP ((sal_uLong)0x00000020) -// windows without windowmanager decoration, this typically only applies to floating windows -#define SAL_FRAME_STYLE_OWNERDRAWDECORATION ((sal_uLong)0x00000040) -// dialogs -#define SAL_FRAME_STYLE_DIALOG ((sal_uLong)0x00000080) -// partial fullscreen: fullscreen on one monitor of a multimonitor display -#define SAL_FRAME_STYLE_PARTIAL_FULLSCREEN ((sal_uLong)0x00800000) -// plugged system child window -#define SAL_FRAME_STYLE_PLUG ((sal_uLong)0x10000000) -// system child window inside another SalFrame -#define SAL_FRAME_STYLE_SYSTEMCHILD ((sal_uLong)0x08000000) -// floating window -#define SAL_FRAME_STYLE_FLOAT ((sal_uLong)0x20000000) -// floating window that needs to be focusable -#define SAL_FRAME_STYLE_FLOAT_FOCUSABLE ((sal_uLong)0x04000000) -// toolwindows should be painted with a smaller decoration -#define SAL_FRAME_STYLE_TOOLWINDOW ((sal_uLong)0x40000000) -// the window containing the intro bitmap, aka splashscreen -#define SAL_FRAME_STYLE_INTRO ((sal_uLong)0x80000000) - -/* -#define SAL_FRAME_STYLE_MINABLE ((sal_uLong)0x00000008) -#define SAL_FRAME_STYLE_MAXABLE ((sal_uLong)0x00000010) -#define SAL_FRAME_STYLE_BORDER ((sal_uLong)0x00000040) -#define SAL_FRAME_STYLE_DOC ((sal_uLong)0x00004000) -#define SAL_FRAME_STYLE_DIALOG ((sal_uLong)0x00008000) -#define SAL_FRAME_STYLE_TOOL ((sal_uLong)0x00010000) -#define SAL_FRAME_STYLE_FULLSIZE ((sal_uLong)0x00020000) -*/ - -// ---------------------------------------- -// - extended frame style - -// - (sal equivalent to extended WinBits) - -// ---------------------------------------- -typedef sal_uInt64 SalExtStyle; -#define SAL_FRAME_EXT_STYLE_DOCUMENT SalExtStyle(0x00000001) -#define SAL_FRAME_EXT_STYLE_DOCMODIFIED SalExtStyle(0x00000002) - -// ------------------------ -// - Flags for SetPosSize - -// ------------------------ - -#define SAL_FRAME_POSSIZE_X ((sal_uInt16)0x0001) -#define SAL_FRAME_POSSIZE_Y ((sal_uInt16)0x0002) -#define SAL_FRAME_POSSIZE_WIDTH ((sal_uInt16)0x0004) -#define SAL_FRAME_POSSIZE_HEIGHT ((sal_uInt16)0x0008) - -#ifdef __cplusplus - -using ::rtl::OUString; -using ::rtl::OString; - -// ------------ -// - SalFrame - -// ------------ - -struct SystemParentData; - -class VCL_PLUGIN_PUBLIC SalFrame : public vcl::DeletionNotifier -{ - // the VCL window corresponding to this frame - Window* m_pWindow; - SALFRAMEPROC m_pProc; -public: // public for Sal Implementation - SalFrame() : m_pWindow( NULL ), m_pProc( NULL ) {} - virtual ~SalFrame(); - -public: // public for Sal Implementation - SalFrameGeometry maGeometry; - -public: - // SalGraphics or NULL, but two Graphics for all SalFrames - // must be returned - virtual SalGraphics* GetGraphics() = 0; - virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; - - // Event must be destroyed, when Frame is destroyed - // When Event is called, SalInstance::Yield() must be returned - virtual sal_Bool PostEvent( void* pData ) = 0; - - virtual void SetTitle( const XubString& rTitle ) = 0; - virtual void SetIcon( sal_uInt16 nIcon ) = 0; - virtual void SetRepresentedURL( const rtl::OUString& ); - virtual void SetMenu( SalMenu *pSalMenu ) = 0; - virtual void DrawMenuBar() = 0; - - virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle ) = 0; - - // Before the window is visible, a resize event - // must be sent with the correct size - virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = sal_False ) = 0; - virtual void Enable( sal_Bool bEnable ) = 0; - // Set ClientSize and Center the Window to the desktop - // and send/post a resize message - virtual void SetMinClientSize( long nWidth, long nHeight ) = 0; - virtual void SetMaxClientSize( long nWidth, long nHeight ) = 0; - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) = 0; - virtual void GetClientSize( long& rWidth, long& rHeight ) = 0; - virtual void GetWorkArea( Rectangle& rRect ) = 0; - virtual SalFrame* GetParent() const = 0; - // Note: x will be mirrored at parent if UI mirroring is active - SalFrameGeometry GetGeometry(); - const SalFrameGeometry& GetUnmirroredGeometry() const { return maGeometry; } - virtual void SetWindowState( const SalFrameState* pState ) = 0; - virtual sal_Bool GetWindowState( SalFrameState* pState ) = 0; - virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) = 0; - // Enable/Disable ScreenSaver, SystemAgents, ... - virtual void StartPresentation( sal_Bool bStart ) = 0; - // Show Window over all other Windows - virtual void SetAlwaysOnTop( sal_Bool bOnTop ) = 0; - - // Window to top and grab focus - virtual void ToTop( sal_uInt16 nFlags ) = 0; - - // this function can call with the same - // pointer style - virtual void SetPointer( PointerStyle ePointerStyle ) = 0; - virtual void CaptureMouse( sal_Bool bMouse ) = 0; - virtual void SetPointerPos( long nX, long nY ) = 0; - - // flush output buffer - virtual void Flush( void) = 0; - virtual void Flush( const Rectangle& ); - // flush output buffer, wait till outstanding operations are done - virtual void Sync() = 0; - - virtual void SetInputContext( SalInputContext* pContext ) = 0; - virtual void EndExtTextInput( sal_uInt16 nFlags ) = 0; - - virtual String GetKeyName( sal_uInt16 nKeyCode ) = 0; - virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode ) = 0; - - // returns in 'rKeyCode' the single keycode that translates to the given unicode when using a keyboard layout of language 'aLangType' - // returns sal_False if no mapping exists or function not supported - // this is required for advanced menu support - virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) = 0; - - // returns the input language used for the last key stroke - // may be LANGUAGE_DONTKNOW if not supported by the OS - virtual LanguageType GetInputLanguage() = 0; - - virtual SalBitmap* SnapShot() = 0; - - virtual void UpdateSettings( AllSettings& rSettings ) = 0; - - virtual void Beep( SoundType eSoundType ) = 0; - - // returns system data (most prominent: window handle) - virtual const SystemEnvData* GetSystemData() const = 0; - - // sets a background bitmap on the frame; the implementation - // must not make assumptions about the lifetime of the passed SalBitmap - // but should copy its contents to an own buffer - virtual void SetBackgroundBitmap( SalBitmap* ) = 0; - - - // get current modifier, button mask and mouse position - struct SalPointerState - { - sal_uLong mnState; - Point maPos; // in frame coordinates - }; - - virtual SalPointerState GetPointerState() = 0; - - struct SalIndicatorState - { - sal_uInt16 mnState; - }; - - virtual SalIndicatorState GetIndicatorState() = 0; - - virtual void SimulateKeyPress( sal_uInt16 nKeyCode ) = 0; - - // set new parent window - virtual void SetParent( SalFrame* pNewParent ) = 0; - // reparent window to act as a plugin; implementation - // may choose to use a new system window inetrnally - // return false to indicate failure - virtual bool SetPluginParent( SystemParentData* pNewParent ) = 0; - - // move the frame to a new screen - virtual void SetScreenNumber( unsigned int nScreen ) = 0; - - virtual void SetApplicationID( const rtl::OUString &rApplicationID) = 0; - - // shaped system windows - // set clip region to none (-> rectangular windows, normal state) - virtual void ResetClipRegion() = 0; - // start setting the clipregion consisting of nRects rectangles - virtual void BeginSetClipRegion( sal_uLong nRects ) = 0; - // add a rectangle to the clip region - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; - // done setting up the clipregion - virtual void EndSetClipRegion() = 0; - - // Callbacks (indepent part in vcl/source/window/winproc.cxx) - // for default message handling return 0 - void SetCallback( Window* pWindow, SALFRAMEPROC pProc ) - { m_pWindow = pWindow; m_pProc = pProc; } - - // returns the instance set - Window* GetWindow() const { return m_pWindow; } - - // Call the callback set; this sometimes necessary for implementation classes - // that should not now more than necessary about the SalFrame implementation - // (e.g. input methods, printer update handlers). - long CallCallback( sal_uInt16 nEvent, const void* pEvent ) const - { return m_pProc ? m_pProc( m_pWindow, const_cast<SalFrame*>(this), nEvent, pEvent ) : 0; } -}; - - - -#endif // __cplusplus - -#endif // _SV_SALFRAME_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx deleted file mode 100644 index 5b9e59f68d8f..000000000000 --- a/vcl/inc/vcl/salgdi.hxx +++ /dev/null @@ -1,491 +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_HXX -#define _SV_SALGDI_HXX - -#include "tools/string.hxx" -#include "rtl/ustring.hxx" -#include "vcl/sv.h" -#include "vcl/dllapi.h" -#include "vcl/salgtype.hxx" -#include "osl/thread.hxx" -#include "vcl/outdev.hxx" -#include "vcl/salnativewidgets.hxx" - -#include <map> - -class ImplDevFontList; -class SalBitmap; -class ImplFontSelectData; -class ImplFontMetricData; -struct ImplKernPairData; -class ImplFontData; -class ImplFontCharMap; -class SalLayout; -class ImplLayoutArgs; -class Rectangle; -class FontSubsetInfo; -class OutputDevice; -class ServerFontLayout; -struct SystemGraphicsData; -struct SystemFontData; - -namespace basegfx { - class B2DVector; - class B2DPolygon; - class B2DPolyPolygon; -} - -// --------------------- -// - SalGraphics-Codes - -// --------------------- - -#define SAL_SETFONT_REMOVEANDMATCHNEW ((sal_uInt16)0x0001) -#define SAL_SETFONT_USEDRAWTEXT ((sal_uInt16)0x0002) -#define SAL_SETFONT_USEDRAWTEXTARRAY ((sal_uInt16)0x0004) -#define SAL_SETFONT_UNICODE ((sal_uInt16)0x0008) -#define SAL_SETFONT_BADFONT ((sal_uInt16)0x1000) - -#define SAL_COPYAREA_WINDOWINVALIDATE ((sal_uInt16)0x0001) - -// ------------------- -// - common typedefs - -// ------------------- - -typedef sal_Unicode sal_Ucs; // TODO: use sal_UCS4 instead of sal_Unicode -typedef std::map< sal_Ucs, sal_Int32 > Ucs2SIntMap; -typedef std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap; -typedef std::map< sal_Ucs, rtl::OString > Ucs2OStrMap; -typedef std::vector< sal_Int32 > Int32Vector; - -// --------------- -// - SalGraphics - -// --------------- - -// note: if you add any new methods to class SalGraphics using coordinates -// make sure they have a corresponding protected pure virtual method -// which has to be implemented by the platform dependent part. -// Add a method that performs coordinate mirroring if required, (see -// existing methods as sample) and then calls the equivalent pure method. - -// note: all positions are in pixel and relative to -// the top/left-position of the virtual output area - -class VCL_PLUGIN_PUBLIC SalGraphics -{ - int m_nLayout; // 0: mirroring off, 1: mirror x-axis - -protected: - // flags which hold the SetAntialiasing() value from OutputDevice - bool m_bAntiAliasB2DDraw; - -public: - // get/set AA - void setAntiAliasB2DDraw(bool bNew) { m_bAntiAliasB2DDraw = bNew; } - bool getAntiAliasB2DDraw() const { return m_bAntiAliasB2DDraw; } - - SalGraphics(); - virtual ~SalGraphics(); - -protected: - virtual bool setClipRegion( const Region& ) = 0; - // draw --> LineColor and FillColor and RasterOp and ClipRegion - virtual void drawPixel( long nX, long nY ) = 0; - virtual void drawPixel( long nX, long nY, SalColor nSalColor ) = 0; - virtual void drawLine( long nX1, long nY1, long nX2, long nY2 ) = 0; - virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) = 0; - virtual void drawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry ) = 0; - virtual void drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry ) = 0; - virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ) = 0; - virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ) = 0; - virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin ) = 0; - virtual sal_Bool drawPolyLineBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) = 0; - virtual sal_Bool drawPolygonBezier( sal_uLong nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) = 0; - virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ) = 0; - - // CopyArea --> No RasterOp, but ClipRegion - virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, - long nSrcHeight, sal_uInt16 nFlags ) = 0; - - // CopyBits and DrawBitmap --> RasterOp and ClipRegion - // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics - virtual void copyBits( const SalTwoRect* pPosAry, SalGraphics* pSrcGraphics ) = 0; - virtual void drawBitmap( const SalTwoRect* pPosAry, const SalBitmap& rSalBitmap ) = 0; - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nTransparentColor ) = 0; - virtual void drawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const SalBitmap& rMaskBitmap ) = 0; - virtual void drawMask( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nMaskColor ) = 0; - - virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ) = 0; - virtual SalColor getPixel( long nX, long nY ) = 0; - - // invert --> ClipRegion (only Windows or VirDevs) - virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) = 0; - virtual void invert( sal_uLong nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0; - - virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ) = 0; - - // native widget rendering methods that require mirroring - virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - const Point& aPos, sal_Bool& rIsInside ); - virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& aCaption ); - virtual sal_Bool drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, - ControlState nState, const ImplControlValue& aValue, - const rtl::OUString& aCaption ); - virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, - const ImplControlValue& aValue, const rtl::OUString& aCaption, - Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); - - /** Render bitmap with alpha channel - - @param rSourceBitmap - Source bitmap to blit - - @param rAlphaBitmap - Alpha channel to use for blitting - - @return true, if the operation succeeded, and false - otherwise. In this case, clients should try to emulate alpha - compositing themselves - */ - virtual bool drawAlphaBitmap( const SalTwoRect&, - const SalBitmap& rSourceBitmap, - const SalBitmap& rAlphaBitmap ) = 0; - /** Render solid rectangle with given transparency - - @param nTransparency - Transparency value (0-255) to use. 0 blits and opaque, 255 a - fully transparent rectangle - */ - virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ) = 0; - -public: - // public SalGraphics methods, the interface to the independent vcl part - - // get device resolution - virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) = 0; - // get the depth of the device - virtual sal_uInt16 GetBitCount() const = 0; - // get the width of the device - virtual long GetGraphicsWidth() const = 0; - - // set the clip region to empty - virtual void ResetClipRegion() = 0; - - // set the line color to transparent (= don't draw lines) - virtual void SetLineColor() = 0; - // set the line color to a specific color - virtual void SetLineColor( SalColor nSalColor ) = 0; - // set the fill color to transparent (= don't fill) - virtual void SetFillColor() = 0; - // set the fill color to a specific color, shapes will be - // filled accordingly - virtual void SetFillColor( SalColor nSalColor ) = 0; - // enable/disable XOR drawing - virtual void SetXORMode( bool bSet, bool bInvertOnly ) = 0; - // set line color for raster operations - virtual void SetROPLineColor( SalROPColor nROPColor ) = 0; - // set fill color for raster operations - virtual void SetROPFillColor( SalROPColor nROPColor ) = 0; - // set the text color to a specific color - virtual void SetTextColor( SalColor nSalColor ) = 0; - // set the font - virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel ) = 0; - // release the fonts - void ReleaseFonts() { SetFont( NULL, 0 ); } - // get the current font's metrics - virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel = 0 ) = 0; - - // get kernign pairs of the current font - // return only PairCount if (pKernPairs == NULL) - virtual sal_uLong GetKernPairs( sal_uLong nMaxPairCount, ImplKernPairData* ) = 0; - // get the repertoire of the current font - virtual const ImplFontCharMap* GetImplFontCharMap() const = 0; - // get the layout capabilities of the current font - virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const = 0; - // graphics must fill supplied font list - virtual void GetDevFontList( ImplDevFontList* ) = 0; - // graphics should call ImplAddDevFontSubstitute on supplied - // OutputDevice for all its device specific preferred font substitutions - virtual void GetDevFontSubstList( OutputDevice* ) = 0; - virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ) = 0; - // CreateFontSubset: a method to get a subset of glyhps of a font - // inside a new valid font file - // returns sal_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 sal_Bool CreateFontSubset( const rtl::OUString& rToFile, - const ImplFontData* pFont, - sal_Int32* pGlyphIDs, - sal_uInt8* pEncoding, - sal_Int32* pWidths, - int nGlyphs, - FontSubsetInfo& rInfo // out parameter - ) = 0; - - // 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 ) = 0; - - // 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 - // pUnicodes: contains the Unicodes assigned to - // code points 0 to 255; must contain at least 256 members - // 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* pFont, - const sal_Ucs* pUnicodes, - sal_Int32* pWidths, - FontSubsetInfo& rInfo, - long* pDataLen ) = 0; - // frees the font data again - virtual void FreeEmbedFontData( const void* pData, long nDataLen ) = 0; - - // get the same widths as in CreateFontSubset and GetEmbedFontData - // in case of an embeddable font also fill the mapping - // between unicode and glyph id - // leave widths vector and mapping untouched in case of failure - virtual void GetGlyphWidths( const ImplFontData* pFont, - bool bVertical, - Int32Vector& rWidths, - Ucs2UIntMap& rUnicodeEnc ) = 0; - - virtual sal_Bool GetGlyphBoundRect( long nIndex, Rectangle& ) = 0; - virtual sal_Bool GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& ) = 0; - - virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0; - virtual void DrawServerFontLayout( const ServerFontLayout& ) = 0; - /** Filter text from DrawText commands in a device specific manner - <p> - This function allows a device (or rather the corresponding SalGraphics - implementation) to prevent text portions from being drawn. This currently - is used only for filtering out the fax number in a document that is printed - to one of psprint's specialized "fax" printers. - </p> - - @param rOrigText - The original text - - @param rNewText - A String that will be filled with the adjusted version - - @param nIndex - The index inside <code>rOrigText</code> that marks the first draw character - - @param rLen - in: length of text beginning at <code>nIndex</code> to be drawn - out: length of <code>rNewText</code> containing the substituted text - - @param rCutStart - out: index at which the cutout portion of <code>rOrigText</code> begins - - @param rCutStop - out: index at which the cutout portion of <code>rOrigText</code> ends - - @returns - true: a substitution has taken place and rNewText rLen, rCutStart and rCutStop have been filled accordingly - false: no substitution has taken place, rNewText, rLen, rCutStart, rCutStop remain unchanged - */ - virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ); - - virtual bool supportsOperation( OutDevSupportType ) const = 0; - - // mirroring specifica - int GetLayout() { return m_nLayout; } - void SetLayout( int aLayout ) { m_nLayout = aLayout;} - - void mirror( long& nX, const OutputDevice *pOutDev, bool bBack = false ) const; - void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev, bool bBack = false ) const; - sal_Bool mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const; - void mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const; - void mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack = false ) const; - void mirror( ControlType,const ImplControlValue&,const OutputDevice*,bool bBack = false) const; - basegfx::B2DPoint mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev, bool bBack = false ) const; - basegfx::B2DPolygon mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const; - basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const; - - // non virtual methods; these do possible coordinate mirroring and - // then delegate to protected virtual methods - bool SetClipRegion( const Region&, const OutputDevice *pOutDev ); - - // draw --> LineColor and FillColor and RasterOp and ClipRegion - void DrawPixel( long nX, long nY, const OutputDevice *pOutDev ); - void DrawPixel( long nX, long nY, SalColor nSalColor, const OutputDevice *pOutDev ); - void DrawLine( long nX1, long nY1, long nX2, long nY2, const OutputDevice *pOutDev ); - void DrawRect( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); - void DrawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); - void DrawPolygon( sal_uLong nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev ); - void DrawPolyPolygon( sal_uInt32 nPoly, - const sal_uInt32* pPoints, - PCONSTSALPOINT* pPtAry, - const OutputDevice *pOutDev ); - bool DrawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency, const OutputDevice* ); - bool DrawPolyLine( const basegfx::B2DPolygon&, double fTransparency, const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin, const OutputDevice* ); - sal_Bool DrawPolyLineBezier( sal_uLong nPoints, - const SalPoint* pPtAry, - const sal_uInt8* pFlgAry, - const OutputDevice *pOutDev ); - sal_Bool DrawPolygonBezier( sal_uLong nPoints, - const SalPoint* pPtAry, - const sal_uInt8* pFlgAry, - const OutputDevice *pOutDev ); - sal_Bool DrawPolyPolygonBezier( sal_uInt32 nPoly, - const sal_uInt32* pPoints, - const SalPoint* const* pPtAry, - const sal_uInt8* const* pFlgAry, - const OutputDevice *pOutDev ); - - // CopyArea --> No RasterOp, but ClipRegion - void CopyArea( long nDestX, - long nDestY, - long nSrcX, - long nSrcY, - long nSrcWidth, - long nSrcHeight, - sal_uInt16 nFlags, - const OutputDevice *pOutDev ); - - // CopyBits and DrawBitmap --> RasterOp and ClipRegion - // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics - void CopyBits( const SalTwoRect* pPosAry, - SalGraphics* pSrcGraphics, - const OutputDevice *pOutDev, - const OutputDevice *pSrcOutDev ); - void DrawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const OutputDevice *pOutDev ); - void DrawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nTransparentColor, - const OutputDevice *pOutDev ); - void DrawBitmap( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - const SalBitmap& rTransparentBitmap, - const OutputDevice *pOutDev ); - - void DrawMask( const SalTwoRect* pPosAry, - const SalBitmap& rSalBitmap, - SalColor nMaskColor, - const OutputDevice *pOutDev ); - - SalBitmap* GetBitmap( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev ); - SalColor GetPixel( long nX, long nY, const OutputDevice *pOutDev ); - - // invert --> ClipRegion (only Windows) - void Invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags, const OutputDevice *pOutDev ); - void Invert( sal_uLong nPoints, const SalPoint* pPtAry, SalInvert nFlags, const OutputDevice *pOutDev ); - - sal_Bool DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize, const OutputDevice *pOutDev ); - - //------------------------------------- - // Native Widget Rendering functions - //------------------------------------- - - // Query the platform layer for control support - virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart ); - - // Query the native control to determine if it was acted upon - sal_Bool HitTestNativeControl( ControlType nType, - ControlPart nPart, - const Rectangle& rControlRegion, - const Point& aPos, - sal_Bool& rIsInside, - const OutputDevice *pOutDev ); - - // Request rendering of a particular control and/or part - sal_Bool DrawNativeControl( ControlType nType, - ControlPart nPart, - const Rectangle& rControlRegion, - ControlState nState, - const ImplControlValue& aValue, - const rtl::OUString& aCaption, - const OutputDevice *pOutDev ); - - // Request rendering of a caption string for a control - sal_Bool DrawNativeControlText( ControlType nType, - ControlPart nPart, - const Rectangle& rControlRegion, - ControlState nState, - const ImplControlValue& aValue, - const rtl::OUString& aCaption, - const OutputDevice *pOutDev ); - - // Query the native control's actual drawing region (including adornment) - sal_Bool GetNativeControlRegion( ControlType nType, - ControlPart nPart, - const Rectangle& rControlRegion, - ControlState nState, - const ImplControlValue& aValue, - const rtl::OUString& aCaption, - Rectangle &rNativeBoundingRegion, - Rectangle &rNativeContentRegion, - const OutputDevice *pOutDev ); - - static void AddDevFontSubstitute( OutputDevice* pOutDev, - const String& rFontName, - const String& rReplaceFontName, - sal_uInt16 nFlags = 0 ); - - bool DrawAlphaBitmap( const SalTwoRect&, - const SalBitmap& rSourceBitmap, - const SalBitmap& rAlphaBitmap, - const OutputDevice *pOutDev ); - - bool DrawAlphaRect( long nX, long nY, long nWidth, long nHeight, - sal_uInt8 nTransparency, const OutputDevice *pOutDev ); - - virtual SystemGraphicsData GetGraphicsData() const = 0; - virtual SystemFontData GetSysFontData( int nFallbacklevel ) const = 0; -}; - -#endif // _SV_SALGDI_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salgeom.hxx b/vcl/inc/vcl/salgeom.hxx deleted file mode 100644 index c512d0a195fa..000000000000 --- a/vcl/inc/vcl/salgeom.hxx +++ /dev/null @@ -1,54 +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_SALGEOM_HXX -#define _SV_SALGEOM_HXX - -typedef struct _SalFrameGeometry { - // screen position of upper left corner of drawable area in pixel - long nX, nY; - // dimensions of the drawable area in pixel - unsigned long nWidth, nHeight; - // thickness of the decoration in pixel - unsigned long nLeftDecoration, - nTopDecoration, - nRightDecoration, - nBottomDecoration; - unsigned int nScreenNumber; - - _SalFrameGeometry() : - nX( 0 ), nY( 0 ), nWidth( 1 ), nHeight( 1 ), - nLeftDecoration( 0 ), nTopDecoration( 0 ), - nRightDecoration( 0 ), nBottomDecoration( 0 ), - nScreenNumber( 0 ) - {} -} SalFrameGeometry; - -#endif // _SV_SALGEOM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salimestatus.hxx b/vcl/inc/vcl/salimestatus.hxx deleted file mode 100644 index 13362c20071d..000000000000 --- a/vcl/inc/vcl/salimestatus.hxx +++ /dev/null @@ -1,48 +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_SALIMESTATUS_HXX -#define _SV_SALIMESTATUS_HXX - -#include <vcl/dllapi.h> - -class VCL_PLUGIN_PUBLIC SalI18NImeStatus -{ -public: - SalI18NImeStatus() {} - virtual ~SalI18NImeStatus(); - - // asks whether there is a status window available - // to toggle into menubar - virtual bool canToggle() = 0; - virtual void toggle() = 0; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salinst.hxx b/vcl/inc/vcl/salinst.hxx deleted file mode 100644 index d878dd7fea80..000000000000 --- a/vcl/inc/vcl/salinst.hxx +++ /dev/null @@ -1,207 +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_SALINST_HXX -#define _SV_SALINST_HXX - -#include "com/sun/star/uno/Reference.hxx" - -#include "vcl/sv.h" -#include "vcl/displayconnectiondispatch.hxx" -#include "vcl/dllapi.h" - -#include "tools/string.hxx" - -#include "rtl/ref.hxx" -#include "rtl/string.hxx" - -#include <list> - -struct SystemParentData; -struct SalPrinterQueueInfo; -struct SalStatus; -struct ImplJobSetup; -class SalGraphics; -class SalFrame; -class SalObject; -class SalMenu; -class SalMenuItem; -class SalVirtualDevice; -class SalInfoPrinter; -class SalPrinter; -class SalTimer; -class ImplPrnQueueList; -class SalI18NImeStatus; -class SalSystem; -class SalBitmap; -struct SalItemParams; -class SalSession; -struct SystemGraphicsData; -struct SystemWindowData; -class Menu; - -// --------------- -// - SalInstance - -// --------------- - -class VCL_PLUGIN_PUBLIC SalInstance -{ -private: - rtl::Reference< vcl::DisplayConnectionDispatch > m_pEventInst; - -public: - SalInstance() {} - virtual ~SalInstance(); - - // Frame - // DisplayName for Unix ??? - virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle ) = 0; - virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle ) = 0; - virtual void DestroyFrame( SalFrame* pFrame ) = 0; - - // Object (System Child Window) - virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True ) = 0; - virtual void DestroyObject( SalObject* pObject ) = 0; - - // VirtualDevice - // nDX and nDY in Pixel - // nBitCount: 0 == Default(=as window) / 1 == Mono - // pData allows for using a system dependent graphics or device context - virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, - long nDX, long nDY, - sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL ) = 0; - virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ) = 0; - - // Printer - // pSetupData->mpDriverData can be 0 - // pSetupData must be updatet with the current - // JobSetup - virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, - ImplJobSetup* pSetupData ) = 0; - virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ) = 0; - virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter ) = 0; - virtual void DestroyPrinter( SalPrinter* pPrinter ) = 0; - - virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ) = 0; - virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) = 0; - virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) = 0; - virtual String GetDefaultPrinter() = 0; - - // SalTimer - virtual SalTimer* CreateSalTimer() = 0; - // SalI18NImeStatus - virtual SalI18NImeStatus* CreateI18NImeStatus() = 0; - // SalSystem - virtual SalSystem* CreateSalSystem() = 0; - // SalBitmap - virtual SalBitmap* CreateSalBitmap() = 0; - - // YieldMutex - virtual osl::SolarMutex* GetYieldMutex() = 0; - virtual sal_uLong ReleaseYieldMutex() = 0; - virtual void AcquireYieldMutex( sal_uLong nCount ) = 0; - // return true, if yield mutex is owned by this thread, else false - virtual bool CheckYieldMutex() = 0; - - // wait next event and dispatch - // must returned by UserEvent (SalFrame::PostEvent) - // and timer - virtual void Yield( bool bWait, bool bHandleAllCurrentEvents ) = 0; - virtual bool AnyInput( sal_uInt16 nType ) = 0; - - // Menues - virtual SalMenu* CreateMenu( sal_Bool bMenuBar, Menu* pMenu ); - virtual void DestroyMenu( SalMenu* pMenu); - virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData ); - virtual void DestroyMenuItem( SalMenuItem* pItem ); - - // may return NULL to disable session management - virtual SalSession* CreateSalSession() = 0; - - // methods for XDisplayConnection - - void SetEventCallback( rtl::Reference< vcl::DisplayConnectionDispatch > const & pInstance ) - { m_pEventInst = pInstance; } - bool CallEventCallback( void* pEvent, int nBytes ) - { return m_pEventInst.is() && m_pEventInst->dispatchEvent( pEvent, nBytes ); } - bool CallErrorCallback( void* pEvent, int nBytes ) - { return m_pEventInst.is() && m_pEventInst->dispatchErrorEvent( pEvent, nBytes ); } - - enum ConnectionIdentifierType { AsciiCString, Blob }; - virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes ) = 0; - - // this is a vehicle for PrintFontManager to bridge the gap between vcl and libvclplug_* - // this is only necessary because PrintFontManager is an exported vcl API and therefore - // needs to be in libvcl while libvclplug_* do not contain exported C++ API - virtual void FillFontPathList( std::list< rtl::OString >& o_rFontPaths ); - - // dtrans implementation - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > - CreateClipboard( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& i_rArguments ); - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDragSource(); - virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget(); - virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType) = 0; - - // callbacks for printer updates - virtual void updatePrinterUpdate() {} - virtual void jobStartedPrinterUpdate() {} - virtual void jobEndedPrinterUpdate() {} -}; - -// called from SVMain -SalInstance* CreateSalInstance(); -void DestroySalInstance( SalInstance* pInst ); - -// ------------------------- -// - SalInstance-Functions - -// ------------------------- - -void SalAbort( const XubString& rErrorText ); - -VCL_PLUGIN_PUBLIC const ::rtl::OUString& SalGetDesktopEnvironment(); - -// ----------- -// - SalData - -// ----------- - -void InitSalData(); // called from Application-Ctor -void DeInitSalData(); // called from Application-Dtor - -void InitSalMain(); -void DeInitSalMain(); - -// ---------- -// - SVMain - -// ---------- - -// Callbacks (indepen in \sv\source\app\svmain.cxx) -VCL_DLLPUBLIC int SVMain(); - -#endif // _SV_SALINST_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/sallayout.hxx b/vcl/inc/vcl/sallayout.hxx deleted file mode 100644 index b91185769b27..000000000000 --- a/vcl/inc/vcl/sallayout.hxx +++ /dev/null @@ -1,393 +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_SALLAYOUT_HXX -#define _SV_SALLAYOUT_HXX - -#include <tools/gen.hxx> - -#include <vector> -namespace basegfx { - class B2DPolyPolygon; - typedef std::vector<B2DPolyPolygon> B2DPolyPolygonVector; -} - -#ifndef _TOOLS_LANG_HXX -typedef unsigned short LanguageType; -#endif - -#include <vector> -#include <list> -#include <vcl/dllapi.h> - -// for typedef sal_UCS4 -#include <vcl/vclenum.hxx> - -class SalGraphics; -class ImplFontData; - -#define MAX_FALLBACK 16 - -// ---------------- -// - LayoutOption - -// ---------------- - -#define SAL_LAYOUT_BIDI_RTL 0x0001 -#define SAL_LAYOUT_BIDI_STRONG 0x0002 -#define SAL_LAYOUT_RIGHT_ALIGN 0x0004 -#define SAL_LAYOUT_KERNING_PAIRS 0x0010 -#define SAL_LAYOUT_KERNING_ASIAN 0x0020 -#define SAL_LAYOUT_VERTICAL 0x0040 -#define SAL_LAYOUT_COMPLEX_DISABLED 0x0100 -#define SAL_LAYOUT_ENABLE_LIGATURES 0x0200 -#define SAL_LAYOUT_SUBSTITUTE_DIGITS 0x0400 -#define SAL_LAYOUT_KASHIDA_JUSTIFICATON 0x0800 -#define SAL_LAYOUT_DISABLE_GLYPH_PROCESSING 0x1000 -#define SAL_LAYOUT_FOR_FALLBACK 0x2000 - -// ----------------- - -// used for managing runs e.g. for BiDi, glyph and script fallback -class VCL_PLUGIN_PUBLIC ImplLayoutRuns -{ -private: - int mnRunIndex; - std::vector<int> maRuns; - -public: - ImplLayoutRuns() { mnRunIndex = 0; maRuns.reserve(8); } - - void Clear() { maRuns.clear(); } - bool AddPos( int nCharPos, bool bRTL ); - bool AddRun( int nMinRunPos, int nEndRunPos, bool bRTL ); - - bool IsEmpty() const { return maRuns.empty(); } - void ResetPos() { mnRunIndex = 0; } - void NextRun() { mnRunIndex += 2; } - bool GetRun( int* nMinRunPos, int* nEndRunPos, bool* bRTL ) const; - bool GetNextPos( int* nCharPos, bool* bRTL ); - bool PosIsInRun( int nCharPos ) const; - bool PosIsInAnyRun( int nCharPos ) const; -}; - -// ----------------- - -class ImplLayoutArgs -{ -public: - // string related inputs - int mnFlags; - int mnLength; - int mnMinCharPos; - int mnEndCharPos; - const xub_Unicode* mpStr; - - // positioning related inputs - const sal_Int32* mpDXArray; // in pixel units - long mnLayoutWidth; // in pixel units - int mnOrientation; // in 0-3600 system - - // data for bidi and glyph+script fallback - ImplLayoutRuns maRuns; - ImplLayoutRuns maReruns; - -public: - ImplLayoutArgs( const xub_Unicode* pStr, int nLength, - int nMinCharPos, int nEndCharPos, int nFlags ); - - void SetLayoutWidth( long nWidth ) { mnLayoutWidth = nWidth; } - void SetDXArray( const sal_Int32* pDXArray ) { mpDXArray = pDXArray; } - void SetOrientation( int nOrientation ) { mnOrientation = nOrientation; } - - void ResetPos() - { maRuns.ResetPos(); } - bool GetNextPos( int* nCharPos, bool* bRTL ) - { return maRuns.GetNextPos( nCharPos, bRTL ); } - bool GetNextRun( int* nMinRunPos, int* nEndRunPos, bool* bRTL ); - bool NeedFallback( int nCharPos, bool bRTL ) - { return maReruns.AddPos( nCharPos, bRTL ); } - bool NeedFallback( int nMinRunPos, int nEndRunPos, bool bRTL ) - { return maReruns.AddRun( nMinRunPos, nEndRunPos, bRTL ); } - // methods used by BiDi and glyph fallback - bool NeedFallback() const - { return !maReruns.IsEmpty(); } - bool PrepareFallback(); - -protected: - void AddRun( int nMinCharPos, int nEndCharPos, bool bRTL ); -}; - -// helper functions often used with ImplLayoutArgs -bool IsDiacritic( sal_UCS4 ); -int GetVerticalFlags( sal_UCS4 ); -sal_UCS4 GetVerticalChar( sal_UCS4 ); -// #i80090# GetMirroredChar also needed outside vcl, moved to svapp.hxx -// VCL_DLLPUBLIC sal_UCS4 GetMirroredChar( sal_UCS4 ); -sal_UCS4 GetLocalizedChar( sal_UCS4, LanguageType ); -VCL_PLUGIN_PUBLIC const char* GetAutofallback( sal_UCS4 ) ; - -// ------------- -// - SalLayout - -// ------------- - -typedef sal_uInt32 sal_GlyphId; - -// Glyph Flags -#define GF_NONE 0x00000000 -#define GF_FLAGMASK 0xFF800000 -#define GF_IDXMASK ~GF_FLAGMASK -#define GF_ISCHAR 0x00800000 -#define GF_ROTL 0x01000000 -// caution !!! -#define GF_VERT 0x02000000 -// GF_VERT is only for windows implementation -// (win/source/gdi/salgdi3.cxx, win/source/gdi/winlayout.cxx) -// don't use this elsewhere !!! -#define GF_ROTR 0x03000000 -#define GF_ROTMASK 0x03000000 -#define GF_UNHINTED 0x04000000 -#define GF_GSUB 0x08000000 -#define GF_FONTMASK 0xF0000000 -#define GF_FONTSHIFT 28 - -#define GF_DROPPED 0xFFFFFFFF - -// all positions/widths are in font units -// one exception: drawposition is in pixel units - -class VCL_PLUGIN_PUBLIC SalLayout -{ -public: - // used by upper layers - Point& DrawBase() { return maDrawBase; } - const Point& DrawBase() const { return maDrawBase; } - Point& DrawOffset() { return maDrawOffset; } - const Point& DrawOffset() const { return maDrawOffset; } - Point GetDrawPosition( const Point& rRelative = Point(0,0) ) const; - - virtual bool LayoutText( ImplLayoutArgs& ) = 0; // first step of layouting - virtual void AdjustLayout( ImplLayoutArgs& ); // adjusting after fallback etc. - virtual void InitFont() const {} - virtual void DrawText( SalGraphics& ) const = 0; - - int GetUnitsPerPixel() const { return mnUnitsPerPixel; } - int GetOrientation() const { return mnOrientation; } - - virtual const ImplFontData* GetFallbackFontData( sal_GlyphId ) const; - - // methods using string indexing - virtual int GetTextBreak( long nMaxWidth, long nCharExtra=0, int nFactor=1 ) const = 0; - virtual long FillDXArray( sal_Int32* pDXArray ) const = 0; - virtual long GetTextWidth() const { return FillDXArray( NULL ); } - virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const = 0; - virtual bool IsKashidaPosValid ( int /*nCharPos*/ ) const { return true; } // i60594 - - // methods using glyph indexing - virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdAry, Point& rPos, int&, - sal_Int32* pGlyphAdvAry = NULL, int* pCharPosAry = NULL ) const = 0; - virtual bool GetOutline( SalGraphics&, ::basegfx::B2DPolyPolygonVector& ) const; - virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const; - - virtual bool IsSpacingGlyph( sal_GlyphId ) const; - - // reference counting - void Reference() const; - void Release() const; - - // used by glyph+font+script fallback - virtual void MoveGlyph( int nStart, long nNewXPos ) = 0; - virtual void DropGlyph( int nStart ) = 0; - virtual void Simplify( bool bIsBase ) = 0; - virtual void DisableGlyphInjection( bool /*bDisable*/ ) {} - -protected: - // used by layout engines - SalLayout(); - virtual ~SalLayout(); - - // used by layout layers - void SetUnitsPerPixel( int n ) { mnUnitsPerPixel = n; } - void SetOrientation( int nOrientation ) // in 0-3600 system - { mnOrientation = nOrientation; } - - static int CalcAsianKerning( sal_UCS4, bool bLeft, bool bVertical ); - -private: - // enforce proper copy semantic - SAL_DLLPRIVATE SalLayout( const SalLayout& ); - SAL_DLLPRIVATE SalLayout& operator=( const SalLayout& ); - -protected: - int mnMinCharPos; - int mnEndCharPos; - int mnLayoutFlags; - - int mnUnitsPerPixel; - int mnOrientation; - - mutable int mnRefCount; - mutable Point maDrawOffset; - Point maDrawBase; -}; - -// ------------------ -// - MultiSalLayout - -// ------------------ - -class VCL_PLUGIN_PUBLIC MultiSalLayout : public SalLayout -{ -public: - virtual void DrawText( SalGraphics& ) const; - virtual int GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const; - virtual long FillDXArray( sal_Int32* pDXArray ) const; - virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const; - virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos, - int&, sal_Int32* pGlyphAdvAry, int* pCharPosAry ) const; - virtual bool GetOutline( SalGraphics&, ::basegfx::B2DPolyPolygonVector& ) const; - virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const; - - // used only by OutputDevice::ImplLayout, TODO: make friend - explicit MultiSalLayout( SalLayout& rBaseLayout, - const ImplFontData* pBaseFont = NULL ); - virtual bool AddFallback( SalLayout& rFallbackLayout, - ImplLayoutRuns&, const ImplFontData* pFallbackFont ); - virtual bool LayoutText( ImplLayoutArgs& ); - virtual void AdjustLayout( ImplLayoutArgs& ); - virtual void InitFont() const; - - virtual const ImplFontData* GetFallbackFontData( sal_GlyphId ) const; - - void SetInComplete(bool bInComplete = true); - -protected: - virtual ~MultiSalLayout(); - -private: - // dummy implementations - virtual void MoveGlyph( int, long ) {} - virtual void DropGlyph( int ) {} - virtual void Simplify( bool ) {} - - // enforce proper copy semantic - SAL_DLLPRIVATE MultiSalLayout( const MultiSalLayout& ); - SAL_DLLPRIVATE MultiSalLayout& operator=( const MultiSalLayout& ); - -private: - SalLayout* mpLayouts[ MAX_FALLBACK ]; - const ImplFontData* mpFallbackFonts[ MAX_FALLBACK ]; - ImplLayoutRuns maFallbackRuns[ MAX_FALLBACK ]; - int mnLevel; - bool mbInComplete; -}; - -// -------------------- -// - GenericSalLayout - -// -------------------- - -struct GlyphItem -{ - int mnFlags; - int mnCharPos; // index in string - int mnOrigWidth; // original glyph width - int mnNewWidth; // width after adjustments - sal_GlyphId mnGlyphIndex; - Point maLinearPos; // absolute position of non rotated string - -public: - GlyphItem() {} - - GlyphItem( int nCharPos, sal_GlyphId nGlyphIndex, const Point& rLinearPos, - long nFlags, int nOrigWidth ) - : mnFlags(nFlags), mnCharPos(nCharPos), - mnOrigWidth(nOrigWidth), mnNewWidth(nOrigWidth), - mnGlyphIndex(nGlyphIndex), maLinearPos(rLinearPos) - {} - - enum{ FALLBACK_MASK=0xFF, IS_IN_CLUSTER=0x100, IS_RTL_GLYPH=0x200, IS_DIACRITIC=0x400 }; - - bool IsClusterStart() const { return ((mnFlags & IS_IN_CLUSTER) == 0); } - bool IsRTLGlyph() const { return ((mnFlags & IS_RTL_GLYPH) != 0); } - bool IsDiacritic() const { return ((mnFlags & IS_DIACRITIC) != 0); } -}; - -// --------------- - -typedef std::list<GlyphItem> GlyphList; -typedef std::vector<GlyphItem> GlyphVector; - -// --------------- - -class VCL_PLUGIN_PUBLIC GenericSalLayout : public SalLayout -{ -public: - // used by layout engines - void AppendGlyph( const GlyphItem& ); - virtual void AdjustLayout( ImplLayoutArgs& ); - virtual void ApplyDXArray( ImplLayoutArgs& ); - virtual void Justify( long nNewWidth ); - void KashidaJustify( long nIndex, int nWidth ); - void ApplyAsianKerning( const sal_Unicode*, int nLength ); - void SortGlyphItems(); - - // used by upper layers - virtual long GetTextWidth() const; - virtual long FillDXArray( sal_Int32* pDXArray ) const; - virtual int GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const; - virtual void GetCaretPositions( int nArraySize, sal_Int32* pCaretXArray ) const; - - // used by display layers - virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos, int&, - sal_Int32* pGlyphAdvAry = NULL, int* pCharPosAry = NULL ) const; - -protected: - GenericSalLayout(); - virtual ~GenericSalLayout(); - - // for glyph+font+script fallback - virtual void MoveGlyph( int nStart, long nNewXPos ); - virtual void DropGlyph( int nStart ); - virtual void Simplify( bool bIsBase ); - - bool GetCharWidths( sal_Int32* pCharWidths ) const; - -private: - GlyphItem* mpGlyphItems; // TODO: change to GlyphList - int mnGlyphCount; - int mnGlyphCapacity; - mutable Point maBasePoint; - - // enforce proper copy semantic - SAL_DLLPRIVATE GenericSalLayout( const GenericSalLayout& ); - SAL_DLLPRIVATE GenericSalLayout& operator=( const GenericSalLayout& ); -}; - -#undef SalGraphics - -#endif // _SV_SALLAYOUT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salmenu.hxx b/vcl/inc/vcl/salmenu.hxx deleted file mode 100644 index 63fb12ee4a84..000000000000 --- a/vcl/inc/vcl/salmenu.hxx +++ /dev/null @@ -1,103 +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_SALMENU_HXX -#define _SV_SALMENU_HXX - -#include <vcl/sv.h> -#include "vcl/dllapi.h" -#include <vcl/menu.hxx> -#include <vcl/keycod.hxx> -#include <vcl/image.hxx> - -struct SystemMenuData; -class FloatingWindow; -class SalFrame; - -struct SalItemParams -{ - sal_uInt16 nId; // item Id - MenuItemType eType; // MenuItem-Type - MenuItemBits nBits; // MenuItem-Bits - Menu* pMenu; // Pointer to Menu - XubString aText; // Menu-Text - Image aImage; // Image -}; - - -struct SalMenuButtonItem -{ - sal_uInt16 mnId; - Image maImage; - rtl::OUString maToolTipText; - - SalMenuButtonItem() : mnId( 0 ) {} - SalMenuButtonItem( sal_uInt16 i_nId, const Image& rImg, const rtl::OUString& i_rTTText = rtl::OUString() ) - : mnId( i_nId ), maImage( rImg ), maToolTipText( i_rTTText ) {} -}; - -class VCL_PLUGIN_PUBLIC SalMenuItem -{ -public: - SalMenuItem() {} - virtual ~SalMenuItem(); -}; - -class VCL_PLUGIN_PUBLIC SalMenu -{ -public: - SalMenu() {} - virtual ~SalMenu(); - - virtual sal_Bool VisibleMenuBar() = 0; // must return sal_True to actually DISPLAY native menu bars - // otherwise only menu messages are processed (eg, OLE on Windows) - - virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) = 0; - virtual void RemoveItem( unsigned nPos ) = 0; - virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos ) = 0; - virtual void SetFrame( const SalFrame* pFrame ) = 0; - virtual void CheckItem( unsigned nPos, sal_Bool bCheck ) = 0; - virtual void EnableItem( unsigned nPos, sal_Bool bEnable ) = 0; - virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText )= 0; - virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ) = 0; - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ) = 0; - virtual void GetSystemMenuData( SystemMenuData* pData ) = 0; - virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, sal_uLong nFlags); - virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false if not implemented or failure - virtual void RemoveMenuBarButton( sal_uInt16 nId ); - - // return an empty rectangle if not implemented - // return Rectangle( Point( -1, -1 ), Size( 1, 1 ) ) if menu bar buttons implemented - // but rectangle cannot be determined - virtual Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId, SalFrame* i_pReferenceFrame ); -}; - - -#endif // _SV_SALMENU_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salobj.hxx b/vcl/inc/vcl/salobj.hxx deleted file mode 100644 index 4e781787b0c9..000000000000 --- a/vcl/inc/vcl/salobj.hxx +++ /dev/null @@ -1,97 +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_SALOBJ_HXX -#define _SV_SALOBJ_HXX - -#include <vcl/sv.h> -#include <vcl/dllapi.h> -#include <vcl/salgtype.hxx> -#include <vcl/salwtype.hxx> - -struct SystemEnvData; - -// ------------------- -// - SalObject-Types - -// ------------------- - -#define SAL_OBJECT_CLIP_INCLUDERECTS ((sal_uInt16)0x0001) -#define SAL_OBJECT_CLIP_EXCLUDERECTS ((sal_uInt16)0x0002) -#define SAL_OBJECT_CLIP_ABSOLUTE ((sal_uInt16)0x0004) - -// ------------- -// - SalObject - -// ------------- - -class VCL_PLUGIN_PUBLIC SalObject -{ - void* m_pInst; - SALOBJECTPROC m_pCallback; - sal_Bool m_bMouseTransparent:1, - m_bEraseBackground:1; -public: - SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( sal_False ), m_bEraseBackground( sal_True ) {} - virtual ~SalObject(); - - virtual void ResetClipRegion() = 0; - virtual sal_uInt16 GetClipRegionType() = 0; - virtual void BeginSetClipRegion( sal_uLong nRects ) = 0; - virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight ) = 0; - virtual void EndSetClipRegion() = 0; - - virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight ) = 0; - virtual void Show( sal_Bool bVisible ) = 0; - virtual void Enable( sal_Bool nEnable ) = 0; - virtual void GrabFocus() = 0; - - virtual void SetBackground() = 0; - virtual void SetBackground( SalColor nSalColor ) = 0; - - virtual void SetForwardKey( sal_Bool /*bEnable*/ ) {} - - virtual const SystemEnvData* GetSystemData() const = 0; - - virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ) = 0; - - void SetCallback( void* pInst, SALOBJECTPROC pProc ) - { m_pInst = pInst; m_pCallback = pProc; } - long CallCallback( sal_uInt16 nEvent, const void* pEvent ) - { return m_pCallback ? m_pCallback( m_pInst, this, nEvent, pEvent ) : 0; } - void SetMouseTransparent( sal_Bool bMouseTransparent ) - { m_bMouseTransparent = bMouseTransparent; } - sal_Bool IsMouseTransparent() - { return m_bMouseTransparent; } - void EnableEraseBackground( sal_Bool bEnable ) - { m_bEraseBackground = bEnable; } - sal_Bool IsEraseBackgroundEnabled() - { return m_bEraseBackground; } -}; - -#endif // _SV_SALOBJ_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salprn.hxx b/vcl/inc/vcl/salprn.hxx deleted file mode 100644 index e820614e4cdd..000000000000 --- a/vcl/inc/vcl/salprn.hxx +++ /dev/null @@ -1,140 +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_SALPRN_HXX -#define _SV_SALPRN_HXX - -#include <tools/string.hxx> -#include <vcl/sv.h> -#include <vcl/dllapi.h> -#include <vcl/prntypes.hxx> - -#include <vector> - -class SalGraphics; -class SalFrame; -struct ImplJobSetup; -namespace vcl { class PrinterController; } - -// ----------------------- -// - SalPrinterQueueInfo - -// ----------------------- - -struct VCL_PLUGIN_PUBLIC SalPrinterQueueInfo -{ - XubString maPrinterName; - XubString maDriver; - XubString maLocation; - XubString maComment; - sal_uLong mnStatus; - sal_uLong mnJobs; - void* mpSysData; - - SalPrinterQueueInfo(); - ~SalPrinterQueueInfo(); -}; - -// ------------------ -// - SalInfoPrinter - -// ------------------ - -class VCL_PLUGIN_PUBLIC SalInfoPrinter -{ -public: - std::vector< PaperInfo > m_aPaperFormats; // all printer supported formats - bool m_bPapersInit; // set to true after InitPaperFormats - bool m_bCompatMetrics; - - SalInfoPrinter() : m_bPapersInit( false ), m_bCompatMetrics( false ) {} - virtual ~SalInfoPrinter(); - - // SalGraphics or NULL, but two Graphics for all SalFrames - // must be returned - virtual SalGraphics* GetGraphics() = 0; - virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; - - virtual sal_Bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) = 0; - // This function set the driver data and - // set the new indepen data in pSetupData - virtual sal_Bool SetPrinterData( ImplJobSetup* pSetupData ) = 0; - // This function merged the indepen driver data - // and set the new indepen data in pSetupData - // Only the data must changed, where the bit - // in nFlags is set - virtual sal_Bool SetData( sal_uLong nFlags, ImplJobSetup* pSetupData ) = 0; - - virtual void GetPageInfo( const ImplJobSetup* pSetupData, - long& rOutWidth, long& rOutHeight, - long& rPageOffX, long& rPageOffY, - long& rPageWidth, long& rPageHeight ) = 0; - virtual sal_uLong GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType ) = 0; - virtual sal_uLong GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0; - virtual String GetPaperBinName( const ImplJobSetup* pSetupData, sal_uLong nPaperBin ) = 0; - // fills m_aPaperFormats and sets m_bPapersInit to true - virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) = 0; - // returns angle that a landscape page will be turned counterclockwise wrt to portrait - virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) = 0; -}; - -// -------------- -// - SalPrinter - -// -------------- - -class VCL_PLUGIN_PUBLIC SalPrinter -{ -public: // public for Sal Implementation - SalPrinter() {} - virtual ~SalPrinter(); - - virtual sal_Bool StartJob( const String* pFileName, - const String& rJobName, - const String& rAppName, - sal_uLong nCopies, - bool bCollate, - bool bDirect, - ImplJobSetup* pSetupData ) = 0; - - // implement for pull model print systems only, - // default implementations (see salvtables.cxx) just returns sal_False - virtual sal_Bool StartJob( const String* pFileName, - const String& rJobName, - const String& rAppName, - ImplJobSetup* pSetupData, - vcl::PrinterController& rController ); - - virtual sal_Bool EndJob() = 0; - virtual sal_Bool AbortJob() = 0; - virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData ) = 0; - virtual sal_Bool EndPage() = 0; - virtual sal_uLong GetErrorCode() = 0; - -}; - -#endif // _SV_SALPRN_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salptype.hxx b/vcl/inc/vcl/salptype.hxx deleted file mode 100644 index ca47f599271c..000000000000 --- a/vcl/inc/vcl/salptype.hxx +++ /dev/null @@ -1,63 +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_SALPTYPE_HXX -#define _SV_SALPTYPE_HXX - -#include <vcl/sv.h> - -// -------------------- -// - SalJobSetupFlags - -// -------------------- - -#define SAL_JOBSET_ORIENTATION ((sal_uLong)0x00000001) -#define SAL_JOBSET_PAPERBIN ((sal_uLong)0x00000002) -#define SAL_JOBSET_PAPERSIZE ((sal_uLong)0x00000004) -#define SAL_JOBSET_DUPLEXMODE ((sal_uLong)0x00000008) -#define SAL_JOBSET_ALL (SAL_JOBSET_ORIENTATION |\ - SAL_JOBSET_PAPERBIN |\ - SAL_JOBSET_PAPERSIZE |\ - SAL_JOBSET_DUPLEXMODE) - -// ------------------- -// - SalPrinterError - -// ------------------- - -#define SAL_PRINTER_ERROR_GENERALERROR 1 -#define SAL_PRINTER_ERROR_ABORT 2 - -// ------------------- -// - SalPrinterProcs - -// ------------------- - -class SalPrinter; -typedef long (*SALPRNABORTPROC)( void* pInst, SalPrinter* pPrinter ); - -#endif // _SV_SALPTYPE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salsession.hxx b/vcl/inc/vcl/salsession.hxx deleted file mode 100644 index c912565a920c..000000000000 --- a/vcl/inc/vcl/salsession.hxx +++ /dev/null @@ -1,120 +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 _VCL_SALSESSION_HXX -#define _VCL_SALSESSION_HXX - -#include "vcl/dllapi.h" - -enum SalSessionEventType -{ - Interaction, - SaveRequest, - ShutdownCancel, - Quit -}; - -struct SalSessionEvent -{ - SalSessionEventType m_eType; - - SalSessionEvent( SalSessionEventType eType ) - : m_eType( eType ) - {} -}; - -struct SalSessionInteractionEvent : public SalSessionEvent -{ - bool m_bInteractionGranted; - - SalSessionInteractionEvent( bool bGranted ) - : SalSessionEvent( Interaction ), - m_bInteractionGranted( bGranted ) - {} -}; - -struct SalSessionSaveRequestEvent : public SalSessionEvent -{ - bool m_bShutdown; - bool m_bCancelable; - - SalSessionSaveRequestEvent( bool bShutdown, bool bCancelable ) - : SalSessionEvent( SaveRequest ), - m_bShutdown( bShutdown ), - m_bCancelable( bCancelable ) - {} -}; - -struct SalSessionShutdownCancelEvent : public SalSessionEvent -{ - SalSessionShutdownCancelEvent() - : SalSessionEvent( ShutdownCancel ) - {} -}; - -struct SalSessionQuitEvent : public SalSessionEvent -{ - SalSessionQuitEvent() - : SalSessionEvent( Quit ) - {} -}; - -typedef void(*SessionProc)( SalSessionEvent *pEvent); - -class VCL_PLUGIN_PUBLIC SalSession -{ - SessionProc m_aProc; -public: - SalSession() - : m_aProc( 0 ) - {} - virtual ~SalSession(); - - void SetCallback( SessionProc aCallback ) - { - m_aProc = aCallback; - } - void CallCallback( SalSessionEvent* pEvent ) - { - if( m_aProc ) - m_aProc( pEvent ); - } - - // query the session manager for a user interaction slot - virtual void queryInteraction() = 0; - // signal the session manager that we're done with user interaction - virtual void interactionDone() = 0; - // signal that we're done saving - virtual void saveDone() = 0; - // try to cancel the sutdown in progress - virtual bool cancelShutdown() = 0; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salsys.hxx b/vcl/inc/vcl/salsys.hxx deleted file mode 100644 index 2f2f6d08e9e6..000000000000 --- a/vcl/inc/vcl/salsys.hxx +++ /dev/null @@ -1,149 +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_SALSYS_HXX -#define _SV_SALSYS_HXX - -#include <tools/string.hxx> -#include <tools/gen.hxx> -#include <vcl/dllapi.h> - - -/* Button combinations for ShowNativeMessageBox -*/ -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK = 0; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK_CANCEL = 1; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_ABORT_RETRY_IGNORE = 2; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL = 3; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO = 4; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL = 5; - -/* Button identifier for ShowNativeMessageBox -*/ -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_OK = 1; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_CANCEL = 2; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT = 3; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY = 4; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE = 5; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES = 6; -const int SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO = 7; - - - -// ------------- -// - SalSystem - -// ------------- - -class VCL_PLUGIN_PUBLIC SalSystem -{ -public: - SalSystem() {} - virtual ~SalSystem(); - - // get info about the display - - /* Gets the number of active screens attached to the display - - @returns the number of active screens - */ - virtual unsigned int GetDisplayScreenCount() = 0; - /* Queries whether multiple screens are truly separate - - @returns true if screens are distinct and windows cannot - be moved between them or span multiple of them - false if screens form up one big display - */ - virtual bool IsMultiDisplay() = 0; - /* Queries the default screen number. The default screen is the - screen on which windows will appear if no special positioning - is made. - - @returns the default screen number - */ - virtual unsigned int GetDefaultDisplayNumber() = 0; - /* Gets relative position and size of the screens attached to the display - - @param nScreen - The screen number to be queried - - @returns position: (0,0) in case of IsMultiscreen() == true - else position relative to whole display - size: size of the screen - */ - virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ) = 0; - /* Gets position and size of the work area of a screen attached to the display - - @param nScreen - The screen number to be queried - - @returns position and size relative to the scree - */ - virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ) = 0; - /* Gets the name of a screen - - @param nScreen - The screen number to be queried - - @returns the name of the screen - */ - virtual rtl::OUString GetScreenName( unsigned int nScreen ) = 0; - - /* Shows a native message box with the specified title, message and button - combination. - - @param rTitle - The title to be shown by the dialog box. - - @param rMessage - The message to be shown by the dialog box. - - @param nButtonCombination - Specify which button combination the message box should display. - See button combinations above. - - @param nDefaultButton - Specifies which button has the focus initially. - See button identifiers above. - The effect of specifying a button that doesn't belong - to the specified button combination is undefined. - - @returns the identifier of the button that was pressed by the user. - See button identifier above. If the function fails the - return value is 0. - */ - virtual int ShowNativeMessageBox( const String& rTitle, - const String& rMessage, - int nButtonCombination, - int nDefaultButton) = 0; -}; - -SalSystem* ImplGetSalSystem(); - -#endif // _SV_SALSYS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salvd.hxx b/vcl/inc/vcl/salvd.hxx deleted file mode 100644 index 68ed56a901d8..000000000000 --- a/vcl/inc/vcl/salvd.hxx +++ /dev/null @@ -1,61 +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_SALVD_HXX -#define _SV_SALVD_HXX - -#include <vcl/sv.h> -#include <vcl/dllapi.h> - -class SalGraphics; - -// -------------------- -// - SalVirtualDevice - -// -------------------- - -class VCL_PLUGIN_PUBLIC SalVirtualDevice -{ -public: // public for Sal Implementation - SalVirtualDevice() {} - virtual ~SalVirtualDevice(); - - // SalGraphics or NULL, but two Graphics for all SalVirtualDevices - // must be returned - virtual SalGraphics* GetGraphics() = 0; - virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; - - // Set new size, without saving the old contents - virtual sal_Bool SetSize( long nNewDX, long nNewDY ) = 0; - - /// Get actual VDev size in pixel - virtual void GetSize( long& rWidth, long& rHeight ) = 0; -}; - -#endif // _SV_SALVD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/salwtype.hxx b/vcl/inc/vcl/salwtype.hxx deleted file mode 100644 index d8bd6c527f85..000000000000 --- a/vcl/inc/vcl/salwtype.hxx +++ /dev/null @@ -1,349 +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_SALWTYPE_HXX -#define _SV_SALWTYPE_HXX - -#include <i18npool/lang.h> -#include <tools/string.hxx> -#include <vcl/sv.h> - -class SalGraphics; -class SalFrame; -class SalObject; -class Window; - -class ImplFontSelectData; - -// --------------- -// - SalExtInput - -// --------------- - -// Muessen mit den Defines in cmdevt.hxx uebereinstimmen, da diese -// nicht konvertiert werden -#define SAL_EXTTEXTINPUT_ATTR_GRAYWAVELINE ((sal_uInt16)0x0100) -#define SAL_EXTTEXTINPUT_ATTR_UNDERLINE ((sal_uInt16)0x0200) -#define SAL_EXTTEXTINPUT_ATTR_BOLDUNDERLINE ((sal_uInt16)0x0400) -#define SAL_EXTTEXTINPUT_ATTR_DOTTEDUNDERLINE ((sal_uInt16)0x0800) -#define SAL_EXTTEXTINPUT_ATTR_DASHDOTUNDERLINE ((sal_uInt16)0x1000) -#define SAL_EXTTEXTINPUT_ATTR_HIGHLIGHT ((sal_uInt16)0x2000) -#define SAL_EXTTEXTINPUT_ATTR_REDTEXT ((sal_uInt16)0x4000) -#define SAL_EXTTEXTINPUT_ATTR_HALFTONETEXT ((sal_uInt16)0x8000) - -#define SAL_EXTTEXTINPUT_CURSOR_INVISIBLE ((sal_uInt16)0x0001) -#define SAL_EXTTEXTINPUT_CURSOR_OVERWRITE ((sal_uInt16)0x0002) - -// ------------ -// - SalEvent - -// ------------ - -#define SALEVENT_MOUSEMOVE ((sal_uInt16)1) -#define SALEVENT_MOUSELEAVE ((sal_uInt16)2) -#define SALEVENT_MOUSEBUTTONDOWN ((sal_uInt16)3) -#define SALEVENT_MOUSEBUTTONUP ((sal_uInt16)4) -#define SALEVENT_KEYINPUT ((sal_uInt16)5) -#define SALEVENT_KEYUP ((sal_uInt16)6) -#define SALEVENT_KEYMODCHANGE ((sal_uInt16)7) -#define SALEVENT_PAINT ((sal_uInt16)8) -#define SALEVENT_RESIZE ((sal_uInt16)9) -#define SALEVENT_GETFOCUS ((sal_uInt16)10) -#define SALEVENT_LOSEFOCUS ((sal_uInt16)11) -#define SALEVENT_CLOSE ((sal_uInt16)12) -#define SALEVENT_SHUTDOWN ((sal_uInt16)13) -#define SALEVENT_SETTINGSCHANGED ((sal_uInt16)14) -#define SALEVENT_VOLUMECHANGED ((sal_uInt16)15) -#define SALEVENT_PRINTERCHANGED ((sal_uInt16)16) -#define SALEVENT_DISPLAYCHANGED ((sal_uInt16)17) -#define SALEVENT_FONTCHANGED ((sal_uInt16)18) -#define SALEVENT_DATETIMECHANGED ((sal_uInt16)19) -#define SALEVENT_KEYBOARDCHANGED ((sal_uInt16)20) -#define SALEVENT_WHEELMOUSE ((sal_uInt16)21) -#define SALEVENT_USEREVENT ((sal_uInt16)22) -#define SALEVENT_MOUSEACTIVATE ((sal_uInt16)23) -#define SALEVENT_EXTTEXTINPUT ((sal_uInt16)24) -#define SALEVENT_ENDEXTTEXTINPUT ((sal_uInt16)25) -#define SALEVENT_EXTTEXTINPUTPOS ((sal_uInt16)26) -#define SALEVENT_INPUTCONTEXTCHANGE ((sal_uInt16)27) -#define SALEVENT_MOVE ((sal_uInt16)28) -#define SALEVENT_MOVERESIZE ((sal_uInt16)29) -#define SALEVENT_CLOSEPOPUPS ((sal_uInt16)30) -#define SALEVENT_EXTERNALKEYINPUT ((sal_uInt16)31) -#define SALEVENT_EXTERNALKEYUP ((sal_uInt16)32) -#define SALEVENT_MENUCOMMAND ((sal_uInt16)33) -#define SALEVENT_MENUHIGHLIGHT ((sal_uInt16)34) -#define SALEVENT_MENUACTIVATE ((sal_uInt16)35) -#define SALEVENT_MENUDEACTIVATE ((sal_uInt16)36) -#define SALEVENT_EXTERNALMOUSEMOVE ((sal_uInt16)37) -#define SALEVENT_EXTERNALMOUSEBUTTONDOWN ((sal_uInt16)38) -#define SALEVENT_EXTERNALMOUSEBUTTONUP ((sal_uInt16)39) -#define SALEVENT_INPUTLANGUAGECHANGE ((sal_uInt16)40) -#define SALEVENT_SHOWDIALOG ((sal_uInt16)41) -#define SALEVENT_MENUBUTTONCOMMAND ((sal_uInt16)42) -#define SALEVENT_SURROUNDINGTEXTREQUEST ((sal_uInt16)43) -#define SALEVENT_SURROUNDINGTEXTSELECTIONCHANGE ((sal_uInt16)44) -#define SALEVENT_STARTRECONVERSION ((sal_uInt16)45) -#define SALEVENT_COUNT ((sal_uInt16)45) - -// MOUSELEAVE must send, when the pointer leave the client area and -// the mouse is not captured -// MOUSEMOVE, MOUSELEAVE, MOUSEBUTTONDOWN and MOUSEBUTTONUP -// MAC: Ctrl+Button is MOUSE_RIGHT -struct SalMouseEvent -{ - sal_uLong mnTime; // Time in ms, when event is created - long mnX; // X-Position (Pixel, TopLeft-Output) - long mnY; // Y-Position (Pixel, TopLeft-Output) - sal_uInt16 mnButton; // 0-MouseMove/MouseLeave, MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE - sal_uInt16 mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT) -}; - -// KEYINPUT and KEYUP -struct SalKeyEvent -{ - sal_uLong mnTime; // Time in ms, when event is created - sal_uInt16 mnCode; // SV-KeyCode (KEY_xxx | KEY_SHIFT | KEY_MOD1 | KEY_MOD2) - sal_uInt16 mnCharCode; // SV-CharCode - sal_uInt16 mnRepeat; // Repeat-Count (KeyInputs-1) -}; - -// MENUEVENT -struct SalMenuEvent -{ - sal_uInt16 mnId; // Menu item ID - void* mpMenu; // pointer to VCL menu (class Menu) - - SalMenuEvent() : mnId( 0 ), mpMenu( NULL ) {} - SalMenuEvent( sal_uInt16 i_nId, void* i_pMenu ) - : mnId( i_nId ), mpMenu( i_pMenu ) {} -}; - -// KEYMODCHANGE -struct SalKeyModEvent -{ - sal_uLong mnTime; // Time in ms, when event is created - sal_uInt16 mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2) - sal_uInt16 mnModKeyCode; // extended Modifier (MODKEY_LEFT, MODKEY_RIGHT, MODKEY_PRESS, MODKEY_RELEASE) -}; - -// PAINT -struct SalPaintEvent -{ - long mnBoundX; // BoundRect - X - long mnBoundY; // BoundRect - Y - long mnBoundWidth; // BoundRect - Width - long mnBoundHeight; // BoundRect - Height - bool mbImmediateUpdate; // set to true to force an immediate update - - SalPaintEvent( long x, long y, long w, long h, bool bImmediate = false ) : - mnBoundX( x ), mnBoundY( y ), - mnBoundWidth( w ), mnBoundHeight( h ), - mbImmediateUpdate( bImmediate ) - {} -}; - -// USEREVENT -// pEvent == pData - -// WHEELMOUSE -#define SAL_WHEELMOUSE_EVENT_PAGESCROLL ((sal_uLong)0xFFFFFFFF) -struct SalWheelMouseEvent -{ - sal_uLong mnTime; // Time in ms, when event is created - long mnX; // X-Position (Pixel, TopLeft-Output) - long mnY; // Y-Position (Pixel, TopLeft-Output) - long mnDelta; // Anzahl Drehungen - long mnNotchDelta; // Anzahl feste Drehungen - sal_uLong mnScrollLines; // Aktuelle Anzahl zu scrollende Zeilen - sal_uInt16 mnCode; // SV-ModifierCode (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT) - sal_Bool mbHorz; // Horizontal - sal_Bool mbDeltaIsPixel; // delta value is a pixel value (on mac) - - SalWheelMouseEvent() - : mnTime( 0 ), mnX( 0 ), mnY( 0 ), mnDelta( 0 ), mnNotchDelta( 0 ), mnScrollLines( 0 ), mnCode( 0 ), mbHorz( sal_False ), mbDeltaIsPixel( sal_False ) - {} -}; - -// MOUSEACTIVATE -struct SalMouseActivateEvent -{ - long mnX; // X-Position (Pixel, TopLeft-Output) - long mnY; // Y-Position (Pixel, TopLeft-Output) -}; - -#ifdef __cplusplus - -// EXTTEXTINPUT -struct SalExtTextInputEvent -{ - sal_uLong mnTime; // Time in ms, when event is created - UniString maText; // Text - const sal_uInt16* mpTextAttr; // Text-Attribute - sal_uLong mnCursorPos; // Cursor-Position - sal_uLong mnDeltaStart; // Start-Position der letzten Aenderung - sal_uInt8 mnCursorFlags; // SAL_EXTTEXTINPUT_CURSOR_xxx - sal_Bool mbOnlyCursor; // sal_True: Nur Cursor-Position wurde geaendert -}; - -#endif // __cplusplus - -// EXTTEXTINPUTPOS -struct SalExtTextInputPosEvent -{ - long mnX; // Cursor-X-Position to upper left corner of frame - long mnY; // Cursor-Y-Position to upper left corner of frame - long mnWidth; // Cursor-Width in Pixel - long mnHeight; // Cursor-Height in Pixel - long mnExtWidth; // Width of the PreEdit area - bool mbVertical; // true if in vertical mode -}; - -#ifdef __cplusplus - -// INPUTCONTEXTCHANGE -struct SalInputContextChangeEvent -{ - LanguageType meLanguage; // Neue Sprache -}; - -#endif // __cplusplus - -#ifdef __cplusplus - -// SURROUNDINGTEXTREQUEST -struct SalSurroundingTextRequestEvent -{ - UniString maText; // Text - sal_uLong mnStart; // The beggining index of selected range - sal_uLong mnEnd; // The end index of selected range -}; - -#endif // __cplusplus - -#ifdef __cplusplus - -// SURROUNDINGTEXTSELECTIONCHANGE -struct SalSurroundingTextSelectionChangeEvent -{ - sal_uLong mnStart; // The beggining index of selected range - sal_uLong mnEnd; // The end index of selected range -}; - -#endif // __cplusplus - -// ------------------ -// - SalFrame-Types - -// ------------------ - -typedef long (*SALFRAMEPROC)( Window* pInst, SalFrame* pFrame, - sal_uInt16 nEvent, const void* pEvent ); - -// -------------------- -// - SalObject-Events - -// -------------------- - -#define SALOBJ_EVENT_GETFOCUS ((sal_uInt16)1) -#define SALOBJ_EVENT_LOSEFOCUS ((sal_uInt16)2) -#define SALOBJ_EVENT_TOTOP ((sal_uInt16)3) -#define SALOBJ_EVENT_COUNT ((sal_uInt16)4) - -// ------------------ -// - SalObject-Types - -// ------------------ - -typedef long (*SALOBJECTPROC)( void* pInst, SalObject* pObject, - sal_uInt16 nEvent, const void* pEvent ); - -// ----------------- -// - SalFrameState - -// ----------------- - -// Must be the same as in syswin.hxx -#define SAL_FRAMESTATE_MASK_X ((sal_uLong)0x00000001) -#define SAL_FRAMESTATE_MASK_Y ((sal_uLong)0x00000002) -#define SAL_FRAMESTATE_MASK_WIDTH ((sal_uLong)0x00000004) -#define SAL_FRAMESTATE_MASK_HEIGHT ((sal_uLong)0x00000008) -#define SAL_FRAMESTATE_MASK_MAXIMIZED_X ((sal_uLong)0x00000100) -#define SAL_FRAMESTATE_MASK_MAXIMIZED_Y ((sal_uLong)0x00000200) -#define SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH ((sal_uLong)0x00000400) -#define SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT ((sal_uLong)0x00000800) -#define SAL_FRAMESTATE_MASK_STATE ((sal_uLong)0x00000010) - -#define SAL_FRAMESTATE_NORMAL ((sal_uLong)0x00000001) -#define SAL_FRAMESTATE_MINIMIZED ((sal_uLong)0x00000002) -#define SAL_FRAMESTATE_MAXIMIZED ((sal_uLong)0x00000004) -#define SAL_FRAMESTATE_ROLLUP ((sal_uLong)0x00000008) -#define SAL_FRAMESTATE_MAXIMIZED_HORZ ((sal_uLong)0x00000010) -#define SAL_FRAMESTATE_MAXIMIZED_VERT ((sal_uLong)0x00000020) -#define SAL_FRAMESTATE_SYSTEMMASK ((sal_uLong)0x0000FFFF) - -struct SalFrameState -{ - sal_uLong mnMask; - long mnX; - long mnY; - long mnWidth; - long mnHeight; - long mnMaximizedX; - long mnMaximizedY; - long mnMaximizedWidth; - long mnMaximizedHeight; - sal_uLong mnState; -}; - -// ------------------- -// - SalInputContext - -// ------------------- - -// Muessen mit den Defines in inputctx.hxx uebereinstimmen, da diese -// nicht konvertiert werden -#define SAL_INPUTCONTEXT_TEXT ((sal_uLong)0x00000001) -#define SAL_INPUTCONTEXT_EXTTEXTINPUT ((sal_uLong)0x00000002) -#define SAL_INPUTCONTEXT_EXTTEXTINPUT_ON ((sal_uLong)0x00000004) -#define SAL_INPUTCONTEXT_EXTTEXTINPUT_OFF ((sal_uLong)0x00000008) -#define SAL_INPUTCONTEXT_CHANGELANGUAGE ((sal_uLong)0x00000010) - -#ifdef __cplusplus - -struct SalInputContext -{ - ImplFontSelectData* mpFont; - LanguageType meLanguage; - sal_uLong mnOptions; -}; - -#endif // __cplusplus - -// ------------------ -// - SalTimer-Types - -// ------------------ - -typedef void (*SALTIMERPROC)(); - -#endif // _SV_SALWTYPE_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/subedit.hxx b/vcl/inc/vcl/subedit.hxx deleted file mode 100644 index 17b22e2b5587..000000000000 --- a/vcl/inc/vcl/subedit.hxx +++ /dev/null @@ -1,51 +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_SUBEDIT_HXX -#define _SV_SUBEDIT_HXX - -#include <vcl/sv.h> -#include <vcl/edit.hxx> - -// --------------- -// - ImplSubEdit - -// --------------- - -class ImplSubEdit : public Edit -{ -public: - ImplSubEdit( Edit* pParent, WinBits nStyle ); - - Edit* GetParent() const { return (Edit*)Edit::GetParent(); } - - virtual void Modify(); -}; - -#endif // _SV_SUBEDIT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/svcompat.hxx b/vcl/inc/vcl/svcompat.hxx deleted file mode 100644 index 70d31381287f..000000000000 --- a/vcl/inc/vcl/svcompat.hxx +++ /dev/null @@ -1,73 +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_SVCOMPAT_HXX -#define _SV_SVCOMPAT_HXX - -#include <sv.h> - -// ----------- -// - Defines - -// ----------- - -#define COMPAT_FORMAT( char1, char2, char3, char4 ) \ - ((sal_uLong)((((sal_uLong)(char)(char1)))| \ - (((sal_uLong)(char)(char2))<<8UL)| \ - (((sal_uLong)(char)(char3))<<16UL)| \ - ((sal_uLong)(char)(char4))<<24UL)) - - -class SvStream; - -// -------------- -// - ImplCompat - -// -------------- - -class ImplCompat -{ - SvStream* mpRWStm; - sal_uInt32 mnCompatPos; - sal_uInt32 mnTotalSize; - sal_uInt16 mnStmMode; - sal_uInt16 mnVersion; - - ImplCompat() {} - ImplCompat( const ImplCompat& rCompat ) {} - ImplCompat& operator=( const ImplCompat& rCompat ) { return *this; } - sal_Bool operator==( const ImplCompat& rCompat ) { return sal_False; } - -public: - ImplCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion = 1 ); - ~ImplCompat(); - - sal_uInt16 GetVersion() const { return mnVersion; } -}; - -#endif // _SV_SVCOMPAT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx deleted file mode 100644 index b28283f1a405..000000000000 --- a/vcl/inc/vcl/svdata.hxx +++ /dev/null @@ -1,461 +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_SVDATA_HXX -#define _SV_SVDATA_HXX - -#include <osl/thread.hxx> -#include <rtl/ref.hxx> -#include "tools/gen.hxx" -#include "tools/shl.hxx" -#include "tools/link.hxx" -#include "tools/fldunit.hxx" -#include "tools/string.hxx" -#include "vcl/vclevent.hxx" -#include "vcl/sv.h" -#include "tools/color.hxx" -#include "tools/debug.hxx" -#include "vcl/dllapi.h" -#include "com/sun/star/uno/Reference.hxx" -#include "unotools/options.hxx" - -#include <boost/unordered_map.hpp> - -namespace com { -namespace sun { -namespace star { -namespace lang { - class XMultiServiceFactory; -} -namespace frame { - class XSessionManagerClient; -} -}}} - -struct ImplTimerData; -struct ImplFileImageCacheData; -struct ImplConfigData; -class ImplDirectFontSubstitution; -struct ImplHotKey; -struct ImplEventHook; -class Point; -class Rectangle; -class ImpResMgr; -class ResMgr; -class UniqueIndex; -class ImplAccelManager; -class ImplDevFontList; -class ImplFontCache; -class HelpTextWindow; -class ImplTBDragMgr; -class ImplButtonList; -class ImplIdleMgr; -class DbgWindow; -class FloatingWindow; -class AllSettings; -class KeyCode; -class NotifyEvent; -class Timer; -class AutoTimer; -class Help; -class ImageList; -class Image; -class PopupMenu; -class Application; -class OutputDevice; -class Window; -class SystemWindow; -class WorkWindow; -class Dialog; -class VirtualDevice; -class Printer; -class SalFrame; -class SalInstance; -class SalSystem; -class SalProcessWindowList; -class SalTrayList; -class UniqueIdContainer; -class List; -class ImplPrnQueueList; -class ImplVDevCache; -class UnoWrapperBase; -class GraphicConverter; -class ImplWheelWindow; -class SalTimer; -class SalI18NImeStatus; -class DockingManager; -class VclEventListeners2; - -namespace vcl { class DisplayConnection; class SettingsConfigItem; class DeleteOnDeinitBase; } -namespace utl { class DefaultFontConfiguration; class FontSubstConfiguration; } - -// ----------------- -// - ImplSVAppData - -// ----------------- -class LocaleConfigurationListener : public utl::ConfigurationListener -{ -public: - virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); -}; - -struct ImplSVAppData -{ - enum ImeStatusWindowMode - { - ImeStatusWindowMode_UNKNOWN, - ImeStatusWindowMode_HIDE, - ImeStatusWindowMode_SHOW - }; - - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; - String* mpMSFTempFileName; - AllSettings* mpSettings; // Application settings - LocaleConfigurationListener* mpCfgListener; - VclEventListeners* mpEventListeners; // listeners for vcl events (eg, extended toolkit) - VclEventListeners* mpKeyListeners; // listeners for key events only (eg, extended toolkit) - ImplAccelManager* mpAccelMgr; // Accelerator Manager - XubString* mpAppName; // Application name - XubString* mpAppFileName; // Abs. Application FileName - XubString* mpDisplayName; // Application Display Name - String* mpFontPath; // Additional Fontpath - Help* mpHelp; // Application help - PopupMenu* mpActivePopupMenu; // Actives Popup-Menu (in Execute) - UniqueIdContainer* mpUniqueIdCont; // Fuer Eindeutige Id's - ImplIdleMgr* mpIdleMgr; // Idle-Manager - ImplWheelWindow* mpWheelWindow; // WheelWindow - ImplHotKey* mpFirstHotKey; // HotKey-Verwaltung - ImplEventHook* mpFirstEventHook; // Event-Hooks - VclEventListeners2* mpPostYieldListeners; // post yield listeners - sal_uLong mnLastInputTime; // GetLastInputTime() - sal_uInt16 mnDispatchLevel; // DispatchLevel - sal_uInt16 mnModalMode; // ModalMode Count - sal_uInt16 mnModalDialog; // ModalDialog Count - sal_uInt16 mnAccessCount; // AccessHdl Count - sal_uInt16 mnSysWinMode; // Modus, wann SystemWindows erzeugt werden sollen - sal_uInt16 mnLayout; // --- RTL-Flags --- currently not used, only for testing - short mnDialogScaleX; // Scale X-Positions and sizes in Dialogs - sal_Bool mbInAppMain; // is Application::Main() on stack - sal_Bool mbInAppExecute; // is Application::Execute() on stack - sal_Bool mbAppQuit; // is Application::Quit() called - sal_Bool mbSettingsInit; // sal_True: Settings are initialized - sal_Bool mbDialogCancel; // sal_True: Alle Dialog::Execute()-Aufrufe werden mit return sal_False sofort beendet - sal_Bool mbNoYield; // Application::Yield will not wait for events if the queue is empty - // essentially that makes it the same as Application::Reschedule - long mnDefaultLayoutBorder; // default value in pixel for layout distances used - // in window arrangers - - /** Controls whether showing any IME status window is toggled on or off. - - Only meaningful if showing IME status windows can be toggled on and off - externally (see Application::CanToggleImeStatusWindow). - */ - ImeStatusWindowMode meShowImeStatusWindow; - - DECL_STATIC_LINK( ImplSVAppData, ImplQuitMsg, void* ); - -}; - - -// ----------------- -// - ImplSVGDIData - -// ----------------- - -struct ImplSVGDIData -{ - OutputDevice* mpFirstWinGraphics; // First OutputDevice with a Frame Graphics - OutputDevice* mpLastWinGraphics; // Last OutputDevice with a Frame Graphics - OutputDevice* mpFirstVirGraphics; // First OutputDevice with a VirtualDevice Graphics - OutputDevice* mpLastVirGraphics; // Last OutputDevice with a VirtualDevice Graphics - OutputDevice* mpFirstPrnGraphics; // First OutputDevice with a InfoPrinter Graphics - OutputDevice* mpLastPrnGraphics; // Last OutputDevice with a InfoPrinter Graphics - VirtualDevice* mpFirstVirDev; // First VirtualDevice - VirtualDevice* mpLastVirDev; // Last VirtualDevice - Printer* mpFirstPrinter; // First Printer - Printer* mpLastPrinter; // Last Printer - ImplPrnQueueList* mpPrinterQueueList; // List of all printer queue - ImplDevFontList* mpScreenFontList; // Screen-Font-List - ImplFontCache* mpScreenFontCache; // Screen-Font-Cache - ImplDirectFontSubstitution* mpDirectFontSubst;// Font-Substitutons defined in Tools->Options->Fonts - GraphicConverter* mpGrfConverter; // Converter for graphics - long mnRealAppFontX; // AppFont X-Numenator for 40/tel Width - long mnAppFontX; // AppFont X-Numenator for 40/tel Width + DialogScaleX - long mnAppFontY; // AppFont Y-Numenator for 80/tel Height - sal_Bool mbFontSubChanged; // sal_True: FontSubstitution wurde zwischen Begin/End geaendert - utl::DefaultFontConfiguration* mpDefaultFontConfiguration; - utl::FontSubstConfiguration* mpFontSubstConfiguration; - bool mbNativeFontConfig; // true: do not override UI font - bool mbNoXORClipping; // true: do not use XOR to achieve clipping effects -}; - - -// ----------------- -// - ImplSVWinData - -// ----------------- - -struct ImplSVWinData -{ - Window* mpFirstFrame; // First FrameWindow - Window* mpDefDialogParent; // Default Dialog Parent - WorkWindow* mpAppWin; // Application-Window - Window* mpFocusWin; // window, that has the focus - Window* mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set - Window* mpCaptureWin; // window, that has the mouse capture - Window* mpLastDeacWin; // Window, that need a deactivate (FloatingWindow-Handling) - DbgWindow* mpDbgWin; // debug window - FloatingWindow* mpFirstFloat; // First FloatingWindow in PopupMode - Dialog* mpLastExecuteDlg; // Erster Dialog, der sich in Execute befindet - Window* mpExtTextInputWin; // Window, which is in ExtTextInput - Window* mpTrackWin; // window, that is in tracking mode - AutoTimer* mpTrackTimer; // tracking timer - ImageList* mpMsgBoxImgList; // ImageList for MessageBox - Window* mpAutoScrollWin; // window, that is in AutoScrollMode mode - sal_uInt16 mnTrackFlags; // tracking flags - sal_uInt16 mnAutoScrollFlags; // auto scroll flags - sal_Bool mbNoDeactivate; // sal_True: keine Deactivate durchfuehren - sal_Bool mbNoSaveFocus; // sal_True: menues must not save/restore focus - sal_Bool mbNoSaveBackground; // sal_True: save background is unnecessary or even less performant -}; - - -// ------------------ -// - ImplSVCtrlData - -// ------------------ - -typedef std::vector< std::pair< String, FieldUnit > > FieldUnitStringList; - -struct ImplSVCtrlData -{ - ImageList* mpCheckImgList; // ImageList for CheckBoxes - ImageList* mpRadioImgList; // ImageList for RadioButtons - ImageList* mpPinImgList; // ImageList for PIN - ImageList* mpSplitHPinImgList; // ImageList for Horizontale SplitWindows - ImageList* mpSplitVPinImgList; // ImageList for Vertikale SplitWindows (PIN's) - ImageList* mpSplitHArwImgList; // ImageList for Horizontale SplitWindows (Arrows) - ImageList* mpSplitVArwImgList; // ImageList for Vertikale SplitWindows (Arrows) - Image* mpDisclosurePlus; - Image* mpDisclosureMinus; - ImplTBDragMgr* mpTBDragMgr; // DragMgr for ToolBox - sal_uInt16 mnCheckStyle; // CheckBox-Style for ImageList-Update - sal_uInt16 mnRadioStyle; // Radio-Style for ImageList-Update - sal_uLong mnLastCheckFColor; // Letzte FaceColor fuer CheckImage - sal_uLong mnLastCheckWColor; // Letzte WindowColor fuer CheckImage - sal_uLong mnLastCheckWTextColor; // Letzte WindowTextColor fuer CheckImage - sal_uLong mnLastCheckLColor; // Letzte LightColor fuer CheckImage - sal_uLong mnLastRadioFColor; // Letzte FaceColor fuer RadioImage - sal_uLong mnLastRadioWColor; // Letzte WindowColor fuer RadioImage - sal_uLong mnLastRadioLColor; // Letzte LightColor fuer RadioImage - FieldUnitStringList* mpFieldUnitStrings; // list with field units - FieldUnitStringList* mpCleanUnitStrings; // same list but with some "fluff" like spaces removed -}; - - -// ------------------ -// - ImplSVHelpData - -// ------------------ - -struct ImplSVHelpData -{ - sal_Bool mbContextHelp : 1; // is ContextHelp enabled - sal_Bool mbExtHelp : 1; // is ExtendedHelp enabled - sal_Bool mbExtHelpMode : 1; // is in ExtendedHelp Mode - sal_Bool mbOldBalloonMode : 1; // BallonMode, befor ExtHelpMode started - sal_Bool mbBalloonHelp : 1; // is BalloonHelp enabled - sal_Bool mbQuickHelp : 1; // is QuickHelp enabled - sal_Bool mbSetKeyboardHelp : 1; // tiphelp was activated by keyboard - sal_Bool mbKeyboardHelp : 1; // tiphelp was activated by keyboard - sal_Bool mbAutoHelpId : 1; // generate HelpIds - sal_Bool mbRequestingHelp : 1; // In Window::RequestHelp - HelpTextWindow* mpHelpWin; // HelpWindow - sal_uLong mnLastHelpHideTime; // ticks of last show -}; - -struct ImplSVNWFData -{ - bool mbMenuBarDockingAreaCommonBG; // e.g. WinXP default theme - bool mbDockingAreaSeparateTB; // individual toolbar backgrounds - // instead of one for docking area - bool mbToolboxDropDownSeparate; // two adjacent buttons for - // toolbox dropdown buttons - int mnMenuFormatExtraBorder; // inner popup menu border - bool mbFlatMenu; // no popup 3D border - Color maMenuBarHighlightTextColor; // override higlight text color - // in menubar if not transparent - bool mbOpenMenuOnF10; // on gnome the first menu opens on F10 - bool mbNoFocusRects; // on Aqua focus rects are not used - bool mbNoBoldTabFocus; // on Aqua and Gnome the focused tab has not bold text - bool mbCenteredTabs; // on Aqua, tabs are centered - bool mbNoActiveTabTextRaise; // on Aqua the text for the selected tab - // should not "jump up" a pixel - bool mbProgressNeedsErase; // set true for platforms that should draw the - // window background before drawing the native - // progress bar - bool mbCheckBoxNeedsErase; // set true for platforms that should draw the - // window background before drawing the native - // checkbox - bool mbScrollbarJumpPage; // true for "jump to here" behavior - int mnStatusBarLowerRightOffset; // amount in pixel to avoid in the lower righthand corner - bool mbCanDrawWidgetAnySize; // set to true currently on gtk -}; - - -// -------------- -// - ImplSVData - -// -------------- - -struct ImplSVData -{ - void* mpSalData; // SalData - SalInstance* mpDefInst; // Default SalInstance - Application* mpApp; // pApp - WorkWindow* mpDefaultWin; // Default-Window - sal_Bool mbDeInit; // Is VCL deinitializing - sal_uLong mnThreadCount; // is VCL MultiThread enabled - ImplConfigData* mpFirstConfigData; // Zeiger auf ersten Config-Block - ImplTimerData* mpFirstTimerData; // list of all running timers - SalTimer* mpSalTimer; // interface to sal event loop/timers - SalI18NImeStatus* mpImeStatus; // interface to ime status window - SalSystem* mpSalSystem; // SalSystem interface - ResMgr* mpResMgr; // SV-Resource-Manager - sal_uLong mnTimerPeriod; // current timer period - sal_uLong mnTimerUpdate; // TimerCallbackProcs on stack - sal_Bool mbNotAllTimerCalled;// sal_True: Es muessen noch Timer abgearbeitet werden - sal_Bool mbNoCallTimer; // sal_True: No Timeout calls - ImplSVAppData maAppData; // indepen data for class Application - ImplSVGDIData maGDIData; // indepen data for Output classes - ImplSVWinData maWinData; // indepen data for Windows classes - ImplSVCtrlData maCtrlData; // indepen data for Control classes - ImplSVHelpData maHelpData; // indepen data for Help classes - ImplSVNWFData maNWFData; - UnoWrapperBase* mpUnoWrapper; - Window* mpIntroWindow; // the splash screen - DockingManager* mpDockingManager; - sal_Bool mbIsTestTool; - - oslThreadIdentifier mnMainThreadId; - rtl::Reference< vcl::DisplayConnection > mxDisplayConnection; - - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge; - com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient; - ::vcl::SettingsConfigItem* mpSettingsConfigItem; - std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList; - boost::unordered_map< int, rtl::OUString >* mpPaperNames; -}; - -void ImplInitSVData(); -void ImplDeInitSVData(); -void ImplDestroySVData(); -Window* ImplGetDefaultWindow(); -VCL_PLUGIN_PUBLIC ResMgr* ImplGetResMgr(); -VCL_PLUGIN_PUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr -DockingManager* ImplGetDockingManager(); -void ImplWindowAutoMnemonic( Window* pWindow ); - -void ImplUpdateSystemProcessWindow(); -Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos ); - -// SVAPP.CXX -sal_Bool ImplCallHotKey( const KeyCode& rKeyCode ); -void ImplFreeHotKeyData(); -void ImplFreeEventHookData(); - -// WINPROC.CXX -long ImplCallPreNotify( NotifyEvent& rEvt ); -long ImplCallEvent( NotifyEvent& rEvt ); - -extern VCL_PLUGIN_PUBLIC ImplSVData* pImplSVData; -inline VCL_PLUGIN_PUBLIC ImplSVData* ImplGetSVData() { return pImplSVData; } -inline ImplSVData* ImplGetAppSVData() { return ImplGetSVData(); } - -bool ImplInitAccessBridge( sal_Bool bAllowCancel, sal_Bool &rCancelled ); - -FieldUnitStringList* ImplGetFieldUnits(); -FieldUnitStringList* ImplGetCleanedFieldUnits(); - - -// ----------------------------------------------------------------------- - -// ----------------- -// - ImplSVEmpyStr - -// ----------------- - -// Empty-SV-String - -inline const String& ImplGetSVEmptyStr() - { return String::EmptyString(); } -inline const ByteString& ImplGetSVEmptyByteStr() - { return ByteString::EmptyString(); } - -// ----------------------------------------------------------------------- - -// ---------------------- -// - struct ImplDelData - -// ---------------------- -// ImplDelData is used as a "dog tag" by a window when it -// does something that could indirectly destroy the window -// TODO: wild destruction of a window should not be possible - -struct ImplDelData -{ - ImplDelData* mpNext; - const Window* mpWindow; - sal_Bool mbDel; - - ImplDelData( const Window* pWindow = NULL ) - : mpNext( NULL ), mpWindow( NULL ), mbDel( sal_False ) - { if( pWindow ) AttachToWindow( pWindow ); } - - virtual ~ImplDelData(); - - bool IsDead() const - { - DBG_ASSERT( mbDel == sal_False, "object deleted while in use !" ); - return (mbDel!=sal_False); - } - sal_Bool /*deprecated */IsDelete() const { return (sal_Bool)IsDead(); } - -private: - void AttachToWindow( const Window* ); -}; - -// --------------- -// - ImplSVEvent - -// --------------- - -struct ImplSVEvent -{ - sal_uLong mnEvent; - void* mpData; - Link* mpLink; - Window* mpWindow; - ImplDelData maDelData; - sal_Bool mbCall; -}; - -#endif // _SV_SVDATA_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/saltimer.hxx b/vcl/inc/vcl/svgread.hxx index 4bbaddb65b31..4427198eeb5a 100644 --- a/vcl/inc/vcl/saltimer.hxx +++ b/vcl/inc/vcl/svgread.hxx @@ -26,47 +26,58 @@ * ************************************************************************/ -#ifndef _SV_SALTIMER_HXX -#define _SV_SALTIMER_HXX +#ifndef _SV_SVGREAD_HXX +#define _SV_SVGREAD_HXX -#include <vcl/sv.h> #include <vcl/dllapi.h> -#include <vcl/salwtype.hxx> +#include <memory> -// ------------ -// - SalTimer - -// ------------ +// ------------- +// - SVGReader - +// ------------- -/* - * note: there will be only a single instance of SalTimer - * SalTimer originally had only static methods, but - * this needed to be virtualized for the sal plugin migration - */ +class SvStream; +class GDIMetaFile; -class VCL_PLUGIN_PUBLIC SalTimer +namespace vcl { - SALTIMERPROC m_pProc; -public: - SalTimer() : m_pProc( NULL ) {} - virtual ~SalTimer(); + class SVGReaderImpl; - // AutoRepeat and Restart - virtual void Start( sal_uLong nMS ) = 0; - virtual void Stop() = 0; - - // Callbacks (indepen in \sv\source\app\timer.cxx) - void SetCallback( SALTIMERPROC pProc ) + class VCL_DLLPUBLIC SVGReader { - m_pProc = pProc; - } + public: - void CallCallback() - { - if( m_pProc ) - m_pProc(); - } -}; + SVGReader( SvStream& rStm ); + ~SVGReader(); + + /* rSVGMtf is an output parameter, that is also returned + by the method as well. + + In case of a failure, the GDIMetaFile will not contain + any actions at all and thus GDIMetaFile::GetActionCount + will return 0. + + In case of success, the GDIMetaFile will contain a + META_RENDERGRAPHIC_ACTION, containing the SVG raw data. The + data can be rendered by using the standard ways to output a + GDIMetaFile, e.g. calling GDIMetaFile::Play + + */ + GDIMetaFile& Read( GDIMetaFile& rSVGMtf ); + + private: + + SVGReader(); + SVGReader( const SVGReader& rReader ); + + inline SVGReader& operator=( const SVGReader& /* rReader */ ) { return( *this ); } + + private: + + std::auto_ptr< SVGReaderImpl > mapImpl; + }; +} -#endif // _SV_SALTIMER_HXX +#endif -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/vcl/inc/vcl/svids.hrc b/vcl/inc/vcl/svids.hrc deleted file mode 100644 index bc76c70e1ebe..000000000000 --- a/vcl/inc/vcl/svids.hrc +++ /dev/null @@ -1,254 +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_SVIDS_HRC -#define _SV_SVIDS_HRC - -#include "svl/solar.hrc" - -#define SV_RESID_STDOFFSET 0 -#define SV_RESID_MONOOFFSET 1 - -// Achtung: Diese Id's muessen min. 10 Werte auseinanderliegen, da -// je nach Style noch ein Offset aufgerechnet wird -#define SV_RESID_BITMAP_CHECK 1000 -#define SV_RESID_BITMAP_RADIO 1010 - -#define SV_RESID_BITMAP_MSGBOX 1020 - -#define SV_RESID_BITMAP_PIN 1030 - -#define SV_RESID_BITMAP_SPLITHPIN 1040 -#define SV_RESID_BITMAP_SPLITVPIN 1041 -#define SV_RESID_BITMAP_SPLITHARW 1042 -#define SV_RESID_BITMAP_SPLITVARW 1043 - -#define SV_RESID_BITMAP_SCROLLMSK 1050 -#define SV_RESID_BITMAP_SCROLLBMP 1051 -#define SV_RESID_BITMAP_CLOSEDOC 1052 - -#define SV_DISCLOSURE_PLUS 1060 -#define SV_DISCLOSURE_MINUS 1061 - -#define RID_STR_PAPERNAMES 1070 - -#define SV_RESID_MENU_EDIT 2000 -#define SV_MENU_EDIT_UNDO 1 -#define SV_MENU_EDIT_CUT 2 -#define SV_MENU_EDIT_COPY 3 -#define SV_MENU_EDIT_PASTE 4 -#define SV_MENU_EDIT_DELETE 5 -#define SV_MENU_EDIT_SELECTALL 6 -#define SV_MENU_EDIT_INSERTSYMBOL 7 -#define SV_RESID_STRING_NOSELECTIONPOSSIBLE 2001 - -#define SV_MENU_MAC_SERVICES 2002 -#define SV_MENU_MAC_HIDEAPP 2003 -#define SV_MENU_MAC_HIDEALL 2004 -#define SV_MENU_MAC_SHOWALL 2005 -#define SV_MENU_MAC_QUITAPP 2006 - -#define SV_DLG_PRINT 2048 -#define SV_PRINT_OK 1 -#define SV_PRINT_CANCEL 2 -#define SV_PRINT_HELP 3 -#define SV_PRINT_PAGE_PREVIEW 4 -#define SV_PRINT_PAGE_TXT 5 -#define SV_PRINT_PAGE_FORWARD 6 -#define SV_PRINT_PAGE_BACKWARD 7 -#define SV_PRINT_PAGE_EDIT 8 -#define SV_PRINT_TABCTRL 9 -#define SV_PRINT_PRT_TYPE 10 -#define SV_PRINT_PRT_STATUS 11 -#define SV_PRINT_PRT_LOCATION 12 -#define SV_PRINT_PRT_COMMENT 13 -#define SV_PRINT_TOFILE_TXT 14 -#define SV_PRINT_DEFPRT_TXT 15 -#define SV_PRINT_PRINTPREVIEW_TXT 16 - -#define SV_PRINT_TAB_NUP 1 -#define SV_PRINT_PRT_NUP_LAYOUT_FL 1 -#define SV_PRINT_PRT_NUP_DEFAULT_BTN 2 -#define SV_PRINT_PRT_NUP_BROCHURE_BTN 3 -#define SV_PRINT_PRT_NUP_PAGES_BTN 4 -#define SV_PRINT_PRT_NUP_PAGES_BOX 5 -#define SV_PRINT_PRT_NUP_NUM_PAGES_TXT 6 -#define SV_PRINT_PRT_NUP_COLS_EDT 7 -#define SV_PRINT_PRT_NUP_TIMES_TXT 8 -#define SV_PRINT_PRT_NUP_ROWS_EDT 9 -#define SV_PRINT_PRT_NUP_MARGINS_PAGES_1_TXT 10 -#define SV_PRINT_PRT_NUP_MARGINS_PAGES_EDT 11 -#define SV_PRINT_PRT_NUP_MARGINS_PAGES_2_TXT 12 -#define SV_PRINT_PRT_NUP_MARGINS_SHEET_1_TXT 13 -#define SV_PRINT_PRT_NUP_MARGINS_SHEET_EDT 14 -#define SV_PRINT_PRT_NUP_MARGINS_SHEET_2_TXT 15 -#define SV_PRINT_PRT_NUP_ORIENTATION_TXT 16 -#define SV_PRINT_PRT_NUP_ORIENTATION_BOX 17 -#define SV_PRINT_PRT_NUP_ORDER_TXT 18 -#define SV_PRINT_PRT_NUP_ORDER_BOX 19 -#define SV_PRINT_PRT_NUP_BORDER_CB 20 - -#define SV_PRINT_PRT_NUP_ORIENTATION_AUTOMATIC 0 -#define SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT 1 -#define SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE 2 - -#define SV_PRINT_PRT_NUP_ORDER_LRTB 0 -#define SV_PRINT_PRT_NUP_ORDER_TBLR 1 -#define SV_PRINT_PRT_NUP_ORDER_TBRL 2 -#define SV_PRINT_PRT_NUP_ORDER_RLTB 3 - -#define SV_PRINT_TAB_JOB 2 -#define SV_PRINT_PRINTERS_FL 1 -#define SV_PRINT_PRINTERS 2 -#define SV_PRINT_PRT_SETUP 3 -#define SV_PRINT_RANGE 4 -#define SV_PRINT_ALL 5 -#define SV_PRINT_PAGERANGE 6 -#define SV_PRINT_SELECTION 7 -#define SV_PRINT_PAGERANGE_EDIT 8 -#define SV_PRINT_COPIES 9 -#define SV_PRINT_COPYCOUNT 10 -#define SV_PRINT_COPYCOUNT_FIELD 11 -#define SV_PRINT_COLLATE 12 -#define SV_PRINT_COLLATE_IMAGE 13 -#define SV_PRINT_BUTTONLINE 14 -#define SV_PRINT_COLLATE_IMG 15 -#define SV_PRINT_NOCOLLATE_IMG 16 -#define SV_PRINT_NOPAGES 19 -#define SV_PRINT_STATUS_TXT 20 -#define SV_PRINT_LOCATION_TXT 21 -#define SV_PRINT_COMMENT_TXT 22 -#define SV_PRINT_DETAILS_BTN 23 -#define SV_PRINT_OPT_REVERSE 24 - -#define SV_PRINT_TAB_OPT 3 -#define SV_PRINT_OPT_PRINT_FL 1 -#define SV_PRINT_OPT_TOFILE 2 -#define SV_PRINT_OPT_SINGLEJOBS 3 - -#define SV_DLG_PRINT_PROGRESS 2049 -#define SV_PRINT_PROGRESS_CANCEL 1 -#define SV_PRINT_PROGRESS_TEXT 2 - -#define SV_PRINT_NATIVE_STRINGS 2050 -#define SV_PRINT_NOPRINTERWARNING 2051 -#define SV_PRINT_NOCONTENT 2052 - -#define SV_HELPTEXT_CLOSE 10000 -#define SV_HELPTEXT_MINIMIZE 10001 -#define SV_HELPTEXT_MAXIMIZE 10002 -#define SV_HELPTEXT_RESTORE 10003 -#define SV_HELPTEXT_ROLLDOWN 10004 -#define SV_HELPTEXT_ROLLUP 10005 -#define SV_HELPTEXT_HELP 10006 -#define SV_HELPTEXT_ALWAYSVISIBLE 10007 -#define SV_HELPTEXT_FADEIN 10008 -#define SV_HELPTEXT_FADEOUT 10009 -#define SV_HELPTEXT_SPLITFLOATING 10010 -#define SV_HELPTEXT_SPLITFIXED 10011 -#define SV_HELPTEXT_CLOSEDOCUMENT 10012 - -#define SV_BUTTONTEXT_OK 10100 -#define SV_BUTTONTEXT_CANCEL 10101 -#define SV_BUTTONTEXT_YES 10102 -#define SV_BUTTONTEXT_NO 10103 -#define SV_BUTTONTEXT_RETRY 10104 -#define SV_BUTTONTEXT_HELP 10105 -#define SV_BUTTONTEXT_CLOSE SV_HELPTEXT_CLOSE -#define SV_BUTTONTEXT_MORE 10107 -#define SV_BUTTONTEXT_IGNORE 10108 -#define SV_BUTTONTEXT_ABORT 10109 -#define SV_BUTTONTEXT_LESS 10110 - -#define SV_STDTEXT_FIRST SV_STDTEXT_SERVICENOTAVAILABLE -#define SV_STDTEXT_SERVICENOTAVAILABLE 10200 -#define SV_STDTEXT_DONTHINTAGAIN 10201 -#define SV_STDTEXT_DONTASKAGAIN 10202 -#define SV_STDTEXT_DONTWARNAGAIN 10203 -#define SV_STDTEXT_ABOUT 10204 -#define SV_STDTEXT_PREFERENCES 10205 -#define SV_MAC_SCREENNNAME 10206 -#define SV_STDTEXT_ALLFILETYPES 10207 -#define SV_STDTEXT_LAST SV_STDTEXT_ALLFILETYPES - -#define SV_ACCESSERROR_FIRST SV_ACCESSERROR_WRONG_VERSION -#define SV_ACCESSERROR_WRONG_VERSION 10500 -#define SV_ACCESSERROR_BRIDGE_MSG 10501 -#define SV_ACCESSERROR_OK_CANCEL_MSG 10502 -#define SV_ACCESSERROR_MISSING_BRIDGE 10503 -#define SV_ACCESSERROR_FAULTY_JAVA 10504 -#define SV_ACCESSERROR_JAVA_MSG 10505 -#define SV_ACCESSERROR_MISSING_JAVA 10506 -#define SV_ACCESSERROR_JAVA_NOT_CONFIGURED 10507 -#define SV_ACCESSERROR_JAVA_DISABLED 10508 -#define SV_ACCESSERROR_TURNAROUND_MSG 10509 -#define SV_ACCESSERROR_NO_FONTS 10510 -#define SV_ACCESSERROR_LAST SV_ACCESSERROR_NO_FONTS - -#define SV_SHORTCUT_HELP 10600 -#define SV_SHORTCUT_CONTEXTHELP 10601 -#define SV_SHORTCUT_ACTIVEHELP 10602 -#define SV_SHORTCUT_DOCKUNDOCK 10603 -#define SV_SHORTCUT_NEXTSUBWINDOW 10604 -#define SV_SHORTCUT_PREVSUBWINDOW 10605 -#define SV_SHORTCUT_TODOCUMENT 10606 -#define SV_SHORTCUT_MENUBAR 10607 -#define SV_SHORTCUT_SPLITTER 10608 - -#define SV_EDIT_WARNING_BOX 10650 - -#define SV_FUNIT_STRINGS 10700 - -#define SV_ICON_SIZE48_START 20000 -#define SV_ICON_SIZE32_START 21000 -#define SV_ICON_SIZE16_START 23000 - -#define SV_ICON_LARGE_START 24000 -#define SV_ICON_SMALL_START 25000 - -#define SV_ICON_ID_OFFICE 1 -#define SV_ICON_ID_TEXT 2 -#define SV_ICON_ID_TEXT_TEMPLATE 3 -#define SV_ICON_ID_SPREADSHEET 4 -#define SV_ICON_ID_SPREADSHEET_TEMPLATE 5 -#define SV_ICON_ID_DRAWING 6 -#define SV_ICON_ID_DRAWING_TEMPLATE 7 -#define SV_ICON_ID_PRESENTATION 8 -#define SV_ICON_ID_PRESENTATION_TEMPLATE 9 -#define SV_ICON_ID_PRESENTATION_COMPRESSED 10 -#define SV_ICON_ID_MASTER_DOCUMENT 11 -#define SV_ICON_ID_HTML_DOCUMENT 12 -#define SV_ICON_ID_CHART 13 -#define SV_ICON_ID_DATABASE 14 -#define SV_ICON_ID_FORMULA 15 -#define SV_ICON_ID_TEMPLATE 16 -#define SV_ICON_ID_MACRO 17 -#define SV_ICON_ID_PRINTERADMIN 501 - -#define HID_PRINTDLG HID_VCL_START - -#endif // _SV_SVIDS_HRC diff --git a/vcl/inc/vcl/textlayout.hxx b/vcl/inc/vcl/textlayout.hxx deleted file mode 100644 index 5902573f8746..000000000000 --- a/vcl/inc/vcl/textlayout.hxx +++ /dev/null @@ -1,139 +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 VCL_TEXTLAYOUT_HXX -#define VCL_TEXTLAYOUT_HXX - -#include "vcl/outdev.hxx" - -#include <tools/solar.h> -#include <tools/string.hxx> - -#include <memory> - -class Control; - -//........................................................................ -namespace vcl -{ -//........................................................................ - - //==================================================================== - //= ITextLayout - //==================================================================== - class SAL_NO_VTABLE ITextLayout - { - public: - virtual long GetTextWidth( const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; - virtual void DrawText( const Point& _rStartPoint, const XubString& _rText, xub_StrLen _nStartIndex, xub_StrLen _nLength, - MetricVector* _pVector, String* _pDisplayText ) = 0; - virtual bool GetCaretPositions( const XubString& _rText, sal_Int32* _pCaretXArray, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; - virtual xub_StrLen GetTextBreak( const XubString& _rText, long _nMaxTextWidth, xub_StrLen _nStartIndex, xub_StrLen _nLength ) const = 0; - virtual bool DecomposeTextRectAction() const = 0; - }; - - //==================================================================== - //= DefaultTextLayout - //==================================================================== - /** is an implementation of the ITextLayout interface which simply delegates its calls to the respective - methods of an OutputDevice instance, without any inbetween magic. - */ - class DefaultTextLayout : public ITextLayout - { - public: - DefaultTextLayout( OutputDevice& _rTargetDevice ) - :m_rTargetDevice( _rTargetDevice ) - { - } - virtual ~DefaultTextLayout(); - - // ITextLayout overridables - virtual long GetTextWidth( - const XubString& _rText, - xub_StrLen _nStartIndex, - xub_StrLen _nLength - ) const; - virtual void DrawText( - const Point& _rStartPoint, - const XubString& _rText, - xub_StrLen _nStartIndex, - xub_StrLen _nLength, - MetricVector* _pVector, - String* _pDisplayText - ); - virtual bool GetCaretPositions( - const XubString& _rText, - sal_Int32* _pCaretXArray, - xub_StrLen _nStartIndex, - xub_StrLen _nLength - ) const; - virtual xub_StrLen GetTextBreak( - const XubString& _rText, - long _nMaxTextWidth, - xub_StrLen _nStartIndex, - xub_StrLen _nLength - ) const; - virtual bool DecomposeTextRectAction() const; - - private: - OutputDevice& m_rTargetDevice; - }; - - //==================================================================== - //= ControlTextRenderer - //==================================================================== - class ReferenceDeviceTextLayout; - /** a class which allows rendering text of a Control onto a device, by taking into account the metrics of - a reference device. - */ - class ControlTextRenderer - { - public: - ControlTextRenderer( const Control& _rControl, OutputDevice& _rTargetDevice, OutputDevice& _rReferenceDevice ); - virtual ~ControlTextRenderer(); - - Rectangle DrawText( const Rectangle& _rRect, - const XubString& _rText, sal_uInt16 _nStyle = 0, - MetricVector* _pVector = NULL, String* _pDisplayText = NULL ); - - private: - ControlTextRenderer(); // never implemented - ControlTextRenderer( const ControlTextRenderer& ); // never implemented - ControlTextRenderer& operator=( const ControlTextRenderer& ); // never implemented - - private: - ::std::auto_ptr< ReferenceDeviceTextLayout > m_pImpl; - }; - -//........................................................................ -} // namespace vcl -//........................................................................ - -#endif // VCL_TEXTLAYOUT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/toolbox.h b/vcl/inc/vcl/toolbox.h deleted file mode 100644 index aec0c11cf790..000000000000 --- a/vcl/inc/vcl/toolbox.h +++ /dev/null @@ -1,185 +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_TOOLBOX_H -#define _SV_TOOLBOX_H - -#include <tools/gen.hxx> -#include <tools/string.hxx> -#include <vcl/sv.h> -#include <vcl/image.hxx> -#include <vcl/toolbox.hxx> -#include <vcl/controllayout.hxx> -#include <vcl/ImageListProvider.hxx> - -#include <vector> - -#define TB_DROPDOWNARROWWIDTH 11 - -#define TB_MENUBUTTON_SIZE 12 -#define TB_MENUBUTTON_OFFSET 2 - -#define TB_SMALLIMAGESIZE 16 - -#define TB_LARGEIMAGESIZE 26 -#define TB_LARGEIMAGESIZE_INDUSTRIAL 24 -#define TB_LARGEIMAGESIZE_CRYSTAL 22 -#define TB_LARGEIMAGESIZE_OXYGEN 22 - -class Window; - -// ---------------- -// - ImplToolItem - -// ---------------- - -struct ImplToolItem -{ - Window* mpWindow; - void* mpUserData; - Image maImage; - Image maHighImage; - long mnImageAngle; - bool mbMirrorMode; - XubString maText; - XubString maQuickHelpText; - XubString maHelpText; - String maCommandStr; - rtl::OString maHelpId; - Rectangle maRect; - Rectangle maCalcRect; - // the overall horizontal item size, including one or more of [image size + textlength + dropdown arrow] - Size maItemSize; - long mnSepSize; - long mnDropDownArrowWidth; - ToolBoxItemType meType; - ToolBoxItemBits mnBits; - TriState meState; - sal_uInt16 mnId; - sal_Bool mbEnabled:1, - mbVisible:1, - mbEmptyBtn:1, - mbShowWindow:1, - mbBreak:1, - mbVisibleText:1; // indicates if text will definitely be drawn, influences dropdown pos - - ImplToolItem(); - ImplToolItem( sal_uInt16 nItemId, const Image& rImage, - ToolBoxItemBits nItemBits ); - ImplToolItem( sal_uInt16 nItemId, const XubString& rTxt, - ToolBoxItemBits nItemBits ); - ImplToolItem( sal_uInt16 nItemId, const Image& rImage, - const XubString& rTxt, - ToolBoxItemBits nItemBits ); - ~ImplToolItem(); - - ImplToolItem( const ImplToolItem& ); - ImplToolItem& operator=(const ImplToolItem&); - - // returns the size of a item, taking toolbox orientation into account - // the default size is the precomputed size for standard items - // ie those that are just ordinary buttons (no windows or text etc.) - // bCheckMaxWidth indicates that item windows must not exceed maxWidth in which case they will be painted as buttons - Size GetSize( sal_Bool bHorz, sal_Bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ); - - // only useful for buttons: returns if the text or image part or both can be drawn according to current button drawing style - void DetermineButtonDrawStyle( ButtonType eButtonType, sal_Bool& rbImage, sal_Bool& rbText ) const; - - // returns the rectangle which contains the drop down arrow - // or an empty rect if there is none - // bHorz denotes the toolbox alignment - Rectangle GetDropDownRect( sal_Bool bHorz ) const; - - // returns sal_True if the toolbar item is currently clipped, which can happen for docked toolbars - sal_Bool IsClipped() const; -}; - -namespace vcl -{ - -struct ToolBoxLayoutData : public ControlLayoutData -{ - std::vector< sal_uInt16 > m_aLineItemIds; - std::vector< sal_uInt16 > m_aLineItemPositions; -}; - - -} /* namespace vcl */ - - -struct ImplToolBoxPrivateData -{ - vcl::ToolBoxLayoutData* m_pLayoutData; - std::vector< ImplToolItem > m_aItems; - - ImplToolBoxPrivateData(); - ~ImplToolBoxPrivateData(); - - void ImplClearLayoutData() { delete m_pLayoutData; m_pLayoutData = NULL; } - - // called when dropdown items are clicked - Link maDropdownClickHdl; - Timer maDropdownTimer; // for opening dropdown items on "long click" - - // large or small buttons ? - ToolBoxButtonSize meButtonSize; - - // the optional custom menu - PopupMenu* mpMenu; - sal_uInt16 maMenuType; - sal_uIntPtr mnEventId; - - // called when menu button is clicked and before the popup menu is executed - Link maMenuButtonHdl; - - // a dummy item representing the custom menu button - ImplToolItem maMenubuttonItem; - long mnMenuButtonWidth; - - Wallpaper maDisplayBackground; - - // support for highcontrast - vcl::IImageListProvider* mpImageListProvider; - vcl::ImageListType meImageListType; - - sal_Bool mbIsLocked:1, // keeps last lock state from ImplDockingWindowWrapper - mbAssumeDocked:1, // only used during calculations to override current floating/popup mode - mbAssumeFloating:1, - mbAssumePopupMode:1, - mbKeyInputDisabled:1, // no KEY input if all items disabled, closing/docking will be allowed though - mbIsPaintLocked:1, // don't allow paints - mbMenubuttonSelected:1, // menu button is highlighted - mbPageScroll:1, // determines if we scroll a page at a time - mbNativeButtons:1, // system supports native toolbar buttons - mbWillUsePopupMode:1, // this toolbox will be opened in popup mode - mbDropDownByKeyboard:1; // tells whether a dropdown was started by key input -}; - - -#endif // _SV_TOOLBOX_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/unobrok.hxx b/vcl/inc/vcl/unobrok.hxx deleted file mode 100644 index 67c83ea83952..000000000000 --- a/vcl/inc/vcl/unobrok.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 _UNOBROK_HXX -#define _UNOBROK_HXX - -#include <vcl/svdata.hxx> -#include <osl/thread.hxx> - -namespace vcl_accept -{ - sal_Bool accept(const ::rtl::OUString & accDcp, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> & rSMgr); -} - -#endif // _UNOBROK_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/wall2.hxx b/vcl/inc/vcl/wall2.hxx deleted file mode 100644 index 162614262095..000000000000 --- a/vcl/inc/vcl/wall2.hxx +++ /dev/null @@ -1,63 +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_WALL2_HXX -#define _SV_WALL2_HXX - -#include <vcl/wall.hxx> - -class ImplWallpaper -{ - friend class Wallpaper; - -private: - Color maColor; - BitmapEx* mpBitmap; - Gradient* mpGradient; - Rectangle* mpRect; - WallpaperStyle meStyle; - sal_uLong mnRefCount; - BitmapEx* mpCache; - - friend SvStream& operator>>( SvStream& rIStm, ImplWallpaper& rImplWallpaper ); - friend SvStream& operator<<( SvStream& rOStm, const ImplWallpaper& rImplWallpaper ); - -public: - ImplWallpaper(); - ImplWallpaper( const ImplWallpaper& rImplWallpaper ); - ~ImplWallpaper(); - - void ImplSetCachedBitmap( BitmapEx& rBmp ); - const BitmapEx* ImplGetCachedBitmap() { return mpCache; } - void ImplReleaseCachedBitmap(); -}; - - -#endif // _SV_WALL2_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/window.h b/vcl/inc/vcl/window.h deleted file mode 100644 index 12f6eedc2906..000000000000 --- a/vcl/inc/vcl/window.h +++ /dev/null @@ -1,406 +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_WINDOW_H -#define _SV_WINDOW_H - -#include <vector> -#include <vcl/sv.h> -#include <vcl/outdev.hxx> -#include <vcl/timer.hxx> -#ifndef _SV_INPUTCTX_HXX -#include <vcl/inputctx.hxx> -#endif -#ifndef _SV_POINTR_HXX -#include <vcl/pointr.hxx> -#endif -#include <tools/wintypes.hxx> -#include <vcl/vclevent.hxx> -#include <com/sun/star/uno/Reference.hxx> -#include <cppuhelper/weakref.hxx> - -#include <vcl/salnativewidgets.hxx> - -#include <list> - -struct SalPaintEvent; -struct ImplDelData; -struct ImplAccessibleInfos; - -class Window; -class VirtualDevice; -class Cursor; -class ImplDevFontList; -class ImplFontCache; -class VCLXWindow; -class SalFrame; -class SalObject; - - -namespace com { -namespace sun { -namespace star { -namespace accessibility { - class XAccessible; -}}}} - -namespace com { -namespace sun { -namespace star { -namespace rendering { - class XCanvas; -}}}} - -namespace com { -namespace sun { -namespace star { -namespace awt { - class XWindowPeer; - class XWindow; -} -namespace uno { - class Any; - class XInterface; -} -namespace datatransfer { -namespace clipboard { - class XClipboard; -} - -namespace dnd { - class XDropTargetListener; - class XDragGestureRecognizer; - class XDragSource; - class XDropTarget; -} } } } } - -namespace vcl { - struct ControlLayoutData; - struct ExtWindowImpl; -} - - -// -------------- -// - Prototypes - -// -------------- - -long ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, sal_uInt16 nEvent, const void* pEvent ); - -// ----------- -// - HitTest - -// ----------- - -#define WINDOW_HITTEST_INSIDE ((sal_uInt16)0x0001) -#define WINDOW_HITTEST_TRANSPARENT ((sal_uInt16)0x0002) - -// --------------- -// - ImplWinData - -// --------------- - -struct ImplWinData -{ - UniString* mpExtOldText; - sal_uInt16* mpExtOldAttrAry; - Rectangle* mpCursorRect; - long mnCursorExtWidth; - Rectangle* mpFocusRect; - Rectangle* mpTrackRect; - sal_uInt16 mnTrackFlags; - sal_uInt16 mnIsTopWindow; - sal_Bool mbMouseOver; // tracks mouse over for native widget paint effect - sal_Bool mbEnableNativeWidget; // toggle native widget rendering - ::std::list< Window* > - maTopWindowChildren; -}; - -// ------------------- -// - ImplOverlapData - -// ------------------- - -struct ImplOverlapData -{ - VirtualDevice* mpSaveBackDev; // Gesicherte Hintergrund-Bitmap - Region* mpSaveBackRgn; // Gesicherte Region, was invalidiert werden muss - Window* mpNextBackWin; // Naechstes Fenster mit Hintergrund-Sicherung - sal_uIntPtr mnSaveBackSize; // Groesse Bitmap fuer Hintergrund-Sicherung - sal_Bool mbSaveBack; // sal_True: Background sichern - sal_uInt8 mnTopLevel; // Level for Overlap-Window -}; - -// ----------------- -// - ImplFrameData - -// ----------------- - -struct ImplFrameData -{ - Timer maPaintTimer; // paint timer - Timer maResizeTimer; // resize timer - InputContext maOldInputContext; // Last set Input Context - Window* mpNextFrame; // next frame window - Window* mpFirstOverlap; // first overlap window - Window* mpFocusWin; // focus window (is also set, when frame doesn't have the focous) - Window* mpMouseMoveWin; // last window, where MouseMove() called - Window* mpMouseDownWin; // last window, where MouseButtonDown() called - Window* mpFirstBackWin; // Erstes Overlap-Window mit Hintergrund-Sicherung - ::std::vector<Window *> maOwnerDrawList; // List of system windows with owner draw decoration - ImplDevFontList* mpFontList; // Font-List for this frame - ImplFontCache* mpFontCache; // Font-Cache for this frame - sal_Int32 mnDPIX; // Original Screen Resolution - sal_Int32 mnDPIY; // Original Screen Resolution - ImplMapRes maMapUnitRes; // for LogicUnitToPixel - sal_uIntPtr mnAllSaveBackSize; // Groesse aller Bitmaps fuer Hintergrund-Sicherung - sal_uIntPtr mnFocusId; // FocusId for PostUserLink - sal_uIntPtr mnMouseMoveId; // MoveId for PostUserLink - long mnLastMouseX; // last x mouse position - long mnLastMouseY; // last y mouse position - long mnBeforeLastMouseX; // last but one x mouse position - long mnBeforeLastMouseY; // last but one y mouse position - long mnFirstMouseX; // first x mouse position by mousebuttondown - long mnFirstMouseY; // first y mouse position by mousebuttondown - long mnLastMouseWinX; // last x mouse position, rel. to pMouseMoveWin - long mnLastMouseWinY; // last y mouse position, rel. to pMouseMoveWin - sal_uInt16 mnModalMode; // frame based modal count (app based makes no sense anymore) - sal_uIntPtr mnMouseDownTime; // mouse button down time for double click - sal_uInt16 mnClickCount; // mouse click count - sal_uInt16 mnFirstMouseCode; // mouse code by mousebuttondown - sal_uInt16 mnMouseCode; // mouse code - sal_uInt16 mnMouseMode; // mouse mode - MapUnit meMapUnit; // last MapUnit for LogicUnitToPixel - sal_Bool mbHasFocus; // focus - sal_Bool mbInMouseMove; // is MouseMove on stack - sal_Bool mbMouseIn; // is Mouse inside the frame - sal_Bool mbStartDragCalled; // is command startdrag called - sal_Bool mbNeedSysWindow; // set, when FrameSize <= IMPL_MIN_NEEDSYSWIN - sal_Bool mbMinimized; // set, when FrameSize <= 0 - sal_Bool mbStartFocusState; // FocusState, beim abschicken des Events - sal_Bool mbInSysObjFocusHdl; // Innerhalb vom GetFocus-Handler eines SysChilds - sal_Bool mbInSysObjToTopHdl; // Innerhalb vom ToTop-Handler eines SysChilds - sal_Bool mbSysObjFocus; // Hat ein SysChild den Focus - - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > mxDragSource; - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTarget > mxDropTarget; - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener > mxDropTargetListener; - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxClipboard; - ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxSelection; - - sal_Bool mbInternalDragGestureRecognizer; -}; - -// ----------------------- -// - ImplAccessibleInfos - -// ----------------------- - -struct ImplAccessibleInfos -{ - sal_uInt16 nAccessibleRole; - String* pAccessibleName; - String* pAccessibleDescription; - Window* pLabeledByWindow; - Window* pLabelForWindow; - Window* pMemberOfWindow; - - ImplAccessibleInfos(); - ~ImplAccessibleInfos(); -}; - - -// --------------- -// - WindowImpl - -// --------------- - -enum AlwaysInputMode { AlwaysInputNone = 0, AlwaysInputEnabled = 1, AlwaysInputDisabled =2 }; - -class WindowImpl -{ -public: - WindowImpl(); - ~WindowImpl(); - - ImplWinData* mpWinData; - ImplOverlapData* mpOverlapData; - ImplFrameData* mpFrameData; - SalFrame* mpFrame; - SalObject* mpSysObj; - Window* mpFrameWindow; - Window* mpOverlapWindow; - Window* mpBorderWindow; - Window* mpClientWindow; - Window* mpParent; - Window* mpRealParent; - Window* mpFirstChild; - Window* mpLastChild; - Window* mpFirstOverlap; - Window* mpLastOverlap; - Window* mpPrev; - Window* mpNext; - Window* mpNextOverlap; - Window* mpLastFocusWindow; - Window* mpDlgCtrlDownWindow; - VclEventListeners maEventListeners; - VclEventListeners maChildEventListeners; - - // The canvas interface for this VCL window. Is persistent after the first GetCanvas() call - ::com::sun::star::uno::WeakReference< ::com::sun::star::rendering::XCanvas > mxCanvas; - - ImplDelData* mpFirstDel; - void* mpUserData; - vcl::ExtWindowImpl* mpExtImpl; - Cursor* mpCursor; - Pointer maPointer; - Fraction maZoom; - XubString maText; - Font* mpControlFont; - Color maControlForeground; - Color maControlBackground; - sal_Int32 mnLeftBorder; - sal_Int32 mnTopBorder; - sal_Int32 mnRightBorder; - sal_Int32 mnBottomBorder; - long mnX; - long mnY; - long mnAbsScreenX; - Point maPos; - rtl::OString maHelpId; - rtl::OString maUniqId; - XubString maHelpText; - XubString maQuickHelpText; - InputContext maInputContext; - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > mxWindowPeer; - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > mxAccessible; - ImplAccessibleInfos* mpAccessibleInfos; - VCLXWindow* mpVCLXWindow; - Region maWinRegion; // region to 'shape' the VCL window (frame coordinates) - Region maWinClipRegion; // the (clipping) region that finally corresponds to the VCL window (frame coordinates) - Region maInvalidateRegion; // region that has to be redrawn (frame coordinates) - Region* mpChildClipRegion; // child clip region if CLIPCHILDREN is set (frame coordinates) - Region* mpPaintRegion; // only set during Paint() method call (window coordinates) - WinBits mnStyle; - WinBits mnPrevStyle; - WinBits mnExtendedStyle; - WinBits mnPrevExtendedStyle; - WindowType mnType; - ControlPart mnNativeBackground; - sal_uInt16 mnWaitCount; - sal_uInt16 mnPaintFlags; - sal_uInt16 mnGetFocusFlags; - sal_uInt16 mnParentClipMode; - sal_uInt16 mnActivateMode; - sal_uInt16 mnDlgCtrlFlags; - sal_uInt16 mnLockCount; - AlwaysInputMode meAlwaysInputMode; - sal_Bool mbFrame:1, - mbBorderWin:1, - mbOverlapWin:1, - mbSysWin:1, - mbDialog:1, - mbDockWin:1, - mbFloatWin:1, - mbPushButton:1, - mbVisible:1, - mbDisabled:1, - mbInputDisabled:1, - mbDropDisabled:1, - mbNoUpdate:1, - mbNoParentUpdate:1, - mbActive:1, - mbParentActive:1, - mbReallyVisible:1, - mbReallyShown:1, - mbInInitShow:1, - mbChildNotify:1, - mbChildPtrOverwrite:1, - mbNoPtrVisible:1, - mbPaintFrame:1, - mbInPaint:1, - mbMouseMove:1, - mbMouseButtonDown:1, - mbMouseButtonUp:1, - mbKeyInput:1, - mbKeyUp:1, - mbCommand:1, - mbDefPos:1, - mbDefSize:1, - mbCallMove:1, - mbCallResize:1, - mbWaitSystemResize:1, - mbInitWinClipRegion:1, - mbInitChildRegion:1, - mbWinRegion:1, - mbClipChildren:1, - mbClipSiblings:1, - mbChildTransparent:1, - mbPaintTransparent:1, - mbMouseTransparent:1, - mbDlgCtrlStart:1, - mbFocusVisible:1, - mbTrackVisible:1, - mbUseNativeFocus:1, - mbNativeFocusVisible:1, - mbInShowFocus:1, - mbInHideFocus:1, - mbControlForeground:1, - mbControlBackground:1, - mbAlwaysOnTop:1, - mbCompoundControl:1, - mbCompoundControlHasFocus:1, - mbPaintDisabled:1, - mbAllResize:1, - mbInDtor:1, - mbExtTextInput:1, - mbInFocusHdl:1, - mbOverlapVisible:1, - mbCreatedWithToolkit:1, - mbToolBox:1, - mbSplitter:1, - mbSuppressAccessibilityEvents:1, - mbMenuFloatingWindow:1, - mbDrawSelectionBackground:1, - mbIsInTaskPaneList:1, - mbToolbarFloatingWindow:1, - mbCallHandlersDuringInputDisabled:1, - mbDisableAccessibleLabelForRelation:1, - mbDisableAccessibleLabeledByRelation:1, - mbHelpTextDynamic:1, - mbFakeFocusSet:1, - mbInterceptChildWindowKeyDown:1; - - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; -}; - -// ----------------- -// - Hilfsmethoden - -// ----------------- - -long ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouseLeave, - long nX, long nY, sal_uIntPtr nMsgTime, - sal_uInt16 nCode, sal_uInt16 nMode ); -void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight ); - -#endif // _SV_WINDOW_H - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/vcl/xconnection.hxx b/vcl/inc/vcl/xconnection.hxx deleted file mode 100644 index bd3270fa24c7..000000000000 --- a/vcl/inc/vcl/xconnection.hxx +++ /dev/null @@ -1,76 +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 _VCL_XCONNECTION_HXX -#define _VCL_XCONNECTION_HXX - -#include <osl/mutex.hxx> -#include <rtl/ref.hxx> -#include <com/sun/star/uno/Reference.hxx> - -#include "vcl/displayconnectiondispatch.hxx" - -#ifndef _STLP_LIST -#include <list> -#endif - -namespace vcl { - - class DisplayConnection : - public DisplayConnectionDispatch - { - ::osl::Mutex m_aMutex; - ::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler > > - m_aHandlers; - ::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler > > - m_aErrorHandlers; - ::com::sun::star::uno::Any m_aAny; - public: - DisplayConnection(); - virtual ~DisplayConnection(); - - void start(); - void terminate(); - - virtual bool dispatchEvent( void* pData, int nBytes ); - virtual bool dispatchErrorEvent( void* pData, int nBytes ); - - // XDisplayConnection - virtual void SAL_CALL addEventHandler( const ::com::sun::star::uno::Any& window, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler, sal_Int32 eventMask ) throw(); - virtual void SAL_CALL removeEventHandler( const ::com::sun::star::uno::Any& window, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler ) throw(); - virtual void SAL_CALL addErrorHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler ) throw(); - virtual void SAL_CALL removeErrorHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XEventHandler >& handler ) throw(); - virtual ::com::sun::star::uno::Any SAL_CALL getIdentifier() throw(); - - }; - -} - -#endif // _VCL_XCONNECTION_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |