diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-23 11:20:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-23 14:11:39 +0300 |
commit | 827c46e7d75000cb03b0ce21759f9d0825f0c096 (patch) | |
tree | 3a84ccc45d54607c61328b18f58f914c1d6ec240 /vcl | |
parent | 7cbbefae224ab85343accb42b03f9431ec693a83 (diff) |
fdo#82577: Handle Window
Put the VCL Window class in the vcl namespace. Avoids clash with the X11
Window typedef.
Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
Diffstat (limited to 'vcl')
164 files changed, 1587 insertions, 1507 deletions
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx index 05581c55792d..72ed0e23c3d7 100644 --- a/vcl/generic/fontmanager/fontconfig.cxx +++ b/vcl/generic/fontmanager/fontconfig.cxx @@ -883,7 +883,7 @@ namespace #if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT) guint get_xid_for_dbus() { - const Window *pTopWindow = Application::IsHeadlessModeEnabled() ? NULL : Application::GetActiveTopWindow(); + const vcl::Window *pTopWindow = Application::IsHeadlessModeEnabled() ? NULL : Application::GetActiveTopWindow(); const SystemEnvData* pEnvData = pTopWindow ? pTopWindow->GetSystemData() : NULL; return pEnvData ? pEnvData->aWindow : 0; } diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index 9304ac757d7a..d0dfb28b1e19 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -99,13 +99,13 @@ namespace public: // parent window, Query text, initial value - QueryString(Window*, OUString &, OUString &); + QueryString(vcl::Window*, OUString &, OUString &); }; /* * QueryString */ - QueryString::QueryString(Window* pParent, OUString& rQuery, OUString& rRet) + QueryString::QueryString(vcl::Window* pParent, OUString& rQuery, OUString& rRet) : ModalDialog(pParent, "QueryDialog", "vcl/ui/querydialog.ui" ) , m_rReturnValue( rRet ) diff --git a/vcl/generic/print/prtsetup.cxx b/vcl/generic/print/prtsetup.cxx index ea93c2df1abf..a6ea399b308c 100644 --- a/vcl/generic/print/prtsetup.cxx +++ b/vcl/generic/print/prtsetup.cxx @@ -71,7 +71,7 @@ void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, con * RTSDialog */ -RTSDialog::RTSDialog(const PrinterInfo& rJobData, const OUString& rPrinter, Window* pParent) +RTSDialog::RTSDialog(const PrinterInfo& rJobData, const OUString& rPrinter, vcl::Window* pParent) : TabDialog(pParent, "PrinterPropertiesDialog", "vcl/ui/printerpropertiesdialog.ui") , m_aJobData(rJobData) , m_aPrinter(rPrinter) diff --git a/vcl/generic/print/prtsetup.hxx b/vcl/generic/print/prtsetup.hxx index dfa124911c15..8f3d43d3a199 100644 --- a/vcl/generic/print/prtsetup.hxx +++ b/vcl/generic/print/prtsetup.hxx @@ -63,7 +63,7 @@ class RTSDialog : public TabDialog // helper functions void insertAllPPDValues( ListBox&, const psp::PPDParser*, const psp::PPDKey* ); public: - RTSDialog(const ::psp::PrinterInfo& rJobData, const OUString& rPrinter, Window* pParent = NULL); + RTSDialog(const ::psp::PrinterInfo& rJobData, const OUString& rPrinter, vcl::Window* pParent = NULL); virtual ~RTSDialog(); const ::psp::PrinterInfo& getSetup() const { return m_aJobData; } diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx index 8f1d5f3dd02e..f3d0c0f9bc31 100644 --- a/vcl/inc/brdwin.hxx +++ b/vcl/inc/brdwin.hxx @@ -74,16 +74,16 @@ class ImplBorderWindowView; #define BORDERWINDOW_TITLE_POPUP ((sal_uInt16)0x0008) #define BORDERWINDOW_TITLE_NONE ((sal_uInt16)0x0010) -class ImplBorderWindow : public Window +class ImplBorderWindow : public vcl::Window { - friend class Window; + friend class vcl::Window; friend class ImplBorderWindowView; friend class ImplSmallBorderWindowView; friend class ImplStdBorderWindowView; private: ImplBorderWindowView* mpBorderView; - Window* mpMenuBarWindow; + vcl::Window* mpMenuBarWindow; long mnMinWidth; long mnMinHeight; long mnMaxWidth; @@ -104,10 +104,10 @@ private: bool mbDisplayActive; using Window::ImplInit; - void ImplInit( Window* pParent, + void ImplInit( vcl::Window* pParent, WinBits nStyle, sal_uInt16 nTypeStyle, SystemParentData* pParentData ); - void ImplInit( Window* pParent, + void ImplInit( vcl::Window* pParent, WinBits nStyle, sal_uInt16 nTypeStyle, const ::com::sun::star::uno::Any& ); @@ -116,11 +116,11 @@ private: ImplBorderWindow& operator= (const ImplBorderWindow &); public: - ImplBorderWindow( Window* pParent, + ImplBorderWindow( vcl::Window* pParent, SystemParentData* pParentData, WinBits nStyle = 0, sal_uInt16 nTypeStyle = 0 ); - ImplBorderWindow( Window* pParent, WinBits nStyle = 0, + ImplBorderWindow( vcl::Window* pParent, WinBits nStyle = 0, sal_uInt16 nTypeStyle = 0 ); virtual ~ImplBorderWindow(); @@ -155,7 +155,7 @@ public: void SetMenuButton( bool bMenuButton ); void UpdateMenuHeight(); - void SetMenuBarWindow( Window* pWindow ); + void SetMenuBarWindow( vcl::Window* pWindow ); void SetMenuBarMode( bool bHide ); void SetMinOutputSize( long nWidth, long nHeight ) diff --git a/vcl/inc/dbggui.hxx b/vcl/inc/dbggui.hxx index b538d3a1d908..f0a29012ca21 100644 --- a/vcl/inc/dbggui.hxx +++ b/vcl/inc/dbggui.hxx @@ -22,12 +22,12 @@ #ifdef DBG_UTIL -class Window; +namespace vcl { class Window; } void DbgGUIInitSolarMutexCheck(); void DbgGUIDeInitSolarMutexCheck(); void DbgGUIStart(); -void DbgDialogTest( Window* pWindow ); +void DbgDialogTest( vcl::Window* pWindow ); #define DBGGUI_INIT_SOLARMUTEXCHECK() DbgGUIInitSolarMutexCheck() #define DBGGUI_DEINIT_SOLARMUTEXCHECK() DbgGUIDeInitSolarMutexCheck() diff --git a/vcl/inc/dndevdis.hxx b/vcl/inc/dndevdis.hxx index a62abbd90360..5a1c0797dd7f 100644 --- a/vcl/inc/dndevdis.hxx +++ b/vcl/inc/dndevdis.hxx @@ -32,39 +32,39 @@ class DNDEventDispatcher: public ::cppu::WeakImplHelper3< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext, ::com::sun::star::datatransfer::dnd::XDragGestureListener > { - Window * m_pTopWindow; - Window * m_pCurrentWindow; + vcl::Window * m_pTopWindow; + vcl::Window * m_pCurrentWindow; ::osl::Mutex m_aMutex; ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor > m_aDataFlavorList; - Window* findTopLevelWindow(Point location); + vcl::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, + sal_Int32 fireDragEnterEvent( vcl::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, + sal_Int32 fireDragOverEvent( vcl::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 fireDragExitEvent( vcl::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, + sal_Int32 fireDropActionChangedEvent( vcl::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, + sal_Int32 fireDropEvent( vcl::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, + sal_Int32 fireDragGestureEvent( vcl::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 ); + DNDEventDispatcher( vcl::Window * pTopWindow ); virtual ~DNDEventDispatcher(); /* diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx index 49fa496fa0eb..223d2536791a 100644 --- a/vcl/inc/helpwin.hxx +++ b/vcl/inc/helpwin.hxx @@ -50,7 +50,7 @@ protected: void ImplShow(); public: - HelpTextWindow( Window* pParent, const OUString& rText, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle ); + HelpTextWindow( vcl::Window* pParent, const OUString& rText, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle ); virtual ~HelpTextWindow(); const OUString& GetHelpText() const { return maHelpText; } @@ -70,11 +70,11 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE; }; -void ImplShowHelpWindow( Window* pParent, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle, +void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle, const OUString& rHelpText, const OUString& rStatusText, const Point& rScreenPos, const Rectangle* pHelpArea = NULL ); void ImplDestroyHelpWindow( bool bUpdateHideTime ); -void ImplSetHelpWindowPos( Window* pHelpWindow, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle, +void ImplSetHelpWindowPos( vcl::Window* pHelpWindow, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle, const Point& rPos, const Rectangle* pHelpArea ); #endif // INCLUDED_VCL_INC_HELPWIN_HXX diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx index 2b049357ab7c..0f142a5e524e 100644 --- a/vcl/inc/ilstbox.hxx +++ b/vcl/inc/ilstbox.hxx @@ -87,7 +87,7 @@ struct ImplEntryType class ImplEntryList { private: - Window* mpWindow; ///< For getting the current locale when matching strings + vcl::Window* mpWindow; ///< For getting the current locale when matching strings sal_Int32 mnLastSelected; sal_Int32 mnSelectionAnchor; sal_Int32 mnImages; @@ -107,7 +107,7 @@ private: } public: - ImplEntryList( Window* pWindow ); + ImplEntryList( vcl::Window* pWindow ); ~ImplEntryList(); sal_Int32 InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEntry, bool bSort ); @@ -265,7 +265,7 @@ protected: public: virtual void FillLayoutData() const SAL_OVERRIDE; - ImplListBoxWindow( Window* pParent, WinBits nWinStyle ); + ImplListBoxWindow( vcl::Window* pParent, WinBits nWinStyle ); virtual ~ImplListBoxWindow(); ImplEntryList* GetEntryList() const { return mpEntryList; } @@ -410,7 +410,7 @@ protected: DECL_LINK( MRUChanged, void* ); public: - ImplListBox( Window* pParent, WinBits nWinStyle ); + ImplListBox( vcl::Window* pParent, WinBits nWinStyle ); virtual ~ImplListBox(); const ImplEntryList* GetEntryList() const { return maLBWindow.GetEntryList(); } @@ -418,7 +418,7 @@ public: virtual void Resize() SAL_OVERRIDE; virtual const Wallpaper& GetDisplayBackground() const SAL_OVERRIDE; - virtual Window* GetPreferredKeyInputWindow() SAL_OVERRIDE; + virtual vcl::Window* GetPreferredKeyInputWindow() SAL_OVERRIDE; sal_Int32 InsertEntry( sal_Int32 nPos, const OUString& rStr ); sal_Int32 InsertEntry( sal_Int32 nPos, const OUString& rStr, const Image& rImage ); @@ -517,7 +517,7 @@ protected: virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; public: - ImplListBoxFloatingWindow( Window* pParent ); + ImplListBoxFloatingWindow( vcl::Window* pParent ); void SetImplListBox( ImplListBox* pLB ) { mpImplLB = pLB; } @@ -564,7 +564,7 @@ protected: virtual void FillLayoutData() const SAL_OVERRIDE; public: - ImplWin( Window* pParent, WinBits nWinStyle = 0 ); + ImplWin( vcl::Window* pParent, WinBits nWinStyle = 0 ); virtual ~ImplWin() {}; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -606,7 +606,7 @@ private: bool mbDown; public: - ImplBtn( Window* pParent, WinBits nWinStyle = 0 ); + ImplBtn( vcl::Window* pParent, WinBits nWinStyle = 0 ); virtual ~ImplBtn() {}; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -615,7 +615,7 @@ public: boost::signals2::signal< void ( ImplBtn* ) > buttonDownSignal; }; -void ImplInitFieldSettings( Window* pWin, bool bFont, bool bForeground, bool bBackground ); +void ImplInitFieldSettings( vcl::Window* pWin, bool bFont, bool bForeground, bool bBackground ); void ImplInitDropDownButton( PushButton* pButton ); #endif // INCLUDED_VCL_INC_ILSTBOX_HXX diff --git a/vcl/inc/osx/a11yfocustracker.hxx b/vcl/inc/osx/a11yfocustracker.hxx index d4b4886f9ccc..9cd9e6fbd5e0 100644 --- a/vcl/inc/osx/a11yfocustracker.hxx +++ b/vcl/inc/osx/a11yfocustracker.hxx @@ -30,7 +30,7 @@ #include <vcl/vclevent.hxx> #include <set> -class Window; +namespace vcl { class Window; } class ToolBox; class DocumentFocusListener; @@ -53,16 +53,16 @@ public: protected: // received a WINDOW_GETFOCUS event for this window - void window_got_focus(Window *pWindow); + void window_got_focus(vcl::Window *pWindow); // received a TOOLBOX_HIGHLIGHT event for this window - void toolbox_highlight_on(Window *pWindow); + void toolbox_highlight_on(vcl::Window *pWindow); // received a TOOLBOX_HIGHLIGHTOFF event for this window - void toolbox_highlight_off(Window *pWindow); + void toolbox_highlight_off(vcl::Window *pWindow); // received a TABPAGE_ACTIVATE event for this window - void tabpage_activated(Window *pWindow); + void tabpage_activated(vcl::Window *pWindow); // received a MENU_HIGHLIGHT event for this window void menu_highlighted(const ::VclMenuEvent *pEvent); @@ -71,7 +71,7 @@ protected: void notify_toolbox_item_focus(ToolBox *pToolBox); // toolbox item opened a floating window (e.g. color chooser) - void toolbox_open_floater(Window *pWindow); + void toolbox_open_floater(vcl::Window *pWindow); // callback function for Application::addEventListener static long WindowEventHandler(AquaA11yFocusTracker *pFocusTracker, ::VclSimpleEvent const *pEvent); @@ -84,7 +84,7 @@ private: rtl::Reference< KeyboardFocusListener > m_aFocusListener; // the list of Windows that need deeper (focus) investigation - std::set< Window *> m_aDocumentWindowList; + std::set< vcl::Window *> m_aDocumentWindowList; // the link object needed for Application::addEventListener Link m_aWindowEventLink; diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index f0883d03e6dd..49c97e3467a1 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -44,7 +44,7 @@ namespace vcl class PrintDialog : public ModalDialog { public: - class PrintPreviewWindow : public Window + class PrintPreviewWindow : public vcl::Window { static const sal_Int32 PREVIEW_BITMAP_WIDTH; @@ -62,7 +62,7 @@ namespace vcl void preparePreviewBitmap(); public: - PrintPreviewWindow( Window* pParent ); + PrintPreviewWindow( vcl::Window* pParent ); virtual ~PrintPreviewWindow(); virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; @@ -78,14 +78,14 @@ namespace vcl ); }; - class ShowNupOrderWindow : public Window + class ShowNupOrderWindow : public vcl::Window { int mnOrderMode; int mnRows; int mnColumns; void ImplInitSettings(); public: - ShowNupOrderWindow( Window* pParent ); + ShowNupOrderWindow( vcl::Window* pParent ); virtual ~ShowNupOrderWindow(); virtual Size GetOptimalSize() const SAL_OVERRIDE; @@ -207,10 +207,10 @@ namespace vcl sal_Int32 mnCurPage; sal_Int32 mnCachedPages; - std::map< Window*, OUString > maControlToPropertyMap; - std::map< OUString, std::vector< Window* > > + std::map< vcl::Window*, OUString > maControlToPropertyMap; + std::map< OUString, std::vector< vcl::Window* > > maPropertyToWindowMap; - std::map< Window*, sal_Int32 > maControlToNumValMap; + std::map< vcl::Window*, sal_Int32 > maControlToNumValMap; std::set< OUString > maReverseDependencySet; Size maNupPortraitSize; @@ -236,12 +236,12 @@ namespace vcl void updatePrinterText(); void checkControlDependencies(); void checkOptionalControlDependencies(); - void makeEnabled( Window* ); + void makeEnabled( vcl::Window* ); void updateWindowFromProperty( const OUString& ); void setupOptionalUI(); void readFromSettings(); void storeToSettings(); - com::sun::star::beans::PropertyValue* getValueForWindow( Window* ) const; + com::sun::star::beans::PropertyValue* getValueForWindow( vcl::Window* ) const; virtual void Resize() SAL_OVERRIDE; virtual void Command( const CommandEvent& ) SAL_OVERRIDE; @@ -258,7 +258,7 @@ namespace vcl DECL_LINK( UIOption_ModifyHdl, Edit* ); public: - PrintDialog( Window*, const boost::shared_ptr< PrinterController >& ); + PrintDialog( vcl::Window*, const boost::shared_ptr< PrinterController >& ); virtual ~PrintDialog(); bool isPrintToFile(); @@ -283,7 +283,7 @@ namespace vcl DECL_LINK( ClickHdl, Button* ); public: - PrintProgressDialog(Window* i_pParent, int i_nMax); + PrintProgressDialog(vcl::Window* i_pParent, int i_nMax); bool isCanceled() const { return mbCanceled; } void setProgress( int i_nCurrent, int i_nMax = -1 ); diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx index 1d9eed738cfb..f594977e11c2 100644 --- a/vcl/inc/salframe.hxx +++ b/vcl/inc/salframe.hxx @@ -38,7 +38,7 @@ class AllSettings; class SalGraphics; class SalBitmap; class SalMenu; -class Window; +namespace vcl { class Window; } struct SalFrameState; struct SalInputContext; @@ -99,7 +99,7 @@ struct SystemParentData; class VCL_PLUGIN_PUBLIC SalFrame : public vcl::DeletionNotifier { // the VCL window corresponding to this frame - Window* m_pWindow; + vcl::Window* m_pWindow; SALFRAMEPROC m_pProc; public: @@ -229,11 +229,11 @@ public: // Callbacks (indepent part in vcl/source/window/winproc.cxx) // for default message handling return 0 - void SetCallback( Window* pWindow, SALFRAMEPROC pProc ) + void SetCallback( vcl::Window* pWindow, SALFRAMEPROC pProc ) { m_pWindow = pWindow; m_pProc = pProc; } // returns the instance set - Window* GetWindow() const { return m_pWindow; } + vcl::Window* GetWindow() const { return m_pWindow; } // Call the callback set; this sometimes necessary for implementation classes // that should not know more than necessary about the SalFrame implementation diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx index 36eab51da2fd..805581316504 100644 --- a/vcl/inc/salwtype.hxx +++ b/vcl/inc/salwtype.hxx @@ -27,7 +27,7 @@ class SalGraphics; class SalFrame; class SalObject; -class Window; +namespace vcl { class Window; } class FontSelectPattern; @@ -234,7 +234,7 @@ struct SalQueryCharPositionEvent // - SalFrame-Types - -typedef bool (*SALFRAMEPROC)( Window* pInst, SalFrame* pFrame, +typedef bool (*SALFRAMEPROC)( vcl::Window* pInst, SalFrame* pFrame, sal_uInt16 nEvent, const void* pEvent ); // - SalObject-Events - diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 44b229bf2727..c1d9eed2c45d 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -71,7 +71,7 @@ class Image; class PopupMenu; class Application; class OutputDevice; -class Window; +namespace vcl { class Window; } class SystemWindow; class WorkWindow; class Dialog; @@ -177,20 +177,20 @@ struct ImplSVGDIData struct ImplSVWinData { - Window* mpFirstFrame; // First FrameWindow - Window* mpDefDialogParent; // Default Dialog Parent + vcl::Window* mpFirstFrame; // First FrameWindow + vcl::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) + vcl::Window* mpFocusWin; // window, that has the focus + vcl::Window* mpActiveApplicationFrame; // the last active application frame, can be used as DefModalDialogParent if no focuswin set + vcl::Window* mpCaptureWin; // window, that has the mouse capture + vcl::Window* mpLastDeacWin; // Window, that need a deactivate (FloatingWindow-Handling) FloatingWindow* mpFirstFloat; // First FloatingWindow in PopupMode Dialog* mpLastExecuteDlg; // First Dialog that is in Execute - Window* mpExtTextInputWin; // Window, which is in ExtTextInput - Window* mpTrackWin; // window, that is in tracking mode + vcl::Window* mpExtTextInputWin; // Window, which is in ExtTextInput + vcl::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 + vcl::Window* mpAutoScrollWin; // window, that is in AutoScrollMode mode sal_uInt16 mnTrackFlags; // tracking flags sal_uInt16 mnAutoScrollFlags; // auto scroll flags bool mbNoDeactivate; // true: do not execute Deactivate @@ -323,7 +323,7 @@ struct ImplSVData ImplSVHelpData maHelpData; // indepen data for Help classes ImplSVNWFData maNWFData; UnoWrapperBase* mpUnoWrapper; - Window* mpIntroWindow; // the splash screen + vcl::Window* mpIntroWindow; // the splash screen DockingManager* mpDockingManager; BlendFrameCache* mpBlendFrameCache; bool mbIsTestTool; @@ -342,15 +342,14 @@ struct ImplSVData void ImplInitSVData(); void ImplDeInitSVData(); void ImplDestroySVData(); -Window* ImplGetDefaultWindow(); +vcl::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(); BlendFrameCache* ImplGetBlendFrameCache(); -void ImplWindowAutoMnemonic( Window* pWindow ); +void ImplWindowAutoMnemonic( vcl::Window* pWindow ); void ImplUpdateSystemProcessWindow(); -Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos ); bool ImplCallHotKey( const vcl::KeyCode& rKeyCode ); void ImplFreeHotKeyData(); @@ -374,10 +373,10 @@ FieldUnitStringList* ImplGetCleanedFieldUnits(); struct ImplDelData { ImplDelData* mpNext; - const Window* mpWindow; + const vcl::Window* mpWindow; bool mbDel; - ImplDelData( const Window* pWindow = NULL ) + ImplDelData( const vcl::Window* pWindow = NULL ) : mpNext( NULL ), mpWindow( NULL ), mbDel( false ) { if( pWindow ) AttachToWindow( pWindow ); } @@ -390,19 +389,19 @@ struct ImplDelData } private: - void AttachToWindow( const Window* ); + void AttachToWindow( const vcl::Window* ); }; struct ImplFocusDelData : public ImplDelData { - Window* mpFocusWin; + vcl::Window* mpFocusWin; }; struct ImplSVEvent { void* mpData; Link* mpLink; - Window* mpWindow; + vcl::Window* mpWindow; ImplDelData maDelData; bool mbCall; }; diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h index 9056ec55e043..767c7c36f6af 100644 --- a/vcl/inc/toolbox.h +++ b/vcl/inc/toolbox.h @@ -34,11 +34,11 @@ #define TB_MENUBUTTON_SIZE 12 #define TB_MENUBUTTON_OFFSET 2 -class Window; +namespace vcl { class Window; } struct ImplToolItem { - Window* mpWindow; + vcl::Window* mpWindow; void* mpUserData; Image maImage; Image maHighImage; diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx index b8396c4c11be..e7a8dbac0ed8 100644 --- a/vcl/inc/unx/gtk/gtkdata.hxx +++ b/vcl/inc/unx/gtk/gtkdata.hxx @@ -48,7 +48,7 @@ inline GdkWindow * widget_get_window(GtkWidget *widget) #endif } -inline XLIB_Window widget_get_xid(GtkWidget *widget) +inline ::Window widget_get_xid(GtkWidget *widget) { #if GTK_CHECK_VERSION(3,0,0) return GDK_WINDOW_XID(gtk_widget_get_window(widget)); diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index d1bd4fbbf756..93a7f1dccb1c 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -48,7 +48,7 @@ class GtkSalGraphics; class GtkSalDisplay; #if GTK_CHECK_VERSION(3,0,0) -typedef XLIB_Window GdkNativeWindow; +typedef ::Window GdkNativeWindow; #define GDK_WINDOW_XWINDOW(o) GDK_WINDOW_XID(o) #define gdk_set_sm_client_id(i) gdk_x11_set_sm_client_id(i) #define gdk_window_foreign_new_for_display(a,b) gdk_x11_window_foreign_new_for_display(a,b) @@ -295,7 +295,7 @@ class GtkSalFrame : public SalFrame Size calcDefaultSize(); void setMinMaxSize(); - void createNewWindow( XLIB_Window aParent, bool bXEmbed, SalX11Screen nXScreen ); + void createNewWindow( ::Window aParent, bool bXEmbed, SalX11Screen nXScreen ); void askForXEmbedFocus( sal_Int32 nTimecode ); void AllocateFrame(); diff --git a/vcl/inc/unx/i18n_ic.hxx b/vcl/inc/unx/i18n_ic.hxx index 1cf47fae20f6..517f1bbe7244 100644 --- a/vcl/inc/unx/i18n_ic.hxx +++ b/vcl/inc/unx/i18n_ic.hxx @@ -59,7 +59,7 @@ public: bool IsPreeditMode() { return maClientData.eState == ePreeditStatusActive; } XIC GetContext() { return maContext; } - void ExtendEventMask( XLIB_Window aFocusWindow ); + void ExtendEventMask( ::Window aFocusWindow ); void SetICFocus( SalFrame* pFocusFrame ); void UnsetICFocus( SalFrame* pFrame ); void HandleDestroyIM(); diff --git a/vcl/inc/unx/i18n_im.hxx b/vcl/inc/unx/i18n_im.hxx index d1741eedebb8..8e3a2ae31eec 100644 --- a/vcl/inc/unx/i18n_im.hxx +++ b/vcl/inc/unx/i18n_im.hxx @@ -43,7 +43,7 @@ public: bool CreateMethod( Display *pDisplay ); XIMStyles *GetSupportedStyles() { return mpStyles; } bool SetLocale( const char* pLocale = "" ); - bool FilterEvent( XEvent *pEvent, XLIB_Window window ); + bool FilterEvent( XEvent *pEvent, ::Window window ); SalI18N_InputMethod(); ~SalI18N_InputMethod(); diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index 2d77328d1e40..075cf79503fe 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -209,8 +209,8 @@ public: { bool m_bInit; - XLIB_Window m_aRoot; - XLIB_Window m_aRefWindow; + ::Window m_aRoot; + ::Window m_aRefWindow; Size m_aSize; SalVisual m_aVisual; SalColormap m_aColormap; @@ -280,7 +280,7 @@ protected: virtual bool Dispatch( XEvent *pEvent ) = 0; void InitXinerama(); - void InitRandR( XLIB_Window aRoot ) const; + void InitRandR( ::Window aRoot ) const; void DeInitRandR(); int processRandREvent( XEvent* ); @@ -332,7 +332,7 @@ public: return m_aScreens[nXScreen.getXScreen()]; } - XLIB_Window GetDrawable( SalX11Screen nXScreen ) const { return getDataForScreen( nXScreen ).m_aRefWindow; } + ::Window GetDrawable( SalX11Screen nXScreen ) const { return getDataForScreen( nXScreen ).m_aRefWindow; } Display *GetDisplay() const { return pDisp_; } SalX11Screen GetDefaultXScreen() const { return m_nXDefaultScreen; } const Size& GetScreenSize( SalX11Screen nXScreen ) const { return getDataForScreen( nXScreen ).m_aSize; } @@ -367,7 +367,7 @@ public: ::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor; } bool IsXinerama() const { return m_bXinerama; } const std::vector< Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; } - XLIB_Window GetRootWindow( SalX11Screen nXScreen ) const + ::Window GetRootWindow( SalX11Screen nXScreen ) const { return getDataForScreen( nXScreen ).m_aRoot; } const std::vector< ScreenData >& GetScreenData() { return m_aScreens; } unsigned int GetXScreenCount() const { return m_aScreens.size(); } diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h index bd37f9143c75..d85363a7aad8 100644 --- a/vcl/inc/unx/salframe.h +++ b/vcl/inc/unx/salframe.h @@ -61,11 +61,11 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame SalDisplay *pDisplay_; SalX11Screen m_nXScreen; - XLIB_Window mhWindow; - XLIB_Window mhShellWindow; - XLIB_Window mhForeignParent; + ::Window mhWindow; + ::Window mhShellWindow; + ::Window mhForeignParent; // window to fall back to when no longer in fullscreen mode - XLIB_Window mhStackingWindow; + ::Window mhStackingWindow; // window to listen for CirculateNotify events Pixmap mhBackgroundPixmap; @@ -138,7 +138,7 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame void Maximize(); void Restore(); - void RestackChildren( XLIB_Window* pTopLevelWindows, int nTopLevelWindows ); + void RestackChildren( ::Window* pTopLevelWindows, int nTopLevelWindows ); void RestackChildren(); long HandleKeyEvent ( XKeyEvent *pEvent ); @@ -154,7 +154,7 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame DECL_LINK( HandleAlwaysOnTopRaise, void* ); - void createNewWindow( XLIB_Window aParent, SalX11Screen nXScreen = SalX11Screen( -1 ) ); + void createNewWindow( ::Window aParent, SalX11Screen nXScreen = SalX11Screen( -1 ) ); void updateScreenNumber(); void setXEmbedInfo(); @@ -177,15 +177,15 @@ public: { return pDisplay_->GetDisplay(); } - XLIB_Window GetDrawable() const + ::Window GetDrawable() const { return GetWindow(); } SalX11Screen GetScreenNumber() const { return m_nXScreen; } - XLIB_Window GetWindow() const { return mhWindow; } - XLIB_Window GetShellWindow() const { return mhShellWindow; } - XLIB_Window GetForeignParent() const { return mhForeignParent; } - XLIB_Window GetStackingWindow() const { return mhStackingWindow; } + ::Window GetWindow() const { return mhWindow; } + ::Window GetShellWindow() const { return mhShellWindow; } + ::Window GetForeignParent() const { return mhForeignParent; } + ::Window GetStackingWindow() const { return mhStackingWindow; } long ShutDown() const { return CallCallback( SALEVENT_SHUTDOWN, 0 ); } long Close() const { return CallCallback( SALEVENT_CLOSE, 0 ); } sal_uIntPtr GetStyle() const { return nStyle_; } diff --git a/vcl/inc/unx/salobj.h b/vcl/inc/unx/salobj.h index 7cc73958f9eb..83dc856f5113 100644 --- a/vcl/inc/unx/salobj.h +++ b/vcl/inc/unx/salobj.h @@ -59,8 +59,8 @@ class VCLPLUG_GEN_PUBLIC X11SalObject : public SalObject public: SystemEnvData maSystemChildData; SalFrame* mpParent; - XLIB_Window maPrimary; - XLIB_Window maSecondary; + ::Window maPrimary; + ::Window maSecondary; Colormap maColormap; SalClipRegion maClipRegion; bool mbVisible; diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx index e2ae8ce08432..d5fcb32cc558 100644 --- a/vcl/inc/unx/wmadaptor.hxx +++ b/vcl/inc/unx/wmadaptor.hxx @@ -198,7 +198,7 @@ public: /* * gets the workarea the specified window is on (or -1) */ - int getWindowWorkArea( XLIB_Window aWindow ) const; + int getWindowWorkArea( ::Window aWindow ) const; /* * gets the specified workarea */ diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 5ab5cc1b57bf..983c3613cc66 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -41,7 +41,7 @@ struct ImplDelData; struct ImplAccessibleInfos; class FixedText; -class Window; +namespace vcl { class Window; } class VclSizeGroup; class VirtualDevice; class PhysicalFontCollection; @@ -91,7 +91,7 @@ namespace vcl { struct ControlLayoutData; } -bool ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, sal_uInt16 nEvent, const void* pEvent ); +bool ImplWindowFrameProc( vcl::Window* pInst, SalFrame* pFrame, sal_uInt16 nEvent, const void* pEvent ); #define WINDOW_HITTEST_INSIDE ((sal_uInt16)0x0001) #define WINDOW_HITTEST_TRANSPARENT ((sal_uInt16)0x0002) @@ -111,7 +111,7 @@ struct ImplWinData sal_uInt16 mnIsTopWindow; bool mbMouseOver; //< tracks mouse over for native widget paint effect bool mbEnableNativeWidget; //< toggle native widget rendering - ::std::list< Window* > + ::std::list< vcl::Window* > maTopWindowChildren; }; @@ -119,7 +119,7 @@ struct ImplOverlapData { VirtualDevice* mpSaveBackDev; //< saved background bitmap Region* mpSaveBackRgn; //< saved region, which must be invalidated - Window* mpNextBackWin; //< next window with saved background + vcl::Window* mpNextBackWin; //< next window with saved background sal_uIntPtr mnSaveBackSize; //< bitmap size of saved background bool mbSaveBack; //< true: save background sal_uInt8 mnTopLevel; //< Level for Overlap-Window @@ -130,13 +130,13 @@ 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; //< first overlap-window with saved background - ::std::vector<Window *> maOwnerDrawList; //< List of system windows with owner draw decoration + vcl::Window* mpNextFrame; //< next frame window + vcl::Window* mpFirstOverlap; //< first overlap vcl::Window + vcl::Window* mpFocusWin; //< focus window (is also set, when frame doesn't have the focous) + vcl::Window* mpMouseMoveWin; //< last window, where MouseMove() called + vcl::Window* mpMouseDownWin; //< last window, where MouseButtonDown() called + vcl::Window* mpFirstBackWin; //< first overlap-window with saved background + ::std::vector<vcl::Window *> maOwnerDrawList; //< List of system windows with owner draw decoration PhysicalFontCollection* mpFontCollection; //< Font-List for this frame ImplFontCache* mpFontCache; //< Font-Cache for this frame sal_Int32 mnDPIX; //< Original Screen Resolution @@ -185,9 +185,9 @@ struct ImplAccessibleInfos sal_uInt16 nAccessibleRole; OUString* pAccessibleName; OUString* pAccessibleDescription; - Window* pLabeledByWindow; - Window* pLabelForWindow; - Window* pMemberOfWindow; + vcl::Window* pLabeledByWindow; + vcl::Window* pLabelForWindow; + vcl::Window* pMemberOfWindow; ImplAccessibleInfos(); ~ImplAccessibleInfos(); @@ -206,21 +206,21 @@ public: 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; + vcl::Window* mpFrameWindow; + vcl::Window* mpOverlapWindow; + vcl::Window* mpBorderWindow; + vcl::Window* mpClientWindow; + vcl::Window* mpParent; + vcl::Window* mpRealParent; + vcl::Window* mpFirstChild; + vcl::Window* mpLastChild; + vcl::Window* mpFirstOverlap; + vcl::Window* mpLastOverlap; + vcl::Window* mpPrev; + vcl::Window* mpNext; + vcl::Window* mpNextOverlap; + vcl::Window* mpLastFocusWindow; + vcl::Window* mpDlgCtrlDownWindow; VclEventListeners maEventListeners; VclEventListeners maChildEventListeners; @@ -375,10 +375,10 @@ public: // helper methods -bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeave, +bool ImplHandleMouseEvent( vcl::Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeave, long nX, long nY, sal_uIntPtr nMsgTime, sal_uInt16 nCode, sal_uInt16 nMode ); -void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight ); +void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight ); #endif // INCLUDED_VCL_INC_WINDOW_H diff --git a/vcl/osx/a11yfocustracker.cxx b/vcl/osx/a11yfocustracker.cxx index 1ce09a61a89b..877d2a7060e4 100644 --- a/vcl/osx/a11yfocustracker.cxx +++ b/vcl/osx/a11yfocustracker.cxx @@ -35,7 +35,7 @@ using namespace ::com::sun::star::accessibility; using namespace ::com::sun::star::uno; -static inline Window * +static inline vcl::Window * getWindow(const ::VclSimpleEvent *pEvent) { return static_cast< const ::VclWindowEvent *> (pEvent)->GetWindow(); @@ -124,11 +124,11 @@ void AquaA11yFocusTracker::notify_toolbox_item_focus(ToolBox *pToolBox) } } -void AquaA11yFocusTracker::toolbox_open_floater(Window *pWindow) +void AquaA11yFocusTracker::toolbox_open_floater(vcl::Window *pWindow) { bool bToolboxFound = false; bool bFloatingWindowFound = false; - Window * pFloatingWindow = NULL; + vcl::Window * pFloatingWindow = NULL; while ( pWindow != NULL ) { if ( pWindow->GetType() == WINDOW_TOOLBOX ) { bToolboxFound = true; @@ -157,7 +157,7 @@ void AquaA11yFocusTracker::toolbox_open_floater(Window *pWindow) } } -void AquaA11yFocusTracker::toolbox_highlight_on(Window *pWindow) +void AquaA11yFocusTracker::toolbox_highlight_on(vcl::Window *pWindow) { // Make sure either the toolbox or its parent toolbox has the focus if ( ! pWindow->HasFocus() ) @@ -170,7 +170,7 @@ void AquaA11yFocusTracker::toolbox_highlight_on(Window *pWindow) notify_toolbox_item_focus(static_cast <ToolBox *> (pWindow)); } -void AquaA11yFocusTracker::toolbox_highlight_off(Window *pWindow) +void AquaA11yFocusTracker::toolbox_highlight_off(vcl::Window *pWindow) { ToolBox* pToolBoxParent = dynamic_cast< ToolBox * >( pWindow->GetParent() ); @@ -179,7 +179,7 @@ void AquaA11yFocusTracker::toolbox_highlight_off(Window *pWindow) notify_toolbox_item_focus( pToolBoxParent ); } -void AquaA11yFocusTracker::tabpage_activated(Window *pWindow) +void AquaA11yFocusTracker::tabpage_activated(vcl::Window *pWindow) { Reference< XAccessible > xAccessible( pWindow->GetAccessible() ); @@ -205,7 +205,7 @@ void AquaA11yFocusTracker::menu_highlighted(const VclMenuEvent *pEvent) } } -void AquaA11yFocusTracker::window_got_focus(Window *pWindow) +void AquaA11yFocusTracker::window_got_focus(vcl::Window *pWindow) { // The menu bar is handled through VCLEVENT_MENU_HIGHLIGHTED if( ! pWindow || !pWindow->IsReallyVisible() || pWindow->GetType() == WINDOW_MENUBARWINDOW ) diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 93d1e1a53e19..d8adf03893e2 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -515,7 +515,7 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent ) break; } AquaSalFrame* pFrame = pSalData->maFrames.front(); - Window* pWindow = pFrame ? pFrame->GetWindow() : NULL; + vcl::Window* pWindow = pFrame ? pFrame->GetWindow() : NULL; if( pWindow ) { diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx index ed5cb45ccc33..10f0a40d8f13 100644 --- a/vcl/qa/cppunit/complextext.cxx +++ b/vcl/qa/cppunit/complextext.cxx @@ -43,7 +43,7 @@ void VclComplexTextTest::testArabic() OUString aOneTwoThree( (sal_Char *)pOneTwoThreeUTF8, SAL_N_ELEMENTS( pOneTwoThreeUTF8 ) - 1, RTL_TEXTENCODING_UTF8 ); - Window* pWin = new WorkWindow( (Window *)NULL ); + vcl::Window* pWin = new WorkWindow( (vcl::Window *)NULL ); CPPUNIT_ASSERT( pWin != NULL ); OutputDevice *pOutDev = static_cast< OutputDevice * >( pWin ); diff --git a/vcl/qa/cppunit/dndtest.cxx b/vcl/qa/cppunit/dndtest.cxx index c789f8cf71ba..f3aadab1cea6 100644 --- a/vcl/qa/cppunit/dndtest.cxx +++ b/vcl/qa/cppunit/dndtest.cxx @@ -49,7 +49,7 @@ using namespace ::com::sun::star::datatransfer::dnd; class MyWin : public WorkWindow { public: - MyWin( Window* pParent, WinBits nWinStyle ); + MyWin( vcl::Window* pParent, WinBits nWinStyle ); void MouseMove( const MouseEvent& rMEvt ); void MouseButtonDown( const MouseEvent& rMEvt ); @@ -62,11 +62,11 @@ public: class MyDragAndDropListener: public ::cppu::WeakImplHelper3 < XDropTargetListener, XDragGestureListener, XDragSourceListener > { - Window * m_pWindow; + vcl::Window * m_pWindow; public: - MyDragAndDropListener( Window * pWindow ) : m_pWindow( pWindow ) {}; + MyDragAndDropListener( vcl::Window * pWindow ) : m_pWindow( pWindow ) {}; virtual void SAL_CALL dragGestureRecognized( const DragGestureEvent& dge ) throw(RuntimeException); virtual void SAL_CALL drop( const DropTargetDropEvent& dtde ) throw(RuntimeException); @@ -87,7 +87,7 @@ class MyInfoBox : public InfoBox public: - MyInfoBox( Window* pParent ); + MyInfoBox( vcl::Window* pParent ); }; class MyListBox : public ListBox @@ -95,7 +95,7 @@ class MyListBox : public ListBox public: - MyListBox( Window* pParent ); + MyListBox( vcl::Window* pParent ); }; class StringTransferable : public ::cppu::WeakImplHelper1< XTransferable > @@ -152,7 +152,7 @@ void VclDnDTest::testDnD() aListBox.Show(); } -MyWin::MyWin( Window* pParent, WinBits nWinStyle ) : +MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) : WorkWindow( pParent, nWinStyle ) { Reference< XDropTargetListener > xListener = new MyDragAndDropListener( this ); @@ -258,7 +258,7 @@ void SAL_CALL MyDragAndDropListener::disposing( const EventObject& ) throw(Runti { } -MyInfoBox::MyInfoBox( Window* pParent ) : InfoBox( pParent, +MyInfoBox::MyInfoBox( vcl::Window* pParent ) : InfoBox( pParent, OUString("dragging over this box should result in another window id in the drag log.") ) { Reference< XDropTargetListener > xListener = new MyDragAndDropListener( this ); @@ -275,7 +275,7 @@ MyInfoBox::MyInfoBox( Window* pParent ) : InfoBox( pParent, xRecognizer->addDragGestureListener( Reference< XDragGestureListener > ( xListener, UNO_QUERY ) ); }; -MyListBox::MyListBox( Window* pParent ) : ListBox( pParent ) +MyListBox::MyListBox( vcl::Window* pParent ) : ListBox( pParent ) { Reference< XDropTargetListener > xListener = new MyDragAndDropListener( this ); diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 7b99b224ed6c..a35d62dead31 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -213,7 +213,7 @@ private: bool mbHelpText; public: - DbgInfoDialog( Window* pParent, bool bHelpText = false ); + DbgInfoDialog( vcl::Window* pParent, bool bHelpText = false ); void SetInfoText( const OUString& rStr ); }; @@ -378,7 +378,7 @@ void DbgDialog::RequestHelp( const HelpEvent& rHEvt ) } } -DbgInfoDialog::DbgInfoDialog( Window* pParent, bool bHelpText ) : +DbgInfoDialog::DbgInfoDialog( vcl::Window* pParent, bool bHelpText ) : ModalDialog( pParent, WB_STDMODAL ), maListBox( this, WB_BORDER | WB_AUTOHSCROLL ), maOKButton( this, WB_DEFBUTTON ) @@ -449,12 +449,12 @@ void DbgInfoDialog::SetInfoText( const OUString& rStr ) maListBox.SetUpdateMode( true ); } -void DbgDialogTest( Window* pWindow ) +void DbgDialogTest( vcl::Window* pWindow ) { bool aAccelBuf[65536] = {false}; sal_uInt16 nChildCount = pWindow->GetChildCount(); - Window* pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); - Window* pChild; + vcl::Window* pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window* pChild; Point aTabPos; if ( !pGetChild ) @@ -613,7 +613,7 @@ void DbgDialogTest( Window* pWindow ) if ( (i+1 < nChildCount) && !aText.isEmpty() ) { - Window* pTempChild = pGetChild->GetWindow( WINDOW_NEXT )->ImplGetWindow(); + vcl::Window* pTempChild = pGetChild->GetWindow( WINDOW_NEXT )->ImplGetWindow(); if ( (pTempChild->GetType() == WINDOW_EDIT) || (pTempChild->GetType() == WINDOW_MULTILINEEDIT) || (pTempChild->GetType() == WINDOW_SPINFIELD) || diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 3180bee56f9a..5a475e77213e 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -53,7 +53,7 @@ Help::~Help() { } -bool Help::Start( const OUString&, const Window* ) +bool Help::Start( const OUString&, const vcl::Window* ) { return false; } @@ -63,7 +63,7 @@ bool Help::SearchKeyword( const OUString& ) return false; } -OUString Help::GetHelpText( const OUString&, const Window* ) +OUString Help::GetHelpText( const OUString&, const vcl::Window* ) { return OUString(); } @@ -146,7 +146,7 @@ bool Help::IsBalloonHelpEnabled() return ImplGetSVData()->maHelpData.mbBalloonHelp; } -bool Help::ShowBalloon( Window* pParent, +bool Help::ShowBalloon( vcl::Window* pParent, const Point& rScreenPos, const OUString& rHelpText ) { @@ -156,7 +156,7 @@ bool Help::ShowBalloon( Window* pParent, return true; } -bool Help::ShowBalloon( Window* pParent, +bool Help::ShowBalloon( vcl::Window* pParent, const Point& rScreenPos, const Rectangle& rRect, const OUString& rHelpText ) { @@ -181,7 +181,7 @@ bool Help::IsQuickHelpEnabled() return ImplGetSVData()->maHelpData.mbQuickHelp; } -bool Help::ShowQuickHelp( Window* pParent, +bool Help::ShowQuickHelp( vcl::Window* pParent, const Rectangle& rScreenRect, const OUString& rHelpText, const OUString& rLongHelpText, @@ -200,7 +200,7 @@ void Help::HideBalloonAndQuickHelp() ImplDestroyHelpWindow( bIsVisible ); } -sal_uIntPtr Help::ShowTip( Window* pParent, const Rectangle& rScreenRect, +sal_uIntPtr Help::ShowTip( vcl::Window* pParent, const Rectangle& rScreenRect, const OUString& rText, sal_uInt16 nStyle ) { sal_uInt16 nHelpWinStyle = ( ( nStyle & QUICKHELP_TIP_STYLE_BALLOON ) != 0 ) ? HELPWINSTYLE_BALLOON : HELPWINSTYLE_QUICK; @@ -213,7 +213,7 @@ sal_uIntPtr Help::ShowTip( Window* pParent, const Rectangle& rScreenRect, return nId; } -void Help::UpdateTip( sal_uIntPtr nId, Window* pParent, const Rectangle& rScreenRect, const OUString& rText ) +void Help::UpdateTip( sal_uIntPtr nId, vcl::Window* pParent, const Rectangle& rScreenRect, const OUString& rText ) { HelpTextWindow* pHelpWin = reinterpret_cast< HelpTextWindow* >( nId ); ENSURE_OR_RETURN_VOID( pHelpWin != NULL, "Help::UpdateTip: invalid ID!" ); @@ -230,7 +230,7 @@ void Help::UpdateTip( sal_uIntPtr nId, Window* pParent, const Rectangle& rScreen void Help::HideTip( sal_uLong nId ) { HelpTextWindow* pHelpWin = (HelpTextWindow*)nId; - Window* pFrameWindow = pHelpWin->ImplGetFrameWindow(); + vcl::Window* pFrameWindow = pHelpWin->ImplGetFrameWindow(); pHelpWin->Hide(); // trigger update, so that a Paint is instantly triggered since we do not save the background pFrameWindow->ImplUpdateAll(); @@ -238,7 +238,7 @@ void Help::HideTip( sal_uLong nId ) ImplGetSVData()->maHelpData.mnLastHelpHideTime = Time::GetSystemTicks(); } -HelpTextWindow::HelpTextWindow( Window* pParent, const OUString& rText, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle ) : +HelpTextWindow::HelpTextWindow( vcl::Window* pParent, const OUString& rText, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle ) : FloatingWindow( pParent, WB_SYSTEMWINDOW|WB_TOOLTIPWIN ), // #105827# if we change the parent, mirroring will not work correctly when positioning this window maHelpText( rText ) { @@ -464,7 +464,7 @@ OUString HelpTextWindow::GetText() const return FloatingWindow::CreateAccessible(); } -void ImplShowHelpWindow( Window* pParent, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle, +void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle, const OUString& rHelpText, const OUString& rStatusText, const Point& rScreenPos, const Rectangle* pHelpArea ) { @@ -501,7 +501,7 @@ void ImplShowHelpWindow( Window* pParent, sal_uInt16 nHelpWinStyle, sal_uInt16 n bool const bTextChanged = rHelpText != pHelpWin->GetHelpText(); if ( bTextChanged || ( ( nStyle & QUICKHELP_FORCE_REPOSITION ) != 0 ) ) { - Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow(); + vcl::Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow(); Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) ); if( pHelpWin->IsVisible() ) pWindow->Invalidate( aInvRect ); @@ -547,7 +547,7 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime ) HelpTextWindow* pHelpWin = pSVData->maHelpData.mpHelpWin; if ( pHelpWin ) { - Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow(); + vcl::Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow(); // find out screen area covered by system help window Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) ); if( pHelpWin->IsVisible() ) @@ -561,7 +561,7 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime ) } } -void ImplSetHelpWindowPos( Window* pHelpWin, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle, +void ImplSetHelpWindowPos( vcl::Window* pHelpWin, sal_uInt16 nHelpWinStyle, sal_uInt16 nStyle, const Point& rPos, const Rectangle* pHelpArea ) { Point aPos = rPos; @@ -665,7 +665,7 @@ void ImplSetHelpWindowPos( Window* pHelpWin, sal_uInt16 nHelpWinStyle, sal_uInt1 } } - Window* pWindow = pHelpWin->GetParent()->ImplGetFrameWindow(); + vcl::Window* pWindow = pHelpWin->GetParent()->ImplGetFrameWindow(); aPos = pWindow->AbsoluteScreenToOutputPixel( aPos ); pHelpWin->SetPosPixel( aPos ); } diff --git a/vcl/source/app/sound.cxx b/vcl/source/app/sound.cxx index 226d09fb345c..7c5e9939c97a 100644 --- a/vcl/source/app/sound.cxx +++ b/vcl/source/app/sound.cxx @@ -24,7 +24,7 @@ #include <salframe.hxx> #include <svdata.hxx> -void Sound::Beep( Window* pWindow ) +void Sound::Beep( vcl::Window* pWindow ) { // #i91990# if ( Application::IsHeadlessModeEnabled() ) diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx index 2327639aa6fe..8093a6fe6900 100644 --- a/vcl/source/app/stdtext.cxx +++ b/vcl/source/app/stdtext.cxx @@ -34,7 +34,7 @@ OUString GetStandardText( sal_uInt16 nStdText ) return OUString(); } -void ShowServiceNotAvailableError(Window* pParent, +void ShowServiceNotAvailableError(vcl::Window* pParent, const OUString& rServiceName, bool bError) { OUString aText = GetStandardText(STANDARD_TEXT_SERVICE_NOT_AVAILABLE). diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index e2dc111ae65c..e5640c7a7f94 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -156,28 +156,28 @@ struct ImplEventHook struct ImplPostEventData { sal_uLong mnEvent; - const Window* mpWin; + const vcl::Window* mpWin; ImplSVEvent * mnEventId; KeyEvent maKeyEvent; MouseEvent maMouseEvent; ZoomEvent maZoomEvent; ScrollEvent maScrollEvent; - ImplPostEventData( sal_uLong nEvent, const Window* pWin, const KeyEvent& rKeyEvent ) : + ImplPostEventData( sal_uLong nEvent, const vcl::Window* pWin, const KeyEvent& rKeyEvent ) : mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maKeyEvent( rKeyEvent ) {} - ImplPostEventData( sal_uLong nEvent, const Window* pWin, const MouseEvent& rMouseEvent ) : + ImplPostEventData( sal_uLong nEvent, const vcl::Window* pWin, const MouseEvent& rMouseEvent ) : mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maMouseEvent( rMouseEvent ) {} #if !HAVE_FEATURE_DESKTOP - ImplPostEventData( sal_uLong nEvent, const Window* pWin, const ZoomEvent& rZoomEvent ) : + ImplPostEventData( sal_uLong nEvent, const vcl::Window* pWin, const ZoomEvent& rZoomEvent ) : mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maZoomEvent( rZoomEvent ) {} - ImplPostEventData( sal_uLong nEvent, const Window* pWin, const ScrollEvent& rScrollEvent ) : + ImplPostEventData( sal_uLong nEvent, const vcl::Window* pWin, const ScrollEvent& rScrollEvent ) : mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maScrollEvent( rScrollEvent ) {} #endif ~ImplPostEventData() {} }; -typedef ::std::pair< Window*, ImplPostEventData* > ImplPostEventPair; +typedef ::std::pair< vcl::Window*, ImplPostEventData* > ImplPostEventPair; static ::std::list< ImplPostEventPair > aPostedEventList; @@ -478,7 +478,7 @@ void Application::OverrideSystemSettings( AllSettings& /*rSettings*/ ) void Application::MergeSystemSettings( AllSettings& rSettings ) { - Window* pWindow = ImplGetSVData()->maWinData.mpFirstFrame; + vcl::Window* pWindow = ImplGetSVData()->maWinData.mpFirstFrame; if( ! pWindow ) pWindow = ImplGetDefaultWindow(); if( pWindow ) @@ -497,7 +497,7 @@ void Application::MergeSystemSettings( AllSettings& rSettings ) bool Application::ValidateSystemFont() { - Window* pWindow = ImplGetSVData()->maWinData.mpFirstFrame; + vcl::Window* pWindow = ImplGetSVData()->maWinData.mpFirstFrame; if( ! pWindow ) pWindow = ImplGetDefaultWindow(); @@ -542,7 +542,7 @@ void Application::SetSettings( const AllSettings& rSettings ) ImplCallEventListeners( VCLEVENT_APPLICATION_DATACHANGED, NULL, &aDCEvt); // Update all windows - Window* pFirstFrame = pSVData->maWinData.mpFirstFrame; + vcl::Window* pFirstFrame = pSVData->maWinData.mpFirstFrame; // Reset data that needs to be re-calculated long nOldDPIX = 0; long nOldDPIY = 0; @@ -550,21 +550,21 @@ void Application::SetSettings( const AllSettings& rSettings ) { nOldDPIX = pFirstFrame->mnDPIX; nOldDPIY = pFirstFrame->mnDPIY; - Window::ImplInitAppFontData(pFirstFrame); + vcl::Window::ImplInitAppFontData(pFirstFrame); } - Window* pFrame = pFirstFrame; + vcl::Window* pFrame = pFirstFrame; while ( pFrame ) { // restore AppFont cache data pFrame->mpWindowImpl->mpFrameData->meMapUnit = MAP_PIXEL; // call UpdateSettings from ClientWindow in order to prevent updating data twice - Window* pClientWin = pFrame; + vcl::Window* pClientWin = pFrame; while ( pClientWin->ImplGetClientWindow() ) pClientWin = pClientWin->ImplGetClientWindow(); pClientWin->UpdateSettings( rSettings, true ); - Window* pTempWin = pFrame->mpWindowImpl->mpFrameData->mpFirstOverlap; + vcl::Window* pTempWin = pFrame->mpWindowImpl->mpFrameData->mpFirstOverlap; while ( pTempWin ) { // call UpdateSettings from ClientWindow in order to prevent updating data twice @@ -636,12 +636,12 @@ void Application::InitSettings() void Application::NotifyAllWindows( DataChangedEvent& rDCEvt ) { ImplSVData* pSVData = ImplGetSVData(); - Window* pFrame = pSVData->maWinData.mpFirstFrame; + vcl::Window* pFrame = pSVData->maWinData.mpFirstFrame; while ( pFrame ) { pFrame->NotifyAllChildren( rDCEvt ); - Window* pSysWin = pFrame->mpWindowImpl->mpFrameData->mpFirstOverlap; + vcl::Window* pSysWin = pFrame->mpWindowImpl->mpFrameData->mpFirstOverlap; while ( pSysWin ) { pSysWin->NotifyAllChildren( rDCEvt ); @@ -652,7 +652,7 @@ void Application::NotifyAllWindows( DataChangedEvent& rDCEvt ) } } -void Application::ImplCallEventListeners( sal_uLong nEvent, Window *pWin, void* pData ) +void Application::ImplCallEventListeners( sal_uLong nEvent, vcl::Window *pWin, void* pData ) { ImplSVData* pSVData = ImplGetSVData(); VclWindowEvent aEvent( pWin, nEvent, pData ); @@ -699,7 +699,7 @@ void Application::RemoveKeyListener( const Link& rKeyListener ) pSVData->maAppData.mpKeyListeners->removeListener( rKeyListener ); } -bool Application::HandleKey( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent ) +bool Application::HandleKey( sal_uLong nEvent, vcl::Window *pWin, KeyEvent* pKeyEvent ) { // let listeners process the key event VclWindowEvent aEvent( pWin, nEvent, (void *) pKeyEvent ); @@ -713,7 +713,7 @@ bool Application::HandleKey( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent return bProcessed; } -ImplSVEvent * Application::PostKeyEvent( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent ) +ImplSVEvent * Application::PostKeyEvent( sal_uLong nEvent, vcl::Window *pWin, KeyEvent* pKeyEvent ) { const SolarMutexGuard aGuard; ImplSVEvent * nEventId = 0; @@ -738,7 +738,7 @@ ImplSVEvent * Application::PostKeyEvent( sal_uLong nEvent, Window *pWin, KeyEven return nEventId; } -ImplSVEvent * Application::PostMouseEvent( sal_uLong nEvent, Window *pWin, MouseEvent* pMouseEvent ) +ImplSVEvent * Application::PostMouseEvent( sal_uLong nEvent, vcl::Window *pWin, MouseEvent* pMouseEvent ) { const SolarMutexGuard aGuard; ImplSVEvent * nEventId = 0; @@ -773,7 +773,7 @@ ImplSVEvent * Application::PostMouseEvent( sal_uLong nEvent, Window *pWin, Mouse #if !HAVE_FEATURE_DESKTOP -ImplSVEvent * Application::PostZoomEvent( sal_uLong nEvent, Window *pWin, ZoomEvent* pZoomEvent ) +ImplSVEvent * Application::PostZoomEvent( sal_uLong nEvent, vcl::Window *pWin, ZoomEvent* pZoomEvent ) { const SolarMutexGuard aGuard; ImplSVEvent * nEventId = 0; @@ -805,7 +805,7 @@ ImplSVEvent * Application::PostZoomEvent( sal_uLong nEvent, Window *pWin, ZoomEv return nEventId; } -ImplSVEvent * Application::PostScrollEvent( sal_uLong nEvent, Window *pWin, ScrollEvent* pScrollEvent ) +ImplSVEvent * Application::PostScrollEvent( sal_uLong nEvent, vcl::Window *pWin, ScrollEvent* pScrollEvent ) { const SolarMutexGuard aGuard; ImplSVEvent * nEventId = 0; @@ -903,7 +903,7 @@ IMPL_STATIC_LINK_NOINSTANCE( Application, PostEventHandler, void*, pCallData ) return 0; } -void Application::RemoveMouseAndKeyEvents( Window* pWin ) +void Application::RemoveMouseAndKeyEvents( vcl::Window* pWin ) { const SolarMutexGuard aGuard; @@ -932,7 +932,7 @@ ImplSVEvent * Application::PostUserEvent( const Link& rLink, void* pCaller ) pSVEvent->mpLink = new Link( rLink ); pSVEvent->mpWindow = NULL; pSVEvent->mbCall = true; - Window* pDefWindow = ImplGetDefaultWindow(); + vcl::Window* pDefWindow = ImplGetDefaultWindow(); if ( pDefWindow == 0 || !pDefWindow->ImplGetFrame()->PostEvent( pSVEvent ) ) { delete pSVEvent->mpLink; @@ -1013,7 +1013,7 @@ WorkWindow* Application::GetAppWindow() return ImplGetSVData()->maWinData.mpAppWin; } -Window* Application::GetFocusWindow() +vcl::Window* Application::GetFocusWindow() { return ImplGetSVData()->maWinData.mpFocusWin; } @@ -1023,13 +1023,13 @@ OutputDevice* Application::GetDefaultDevice() return ImplGetDefaultWindow(); } -Window* Application::GetFirstTopLevelWindow() +vcl::Window* Application::GetFirstTopLevelWindow() { ImplSVData* pSVData = ImplGetSVData(); return pSVData->maWinData.mpFirstFrame; } -Window* Application::GetNextTopLevelWindow( Window* pWindow ) +vcl::Window* Application::GetNextTopLevelWindow( vcl::Window* pWindow ) { return pWindow->mpWindowImpl->mpFrameData->mpNextFrame; } @@ -1038,7 +1038,7 @@ long Application::GetTopWindowCount() { long nRet = 0; ImplSVData* pSVData = ImplGetSVData(); - Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame : NULL; + vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame : NULL; while( pWin ) { if( pWin->ImplGetWindow()->IsTopWindow() ) @@ -1048,11 +1048,11 @@ long Application::GetTopWindowCount() return nRet; } -Window* Application::GetTopWindow( long nIndex ) +vcl::Window* Application::GetTopWindow( long nIndex ) { long nIdx = 0; ImplSVData* pSVData = ImplGetSVData(); - Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame : NULL; + vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame : NULL; while( pWin ) { if( pWin->ImplGetWindow()->IsTopWindow() ) @@ -1067,9 +1067,9 @@ Window* Application::GetTopWindow( long nIndex ) return NULL; } -Window* Application::GetActiveTopWindow() +vcl::Window* Application::GetActiveTopWindow() { - Window *pWin = ImplGetSVData()->maWinData.mpFocusWin; + vcl::Window *pWin = ImplGetSVData()->maWinData.mpFocusWin; while( pWin ) { if( pWin->IsTopWindow() ) @@ -1285,12 +1285,12 @@ void Application::SetDialogScaleX( short nScale ) pSVData->maGDIData.mnAppFontX += (pSVData->maGDIData.mnAppFontX*nScale)/100; } -void Application::SetDefDialogParent( Window* pWindow ) +void Application::SetDefDialogParent( vcl::Window* pWindow ) { ImplGetSVData()->maWinData.mpDefDialogParent = pWindow; } -Window* Application::GetDefDialogParent() +vcl::Window* Application::GetDefDialogParent() { ImplSVData* pSVData = ImplGetSVData(); // #103442# find some useful dialog parent if there @@ -1305,7 +1305,7 @@ Window* Application::GetDefDialogParent() // as DefDialogParent // current focus frame - Window *pWin = NULL; + vcl::Window *pWin = NULL; if( (pWin = pSVData->maWinData.mpFocusWin) != NULL ) { while( pWin->mpWindowImpl && pWin->mpWindowImpl->mpParent ) @@ -1670,10 +1670,10 @@ void Application::setDeInitHook(Link const & hook) { } // helper method to allow inline constructor even for pWindow!=NULL case -void ImplDelData::AttachToWindow( const Window* pWindow ) +void ImplDelData::AttachToWindow( const vcl::Window* pWindow ) { if( pWindow ) - const_cast<Window*>(pWindow)->ImplAddDel( this ); + const_cast<vcl::Window*>(pWindow)->ImplAddDel( this ); } // define dtor for ImplDelData @@ -1684,7 +1684,7 @@ ImplDelData::~ImplDelData() if( !mbDel && mpWindow ) { // the window still exists but we were not removed - const_cast<Window*>(mpWindow)->ImplRemoveDel( this ); + const_cast<vcl::Window*>(mpWindow)->ImplRemoveDel( this ); mpWindow = NULL; } } diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 6054d6968f18..0aaff4a14e05 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -109,7 +109,7 @@ void ImplDestroySVData() pImplSVData = NULL; } -Window* ImplGetDefaultWindow() +vcl::Window* ImplGetDefaultWindow() { ImplSVData* pSVData = ImplGetSVData(); if ( pSVData->maWinData.mpAppWin ) @@ -272,15 +272,15 @@ bool ImplInitAccessBridge() return true; } -Window* ImplFindWindow( const SalFrame* pFrame, ::Point& rSalFramePos ) +vcl::Window* ImplFindWindow( const SalFrame* pFrame, ::Point& rSalFramePos ) { ImplSVData* pSVData = ImplGetSVData(); - Window* pFrameWindow = pSVData->maWinData.mpFirstFrame; + vcl::Window* pFrameWindow = pSVData->maWinData.mpFirstFrame; while ( pFrameWindow ) { if ( pFrameWindow->ImplGetFrame() == pFrame ) { - Window* pWindow = pFrameWindow->ImplFindWindow( rSalFramePos ); + vcl::Window* pWindow = pFrameWindow->ImplFindWindow( rSalFramePos ); if ( !pWindow ) pWindow = pFrameWindow->ImplGetWindow(); rSalFramePos = pWindow->ImplFrameToOutput( rSalFramePos ); diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 6c287551da4f..bd3544bc125a 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -362,7 +362,7 @@ void DeInitVCL() long nBadTopWindows = nTopWindowCount; for( long i = 0; i < nTopWindowCount; i++ ) { - Window* pWin = Application::GetTopWindow( i ); + vcl::Window* pWin = Application::GetTopWindow( i ); // default window will be destroyed further down // but may still be useful during deinit up to that point if( pWin == pSVData->mpDefaultWin ) diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index bfc7fd26976a..cef9d0dce18d 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -597,13 +597,13 @@ void PushButton::ImplInitPushButtonData() namespace { - Window* getPreviousSibling(Window *pParent) + vcl::Window* getPreviousSibling(vcl::Window *pParent) { return pParent ? pParent->GetWindow(WINDOW_LASTCHILD) : NULL; } } -void PushButton::ImplInit( Window* pParent, WinBits nStyle ) +void PushButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle); Button::ImplInit( pParent, nStyle, NULL ); @@ -614,7 +614,7 @@ void PushButton::ImplInit( Window* pParent, WinBits nStyle ) ImplInitSettings( true, true, true ); } -WinBits PushButton::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) +WinBits PushButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ) { if ( !(nStyle & WB_NOTABSTOP) ) nStyle |= WB_TABSTOP; @@ -675,7 +675,7 @@ void PushButton::ImplInitSettings( bool bFont, } } -void PushButton::ImplDrawPushButtonFrame( Window* pDev, +void PushButton::ImplDrawPushButtonFrame( vcl::Window* pDev, Rectangle& rRect, sal_uInt16 nStyle ) { if ( !(pDev->GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE)) ) @@ -701,7 +701,7 @@ void PushButton::ImplDrawPushButtonFrame( Window* pDev, rRect = aDecoView.DrawButton( rRect, nStyle ); } -bool PushButton::ImplHitTestPushButton( Window* pDev, +bool PushButton::ImplHitTestPushButton( vcl::Window* pDev, const Point& rPos ) { Point aTempPoint; @@ -1139,14 +1139,14 @@ PushButton::PushButton( WindowType nType ) : ImplInitPushButtonData(); } -PushButton::PushButton( Window* pParent, WinBits nStyle ) : +PushButton::PushButton( vcl::Window* pParent, WinBits nStyle ) : Button( WINDOW_PUSHBUTTON ) { ImplInitPushButtonData(); ImplInit( pParent, nStyle ); } -PushButton::PushButton( Window* pParent, const ResId& rResId ) : +PushButton::PushButton( vcl::Window* pParent, const ResId& rResId ) : Button( WINDOW_PUSHBUTTON ) { rResId.SetRT( RSC_PUSHBUTTON ); @@ -1480,7 +1480,7 @@ bool PushButton::PreNotify( NotifyEvent& rNEvt ) if( bDropDown && GetParent()->IsNativeControlSupported( aCtrlType, PART_ENTIRE_CONTROL) && !GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN) ) { - Window *pBorder = GetParent()->GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetParent()->GetWindow( WINDOW_BORDER ); if(aCtrlType == CTRL_COMBOBOX) { // only paint the button part to avoid flickering of the combobox text @@ -1634,14 +1634,14 @@ bool PushButton::set_property(const OString &rKey, const OString &rValue) return true; } -void OKButton::ImplInit( Window* pParent, WinBits nStyle ) +void OKButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) { PushButton::ImplInit( pParent, nStyle ); SetText( Button::GetStandardText( BUTTON_OK ) ); } -OKButton::OKButton( Window* pParent, WinBits nStyle ) : +OKButton::OKButton( vcl::Window* pParent, WinBits nStyle ) : PushButton( WINDOW_OKBUTTON ) { ImplInit( pParent, nStyle ); @@ -1652,7 +1652,7 @@ void OKButton::Click() // close parent if no link set if ( !GetClickHdl() ) { - Window* pParent = getNonLayoutParent(this); + vcl::Window* pParent = getNonLayoutParent(this); if ( pParent->IsSystemWindow() ) { if ( pParent->IsDialog() ) @@ -1679,14 +1679,14 @@ void OKButton::Click() } } -void CancelButton::ImplInit( Window* pParent, WinBits nStyle ) +void CancelButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) { PushButton::ImplInit( pParent, nStyle ); SetText( Button::GetStandardText( BUTTON_CANCEL ) ); } -CancelButton::CancelButton( Window* pParent, WinBits nStyle ) : +CancelButton::CancelButton( vcl::Window* pParent, WinBits nStyle ) : PushButton( WINDOW_CANCELBUTTON ) { ImplInit( pParent, nStyle ); @@ -1697,7 +1697,7 @@ void CancelButton::Click() // close parent if link not set if ( !GetClickHdl() ) { - Window* pParent = getNonLayoutParent(this); + vcl::Window* pParent = getNonLayoutParent(this); if ( pParent->IsSystemWindow() ) { if ( pParent->IsDialog() ) @@ -1724,26 +1724,26 @@ void CancelButton::Click() } } -CloseButton::CloseButton( Window* pParent, WinBits nStyle ) +CloseButton::CloseButton( vcl::Window* pParent, WinBits nStyle ) : CancelButton(pParent, nStyle) { SetText( Button::GetStandardText( BUTTON_CLOSE ) ); } -void HelpButton::ImplInit( Window* pParent, WinBits nStyle ) +void HelpButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) { PushButton::ImplInit( pParent, nStyle | WB_NOPOINTERFOCUS ); SetText( Button::GetStandardText( BUTTON_HELP ) ); } -HelpButton::HelpButton( Window* pParent, WinBits nStyle ) : +HelpButton::HelpButton( vcl::Window* pParent, WinBits nStyle ) : PushButton( WINDOW_HELPBUTTON ) { ImplInit( pParent, nStyle ); } -HelpButton::HelpButton( Window* pParent, const ResId& rResId ) : +HelpButton::HelpButton( vcl::Window* pParent, const ResId& rResId ) : PushButton( WINDOW_HELPBUTTON ) { rResId.SetRT( RSC_HELPBUTTON ); @@ -1760,7 +1760,7 @@ void HelpButton::Click() // trigger help if no link set if ( !GetClickHdl() ) { - Window* pFocusWin = Application::GetFocusWindow(); + vcl::Window* pFocusWin = Application::GetFocusWindow(); if ( !pFocusWin ) pFocusWin = this; @@ -1778,7 +1778,7 @@ void RadioButton::ImplInitRadioButtonData() mbStateChanged = false; } -void RadioButton::ImplInit( Window* pParent, WinBits nStyle ) +void RadioButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle); Button::ImplInit( pParent, nStyle, NULL ); @@ -1786,7 +1786,7 @@ void RadioButton::ImplInit( Window* pParent, WinBits nStyle ) ImplInitSettings( true, true, true ); } -WinBits RadioButton::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) +WinBits RadioButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ) { if ( !(nStyle & WB_NOGROUP) && (!pPrevWindow || (pPrevWindow->GetType() != WINDOW_RADIOBUTTON)) ) @@ -1818,7 +1818,7 @@ void RadioButton::ImplInitSettings( bool bFont, if ( bBackground ) { - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( !IsControlBackground() && (pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) ) ) { @@ -2197,10 +2197,10 @@ std::vector< RadioButton* > RadioButton::GetRadioButtonGroup(bool bIncludeThis) SAL_WARN("vcl.control", "No new-style group set on radiobutton <" << GetHelpId() << "> using old-style digging around"); // go back to first in group; - Window* pFirst = const_cast<RadioButton*>(this); + vcl::Window* pFirst = const_cast<RadioButton*>(this); while( ( pFirst->GetStyle() & WB_GROUP ) == 0 ) { - Window* pWindow = pFirst->GetWindow( WINDOW_PREV ); + vcl::Window* pWindow = pFirst->GetWindow( WINDOW_PREV ); if( pWindow ) pFirst = pWindow; else @@ -2272,14 +2272,14 @@ void RadioButton::ImplCallClick( bool bGrabFocus, sal_uInt16 nFocusFlags ) mbStateChanged = false; } -RadioButton::RadioButton( Window* pParent, WinBits nStyle ) : +RadioButton::RadioButton( vcl::Window* pParent, WinBits nStyle ) : Button( WINDOW_RADIOBUTTON ), mbLegacyNoTextAlign( false ) { ImplInitRadioButtonData(); ImplInit( pParent, nStyle ); } -RadioButton::RadioButton( Window* pParent, const ResId& rResId ) : +RadioButton::RadioButton( vcl::Window* pParent, const ResId& rResId ) : Button( WINDOW_RADIOBUTTON ), mbLegacyNoTextAlign( false ) { rResId.SetRT( RSC_RADIOBUTTON ); @@ -2896,7 +2896,7 @@ void CheckBox::ImplInitCheckBoxData() mbTriState = false; } -void CheckBox::ImplInit( Window* pParent, WinBits nStyle ) +void CheckBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle); Button::ImplInit( pParent, nStyle, NULL ); @@ -2904,7 +2904,7 @@ void CheckBox::ImplInit( Window* pParent, WinBits nStyle ) ImplInitSettings( true, true, true ); } -WinBits CheckBox::ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ) +WinBits CheckBox::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle ) { if ( !(nStyle & WB_NOTABSTOP) ) nStyle |= WB_TABSTOP; @@ -2931,7 +2931,7 @@ void CheckBox::ImplInitSettings( bool bFont, if ( bBackground ) { - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( !IsControlBackground() && (pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) ) ) { @@ -3173,14 +3173,14 @@ void CheckBox::ImplCheck() Click(); } -CheckBox::CheckBox( Window* pParent, WinBits nStyle ) : +CheckBox::CheckBox( vcl::Window* pParent, WinBits nStyle ) : Button( WINDOW_CHECKBOX ), mbLegacyNoTextAlign( false ) { ImplInitCheckBoxData(); ImplInit( pParent, nStyle ); } -CheckBox::CheckBox( Window* pParent, const ResId& rResId ) : +CheckBox::CheckBox( vcl::Window* pParent, const ResId& rResId ) : Button( WINDOW_CHECKBOX ), mbLegacyNoTextAlign( false ) { rResId.SetRT( RSC_CHECKBOX ); @@ -3726,13 +3726,13 @@ Size CheckBox::GetOptimalSize() const return CalcMinimumSize(); } -ImageButton::ImageButton( Window* pParent, WinBits nStyle ) : +ImageButton::ImageButton( vcl::Window* pParent, WinBits nStyle ) : PushButton( pParent, nStyle ) { ImplInitStyle(); } -ImageButton::ImageButton( Window* pParent, const ResId& rResId ) : +ImageButton::ImageButton( vcl::Window* pParent, const ResId& rResId ) : PushButton( pParent, rResId.SetRT( RSC_IMAGEBUTTON ) ) { sal_uLong nObjMask = ReadLongRes(); @@ -3769,7 +3769,7 @@ void ImageButton::ImplInitStyle() SetStyle( nStyle ); } -ImageRadioButton::ImageRadioButton( Window* pParent, WinBits nStyle ) : +ImageRadioButton::ImageRadioButton( vcl::Window* pParent, WinBits nStyle ) : RadioButton( pParent, nStyle ) { } @@ -3778,7 +3778,7 @@ ImageRadioButton::~ImageRadioButton() { } -TriStateBox::TriStateBox( Window* pParent, WinBits nStyle ) : +TriStateBox::TriStateBox( vcl::Window* pParent, WinBits nStyle ) : CheckBox( pParent, nStyle ) { EnableTriState( true ); @@ -3788,7 +3788,7 @@ TriStateBox::~TriStateBox() { } -DisclosureButton::DisclosureButton( Window* pParent, WinBits nStyle ) : +DisclosureButton::DisclosureButton( vcl::Window* pParent, WinBits nStyle ) : CheckBox( pParent, nStyle ) { } diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index be4c071c5ea6..cb39c0a5b7c5 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -44,7 +44,7 @@ static void lcl_GetSelectedEntries( ::std::set< sal_Int32 >& rSelectedPos, const } } -ComboBox::ComboBox( Window* pParent, WinBits nStyle ) : +ComboBox::ComboBox( vcl::Window* pParent, WinBits nStyle ) : Edit( WINDOW_COMBOBOX ) { ImplInitComboBoxData(); @@ -52,7 +52,7 @@ ComboBox::ComboBox( Window* pParent, WinBits nStyle ) : SetWidthInChars(-1); } -ComboBox::ComboBox( Window* pParent, const ResId& rResId ) : +ComboBox::ComboBox( vcl::Window* pParent, const ResId& rResId ) : Edit( WINDOW_COMBOBOX ) { ImplInitComboBoxData(); @@ -118,7 +118,7 @@ void ComboBox::ImplCalcEditHeight() } } -void ComboBox::ImplInit( Window* pParent, WinBits nStyle ) +void ComboBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) { ImplInitStyle( nStyle ); @@ -172,7 +172,7 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle ) EnableAutocomplete( true ); mpSubEdit->Show(); - Window* pLBParent = this; + vcl::Window* pLBParent = this; if ( mpFloatWin ) pLBParent = mpFloatWin; mpImplLB = new ImplListBox( pLBParent, nListStyle|WB_SIMPLEMODE|WB_AUTOHSCROLL ); @@ -981,7 +981,7 @@ long ComboBox::getMaxWidthScrollBarAndDownButton() const { long nButtonDownWidth = 0; - Window *pBorder = GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetWindow( WINDOW_BORDER ); ImplControlValue aControlValue; Point aPoint; Rectangle aContent, aBound; @@ -1041,7 +1041,7 @@ Size ComboBox::CalcAdjustedSize( const Size& rPrefSize ) const { Size aSz = rPrefSize; sal_Int32 nLeft, nTop, nRight, nBottom; - ((Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom ); + ((vcl::Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom ); aSz.Height() -= nTop+nBottom; if ( !IsDropDownBox() ) { @@ -1357,7 +1357,7 @@ void ComboBox::SetNoSelection() Rectangle ComboBox::GetBoundingRectangle( sal_Int32 nItem ) const { Rectangle aRect = mpImplLB->GetMainWindow().GetBoundingRectangle( nItem ); - Rectangle aOffset = mpImplLB->GetMainWindow().GetWindowExtentsRelative( (Window*)this ); + Rectangle aOffset = mpImplLB->GetMainWindow().GetWindowExtentsRelative( (vcl::Window*)this ); aRect.Move( aOffset.TopLeft().X(), aOffset.TopLeft().Y() ); return aRect; } @@ -1414,7 +1414,7 @@ ComboBox::ComboBoxBounds ComboBox::calcComboBoxDropDownComponentBounds(const Siz long nTop = 0; long nBottom = rOutSz.Height(); - Window *pBorder = GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetWindow( WINDOW_BORDER ); ImplControlValue aControlValue; Point aPoint; Rectangle aContent, aBound; diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 83a977d00fb6..4282453df27d 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -45,14 +45,14 @@ Control::Control( WindowType nType ) : ImplInitControlData(); } -Control::Control( Window* pParent, WinBits nStyle ) : +Control::Control( vcl::Window* pParent, WinBits nStyle ) : Window( WINDOW_CONTROL ) { ImplInitControlData(); ImplInit( pParent, nStyle, NULL ); } -Control::Control( Window* pParent, const ResId& rResId ) : +Control::Control( vcl::Window* pParent, const ResId& rResId ) : Window( WINDOW_CONTROL ) { ImplInitControlData(); @@ -258,7 +258,7 @@ bool Control::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { - Window* pFocusWin = Application::GetFocusWindow(); + vcl::Window* pFocusWin = Application::GetFocusWindow(); if ( !pFocusWin || !ImplIsWindowOrChild( pFocusWin ) ) { mbHasControlFocus = false; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 8be4dc8be560..f33cbcbe09ea 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -161,14 +161,14 @@ Edit::Edit( WindowType nType ) : ImplInitEditData(); } -Edit::Edit( Window* pParent, WinBits nStyle ) : +Edit::Edit( vcl::Window* pParent, WinBits nStyle ) : Control( WINDOW_EDIT ) { ImplInitEditData(); ImplInit( pParent, nStyle ); } -Edit::Edit( Window* pParent, const ResId& rResId ) : +Edit::Edit( vcl::Window* pParent, const ResId& rResId ) : Control( WINDOW_EDIT ) { rResId.SetRT( RSC_EDIT ); @@ -308,7 +308,7 @@ bool Edit::ImplUseNativeBorder( WinBits nStyle ) && ((nStyle&WB_BORDER) && !(nStyle&WB_NOBORDER)); if( ! bRet && mbIsSubEdit ) { - Window* pWindow = GetParent(); + vcl::Window* pWindow = GetParent(); nStyle = pWindow->GetStyle(); bRet = pWindow->IsNativeControlSupported(ImplGetNativeControlType(), HAS_BACKGROUND_TEXTURE) && ((nStyle&WB_BORDER) && !(nStyle&WB_NOBORDER)); @@ -316,7 +316,7 @@ bool Edit::ImplUseNativeBorder( WinBits nStyle ) return bRet; } -void Edit::ImplInit( Window* pParent, WinBits nStyle ) +void Edit::ImplInit( vcl::Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); if ( !(nStyle & (WB_CENTER | WB_RIGHT)) ) @@ -786,7 +786,7 @@ uno::Reference < i18n::XExtendedInputSequenceChecker > Edit::ImplGetInputSequenc return mxISC; } -void Edit::ShowTruncationWarning( Window* pParent ) +void Edit::ShowTruncationWarning( vcl::Window* pParent ) { ResMgr* pResMgr = ImplGetResMgr(); if( pResMgr ) @@ -944,7 +944,7 @@ void Edit::ImplSetText( const OUString& rText, const Selection* pNewSelection ) int Edit::ImplGetNativeControlType() const { int nCtrl = 0; - const Window *pControl = mbIsSubEdit ? GetParent() : this; + const vcl::Window *pControl = mbIsSubEdit ? GetParent() : this; switch( pControl->GetType() ) { @@ -1016,11 +1016,11 @@ void Edit::ImplPaintBorder( long nXStart, long nXEnd ) if( ImplUseNativeBorder( GetStyle() ) || IsPaintTransparent() ) { // draw the inner part by painting the whole control using its border window - Window *pBorder = GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetWindow( WINDOW_BORDER ); if( pBorder == this ) { // we have no border, use parent - Window *pControl = mbIsSubEdit ? GetParent() : this; + vcl::Window *pControl = mbIsSubEdit ? GetParent() : this; pBorder = pControl->GetWindow( WINDOW_BORDER ); if( pBorder == this ) pBorder = GetParent(); @@ -1856,10 +1856,10 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_u } } -void Edit::ImplInvalidateOutermostBorder( Window* pWin ) +void Edit::ImplInvalidateOutermostBorder( vcl::Window* pWin ) { // allow control to show focused state - Window *pInvalWin = pWin, *pBorder = pWin; + vcl::Window *pInvalWin = pWin, *pBorder = pWin; while( ( pBorder = pInvalWin->GetWindow( WINDOW_BORDER ) ) != pInvalWin && pBorder && pInvalWin->ImplGetFrame() == pBorder->ImplGetFrame() ) { @@ -1922,7 +1922,7 @@ void Edit::GetFocus() Control::GetFocus(); } -Window* Edit::GetPreferredKeyInputWindow() +vcl::Window* Edit::GetPreferredKeyInputWindow() { if ( mpSubEdit ) return mpSubEdit->GetPreferredKeyInputWindow(); @@ -2768,7 +2768,7 @@ Size Edit::CalcMinimumSize() const Size Edit::GetMinimumEditSize() { - Window* pDefWin = ImplGetDefaultWindow(); + vcl::Window* pDefWin = ImplGetDefaultWindow(); Edit aEdit( pDefWin, WB_BORDER ); Size aSize( aEdit.CalcMinimumSize() ); return aSize; @@ -2792,7 +2792,7 @@ Size Edit::CalcSize(sal_Int32 nChars) const sal_Int32 Edit::GetMaxVisChars() const { - const Window* pW = mpSubEdit ? mpSubEdit : this; + const vcl::Window* pW = mpSubEdit ? mpSubEdit : this; sal_Int32 nOutWidth = pW->GetOutputSizePixel().Width(); sal_Int32 nCharWidth = GetTextWidth( OUString('x') ); return nCharWidth ? nOutWidth/nCharWidth : 0; diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 4b209e2887d5..e57c7f6533e5 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -720,14 +720,14 @@ void NumericFormatter::ImplNewFieldValue( sal_Int64 nNewValue ) } } -NumericField::NumericField( Window* pParent, WinBits nWinStyle ) : +NumericField::NumericField( vcl::Window* pParent, WinBits nWinStyle ) : SpinField( pParent, nWinStyle ) { SetField( this ); Reformat(); } -NumericField::NumericField( Window* pParent, const ResId& rResId ) : +NumericField::NumericField( vcl::Window* pParent, const ResId& rResId ) : SpinField( WINDOW_NUMERICFIELD ) { rResId.SetRT( RSC_NUMERICFIELD ); @@ -883,7 +883,7 @@ Size NumericField::CalcMinimumSize() const return calcMinimumSize(*this, *this); } -NumericBox::NumericBox( Window* pParent, WinBits nWinStyle ) : +NumericBox::NumericBox( vcl::Window* pParent, WinBits nWinStyle ) : ComboBox( pParent, nWinStyle ) { SetField( this ); @@ -1546,14 +1546,14 @@ sal_Int64 MetricFormatter::GetCorrectedValue( FieldUnit eOutUnit ) const meUnit, eOutUnit ); } -MetricField::MetricField( Window* pParent, WinBits nWinStyle ) : +MetricField::MetricField( vcl::Window* pParent, WinBits nWinStyle ) : SpinField( pParent, nWinStyle ) { SetField( this ); Reformat(); } -MetricField::MetricField( Window* pParent, const ResId& rResId ) : +MetricField::MetricField( vcl::Window* pParent, const ResId& rResId ) : SpinField( WINDOW_METRICFIELD ) { rResId.SetRT( RSC_METRICFIELD ); @@ -1727,7 +1727,7 @@ void MetricField::CustomConvert() maCustomConvertLink.Call( this ); } -MetricBox::MetricBox( Window* pParent, WinBits nWinStyle ) : +MetricBox::MetricBox( vcl::Window* pParent, WinBits nWinStyle ) : ComboBox( pParent, nWinStyle ) { SetField( this ); @@ -1975,7 +1975,7 @@ void CurrencyFormatter::Reformat() SetValue( mnLastValue ); } -CurrencyField::CurrencyField( Window* pParent, WinBits nWinStyle ) : +CurrencyField::CurrencyField( vcl::Window* pParent, WinBits nWinStyle ) : SpinField( pParent, nWinStyle ) { SetField( this ); @@ -2057,7 +2057,7 @@ void CurrencyField::Last() SpinField::Last(); } -CurrencyBox::CurrencyBox( Window* pParent, WinBits nWinStyle ) : +CurrencyBox::CurrencyBox( vcl::Window* pParent, WinBits nWinStyle ) : ComboBox( pParent, nWinStyle ) { SetField( this ); diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 9800030d3b99..4dd7e8568336 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -813,7 +813,7 @@ void PatternFormatter::Reformat() } } -PatternField::PatternField( Window* pParent, WinBits nWinStyle ) : +PatternField::PatternField( vcl::Window* pParent, WinBits nWinStyle ) : SpinField( pParent, nWinStyle ) { SetField( this ); @@ -863,7 +863,7 @@ void PatternField::Modify() SpinField::Modify(); } -PatternBox::PatternBox( Window* pParent, WinBits nWinStyle ) : +PatternBox::PatternBox( vcl::Window* pParent, WinBits nWinStyle ) : ComboBox( pParent, nWinStyle ) { SetField( this ); @@ -1762,7 +1762,7 @@ void DateFormatter::ExpandCentury( Date& rDate, sal_uInt16 nTwoDigitYearStart ) } } -DateField::DateField( Window* pParent, WinBits nWinStyle ) : +DateField::DateField( vcl::Window* pParent, WinBits nWinStyle ) : SpinField( pParent, nWinStyle ), maFirst( GetMin() ), maLast( GetMax() ) @@ -1773,7 +1773,7 @@ DateField::DateField( Window* pParent, WinBits nWinStyle ) : ResetLastDate(); } -DateField::DateField( Window* pParent, const ResId& rResId ) : +DateField::DateField( vcl::Window* pParent, const ResId& rResId ) : SpinField( WINDOW_DATEFIELD ), maFirst( GetMin() ), maLast( GetMax() ) @@ -1911,7 +1911,7 @@ void DateField::Last() SpinField::Last(); } -DateBox::DateBox( Window* pParent, WinBits nWinStyle ) : +DateBox::DateBox( vcl::Window* pParent, WinBits nWinStyle ) : ComboBox( pParent, nWinStyle ) { SetField( this ); @@ -2642,7 +2642,7 @@ void TimeFormatter::Reformat() SetTime( maLastTime ); } -TimeField::TimeField( Window* pParent, WinBits nWinStyle ) : +TimeField::TimeField( vcl::Window* pParent, WinBits nWinStyle ) : SpinField( pParent, nWinStyle ), maFirst( GetMin() ), maLast( GetMax() ) @@ -2652,7 +2652,7 @@ TimeField::TimeField( Window* pParent, WinBits nWinStyle ) : Reformat(); } -TimeField::TimeField( Window* pParent, const ResId& rResId ) : +TimeField::TimeField( vcl::Window* pParent, const ResId& rResId ) : SpinField( WINDOW_TIMEFIELD ), maFirst( GetMin() ), maLast( GetMax() ) @@ -2826,7 +2826,7 @@ void TimeField::SetExtFormat( ExtTimeFieldFormat eFormat ) ReformatAll(); } -TimeBox::TimeBox( Window* pParent, WinBits nWinStyle ) : +TimeBox::TimeBox( vcl::Window* pParent, WinBits nWinStyle ) : ComboBox( pParent, nWinStyle ) { SetField( this ); diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 8d6cb0f8c9a6..beaa5b835aa7 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -80,7 +80,7 @@ static Point ImplCalcPos( WinBits nStyle, const Point& rPos, return aPos; } -void FixedText::ImplInit( Window* pParent, WinBits nStyle ) +void FixedText::ImplInit( vcl::Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); Control::ImplInit( pParent, nStyle, NULL ); @@ -111,7 +111,7 @@ void FixedText::ImplInitSettings( bool bFont, if ( bBackground ) { - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { EnableChildTransparentMode( true ); @@ -133,7 +133,7 @@ void FixedText::ImplInitSettings( bool bFont, } } -FixedText::FixedText( Window* pParent, WinBits nStyle ) +FixedText::FixedText( vcl::Window* pParent, WinBits nStyle ) : Control(WINDOW_FIXEDTEXT) , m_nMaxWidthChars(-1) , m_nMinWidthChars(-1) @@ -142,7 +142,7 @@ FixedText::FixedText( Window* pParent, WinBits nStyle ) ImplInit( pParent, nStyle ); } -FixedText::FixedText( Window* pParent, const ResId& rResId ) +FixedText::FixedText( vcl::Window* pParent, const ResId& rResId ) : Control(WINDOW_FIXEDTEXT) , m_nMaxWidthChars(-1) , m_nMinWidthChars(-1) @@ -435,21 +435,21 @@ bool FixedText::set_property(const OString &rKey, const OString &rValue) return true; } -Window* FixedText::getAccessibleRelationLabelFor() const +vcl::Window* FixedText::getAccessibleRelationLabelFor() const { - Window *pWindow = Control::getAccessibleRelationLabelFor(); + vcl::Window *pWindow = Control::getAccessibleRelationLabelFor(); if (pWindow) return pWindow; return get_mnemonic_widget(); } -void FixedText::set_mnemonic_widget(Window *pWindow) +void FixedText::set_mnemonic_widget(vcl::Window *pWindow) { if (pWindow == m_pMnemonicWindow) return; if (m_pMnemonicWindow) { - Window *pTempReEntryGuard = m_pMnemonicWindow; + vcl::Window *pTempReEntryGuard = m_pMnemonicWindow; m_pMnemonicWindow = NULL; pTempReEntryGuard->remove_mnemonic_label(this); } @@ -463,7 +463,7 @@ FixedText::~FixedText() set_mnemonic_widget(NULL); } -SelectableFixedText::SelectableFixedText(Window* pParent, WinBits nStyle) +SelectableFixedText::SelectableFixedText(vcl::Window* pParent, WinBits nStyle) : Edit(pParent, nStyle) { // no border @@ -483,7 +483,7 @@ void SelectableFixedText::LoseFocus() Invalidate(); } -void FixedLine::ImplInit( Window* pParent, WinBits nStyle ) +void FixedLine::ImplInit( vcl::Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); Control::ImplInit( pParent, nStyle, NULL ); @@ -514,7 +514,7 @@ void FixedLine::ImplInitSettings( bool bFont, if ( bBackground ) { - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { EnableChildTransparentMode( true ); @@ -609,14 +609,14 @@ void FixedLine::ImplDraw( bool bLayout ) } } -FixedLine::FixedLine( Window* pParent, WinBits nStyle ) : +FixedLine::FixedLine( vcl::Window* pParent, WinBits nStyle ) : Control( WINDOW_FIXEDLINE ) { ImplInit( pParent, nStyle ); SetSizePixel( Size( 2, 2 ) ); } -FixedLine::FixedLine( Window* pParent, const ResId& rResId ) : +FixedLine::FixedLine( vcl::Window* pParent, const ResId& rResId ) : Control( WINDOW_FIXEDLINE ) { rResId.SetRT( RSC_FIXEDLINE ); @@ -705,7 +705,7 @@ Size FixedLine::GetOptimalSize() const return CalcWindowSize( FixedText::CalcMinimumTextSize ( this, 0x7fffffff ) ); } -void FixedBitmap::ImplInit( Window* pParent, WinBits nStyle ) +void FixedBitmap::ImplInit( vcl::Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); Control::ImplInit( pParent, nStyle, NULL ); @@ -721,7 +721,7 @@ WinBits FixedBitmap::ImplInitStyle( WinBits nStyle ) void FixedBitmap::ImplInitSettings() { - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { EnableChildTransparentMode( true ); @@ -742,7 +742,7 @@ void FixedBitmap::ImplInitSettings() } } -FixedBitmap::FixedBitmap( Window* pParent, WinBits nStyle ) : +FixedBitmap::FixedBitmap( vcl::Window* pParent, WinBits nStyle ) : Control( WINDOW_FIXEDBITMAP ) { ImplInit( pParent, nStyle ); @@ -846,7 +846,7 @@ void FixedBitmap::SetBitmap( const Bitmap& rBitmap ) queue_resize(); } -void FixedImage::ImplInit( Window* pParent, WinBits nStyle ) +void FixedImage::ImplInit( vcl::Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); mbInUserDraw = false; @@ -863,7 +863,7 @@ WinBits FixedImage::ImplInitStyle( WinBits nStyle ) void FixedImage::ImplInitSettings() { - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( pParent && pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { EnableChildTransparentMode( true ); @@ -897,13 +897,13 @@ void FixedImage::ImplLoadRes( const ResId& rResId ) } } -FixedImage::FixedImage( Window* pParent, WinBits nStyle ) : +FixedImage::FixedImage( vcl::Window* pParent, WinBits nStyle ) : Control( WINDOW_FIXEDIMAGE ) { ImplInit( pParent, nStyle ); } -FixedImage::FixedImage( Window* pParent, const ResId& rResId ) : +FixedImage::FixedImage( vcl::Window* pParent, const ResId& rResId ) : Control( WINDOW_FIXEDIMAGE ) { rResId.SetRT( RSC_FIXEDIMAGE ); diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx index f30a8ba9303f..6926a0c843c6 100644 --- a/vcl/source/control/fixedhyper.cxx +++ b/vcl/source/control/fixedhyper.cxx @@ -19,7 +19,7 @@ #include <vcl/fixedhyper.hxx> -FixedHyperlink::FixedHyperlink(Window* pParent, WinBits nWinStyle) +FixedHyperlink::FixedHyperlink(vcl::Window* pParent, WinBits nWinStyle) : FixedText(pParent, nWinStyle) , m_nTextLen(0) { diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index 47f97a55a28b..795bb3b43797 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -30,7 +30,7 @@ #define GROUP_VIEW_STYLE (WB_3DLOOK | WB_NOLABEL) -void GroupBox::ImplInit( Window* pParent, WinBits nStyle ) +void GroupBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); Control::ImplInit( pParent, nStyle, NULL ); @@ -62,7 +62,7 @@ void GroupBox::ImplInitSettings( bool bFont, if ( bBackground ) { - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( (pParent->IsChildTransparentModeEnabled() || !(pParent->GetStyle() & WB_CLIPCHILDREN) ) && !IsControlBackground() ) @@ -86,7 +86,7 @@ void GroupBox::ImplInitSettings( bool bFont, } } -GroupBox::GroupBox( Window* pParent, WinBits nStyle ) : +GroupBox::GroupBox( vcl::Window* pParent, WinBits nStyle ) : Control( WINDOW_GROUPBOX ) { ImplInit( pParent, nStyle ); diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 187b6469e046..8bcdf11202eb 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -46,7 +46,7 @@ using namespace ::com::sun::star; -void ImplInitFieldSettings( Window* pWin, bool bFont, bool bForeground, bool bBackground ) +void ImplInitFieldSettings( vcl::Window* pWin, bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings(); @@ -87,7 +87,7 @@ void ImplInitDropDownButton( PushButton* pButton ) pButton->SetBackground(); } -ImplEntryList::ImplEntryList( Window* pWindow ) +ImplEntryList::ImplEntryList( vcl::Window* pWindow ) { mpWindow = pWindow; mnLastSelected = LISTBOX_ENTRY_NOTFOUND; @@ -488,7 +488,7 @@ sal_Int32 ImplEntryList::FindFirstSelectable( sal_Int32 nPos, bool bForward /* = return LISTBOX_ENTRY_NOTFOUND; } -ImplListBoxWindow::ImplListBoxWindow( Window* pParent, WinBits nWinStyle ) : +ImplListBoxWindow::ImplListBoxWindow( vcl::Window* pParent, WinBits nWinStyle ) : Control( pParent, 0 ), maQuickSelectionEngine( *this ) { @@ -2128,7 +2128,7 @@ sal_uInt16 ImplListBoxWindow::ImplGetTextStyle() const return nTextStyle; } -ImplListBox::ImplListBox( Window* pParent, WinBits nWinStyle ) : +ImplListBox::ImplListBox( vcl::Window* pParent, WinBits nWinStyle ) : Control( pParent, nWinStyle ), maLBWindow( this, nWinStyle&(~WB_BORDER) ) { @@ -2228,7 +2228,7 @@ void ImplListBox::GetFocus() maLBWindow.GrabFocus(); } -Window* ImplListBox::GetPreferredKeyInputWindow() +vcl::Window* ImplListBox::GetPreferredKeyInputWindow() { return &maLBWindow; } @@ -2583,7 +2583,7 @@ void ImplListBox::SetEdgeBlending(bool bNew) } } -ImplWin::ImplWin( Window* pParent, WinBits nWinStyle ) : +ImplWin::ImplWin( vcl::Window* pParent, WinBits nWinStyle ) : Control ( pParent, nWinStyle ) { if ( IsNativeControlSupported(CTRL_LISTBOX, PART_ENTIRE_CONTROL) @@ -2654,7 +2654,7 @@ void ImplWin::ImplDraw( bool bLayout ) // Repaint the (focused) area similarly to // ImplSmallBorderWindowView::DrawWindow() in // vcl/source/window/brdwin.cxx - Window *pWin = GetParent(); + vcl::Window *pWin = GetParent(); ImplControlValue aControlValue; if ( !pWin->IsEnabled() ) @@ -2673,7 +2673,7 @@ void ImplWin::ImplDraw( bool bLayout ) bool bMouseOver = false; if( GetParent() ) { - Window *pChild = GetParent()->GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window *pChild = GetParent()->GetWindow( WINDOW_FIRSTCHILD ); while( pChild && !(bMouseOver = pChild->IsMouseOver()) ) pChild = pChild->GetWindow( WINDOW_NEXT ); } @@ -2840,7 +2840,7 @@ void ImplWin::GetFocus() IsNativeWidgetEnabled() && IsNativeControlSupported( CTRL_LISTBOX, PART_ENTIRE_CONTROL ) ) { - Window* pWin = GetParent()->GetWindow( WINDOW_BORDER ); + vcl::Window* pWin = GetParent()->GetWindow( WINDOW_BORDER ); if( ! pWin ) pWin = GetParent(); pWin->Invalidate(); @@ -2857,7 +2857,7 @@ void ImplWin::LoseFocus() IsNativeWidgetEnabled() && IsNativeControlSupported( CTRL_LISTBOX, PART_ENTIRE_CONTROL ) ) { - Window* pWin = GetParent()->GetWindow( WINDOW_BORDER ); + vcl::Window* pWin = GetParent()->GetWindow( WINDOW_BORDER ); if( ! pWin ) pWin = GetParent(); pWin->Invalidate(); @@ -2867,7 +2867,7 @@ void ImplWin::LoseFocus() Control::LoseFocus(); } -ImplBtn::ImplBtn( Window* pParent, WinBits nWinStyle ) : +ImplBtn::ImplBtn( vcl::Window* pParent, WinBits nWinStyle ) : PushButton( pParent, nWinStyle ), mbDown ( false ) { @@ -2889,7 +2889,7 @@ void ImplBtn::MouseButtonDown( const MouseEvent& ) } } -ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( Window* pParent ) : +ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( vcl::Window* pParent ) : FloatingWindow( pParent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ) // no drop shadow for list boxes { mpImplLB = NULL; @@ -2900,7 +2900,7 @@ ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( Window* pParent ) : EnableSaveBackground(); - Window * pBorderWindow = ImplGetBorderWindow(); + vcl::Window * pBorderWindow = ImplGetBorderWindow(); if( pBorderWindow ) { SetAccessibleRole(accessibility::AccessibleRole::PANEL); @@ -2953,8 +2953,8 @@ void ImplListBoxFloatingWindow::setPosSizePixel( long nX, long nY, long nWidth, // The number also cannot be calculated by List/Combobox, as for // this the presence of the vertical Scrollbar has to be known. mpImplLB->SetSizePixel( GetOutputSizePixel() ); - ((Window*)mpImplLB)->Resize(); - ((Window&)mpImplLB->GetMainWindow()).Resize(); + ((vcl::Window*)mpImplLB)->Resize(); + ((vcl::Window&)mpImplLB->GetMainWindow()).Resize(); } } @@ -3067,7 +3067,7 @@ void ImplListBoxFloatingWindow::StartFloat( bool bStartTracking ) // check if the control's parent is un-mirrored which is the case for form controls in a mirrored UI // where the document is unmirrored // because StartPopupMode() expects a rectangle in mirrored coordinates we have to re-mirror - Window *pGrandparent = GetParent()->GetParent(); + vcl::Window *pGrandparent = GetParent()->GetParent(); const OutputDevice *pGrandparentOutDev = pGrandparent->GetOutDev(); if( pGrandparent->ImplIsAntiparallel() ) diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx index 54b97f43cd97..6a8082fb5de2 100644 --- a/vcl/source/control/imgctrl.cxx +++ b/vcl/source/control/imgctrl.cxx @@ -25,7 +25,7 @@ namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode; -ImageControl::ImageControl( Window* pParent, WinBits nStyle ) +ImageControl::ImageControl( vcl::Window* pParent, WinBits nStyle ) :FixedImage( pParent, nStyle ) ,mnScaleMode( ImageScaleMode::ANISOTROPIC ) { @@ -137,7 +137,7 @@ void ImageControl::Paint( const Rectangle& /*rRect*/ ) if( HasFocus() ) { - Window *pWin = GetWindow( WINDOW_BORDER ); + vcl::Window *pWin = GetWindow( WINDOW_BORDER ); bool bFlat = (GetBorderStyle() == 2); Rectangle aRect( Point(0,0), pWin->GetOutputSizePixel() ); diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index 36afacd82698..3b6bd4570a79 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -455,7 +455,7 @@ void ImplNewLongCurrencyFieldValue( LongCurrencyField* pField, BigInt nNewValue pField->Modify(); } -LongCurrencyField::LongCurrencyField( Window* pParent, WinBits nWinStyle ) : +LongCurrencyField::LongCurrencyField( vcl::Window* pParent, WinBits nWinStyle ) : SpinField( pParent, nWinStyle ) { SetField( this ); @@ -537,7 +537,7 @@ void LongCurrencyField::Last() SpinField::Last(); } -LongCurrencyBox::LongCurrencyBox( Window* pParent, WinBits nWinStyle ) : +LongCurrencyBox::LongCurrencyBox( vcl::Window* pParent, WinBits nWinStyle ) : ComboBox( pParent, nWinStyle ) { SetField( this ); diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index ec4d4bc65abe..504f11252479 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -49,13 +49,13 @@ ListBox::ListBox(WindowType nType) ImplInitListBoxData(); } -ListBox::ListBox( Window* pParent, WinBits nStyle ) : Control( WINDOW_LISTBOX ) +ListBox::ListBox( vcl::Window* pParent, WinBits nStyle ) : Control( WINDOW_LISTBOX ) { ImplInitListBoxData(); ImplInit( pParent, nStyle ); } -ListBox::ListBox( Window* pParent, const ResId& rResId ) : +ListBox::ListBox( vcl::Window* pParent, const ResId& rResId ) : Control( WINDOW_LISTBOX ) { rResId.SetRT( RSC_LISTBOX ); @@ -96,7 +96,7 @@ void ListBox::ImplInitListBoxData() mbEdgeBlending = false; } -void ListBox::ImplInit( Window* pParent, WinBits nStyle ) +void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); if ( !(nStyle & WB_NOBORDER) && ( nStyle & WB_DROPDOWN ) ) @@ -149,7 +149,7 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle ) mpBtn->GetDropTarget()->addDropTargetListener(xDrop); } - Window* pLBParent = this; + vcl::Window* pLBParent = this; if ( mpFloatWin ) pLBParent = mpFloatWin; mpImplLB = new ImplListBox( pLBParent, nStyle&(~WB_BORDER) ); @@ -503,7 +503,7 @@ void ListBox::GetFocus() Control::GetFocus(); } -Window* ListBox::GetPreferredKeyInputWindow() +vcl::Window* ListBox::GetPreferredKeyInputWindow() { if ( mpImplLB ) { @@ -625,7 +625,7 @@ void ListBox::Resize() long nBottom = aOutSz.Height(); // Note: in case of no border, pBorder will actually be this - Window *pBorder = GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetWindow( WINDOW_BORDER ); ImplControlValue aControlValue; Point aPoint; Rectangle aContent, aBound; @@ -1158,7 +1158,7 @@ bool ListBox::IsInDropDown() const Rectangle ListBox::GetBoundingRectangle( sal_Int32 nItem ) const { Rectangle aRect = mpImplLB->GetMainWindow().GetBoundingRectangle( nItem ); - Rectangle aOffset = mpImplLB->GetMainWindow().GetWindowExtentsRelative( (Window*)this ); + Rectangle aOffset = mpImplLB->GetMainWindow().GetWindowExtentsRelative( (vcl::Window*)this ); aRect.Move( aOffset.TopLeft().X(), aOffset.TopLeft().Y() ); return aRect; } @@ -1283,7 +1283,7 @@ Size ListBox::CalcAdjustedSize( const Size& rPrefSize ) const { Size aSz = rPrefSize; sal_Int32 nLeft, nTop, nRight, nBottom; - ((Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom ); + ((vcl::Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom ); aSz.Height() -= nTop+nBottom; if ( !IsDropDownBox() ) { @@ -1486,7 +1486,7 @@ void ListBox::SetEdgeBlending(bool bNew) } } -MultiListBox::MultiListBox( Window* pParent, WinBits nStyle ) : +MultiListBox::MultiListBox( vcl::Window* pParent, WinBits nStyle ) : ListBox( WINDOW_MULTILISTBOX ) { ImplInit( pParent, nStyle ); diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx index d543c291ac95..288b7abeb018 100644 --- a/vcl/source/control/menubtn.cxx +++ b/vcl/source/control/menubtn.cxx @@ -37,7 +37,7 @@ void MenuButton::ImplInitMenuButtonData() mnMenuMode = 0; } -void MenuButton::ImplInit( Window* pParent, WinBits nStyle ) +void MenuButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) { if ( !(nStyle & WB_NOTABSTOP) ) nStyle |= WB_TABSTOP; @@ -73,7 +73,7 @@ OString MenuButton::GetCurItemIdent() const mpMenu->GetItemIdent(mnCurItemId) : OString(); } -MenuButton::MenuButton( Window* pParent, WinBits nWinBits ) +MenuButton::MenuButton( vcl::Window* pParent, WinBits nWinBits ) : PushButton( WINDOW_MENUBUTTON ) { ImplInitMenuButtonData(); diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx index 0146cefce4ff..f84e0a891287 100644 --- a/vcl/source/control/morebtn.cxx +++ b/vcl/source/control/morebtn.cxx @@ -22,7 +22,7 @@ #include <tools/rc.h> #include <vector> -typedef ::std::vector< Window* > ImplMoreWindowList; +typedef ::std::vector< vcl::Window* > ImplMoreWindowList; struct ImplMoreButtonData { @@ -31,7 +31,7 @@ struct ImplMoreButtonData OUString maLessText; }; -void MoreButton::ImplInit( Window* pParent, WinBits nStyle ) +void MoreButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) { mpMBData = new ImplMoreButtonData; mnDelta = 0; @@ -72,7 +72,7 @@ void MoreButton::ShowState() } } -MoreButton::MoreButton( Window* pParent, WinBits nStyle ) : +MoreButton::MoreButton( vcl::Window* pParent, WinBits nStyle ) : PushButton( WINDOW_MOREBUTTON ) { ImplInit( pParent, nStyle ); @@ -86,7 +86,7 @@ MoreButton::~MoreButton() void MoreButton::Click() { - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); Size aSize( pParent->GetSizePixel() ); long nDeltaPixel = LogicToPixel( Size( 0, mnDelta ), meUnit ).Height(); diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx index 4634300a68b5..d1b7bf9d6d69 100644 --- a/vcl/source/control/prgsbar.cxx +++ b/vcl/source/control/prgsbar.cxx @@ -33,7 +33,7 @@ void ProgressBar::ImplInit() ImplInitSettings( true, true, true ); } -static WinBits clearProgressBarBorder( Window* pParent, WinBits nOrgStyle ) +static WinBits clearProgressBarBorder( vcl::Window* pParent, WinBits nOrgStyle ) { WinBits nOutStyle = nOrgStyle; if( pParent && (nOrgStyle & WB_BORDER) != 0 ) @@ -49,7 +49,7 @@ Size ProgressBar::GetOptimalSize() const return Size(150, 20); } -ProgressBar::ProgressBar( Window* pParent, WinBits nWinStyle ) : +ProgressBar::ProgressBar( vcl::Window* pParent, WinBits nWinStyle ) : Window( pParent, clearProgressBarBorder( pParent, nWinStyle ) ) { SetOutputSizePixel( GetOptimalSize() ); diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 4351d6ff9e21..8d144ce9a516 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -74,7 +74,7 @@ struct ImplScrollBarData Rectangle maTrackRect; // TODO: move to ScrollBar class when binary incompatibility of ScrollBar class is no longer problematic }; -void ScrollBar::ImplInit( Window* pParent, WinBits nStyle ) +void ScrollBar::ImplInit( vcl::Window* pParent, WinBits nStyle ) { mpData = NULL; mnThumbPixRange = 0; @@ -117,7 +117,7 @@ void ScrollBar::ImplInitStyle( WinBits nStyle ) mbFullDrag = (GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_SCROLL) != 0; } -ScrollBar::ScrollBar( Window* pParent, WinBits nStyle ) : +ScrollBar::ScrollBar( vcl::Window* pParent, WinBits nStyle ) : Control( WINDOW_SCROLLBAR ) { ImplInit( pParent, nStyle ); @@ -622,9 +622,9 @@ void ScrollBar::ImplDraw( sal_uInt16 nDrawFlags, OutputDevice* pOutDev ) if ( mbCalcSize ) ImplCalc( false ); - Window *pWin = NULL; + vcl::Window *pWin = NULL; if( pOutDev->GetOutDevType() == OUTDEV_WINDOW ) - pWin = (Window*) pOutDev; + pWin = (vcl::Window*) pOutDev; // Draw the entire control if the native theme engine needs it if ( nDrawFlags && pWin && pWin->IsNativeControlSupported(CTRL_SCROLLBAR, PART_DRAW_BACKGROUND_HORZ) ) @@ -1428,7 +1428,7 @@ Size ScrollBar::getCurrentCalcSize() const return aCtrlRegion.GetSize(); } -void ScrollBarBox::ImplInit( Window* pParent, WinBits nStyle ) +void ScrollBarBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) { Window::ImplInit( pParent, nStyle, NULL ); @@ -1438,7 +1438,7 @@ void ScrollBarBox::ImplInit( Window* pParent, WinBits nStyle ) ImplInitSettings(); } -ScrollBarBox::ScrollBarBox( Window* pParent, WinBits nStyle ) : +ScrollBarBox::ScrollBarBox( vcl::Window* pParent, WinBits nStyle ) : Window( WINDOW_SCROLLBARBOX ) { ImplInit( pParent, nStyle ); diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index f398d02a38e3..00cf7108c981 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -45,7 +45,7 @@ #define SLIDER_VIEW_STYLE (WB_3DLOOK | WB_HORZ | WB_VERT) -void Slider::ImplInit( Window* pParent, WinBits nStyle ) +void Slider::ImplInit( vcl::Window* pParent, WinBits nStyle ) { mnThumbPixOffset = 0; mnThumbPixRange = 0; @@ -73,7 +73,7 @@ void Slider::ImplInit( Window* pParent, WinBits nStyle ) SetSizePixel( CalcWindowSizePixel() ); } -Slider::Slider( Window* pParent, WinBits nStyle ) : +Slider::Slider( vcl::Window* pParent, WinBits nStyle ) : Control( WINDOW_SLIDER ) { ImplInit( pParent, nStyle ); @@ -81,7 +81,7 @@ Slider::Slider( Window* pParent, WinBits nStyle ) : void Slider::ImplInitSettings() { - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { EnableChildTransparentMode( true ); diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx index d920737c3c01..f760aaf669e5 100644 --- a/vcl/source/control/spinbtn.cxx +++ b/vcl/source/control/spinbtn.cxx @@ -23,7 +23,7 @@ #include <vcl/spin.hxx> #include <vcl/settings.hxx> -void SpinButton::ImplInit( Window* pParent, WinBits nStyle ) +void SpinButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) { mbUpperIn = false; mbLowerIn = false; @@ -48,7 +48,7 @@ void SpinButton::ImplInit( Window* pParent, WinBits nStyle ) Control::ImplInit( pParent, nStyle, NULL ); } -SpinButton::SpinButton( Window* pParent, WinBits nStyle ) +SpinButton::SpinButton( vcl::Window* pParent, WinBits nStyle ) :Control( WINDOW_SPINBUTTON ) ,mbUpperIsFocused( false ) { diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 325e770e1060..c027cbbccbf5 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -30,7 +30,7 @@ namespace { -void ImplGetSpinbuttonValue( Window *pWin, const Rectangle& rUpperRect, +void ImplGetSpinbuttonValue( vcl::Window *pWin, const Rectangle& rUpperRect, const Rectangle& rLowerRect, bool bUpperIn, bool bLowerIn, bool bUpperEnabled, bool bLowerEnabled, bool bHorz, @@ -71,7 +71,7 @@ void ImplGetSpinbuttonValue( Window *pWin, const Rectangle& rUpperRect, rValue.mnLowerPart = bHorz ? PART_BUTTON_RIGHT : PART_BUTTON_DOWN; } -bool ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonValue ) +bool ImplDrawNativeSpinfield( vcl::Window *pWin, const SpinbuttonValue& rSpinbuttonValue ) { bool bNativeOK = false; @@ -89,7 +89,7 @@ bool ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonVa else { // paint the spinbox as a whole, use borderwindow to have proper clipping - Window *pBorder = pWin->GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = pWin->GetWindow( WINDOW_BORDER ); // to not overwrite everything, set the button region as clipregion to the border window Rectangle aClipRect( rSpinbuttonValue.maLowerRect ); @@ -122,7 +122,7 @@ bool ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonVa return bNativeOK; } -bool ImplDrawNativeSpinbuttons( Window *pWin, const SpinbuttonValue& rSpinbuttonValue ) +bool ImplDrawNativeSpinbuttons( vcl::Window *pWin, const SpinbuttonValue& rSpinbuttonValue ) { bool bNativeOK = false; @@ -189,7 +189,7 @@ void ImplDrawSpinButton( OutputDevice* pOutDev, if( pOutDev->GetOutDevType() == OUTDEV_WINDOW ) { - Window *pWin = (Window*) pOutDev; + vcl::Window *pWin = (vcl::Window*) pOutDev; // are we drawing standalone spin buttons or members of a spinfield ? ControlType aControl = CTRL_SPINBUTTONS; @@ -297,7 +297,7 @@ void SpinField::ImplInitSpinFieldData() mbInDropDown = false; } -void SpinField::ImplInit( Window* pParent, WinBits nWinStyle ) +void SpinField::ImplInit( vcl::Window* pParent, WinBits nWinStyle ) { Edit::ImplInit( pParent, nWinStyle ); @@ -337,14 +337,14 @@ SpinField::SpinField( WindowType nTyp ) : ImplInitSpinFieldData(); } -SpinField::SpinField( Window* pParent, WinBits nWinStyle ) : +SpinField::SpinField( vcl::Window* pParent, WinBits nWinStyle ) : Edit( WINDOW_SPINFIELD ) { ImplInitSpinFieldData(); ImplInit( pParent, nWinStyle ); } -SpinField::SpinField( Window* pParent, const ResId& rResId ) : +SpinField::SpinField( vcl::Window* pParent, const ResId& rResId ) : Edit( WINDOW_SPINFIELD ) { ImplInitSpinFieldData(); @@ -663,8 +663,8 @@ void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rec ! (GetStyle() & WB_DROPDOWN) && IsNativeControlSupported(CTRL_SPINBOX, PART_ENTIRE_CONTROL) ) { - Window *pWin = (Window*) pDev; - Window *pBorder = pWin->GetWindow( WINDOW_BORDER ); + vcl::Window *pWin = (vcl::Window*) pDev; + vcl::Window *pBorder = pWin->GetWindow( WINDOW_BORDER ); // get the system's spin button size ImplControlValue aControlValue; @@ -726,7 +726,7 @@ void SpinField::Resize() Rectangle aContent, aBound; // use the full extent of the control - Window *pBorder = GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetWindow( WINDOW_BORDER ); Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); // adjust position and size of the edit field diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 0187b4e51b68..67cdbbe82934 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -82,7 +82,7 @@ struct ImplTabCtrlData // for the Tab positions #define TAB_PAGERECT 0xFFFF -void TabControl::ImplInit( Window* pParent, WinBits nStyle ) +void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle ) { mbLayoutDirty = true; @@ -144,7 +144,7 @@ void TabControl::ImplInitSettings( bool bFont, if ( bBackground ) { - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( !IsControlBackground() && (pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported(CTRL_TAB_PANE, PART_ENTIRE_CONTROL) @@ -183,7 +183,7 @@ void TabControl::ImplFreeLayoutData() } } -TabControl::TabControl( Window* pParent, WinBits nStyle ) : +TabControl::TabControl( vcl::Window* pParent, WinBits nStyle ) : Control( WINDOW_TABCONTROL ) { ImplInit( pParent, nStyle ); @@ -575,7 +575,7 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) ImplTabItem* pItem = ImplGetItem( nId ); TabPage* pOldPage = (pOldItem) ? pOldItem->mpTabPage : NULL; TabPage* pPage = (pItem) ? pItem->mpTabPage : NULL; - Window* pCtrlParent = GetParent(); + vcl::Window* pCtrlParent = GetParent(); if ( IsReallyVisible() && IsUpdateMode() ) { @@ -646,7 +646,7 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) if ( pOldPage && pOldPage->HasChildPathFocus() ) { sal_uInt16 n = 0; - Window* pFirstChild = pPage->ImplGetDlgWindow( n, DLGWINDOW_FIRST ); + vcl::Window* pFirstChild = pPage->ImplGetDlgWindow( n, DLGWINDOW_FIRST ); if ( pFirstChild ) pFirstChild->ImplControlFocus( GETFOCUS_INIT ); else diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx index c8b585bcb0d1..347f24a32e31 100644 --- a/vcl/source/control/throbber.cxx +++ b/vcl/source/control/throbber.cxx @@ -42,7 +42,7 @@ using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::Exception; namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode; -Throbber::Throbber( Window* i_parentWindow, WinBits i_style, const ImageSet i_imageSet ) +Throbber::Throbber( vcl::Window* i_parentWindow, WinBits i_style, const ImageSet i_imageSet ) :ImageControl( i_parentWindow, i_style ) ,mbRepeat( true ) ,mnStepTime( 100 ) diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index b70cd2be405f..0cc3f90f6066 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -1944,7 +1944,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan if ( !IsFormatted() ) FormatDoc(); - Window* pOutWin = dynamic_cast<Window*>(pOutDev); + vcl::Window* pOutWin = dynamic_cast<vcl::Window*>(pOutDev); bool bTransparent = (pOutWin && pOutWin->IsPaintTransparent()); long nY = rStartPos.Y(); diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index d63620d40016..c2b7fadb2771 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -146,7 +146,7 @@ struct ImpTextView { TextEngine* mpTextEngine; - Window* mpWindow; + vcl::Window* mpWindow; TextSelection maSelection; Point maStartDocPos; // TextPaM maMBDownPaM; @@ -176,7 +176,7 @@ struct ImpTextView bool mbCursorAtEndOfLine; }; -TextView::TextView( TextEngine* pEng, Window* pWindow ) : +TextView::TextView( TextEngine* pEng, vcl::Window* pWindow ) : mpImpl(new ImpTextView) { pWindow->EnableRTL( false ); @@ -2309,7 +2309,7 @@ void TextSelFunctionSet::DestroyAnchor() } TextEngine* TextView::GetTextEngine() const { return mpImpl->mpTextEngine; } -Window* TextView::GetWindow() const +vcl::Window* TextView::GetWindow() const { return mpImpl->mpWindow; } void TextView::EnableCursor( bool bEnable ) { mpImpl->mbCursorEnabled = bEnable; } diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 68c375a6a200..ff7cd6c8ae25 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -33,7 +33,7 @@ #include <vcl/settings.hxx> #include <boost/scoped_ptr.hpp> -class TextWindow : public Window +class TextWindow : public vcl::Window { private: ExtTextEngine* mpExtTextEngine; @@ -47,7 +47,7 @@ private: bool mbTextSelectable; public: - TextWindow( Window* pParent ); + TextWindow( vcl::Window* pParent ); virtual ~TextWindow(); ExtTextEngine* GetTextEngine() const { return mpExtTextEngine; } @@ -703,7 +703,7 @@ bool ImpVclMEdit::HandleCommand( const CommandEvent& rCEvt ) return bDone; } -TextWindow::TextWindow( Window* pParent ) : Window( pParent ) +TextWindow::TextWindow( vcl::Window* pParent ) : Window( pParent ) { mbInMBDown = false; mbFocusSelectionHide = false; @@ -926,7 +926,7 @@ void TextWindow::LoseFocus() mpExtTextView->SetPaintSelection( false ); } -VclMultiLineEdit::VclMultiLineEdit( Window* pParent, WinBits nWinStyle ) +VclMultiLineEdit::VclMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle ) : Edit( pParent, nWinStyle ) { SetType( WINDOW_MULTILINEEDIT ); @@ -1189,7 +1189,7 @@ Size VclMultiLineEdit::CalcMinimumSize() const Size aSz = pImpVclMEdit->CalcMinimumSize(); sal_Int32 nLeft, nTop, nRight, nBottom; - ((Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom ); + ((vcl::Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom ); aSz.Width() += nLeft+nRight; aSz.Height() += nTop+nBottom; @@ -1200,7 +1200,7 @@ Size VclMultiLineEdit::CalcAdjustedSize( const Size& rPrefSize ) const { Size aSz = rPrefSize; sal_Int32 nLeft, nTop, nRight, nBottom; - ((Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom ); + ((vcl::Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom ); // center vertically for whole lines @@ -1221,7 +1221,7 @@ Size VclMultiLineEdit::CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) c Size aSz = pImpVclMEdit->CalcBlockSize( nColumns, nLines ); sal_Int32 nLeft, nTop, nRight, nBottom; - ((Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom ); + ((vcl::Window*)this)->GetBorder( nLeft, nTop, nRight, nBottom ); aSz.Width() += nLeft+nRight; aSz.Height() += nTop+nBottom; return aSz; diff --git a/vcl/source/edit/xtextedt.cxx b/vcl/source/edit/xtextedt.cxx index 6eff3dd2f22d..4fd5f27e498d 100644 --- a/vcl/source/edit/xtextedt.cxx +++ b/vcl/source/edit/xtextedt.cxx @@ -222,7 +222,7 @@ bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSea // class ExtTextView -ExtTextView::ExtTextView( ExtTextEngine* pEng, Window* pWindow ) +ExtTextView::ExtTextView( ExtTextEngine* pEng, vcl::Window* pWindow ) : TextView( pEng, pWindow ) { } diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 3b0d9d007fcb..c8b842d93b6a 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -374,7 +374,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) // flush output from time to time if( i++ > nSyncCount ) - ( (Window*) pOut )->Flush(), i = 0; + ( (vcl::Window*) pOut )->Flush(), i = 0; } pAction = NextAction(); @@ -391,7 +391,7 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, S Size rDestSize( pOut->LogicToPixel( rLogicDestSize ) ); - const Window* win = dynamic_cast <Window*> ( pOut ); + const vcl::Window* win = dynamic_cast <vcl::Window*> ( pOut ); if (!win) win = Application::GetActiveTopWindow(); diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx index bf870819c408..096e67fa48ae 100644 --- a/vcl/source/gdi/impanmvw.cxx +++ b/vcl/source/gdi/impanmvw.cxx @@ -78,7 +78,7 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut, MapMode aTempMap( mpOut->GetMapMode() ); aTempMap.SetOrigin( Point() ); mpBackground->SetMapMode( aTempMap ); - ( (Window*) mpOut )->SaveBackground( maDispPt, maDispSz, Point(), *mpBackground ); + ( (vcl::Window*) mpOut )->SaveBackground( maDispPt, maDispSz, Point(), *mpBackground ); mpBackground->SetMapMode( MapMode() ); } else @@ -282,7 +282,7 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ) delete pDev; if( mpOut->GetOutDevType() == OUTDEV_WINDOW ) - ( (Window*) mpOut )->Sync(); + ( (vcl::Window*) mpOut )->Sync(); } } } @@ -296,7 +296,7 @@ void ImplAnimView::ImplRepaint() MapMode aTempMap( mpOut->GetMapMode() ); aTempMap.SetOrigin( Point() ); mpBackground->SetMapMode( aTempMap ); - ( (Window*) mpOut )->SaveBackground( maDispPt, maDispSz, Point(), *mpBackground ); + ( (vcl::Window*) mpOut )->SaveBackground( maDispPt, maDispSz, Point(), *mpBackground ); mpBackground->SetMapMode( MapMode() ); } else diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 6c8bdc449264..a901a312564b 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -783,7 +783,7 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo ) mpGraphics->GetDevFontList( mpFontCollection ); } -void Printer::ImplInitDisplay( const Window* pWindow ) +void Printer::ImplInitDisplay( const vcl::Window* pWindow ) { ImplSVData* pSVData = ImplGetSVData(); @@ -1121,7 +1121,7 @@ bool Printer::SetJobSetup( const JobSetup& rSetup ) return false; } -bool Printer::Setup( Window* pWindow ) +bool Printer::Setup( vcl::Window* pWindow ) { if ( IsDisplayPrinter() ) return false; diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index ad7a8ba68048..b87425f2934c 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -789,7 +789,7 @@ void PrinterController::resetPrinterOptions( bool i_bFileOutput ) mpImplData->mpPrinter->SetPrinterOptions( aOpt ); } -bool PrinterController::setupPrinter( Window* i_pParent ) +bool PrinterController::setupPrinter( vcl::Window* i_pParent ) { bool bRet = false; if( mpImplData->mpPrinter.get() ) diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx index abf06ff0d4a9..7ce8d1a56c11 100644 --- a/vcl/source/helper/lazydelete.cxx +++ b/vcl/source/helper/lazydelete.cxx @@ -33,7 +33,7 @@ LazyDeletorBase::~LazyDeletorBase() } // instantiate instance pointers for LazyDeletor<Window,Menu> -template<> LazyDeletor<Window>* LazyDeletor<Window>::s_pOneInstance = NULL; +template<> LazyDeletor<vcl::Window>* LazyDeletor<vcl::Window>::s_pOneInstance = NULL; template<> LazyDeletor<Menu>* LazyDeletor<Menu>::s_pOneInstance = NULL; // a list for all LazyeDeletor<T> singletons @@ -55,7 +55,7 @@ void LazyDelete::flush() } // specialized is_less function for Window -template<> bool LazyDeletor<Window>::is_less( Window* left, Window* right ) +template<> bool LazyDeletor<vcl::Window>::is_less( vcl::Window* left, vcl::Window* right ) { return left != right && right->IsChild( left, true ); } diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index d00f3e69116f..79430ba5a78e 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -376,7 +376,7 @@ GLXFBConfig* getFBConfig(const SystemEnvData* sysData, int& nBestFBC) if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) ) return NULL; - XLIB_Window win = sysData->aWindow; + Window win = sysData->aWindow; SAL_INFO("vcl.opengl", "parent window: " << win); @@ -436,12 +436,12 @@ GLXFBConfig* getFBConfig(const SystemEnvData* sysData, int& nBestFBC) #endif -bool OpenGLContext::init( Window* pParent ) +bool OpenGLContext::init( vcl::Window* pParent ) { if(mbInitialized) return true; - m_pWindow.reset(pParent ? NULL : new Window(0, WB_NOBORDER|WB_NODIALOGCONTROL)); + m_pWindow.reset(pParent ? NULL : new vcl::Window(0, WB_NOBORDER|WB_NODIALOGCONTROL)); mpWindow = pParent ? pParent : m_pWindow.get(); m_pChildWindow = 0; initWindow(); @@ -814,7 +814,7 @@ bool OpenGLContext::initWindow() #if defined( WNT ) || defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) -SystemWindowData OpenGLContext::generateWinData(Window* /*pParent*/, bool bRequestLegacyContext) +SystemWindowData OpenGLContext::generateWinData(vcl::Window* /*pParent*/, bool bRequestLegacyContext) { (void) bRequestLegacyContext; SystemWindowData aWinData; @@ -842,7 +842,7 @@ void initOpenGLFunctionPointers() } -SystemWindowData OpenGLContext::generateWinData(Window* pParent, bool) +SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool) { SystemWindowData aWinData; aWinData.nSize = sizeof(aWinData); diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 116a2752d6ba..7d5330b5a6e4 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -517,7 +517,7 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists ) // also update child windows if needed if ( GetOutDevType() == OUTDEV_WINDOW ) { - Window* pChild = ((Window*)this)->mpWindowImpl->mpFirstChild; + vcl::Window* pChild = ((vcl::Window*)this)->mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->ImplClearFontData( true ); @@ -553,7 +553,7 @@ void OutputDevice::ImplRefreshFontData( const bool bNewFontLists ) // also update child windows if needed if ( GetOutDevType() == OUTDEV_WINDOW ) { - Window* pChild = ((Window*)this)->mpWindowImpl->mpFirstChild; + vcl::Window* pChild = ((vcl::Window*)this)->mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->ImplRefreshFontData( true ); @@ -579,7 +579,7 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists ) if ( bNewFontLists ) { pSVData->maGDIData.mpScreenFontList->Clear(); - Window * pFrame = pSVData->maWinData.mpFirstFrame; + vcl::Window * pFrame = pSVData->maWinData.mpFirstFrame; if ( pFrame ) { if ( pFrame->AcquireGraphics() ) @@ -600,12 +600,12 @@ void OutputDevice::ImplUpdateFontDataForAllFrames( const FontUpdateHandler_t pHd ImplSVData* const pSVData = ImplGetSVData(); // update all windows - Window* pFrame = pSVData->maWinData.mpFirstFrame; + vcl::Window* pFrame = pSVData->maWinData.mpFirstFrame; while ( pFrame ) { ( pFrame->*pHdl )( bNewFontLists ); - Window* pSysWin = pFrame->mpWindowImpl->mpFrameData->mpFirstOverlap; + vcl::Window* pSysWin = pFrame->mpWindowImpl->mpFrameData->mpFirstOverlap; while ( pSysWin ) { ( pSysWin->*pHdl )( bNewFontLists ); diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 396a2c471014..ff9140783c78 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -228,11 +228,11 @@ static void ImplCalcMapResolution( const MapMode& rMapMode, if ( !pSVData->maGDIData.mnAppFontX ) { if( pSVData->maWinData.mpFirstFrame ) - Window::ImplInitAppFontData( pSVData->maWinData.mpFirstFrame ); + vcl::Window::ImplInitAppFontData( pSVData->maWinData.mpFirstFrame ); else { WorkWindow* pWin = new WorkWindow( NULL, 0 ); - Window::ImplInitAppFontData( pWin ); + vcl::Window::ImplInitAppFontData( pWin ); delete pWin; } } @@ -682,8 +682,8 @@ void OutputDevice::SetMapMode() mbInitFont = true; if ( GetOutDevType() == OUTDEV_WINDOW ) { - if ( ((Window*)this)->mpWindowImpl->mpCursor ) - ((Window*)this)->mpWindowImpl->mpCursor->ImplNew(); + if ( ((vcl::Window*)this)->mpWindowImpl->mpCursor ) + ((vcl::Window*)this)->mpWindowImpl->mpCursor->ImplNew(); } // #106426# Adapt logical offset when changing mapmode @@ -786,8 +786,8 @@ void OutputDevice::SetMapMode( const MapMode& rNewMapMode ) mbInitFont = true; if ( GetOutDevType() == OUTDEV_WINDOW ) { - if ( ((Window*)this)->mpWindowImpl->mpCursor ) - ((Window*)this)->mpWindowImpl->mpCursor->ImplNew(); + if ( ((vcl::Window*)this)->mpWindowImpl->mpCursor ) + ((vcl::Window*)this)->mpWindowImpl->mpCursor->ImplNew(); } // #106426# Adapt logical offset when changing mapmode @@ -2092,6 +2092,8 @@ void OutputDevice::SetPixelOffset( const Size& rOffset ) } +namespace vcl { + long Window::ImplLogicUnitToPixelX( long nX, MapUnit eUnit ) { if ( eUnit != MAP_PIXEL ) @@ -2142,6 +2144,7 @@ long Window::ImplLogicUnitToPixelY( long nY, MapUnit eUnit ) return nY; } +} /* namespace vcl */ DeviceCoordinate OutputDevice::LogicWidthToDeviceCoordinate( long nWidth ) const { diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx index 325320cf7e4e..b7edeb11ab05 100644 --- a/vcl/source/outdev/nativecontrols.cxx +++ b/vcl/source/outdev/nativecontrols.cxx @@ -33,7 +33,7 @@ static bool EnableNativeWidget( const OutputDevice& i_rDevice ) case OUTDEV_WINDOW: { - const Window* pWindow = dynamic_cast< const Window* >( &i_rDevice ); + const vcl::Window* pWindow = dynamic_cast< const vcl::Window* >( &i_rDevice ); if (pWindow) { return pWindow->IsNativeWidgetEnabled(); diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 8717246d495c..9c96710127e5 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -726,7 +726,7 @@ void OutputDevice::ImplDrawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect } else { - if ( ((Window*)this)->mpWindowImpl->mpFrameWindow == ((Window*)pSrcDev)->mpWindowImpl->mpFrameWindow ) + if ( ((vcl::Window*)this)->mpWindowImpl->mpFrameWindow == ((vcl::Window*)pSrcDev)->mpWindowImpl->mpFrameWindow ) pGraphics2 = NULL; else { diff --git a/vcl/source/uipreviewer/previewer.cxx b/vcl/source/uipreviewer/previewer.cxx index 1e318ff20a38..24f4dbed31c1 100644 --- a/vcl/source/uipreviewer/previewer.cxx +++ b/vcl/source/uipreviewer/previewer.cxx @@ -72,7 +72,7 @@ int UIPreviewApp::Main() { VclBuilder aBuilder(pDialog, OUString(), uifiles[0]); - Window *pRoot = aBuilder.get_widget_root(); + vcl::Window *pRoot = aBuilder.get_widget_root(); Dialog *pRealDialog = dynamic_cast<Dialog*>(pRoot); if (!pRealDialog) diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index 3b64a2fbd819..b02ebd84e365 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -123,6 +123,8 @@ ImplAccessibleInfos::~ImplAccessibleInfos() delete pAccessibleDescription; } +namespace vcl { + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::GetAccessible( bool bCreate ) { // do not optimize hierarchy for the top level border win (ie, when there is no parent) @@ -130,7 +132,7 @@ ImplAccessibleInfos::~ImplAccessibleInfos() if ( GetParent() && ( GetType() == WINDOW_BORDERWINDOW ) && ( GetChildCount() == 1 ) ) //if( !ImplIsAccessibleCandidate() ) { - Window* pChild = GetAccessibleChildWindow( 0 ); + vcl::Window* pChild = GetAccessibleChildWindow( 0 ); if ( pChild ) return pChild->GetAccessible(); } @@ -180,7 +182,7 @@ bool Window::ImplIsAccessibleNativeFrame() const sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const { sal_uInt16 nChildren = 0; - Window* pChild = GetWindow( nFirstWindowType ); + vcl::Window* pChild = GetWindow( nFirstWindowType ); while ( pChild ) { if( pChild->ImplIsAccessibleCandidate() ) @@ -192,16 +194,16 @@ sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirst return nChildren; } -Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, bool bTopLevel ) const +vcl::Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, bool bTopLevel ) const { if( bTopLevel ) rChildCount = 0; - Window* pChild = GetWindow( nFirstWindowType ); + vcl::Window* pChild = GetWindow( nFirstWindowType ); while ( pChild ) { - Window *pTmpChild = pChild; + vcl::Window *pTmpChild = pChild; if( !pChild->ImplIsAccessibleCandidate() ) pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, false ); @@ -215,16 +217,16 @@ Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& return NULL; } -Window* Window::GetAccessibleParentWindow() const +vcl::Window* Window::GetAccessibleParentWindow() const { if ( ImplIsAccessibleNativeFrame() ) return NULL; - Window* pParent = mpWindowImpl->mpParent; + vcl::Window* pParent = mpWindowImpl->mpParent; if( GetType() == WINDOW_MENUBARWINDOW ) { // report the menubar as a child of THE workwindow - Window *pWorkWin = GetParent()->mpWindowImpl->mpFirstChild; + vcl::Window *pWorkWin = GetParent()->mpWindowImpl->mpFirstChild; while( pWorkWin && (pWorkWin == this) ) pWorkWin = pWorkWin->mpWindowImpl->mpNext; pParent = pWorkWin; @@ -251,7 +253,7 @@ Window* Window::GetAccessibleParentWindow() const sal_uInt16 Window::GetAccessibleChildWindowCount() { sal_uInt16 nChildren = 0; - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while( pChild ) { if( pChild->IsVisible() ) @@ -265,7 +267,7 @@ sal_uInt16 Window::GetAccessibleChildWindowCount() /* if( ImplIsOverlapWindow() ) { - Window* pOverlap = GetWindow( WINDOW_FIRSTOVERLAP ); + vcl::Window* pOverlap = GetWindow( WINDOW_FIRSTOVERLAP ); while ( pOverlap ) { if( pOverlap->IsVisible() ) @@ -295,7 +297,7 @@ sal_uInt16 Window::GetAccessibleChildWindowCount() return nChildren; } -Window* Window::GetAccessibleChildWindow( sal_uInt16 n ) +vcl::Window* Window::GetAccessibleChildWindow( sal_uInt16 n ) { // report the menubarwindow as a the first child of THE workwindow if( GetType() == WINDOW_WORKWINDOW && ((WorkWindow *) this)->GetMenuBar() ) @@ -312,7 +314,7 @@ Window* Window::GetAccessibleChildWindow( sal_uInt16 n ) // transform n to child number including invisible children sal_uInt16 nChildren = n; - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while( pChild ) { if( pChild->IsVisible() ) @@ -335,7 +337,7 @@ Window* Window::GetAccessibleChildWindow( sal_uInt16 n ) /* if( ImplIsOverlapWindow() ) { - Window* pOverlap = GetWindow( WINDOW_FIRSTOVERLAP ); + vcl::Window* pOverlap = GetWindow( WINDOW_FIRSTOVERLAP ); while ( !pChild && pOverlap ) { if ( !nChildren && pOverlap->IsVisible() ) @@ -486,7 +488,7 @@ sal_uInt16 Window::getDefaultAccessibleRole() const nRole = accessibility::AccessibleRole::FRAME; else if( IsScrollable() ) nRole = accessibility::AccessibleRole::SCROLL_PANE; - else if( ((Window*)this)->ImplGetWindow()->IsMenuFloatingWindow() ) + else if( ((vcl::Window*)this)->ImplGetWindow()->IsMenuFloatingWindow() ) nRole = accessibility::AccessibleRole::WINDOW; // #106002#, contextmenus are windows (i.e. toplevel) else // #104051# WINDOW seems to be a bad default role, use LAYEREDPANE instead @@ -555,7 +557,7 @@ OUString Window::getDefaultAccessibleName() const case WINDOW_TREELISTBOX: case WINDOW_METRICBOX: { - Window *pLabel = GetAccessibleRelationLabeledBy(); + vcl::Window *pLabel = GetAccessibleRelationLabeledBy(); if ( pLabel && pLabel != this ) aAccessibleName = pLabel->GetText(); if (aAccessibleName.isEmpty()) @@ -613,7 +615,7 @@ OUString Window::GetAccessibleDescription() const { // Special code for help text windows. ZT asks the border window for the // description so we have to forward this request to our inner window. - const Window* pWin = ((Window *)this)->ImplGetWindow(); + const vcl::Window* pWin = ((vcl::Window *)this)->ImplGetWindow(); if ( pWin->GetType() == WINDOW_HELPTEXTWINDOW ) aAccessibleDescription = pWin->GetHelpText(); else @@ -623,28 +625,28 @@ OUString Window::GetAccessibleDescription() const return aAccessibleDescription; } -void Window::SetAccessibleRelationLabeledBy( Window* pLabeledBy ) +void Window::SetAccessibleRelationLabeledBy( vcl::Window* pLabeledBy ) { if ( !mpWindowImpl->mpAccessibleInfos ) mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; mpWindowImpl->mpAccessibleInfos->pLabeledByWindow = pLabeledBy; } -void Window::SetAccessibleRelationLabelFor( Window* pLabelFor ) +void Window::SetAccessibleRelationLabelFor( vcl::Window* pLabelFor ) { if ( !mpWindowImpl->mpAccessibleInfos ) mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; mpWindowImpl->mpAccessibleInfos->pLabelForWindow = pLabelFor; } -void Window::SetAccessibleRelationMemberOf( Window* pMemberOfWin ) +void Window::SetAccessibleRelationMemberOf( vcl::Window* pMemberOfWin ) { if ( !mpWindowImpl->mpAccessibleInfos ) mpWindowImpl->mpAccessibleInfos = new ImplAccessibleInfos; mpWindowImpl->mpAccessibleInfos->pMemberOfWindow = pMemberOfWin; } -Window* Window::GetAccessibleRelationMemberOf() const +vcl::Window* Window::GetAccessibleRelationMemberOf() const { if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pMemberOfWindow) return mpWindowImpl->mpAccessibleInfos->pMemberOfWindow; @@ -655,7 +657,7 @@ Window* Window::GetAccessibleRelationMemberOf() const return NULL; } -Window* Window::getAccessibleRelationLabelFor() const +vcl::Window* Window::getAccessibleRelationLabelFor() const { if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabelForWindow) return mpWindowImpl->mpAccessibleInfos->pLabelForWindow; @@ -663,9 +665,9 @@ Window* Window::getAccessibleRelationLabelFor() const return NULL; } -Window* Window::GetAccessibleRelationLabelFor() const +vcl::Window* Window::GetAccessibleRelationLabelFor() const { - Window* pWindow = getAccessibleRelationLabelFor(); + vcl::Window* pWindow = getAccessibleRelationLabelFor(); if (pWindow) return pWindow; @@ -676,7 +678,7 @@ Window* Window::GetAccessibleRelationLabelFor() const return NULL; } -Window* Window::GetAccessibleRelationLabeledBy() const +vcl::Window* Window::GetAccessibleRelationLabeledBy() const { if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabeledByWindow) return mpWindowImpl->mpAccessibleInfos->pLabeledByWindow; @@ -688,7 +690,7 @@ Window* Window::GetAccessibleRelationLabeledBy() const for (std::vector<FixedText*>::iterator aI = aMnemonicLabels.begin(), aEnd = aMnemonicLabels.end(); aI != aEnd; ++aI) { - Window *pCandidate = *aI; + vcl::Window *pCandidate = *aI; if (pCandidate->IsVisible()) return pCandidate; } @@ -707,7 +709,7 @@ bool Window::IsAccessibilityEventsSuppressed( bool bTraverseParentPath ) return mpWindowImpl->mbSuppressAccessibilityEvents; else { - Window *pParent = this; + vcl::Window *pParent = this; while ( pParent && pParent->mpWindowImpl) { if( pParent->mpWindowImpl->mbSuppressAccessibilityEvents ) @@ -724,4 +726,6 @@ void Window::SetAccessibilityEventsSuppressed(bool bSuppressed) mpWindowImpl->mbSuppressAccessibilityEvents = bSuppressed; } +} /* namespace vcl */ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index b1edf9493422..afc0be1ba9cc 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -77,6 +77,8 @@ static void ImplGetPinImage( sal_uInt16 nStyle, bool bPinIn, Image& rImage ) rImage = pSVData->maCtrlData.mpPinImgList->GetImage( nId ); } +namespace vcl { + void Window::ImplCalcSymbolRect( Rectangle& rRect ) { // Add border, not shown in the non-default representation, @@ -95,13 +97,15 @@ void Window::ImplCalcSymbolRect( Rectangle& rRect ) rRect.Bottom() -= nExtraHeight; } +} /* namespace vcl */ + static void ImplDrawBrdWinSymbol( OutputDevice* pDev, const Rectangle& rRect, SymbolType eSymbol ) { // we leave 5% room between the symbol and the button border DecorationView aDecoView( pDev ); Rectangle aTempRect = rRect; - Window::ImplCalcSymbolRect( aTempRect ); + vcl::Window::ImplCalcSymbolRect( aTempRect ); aDecoView.DrawSymbol( aTempRect, eSymbol, pDev->GetSettings().GetStyleSettings().GetButtonTextColor(), 0 ); } @@ -114,7 +118,7 @@ static void ImplDrawBrdWinSymbolButton( OutputDevice* pDev, nState &= ~BUTTON_DRAW_HIGHLIGHT; Rectangle aTempRect; - Window *pWin = dynamic_cast< Window* >(pDev); + vcl::Window *pWin = dynamic_cast< vcl::Window* >(pDev); if( pWin ) { if( bMouseOver ) @@ -461,7 +465,7 @@ bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track { // dispatch to correct window type (why is Close() not virtual ??? ) // TODO: make Close() virtual - Window *pWin = pBorderWindow->ImplGetClientWindow()->ImplGetWindow(); + vcl::Window *pWin = pBorderWindow->ImplGetClientWindow()->ImplGetWindow(); SystemWindow *pSysWin = dynamic_cast<SystemWindow* >(pWin); DockingWindow *pDockWin = dynamic_cast<DockingWindow*>(pWin); if ( pSysWin ) @@ -1007,9 +1011,9 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei mnHeight = nHeight; mbNWFBorder = false; - Window *pWin = NULL, *pCtrl = NULL; + vcl::Window *pWin = NULL, *pCtrl = NULL; if (mpOutDev->GetOutDevType() == OUTDEV_WINDOW) - pWin = (Window*) mpOutDev; + pWin = (vcl::Window*) mpOutDev; if (pWin) pCtrl = mpBorderWindow->GetWindow(WINDOW_CLIENT); @@ -1096,7 +1100,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei mpBorderWindow->SetBackground(); pCtrl->SetPaintTransparent( true ); - Window* pCompoundParent = NULL; + vcl::Window* pCompoundParent = NULL; if( pWin->GetParent() && pWin->GetParent()->IsCompoundControl() ) pCompoundParent = pWin->GetParent(); @@ -1182,9 +1186,9 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* bool bNativeOK = false; // for native widget drawing we must find out what // control this border belongs to - Window *pWin = NULL, *pCtrl = NULL; + vcl::Window *pWin = NULL, *pCtrl = NULL; if( mpOutDev->GetOutDevType() == OUTDEV_WINDOW ) - pWin = (Window*) mpOutDev; + pWin = (vcl::Window*) mpOutDev; ControlType aCtrlType = 0; ControlPart aCtrlPart = PART_ENTIRE_CONTROL; @@ -1272,7 +1276,7 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* } bool bMouseOver = false; - Window *pCtrlChild = pCtrl->GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window *pCtrlChild = pCtrl->GetWindow( WINDOW_FIRSTCHILD ); while( pCtrlChild && !(bMouseOver = pCtrlChild->IsMouseOver()) ) pCtrlChild = pCtrlChild->GetWindow( WINDOW_NEXT ); @@ -1740,14 +1744,14 @@ void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* p } } -void ImplBorderWindow::ImplInit( Window* pParent, +void ImplBorderWindow::ImplInit( vcl::Window* pParent, WinBits nStyle, sal_uInt16 nTypeStyle, const ::com::sun::star::uno::Any& ) { ImplInit( pParent, nStyle, nTypeStyle, NULL ); } -void ImplBorderWindow::ImplInit( Window* pParent, +void ImplBorderWindow::ImplInit( vcl::Window* pParent, WinBits nStyle, sal_uInt16 nTypeStyle, SystemParentData* pSystemParentData ) @@ -1825,7 +1829,7 @@ void ImplBorderWindow::ImplInit( Window* pParent, InitView(); } -ImplBorderWindow::ImplBorderWindow( Window* pParent, +ImplBorderWindow::ImplBorderWindow( vcl::Window* pParent, SystemParentData* pSystemParentData, WinBits nStyle, sal_uInt16 nTypeStyle ) : Window( WINDOW_BORDERWINDOW ) @@ -1833,7 +1837,7 @@ ImplBorderWindow::ImplBorderWindow( Window* pParent, ImplInit( pParent, nStyle, nTypeStyle, pSystemParentData ); } -ImplBorderWindow::ImplBorderWindow( Window* pParent, WinBits nStyle , +ImplBorderWindow::ImplBorderWindow( vcl::Window* pParent, WinBits nStyle , sal_uInt16 nTypeStyle ) : Window( WINDOW_BORDERWINDOW ) { @@ -1915,7 +1919,7 @@ void ImplBorderWindow::Resize() if ( !mbRollUp ) { - Window* pClientWindow = ImplGetClientWindow(); + vcl::Window* pClientWindow = ImplGetClientWindow(); if ( mpMenuBarWindow ) { @@ -2035,7 +2039,7 @@ void ImplBorderWindow::UpdateView( bool bNewView, const Size& rNewOutSize ) mpBorderView->Init( this, aSize.Width(), aSize.Height() ); } - Window* pClientWindow = ImplGetClientWindow(); + vcl::Window* pClientWindow = ImplGetClientWindow(); if ( pClientWindow ) { GetBorder( pClientWindow->mpWindowImpl->mnLeftBorder, pClientWindow->mpWindowImpl->mnTopBorder, @@ -2159,7 +2163,7 @@ void ImplBorderWindow::UpdateMenuHeight() Resize(); } -void ImplBorderWindow::SetMenuBarWindow( Window* pWindow ) +void ImplBorderWindow::SetMenuBarWindow( vcl::Window* pWindow ) { mpMenuBarWindow = pWindow; UpdateMenuHeight(); @@ -2193,7 +2197,7 @@ Rectangle ImplBorderWindow::GetMenuRect() const Size ImplBorderWindow::GetOptimalSize() const { - const Window* pClientWindow = ImplGetClientWindow(); + const vcl::Window* pClientWindow = ImplGetClientWindow(); if (pClientWindow) return pClientWindow->GetOptimalSize(); return Size(mnMinWidth, mnMinHeight); diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx index 21e909f8765b..b5871954b713 100644 --- a/vcl/source/window/btndlg.cxx +++ b/vcl/source/window/btndlg.cxx @@ -50,7 +50,7 @@ ButtonDialog::ButtonDialog( WindowType nType ) : ImplInitButtonDialogData(); } -ButtonDialog::ButtonDialog( Window* pParent, WinBits nStyle ) : +ButtonDialog::ButtonDialog( vcl::Window* pParent, WinBits nStyle ) : Dialog( WINDOW_BUTTONDIALOG ) { ImplInitButtonDialogData(); diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 824fd177b1b1..e0c71e923530 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -176,7 +176,7 @@ namespace } #endif -VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString& sUIFile, const OString& sID, const uno::Reference<frame::XFrame>& rFrame) +VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUString& sUIFile, const OString& sID, const uno::Reference<frame::XFrame>& rFrame) : m_sID(sID) , m_sHelpRoot(OUStringToOString(sUIFile, RTL_TEXTENCODING_UTF8)) , m_pStringReplace(ResMgr::GetReadStringHook()) @@ -217,7 +217,7 @@ VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString& aEnd = m_pParserState->m_aMnemonicWidgetMaps.end(); aI != aEnd; ++aI) { FixedText *pOne = get<FixedText>(aI->m_sID); - Window *pOther = get<Window>(aI->m_sValue); + vcl::Window *pOther = get<vcl::Window>(aI->m_sValue); SAL_WARN_IF(!pOne || !pOther, "vcl", "missing either source " << aI->m_sID << " or target " << aI->m_sValue << " member of Mnemonic Widget Mapping"); if (pOne && pOther) pOne->set_mnemonic_widget(pOther); @@ -227,14 +227,14 @@ VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString& for (AtkMap::iterator aI = m_pParserState->m_aAtkInfo.begin(), aEnd = m_pParserState->m_aAtkInfo.end(); aI != aEnd; ++aI) { - Window *pSource = aI->first; + vcl::Window *pSource = aI->first; const stringmap &rMap = aI->second; for (stringmap::const_iterator aP = rMap.begin(), aEndP = rMap.end(); aP != aEndP; ++aP) { const OString &rTarget = aP->second; - Window *pTarget = get<Window>(rTarget); + vcl::Window *pTarget = get<vcl::Window>(rTarget); SAL_WARN_IF(!pTarget, "vcl", "missing member of a11y relation: " << rTarget.getStr()); if (!pTarget) @@ -290,7 +290,7 @@ VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString& for (std::vector<WidgetAdjustmentMap>::iterator aI = m_pParserState->m_aNumericFormatterAdjustmentMaps.begin(), aEnd = m_pParserState->m_aNumericFormatterAdjustmentMaps.end(); aI != aEnd; ++aI) { - NumericFormatter *pTarget = dynamic_cast<NumericFormatter*>(get<Window>(aI->m_sID)); + NumericFormatter *pTarget = dynamic_cast<NumericFormatter*>(get<vcl::Window>(aI->m_sID)); const Adjustment *pAdjustment = get_adjustment_by_name(aI->m_sValue); SAL_WARN_IF(!pTarget || !pAdjustment, "vcl", "missing elements of spinbutton/adjustment"); if (pTarget && pAdjustment) @@ -300,7 +300,7 @@ VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString& for (std::vector<WidgetAdjustmentMap>::iterator aI = m_pParserState->m_aTimeFormatterAdjustmentMaps.begin(), aEnd = m_pParserState->m_aTimeFormatterAdjustmentMaps.end(); aI != aEnd; ++aI) { - TimeField *pTarget = dynamic_cast<TimeField*>(get<Window>(aI->m_sID)); + TimeField *pTarget = dynamic_cast<TimeField*>(get<vcl::Window>(aI->m_sID)); const Adjustment *pAdjustment = get_adjustment_by_name(aI->m_sValue); SAL_WARN_IF(!pTarget || !pAdjustment, "vcl", "missing elements of spinbutton/adjustment"); if (pTarget && pAdjustment) @@ -310,7 +310,7 @@ VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString& for (std::vector<WidgetAdjustmentMap>::iterator aI = m_pParserState->m_aDateFormatterAdjustmentMaps.begin(), aEnd = m_pParserState->m_aDateFormatterAdjustmentMaps.end(); aI != aEnd; ++aI) { - DateField *pTarget = dynamic_cast<DateField*>(get<Window>(aI->m_sID)); + DateField *pTarget = dynamic_cast<DateField*>(get<vcl::Window>(aI->m_sID)); const Adjustment *pAdjustment = get_adjustment_by_name(aI->m_sValue); SAL_WARN_IF(!pTarget || !pAdjustment, "vcl", "missing elements of spinbutton/adjustment"); if (pTarget && pAdjustment) @@ -345,7 +345,7 @@ VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString& for (std::vector<OString>::iterator aW = aI->m_aWidgets.begin(), aEndW = aI->m_aWidgets.end(); aW != aEndW; ++aW) { - Window* pWindow = get<Window>(aW->getStr()); + vcl::Window* pWindow = get<vcl::Window>(aW->getStr()); pWindow->add_to_size_group(xGroup); } } @@ -450,7 +450,7 @@ VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString& //Remove ScrollWindow parent widgets whose children in vcl implement scrolling //internally. - for (std::map<Window*, Window*>::iterator aI = m_pParserState->m_aRedundantParentWidgets.begin(), + for (std::map<vcl::Window*, vcl::Window*>::iterator aI = m_pParserState->m_aRedundantParentWidgets.begin(), aEnd = m_pParserState->m_aRedundantParentWidgets.end(); aI != aEnd; ++aI) { delete_by_window(aI->first); @@ -462,8 +462,8 @@ VclBuilder::VclBuilder(Window *pParent, const OUString& sUIDir, const OUString& { VclExpander *pOne = *aI; - Window *pChild = pOne->get_child(); - Window* pLabel = pOne->GetWindow(WINDOW_LASTCHILD); + vcl::Window *pChild = pOne->get_child(); + vcl::Window* pLabel = pOne->GetWindow(WINDOW_LASTCHILD); if (pLabel && pLabel != pChild && pLabel->GetType() == WINDOW_FIXEDTEXT) { FixedText *pLabelWidget = static_cast<FixedText*>(pLabel); @@ -835,7 +835,7 @@ namespace pButton->SetModeImage(aImage); } - Button* extractStockAndBuildPushButton(Window *pParent, VclBuilder::stringmap &rMap) + Button* extractStockAndBuildPushButton(vcl::Window *pParent, VclBuilder::stringmap &rMap) { WinBits nBits = WB_CLIPCHILDREN|WB_CENTER|WB_VCENTER; @@ -868,7 +868,7 @@ namespace return pWindow; } - Button * extractStockAndBuildMenuButton(Window *pParent, VclBuilder::stringmap &rMap) + Button * extractStockAndBuildMenuButton(vcl::Window *pParent, VclBuilder::stringmap &rMap) { WinBits nBits = WB_CLIPCHILDREN|WB_CENTER|WB_VCENTER|WB_3DLOOK; @@ -1165,7 +1165,7 @@ void VclBuilder::extractMnemonicWidget(const OString &rLabelID, stringmap &rMap) } } -Window* VclBuilder::prepareWidgetOwnScrolling(Window *pParent, WinBits &rWinStyle) +vcl::Window* VclBuilder::prepareWidgetOwnScrolling(vcl::Window *pParent, WinBits &rWinStyle) { //For Widgets that manage their own scrolling, if one appears as a child of //a scrolling window shoehorn that scrolling settings to this widget and @@ -1181,7 +1181,7 @@ Window* VclBuilder::prepareWidgetOwnScrolling(Window *pParent, WinBits &rWinStyl return pParent; } -void VclBuilder::cleanupWidgetOwnScrolling(Window *pScrollParent, Window *pWindow, stringmap &rMap) +void VclBuilder::cleanupWidgetOwnScrolling(vcl::Window *pScrollParent, vcl::Window *pWindow, stringmap &rMap) { //remove the redundant scrolling parent sal_Int32 nWidthReq = pScrollParent->get_width_request(); @@ -1196,7 +1196,7 @@ void VclBuilder::cleanupWidgetOwnScrolling(Window *pScrollParent, Window *pWindo extern "C" { static void SAL_CALL thisModule() {} } #endif -Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OString &id, +vcl::Window *VclBuilder::makeObject(vcl::Window *pParent, const OString &name, const OString &id, stringmap &rMap, const std::vector<OString> &rItems) { bool bIsPlaceHolder = name.isEmpty(); @@ -1242,7 +1242,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri extractButtonImage(id, rMap, name == "GtkRadioButton"); - Window *pWindow = NULL; + vcl::Window *pWindow = NULL; if (name == "GtkDialog") { WinBits nBits = WB_CLIPCHILDREN|WB_MOVEABLE|WB_3DLOOK|WB_CLOSEABLE; @@ -1492,7 +1492,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; //ListBox manages its own scrolling, - Window *pRealParent = prepareWidgetOwnScrolling(pParent, nWinStyle); + vcl::Window *pRealParent = prepareWidgetOwnScrolling(pParent, nWinStyle); pWindow = new ListBox(pRealParent, nWinStyle); if (pRealParent != pParent) cleanupWidgetOwnScrolling(pParent, pWindow, rMap); @@ -1570,7 +1570,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri else if (name == "GtkDrawingArea") { OString sBorder = extractCustomProperty(rMap); - pWindow = new Window(pParent, sBorder.isEmpty() ? 0 : WB_BORDER); + pWindow = new vcl::Window(pParent, sBorder.isEmpty() ? 0 : WB_BORDER); } else if (name == "GtkTextView") { @@ -1581,7 +1581,7 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri if (!sBorder.isEmpty()) nWinStyle |= WB_BORDER; //VclMultiLineEdit manages its own scrolling, - Window *pRealParent = prepareWidgetOwnScrolling(pParent, nWinStyle); + vcl::Window *pRealParent = prepareWidgetOwnScrolling(pParent, nWinStyle); pWindow = new VclMultiLineEdit(pRealParent, nWinStyle); if (pRealParent != pParent) cleanupWidgetOwnScrolling(pParent, pWindow, rMap); @@ -1702,7 +1702,7 @@ namespace { //return true for window types which exist in vcl but are not themselves //represented in the .ui format, i.e. only their children exist. - bool isConsideredGtkPseudo(Window *pWindow) + bool isConsideredGtkPseudo(vcl::Window *pWindow) { return pWindow->GetType() == WINDOW_TABPAGE; } @@ -1720,7 +1720,7 @@ void VclBuilder::setDeferredProperties() set_properties(m_pParent, aDeferredProperties); } -void VclBuilder::set_properties(Window *pWindow, const stringmap &rProps) +void VclBuilder::set_properties(vcl::Window *pWindow, const stringmap &rProps) { for (stringmap::const_iterator aI = rProps.begin(), aEnd = rProps.end(); aI != aEnd; ++aI) { @@ -1730,12 +1730,12 @@ void VclBuilder::set_properties(Window *pWindow, const stringmap &rProps) } } -Window *VclBuilder::insertObject(Window *pParent, const OString &rClass, +vcl::Window *VclBuilder::insertObject(vcl::Window *pParent, const OString &rClass, const OString &rID, stringmap &rProps, stringmap &rPango, stringmap &rAtk, std::vector<OString> &rItems) { - Window *pCurrentChild = NULL; + vcl::Window *pCurrentChild = NULL; if (m_pParent && !isConsideredGtkPseudo(m_pParent) && !m_sID.isEmpty() && rID.equals(m_sID)) { @@ -1797,7 +1797,7 @@ Window *VclBuilder::insertObject(Window *pParent, const OString &rClass, return pCurrentChild; } -void VclBuilder::reorderWithinParent(Window &rWindow, sal_uInt16 nNewPosition) +void VclBuilder::reorderWithinParent(vcl::Window &rWindow, sal_uInt16 nNewPosition) { if (rWindow.mpWindowImpl->mpParent != rWindow.mpWindowImpl->mpRealParent) { @@ -1811,7 +1811,7 @@ void VclBuilder::reorderWithinParent(Window &rWindow, sal_uInt16 nNewPosition) rWindow.reorderWithinParent(nNewPosition); } -void VclBuilder::handleTabChild(Window *pParent, xmlreader::XmlReader &reader) +void VclBuilder::handleTabChild(vcl::Window *pParent, xmlreader::XmlReader &reader) { OString sID; @@ -1878,7 +1878,7 @@ void VclBuilder::handleTabChild(Window *pParent, xmlreader::XmlReader &reader) //so that tabbing between controls goes in a visually sensible sequence //we sort these into a best-tab-order sequence -bool VclBuilder::sortIntoBestTabTraversalOrder::operator()(const Window *pA, const Window *pB) const +bool VclBuilder::sortIntoBestTabTraversalOrder::operator()(const vcl::Window *pA, const vcl::Window *pB) const { //sort child order within parent list by grid position sal_Int32 nTopA = pA->get_grid_top_attach(); @@ -1934,7 +1934,7 @@ bool VclBuilder::sortIntoBestTabTraversalOrder::operator()(const Window *pA, con const VclFrame *pFrameParent = dynamic_cast<const VclFrame*>(pA->GetParent()); if (pFrameParent) { - const Window *pLabel = pFrameParent->get_label_widget(); + const vcl::Window *pLabel = pFrameParent->get_label_widget(); int nFramePosA = (pA == pLabel) ? 0 : 1; int nFramePosB = (pB == pLabel) ? 0 : 1; return nFramePosA < nFramePosB; @@ -1943,9 +1943,9 @@ bool VclBuilder::sortIntoBestTabTraversalOrder::operator()(const Window *pA, con return false; } -void VclBuilder::handleChild(Window *pParent, xmlreader::XmlReader &reader) +void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader) { - Window *pCurrentChild = NULL; + vcl::Window *pCurrentChild = NULL; xmlreader::Span name; int nsId; @@ -2017,7 +2017,7 @@ void VclBuilder::handleChild(Window *pParent, xmlreader::XmlReader &reader) } else if (sInternalChild.startsWith("action_area") || sInternalChild.startsWith("messagedialog-action_area")) { - Window *pContentArea = pCurrentChild->GetParent(); + vcl::Window *pContentArea = pCurrentChild->GetParent(); assert(pContentArea && pContentArea->GetType() == WINDOW_CONTAINER); if (Dialog *pBoxParent = dynamic_cast<Dialog*>(pContentArea ? pContentArea->GetParent() : NULL)) { @@ -2027,8 +2027,8 @@ void VclBuilder::handleChild(Window *pParent, xmlreader::XmlReader &reader) //To-Do make reorder a virtual in Window, move this foo //there and see above - std::vector<Window*> aChilds; - for (Window* pChild = pCurrentChild->GetWindow(WINDOW_FIRSTCHILD); pChild; + std::vector<vcl::Window*> aChilds; + for (vcl::Window* pChild = pCurrentChild->GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { aChilds.push_back(pChild); @@ -2062,7 +2062,7 @@ void VclBuilder::handleChild(Window *pParent, xmlreader::XmlReader &reader) } } -void VclBuilder::reorderWithinParent(std::vector<Window*>& rChilds, bool bIsButtonBox) +void VclBuilder::reorderWithinParent(std::vector<vcl::Window*>& rChilds, bool bIsButtonBox) { for (size_t i = 0; i < rChilds.size(); ++i) { @@ -2336,7 +2336,7 @@ void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const OString &rI } } -void VclBuilder::handleAtkObject(xmlreader::XmlReader &reader, const OString &rID, Window *pWindow) +void VclBuilder::handleAtkObject(xmlreader::XmlReader &reader, const OString &rID, vcl::Window *pWindow) { assert(pWindow); @@ -2736,7 +2736,7 @@ void VclBuilder::insertMenuObject(PopupMenu *pParent, const OString &rClass, con rProps.clear(); } -Window* VclBuilder::handleObject(Window *pParent, xmlreader::XmlReader &reader) +vcl::Window* VclBuilder::handleObject(vcl::Window *pParent, xmlreader::XmlReader &reader) { OString sClass; OString sID; @@ -2794,7 +2794,7 @@ Window* VclBuilder::handleObject(Window *pParent, xmlreader::XmlReader &reader) if (!sCustomProperty.isEmpty()) aProperties[OString("customproperty")] = sCustomProperty; - Window *pCurrentChild = NULL; + vcl::Window *pCurrentChild = NULL; while(true) { xmlreader::XmlReader::Result res = reader.nextItem( @@ -2859,7 +2859,7 @@ Window* VclBuilder::handleObject(Window *pParent, xmlreader::XmlReader &reader) return pCurrentChild; } -void VclBuilder::handlePacking(Window *pCurrent, Window *pParent, xmlreader::XmlReader &reader) +void VclBuilder::handlePacking(vcl::Window *pCurrent, vcl::Window *pParent, xmlreader::XmlReader &reader) { xmlreader::Span name; int nsId; @@ -2891,8 +2891,8 @@ void VclBuilder::handlePacking(Window *pCurrent, Window *pParent, xmlreader::Xml } } -void VclBuilder::applyPackingProperty(Window *pCurrent, - Window *pParent, +void VclBuilder::applyPackingProperty(vcl::Window *pCurrent, + vcl::Window *pParent, xmlreader::XmlReader &reader) { if (!pCurrent) @@ -2909,7 +2909,7 @@ void VclBuilder::applyPackingProperty(Window *pCurrent, if (pCurrent->GetType() == WINDOW_SCROLLWINDOW) { - std::map<Window*, Window*>::iterator aFind = m_pParserState->m_aRedundantParentWidgets.find(pCurrent); + std::map<vcl::Window*, vcl::Window*>::iterator aFind = m_pParserState->m_aRedundantParentWidgets.find(pCurrent); if (aFind != m_pParserState->m_aRedundantParentWidgets.end()) { pCurrent = aFind->second; @@ -3105,12 +3105,12 @@ void VclBuilder::collectAccelerator(xmlreader::XmlReader &reader, stringmap &rMa } } -Window *VclBuilder::get_widget_root() +vcl::Window *VclBuilder::get_widget_root() { return m_aChildren.empty() ? NULL : m_aChildren[0].m_pWindow; } -Window *VclBuilder::get_by_name(const OString& sID) +vcl::Window *VclBuilder::get_by_name(const OString& sID) { for (std::vector<WinAndId>::iterator aI = m_aChildren.begin(), aEnd = m_aChildren.end(); aI != aEnd; ++aI) @@ -3134,7 +3134,7 @@ PopupMenu *VclBuilder::get_menu(const OString& sID) return NULL; } -short VclBuilder::get_response(const Window *pWindow) const +short VclBuilder::get_response(const vcl::Window *pWindow) const { for (std::vector<WinAndId>::const_iterator aI = m_aChildren.begin(), aEnd = m_aChildren.end(); aI != aEnd; ++aI) @@ -3180,13 +3180,13 @@ void VclBuilder::delete_by_name(const OString& sID) } } -void VclBuilder::delete_by_window(const Window *pWindow) +void VclBuilder::delete_by_window(const vcl::Window *pWindow) { drop_ownership(pWindow); delete pWindow; } -void VclBuilder::drop_ownership(const Window *pWindow) +void VclBuilder::drop_ownership(const vcl::Window *pWindow) { for (std::vector<WinAndId>::iterator aI = m_aChildren.begin(), aEnd = m_aChildren.end(); aI != aEnd; ++aI) @@ -3199,7 +3199,7 @@ void VclBuilder::drop_ownership(const Window *pWindow) } } -OString VclBuilder::get_by_window(const Window *pWindow) const +OString VclBuilder::get_by_window(const vcl::Window *pWindow) const { for (std::vector<WinAndId>::const_iterator aI = m_aChildren.begin(), aEnd = m_aChildren.end(); aI != aEnd; ++aI) @@ -3211,13 +3211,13 @@ OString VclBuilder::get_by_window(const Window *pWindow) const return OString(); } -VclBuilder::PackingData VclBuilder::get_window_packing_data(const Window *pWindow) const +VclBuilder::PackingData VclBuilder::get_window_packing_data(const vcl::Window *pWindow) const { //We've stored the return of new Control, some of these get //border windows placed around them which are what you get //from GetChild, so scoot up a level if necessary to get the //window whose position value we have - const Window *pPropHolder = pWindow->mpWindowImpl->mpClientWindow ? + const vcl::Window *pPropHolder = pWindow->mpWindowImpl->mpClientWindow ? pWindow->mpWindowImpl->mpClientWindow : pWindow; for (std::vector<WinAndId>::const_iterator aI = m_aChildren.begin(), @@ -3230,7 +3230,7 @@ VclBuilder::PackingData VclBuilder::get_window_packing_data(const Window *pWindo return PackingData(); } -void VclBuilder::set_window_packing_position(const Window *pWindow, sal_Int32 nPosition) +void VclBuilder::set_window_packing_position(const vcl::Window *pWindow, sal_Int32 nPosition) { for (std::vector<WinAndId>::iterator aI = m_aChildren.begin(), aEnd = m_aChildren.end(); aI != aEnd; ++aI) diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx index 4659ee250e84..b31e4ead8dcb 100644 --- a/vcl/source/window/clipping.cxx +++ b/vcl/source/window/clipping.cxx @@ -28,6 +28,8 @@ #define IMPL_MAXSAVEBACKSIZE (640*480) #define IMPL_MAXALLSAVEBACKSIZE (800*600*2) +namespace vcl { + void Window::InitClipRegion() { DBG_TESTSOLARMUTEX(); @@ -118,12 +120,12 @@ Region Window::GetWindowClipRegionPixel( sal_uInt16 nFlags ) const if ( nFlags & WINDOW_GETCLIPREGION_NOCHILDREN ) { if ( mpWindowImpl->mbInitWinClipRegion ) - ((Window*)this)->ImplInitWinClipRegion(); + ((vcl::Window*)this)->ImplInitWinClipRegion(); aWinClipRegion = mpWindowImpl->maWinClipRegion; } else { - Region* pWinChildClipRegion = ((Window*)this)->ImplGetWinChildClipRegion(); + Region* pWinChildClipRegion = ((vcl::Window*)this)->ImplGetWinChildClipRegion(); aWinClipRegion = *pWinChildClipRegion; // --- RTL --- remirror clip region before passing it to somebody if( ImplIsAntiparallel() ) @@ -194,10 +196,10 @@ void Window::ImplClipBoundaries( Region& rRegion, bool bThis, bool bOverlaps ) if ( bOverlaps && !rRegion.IsEmpty() ) { // Clip Overlap Siblings - Window* pStartOverlapWindow = this; + vcl::Window* pStartOverlapWindow = this; while ( !pStartOverlapWindow->mpWindowImpl->mbFrame ) { - Window* pOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap; + vcl::Window* pOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap; while ( pOverlapWindow && (pOverlapWindow != pStartOverlapWindow) ) { pOverlapWindow->ImplExcludeOverlapWindows2( rRegion ); @@ -217,7 +219,7 @@ void Window::ImplClipBoundaries( Region& rRegion, bool bThis, bool bOverlaps ) bool Window::ImplClipChildren( Region& rRegion ) { bool bOtherClip = false; - Window* pWindow = mpWindowImpl->mpFirstChild; + vcl::Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { if ( pWindow->mpWindowImpl->mbReallyVisible ) @@ -239,7 +241,7 @@ bool Window::ImplClipChildren( Region& rRegion ) void Window::ImplClipAllChildren( Region& rRegion ) { - Window* pWindow = mpWindowImpl->mpFirstChild; + vcl::Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { if ( pWindow->mpWindowImpl->mbReallyVisible ) @@ -250,7 +252,7 @@ void Window::ImplClipAllChildren( Region& rRegion ) void Window::ImplClipSiblings( Region& rRegion ) { - Window* pWindow = ImplGetParent()->mpWindowImpl->mpFirstChild; + vcl::Window* pWindow = ImplGetParent()->mpWindowImpl->mpFirstChild; while ( pWindow ) { if ( pWindow == this ) @@ -395,7 +397,7 @@ void Window::ImplUpdateSysObjChildrenClip() if ( mpWindowImpl->mpSysObj && mpWindowImpl->mbInitWinClipRegion ) ImplSysObjClip( NULL ); - Window* pWindow = mpWindowImpl->mpFirstChild; + vcl::Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { pWindow->ImplUpdateSysObjChildrenClip(); @@ -407,7 +409,7 @@ void Window::ImplUpdateSysObjOverlapsClip() { ImplUpdateSysObjChildrenClip(); - Window* pWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { pWindow->ImplUpdateSysObjOverlapsClip(); @@ -424,7 +426,7 @@ void Window::ImplUpdateSysObjClip() // siblings should recalculate their clip region if ( mpWindowImpl->mbClipSiblings ) { - Window* pWindow = mpWindowImpl->mpNext; + vcl::Window* pWindow = mpWindowImpl->mpNext; while ( pWindow ) { pWindow->ImplUpdateSysObjChildrenClip(); @@ -448,7 +450,7 @@ bool Window::ImplSetClipFlagChildren( bool bSysObjOnlySmaller ) mbInitClipRegion = true; mpWindowImpl->mbInitWinClipRegion = true; - Window* pWindow = mpWindowImpl->mpFirstChild; + vcl::Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) ) @@ -470,7 +472,7 @@ bool Window::ImplSetClipFlagChildren( bool bSysObjOnlySmaller ) mbInitClipRegion = true; mpWindowImpl->mbInitWinClipRegion = true; - Window* pWindow = mpWindowImpl->mpFirstChild; + vcl::Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) ) @@ -485,7 +487,7 @@ bool Window::ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller ) { bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller ); - Window* pWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller ) ) @@ -502,7 +504,7 @@ bool Window::ImplSetClipFlag( bool bSysObjOnlySmaller ) { bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller ); - Window* pParent = ImplGetParent(); + vcl::Window* pParent = ImplGetParent(); if ( pParent && ((pParent->GetStyle() & WB_CLIPCHILDREN) || (mpWindowImpl->mnParentClipMode & PARENTCLIPMODE_CLIP)) ) { @@ -513,7 +515,7 @@ bool Window::ImplSetClipFlag( bool bSysObjOnlySmaller ) // siblings should recalculate their clip region if ( mpWindowImpl->mbClipSiblings ) { - Window* pWindow = mpWindowImpl->mpNext; + vcl::Window* pWindow = mpWindowImpl->mpNext; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) ) @@ -564,7 +566,7 @@ void Window::ImplExcludeWindowRegion( Region& rRegion ) void Window::ImplExcludeOverlapWindows( Region& rRegion ) { - Window* pWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { if ( pWindow->mpWindowImpl->mbReallyVisible ) @@ -587,7 +589,7 @@ void Window::ImplExcludeOverlapWindows2( Region& rRegion ) void Window::ImplIntersectAndUnionOverlapWindows( const Region& rInterRegion, Region& rRegion ) { - Window* pWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { if ( pWindow->mpWindowImpl->mbReallyVisible ) @@ -617,14 +619,14 @@ void Window::ImplIntersectAndUnionOverlapWindows2( const Region& rInterRegion, R void Window::ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& rRegion ) { // Clip Overlap Siblings - Window* pStartOverlapWindow; + vcl::Window* pStartOverlapWindow; if ( !ImplIsOverlapWindow() ) pStartOverlapWindow = mpWindowImpl->mpOverlapWindow; else pStartOverlapWindow = this; while ( !pStartOverlapWindow->mpWindowImpl->mbFrame ) { - Window* pOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap; + vcl::Window* pOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap; while ( pOverlapWindow && (pOverlapWindow != pStartOverlapWindow) ) { pOverlapWindow->ImplIntersectAndUnionOverlapWindows2( rInterRegion, rRegion ); @@ -647,7 +649,7 @@ void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegio if ( mpWindowImpl->mbWinRegion ) rRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); Region aTempRegion; - Window* pWindow; + vcl::Window* pWindow; ImplCalcOverlapRegionOverlaps( aRegion, rRegion ); @@ -710,12 +712,12 @@ void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegio } } -bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const +bool Window::ImplIsWindowInFront( const vcl::Window* pTestWindow ) const { // check for overlapping window pTestWindow = pTestWindow->ImplGetFirstOverlapWindow(); - const Window* pTempWindow = pTestWindow; - const Window* pThisWindow = ImplGetFirstOverlapWindow(); + const vcl::Window* pTempWindow = pTestWindow; + const vcl::Window* pThisWindow = ImplGetFirstOverlapWindow(); if ( pTempWindow == pThisWindow ) return false; do @@ -926,7 +928,7 @@ void Window::ImplDeleteOverlapBackground() mpWindowImpl->mpFrameData->mpFirstBackWin = mpWindowImpl->mpOverlapData->mpNextBackWin; else { - Window* pTemp = mpWindowImpl->mpFrameData->mpFirstBackWin; + vcl::Window* pTemp = mpWindowImpl->mpFrameData->mpFirstBackWin; while ( pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin != this ) pTemp = pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin; pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin = mpWindowImpl->mpOverlapData->mpNextBackWin; @@ -937,12 +939,12 @@ void Window::ImplDeleteOverlapBackground() void Window::ImplInvalidateAllOverlapBackgrounds() { - Window* pWindow = mpWindowImpl->mpFrameData->mpFirstBackWin; + vcl::Window* pWindow = mpWindowImpl->mpFrameData->mpFirstBackWin; while ( pWindow ) { // remember next window here already, as this window could // be removed within the next if clause from the list - Window* pNext = pWindow->mpWindowImpl->mpOverlapData->mpNextBackWin; + vcl::Window* pNext = pWindow->mpWindowImpl->mpOverlapData->mpNextBackWin; if ( ImplIsWindowInFront( pWindow ) ) { @@ -966,5 +968,6 @@ void Window::ImplInvalidateAllOverlapBackgrounds() } } +} /* namespace vcl */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx index a64c37a6a5f2..d0c9a7327e5d 100644 --- a/vcl/source/window/cursor.cxx +++ b/vcl/source/window/cursor.cxx @@ -38,12 +38,12 @@ struct ImplCursorData unsigned char mnDirection; // indicates writing direction sal_uInt16 mnStyle; // Cursor-Style bool mbCurVisible; // Ist Cursor aktuell sichtbar - Window* mpWindow; // Zugeordnetes Windows + vcl::Window* mpWindow; // Zugeordnetes Windows }; static void ImplCursorInvert( ImplCursorData* pData ) { - Window* pWindow = pData->mpWindow; + vcl::Window* pWindow = pData->mpWindow; bool bMapMode = pWindow->IsMapModeEnabled(); pWindow->EnableMapMode( false ); sal_uInt16 nInvertStyle; @@ -119,7 +119,7 @@ void vcl::Cursor::ImplDraw() { if ( mpData && mpData->mpWindow && !mpData->mbCurVisible ) { - Window* pWindow = mpData->mpWindow; + vcl::Window* pWindow = mpData->mpWindow; mpData->maPixPos = pWindow->LogicToPixel( maPos ); mpData->maPixSize = pWindow->LogicToPixel( maSize ); mpData->mnPixSlant = pWindow->LogicToPixel( Size( mnSlant, 0 ) ).Width(); @@ -152,7 +152,7 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore ) { if ( mbVisible ) { - Window* pWindow; + vcl::Window* pWindow; if ( mpWindow ) pWindow = mpWindow; else @@ -317,7 +317,7 @@ void vcl::Cursor::Hide() } } -void vcl::Cursor::SetWindow( Window* pWindow ) +void vcl::Cursor::SetWindow( vcl::Window* pWindow ) { if ( mpWindow != pWindow ) { diff --git a/vcl/source/window/debug.cxx b/vcl/source/window/debug.cxx index 4aa875a658d9..70e50ef5d5f9 100644 --- a/vcl/source/window/debug.cxx +++ b/vcl/source/window/debug.cxx @@ -27,13 +27,13 @@ const char* ImplDbgCheckWindow( const void* pObj ) { DBG_TESTSOLARMUTEX(); - const Window* pWindow = (Window*)pObj; + const vcl::Window* pWindow = (vcl::Window*)pObj; if ( (pWindow->GetType() < WINDOW_FIRST) || (pWindow->GetType() > WINDOW_LAST) ) return "Window data overwrite"; // check window-chain - Window* pChild = pWindow->mpWindowImpl->mpFirstChild; + vcl::Window* pChild = pWindow->mpWindowImpl->mpFirstChild; while ( pChild ) { if ( pChild->mpWindowImpl->mpParent != pWindow ) diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx index 9d622a91f989..b6e1cf88dc80 100644 --- a/vcl/source/window/debugevent.cxx +++ b/vcl/source/window/debugevent.cxx @@ -32,9 +32,9 @@ static double getRandom() return (double)rand() / RAND_MAX; } -Window *DebugEventInjector::ChooseWindow() +vcl::Window *DebugEventInjector::ChooseWindow() { - Window *pWindow, *pParent; + vcl::Window *pWindow, *pParent; if (getRandom() < 0.80 && (pWindow = Application::GetFocusWindow())) @@ -46,11 +46,11 @@ Window *DebugEventInjector::ChooseWindow() // select a top window at random long nIdx = Application::GetTopWindowCount() * getRandom(); if (!(pParent = Application::GetTopWindow( nIdx ))) - pParent = static_cast<Window *>(Application::GetAppWindow()); + pParent = static_cast<vcl::Window *>(Application::GetAppWindow()); } assert (pParent != NULL); - std::vector< Window *> aChildren; + std::vector< vcl::Window *> aChildren; pParent->CollectChildren( aChildren ); return aChildren[ aChildren.size() * getRandom() ]; @@ -77,7 +77,7 @@ static void CollectMenuItemIds( Menu *pMenu, MenuItemIds &rIds ) void DebugEventInjector::InjectMenuEvent() { - Window *pFocus = Application::GetFocusWindow(); + vcl::Window *pFocus = Application::GetFocusWindow(); if (!pFocus) return; @@ -133,7 +133,7 @@ static void InitKeyEvent( SalKeyEvent &rKeyEvent ) void DebugEventInjector::InjectTextEvent() { SalKeyEvent aKeyEvent; - Window *pWindow = ChooseWindow(); + vcl::Window *pWindow = ChooseWindow(); InitKeyEvent( aKeyEvent ); @@ -198,7 +198,7 @@ void DebugEventInjector::InjectEvent() void DebugEventInjector::InjectKeyNavEdit() { - Window *pWindow = ChooseWindow(); + vcl::Window *pWindow = ChooseWindow(); struct { double mnProb; diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index ad68d451137e..8fdf1dbd5351 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -618,7 +618,7 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect, void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect, const StyleSettings& rStyleSettings, sal_uInt16 nStyle ) { - Window *const pWin = (pDev->GetOutDevType()==OUTDEV_WINDOW) ? (Window*) pDev : NULL; + vcl::Window *const pWin = (pDev->GetOutDevType()==OUTDEV_WINDOW) ? (vcl::Window*) pDev : NULL; const bool bMenuStyle = nStyle & FRAME_DRAW_MENU; @@ -1041,7 +1041,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo { Point aStart( rStart ), aStop( rStop ); const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings(); - Window *const pWin = (mpOutDev->GetOutDevType()==OUTDEV_WINDOW) ? (Window*) mpOutDev: NULL; + vcl::Window *const pWin = (mpOutDev->GetOutDevType()==OUTDEV_WINDOW) ? (vcl::Window*) mpOutDev: NULL; if(pWin) { ControlPart nPart = ( bVertical ? PART_SEPARATOR_VERT : PART_SEPARATOR_HORZ ); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 918247f9bb05..1d35780ba0f6 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -70,7 +70,7 @@ static OString ImplGetDialogText( Dialog* pDialog ) return aErrorStr.makeStringAndClear(); } -static bool ImplIsMnemonicCtrl( Window* pWindow ) +static bool ImplIsMnemonicCtrl( vcl::Window* pWindow ) { if( ! pWindow->GetSettings().GetStyleSettings().GetAutoMnemonic() ) return false; @@ -90,7 +90,7 @@ static bool ImplIsMnemonicCtrl( Window* pWindow ) //until we can be sure we can remove it if ( pWindow->GetStyle() & (WB_INFO | WB_NOLABEL) ) return false; - Window* pNextWindow = pWindow->GetWindow( WINDOW_NEXT ); + vcl::Window* pNextWindow = pWindow->GetWindow( WINDOW_NEXT ); if ( !pNextWindow ) return false; pNextWindow = pNextWindow->GetWindow( WINDOW_CLIENT ); @@ -119,9 +119,9 @@ void ImplHideSplash() //Get next window after pChild of a pTopLevel window as //if any intermediate layout widgets didn't exist -Window * nextLogicalChildOfParent(Window *pTopLevel, Window *pChild) +vcl::Window * nextLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChild) { - Window *pLastChild = pChild; + vcl::Window *pLastChild = pChild; if (isContainerWindow(*pChild)) pChild = pChild->GetWindow(WINDOW_FIRSTCHILD); @@ -130,7 +130,7 @@ Window * nextLogicalChildOfParent(Window *pTopLevel, Window *pChild) while (!pChild) { - Window *pParent = pLastChild->GetParent(); + vcl::Window *pParent = pLastChild->GetParent(); if (!pParent) return NULL; if (pParent == pTopLevel) @@ -145,9 +145,9 @@ Window * nextLogicalChildOfParent(Window *pTopLevel, Window *pChild) return pChild; } -Window * prevLogicalChildOfParent(Window *pTopLevel, Window *pChild) +vcl::Window * prevLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChild) { - Window *pLastChild = pChild; + vcl::Window *pLastChild = pChild; if (isContainerWindow(*pChild)) pChild = pChild->GetWindow(WINDOW_LASTCHILD); @@ -156,7 +156,7 @@ Window * prevLogicalChildOfParent(Window *pTopLevel, Window *pChild) while (!pChild) { - Window *pParent = pLastChild->GetParent(); + vcl::Window *pParent = pLastChild->GetParent(); if (!pParent) return NULL; if (pParent == pTopLevel) @@ -173,19 +173,19 @@ Window * prevLogicalChildOfParent(Window *pTopLevel, Window *pChild) //Get first window of a pTopLevel window as //if any intermediate layout widgets didn't exist -Window * firstLogicalChildOfParent(Window *pTopLevel) +vcl::Window * firstLogicalChildOfParent(vcl::Window *pTopLevel) { - Window *pChild = pTopLevel->GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pChild = pTopLevel->GetWindow(WINDOW_FIRSTCHILD); if (pChild && isContainerWindow(*pChild)) pChild = nextLogicalChildOfParent(pTopLevel, pChild); return pChild; } -void ImplWindowAutoMnemonic( Window* pWindow ) +void ImplWindowAutoMnemonic( vcl::Window* pWindow ) { MnemonicGenerator aMnemonicGenerator; - Window* pGetChild; - Window* pChild; + vcl::Window* pGetChild; + vcl::Window* pChild; // register the assigned mnemonics pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); @@ -199,7 +199,7 @@ void ImplWindowAutoMnemonic( Window* pWindow ) // take the Controls of the dialog into account for TabPages if ( pWindow->GetType() == WINDOW_TABPAGE ) { - Window* pParent = pWindow->GetParent(); + vcl::Window* pParent = pWindow->GetParent(); if ( pParent->GetType() == WINDOW_TABCONTROL ) pParent = pParent->GetParent(); @@ -237,8 +237,8 @@ static VclButtonBox* getActionArea(Dialog *pDialog) VclButtonBox *pButtonBox = NULL; if (pDialog->isLayoutEnabled()) { - Window *pBox = pDialog->GetWindow(WINDOW_FIRSTCHILD); - Window *pChild = pBox->GetWindow(WINDOW_LASTCHILD); + vcl::Window *pBox = pDialog->GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pChild = pBox->GetWindow(WINDOW_LASTCHILD); while (pChild) { pButtonBox = dynamic_cast<VclButtonBox*>(pChild); @@ -250,7 +250,7 @@ static VclButtonBox* getActionArea(Dialog *pDialog) return pButtonBox; } -static Window* getActionAreaButtonList(Dialog *pDialog) +static vcl::Window* getActionAreaButtonList(Dialog *pDialog) { VclButtonBox* pButtonBox = getActionArea(pDialog); if (pButtonBox) @@ -260,7 +260,7 @@ static Window* getActionAreaButtonList(Dialog *pDialog) static PushButton* ImplGetDefaultButton( Dialog* pDialog ) { - Window* pChild = getActionAreaButtonList(pDialog); + vcl::Window* pChild = getActionAreaButtonList(pDialog); while ( pChild ) { if ( pChild->ImplIsPushButton() ) @@ -278,7 +278,7 @@ static PushButton* ImplGetDefaultButton( Dialog* pDialog ) static PushButton* ImplGetOKButton( Dialog* pDialog ) { - Window* pChild = getActionAreaButtonList(pDialog); + vcl::Window* pChild = getActionAreaButtonList(pDialog); while ( pChild ) { if ( pChild->GetType() == WINDOW_OKBUTTON ) @@ -292,7 +292,7 @@ static PushButton* ImplGetOKButton( Dialog* pDialog ) static PushButton* ImplGetCancelButton( Dialog* pDialog ) { - Window* pChild = getActionAreaButtonList(pDialog); + vcl::Window* pChild = getActionAreaButtonList(pDialog); while ( pChild ) { @@ -315,7 +315,7 @@ static void ImplMouseAutoPos( Dialog* pDialog ) } else if ( nMouseOptions & MOUSE_OPTION_AUTODEFBTNPOS ) { - Window* pWindow = ImplGetDefaultButton( pDialog ); + vcl::Window* pWindow = ImplGetDefaultButton( pDialog ); if ( !pWindow ) pWindow = ImplGetOKButton( pDialog ); if ( !pWindow ) @@ -350,7 +350,7 @@ void Dialog::ImplInitDialogData() mpDialogImpl = new DialogImpl; } -void Dialog::ImplInit( Window* pParent, WinBits nStyle ) +void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle ) { sal_uInt16 nSysWinMode = Application::GetSystemWindowMode(); @@ -479,27 +479,27 @@ OUString VclBuilderContainer::getUIRootDir() //do the init. Find the real parent stashed in mpDialogParent. void Dialog::doDeferredInit(WinBits nBits) { - Window *pParent = mpDialogParent; + vcl::Window *pParent = mpDialogParent; mpDialogParent = NULL; ImplInit(pParent, nBits); mbIsDefferedInit = false; } -Dialog::Dialog(Window* pParent, const OString& rID, const OUString& rUIXMLDescription) +Dialog::Dialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription) : SystemWindow(WINDOW_DIALOG) { ImplInitDialogData(); loadUI(pParent, rID, rUIXMLDescription); } -Dialog::Dialog(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, WindowType nType) +Dialog::Dialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, WindowType nType) : SystemWindow(nType) { ImplInitDialogData(); loadUI(pParent, rID, rUIXMLDescription); } -Dialog::Dialog(Window* pParent, WinBits nStyle) +Dialog::Dialog(vcl::Window* pParent, WinBits nStyle) : SystemWindow(WINDOW_DIALOG) { ImplInitDialogData(); @@ -734,7 +734,7 @@ bool Dialog::ImplStartExecuteModal() } #ifdef DBG_UTIL - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( pParent ) { pParent = pParent->ImplGetFirstOverlapWindow(); @@ -800,7 +800,7 @@ short Dialog::Execute() #ifdef DBG_UTIL ImplDelData aParentDelData; - Window* pDialogParent = mpDialogParent; + vcl::Window* pDialogParent = mpDialogParent; if( pDialogParent ) pDialogParent->ImplAddDel( &aParentDelData ); #endif @@ -917,8 +917,8 @@ void Dialog::EndDialog( long nResult ) // the same frame parent (or NULL) if( mpPrevExecuteDlg ) { - Window* pFrameParent = ImplGetFrameWindow()->ImplGetParent(); - Window* pPrevFrameParent = mpPrevExecuteDlg->ImplGetFrameWindow()->ImplGetParent(); + vcl::Window* pFrameParent = ImplGetFrameWindow()->ImplGetParent(); + vcl::Window* pPrevFrameParent = mpPrevExecuteDlg->ImplGetFrameWindow()->ImplGetParent(); if( ( !pFrameParent && !pPrevFrameParent ) || ( pFrameParent && pPrevFrameParent && pFrameParent->ImplGetFrame() == pPrevFrameParent->ImplGetFrame() ) ) @@ -956,7 +956,7 @@ long Dialog::GetResult() const return mpDialogImpl->mnResult; } -void Dialog::EndAllDialogs( Window* pParent ) +void Dialog::EndAllDialogs( vcl::Window* pParent ) { ImplSVData* pSVData = ImplGetSVData(); Dialog* pTempModDialog; @@ -991,7 +991,7 @@ void Dialog::SetModalInputMode( bool bModal ) mpPrevExecuteDlg->EnableInput( false, true, true, this ); // determine next overlap dialog parent - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( pParent ) { // #103716# dialogs should always be modal to the whole frame window @@ -1042,7 +1042,7 @@ void Dialog::SetModalInputMode( bool bModal, bool bSubModalDialogs ) { if ( bSubModalDialogs ) { - Window* pOverlap = ImplGetFirstOverlapWindow(); + vcl::Window* pOverlap = ImplGetFirstOverlapWindow(); pOverlap = pOverlap->mpWindowImpl->mpFirstOverlap; while ( pOverlap ) { @@ -1057,7 +1057,7 @@ void Dialog::SetModalInputMode( bool bModal, bool bSubModalDialogs ) void Dialog::GrabFocusToFirstControl() { - Window* pFocusControl; + vcl::Window* pFocusControl; // find focus control, even if the dialog has focus if ( HasFocus() ) @@ -1087,7 +1087,7 @@ void Dialog::GrabFocusToFirstControl() void Dialog::GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const { - ImplBorderWindow aImplWin( (Window*)this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP ); + ImplBorderWindow aImplWin( (vcl::Window*)this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP ); aImplWin.GetBorder( rLeftBorder, rTopBorder, rRightBorder, rBottomBorder ); } @@ -1152,18 +1152,18 @@ VclBuilderContainer::~VclBuilderContainer() delete m_pUIBuilder; } -ModelessDialog::ModelessDialog(Window* pParent, const OString& rID, const OUString& rUIXMLDescription) +ModelessDialog::ModelessDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription) : Dialog(pParent, rID, rUIXMLDescription, WINDOW_MODELESSDIALOG) { } -ModalDialog::ModalDialog( Window* pParent, WinBits nStyle ) : +ModalDialog::ModalDialog( vcl::Window* pParent, WinBits nStyle ) : Dialog( WINDOW_MODALDIALOG ) { ImplInit( pParent, nStyle ); } -ModalDialog::ModalDialog( Window* pParent, const OString& rID, const OUString& rUIXMLDescription ) : +ModalDialog::ModalDialog( vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription ) : Dialog(pParent, rID, rUIXMLDescription, WINDOW_MODALDIALOG) { } diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index a11888854bca..a43247d71313 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -37,27 +37,27 @@ using namespace ::com::sun::star; -static bool ImplHasIndirectTabParent( Window* pWindow ) +static bool ImplHasIndirectTabParent( vcl::Window* pWindow ) { // The window has inderect tab parent if it is included in tab hierarchy // of the indirect parent window - Window* pNonLayoutParent = getNonLayoutParent(pWindow); + vcl::Window* pNonLayoutParent = getNonLayoutParent(pWindow); return ( pNonLayoutParent && ( pNonLayoutParent->ImplGetWindow()->GetStyle() & WB_CHILDDLGCTRL ) ); } -static Window* ImplGetTopParentOfTabHierarchy( Window* pParent ) +static vcl::Window* ImplGetTopParentOfTabHierarchy( vcl::Window* pParent ) { // The method allows to find the most close parent containing all the // window from the current tab-hierarchy // The direct parent should be provided as a parameter here - Window* pResult = pParent; + vcl::Window* pResult = pParent; if ( pResult ) { - Window* pNonLayoutParent = getNonLayoutParent(pResult); + vcl::Window* pNonLayoutParent = getNonLayoutParent(pResult); while ( pNonLayoutParent && ( pResult->ImplGetWindow()->GetStyle() & WB_CHILDDLGCTRL ) ) { pResult = pNonLayoutParent; @@ -68,13 +68,13 @@ static Window* ImplGetTopParentOfTabHierarchy( Window* pParent ) return pResult; } -static Window* ImplGetSubChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex ) +static vcl::Window* ImplGetSubChildWindow( vcl::Window* pParent, sal_uInt16 n, sal_uInt16& nIndex ) { - Window* pTabPage = NULL; - Window* pFoundWindow = NULL; + vcl::Window* pTabPage = NULL; + vcl::Window* pFoundWindow = NULL; - Window* pWindow = firstLogicalChildOfParent(pParent); - Window* pNextWindow = pWindow; + vcl::Window* pWindow = firstLogicalChildOfParent(pParent); + vcl::Window* pNextWindow = pWindow; while ( pWindow ) { pWindow = pWindow->ImplGetWindow(); @@ -102,7 +102,7 @@ static Window* ImplGetSubChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& TabPage* pTempTabPage = pTabControl->GetTabPage( pTabControl->GetCurPageId() ); if ( pTempTabPage ) { - Window* pTempWindow = pTabControl->GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window* pTempWindow = pTabControl->GetWindow( WINDOW_FIRSTCHILD ); while ( pTempWindow ) { if ( pTempWindow->ImplGetWindow() == pTempTabPage ) @@ -137,12 +137,12 @@ static Window* ImplGetSubChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& return pFoundWindow; } -Window* ImplGetChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, bool bTestEnable ) +vcl::Window* ImplGetChildWindow( vcl::Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, bool bTestEnable ) { pParent = ImplGetTopParentOfTabHierarchy( pParent ); nIndex = 0; - Window* pWindow = ImplGetSubChildWindow( pParent, n, nIndex ); + vcl::Window* pWindow = ImplGetSubChildWindow( pParent, n, nIndex ); if ( bTestEnable ) { sal_uInt16 n2 = nIndex; @@ -169,9 +169,9 @@ Window* ImplGetChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, b return pWindow; } -static Window* ImplGetNextWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, bool bTestEnable ) +static vcl::Window* ImplGetNextWindow( vcl::Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, bool bTestEnable ) { - Window* pWindow = ImplGetChildWindow( pParent, n+1, nIndex, bTestEnable ); + vcl::Window* pWindow = ImplGetChildWindow( pParent, n+1, nIndex, bTestEnable ); if ( n == nIndex ) { n = 0; @@ -180,14 +180,16 @@ static Window* ImplGetNextWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIn return pWindow; } -Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, +namespace vcl { + +vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, sal_uInt16 nFormStart, sal_uInt16 nFormEnd, sal_uInt16* pIndex ) { DBG_ASSERT( (nIndex >= nFormStart) && (nIndex <= nFormEnd), "Window::ImplGetDlgWindow() - nIndex not in Form" ); - Window* pWindow = NULL; + vcl::Window* pWindow = NULL; sal_uInt16 i; sal_uInt16 nTemp; sal_uInt16 nStartIndex; @@ -264,7 +266,7 @@ Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, { if ( pWindow->GetType() == WINDOW_TABCONTROL ) { - Window* pNextWindow = ImplGetDlgWindow( i, DLGWINDOW_NEXT ); + vcl::Window* pNextWindow = ImplGetDlgWindow( i, DLGWINDOW_NEXT ); if ( pNextWindow ) { if ( pWindow->IsChild( pNextWindow ) ) @@ -284,12 +286,14 @@ Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, return pWindow; } -Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt16& rIndex, +} /* namespace vcl */ + +vcl::Window* ImplFindDlgCtrlWindow( vcl::Window* pParent, vcl::Window* pWindow, sal_uInt16& rIndex, sal_uInt16& rFormStart, sal_uInt16& rFormEnd ) { - Window* pSWindow; - Window* pSecondWindow = NULL; - Window* pTempWindow = NULL; + vcl::Window* pSWindow; + vcl::Window* pSecondWindow = NULL; + vcl::Window* pTempWindow = NULL; sal_uInt16 i; sal_uInt16 nSecond_i = 0; sal_uInt16 nFormStart = 0; @@ -297,7 +301,7 @@ Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt16& rIn sal_uInt16 nFormEnd; // find focus window in the child list - Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, false ); + vcl::Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, false ); if( pWindow == NULL ) pWindow = pSWindow; @@ -378,7 +382,7 @@ Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt16& rIn return pSWindow; } -Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Unicode cCharCode, +vcl::Window* ImplFindAccelWindow( vcl::Window* pParent, sal_uInt16& rIndex, sal_Unicode cCharCode, sal_uInt16 nFormStart, sal_uInt16 nFormEnd, bool bCheckEnable ) { DBG_ASSERT( (rIndex >= nFormStart) && (rIndex <= nFormEnd), @@ -387,7 +391,7 @@ Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Unicode cC sal_Unicode cCompareChar; sal_uInt16 nStart = rIndex; sal_uInt16 i = rIndex; - Window* pWindow; + vcl::Window* pWindow; // MT: Where can we keep the CharClass?! static uno::Reference< i18n::XCharacterClassification > xCharClass; @@ -414,7 +418,7 @@ Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Unicode cC if (pWindow->GetType() == WINDOW_FIXEDTEXT) { FixedText *pFixedText = static_cast<FixedText*>(pWindow); - Window *pMnemonicWidget = pFixedText->get_mnemonic_widget(); + vcl::Window *pMnemonicWidget = pFixedText->get_mnemonic_widget(); SAL_WARN_IF(isContainerWindow(pFixedText->GetParent()) && !pMnemonicWidget, "vcl.a11y", "label missing mnemonic_widget?"); if (pMnemonicWidget) @@ -445,7 +449,7 @@ Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Unicode cC // get form start and end ::ImplFindDlgCtrlWindow( pWindow, NULL, nChildIndex, nChildFormStart, nChildFormEnd ); - Window* pAccelWin = ImplFindAccelWindow( pWindow, nChildIndex, cCharCode, + vcl::Window* pAccelWin = ImplFindAccelWindow( pWindow, nChildIndex, cCharCode, nChildFormStart, nChildFormEnd, bCheckEnable ); if( pAccelWin ) @@ -468,6 +472,8 @@ Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Unicode cC return NULL; } +namespace vcl { + void Window::ImplControlFocus( sal_uInt16 nFlags ) { if ( nFlags & GETFOCUS_MNEMONIC ) @@ -509,9 +515,11 @@ void Window::ImplControlFocus( sal_uInt16 nFlags ) } } +} /* namespace vcl */ + namespace { - bool isSuitableDestination(Window *pWindow) + bool isSuitableDestination(vcl::Window *pWindow) { return (pWindow && isVisibleInLayout(pWindow) && isEnabledInLayout(pWindow) && pWindow->IsInputEnabled() && @@ -531,7 +539,7 @@ namespace for (; aI != rGroup.end(); ++aI) { - Window *pWindow = *aI; + vcl::Window *pWindow = *aI; if (isSuitableDestination(pWindow)) { @@ -542,7 +550,7 @@ namespace for (aI = rGroup.begin(); aI != aStart; ++aI) { - Window *pWindow = *aI; + vcl::Window *pWindow = *aI; if (isSuitableDestination(pWindow)) { @@ -572,13 +580,15 @@ namespace } } +namespace vcl { + bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) { vcl::KeyCode aKeyCode = rKEvt.GetKeyCode(); sal_uInt16 nKeyCode = aKeyCode.GetCode(); - Window* pSWindow; - Window* pTempWindow; - Window* pButtonWindow; + vcl::Window* pSWindow; + vcl::Window* pTempWindow; + vcl::Window* pButtonWindow; sal_uInt16 i; sal_uInt16 iButton; sal_uInt16 iButtonStart; @@ -589,7 +599,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) sal_uInt16 nDlgCtrlFlags; // we cannot take over control without Focus-window - Window* pFocusWindow = Application::GetFocusWindow(); + vcl::Window* pFocusWindow = Application::GetFocusWindow(); if ( !pFocusWindow || !ImplIsWindowOrChild( pFocusWindow ) ) return false; @@ -730,11 +740,11 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) if ( aKeyCode.IsMod1() ) { // search group - Window* pFormularFirstWindow = NULL; - Window* pLastFormularFirstWindow = NULL; + vcl::Window* pFormularFirstWindow = NULL; + vcl::Window* pLastFormularFirstWindow = NULL; pTempWindow = ImplGetChildWindow( this, 0, iTemp, false ); - Window* pPrevFirstFormularFirstWindow = NULL; - Window* pFirstFormularFirstWindow = pTempWindow; + vcl::Window* pPrevFirstFormularFirstWindow = NULL; + vcl::Window* pFirstFormularFirstWindow = pTempWindow; while ( pTempWindow ) { if ( pTempWindow->ImplGetWindow()->IsDialogControlStart() ) @@ -804,7 +814,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) nType = DLGWINDOW_NEXT; nGetFocusFlags |= GETFOCUS_FORWARD; } - Window* pWindow = ImplGetDlgWindow( i, nType, nFormStart, nFormEnd, &nNewIndex ); + vcl::Window* pWindow = ImplGetDlgWindow( i, nType, nFormStart, nFormEnd, &nNewIndex ); // if this is the same window, simulate a Get/LoseFocus, // in case AROUND is being processed if ( pWindow == pSWindow ) @@ -848,7 +858,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) WinBits nStyle = pSWindow->GetStyle(); if ( !(nStyle & WB_GROUP) ) { - Window* pWindow = prevLogicalChildOfParent(this, pSWindow); + vcl::Window* pWindow = prevLogicalChildOfParent(this, pSWindow); while ( pWindow ) { pWindow = pWindow->ImplGetWindow(); @@ -876,7 +886,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) return nextInGroup(static_cast<RadioButton*>(pSWindow), false); else { - Window* pWindow = nextLogicalChildOfParent(this, pSWindow); + vcl::Window* pWindow = nextLogicalChildOfParent(this, pSWindow); while ( pWindow ) { pWindow = pWindow->ImplGetWindow(); @@ -943,7 +953,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) // checks if this window has dialog control bool Window::ImplHasDlgCtrl() { - Window* pDlgCtrlParent; + vcl::Window* pDlgCtrlParent; // lookup window for dialog control pDlgCtrlParent = ImplGetParent(); @@ -960,9 +970,9 @@ bool Window::ImplHasDlgCtrl() void Window::ImplDlgCtrlNextWindow() { - Window* pDlgCtrlParent; - Window* pDlgCtrl; - Window* pSWindow; + vcl::Window* pDlgCtrlParent; + vcl::Window* pDlgCtrl; + vcl::Window* pSWindow; sal_uInt16 nIndex; sal_uInt16 nFormStart; sal_uInt16 nFormEnd; @@ -984,17 +994,17 @@ if ( !pDlgCtrlParent || (GetStyle() & WB_NODIALOGCONTROL) || ((pDlgCtrlParent->G if ( !pSWindow ) return; - Window* pWindow = pDlgCtrlParent->ImplGetDlgWindow( nIndex, DLGWINDOW_NEXT, nFormStart, nFormEnd ); + vcl::Window* pWindow = pDlgCtrlParent->ImplGetDlgWindow( nIndex, DLGWINDOW_NEXT, nFormStart, nFormEnd ); if ( pWindow && (pWindow != pSWindow) ) pWindow->ImplControlFocus(); } -static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, +static void ImplDlgCtrlUpdateDefButton( vcl::Window* pParent, vcl::Window* pFocusWindow, bool bGetFocus ) { PushButton* pOldDefButton = NULL; PushButton* pNewDefButton = NULL; - Window* pSWindow; + vcl::Window* pSWindow; sal_uInt16 i; sal_uInt16 nFormStart; sal_uInt16 nFormEnd; @@ -1029,7 +1039,7 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, if ( !bGetFocus ) { sal_uInt16 nDummy; - Window* pNewFocusWindow = Application::GetFocusWindow(); + vcl::Window* pNewFocusWindow = Application::GetFocusWindow(); if ( !pNewFocusWindow || !pParent->ImplIsWindowOrChild( pNewFocusWindow ) ) pNewDefButton = NULL; else if ( !::ImplFindDlgCtrlWindow( pParent, pNewFocusWindow, i, nDummy, nDummy ) || @@ -1046,7 +1056,7 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, } } -void Window::ImplDlgCtrlFocusChanged( Window* pWindow, bool bGetFocus ) +void Window::ImplDlgCtrlFocusChanged( vcl::Window* pWindow, bool bGetFocus ) { if ( mpWindowImpl->mpDlgCtrlDownWindow && !bGetFocus ) { @@ -1057,7 +1067,7 @@ void Window::ImplDlgCtrlFocusChanged( Window* pWindow, bool bGetFocus ) ImplDlgCtrlUpdateDefButton( this, pWindow, bGetFocus ); } -Window* Window::ImplFindDlgCtrlWindow( Window* pWindow ) +vcl::Window* Window::ImplFindDlgCtrlWindow( vcl::Window* pWindow ) { sal_uInt16 nIndex; sal_uInt16 nFormStart; @@ -1067,31 +1077,16 @@ Window* Window::ImplFindDlgCtrlWindow( Window* pWindow ) return ::ImplFindDlgCtrlWindow( this, pWindow, nIndex, nFormStart, nFormEnd ); } -Window* Window::GetParentLabelFor( const Window* ) const +vcl::Window* Window::GetParentLabelFor( const vcl::Window* ) const { return NULL; } -Window* Window::GetParentLabeledBy( const Window* ) const +vcl::Window* Window::GetParentLabeledBy( const vcl::Window* ) const { return NULL; } -sal_Unicode getAccel( const OUString& rStr ) -{ - sal_Unicode nChar = 0; - sal_Int32 nPos = 0; - do - { - nPos = rStr.indexOf( '~', nPos ); - if( nPos != -1 && nPos < rStr.getLength() ) - nChar = rStr[ ++nPos ]; - else - nChar = 0; - } while( nChar == '~' ); - return nChar; -} - KeyEvent Window::GetActivationKey() const { KeyEvent aKeyEvent; @@ -1099,7 +1094,7 @@ KeyEvent Window::GetActivationKey() const sal_Unicode nAccel = getAccel( GetText() ); if( ! nAccel ) { - Window* pWindow = GetAccessibleRelationLabeledBy(); + vcl::Window* pWindow = GetAccessibleRelationLabeledBy(); if( pWindow ) nAccel = getAccel( pWindow->GetText() ); } @@ -1122,4 +1117,21 @@ KeyEvent Window::GetActivationKey() const return aKeyEvent; } -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +} /* namespace vcl */ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */sal_Unicode getAccel( const OUString& rStr ) +{ + sal_Unicode nChar = 0; + sal_Int32 nPos = 0; + do + { + nPos = rStr.indexOf( '~', nPos ); + if( nPos != -1 && nPos < rStr.getLength() ) + nChar = rStr[ ++nPos ]; + else + nChar = 0; + } while( nChar == '~' ); + return nChar; +} + + diff --git a/vcl/source/window/dlgctrl.hxx b/vcl/source/window/dlgctrl.hxx index 06c16b3b8076..c4ecb0ce47b2 100644 --- a/vcl/source/window/dlgctrl.hxx +++ b/vcl/source/window/dlgctrl.hxx @@ -22,12 +22,12 @@ #include <window.h> -Window* ImplGetChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, bool bTestEnable ); +vcl::Window* ImplGetChildWindow( vcl::Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, bool bTestEnable ); -Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt16& rIndex, +vcl::Window* ImplFindDlgCtrlWindow( vcl::Window* pParent, vcl::Window* pWindow, sal_uInt16& rIndex, sal_uInt16& rFormStart, sal_uInt16& rFormEnd ); -Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Unicode cCharCode, +vcl::Window* ImplFindAccelWindow( vcl::Window* pParent, sal_uInt16& rIndex, sal_Unicode cCharCode, sal_uInt16 nFormStart, sal_uInt16 nFormEnd, bool bCheckEnable = true ); sal_Unicode getAccel( const OUString& rStr ); diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx index 449af42c0bc3..e7c3732c56f6 100644 --- a/vcl/source/window/dndevdis.cxx +++ b/vcl/source/window/dndevdis.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star::datatransfer::dnd; // DNDEventDispatcher::DNDEventDispatcher -DNDEventDispatcher::DNDEventDispatcher( Window * pTopWindow ): +DNDEventDispatcher::DNDEventDispatcher( vcl::Window * pTopWindow ): m_pTopWindow( pTopWindow ), m_pCurrentWindow( NULL ) { @@ -46,7 +46,7 @@ DNDEventDispatcher::~DNDEventDispatcher() { } -Window* DNDEventDispatcher::findTopLevelWindow(Point location) +vcl::Window* DNDEventDispatcher::findTopLevelWindow(Point location) { SolarMutexGuard aSolarGuard; @@ -54,7 +54,7 @@ Window* DNDEventDispatcher::findTopLevelWindow(Point location) // because those coordinates come from outside, they must be mirrored if RTL layout is active if( Application::GetSettings().GetLayoutRTL() ) m_pTopWindow->ImplMirrorFramePos( location ); - Window * pChildWindow = m_pTopWindow->ImplFindWindow( location ); + vcl::Window * pChildWindow = m_pTopWindow->ImplFindWindow( location ); if( NULL == pChildWindow ) pChildWindow = m_pTopWindow; @@ -80,7 +80,7 @@ void SAL_CALL DNDEventDispatcher::drop( const DropTargetDropEvent& dtde ) Point location( dtde.LocationX, dtde.LocationY ); - Window* pChildWindow = findTopLevelWindow(location); + vcl::Window* pChildWindow = findTopLevelWindow(location); // handle the case that drop is in an other vcl window than the last dragOver if( pChildWindow != m_pCurrentWindow ) @@ -117,7 +117,7 @@ void SAL_CALL DNDEventDispatcher::dragEnter( const DropTargetDragEnterEvent& dtd osl::MutexGuard aImplGuard( m_aMutex ); Point location( dtdee.LocationX, dtdee.LocationY ); - Window * pChildWindow = findTopLevelWindow(location); + vcl::Window * pChildWindow = findTopLevelWindow(location); // assume pointer write operation to be atomic m_pCurrentWindow = pChildWindow; @@ -159,7 +159,7 @@ void SAL_CALL DNDEventDispatcher::dragOver( const DropTargetDragEvent& dtde ) Point location( dtde.LocationX, dtde.LocationY ); sal_Int32 nListeners; - Window * pChildWindow = findTopLevelWindow(location); + vcl::Window * pChildWindow = findTopLevelWindow(location); if( pChildWindow != m_pCurrentWindow ) { @@ -198,7 +198,7 @@ void SAL_CALL DNDEventDispatcher::dropActionChanged( const DropTargetDragEvent& Point location( dtde.LocationX, dtde.LocationY ); sal_Int32 nListeners; - Window* pChildWindow = findTopLevelWindow(location); + vcl::Window* pChildWindow = findTopLevelWindow(location); if( pChildWindow != m_pCurrentWindow ) { @@ -236,7 +236,7 @@ void SAL_CALL DNDEventDispatcher::dragGestureRecognized( const DragGestureEvent& Point origin( dge.DragOriginX, dge.DragOriginY ); - Window* pChildWindow = findTopLevelWindow(origin); + vcl::Window* pChildWindow = findTopLevelWindow(origin); fireDragGestureEvent( pChildWindow, dge.DragSource, dge.Event, origin, dge.DragAction ); } @@ -262,7 +262,7 @@ void SAL_CALL DNDEventDispatcher::rejectDrag() throw(RuntimeException, std::exce // DNDEventDispatcher::fireDragEnterEvent -sal_Int32 DNDEventDispatcher::fireDragEnterEvent( Window *pWindow, +sal_Int32 DNDEventDispatcher::fireDragEnterEvent( vcl::Window *pWindow, const Reference< XDropTargetDragContext >& xContext, const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceActions, const Sequence< DataFlavor >& aFlavorList ) @@ -296,7 +296,7 @@ sal_Int32 DNDEventDispatcher::fireDragEnterEvent( Window *pWindow, // DNDEventDispatcher::fireDragOverEvent -sal_Int32 DNDEventDispatcher::fireDragOverEvent( Window *pWindow, +sal_Int32 DNDEventDispatcher::fireDragOverEvent( vcl::Window *pWindow, const Reference< XDropTargetDragContext >& xContext, const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceActions ) @@ -327,7 +327,7 @@ sal_Int32 DNDEventDispatcher::fireDragOverEvent( Window *pWindow, // DNDEventDispatcher::fireDragExitEvent -sal_Int32 DNDEventDispatcher::fireDragExitEvent( Window *pWindow ) throw(RuntimeException) +sal_Int32 DNDEventDispatcher::fireDragExitEvent( vcl::Window *pWindow ) throw(RuntimeException) { sal_Int32 n = 0; @@ -352,7 +352,7 @@ sal_Int32 DNDEventDispatcher::fireDragExitEvent( Window *pWindow ) throw(Runtime // DNDEventDispatcher::fireDropActionChangedEvent -sal_Int32 DNDEventDispatcher::fireDropActionChangedEvent( Window *pWindow, +sal_Int32 DNDEventDispatcher::fireDropActionChangedEvent( vcl::Window *pWindow, const Reference< XDropTargetDragContext >& xContext, const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceActions ) @@ -383,7 +383,7 @@ sal_Int32 DNDEventDispatcher::fireDropActionChangedEvent( Window *pWindow, // DNDEventDispatcher::fireDropEvent -sal_Int32 DNDEventDispatcher::fireDropEvent( Window *pWindow, +sal_Int32 DNDEventDispatcher::fireDropEvent( vcl::Window *pWindow, const Reference< XDropTargetDropContext >& xContext, const sal_Int8 nDropAction, const Point& rLocation, const sal_Int8 nSourceActions, const Reference< XTransferable >& xTransferable ) @@ -426,7 +426,7 @@ sal_Int32 DNDEventDispatcher::fireDropEvent( Window *pWindow, // DNDEventDispatcher::fireDragGestureRecognized -sal_Int32 DNDEventDispatcher::fireDragGestureEvent( Window *pWindow, +sal_Int32 DNDEventDispatcher::fireDragGestureEvent( vcl::Window *pWindow, const Reference< XDragSource >& xSource, const Any event, const Point& rOrigin, const sal_Int8 nDragAction ) diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index 6cdc73e08f9c..bda794bc1631 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -59,7 +59,7 @@ static void ImplInitBackground( DockingAreaWindow* pThis ) SystemWindow *pSysWin = pThis->GetSystemWindow(); if ( pSysWin && pSysWin->GetMenuBar() ) { - Window *pMenubarWin = pSysWin->GetMenuBar()->GetWindow(); + vcl::Window *pMenubarWin = pSysWin->GetMenuBar()->GetWindow(); if ( pMenubarWin ) nMenubarHeight = pMenubarWin->GetOutputHeightPixel(); } @@ -77,7 +77,7 @@ static void ImplInitBackground( DockingAreaWindow* pThis ) pThis->SetBackground( Wallpaper( pThis->GetSettings().GetStyleSettings().GetFaceColor() ) ); } -DockingAreaWindow::DockingAreaWindow( Window* pParent ) : +DockingAreaWindow::DockingAreaWindow( vcl::Window* pParent ) : Window( WINDOW_DOCKINGAREA ) { ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, NULL ); @@ -114,7 +114,7 @@ static void ImplInvalidateMenubar( DockingAreaWindow* pThis ) SystemWindow *pSysWin = pThis->GetSystemWindow(); if( pSysWin && pSysWin->GetMenuBar() ) { - Window *pMenubarWin = pSysWin->GetMenuBar()->GetWindow(); + vcl::Window *pMenubarWin = pSysWin->GetMenuBar()->GetWindow(); if( pMenubarWin ) pMenubarWin->Invalidate(); } @@ -181,7 +181,7 @@ void DockingAreaWindow::Paint( const Rectangle& ) sal_uInt16 nChildren = GetChildCount(); for( sal_uInt16 n = 0; n < nChildren; n++ ) { - Window* pChild = GetChild( n ); + vcl::Window* pChild = GetChild( n ); if ( pChild->IsVisible() ) { Point aPos = pChild->GetPosPixel(); @@ -207,7 +207,7 @@ void DockingAreaWindow::Paint( const Rectangle& ) sal_uInt16 nChildren = GetChildCount(); for( sal_uInt16 n = 0; n < nChildren; n++ ) { - Window* pChild = GetChild( n ); + vcl::Window* pChild = GetChild( n ); Point aPos = pChild->GetPosPixel(); Size aSize = pChild->GetSizePixel(); if( IsHorizontal() ) diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 2bd4c53e80a7..fa26164a7ecb 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -53,7 +53,7 @@ private: DECL_LINK(DockTimerHdl, void *); DECL_LINK(EndDockTimerHdl, void *); public: - ImplDockFloatWin2( Window* pParent, WinBits nWinBits, + ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits, ImplDockingWindowWrapper* pDockingWin ); virtual ~ImplDockFloatWin2(); @@ -70,7 +70,7 @@ public: sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE; }; -ImplDockFloatWin2::ImplDockFloatWin2( Window* pParent, WinBits nWinBits, +ImplDockFloatWin2::ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits, ImplDockingWindowWrapper* pDockingWin ) : FloatingWindow( pParent, nWinBits ), mpDockWin( pDockingWin ), @@ -155,7 +155,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) // called during move of a floating window mnLastUserEvent = 0; - Window *pDockingArea = mpDockWin->GetWindow()->GetParent(); + vcl::Window *pDockingArea = mpDockWin->GetWindow()->GetParent(); PointerState aState = pDockingArea->GetPointerState(); bool bRealMove = true; @@ -165,7 +165,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) // we allow docking only when the window was moved // by dragging its caption // and ignore move request due to resizing - Window *pBorder = GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetWindow( WINDOW_BORDER ); if( pBorder != this ) { Point aPt; @@ -313,7 +313,7 @@ DockingManager::~DockingManager() mDockingWindows.clear(); } -ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const Window *pWindow ) +ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const vcl::Window *pWindow ) { ::std::vector< ImplDockingWindowWrapper* >::iterator p; p = mDockingWindows.begin(); @@ -327,7 +327,7 @@ ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const Window return NULL; } -bool DockingManager::IsDockable( const Window *pWindow ) +bool DockingManager::IsDockable( const vcl::Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); @@ -338,7 +338,7 @@ bool DockingManager::IsDockable( const Window *pWindow ) return (pWrapper != NULL); } -bool DockingManager::IsFloating( const Window *pWindow ) +bool DockingManager::IsFloating( const vcl::Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) @@ -347,7 +347,7 @@ bool DockingManager::IsFloating( const Window *pWindow ) return false; } -bool DockingManager::IsLocked( const Window *pWindow ) +bool DockingManager::IsLocked( const vcl::Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper && pWrapper->IsLocked() ) @@ -356,35 +356,35 @@ bool DockingManager::IsLocked( const Window *pWindow ) return false; } -void DockingManager::Lock( const Window *pWindow ) +void DockingManager::Lock( const vcl::Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) pWrapper->Lock(); } -void DockingManager::Unlock( const Window *pWindow ) +void DockingManager::Unlock( const vcl::Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) pWrapper->Unlock(); } -void DockingManager::SetFloatingMode( const Window *pWindow, bool bFloating ) +void DockingManager::SetFloatingMode( const vcl::Window *pWindow, bool bFloating ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) pWrapper->SetFloatingMode( bFloating ); } -void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWindow, sal_uLong nFlags ) +void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const vcl::Window *pWindow, sal_uLong nFlags ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) pWrapper->StartPopupMode( pParentToolBox, nFlags ); } -void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWindow ) +void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const vcl::Window *pWindow ) { StartPopupMode( pParentToolBox, pWindow, FLOATWIN_POPUPMODE_ALLOWTEAROFF | FLOATWIN_POPUPMODE_NOFOCUSCLOSE | @@ -392,7 +392,7 @@ void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWin FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE ); } -bool DockingManager::IsInPopupMode( const Window *pWindow ) +bool DockingManager::IsInPopupMode( const vcl::Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper && pWrapper->IsInPopupMode() ) @@ -401,14 +401,14 @@ bool DockingManager::IsInPopupMode( const Window *pWindow ) return false; } -void DockingManager::EndPopupMode( const Window *pWin ) +void DockingManager::EndPopupMode( const vcl::Window *pWin ) { ImplDockingWindowWrapper *pWrapper = GetDockingWindowWrapper( pWin ); if( pWrapper && pWrapper->GetFloatingWindow() && pWrapper->GetFloatingWindow()->IsInPopupMode() ) pWrapper->GetFloatingWindow()->EndPopupMode(); } -void DockingManager::AddWindow( const Window *pWindow ) +void DockingManager::AddWindow( const vcl::Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) @@ -419,7 +419,7 @@ void DockingManager::AddWindow( const Window *pWindow ) mDockingWindows.push_back( pWrapper ); } -void DockingManager::RemoveWindow( const Window *pWindow ) +void DockingManager::RemoveWindow( const vcl::Window *pWindow ) { ::std::vector< ImplDockingWindowWrapper* >::iterator p; p = mDockingWindows.begin(); @@ -436,7 +436,7 @@ void DockingManager::RemoveWindow( const Window *pWindow ) } } -void DockingManager::SetPosSizePixel( Window *pWindow, long nX, long nY, +void DockingManager::SetPosSizePixel( vcl::Window *pWindow, long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) { @@ -445,7 +445,7 @@ void DockingManager::SetPosSizePixel( Window *pWindow, long nX, long nY, pWrapper->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags ); } -Rectangle DockingManager::GetPosSizePixel( const Window *pWindow ) +Rectangle DockingManager::GetPosSizePixel( const vcl::Window *pWindow ) { Rectangle aRect; ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); @@ -487,7 +487,7 @@ private: void ImplSetBorder(); public: - ImplPopupFloatWin( Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ); + ImplPopupFloatWin( vcl::Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ); virtual ~ImplPopupFloatWin(); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible() SAL_OVERRIDE; @@ -497,7 +497,7 @@ public: virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void Tracking( const TrackingEvent& rTEvt ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; - virtual Window* GetPreferredKeyInputWindow() SAL_OVERRIDE; + virtual vcl::Window* GetPreferredKeyInputWindow() SAL_OVERRIDE; Rectangle GetDragRect() const; Point GetToolboxPosition() const; @@ -508,7 +508,7 @@ public: bool hasGrip() const { return mbHasGrip; } }; -ImplPopupFloatWin::ImplPopupFloatWin( Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ) : +ImplPopupFloatWin::ImplPopupFloatWin( vcl::Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ) : FloatingWindow( pParent, WB_NOBORDER | WB_SYSTEMWINDOW | WB_NOSHADOW) { mpWindowImpl->mbToolbarFloatingWindow = true; // indicate window type, required for accessibility @@ -539,7 +539,7 @@ ImplPopupFloatWin::~ImplPopupFloatWin() return ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >(); } -Window* ImplPopupFloatWin::GetPreferredKeyInputWindow() +vcl::Window* ImplPopupFloatWin::GetPreferredKeyInputWindow() { if( mpWindowImpl->mpClientWindow ) return mpWindowImpl->mpClientWindow; @@ -794,8 +794,8 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt ) } } -ImplDockingWindowWrapper::ImplDockingWindowWrapper( const Window *pWindow ) - : mpDockingWindow(const_cast<Window*>(pWindow)) +ImplDockingWindowWrapper::ImplDockingWindowWrapper( const vcl::Window *pWindow ) + : mpDockingWindow(const_cast<vcl::Window*>(pWindow)) , mpFloatWin(NULL) , mpOldBorderWin(NULL) , mpParent(pWindow->GetParent()) @@ -880,8 +880,8 @@ bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) mnTrackHeight += mnDockTop+mnDockBottom; } - Window *pDockingArea = GetWindow()->GetParent(); - Window::PointerState aState = pDockingArea->GetPointerState(); + vcl::Window *pDockingArea = GetWindow()->GetParent(); + vcl::Window::PointerState aState = pDockingArea->GetPointerState(); // mouse pos in screen pixels Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos ); @@ -1129,7 +1129,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, sal_uLon GetWindow()->Show( false, SHOW_NOFOCUSCHANGE ); // prepare reparenting - Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); + vcl::Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); mpOldBorderWin = GetWindow()->GetWindow( WINDOW_BORDER ); if( mpOldBorderWin == GetWindow() ) mpOldBorderWin = NULL; // no border window found @@ -1190,7 +1190,7 @@ IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd) EndPopupModeData aData( pPopupFloatWin->GetTearOffPosition(), mpFloatWin->IsPopupModeTearOff() ); // before deleting change parent back, so we can delete the floating window alone - Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); + vcl::Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); GetWindow()->mpWindowImpl->mpBorderWindow = NULL; if ( mpOldBorderWin ) { @@ -1239,7 +1239,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode ) maDockPos = GetWindow()->GetPosPixel(); - Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); + vcl::Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); mpOldBorderWin = GetWindow()->GetWindow( WINDOW_BORDER ); if( mpOldBorderWin == mpDockingWindow ) mpOldBorderWin = NULL; // no border window found @@ -1305,7 +1305,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode ) maMinOutSize = mpFloatWin->GetMinOutputSizePixel(); maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel(); - Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); //mpWindowImpl->mpRealParent; + vcl::Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); //mpWindowImpl->mpRealParent; GetWindow()->mpWindowImpl->mpBorderWindow = NULL; if ( mpOldBorderWin ) { diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 3c2a7d443dc6..4679fcc4bbae 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -40,7 +40,7 @@ public: ImplData(); ~ImplData(); - Window* mpParent; + vcl::Window* mpParent; Size maMaxOutSize; }; @@ -68,7 +68,7 @@ private: DECL_LINK(DockingHdl, void *); DECL_LINK(DockTimerHdl, void *); public: - ImplDockFloatWin( Window* pParent, WinBits nWinBits, + ImplDockFloatWin( vcl::Window* pParent, WinBits nWinBits, DockingWindow* pDockingWin ); virtual ~ImplDockFloatWin(); @@ -82,7 +82,7 @@ public: virtual bool Close() SAL_OVERRIDE; }; -ImplDockFloatWin::ImplDockFloatWin( Window* pParent, WinBits nWinBits, +ImplDockFloatWin::ImplDockFloatWin( vcl::Window* pParent, WinBits nWinBits, DockingWindow* pDockingWin ) : FloatingWindow( pParent, nWinBits ), mpDockWin( pDockingWin ), @@ -326,7 +326,7 @@ void DockingWindow::ImplInitDockingWindowData() mbHideBtn = false; } -void DockingWindow::ImplInit( Window* pParent, WinBits nStyle ) +void DockingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle ) { if ( !(nStyle & WB_NODIALOGCONTROL) ) nStyle |= WB_DIALOGCONTROL; @@ -406,14 +406,14 @@ DockingWindow::DockingWindow( WindowType nType ) : ImplInitDockingWindowData(); } -DockingWindow::DockingWindow( Window* pParent, WinBits nStyle ) : +DockingWindow::DockingWindow( vcl::Window* pParent, WinBits nStyle ) : Window( WINDOW_DOCKINGWINDOW ) { ImplInitDockingWindowData(); ImplInit( pParent, nStyle ); } -DockingWindow::DockingWindow( Window* pParent, const ResId& rResId ) : +DockingWindow::DockingWindow( vcl::Window* pParent, const ResId& rResId ) : Window( WINDOW_DOCKINGWINDOW ) { ImplInitDockingWindowData(); @@ -579,7 +579,7 @@ bool DockingWindow::Notify( NotifyEvent& rNEvt ) if( ! IsFloatingMode() || ! mpFloatWin->mpWindowImpl->mbFrame ) { Point aPos = pMEvt->GetPosPixel(); - Window* pWindow = rNEvt.GetWindow(); + vcl::Window* pWindow = rNEvt.GetWindow(); if ( pWindow != this ) { aPos = pWindow->OutputToScreenPixel( aPos ); @@ -739,7 +739,7 @@ void DockingWindow::SetFloatingMode( bool bFloatMode ) maDockPos = Window::GetPosPixel(); - Window* pRealParent = mpWindowImpl->mpRealParent; + vcl::Window* pRealParent = mpWindowImpl->mpRealParent; mpOldBorderWin = mpWindowImpl->mpBorderWindow; ImplDockFloatWin* pWin = @@ -800,7 +800,7 @@ void DockingWindow::SetFloatingMode( bool bFloatMode ) maMinOutSize = mpFloatWin->GetMinOutputSizePixel(); mpImplData->maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel(); - Window* pRealParent = mpWindowImpl->mpRealParent; + vcl::Window* pRealParent = mpWindowImpl->mpRealParent; mpWindowImpl->mpBorderWindow = NULL; if ( mpOldBorderWin ) { diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 2333af21fe46..2f900ff97266 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -30,6 +30,8 @@ #include <com/sun/star/awt/KeyModifier.hpp> #include <com/sun/star/awt/MouseButton.hpp> +namespace vcl { + void Window::DataChanged( const DataChangedEvent& ) { } @@ -39,7 +41,7 @@ void Window::NotifyAllChildren( DataChangedEvent& rDCEvt ) DataChanged( rDCEvt ); - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->NotifyAllChildren( rDCEvt ); @@ -129,7 +131,7 @@ bool Window::Notify( NotifyEvent& rNEvt ) !pWrapper->IsDocking() && bHit ) { Point aPos = pMEvt->GetPosPixel(); - Window* pWindow = rNEvt.GetWindow(); + vcl::Window* pWindow = rNEvt.GetWindow(); if ( pWindow != this ) { aPos = pWindow->OutputToScreenPixel( aPos ); @@ -179,7 +181,7 @@ bool Window::Notify( NotifyEvent& rNEvt ) !(GetStyle() & WB_TABSTOP) && !(mpWindowImpl->mnDlgCtrlFlags & WINDOW_DLGCTRL_WANTFOCUS) ) { sal_uInt16 n = 0; - Window* pFirstChild = ImplGetDlgWindow( n, DLGWINDOW_FIRST ); + vcl::Window* pFirstChild = ImplGetDlgWindow( n, DLGWINDOW_FIRST ); if ( pFirstChild ) pFirstChild->ImplControlFocus(); } @@ -225,7 +227,7 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData ) ImplRemoveDel( &aDelData ); - Window* pWindow = this; + vcl::Window* pWindow = this; while ( pWindow ) { pWindow->ImplAddDel( &aDelData ); @@ -301,14 +303,14 @@ void Window::RemoveUserEvent( ImplSVEvent * nUserEvent ) } -MouseEvent ImplTranslateMouseEvent( const MouseEvent& rE, Window* pSource, Window* pDest ) +MouseEvent ImplTranslateMouseEvent( const MouseEvent& rE, vcl::Window* pSource, vcl::Window* pDest ) { Point aPos = pSource->OutputToScreenPixel( rE.GetPosPixel() ); aPos = pDest->ScreenToOutputPixel( aPos ); return MouseEvent( aPos, rE.GetClicks(), rE.GetMode(), rE.GetButtons(), rE.GetModifier() ); } -CommandEvent ImplTranslateCommandEvent( const CommandEvent& rCEvt, Window* pSource, Window* pDest ) +CommandEvent ImplTranslateCommandEvent( const CommandEvent& rCEvt, vcl::Window* pSource, vcl::Window* pDest ) { if ( !rCEvt.IsMouseEvent() ) return rCEvt; @@ -405,7 +407,7 @@ void Window::ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt ) ImplRemoveDel( &aDelData ); // #106721# check if we're part of a compound control and notify - Window *pParent = ImplGetParent(); + vcl::Window *pParent = ImplGetParent(); while( pParent ) { if( pParent->IsCompoundControl() ) @@ -424,7 +426,7 @@ void Window::ImplCallInitShow() StateChanged( STATE_CHANGE_INITSHOW ); mpWindowImpl->mbInInitShow = false; - Window* pWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { if ( pWindow->mpWindowImpl->mbVisible ) @@ -464,7 +466,7 @@ void Window::ImplCallMove() { // update frame position SalFrame *pParentFrame = NULL; - Window *pParent = ImplGetParent(); + vcl::Window *pParent = ImplGetParent(); while( pParent ) { if( pParent->mpWindowImpl->mpFrame != mpWindowImpl->mpFrame ) @@ -485,7 +487,7 @@ void Window::ImplCallMove() // the client window and and all its subclients have the same position as the borderframe // this is important for floating toolbars where the borderwindow is a floating window // which has another borderwindow (ie the system floating window) - Window *pClientWin = mpWindowImpl->mpClientWindow; + vcl::Window *pClientWin = mpWindowImpl->mpClientWindow; while( pClientWin ) { pClientWin->mpWindowImpl->maPos = mpWindowImpl->maPos; @@ -498,12 +500,12 @@ void Window::ImplCallMove() ImplCallEventListeners( VCLEVENT_WINDOW_MOVE ); } -void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, - Window* pOldOverlapWindow ) +void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow, + vcl::Window* pOldOverlapWindow ) { ImplSVData* pSVData = ImplGetSVData(); - Window* pNewRealWindow; - Window* pOldRealWindow; + vcl::Window* pNewRealWindow; + vcl::Window* pOldRealWindow; bool bCallActivate = true; bool bCallDeactivate = true; @@ -528,7 +530,7 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, bCallActivate = false; else { - Window* pLastRealWindow = pSVData->maWinData.mpLastDeacWin->ImplGetWindow(); + vcl::Window* pLastRealWindow = pSVData->maWinData.mpLastDeacWin->ImplGetWindow(); pSVData->maWinData.mpLastDeacWin->mpWindowImpl->mbActive = false; pSVData->maWinData.mpLastDeacWin->Deactivate(); if ( pLastRealWindow != pSVData->maWinData.mpLastDeacWin ) @@ -575,4 +577,7 @@ void Window::ImplCallFocusChangeActivate( Window* pNewOverlapWindow, } } +} /* namespace vcl */ + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 718683fc883d..273dd5b2796e 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -56,7 +56,7 @@ Rectangle& FloatingWindow::ImplGetItemEdgeClipRect() return mpImplData->maItemEdgeClipRect; } -void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) +void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle ) { mpImplData = new ImplData; @@ -146,13 +146,13 @@ void FloatingWindow::ImplInitSettings() SetBackground( aColor ); } -FloatingWindow::FloatingWindow( Window* pParent, WinBits nStyle ) : +FloatingWindow::FloatingWindow( vcl::Window* pParent, WinBits nStyle ) : SystemWindow( WINDOW_FLOATINGWINDOW ) { ImplInit( pParent, nStyle ); } -FloatingWindow::FloatingWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame) +FloatingWindow::FloatingWindow(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame) : SystemWindow(WINDOW_FLOATINGWINDOW) { loadUI(pParent, rID, rUIXMLDescription, rFrame); @@ -161,7 +161,7 @@ FloatingWindow::FloatingWindow(Window* pParent, const OString& rID, const OUStri //Find the real parent stashed in mpDialogParent. void FloatingWindow::doDeferredInit(WinBits nBits) { - Window *pParent = mpDialogParent; + vcl::Window *pParent = mpDialogParent; mpDialogParent = NULL; ImplInit(pParent, nBits); mbIsDefferedInit = false; @@ -183,12 +183,12 @@ FloatingWindow::~FloatingWindow() delete mpImplData; } -Point FloatingWindow::CalcFloatingPosition( Window* pWindow, const Rectangle& rRect, sal_uLong nFlags, sal_uInt16& rArrangeIndex ) +Point FloatingWindow::CalcFloatingPosition( vcl::Window* pWindow, const Rectangle& rRect, sal_uLong nFlags, sal_uInt16& rArrangeIndex ) { return ImplCalcPos( pWindow, rRect, nFlags, rArrangeIndex ); } -Point FloatingWindow::ImplCalcPos( Window* pWindow, +Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow, const Rectangle& rRect, sal_uLong nFlags, sal_uInt16& rArrangeIndex ) { @@ -199,7 +199,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, FloatingWindow *pFloatingWindow = dynamic_cast<FloatingWindow*>( pWindow ); // convert.... - Window* pW = pWindow; + vcl::Window* pW = pWindow; if ( pW->mpWindowImpl->mpRealParent ) pW = pW->mpWindowImpl->mpRealParent; @@ -399,7 +399,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, return pW->OutputToScreenPixel( aPos ); } -FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Point& rPos, HitTest& rHitTest ) +FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const Point& rPos, HitTest& rHitTest ) { FloatingWindow* pWin = this; @@ -427,7 +427,7 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( Window* pReference, const Poin // compute the floating window's size in absolute screen coordinates // use the border window to have the exact position - Window *pBorderWin = pWin->GetWindow( WINDOW_BORDER ); + vcl::Window *pBorderWin = pWin->GetWindow( WINDOW_BORDER ); Point aPt; // the top-left corner in output coordinates ie (0,0) Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( Rectangle( aPt, pBorderWin->GetSizePixel()) ) ) ; @@ -472,7 +472,7 @@ FloatingWindow* FloatingWindow::ImplFindLastLevelFloat() return pLastFoundWin; } -bool FloatingWindow::ImplIsFloatPopupModeWindow( const Window* pWindow ) +bool FloatingWindow::ImplIsFloatPopupModeWindow( const vcl::Window* pWindow ) { FloatingWindow* pWin = this; @@ -621,7 +621,7 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags ) // !!! rRect is expected to be in screen coordinates of the parent frame window !!! maFloatRect = rRect; - Window *pReference = GetParent(); + vcl::Window *pReference = GetParent(); const OutputDevice *pParentWinOutDev = pReference->GetOutDev(); // compare coordinates in absolute screen coordinates @@ -787,7 +787,7 @@ void FloatingWindow::EndPopupMode( sal_uInt16 nFlags ) ImplEndPopupMode( nFlags ); } -void FloatingWindow::AddPopupModeWindow( Window* pWindow ) +void FloatingWindow::AddPopupModeWindow( vcl::Window* pWindow ) { // !!! up-to-now only 1 window and not yet a list mpFirstPopupModeWin = pWindow; diff --git a/vcl/source/window/globalization.cxx b/vcl/source/window/globalization.cxx index 21658970b390..59081a2a48d3 100644 --- a/vcl/source/window/globalization.cxx +++ b/vcl/source/window/globalization.cxx @@ -20,6 +20,8 @@ #include <vcl/window.hxx> #include <vcl/outdev.hxx> +namespace vcl { + void Window::EnableRTL ( bool bEnable ) { StateChanged( STATE_CHANGE_MIRRORING ); @@ -32,4 +34,6 @@ bool Window::HasMirroredGraphics() const return pOutDev->OutputDevice::HasMirroredGraphics(); } +} /* namespace vcl */ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx index dd111f66de35..afe7c0d073e3 100644 --- a/vcl/source/window/keycod.cxx +++ b/vcl/source/window/keycod.cxx @@ -101,7 +101,7 @@ vcl::KeyCode::KeyCode( const ResId& rResId ) } } -OUString vcl::KeyCode::GetName( Window* pWindow ) const +OUString vcl::KeyCode::GetName( vcl::Window* pWindow ) const { if ( !pWindow ) pWindow = ImplGetDefaultWindow(); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index b5cd7a57dd85..9eb085be783b 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -15,7 +15,7 @@ #include <vcl/settings.hxx> #include "window.h" -VclContainer::VclContainer(Window *pParent, WinBits nStyle) +VclContainer::VclContainer(vcl::Window *pParent, WinBits nStyle) : Window(WINDOW_CONTAINER) , m_bLayoutDirty(true) { @@ -35,7 +35,7 @@ Size VclContainer::GetOptimalSize() const return calculateRequisition(); } -void VclContainer::setLayoutPosSize(Window &rWindow, const Point &rPos, const Size &rSize) +void VclContainer::setLayoutPosSize(vcl::Window &rWindow, const Point &rPos, const Size &rSize) { sal_Int32 nBorderWidth = rWindow.get_border_width(); sal_Int32 nLeft = rWindow.get_margin_left() + nBorderWidth; @@ -47,7 +47,7 @@ void VclContainer::setLayoutPosSize(Window &rWindow, const Point &rPos, const Si rWindow.SetPosSizePixel(aPos, aSize); } -void VclContainer::setLayoutAllocation(Window &rChild, const Point &rAllocPos, const Size &rChildAlloc) +void VclContainer::setLayoutAllocation(vcl::Window &rChild, const Point &rAllocPos, const Size &rChildAlloc) { VclAlign eHalign = rChild.get_halign(); VclAlign eValign = rChild.get_valign(); @@ -108,7 +108,7 @@ void VclContainer::setLayoutAllocation(Window &rChild, const Point &rAllocPos, c setLayoutPosSize(rChild, aChildPos, aChildSize); } -Size VclContainer::getLayoutRequisition(const Window &rWindow) +Size VclContainer::getLayoutRequisition(const vcl::Window &rWindow) { sal_Int32 nBorderWidth = rWindow.get_border_width(); sal_Int32 nLeft = rWindow.get_margin_left() + nBorderWidth; @@ -182,7 +182,7 @@ Size VclBox::calculateRequisition() const sal_uInt16 nVisibleChildren = 0; Size aSize; - for (Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { if (!pChild->IsVisible()) continue; @@ -202,7 +202,7 @@ Size VclBox::calculateRequisition() const void VclBox::setAllocation(const Size &rAllocation) { sal_uInt16 nVisibleChildren = 0, nExpandChildren = 0; - for (Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { if (!pChild->IsVisible()) continue; @@ -230,8 +230,8 @@ void VclBox::setAllocation(const Size &rAllocation) } //Split into those we pack from the start onwards, and those we pack from the end backwards - std::vector<Window*> aWindows[2]; - for (Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + std::vector<vcl::Window*> aWindows[2]; + for (vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { if (!pChild->IsVisible()) continue; @@ -254,9 +254,9 @@ void VclBox::setAllocation(const Size &rAllocation) setPrimaryCoordinate(aPos, nPrimaryCoordinate + nAllocPrimaryDimension); } - for (std::vector<Window*>::iterator aI = aWindows[ePackType].begin(), aEnd = aWindows[ePackType].end(); aI != aEnd; ++aI) + for (std::vector<vcl::Window*>::iterator aI = aWindows[ePackType].begin(), aEnd = aWindows[ePackType].end(); aI != aEnd; ++aI) { - Window *pChild = *aI; + vcl::Window *pChild = *aI; long nPadding = pChild->get_padding(); @@ -427,7 +427,7 @@ VclButtonBox::Requisition VclButtonBox::calculatePrimarySecondaryRequisitions() std::vector<long> aSubGroupSizes; std::vector<bool> aSubGroupNonHomogeneous; - for (const Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + for (const vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { if (!pChild->IsVisible()) continue; @@ -621,7 +621,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation) std::vector<long>::const_iterator aPrimaryI = aReq.m_aMainGroupDimensions.begin(); std::vector<long>::const_iterator aSecondaryI = aReq.m_aSubGroupDimensions.begin(); bool bIgnoreSecondaryPacking = (m_eLayoutStyle == VCL_BUTTONBOX_SPREAD || m_eLayoutStyle == VCL_BUTTONBOX_CENTER); - for (Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { if (!pChild->IsVisible()) continue; @@ -690,7 +690,7 @@ static int getButtonPriority(const OString &rType) } class sortButtons - : public std::binary_function<const Window*, const Window*, bool> + : public std::binary_function<const vcl::Window*, const vcl::Window*, bool> { bool m_bVerticalContainer; public: @@ -698,10 +698,10 @@ public: : m_bVerticalContainer(bVerticalContainer) { } - bool operator()(const Window *pA, const Window *pB) const; + bool operator()(const vcl::Window *pA, const vcl::Window *pB) const; }; -bool sortButtons::operator()(const Window *pA, const Window *pB) const +bool sortButtons::operator()(const vcl::Window *pA, const vcl::Window *pB) const { //sort into two groups of pack start and pack end VclPackType ePackA = pA->get_pack_type(); @@ -735,8 +735,8 @@ bool sortButtons::operator()(const Window *pA, const Window *pB) const void VclButtonBox::sort_native_button_order() { - std::vector<Window*> aChilds; - for (Window* pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; + std::vector<vcl::Window*> aChilds; + for (vcl::Window* pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { aChilds.push_back(pChild); @@ -752,7 +752,7 @@ VclGrid::array_type VclGrid::assembleGrid() const { ext_array_type A; - for (Window* pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; + for (vcl::Window* pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { sal_Int32 nLeftAttach = pChild->get_grid_left_attach(); @@ -802,7 +802,7 @@ VclGrid::array_type VclGrid::assembleGrid() const for (sal_Int32 y = 0; y < nMaxY; ++y) { const GridEntry &rEntry = A[x][y]; - const Window *pChild = rEntry.pChild; + const vcl::Window *pChild = rEntry.pChild; if (pChild && pChild->IsVisible()) { aNonEmptyCols[x] = true; @@ -929,7 +929,7 @@ void VclGrid::calcMaxs(const array_type &A, std::vector<Value> &rWidths, std::ve for (sal_Int32 y = 0; y < nMaxY; ++y) { const GridEntry &rEntry = A[x][y]; - const Window *pChild = rEntry.pChild; + const vcl::Window *pChild = rEntry.pChild; if (!pChild || !pChild->IsVisible()) continue; @@ -960,7 +960,7 @@ void VclGrid::calcMaxs(const array_type &A, std::vector<Value> &rWidths, std::ve for (sal_Int32 y = 0; y < nMaxY; ++y) { const GridEntry &rEntry = A[x][y]; - const Window *pChild = rEntry.pChild; + const vcl::Window *pChild = rEntry.pChild; if (!pChild || !pChild->IsVisible()) continue; @@ -1205,7 +1205,7 @@ void VclGrid::setAllocation(const Size& rAllocation) for (sal_Int32 y = 0; y < nMaxY; ++y) { GridEntry &rEntry = A[x][y]; - Window *pChild = rEntry.pChild; + vcl::Window *pChild = rEntry.pChild; if (pChild) { Size aChildAlloc(0, 0); @@ -1251,7 +1251,7 @@ bool VclGrid::set_property(const OString &rKey, const OString &rValue) return true; } -void setGridAttach(Window &rWidget, sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nWidth, sal_Int32 nHeight) +void setGridAttach(vcl::Window &rWidget, sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nWidth, sal_Int32 nHeight) { rWidget.set_grid_left_attach(nLeft); rWidget.set_grid_top_attach(nTop); @@ -1259,21 +1259,21 @@ void setGridAttach(Window &rWidget, sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 n rWidget.set_grid_height(nHeight); } -const Window *VclBin::get_child() const +const vcl::Window *VclBin::get_child() const { const WindowImpl* pWindowImpl = ImplGetWindowImpl(); return pWindowImpl->mpFirstChild; } -Window *VclBin::get_child() +vcl::Window *VclBin::get_child() { - return const_cast<Window*>(const_cast<const VclBin*>(this)->get_child()); + return const_cast<vcl::Window*>(const_cast<const VclBin*>(this)->get_child()); } Size VclBin::calculateRequisition() const { - const Window *pChild = get_child(); + const vcl::Window *pChild = get_child(); if (pChild && pChild->IsVisible()) return getLayoutRequisition(*pChild); return Size(0, 0); @@ -1281,7 +1281,7 @@ Size VclBin::calculateRequisition() const void VclBin::setAllocation(const Size &rAllocation) { - Window *pChild = get_child(); + vcl::Window *pChild = get_child(); if (pChild && pChild->IsVisible()) setLayoutAllocation(*pChild, Point(0, 0), rAllocation); } @@ -1292,8 +1292,8 @@ Size VclFrame::calculateRequisition() const { Size aRet(0, 0); - const Window *pChild = get_child(); - const Window *pLabel = get_label_widget(); + const vcl::Window *pChild = get_child(); + const vcl::Window *pLabel = get_label_widget(); if (pChild && pChild->IsVisible()) aRet = getLayoutRequisition(*pChild); @@ -1323,8 +1323,8 @@ void VclFrame::setAllocation(const Size &rAllocation) rAllocation.Height() - rFrameStyle.top - rFrameStyle.bottom); Point aChildPos(rFrameStyle.left, rFrameStyle.top); - Window *pChild = get_child(); - Window *pLabel = get_label_widget(); + vcl::Window *pChild = get_child(); + vcl::Window *pLabel = get_label_widget(); if (pLabel && pLabel->IsVisible()) { @@ -1340,13 +1340,13 @@ void VclFrame::setAllocation(const Size &rAllocation) setLayoutAllocation(*pChild, aChildPos, aAllocation); } -void VclFrame::designate_label(Window *pWindow) +void VclFrame::designate_label(vcl::Window *pWindow) { assert(pWindow->GetParent() == this); m_pLabel = pWindow; } -const Window *VclFrame::get_label_widget() const +const vcl::Window *VclFrame::get_label_widget() const { assert(GetChildCount() == 2); if (m_pLabel) @@ -1358,12 +1358,12 @@ const Window *VclFrame::get_label_widget() const return pWindowImpl->mpFirstChild; } -Window *VclFrame::get_label_widget() +vcl::Window *VclFrame::get_label_widget() { - return const_cast<Window*>(const_cast<const VclFrame*>(this)->get_label_widget()); + return const_cast<vcl::Window*>(const_cast<const VclFrame*>(this)->get_label_widget()); } -const Window *VclFrame::get_child() const +const vcl::Window *VclFrame::get_child() const { assert(GetChildCount() == 2); //The child widget is the normally the last (of two) children @@ -1375,28 +1375,28 @@ const Window *VclFrame::get_child() const return pWindowImpl->mpLastChild; } -Window *VclFrame::get_child() +vcl::Window *VclFrame::get_child() { - return const_cast<Window*>(const_cast<const VclFrame*>(this)->get_child()); + return const_cast<vcl::Window*>(const_cast<const VclFrame*>(this)->get_child()); } void VclFrame::set_label(const OUString &rLabel) { - Window *pLabel = get_label_widget(); + vcl::Window *pLabel = get_label_widget(); assert(pLabel); pLabel->SetText(rLabel); } OUString VclFrame::get_label() const { - const Window *pLabel = get_label_widget(); + const vcl::Window *pLabel = get_label_widget(); assert(pLabel); return pLabel->GetText(); } OUString VclFrame::getDefaultAccessibleName() const { - const Window *pLabel = get_label_widget(); + const vcl::Window *pLabel = get_label_widget(); if (pLabel) return pLabel->GetAccessibleName(); return VclBin::getDefaultAccessibleName(); @@ -1407,7 +1407,7 @@ Size VclAlignment::calculateRequisition() const Size aRet(m_nLeftPadding + m_nRightPadding, m_nTopPadding + m_nBottomPadding); - const Window *pChild = get_child(); + const vcl::Window *pChild = get_child(); if (pChild && pChild->IsVisible()) { Size aChildSize = getLayoutRequisition(*pChild); @@ -1420,7 +1420,7 @@ Size VclAlignment::calculateRequisition() const void VclAlignment::setAllocation(const Size &rAllocation) { - Window *pChild = get_child(); + vcl::Window *pChild = get_child(); if (!pChild || !pChild->IsVisible()) return; @@ -1456,7 +1456,7 @@ bool VclAlignment::set_property(const OString &rKey, const OString &rValue) return true; } -const Window *VclExpander::get_child() const +const vcl::Window *VclExpander::get_child() const { const WindowImpl* pWindowImpl = ImplGetWindowImpl(); @@ -1465,9 +1465,9 @@ const Window *VclExpander::get_child() const return pWindowImpl->mpFirstChild->GetWindow(WINDOW_NEXT); } -Window *VclExpander::get_child() +vcl::Window *VclExpander::get_child() { - return const_cast<Window*>(const_cast<const VclExpander*>(this)->get_child()); + return const_cast<vcl::Window*>(const_cast<const VclExpander*>(this)->get_child()); } Size VclExpander::calculateRequisition() const @@ -1476,8 +1476,8 @@ Size VclExpander::calculateRequisition() const WindowImpl* pWindowImpl = ImplGetWindowImpl(); - const Window *pChild = get_child(); - const Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild : NULL; + const vcl::Window *pChild = get_child(); + const vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild : NULL; if (pChild && pChild->IsVisible() && m_aDisclosureButton.IsChecked()) aRet = getLayoutRequisition(*pChild); @@ -1513,8 +1513,8 @@ void VclExpander::setAllocation(const Size &rAllocation) WindowImpl* pWindowImpl = ImplGetWindowImpl(); //The label widget is the last (of two) children - Window *pChild = get_child(); - Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild : NULL; + vcl::Window *pChild = get_child(); + vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild : NULL; Size aButtonSize = getLayoutRequisition(m_aDisclosureButton); Size aLabelSize; @@ -1575,7 +1575,7 @@ void VclExpander::StateChanged(StateChangedType nType) if (nType == STATE_CHANGE_INITSHOW) { - Window *pChild = get_child(); + vcl::Window *pChild = get_child(); if (pChild) pChild->Show(m_aDisclosureButton.IsChecked()); } @@ -1583,7 +1583,7 @@ void VclExpander::StateChanged(StateChangedType nType) IMPL_LINK( VclExpander, ClickHdl, DisclosureButton*, pBtn ) { - Window *pChild = get_child(); + vcl::Window *pChild = get_child(); if (pChild) { pChild->Show(pBtn->IsChecked()); @@ -1596,7 +1596,7 @@ IMPL_LINK( VclExpander, ClickHdl, DisclosureButton*, pBtn ) return 0; } -VclScrolledWindow::VclScrolledWindow(Window *pParent, WinBits nStyle) +VclScrolledWindow::VclScrolledWindow(vcl::Window *pParent, WinBits nStyle) : VclBin(pParent, nStyle) , m_bUserManagedScrolling(false) , m_aVScroll(this, WB_HIDE | WB_VERT) @@ -1612,7 +1612,7 @@ VclScrolledWindow::VclScrolledWindow(Window *pParent, WinBits nStyle) IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl) { - Window *pChild = get_child(); + vcl::Window *pChild = get_child(); if (!pChild) return 1; @@ -1640,23 +1640,23 @@ IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl) return 1; } -const Window *VclScrolledWindow::get_child() const +const vcl::Window *VclScrolledWindow::get_child() const { assert(GetChildCount() == 4); const WindowImpl* pWindowImpl = ImplGetWindowImpl(); return pWindowImpl->mpLastChild; } -Window *VclScrolledWindow::get_child() +vcl::Window *VclScrolledWindow::get_child() { - return const_cast<Window*>(const_cast<const VclScrolledWindow*>(this)->get_child()); + return const_cast<vcl::Window*>(const_cast<const VclScrolledWindow*>(this)->get_child()); } Size VclScrolledWindow::calculateRequisition() const { Size aRet(0, 0); - const Window *pChild = get_child(); + const vcl::Window *pChild = get_child(); if (pChild && pChild->IsVisible()) aRet = getLayoutRequisition(*pChild); @@ -1671,7 +1671,7 @@ Size VclScrolledWindow::calculateRequisition() const void VclScrolledWindow::InitScrollBars(const Size &rRequest) { - const Window *pChild = get_child(); + const vcl::Window *pChild = get_child(); if (!pChild || !pChild->IsVisible()) return; @@ -1697,7 +1697,7 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation) Size aChildAllocation(rAllocation); Size aChildReq; - Window *pChild = get_child(); + vcl::Window *pChild = get_child(); if (pChild && pChild->IsVisible()) aChildReq = getLayoutRequisition(*pChild); @@ -1810,7 +1810,7 @@ bool VclScrolledWindow::Notify(NotifyEvent& rNEvt) void VclViewport::setAllocation(const Size &rAllocation) { - Window *pChild = get_child(); + vcl::Window *pChild = get_child(); if (pChild && pChild->IsVisible()) { Size aReq(getLayoutRequisition(*pChild)); @@ -1820,7 +1820,7 @@ void VclViewport::setAllocation(const Size &rAllocation) } } -const Window *VclEventBox::get_child() const +const vcl::Window *VclEventBox::get_child() const { const WindowImpl* pWindowImpl = ImplGetWindowImpl(); @@ -1829,15 +1829,15 @@ const Window *VclEventBox::get_child() const return pWindowImpl->mpFirstChild->GetWindow(WINDOW_NEXT); } -Window *VclEventBox::get_child() +vcl::Window *VclEventBox::get_child() { - return const_cast<Window*>(const_cast<const VclEventBox*>(this)->get_child()); + return const_cast<vcl::Window*>(const_cast<const VclEventBox*>(this)->get_child()); } void VclEventBox::setAllocation(const Size& rAllocation) { Point aChildPos(0, 0); - for (Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { if (!pChild->IsVisible()) continue; @@ -1849,7 +1849,7 @@ Size VclEventBox::calculateRequisition() const { Size aRet(0, 0); - for (const Window* pChild = get_child(); pChild; + for (const vcl::Window* pChild = get_child(); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { if (!pChild->IsVisible()) @@ -1872,7 +1872,7 @@ void VclSizeGroup::trigger_queue_resize() //sufficient to trigger one widget to trigger all of them if (!m_aWindows.empty()) { - Window *pWindow = *m_aWindows.begin(); + vcl::Window *pWindow = *m_aWindows.begin(); pWindow->queue_resize(); } } @@ -1936,7 +1936,7 @@ void MessageDialog::create_owned_areas() m_pOwnedActionArea->Show(); } -MessageDialog::MessageDialog(Window* pParent, WinBits nStyle) +MessageDialog::MessageDialog(vcl::Window* pParent, WinBits nStyle) : Dialog(pParent, nStyle) , m_eButtonsType(VCL_BUTTONS_NONE) , m_eMessageType(VCL_MESSAGE_INFO) @@ -1948,7 +1948,7 @@ MessageDialog::MessageDialog(Window* pParent, WinBits nStyle) SetType(WINDOW_MESSBOX); } -MessageDialog::MessageDialog(Window* pParent, +MessageDialog::MessageDialog(vcl::Window* pParent, const OUString &rMessage, VclMessageType eMessageType, VclButtonsType eButtonsType, @@ -1966,7 +1966,7 @@ MessageDialog::MessageDialog(Window* pParent, create_owned_areas(); } -MessageDialog::MessageDialog(Window* pParent, const OString& rID, const OUString& rUIXMLDescription) +MessageDialog::MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription) : Dialog(pParent, rID, rUIXMLDescription, WINDOW_MESSBOX) , m_eButtonsType(VCL_BUTTONS_NONE) , m_eMessageType(VCL_MESSAGE_INFO) @@ -2002,9 +2002,9 @@ IMPL_LINK(MessageDialog, ButtonHdl, Button *, pButton) return 0; } -short MessageDialog::get_response(const Window *pWindow) const +short MessageDialog::get_response(const vcl::Window *pWindow) const { - std::map<const Window*, short>::const_iterator aFind = m_aResponses.find(pWindow); + std::map<const vcl::Window*, short>::const_iterator aFind = m_aResponses.find(pWindow); if (aFind != m_aResponses.end()) return aFind->second; if (!m_pUIBuilder) @@ -2015,7 +2015,7 @@ short MessageDialog::get_response(const Window *pWindow) const void MessageDialog::setButtonHandlers(VclButtonBox *pButtonBox) { assert(pButtonBox); - for (Window* pChild = pButtonBox->GetWindow(WINDOW_FIRSTCHILD); pChild; + for (vcl::Window* pChild = pButtonBox->GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { switch (pChild->GetType()) @@ -2051,7 +2051,7 @@ void MessageDialog::setButtonHandlers(VclButtonBox *pButtonBox) } } -void MessageDialog::SetMessagesWidths(Window *pParent, +void MessageDialog::SetMessagesWidths(vcl::Window *pParent, VclMultiLineEdit *pPrimaryMessage, VclMultiLineEdit *pSecondaryMessage) { if (pSecondaryMessage) @@ -2273,11 +2273,11 @@ void MessageDialog::set_secondary_text(const OUString &rSecondaryString) } } -Size getLegacyBestSizeForChildren(const Window &rWindow) +Size getLegacyBestSizeForChildren(const vcl::Window &rWindow) { Rectangle aBounds; - for (const Window* pChild = rWindow.GetWindow(WINDOW_FIRSTCHILD); pChild; + for (const vcl::Window* pChild = rWindow.GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) { if (!pChild->IsVisible()) @@ -2298,7 +2298,7 @@ Size getLegacyBestSizeForChildren(const Window &rWindow) return aRet; } -Window* getNonLayoutParent(Window *pWindow) +vcl::Window* getNonLayoutParent(vcl::Window *pWindow) { while (pWindow) { @@ -2309,7 +2309,7 @@ Window* getNonLayoutParent(Window *pWindow) return pWindow; } -Window* getNonLayoutRealParent(Window *pWindow) +vcl::Window* getNonLayoutRealParent(vcl::Window *pWindow) { while (pWindow) { @@ -2320,7 +2320,7 @@ Window* getNonLayoutRealParent(Window *pWindow) return pWindow; } -bool isVisibleInLayout(const Window *pWindow) +bool isVisibleInLayout(const vcl::Window *pWindow) { bool bVisible = true; while (bVisible) @@ -2333,7 +2333,7 @@ bool isVisibleInLayout(const Window *pWindow) return bVisible; } -bool isEnabledInLayout(const Window *pWindow) +bool isEnabledInLayout(const vcl::Window *pWindow) { bool bEnabled = true; while (bEnabled) @@ -2346,14 +2346,14 @@ bool isEnabledInLayout(const Window *pWindow) return bEnabled; } -bool isLayoutEnabled(const Window *pWindow) +bool isLayoutEnabled(const vcl::Window *pWindow) { //Child is a container => we're layout enabled - const Window *pChild = pWindow ? pWindow->GetWindow(WINDOW_FIRSTCHILD) : NULL; + const vcl::Window *pChild = pWindow ? pWindow->GetWindow(WINDOW_FIRSTCHILD) : NULL; return pChild && isContainerWindow(*pChild) && !pChild->GetWindow(WINDOW_NEXT); } -bool isInitialLayout(const Window *pWindow) +bool isInitialLayout(const vcl::Window *pWindow) { Dialog *pParentDialog = pWindow ? pWindow->GetParentDialog() : NULL; return pParentDialog && pParentDialog->isCalculatingInitialLayoutSize(); diff --git a/vcl/source/window/legacyaccessibility.cxx b/vcl/source/window/legacyaccessibility.cxx index 5dc37d1846f0..9d01dd56d856 100644 --- a/vcl/source/window/legacyaccessibility.cxx +++ b/vcl/source/window/legacyaccessibility.cxx @@ -38,9 +38,9 @@ using namespace ::com::sun::star; -static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window* pLabel, sal_Unicode nAccel ) +static vcl::Window* ImplGetLabelFor( vcl::Window* pFrameWindow, WindowType nMyType, vcl::Window* pLabel, sal_Unicode nAccel ) { - Window* pWindow = NULL; + vcl::Window* pWindow = NULL; if( nMyType == WINDOW_FIXEDTEXT || nMyType == WINDOW_FIXEDLINE || @@ -73,7 +73,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window while( nIndex < nFormEnd ) { nIndex++; - Window* pSWindow = ::ImplGetChildWindow( pFrameWindow, + vcl::Window* pSWindow = ::ImplGetChildWindow( pFrameWindow, nIndex, nIndex, false ); @@ -99,6 +99,8 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window return pWindow; } +namespace vcl { + Window* Window::getLegacyNonLayoutAccessibleRelationLabelFor() const { Window* pWindow = NULL; @@ -264,4 +266,6 @@ Window* Window::getLegacyNonLayoutAccessibleRelationMemberOf() const return pWindow; } +} /* namespace vcl */ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 179d9792b687..236929a5d82b 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -387,7 +387,7 @@ void Menu::InsertItem(sal_uInt16 nItemId, const OUString& rStr, MenuItemBits nIt if( ImplGetSalMenu() && pData->pSalMenuItem ) ImplGetSalMenu()->InsertItem( pData->pSalMenuItem, nPos ); - Window* pWin = ImplGetWindow(); + vcl::Window* pWin = ImplGetWindow(); delete mpLayoutData, mpLayoutData = NULL; if ( pWin ) { @@ -556,7 +556,7 @@ void Menu::RemoveItem( sal_uInt16 nPos ) bRemove = true; } - Window* pWin = ImplGetWindow(); + vcl::Window* pWin = ImplGetWindow(); if ( pWin ) { ImplCalcSize( pWin ); @@ -949,7 +949,7 @@ void Menu::EnableItem( sal_uInt16 nItemId, bool bEnable ) { pItemData->bEnabled = bEnable; - Window* pWin = ImplGetWindow(); + vcl::Window* pWin = ImplGetWindow(); if ( pWin && pWin->IsVisible() ) { DBG_ASSERT(IsMenuBar(), "Menu::EnableItem - Popup visible!" ); @@ -993,7 +993,7 @@ void Menu::ShowItem( sal_uInt16 nItemId, bool bVisible ) DBG_ASSERT(!IsMenuBar(), "Menu::ShowItem - ignored for menu bar entries!"); if (!IsMenuBar()&& pData && (pData->bVisible != bVisible)) { - Window* pWin = ImplGetWindow(); + vcl::Window* pWin = ImplGetWindow(); if ( pWin && pWin->IsVisible() ) { DBG_ASSERT( false, "Menu::ShowItem - ignored for visible popups!" ); @@ -1023,7 +1023,7 @@ void Menu::SetItemText( sal_uInt16 nItemId, const OUString& rStr ) if( ImplGetSalMenu() && pData->pSalMenuItem ) ImplGetSalMenu()->SetItemText( nPos, pData->pSalMenuItem, rStr ); - Window* pWin = ImplGetWindow(); + vcl::Window* pWin = ImplGetWindow(); delete mpLayoutData, mpLayoutData = NULL; if (pWin && IsMenuBar()) { @@ -1389,7 +1389,7 @@ void Menu::SetAccessible( const ::com::sun::star::uno::Reference< ::com::sun::st mxAccessible = rxAccessible; } -Size Menu::ImplGetNativeCheckAndRadioSize( const Window* pWin, long& rCheckHeight, long& rRadioHeight ) const +Size Menu::ImplGetNativeCheckAndRadioSize( const vcl::Window* pWin, long& rCheckHeight, long& rRadioHeight ) const { long nCheckWidth = 0, nRadioWidth = 0; rCheckHeight = rRadioHeight = 0; @@ -1437,7 +1437,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize( const Window* pWin, long& rCheckHeigh return Size(std::max(nCheckWidth, nRadioWidth), std::max(rCheckHeight, rRadioHeight)); } -bool Menu::ImplGetNativeSubmenuArrowSize( Window* pWin, Size& rArrowSize, long& rArrowSpacing ) const +bool Menu::ImplGetNativeSubmenuArrowSize( vcl::Window* pWin, Size& rArrowSize, long& rArrowSpacing ) const { ImplControlValue aVal; Rectangle aNativeBounds; @@ -1498,7 +1498,7 @@ void Menu::ImplRemoveDel( ImplMenuDelData& rDel ) } } -Size Menu::ImplCalcSize( const Window* pWin ) +Size Menu::ImplCalcSize( const vcl::Window* pWin ) { // | Check/Radio/Image| Text| Accel/Popup| @@ -1703,7 +1703,7 @@ Size Menu::ImplCalcSize( const Window* pWin ) return aSz; } -static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRect, bool i_bHighlight ) +static void ImplPaintCheckBackground( vcl::Window* i_pWindow, const Rectangle& i_rRect, bool i_bHighlight ) { bool bNativeOk = false; if( i_pWindow->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) ) @@ -1727,7 +1727,7 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec } } -static OUString getShortenedString( const OUString& i_rLong, Window* i_pWin, long i_nMaxWidth ) +static OUString getShortenedString( const OUString& i_rLong, vcl::Window* i_pWin, long i_nMaxWidth ) { sal_Int32 nPos = -1; OUString aNonMnem( OutputDevice::GetNonMnemonicString( i_rLong, nPos ) ); @@ -1747,7 +1747,7 @@ static OUString getShortenedString( const OUString& i_rLong, Window* i_pWin, lon return aNonMnem; } -void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemData* pThisItemOnly, bool bHighlighted, bool bLayout, bool bRollover ) const +void Menu::ImplPaint( vcl::Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemData* pThisItemOnly, bool bHighlighted, bool bLayout, bool bRollover ) const { // for symbols: nFontHeight x nFontHeight long nFontHeight = pWin->GetTextHeight(); @@ -2470,7 +2470,7 @@ void MenuBar::SetDisplayable( bool bDisplayable ) } } -Window* MenuBar::ImplCreate(Window* pParent, Window* pWindow, MenuBar* pMenu, const css::uno::Reference<css::frame::XFrame> &/*rFrame*/) +vcl::Window* MenuBar::ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, MenuBar* pMenu, const css::uno::Reference<css::frame::XFrame> &/*rFrame*/) { MenuBarWindow *pMenuBarWindow = dynamic_cast<MenuBarWindow*>(pWindow); if (!pMenuBarWindow) @@ -2496,7 +2496,7 @@ Window* MenuBar::ImplCreate(Window* pParent, Window* pWindow, MenuBar* pMenu, co void MenuBar::ImplDestroy( MenuBar* pMenu, bool bDelete ) { - Window *pWindow = pMenu->ImplGetWindow(); + vcl::Window *pWindow = pMenu->ImplGetWindow(); if (pWindow && bDelete) { pMenu->getMenuBarWindow()->KillActivePopup(); @@ -2515,7 +2515,7 @@ bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu ) return bDone; // check for enabled, if this method is called from another window... - Window* pWin = ImplGetWindow(); + vcl::Window* pWin = ImplGetWindow(); if ( pWin && pWin->IsEnabled() && pWin->IsInputEnabled() && ! pWin->IsInModalMode() ) bDone = getMenuBarWindow()->HandleKeyEvent( rKEvent, bFromMenu ); return bDone; @@ -2755,12 +2755,12 @@ void PopupMenu::SetSelectedEntry( sal_uInt16 nId ) nSelectedId = nId; } -sal_uInt16 PopupMenu::Execute( Window* pExecWindow, const Point& rPopupPos ) +sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Point& rPopupPos ) { return Execute( pExecWindow, Rectangle( rPopupPos, rPopupPos ), POPUPMENU_EXECUTE_DOWN ); } -sal_uInt16 PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, sal_uInt16 nFlags ) +sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Rectangle& rRect, sal_uInt16 nFlags ) { ENSURE_OR_RETURN( pExecWindow, "PopupMenu::Execute: need a non-NULL window!", 0 ); @@ -2785,7 +2785,7 @@ sal_uInt16 PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, sal_ return ImplExecute( pExecWindow, rRect, nPopupModeFlags, 0, false ); } -sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst ) +sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, sal_uLong nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst ) { if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) ) return 0; @@ -2894,7 +2894,7 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong Rectangle aDesktopRect(pWin->GetDesktopRectPixel()); if( Application::GetScreenCount() > 1 && Application::IsUnifiedDisplay() ) { - Window* pDeskW = pWindow->GetWindow( WINDOW_REALPARENT ); + vcl::Window* pDeskW = pWindow->GetWindow( WINDOW_REALPARENT ); if( ! pDeskW ) pDeskW = pWindow; Point aDesktopTL( pDeskW->OutputToAbsoluteScreenPixel( aRect.TopLeft() ) ); @@ -2910,7 +2910,7 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong //above/below and force the menu to scroll if it won't fit if (nPopupModeFlags & FLOATWIN_POPUPMODE_NOHORZPLACEMENT) { - Window* pRef = pWin; + vcl::Window* pRef = pWin; if ( pRef->GetParent() ) pRef = pRef->GetParent(); diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index d5998d803798..2a82c613776d 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -34,7 +34,7 @@ // document closing button #define IID_DOCUMENTCLOSE 1 -DecoToolBox::DecoToolBox( Window* pParent, WinBits nStyle ) : +DecoToolBox::DecoToolBox( vcl::Window* pParent, WinBits nStyle ) : ToolBox( pParent, nStyle ) { ImplInit(); @@ -115,7 +115,7 @@ void DecoToolBox::SetImages( long nMaxHeight, bool bForce ) } } -MenuBarWindow::MenuBarWindow( Window* pParent ) : +MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) : Window( pParent, 0 ), aCloseBtn(this), aFloatBtn( this, WB_NOPOINTERFOCUS | WB_SMALLSTYLE | WB_RECTSTYLE ), @@ -519,18 +519,18 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, bool bSelectEntry, bool b GrabFocus(); } -static int ImplGetTopDockingAreaHeight( Window *pWindow ) +static int ImplGetTopDockingAreaHeight( vcl::Window *pWindow ) { // find docking area that is top aligned and return its height // note: dockingareas are direct children of the SystemWindow if( pWindow->ImplGetFrameWindow() ) { - Window *pWin = pWindow->ImplGetFrameWindow()->GetWindow( WINDOW_FIRSTCHILD ); //mpWindowImpl->mpFirstChild; + vcl::Window *pWin = pWindow->ImplGetFrameWindow()->GetWindow( WINDOW_FIRSTCHILD ); //mpWindowImpl->mpFirstChild; while( pWin ) { if( pWin->IsSystemWindow() ) { - Window *pChildWin = pWin->GetWindow( WINDOW_FIRSTCHILD ); //mpWindowImpl->mpFirstChild; + vcl::Window *pChildWin = pWin->GetWindow( WINDOW_FIRSTCHILD ); //mpWindowImpl->mpFirstChild; while( pChildWin ) { DockingAreaWindow *pDockingArea = NULL; @@ -554,7 +554,7 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow ) return 0; } -static void ImplAddNWFSeparator( Window *pThis, const MenubarValue& rMenubarValue ) +static void ImplAddNWFSeparator( vcl::Window *pThis, const MenubarValue& rMenubarValue ) { // add a separator if // - we have an adjacent docking area diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx index ad3c336280fd..46c79accc0f5 100644 --- a/vcl/source/window/menubarwindow.hxx +++ b/vcl/source/window/menubarwindow.hxx @@ -39,7 +39,7 @@ class DecoToolBox : public ToolBox using Window::ImplInit; public: - DecoToolBox( Window* pParent, WinBits nStyle = 0 ); + DecoToolBox( vcl::Window* pParent, WinBits nStyle = 0 ); void ImplInit(); void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; @@ -54,7 +54,7 @@ public: /** Class that implements the actual window of the menu bar. */ -class MenuBarWindow : public Window, public IMenuBarWindow +class MenuBarWindow : public vcl::Window, public IMenuBarWindow { friend class MenuBar; friend class Menu; @@ -106,7 +106,7 @@ private: void GetFocus() SAL_OVERRIDE; public: - MenuBarWindow( Window* pParent ); + MenuBarWindow( vcl::Window* pParent ); virtual ~MenuBarWindow(); virtual void ShowButtons(bool bClose, bool bFloat, bool bHide) SAL_OVERRIDE; diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 26d279df95c3..a1754b0a8d4e 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -25,7 +25,7 @@ #include <vcl/settings.hxx> #include <window.h> -MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, Window* pParent, WinBits nStyle ) : +MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, vcl::Window* pParent, WinBits nStyle ) : FloatingWindow( pParent, nStyle ) { mpWindowImpl->mbMenuFloatingWindow= true; @@ -1141,7 +1141,7 @@ void MenuFloatingWindow::RequestHelp( const HelpEvent& rHEvt ) { sal_uInt16 nId = nHighlightedItem; Menu* pM = pMenu; - Window* pW = this; + vcl::Window* pW = this; // #102618# Get item rect before destroying the window in EndExecute() call Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) ); diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx index f650527f3851..62731efd2ae1 100644 --- a/vcl/source/window/menufloatingwindow.hxx +++ b/vcl/source/window/menufloatingwindow.hxx @@ -79,7 +79,7 @@ protected: Rectangle ImplGetItemRect( sal_uInt16 nPos ); public: - MenuFloatingWindow( Menu* pMenu, Window* pParent, WinBits nStyle ); + MenuFloatingWindow( Menu* pMenu, vcl::Window* pParent, WinBits nStyle ); virtual ~MenuFloatingWindow(); void doShutdown(); diff --git a/vcl/source/window/menuitemlist.cxx b/vcl/source/window/menuitemlist.cxx index 4fe0a0a23922..6699259e830f 100644 --- a/vcl/source/window/menuitemlist.cxx +++ b/vcl/source/window/menuitemlist.cxx @@ -198,7 +198,7 @@ MenuItemData* MenuItemList::SearchItem( { KeyCode mnKeyCode; sal_Unicode mnUnicode = pData->aText[n+1]; - Window* pDefWindow = ImplGetDefaultWindow(); + vcl::Window* pDefWindow = ImplGetDefaultWindow(); if( ( pDefWindow && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode, Application::GetSettings().GetUILanguageTag().getLanguageType(), mnKeyCode ) @@ -259,7 +259,7 @@ size_t MenuItemList::GetItemCount( KeyCode aKeyCode ) const KeyCode mnKeyCode; // if MapUnicodeToKeyCode fails or is unsupported we try the pure ascii mapping of the keycodes // so we have working shortcuts when ascii mnemonics are used - Window* pDefWindow = ImplGetDefaultWindow(); + vcl::Window* pDefWindow = ImplGetDefaultWindow(); if( ( pDefWindow && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText[n+1], Application::GetSettings().GetUILanguageTag().getLanguageType(), mnKeyCode ) diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx index 0f0a8dd52f6a..ddfe6bffbc97 100644 --- a/vcl/source/window/menuwindow.cxx +++ b/vcl/source/window/menuwindow.cxx @@ -26,7 +26,7 @@ #include <vcl/svapp.hxx> #include <vcl/window.hxx> -void MenuWindow::ImplInitMenuWindow(Window* pWin, bool bFont, bool bMenuBar) +void MenuWindow::ImplInitMenuWindow(vcl::Window* pWin, bool bFont, bool bMenuBar) { const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings(); @@ -76,7 +76,7 @@ void MenuWindow::ImplInitMenuWindow(Window* pWin, bool bFont, bool bMenuBar) pWin->SetLineColor(); } -static sal_uLong ImplChangeTipTimeout( sal_uLong nTimeout, Window *pWindow ) +static sal_uLong ImplChangeTipTimeout( sal_uLong nTimeout, vcl::Window *pWindow ) { AllSettings aAllSettings( pWindow->GetSettings() ); HelpSettings aHelpSettings( aAllSettings.GetHelpSettings() ); @@ -87,7 +87,7 @@ static sal_uLong ImplChangeTipTimeout( sal_uLong nTimeout, Window *pWindow ) return nRet; } -bool MenuWindow::ImplHandleHelpEvent(Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem, +bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem, const HelpEvent& rHEvt, const Rectangle &rHighlightRect) { if( ! pMenu ) diff --git a/vcl/source/window/menuwindow.hxx b/vcl/source/window/menuwindow.hxx index 880b3f14f7d9..74e36c3fbc9a 100644 --- a/vcl/source/window/menuwindow.hxx +++ b/vcl/source/window/menuwindow.hxx @@ -30,7 +30,7 @@ class Link; class Menu; class MenuBar; class Rectangle; -class Window; +namespace vcl { class Window; } /** Common ancestor for MenuFloatingWindow and MenuBarWindow. @@ -54,10 +54,10 @@ public: virtual ~MenuWindow() {} /// Sets up some visual properties of the underlying window. - void ImplInitMenuWindow(Window* pWin, bool bFont, bool bMenuBar); + void ImplInitMenuWindow(vcl::Window* pWin, bool bFont, bool bMenuBar); /// Show the appropriate help tooltip. - bool ImplHandleHelpEvent(Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem, + bool ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_uInt16 nHighlightedItem, const HelpEvent& rHEvt, const Rectangle &rHighlightRect); }; diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index b829bbfac6ce..c7d8bb1072f8 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -47,6 +47,8 @@ using namespace ::com::sun::star::uno; +namespace vcl { + sal_uInt16 Window::ImplHitTest( const Point& rFramePos ) { Point aFramePos( rFramePos ); @@ -98,7 +100,7 @@ PointerStyle Window::ImplGetMousePointer() const else ePointerStyle = POINTER_ARROW; - const Window* pWindow = this; + const vcl::Window* pWindow = this; do { // when the pointer is not visible stop the search, as @@ -164,7 +166,7 @@ void Window::ImplGenerateMouseMove() IMPL_LINK_NOARG(Window, ImplGenerateMouseMoveHdl) { mpWindowImpl->mpFrameData->mnMouseMoveId = 0; - Window* pCaptureWin = ImplGetSVData()->maWinData.mpCaptureWin; + vcl::Window* pCaptureWin = ImplGetSVData()->maWinData.mpCaptureWin; if( ! pCaptureWin || (pCaptureWin->mpWindowImpl && pCaptureWin->mpWindowImpl->mpFrame == mpWindowImpl->mpFrame) ) @@ -252,7 +254,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) ImplSVData* pSVData = ImplGetSVData(); bool bAsyncFocusWaiting = false; - Window *pFrame = pSVData->maWinData.mpFirstFrame; + vcl::Window *pFrame = pSVData->maWinData.mpFirstFrame; while( pFrame ) { if( pFrame != mpWindowImpl->mpFrameWindow && pFrame->mpWindowImpl->mpFrameData->mnFocusId ) @@ -268,7 +270,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) bool bMustNotGrabFocus = false; // #100242#, check parent hierarchy if some floater prohibits grab focus - Window *pParent = this; + vcl::Window *pParent = this; while( pParent ) { // #102158#, ignore grabfocus only if the floating parent grabs keyboard focus by itself (GrabsFocus()) @@ -289,7 +291,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) pSVData->maWinData.mpExtTextInputWin->EndExtTextInput( EXTTEXTINPUT_END_COMPLETE ); // mark this windows as the last FocusWindow - Window* pOverlapWindow = ImplGetFirstOverlapWindow(); + vcl::Window* pOverlapWindow = ImplGetFirstOverlapWindow(); pOverlapWindow->mpWindowImpl->mpLastFocusWindow = this; mpWindowImpl->mpFrameData->mpFocusWin = this; @@ -309,7 +311,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) } } - Window* pOldFocusWindow = pSVData->maWinData.mpFocusWin; + vcl::Window* pOldFocusWindow = pSVData->maWinData.mpFocusWin; ImplDelData aOldFocusDel( pOldFocusWindow ); pSVData->maWinData.mpFocusWin = this; @@ -326,15 +328,15 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) if ( pOldFocusWindow ) { // remember Focus - Window* pOldOverlapWindow = pOldFocusWindow->ImplGetFirstOverlapWindow(); - Window* pNewOverlapWindow = ImplGetFirstOverlapWindow(); + vcl::Window* pOldOverlapWindow = pOldFocusWindow->ImplGetFirstOverlapWindow(); + vcl::Window* pNewOverlapWindow = ImplGetFirstOverlapWindow(); if ( pOldOverlapWindow != pNewOverlapWindow ) ImplCallFocusChangeActivate( pNewOverlapWindow, pOldOverlapWindow ); } else { - Window* pNewOverlapWindow = ImplGetFirstOverlapWindow(); - Window* pNewRealWindow = pNewOverlapWindow->ImplGetWindow(); + vcl::Window* pNewOverlapWindow = ImplGetFirstOverlapWindow(); + vcl::Window* pNewRealWindow = pNewOverlapWindow->ImplGetWindow(); pNewOverlapWindow->mpWindowImpl->mbActive = true; pNewOverlapWindow->Activate(); if ( pNewRealWindow != pNewOverlapWindow ) @@ -398,7 +400,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) void Window::ImplGrabFocusToDocument( sal_uInt16 nFlags ) { - Window *pWin = this; + vcl::Window *pWin = this; while( pWin ) { if( !pWin->GetParent() ) @@ -773,4 +775,6 @@ Reference< css::datatransfer::dnd::XDragGestureRecognizer > Window::GetDragGestu return Reference< css::datatransfer::dnd::XDragGestureRecognizer > ( GetDropTarget(), UNO_QUERY ); } +} /* namespace vcl */ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 0eee716d65dc..f6c6399e8db1 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -136,7 +136,7 @@ void MessBox::ImplInitButtons() } } -MessBox::MessBox( Window* pParent, WinBits nStyle, +MessBox::MessBox( vcl::Window* pParent, WinBits nStyle, const OUString& rTitle, const OUString& rMessage ) : ButtonDialog( WINDOW_MESSBOX ), maMessText( rMessage ) @@ -386,13 +386,13 @@ void InfoBox::ImplInitInfoBoxData() SetImage( InfoBox::GetStandardImage() ); } -InfoBox::InfoBox( Window* pParent, const OUString& rMessage ) : +InfoBox::InfoBox( vcl::Window* pParent, const OUString& rMessage ) : MessBox( pParent, WB_OK | WB_DEF_OK, OUString(), rMessage ) { ImplInitInfoBoxData(); } -InfoBox::InfoBox( Window* pParent, WinBits nStyle, const OUString& rMessage ) : +InfoBox::InfoBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessage ) : MessBox( pParent, nStyle, OUString(), rMessage ) { ImplInitInfoBoxData(); @@ -413,7 +413,7 @@ void WarningBox::ImplInitWarningBoxData() SetImage( WarningBox::GetStandardImage() ); } -WarningBox::WarningBox( Window* pParent, WinBits nStyle, +WarningBox::WarningBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessage ) : MessBox( pParent, nStyle, OUString(), rMessage ) { @@ -442,7 +442,7 @@ void ErrorBox::ImplInitErrorBoxData() SetImage( ErrorBox::GetStandardImage() ); } -ErrorBox::ErrorBox( Window* pParent, WinBits nStyle, +ErrorBox::ErrorBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessage ) : MessBox( pParent, nStyle, OUString(), rMessage ) { @@ -473,7 +473,7 @@ void QueryBox::ImplInitQueryBoxData() SetImage( QueryBox::GetStandardImage() ); } -QueryBox::QueryBox( Window* pParent, WinBits nStyle, const OUString& rMessage ) : +QueryBox::QueryBox( vcl::Window* pParent, WinBits nStyle, const OUString& rMessage ) : MessBox( pParent, nStyle, OUString(), rMessage ) { ImplInitQueryBoxData(); diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx index 1151a4da16c2..b205df61d1ef 100644 --- a/vcl/source/window/openglwin.cxx +++ b/vcl/source/window/openglwin.cxx @@ -15,14 +15,14 @@ class OpenGLWindowImpl { public: - OpenGLWindowImpl(Window* pWindow); + OpenGLWindowImpl(vcl::Window* pWindow); OpenGLContext& getContext() { return maContext;} private: OpenGLContext maContext; boost::scoped_ptr<SystemChildWindow> mpChildWindow; }; -OpenGLWindowImpl::OpenGLWindowImpl(Window* pWindow) +OpenGLWindowImpl::OpenGLWindowImpl(vcl::Window* pWindow) { SystemWindowData aData = OpenGLContext::generateWinData(pWindow, false); mpChildWindow.reset(new SystemChildWindow(pWindow, 0, &aData)); @@ -32,7 +32,7 @@ OpenGLWindowImpl::OpenGLWindowImpl(Window* pWindow) } -OpenGLWindow::OpenGLWindow(Window* pParent): +OpenGLWindow::OpenGLWindow(vcl::Window* pParent): Window(pParent, 0), mpImpl(new OpenGLWindowImpl(this)), mpRenderer(NULL) diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 2da3ed9a0d91..07f04e996093 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -43,7 +43,7 @@ class PaintHelper { private: - Window* m_pWindow; + vcl::Window* m_pWindow; Region* m_pChildRegion; Rectangle m_aSelectionRect; Rectangle m_aPaintRect; @@ -52,7 +52,7 @@ private: bool m_bPop; bool m_bRestoreCursor; public: - PaintHelper(Window *pWindow, sal_uInt16 nPaintFlags); + PaintHelper(vcl::Window *pWindow, sal_uInt16 nPaintFlags); void SetPop() { m_bPop = true; @@ -85,7 +85,7 @@ public: ~PaintHelper(); }; -PaintHelper::PaintHelper(Window *pWindow, sal_uInt16 nPaintFlags) +PaintHelper::PaintHelper(vcl::Window *pWindow, sal_uInt16 nPaintFlags) : m_pWindow(pWindow) , m_pChildRegion(NULL) , m_nPaintFlags(nPaintFlags) @@ -125,6 +125,8 @@ void PaintHelper::DoPaint(const Region* pRegion) } } +namespace vcl { + void Window::PushPaintHelper(PaintHelper *pHelper) { pHelper->SetPop(); @@ -184,6 +186,8 @@ void Window::PopPaintHelper(PaintHelper *pHelper) mpWindowImpl->mpCursor->ImplResume(pHelper->GetRestoreCursor()); } +} /* namespace vcl */ + PaintHelper::~PaintHelper() { WindowImpl* pWindowImpl = m_pWindow->ImplGetWindowImpl(); @@ -195,7 +199,7 @@ PaintHelper::~PaintHelper() if ( m_nPaintFlags & (IMPL_PAINT_PAINTALLCHILDREN | IMPL_PAINT_PAINTCHILDREN) ) { // Paint from the bottom child window and frontward. - Window* pTempWindow = pWindowImpl->mpLastChild; + vcl::Window* pTempWindow = pWindowImpl->mpLastChild; while ( pTempWindow ) { if ( pTempWindow->mpWindowImpl->mbVisible ) @@ -217,6 +221,8 @@ PaintHelper::~PaintHelper() delete m_pChildRegion; } +namespace vcl { + void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ) { // call PrePaint. PrePaint may add to the invalidate region as well as @@ -258,7 +264,7 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ) void Window::ImplCallOverlapPaint() { // emit overlapping windows first - Window* pTempWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pTempWindow = mpWindowImpl->mpFirstOverlap; while ( pTempWindow ) { if ( pTempWindow->mpWindowImpl->mbReallyVisible ) @@ -323,7 +329,7 @@ void Window::ImplInvalidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags // set PAINTCHILDREN for all parent windows till the first OverlapWindow if ( !ImplIsOverlapWindow() ) { - Window* pTempWindow = this; + vcl::Window* pTempWindow = this; sal_uInt16 nTranspPaint = IsPaintTransparent() ? IMPL_PAINT_PAINT : 0; do { @@ -354,7 +360,7 @@ void Window::ImplInvalidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags if( ((IsPaintTransparent() && !(nFlags & INVALIDATE_NOTRANSPARENT)) || (nFlags & INVALIDATE_TRANSPARENT) ) && ImplGetParent() ) { - Window *pParent = ImplGetParent(); + vcl::Window *pParent = ImplGetParent(); while( pParent && pParent->IsPaintTransparent() ) pParent = pParent->ImplGetParent(); if( pParent ) @@ -384,7 +390,7 @@ void Window::ImplInvalidateOverlapFrameRegion( const Region& rRegion ) ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN ); // now we invalidate the overlapping windows - Window* pTempWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pTempWindow = mpWindowImpl->mpFirstOverlap; while ( pTempWindow ) { if ( pTempWindow->IsVisible() ) @@ -416,10 +422,10 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) bool bInvalidateAll = !pRegion; // take Transparent-Invalidate into account - Window* pOpaqueWindow = this; + vcl::Window* pOpaqueWindow = this; if ( (mpWindowImpl->mbPaintTransparent && !(nFlags & INVALIDATE_NOTRANSPARENT)) || (nFlags & INVALIDATE_TRANSPARENT) ) { - Window* pTempWindow = pOpaqueWindow->ImplGetParent(); + vcl::Window* pTempWindow = pOpaqueWindow->ImplGetParent(); while ( pTempWindow ) { if ( !pTempWindow->IsPaintTransparent() ) @@ -505,7 +511,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, if ( bChildren && (mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINTCHILDREN) ) { - Window* pWindow = mpWindowImpl->mpFirstChild; + vcl::Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { pWindow->ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, true ); @@ -524,7 +530,7 @@ void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, if ( !ImplIsOverlapWindow() ) { Region aPaintAllRegion; - Window* pPaintAllWindow = this; + vcl::Window* pPaintAllWindow = this; do { pPaintAllWindow = pPaintAllWindow->ImplGetParent(); @@ -566,7 +572,7 @@ void Window::ImplValidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); aChildRegion = aRect; } - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->Invalidate( aChildRegion, INVALIDATE_CHILDREN | INVALIDATE_NOTRANSPARENT ); @@ -584,7 +590,7 @@ void Window::ImplValidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) if ( nFlags & VALIDATE_CHILDREN ) { - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->ImplValidateFrameRegion( pRegion, nFlags ); @@ -649,7 +655,7 @@ void Window::ImplUpdateAll( bool bOverlapWindows ) // an update changes the OverlapWindow, such that for later paints // not too much has to be drawn, if ALLCHILDREN etc. is set - Window* pWindow = ImplGetFirstOverlapWindow(); + vcl::Window* pWindow = ImplGetFirstOverlapWindow(); if ( bOverlapWindows ) pWindow->ImplCallOverlapPaint(); else @@ -905,7 +911,7 @@ bool Window::HasPaintEvent() const if ( !ImplIsOverlapWindow() ) { - const Window* pTempWindow = this; + const vcl::Window* pTempWindow = this; do { pTempWindow = pTempWindow->ImplGetParent(); @@ -941,8 +947,8 @@ void Window::Update() } // First we should skip all windows which are Paint-Transparent - Window* pUpdateWindow = this; - Window* pWindow = pUpdateWindow; + vcl::Window* pUpdateWindow = this; + vcl::Window* pWindow = pUpdateWindow; while ( !pWindow->ImplIsOverlapWindow() ) { if ( !pWindow->mpWindowImpl->mbPaintTransparent ) @@ -972,7 +978,7 @@ void Window::Update() // trigger an update also for system windows on top of us, // otherwise holes would remain - Window* pUpdateOverlapWindow = ImplGetFirstOverlapWindow()->mpWindowImpl->mpFirstOverlap; + vcl::Window* pUpdateOverlapWindow = ImplGetFirstOverlapWindow()->mpWindowImpl->mpFirstOverlap; while ( pUpdateOverlapWindow ) { pUpdateOverlapWindow->Update(); @@ -1086,7 +1092,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP // get rid of virtual device now so they don't pile up during recursive calls delete pMaskedDevice, pMaskedDevice = NULL; - for( Window* pChild = mpWindowImpl->mpFirstChild; pChild; pChild = pChild->mpWindowImpl->mpNext ) + for( vcl::Window* pChild = mpWindowImpl->mpFirstChild; pChild; pChild = pChild->mpWindowImpl->mpNext ) { if( pChild->mpWindowImpl->mpFrame == mpWindowImpl->mpFrame && pChild->IsVisible() ) { @@ -1119,10 +1125,10 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& / DBG_ASSERT( ! pDev->HasMirroredGraphics(), "PaintToDevice to mirroring graphics" ); DBG_ASSERT( ! pDev->IsRTLEnabled(), "PaintToDevice to mirroring device" ); - Window* pRealParent = NULL; + vcl::Window* pRealParent = NULL; if( ! mpWindowImpl->mbVisible ) { - Window* pTempParent = ImplGetDefaultWindow(); + vcl::Window* pTempParent = ImplGetDefaultWindow(); if( pTempParent ) pTempParent->EnableChildTransparentMode(); pRealParent = GetParent(); @@ -1341,7 +1347,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( bScrollChildren ) { - Window* pWindow = mpWindowImpl->mpFirstChild; + vcl::Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { Point aPos = pWindow->GetPosPixel(); @@ -1359,5 +1365,7 @@ void Window::ImplScroll( const Rectangle& rRect, mpWindowImpl->mpCursor->ImplResume(); } +} /* namespace vcl */ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/popupmenuwindow.cxx b/vcl/source/window/popupmenuwindow.cxx index 9ce03cea4f0b..1a33ff9037ca 100644 --- a/vcl/source/window/popupmenuwindow.cxx +++ b/vcl/source/window/popupmenuwindow.cxx @@ -38,7 +38,7 @@ PopupMenuFloatingWindow::ImplData::~ImplData() { } -PopupMenuFloatingWindow::PopupMenuFloatingWindow( Window* pParent, WinBits nStyle ) : +PopupMenuFloatingWindow::PopupMenuFloatingWindow( vcl::Window* pParent, WinBits nStyle ) : FloatingWindow(pParent, nStyle), mpImplData(new ImplData) { @@ -64,7 +64,7 @@ bool PopupMenuFloatingWindow::IsPopupMenu() const return mpImplData->mnMenuStackLevel != ::std::numeric_limits<sal_uInt16>::max(); } -bool PopupMenuFloatingWindow::isPopupMenu(const Window *pWindow) +bool PopupMenuFloatingWindow::isPopupMenu(const vcl::Window *pWindow) { const PopupMenuFloatingWindow* pChild = dynamic_cast<const PopupMenuFloatingWindow*>(pWindow); return pChild && pChild->IsPopupMenu(); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index d9ebf7c1b9b9..715e75e2909d 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -51,17 +51,17 @@ using namespace com::sun::star::lang; using namespace com::sun::star::container; using namespace com::sun::star::beans; -extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makePrintPreviewWindow(Window *pParent, VclBuilder::stringmap &) +extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makePrintPreviewWindow(vcl::Window *pParent, VclBuilder::stringmap &) { return new PrintDialog::PrintPreviewWindow(pParent); } -extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeShowNupOrderWindow(Window *pParent, VclBuilder::stringmap &) +extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeShowNupOrderWindow(vcl::Window *pParent, VclBuilder::stringmap &) { return new PrintDialog::ShowNupOrderWindow(pParent); } -PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent ) +PrintDialog::PrintPreviewWindow::PrintPreviewWindow( vcl::Window* i_pParent ) : Window( i_pParent, 0 ) , maOrigSize( 10, 10 ) , maPageVDev( *this ) @@ -294,7 +294,7 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap() maPageVDev.SetDrawMode( nOldDrawMode ); } -PrintDialog::ShowNupOrderWindow::ShowNupOrderWindow( Window* i_pParent ) +PrintDialog::ShowNupOrderWindow::ShowNupOrderWindow( vcl::Window* i_pParent ) : Window( i_pParent, WB_NOBORDER ) , mnOrderMode( 0 ) , mnRows( 1 ) @@ -568,7 +568,7 @@ void PrintDialog::OutputOptPage::storeToSettings() OUString("false") ); } -PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterController>& i_rController ) +PrintDialog::PrintDialog( vcl::Window* i_pParent, const boost::shared_ptr<PrinterController>& i_rController ) : ModalDialog(i_pParent, "PrintDialog", "vcl/ui/printdialog.ui") , mpCustomOptionsUIBuilder(NULL) , maPController( i_rController ) @@ -795,13 +795,13 @@ bool PrintDialog::isSingleJobs() return maOptionsPage.mpCollateSingleJobsBox->IsChecked(); } -void setHelpId( Window* i_pWindow, const Sequence< OUString >& i_rHelpIds, sal_Int32 i_nIndex ) +void setHelpId( vcl::Window* i_pWindow, const Sequence< OUString >& i_rHelpIds, sal_Int32 i_nIndex ) { if( i_nIndex >= 0 && i_nIndex < i_rHelpIds.getLength() ) i_pWindow->SetHelpId( OUStringToOString( i_rHelpIds.getConstArray()[i_nIndex], RTL_TEXTENCODING_UTF8 ) ); } -static void setHelpText( Window* i_pWindow, const Sequence< OUString >& i_rHelpTexts, sal_Int32 i_nIndex ) +static void setHelpText( vcl::Window* i_pWindow, const Sequence< OUString >& i_rHelpTexts, sal_Int32 i_nIndex ) { // without a help text set and the correct smartID, // help texts will be retrieved from the online help system @@ -819,11 +819,11 @@ void PrintDialog::setupOptionalUI() OUString sOptionsUIFile; rOptions[i].Value >>= sOptionsUIFile; - Window *pCustom = get<Window>("customcontents"); + vcl::Window *pCustom = get<vcl::Window>("customcontents"); delete mpCustomOptionsUIBuilder; mpCustomOptionsUIBuilder = new VclBuilder(pCustom, getUIRootDir(), sOptionsUIFile); - Window *pWindow = mpCustomOptionsUIBuilder->get_widget_root(); + vcl::Window *pWindow = mpCustomOptionsUIBuilder->get_widget_root(); pWindow->Show(); continue; } @@ -963,9 +963,9 @@ void PrintDialog::setupOptionalUI() } else if (aCtrlType == "Subgroup" && !aID.isEmpty()) { - Window *pFrame = get<Window>(aID); + vcl::Window *pFrame = get<vcl::Window>(aID); if (!pFrame && mpCustomOptionsUIBuilder) - pFrame = mpCustomOptionsUIBuilder->get<Window>(aID); + pFrame = mpCustomOptionsUIBuilder->get<vcl::Window>(aID); if (!pFrame) continue; @@ -1174,7 +1174,7 @@ void PrintDialog::setupOptionalUI() // update enable states checkOptionalControlDependencies(); - Window *pPageRange = get<Window>("pagerange"); + vcl::Window *pPageRange = get<vcl::Window>("pagerange"); // print range not shown (currently math only) -> hide spacer line and reverse order if (!pPageRange || !pPageRange->IsVisible()) @@ -1217,7 +1217,7 @@ void PrintDialog::checkControlDependencies() void PrintDialog::checkOptionalControlDependencies() { - for( std::map< Window*, OUString >::iterator it = maControlToPropertyMap.begin(); + for( std::map< vcl::Window*, OUString >::iterator it = maControlToPropertyMap.begin(); it != maControlToPropertyMap.end(); ++it ) { bool bShouldbeEnabled = maPController->isUIOptionEnabled( it->second ); @@ -1241,7 +1241,7 @@ void PrintDialog::checkOptionalControlDependencies() if( bShouldbeEnabled && dynamic_cast<RadioButton*>(it->first) ) { - std::map< Window*, sal_Int32 >::const_iterator r_it = maControlToNumValMap.find( it->first ); + std::map< vcl::Window*, sal_Int32 >::const_iterator r_it = maControlToNumValMap.find( it->first ); if( r_it != maControlToNumValMap.end() ) { bShouldbeEnabled = maPController->isUIChoiceEnabled( it->second, r_it->second ); @@ -1655,10 +1655,10 @@ IMPL_LINK_NOARG(PrintDialog, UIOptionsChanged) return 0; } -PropertyValue* PrintDialog::getValueForWindow( Window* i_pWindow ) const +PropertyValue* PrintDialog::getValueForWindow( vcl::Window* i_pWindow ) const { PropertyValue* pVal = NULL; - std::map< Window*, OUString >::const_iterator it = maControlToPropertyMap.find( i_pWindow ); + std::map< vcl::Window*, OUString >::const_iterator it = maControlToPropertyMap.find( i_pWindow ); if( it != maControlToPropertyMap.end() ) { pVal = maPController->getValue( it->second ); @@ -1674,10 +1674,10 @@ PropertyValue* PrintDialog::getValueForWindow( Window* i_pWindow ) const void PrintDialog::updateWindowFromProperty( const OUString& i_rProperty ) { beans::PropertyValue* pValue = maPController->getValue( i_rProperty ); - std::map< OUString, std::vector< Window* > >::const_iterator it = maPropertyToWindowMap.find( i_rProperty ); + std::map< OUString, std::vector< vcl::Window* > >::const_iterator it = maPropertyToWindowMap.find( i_rProperty ); if( pValue && it != maPropertyToWindowMap.end() ) { - const std::vector< Window* >& rWindows( it->second ); + const std::vector< vcl::Window* >& rWindows( it->second ); if( ! rWindows.empty() ) { bool bVal = false; @@ -1723,9 +1723,9 @@ void PrintDialog::updateWindowFromProperty( const OUString& i_rProperty ) } } -void PrintDialog::makeEnabled( Window* i_pWindow ) +void PrintDialog::makeEnabled( vcl::Window* i_pWindow ) { - std::map< Window*, OUString >::const_iterator it = maControlToPropertyMap.find( i_pWindow ); + std::map< vcl::Window*, OUString >::const_iterator it = maControlToPropertyMap.find( i_pWindow ); if( it != maControlToPropertyMap.end() ) { OUString aDependency( maPController->makeEnabled( it->second ) ); @@ -1760,7 +1760,7 @@ IMPL_LINK( PrintDialog, UIOption_RadioHdl, RadioButton*, i_pBtn ) if( i_pBtn->IsChecked() ) { PropertyValue* pVal = getValueForWindow( i_pBtn ); - std::map< Window*, sal_Int32 >::const_iterator it = maControlToNumValMap.find( i_pBtn ); + std::map< vcl::Window*, sal_Int32 >::const_iterator it = maControlToNumValMap.find( i_pBtn ); if( pVal && it != maControlToNumValMap.end() ) { makeEnabled( i_pBtn ); @@ -1869,7 +1869,7 @@ void PrintDialog::previewBackward() // PrintProgressDialog -PrintProgressDialog::PrintProgressDialog(Window* i_pParent, int i_nMax) +PrintProgressDialog::PrintProgressDialog(vcl::Window* i_pParent, int i_nMax) : ModelessDialog(i_pParent, "PrintProgressDialog", "vcl/ui/printprogressdialog.ui") , mbCanceled(false) diff --git a/vcl/source/window/resource.cxx b/vcl/source/window/resource.cxx index 4bb5a0a84e33..8c13006d5349 100644 --- a/vcl/source/window/resource.cxx +++ b/vcl/source/window/resource.cxx @@ -34,6 +34,7 @@ static OString ImplAutoHelpID( ResMgr* pResMgr ) return aRet; } +namespace vcl { WinBits Window::ImplInitRes( const ResId& rResId ) { @@ -156,3 +157,5 @@ void Window::ImplLoadRes( const ResId& rResId ) } } +} /* namespace vcl */ + diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index 6a44ee41777b..49606fb9e2a3 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -36,7 +36,7 @@ #define MIN_TIME 20 #define DEF_TIMEOUT 50 -ImplWheelWindow::ImplWheelWindow( Window* pParent ) : +ImplWheelWindow::ImplWheelWindow( vcl::Window* pParent ) : FloatingWindow ( pParent, 0 ), mnRepaintTime ( 1UL ), mnTimeout ( DEF_TIMEOUT ), @@ -341,7 +341,7 @@ IMPL_LINK_NOARG(ImplWheelWindow, ImplScrollHdl) { if ( mnActDeltaX || mnActDeltaY ) { - Window* pWindow = GetParent(); + vcl::Window* pWindow = GetParent(); const Point aMousePos( pWindow->OutputToScreenPixel( pWindow->GetPointerPosPixel() ) ); Point aCmdMousePos( pWindow->ImplFrameToOutput( aMousePos ) ); CommandScrollData aScrollData( mnActDeltaX, mnActDeltaY ); diff --git a/vcl/source/window/scrwnd.hxx b/vcl/source/window/scrwnd.hxx index fe416cb49117..e71ca6d24676 100644 --- a/vcl/source/window/scrwnd.hxx +++ b/vcl/source/window/scrwnd.hxx @@ -69,7 +69,7 @@ protected: public: - ImplWheelWindow( Window* pParent ); + ImplWheelWindow( vcl::Window* pParent ); virtual ~ImplWheelWindow(); void ImplStop(); diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index c1fcbe938ce9..63569289ae33 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -32,7 +32,7 @@ inline bool SelectionEngine::ShouldDeselect( bool bModifierKey1 ) const // TODO: throw out FunctionSet::SelectAtPoint -SelectionEngine::SelectionEngine( Window* pWindow, FunctionSet* pFuncSet, +SelectionEngine::SelectionEngine( vcl::Window* pWindow, FunctionSet* pFuncSet, sal_uLong nAutoRepeatInterval ) : pWin( pWindow ), nUpdateInterval( nAutoRepeatInterval ) @@ -308,7 +308,7 @@ bool SelectionEngine::SelMouseMove( const MouseEvent& rMEvt ) return true; } -void SelectionEngine::SetWindow( Window* pNewWin ) +void SelectionEngine::SetWindow( vcl::Window* pNewWin ) { if( pNewWin != pWin ) { diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx index 2fabec97ccb2..e89f1b6dcf1b 100644 --- a/vcl/source/window/settings.cxx +++ b/vcl/source/window/settings.cxx @@ -37,6 +37,8 @@ #include <window.h> +namespace vcl { + void Window::SetSettings( const AllSettings& rSettings ) { SetSettings( rSettings, false ); @@ -68,7 +70,7 @@ void Window::SetSettings( const AllSettings& rSettings, bool bChild ) if ( bChild || mpWindowImpl->mbChildNotify ) { - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->SetSettings( rSettings, bChild ); @@ -136,7 +138,7 @@ void Window::UpdateSettings( const AllSettings& rSettings, bool bChild ) if ( bChild || mpWindowImpl->mbChildNotify ) { - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->UpdateSettings( rSettings, bChild ); @@ -385,4 +387,6 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) GetpApp()->OverrideSystemSettings( rSettings ); } +} /*namespace vcl*/ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index 3442e02a30dd..62a6fb15203e 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -86,7 +86,7 @@ void Splitter::ImplInitHorVer(bool bNew) SetPointer( Pointer( ePointerStyle ) ); } -void Splitter::ImplInit( Window* pParent, WinBits nWinStyle ) +void Splitter::ImplInit( vcl::Window* pParent, WinBits nWinStyle ) { Window::ImplInit( pParent, nWinStyle, NULL ); @@ -139,7 +139,7 @@ void Splitter::ImplDrawSplitter() mpRefWin->InvertTracking( mpRefWin->PixelToLogic(aInvRect), SHOWTRACK_SPLIT ); } -Splitter::Splitter( Window* pParent, WinBits nStyle ) : +Splitter::Splitter( vcl::Window* pParent, WinBits nStyle ) : Window( WINDOW_SPLITTER ) { ImplInitSplitterData(); @@ -149,7 +149,7 @@ Splitter::Splitter( Window* pParent, WinBits nStyle ) : SetFillColor(); } -Splitter::Splitter( Window* pParent, const ResId& rResId ) : +Splitter::Splitter( vcl::Window* pParent, const ResId& rResId ) : Window( WINDOW_SPLITTER ) { ImplInitSplitterData(); @@ -187,7 +187,7 @@ void Splitter::SetKeyboardStepSize( long nStepSize ) Splitter* Splitter::ImplFindSibling() { // look for another splitter with the same parent but different orientation - Window *pWin = GetParent()->GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window *pWin = GetParent()->GetWindow( WINDOW_FIRSTCHILD ); Splitter *pSplitter = NULL; while( pWin ) { @@ -463,7 +463,7 @@ void Splitter::Splitting( Point& /* rSplitPos */ ) { } -void Splitter::SetDragRectPixel( const Rectangle& rDragRect, Window* _pRefWin ) +void Splitter::SetDragRectPixel( const Rectangle& rDragRect, vcl::Window* _pRefWin ) { maDragRect = rDragRect; if ( !_pRefWin ) diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 0f2058270316..3d99653d5975 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -53,8 +53,8 @@ struct ImplSplitItem long mnOldWidth; long mnOldHeight; ImplSplitSet* mpSet; - Window* mpWindow; - Window* mpOrgParent; + vcl::Window* mpWindow; + vcl::Window* mpOrgParent; sal_uInt16 mnId; SplitWindowItemBits mnBits; bool mbFixed; @@ -308,7 +308,7 @@ static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, sal_uInt16 nId, sal_uInt1 return NULL; } -static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, Window* pWindow ) +static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, vcl::Window* pWindow ) { sal_uInt16 i; sal_uInt16 nItems = pSet->mnItems; @@ -1242,7 +1242,7 @@ void SplitWindow::ImplDrawSplitTracking( SplitWindow* pThis, const Point& rPos ) pThis->ShowTracking( aRect, SHOWTRACK_SPLIT ); } -void SplitWindow::ImplInit( Window* pParent, WinBits nStyle ) +void SplitWindow::ImplInit( vcl::Window* pParent, WinBits nStyle ) { ImplSplitSet* pNewSet = new ImplSplitSet; pNewSet->mpItems = NULL; @@ -1340,7 +1340,7 @@ void SplitWindow::ImplInitSettings() } } -SplitWindow::SplitWindow( Window* pParent, WinBits nStyle ) : +SplitWindow::SplitWindow( vcl::Window* pParent, WinBits nStyle ) : DockingWindow( WINDOW_SPLITWINDOW ) { ImplInit( pParent, nStyle ); @@ -2631,7 +2631,7 @@ void SplitWindow::DataChanged( const DataChangedEvent& rDCEvt ) DockingWindow::DataChanged( rDCEvt ); } -void SplitWindow::InsertItem( sal_uInt16 nId, Window* pWindow, long nSize, +void SplitWindow::InsertItem( sal_uInt16 nId, vcl::Window* pWindow, long nSize, sal_uInt16 nPos, sal_uInt16 nSetId, SplitWindowItemBits nBits ) { @@ -2726,8 +2726,8 @@ void SplitWindow::RemoveItem( sal_uInt16 nId, bool bHide ) return; ImplSplitItem* pItem = &(pSet->mpItems[nPos]); - Window* pWindow = pItem->mpWindow; - Window* pOrgParent = pItem->mpOrgParent; + vcl::Window* pWindow = pItem->mpWindow; + vcl::Window* pOrgParent = pItem->mpOrgParent; // delete set if required if ( !pWindow ) @@ -3130,7 +3130,7 @@ bool SplitWindow::IsItemValid( sal_uInt16 nId ) const return false; } -sal_uInt16 SplitWindow::GetItemId( Window* pWindow ) const +sal_uInt16 SplitWindow::GetItemId( vcl::Window* pWindow ) const { return ImplFindItem( mpBaseSet, pWindow ); } diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx index 3e0a0598e500..cf6fef338580 100644 --- a/vcl/source/window/stacking.cxx +++ b/vcl/source/window/stacking.cxx @@ -47,19 +47,21 @@ using ::com::sun::star::awt::XTopWindow; struct ImplCalcToTopData { ImplCalcToTopData* mpNext; - Window* mpWindow; + vcl::Window* mpWindow; Region* mpInvalidateRegion; }; -Window* Window::ImplGetTopmostFrameWindow() +namespace vcl { + +vcl::Window* Window::ImplGetTopmostFrameWindow() { - Window *pTopmostParent = this; + vcl::Window *pTopmostParent = this; while( pTopmostParent->ImplGetParent() ) pTopmostParent = pTopmostParent->ImplGetParent(); return pTopmostParent->mpWindowImpl->mpFrameWindow; } -void Window::ImplInsertWindow( Window* pParent ) +void Window::ImplInsertWindow( vcl::Window* pParent ) { mpWindowImpl->mpParent = pParent; mpWindowImpl->mpRealParent = pParent; @@ -67,7 +69,7 @@ void Window::ImplInsertWindow( Window* pParent ) if ( pParent && !mpWindowImpl->mbFrame ) { // search frame window and set window frame data - Window* pFrameParent = pParent->mpWindowImpl->mpFrameWindow; + vcl::Window* pFrameParent = pParent->mpWindowImpl->mpFrameWindow; mpWindowImpl->mpFrameData = pFrameParent->mpWindowImpl->mpFrameData; mpWindowImpl->mpFrame = pFrameParent->mpWindowImpl->mpFrame; mpWindowImpl->mpFrameWindow = pFrameParent; @@ -76,7 +78,7 @@ void Window::ImplInsertWindow( Window* pParent ) // search overlap window and insert window in list if ( ImplIsOverlapWindow() ) { - Window* pFirstOverlapParent = pParent; + vcl::Window* pFirstOverlapParent = pParent; while ( !pFirstOverlapParent->ImplIsOverlapWindow() ) pFirstOverlapParent = pFirstOverlapParent->ImplGetParent(); mpWindowImpl->mpOverlapWindow = pFirstOverlapParent; @@ -119,7 +121,7 @@ void Window::ImplRemoveWindow( bool bRemoveFrameData ) mpWindowImpl->mpFrameData->mpFirstOverlap = mpWindowImpl->mpNextOverlap; else { - Window* pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap; + vcl::Window* pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap; while ( pTempWin->mpWindowImpl->mpNextOverlap != this ) pTempWin = pTempWin->mpWindowImpl->mpNextOverlap; pTempWin->mpWindowImpl->mpNextOverlap = mpWindowImpl->mpNextOverlap; @@ -161,7 +163,7 @@ void Window::ImplRemoveWindow( bool bRemoveFrameData ) void Window::reorderWithinParent(sal_uInt16 nNewPosition) { sal_uInt16 nChildCount = 0; - Window *pSource = mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild; + vcl::Window *pSource = mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild; while (pSource) { if (nChildCount == nNewPosition) @@ -274,7 +276,7 @@ void Window::ImplToTop( sal_uInt16 nFlags ) // take AlwaysOnTop into account bool bOnTop = IsAlwaysOnTopEnabled(); - Window* pNextWin = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap; + vcl::Window* pNextWin = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap; if ( !bOnTop ) { while ( pNextWin ) @@ -329,14 +331,14 @@ void Window::ImplStartToTop( sal_uInt16 nFlags ) ImplCalcToTopData aStartData; ImplCalcToTopData* pCurData; ImplCalcToTopData* pNextData; - Window* pOverlapWindow; + vcl::Window* pOverlapWindow; if ( ImplIsOverlapWindow() ) pOverlapWindow = this; else pOverlapWindow = mpWindowImpl->mpOverlapWindow; // first calculate paint areas - Window* pTempOverlapWindow = pOverlapWindow; + vcl::Window* pTempOverlapWindow = pOverlapWindow; aStartData.mpNext = NULL; pCurData = &aStartData; do @@ -383,7 +385,7 @@ void Window::ImplFocusToTop( sal_uInt16 nFlags, bool bReallyVisible ) if ( !(nFlags & TOTOP_NOGRABFOCUS) ) { // first window with GrabFocus-Activate gets the focus - Window* pFocusWindow = this; + vcl::Window* pFocusWindow = this; while ( !pFocusWindow->ImplIsOverlapWindow() ) { // if the window has no BorderWindow, we @@ -406,7 +408,7 @@ void Window::ImplFocusToTop( sal_uInt16 nFlags, bool bReallyVisible ) void Window::ImplShowAllOverlaps() { - Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap; while ( pOverlapWindow ) { if ( pOverlapWindow->mpWindowImpl->mbOverlapVisible ) @@ -421,7 +423,7 @@ void Window::ImplShowAllOverlaps() void Window::ImplHideAllOverlaps() { - Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap; while ( pOverlapWindow ) { if ( pOverlapWindow->IsVisible() ) @@ -441,7 +443,7 @@ void Window::ToTop( sal_uInt16 nFlags ) ImplFocusToTop( nFlags, IsReallyVisible() ); } -void Window::SetZOrder( Window* pRefWindow, sal_uInt16 nFlags ) +void Window::SetZOrder( vcl::Window* pRefWindow, sal_uInt16 nFlags ) { if ( mpWindowImpl->mpBorderWindow ) @@ -573,7 +575,7 @@ void Window::SetZOrder( Window* pRefWindow, sal_uInt16 nFlags ) // Invalidate all windows which are next to each other // Is INCOMPLETE !!! Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ); - Window* pWindow = NULL; + vcl::Window* pWindow = NULL; if ( ImplIsOverlapWindow() ) { if ( mpWindowImpl->mpOverlapWindow ) @@ -641,24 +643,24 @@ bool Window::IsTopWindow() const if( mpWindowImpl->mpWinData->mnIsTopWindow == (sal_uInt16)~0) // still uninitialized { // #113722#, cache result of expensive queryInterface call - Window *pThisWin = (Window*)this; + vcl::Window *pThisWin = (vcl::Window*)this; uno::Reference< XTopWindow > xTopWindow( pThisWin->GetComponentInterface(), UNO_QUERY ); pThisWin->mpWindowImpl->mpWinData->mnIsTopWindow = xTopWindow.is() ? 1 : 0; } return mpWindowImpl->mpWinData->mnIsTopWindow == 1 ? true : false; } -Window* Window::FindWindow( const Point& rPos ) const +vcl::Window* Window::FindWindow( const Point& rPos ) const { Point aPos = OutputToScreenPixel( rPos ); - return ((Window*)this)->ImplFindWindow( aPos ); + return ((vcl::Window*)this)->ImplFindWindow( aPos ); } -Window* Window::ImplFindWindow( const Point& rFramePos ) +vcl::Window* Window::ImplFindWindow( const Point& rFramePos ) { - Window* pTempWindow; - Window* pFindWindow; + vcl::Window* pTempWindow; + vcl::Window* pFindWindow; // first check all overlapping windows pTempWindow = mpWindowImpl->mpFirstOverlap; @@ -696,7 +698,7 @@ Window* Window::ImplFindWindow( const Point& rFramePos ) return NULL; } -bool Window::ImplIsRealParentPath( const Window* pWindow ) const +bool Window::ImplIsRealParentPath( const vcl::Window* pWindow ) const { pWindow = pWindow->GetParent(); while ( pWindow ) @@ -709,7 +711,7 @@ bool Window::ImplIsRealParentPath( const Window* pWindow ) const return false; } -bool Window::ImplIsChild( const Window* pWindow, bool bSystemWindow ) const +bool Window::ImplIsChild( const vcl::Window* pWindow, bool bSystemWindow ) const { do { @@ -726,7 +728,7 @@ bool Window::ImplIsChild( const Window* pWindow, bool bSystemWindow ) const return false; } -bool Window::ImplIsWindowOrChild( const Window* pWindow, bool bSystemWindow ) const +bool Window::ImplIsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow ) const { if ( this == pWindow ) return true; @@ -749,7 +751,7 @@ void Window::ImplResetReallyVisible() // TODO. It's kind of a hack that we're re-using the VCLEVENT_WINDOW_HIDE. Normally, we should // introduce another event which explicitly triggers the Accessibility implementations. - Window* pWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { if ( pWindow->mpWindowImpl->mbReallyVisible ) @@ -766,7 +768,7 @@ void Window::ImplResetReallyVisible() } } -void Window::ImplUpdateWindowPtr( Window* pWindow ) +void Window::ImplUpdateWindowPtr( vcl::Window* pWindow ) { if ( mpWindowImpl->mpFrameWindow != pWindow->mpWindowImpl->mpFrameWindow ) { @@ -783,7 +785,7 @@ void Window::ImplUpdateWindowPtr( Window* pWindow ) else mpWindowImpl->mpOverlapWindow = pWindow->mpWindowImpl->mpOverlapWindow; - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->ImplUpdateWindowPtr( pWindow ); @@ -793,7 +795,7 @@ void Window::ImplUpdateWindowPtr( Window* pWindow ) void Window::ImplUpdateWindowPtr() { - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->ImplUpdateWindowPtr( this ); @@ -806,7 +808,7 @@ void Window::ImplUpdateOverlapWindowPtr( bool bNewFrame ) bool bVisible = IsVisible(); Show( false ); ImplRemoveWindow( bNewFrame ); - Window* pRealParent = mpWindowImpl->mpRealParent; + vcl::Window* pRealParent = mpWindowImpl->mpRealParent; ImplInsertWindow( ImplGetParent() ); mpWindowImpl->mpRealParent = pRealParent; ImplUpdateWindowPtr(); @@ -815,10 +817,10 @@ void Window::ImplUpdateOverlapWindowPtr( bool bNewFrame ) if ( bNewFrame ) { - Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap; while ( pOverlapWindow ) { - Window* pNextOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext; + vcl::Window* pNextOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext; pOverlapWindow->ImplUpdateOverlapWindowPtr( bNewFrame ); pOverlapWindow = pNextOverlapWindow; } @@ -831,19 +833,19 @@ void Window::ImplUpdateOverlapWindowPtr( bool bNewFrame ) SystemWindow* Window::GetSystemWindow() const { - const Window* pWin = this; + const vcl::Window* pWin = this; while ( pWin && !pWin->IsSystemWindow() ) pWin = pWin->GetParent(); return (SystemWindow*)pWin; } -static SystemWindow *ImplGetLastSystemWindow( Window *pWin ) +static SystemWindow *ImplGetLastSystemWindow( vcl::Window *pWin ) { // get the most top-level system window, the one that contains the taskpanelist SystemWindow *pSysWin = NULL; if( !pWin ) return pSysWin; - Window *pMyParent = pWin; + vcl::Window *pMyParent = pWin; while ( pMyParent ) { if ( pMyParent->IsSystemWindow() ) @@ -853,7 +855,7 @@ static SystemWindow *ImplGetLastSystemWindow( Window *pWin ) return pSysWin; } -void Window::SetParent( Window* pNewParent ) +void Window::SetParent( vcl::Window* pNewParent ) { DBG_ASSERT( pNewParent, "Window::SetParent(): pParent == NULL" ); DBG_ASSERT( pNewParent != this, "someone tried to reparent a window to itself" ); @@ -877,8 +879,8 @@ void Window::SetParent( Window* pNewParent ) // remove ownerdraw decorated windows from list in the top-most frame window if( (GetStyle() & WB_OWNERDRAWDECORATION) && mpWindowImpl->mbFrame ) { - ::std::vector< Window* >& rList = ImplGetOwnerDrawList(); - ::std::vector< Window* >::iterator p; + ::std::vector< vcl::Window* >& rList = ImplGetOwnerDrawList(); + ::std::vector< vcl::Window* >::iterator p; p = ::std::find( rList.begin(), rList.end(), this ); if( p != rList.end() ) rList.erase( p ); @@ -903,8 +905,8 @@ void Window::SetParent( Window* pNewParent ) Show( false, SHOW_NOFOCUSCHANGE ); // check if the overlap window changes - Window* pOldOverlapWindow; - Window* pNewOverlapWindow = NULL; + vcl::Window* pOldOverlapWindow; + vcl::Window* pNewOverlapWindow = NULL; if ( ImplIsOverlapWindow() ) pOldOverlapWindow = NULL; else @@ -953,10 +955,10 @@ void Window::SetParent( Window* pNewParent ) { if ( bNewFrame ) { - Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap; while ( pOverlapWindow ) { - Window* pNextOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext; + vcl::Window* pNextOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext; pOverlapWindow->ImplUpdateOverlapWindowPtr( bNewFrame ); pOverlapWindow = pNextOverlapWindow; } @@ -970,10 +972,10 @@ void Window::SetParent( Window* pNewParent ) IsWindowOrChild( pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow )) ) pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow = NULL; - Window* pOverlapWindow = pOldOverlapWindow->mpWindowImpl->mpFirstOverlap; + vcl::Window* pOverlapWindow = pOldOverlapWindow->mpWindowImpl->mpFirstOverlap; while ( pOverlapWindow ) { - Window* pNextOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext; + vcl::Window* pNextOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext; if ( ImplIsRealParentPath( pOverlapWindow->ImplGetWindow() ) ) pOverlapWindow->ImplUpdateOverlapWindowPtr( bNewFrame ); pOverlapWindow = pNextOverlapWindow; @@ -1023,7 +1025,7 @@ sal_uInt16 Window::GetChildCount() const { sal_uInt16 nChildCount = 0; - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { nChildCount++; @@ -1033,11 +1035,11 @@ sal_uInt16 Window::GetChildCount() const return nChildCount; } -Window* Window::GetChild( sal_uInt16 nChild ) const +vcl::Window* Window::GetChild( sal_uInt16 nChild ) const { sal_uInt16 nChildCount = 0; - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { if ( nChild == nChildCount ) @@ -1049,7 +1051,7 @@ Window* Window::GetChild( sal_uInt16 nChild ) const return NULL; } -Window* Window::GetWindow( sal_uInt16 nType ) const +vcl::Window* Window::GetWindow( sal_uInt16 nType ) const { switch ( nType ) @@ -1077,7 +1079,7 @@ Window* Window::GetWindow( sal_uInt16 nType ) const case WINDOW_OVERLAP: if ( ImplIsOverlapWindow() ) - return (Window*)this; + return (vcl::Window*)this; else return mpWindowImpl->mpOverlapWindow; @@ -1088,7 +1090,7 @@ Window* Window::GetWindow( sal_uInt16 nType ) const return mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpOverlapWindow; case WINDOW_CLIENT: - return ((Window*)this)->ImplGetWindow(); + return ((vcl::Window*)this)->ImplGetWindow(); case WINDOW_REALPARENT: return ImplGetParent(); @@ -1099,7 +1101,7 @@ Window* Window::GetWindow( sal_uInt16 nType ) const case WINDOW_BORDER: if ( mpWindowImpl->mpBorderWindow ) return mpWindowImpl->mpBorderWindow->GetWindow( WINDOW_BORDER ); - return (Window*)this; + return (vcl::Window*)this; case WINDOW_FIRSTTOPWINDOWCHILD: return ImplGetWinData()->maTopWindowChildren.empty() ? NULL : *ImplGetWinData()->maTopWindowChildren.begin(); @@ -1111,8 +1113,8 @@ Window* Window::GetWindow( sal_uInt16 nType ) const { if ( !mpWindowImpl->mpRealParent ) return NULL; - const ::std::list< Window* >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren ); - ::std::list< Window* >::const_iterator myPos = + const ::std::list< vcl::Window* >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren ); + ::std::list< vcl::Window* >::const_iterator myPos = ::std::find( rTopWindows.begin(), rTopWindows.end(), this ); if ( myPos == rTopWindows.end() ) return NULL; @@ -1125,8 +1127,8 @@ Window* Window::GetWindow( sal_uInt16 nType ) const { if ( !mpWindowImpl->mpRealParent ) return NULL; - const ::std::list< Window* >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren ); - ::std::list< Window* >::const_iterator myPos = + const ::std::list< vcl::Window* >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren ); + ::std::list< vcl::Window* >::const_iterator myPos = ::std::find( rTopWindows.begin(), rTopWindows.end(), this ); if ( ( myPos == rTopWindows.end() ) || ( ++myPos == rTopWindows.end() ) ) return NULL; @@ -1138,7 +1140,7 @@ Window* Window::GetWindow( sal_uInt16 nType ) const return NULL; } -bool Window::IsChild( const Window* pWindow, bool bSystemWindow ) const +bool Window::IsChild( const vcl::Window* pWindow, bool bSystemWindow ) const { do { @@ -1155,7 +1157,7 @@ bool Window::IsChild( const Window* pWindow, bool bSystemWindow ) const return false; } -bool Window::IsWindowOrChild( const Window* pWindow, bool bSystemWindow ) const +bool Window::IsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow ) const { if ( this == pWindow ) @@ -1163,9 +1165,9 @@ bool Window::IsWindowOrChild( const Window* pWindow, bool bSystemWindow ) const return ImplIsChild( pWindow, bSystemWindow ); } -void Window::ImplSetFrameParent( const Window* pParent ) +void Window::ImplSetFrameParent( const vcl::Window* pParent ) { - Window* pFrameWindow = ImplGetSVData()->maWinData.mpFirstFrame; + vcl::Window* pFrameWindow = ImplGetSVData()->maWinData.mpFirstFrame; while( pFrameWindow ) { // search all frames that are children of this window @@ -1181,4 +1183,6 @@ void Window::ImplSetFrameParent( const Window* pParent ) } } +} /* namespace vcl */ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 6425ed4d8a9c..9adb1e1712e2 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -111,7 +111,7 @@ bool StatusBar::ImplIsItemUpdate() return false; } -void StatusBar::ImplInit( Window* pParent, WinBits nStyle ) +void StatusBar::ImplInit( vcl::Window* pParent, WinBits nStyle ) { mpImplData = new ImplData; @@ -142,7 +142,7 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle ) SetOutputSizePixel( CalcWindowSizePixel() ); } -StatusBar::StatusBar( Window* pParent, WinBits nStyle ) : +StatusBar::StatusBar( vcl::Window* pParent, WinBits nStyle ) : Window( WINDOW_STATUSBAR ) { ImplInit( pParent, nStyle ); @@ -458,7 +458,7 @@ void StatusBar::ImplDrawItem( bool bOffScreen, sal_uInt16 nPos, bool bDrawText, ImplCallEventListeners( VCLEVENT_STATUSBAR_DRAWITEM, (void*) sal_IntPtr(pItem->mnId) ); } -void DrawProgress( Window* pWindow, const Point& rPos, +void DrawProgress( vcl::Window* pWindow, const Point& rPos, long nOffset, long nPrgsWidth, long nPrgsHeight, sal_uInt16 nPercent1, sal_uInt16 nPercent2, sal_uInt16 nPercentCount, const Rectangle& rFramePosSize @@ -475,7 +475,7 @@ void DrawProgress( Window* pWindow, const Point& rPos, Rectangle aControlRegion( aDrawRect ); if( bNeedErase ) { - Window* pEraseWindow = pWindow; + vcl::Window* pEraseWindow = pWindow; while( pEraseWindow->IsPaintTransparent() && ! pEraseWindow->ImplGetWindowImpl()->mbFrame ) { diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx index 6fd6f04ea96f..b509d455d1cf 100644 --- a/vcl/source/window/syschild.cxx +++ b/vcl/source/window/syschild.cxx @@ -85,7 +85,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */, if ( !pWindow->ImplGetFrameData()->mnFocusId ) { pWindow->ImplGetFrameData()->mbStartFocusState = true; - pWindow->ImplGetFrameData()->mnFocusId = Application::PostUserEvent( LINK( pWindow->ImplGetFrameWindow(), Window, ImplAsyncFocusHdl ) ); + pWindow->ImplGetFrameData()->mnFocusId = Application::PostUserEvent( LINK( pWindow->ImplGetFrameWindow(), vcl::Window, ImplAsyncFocusHdl ) ); } break; @@ -107,7 +107,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */, return nRet; } -void SystemChildWindow::ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow ) +void SystemChildWindow::ImplInitSysChild( vcl::Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow ) { mpWindowImpl->mpSysObj = ImplGetSVData()->mpDefInst->CreateObject( pParent->ImplGetFrame(), pData, bShow ); @@ -122,13 +122,13 @@ void SystemChildWindow::ImplInitSysChild( Window* pParent, WinBits nStyle, Syste } } -SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle ) : +SystemChildWindow::SystemChildWindow( vcl::Window* pParent, WinBits nStyle ) : Window( WINDOW_SYSTEMCHILDWINDOW ) { ImplInitSysChild( pParent, nStyle, NULL ); } -SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow ) : +SystemChildWindow::SystemChildWindow( vcl::Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow ) : Window( WINDOW_SYSTEMCHILDWINDOW ) { ImplInitSysChild( pParent, nStyle, pData, bShow ); diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 60c80929355d..9666c34ad3ba 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -96,7 +96,7 @@ SystemWindow::SystemWindow(WindowType nType) Init(); } -void SystemWindow::loadUI(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, +void SystemWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame) { mbIsDefferedInit = true; @@ -119,7 +119,7 @@ bool SystemWindow::Notify( NotifyEvent& rNEvt ) MenuBar* pMBar = mpMenuBar; if ( !pMBar && ( GetType() == WINDOW_FLOATINGWINDOW ) ) { - Window* pWin = ImplGetFrameWindow()->ImplGetWindow(); + vcl::Window* pWin = ImplGetFrameWindow()->ImplGetWindow(); if( pWin && pWin->IsSystemWindow() ) pMBar = ((SystemWindow*)pWin)->GetMenuBar(); } @@ -148,7 +148,7 @@ bool SystemWindow::PreNotify( NotifyEvent& rNEvt ) TaskPaneList *pTList = mpImplData->mpTaskPaneList; if( !pTList && ( GetType() == WINDOW_FLOATINGWINDOW ) ) { - Window* pWin = ImplGetFrameWindow()->ImplGetWindow(); + vcl::Window* pWin = ImplGetFrameWindow()->ImplGetWindow(); if( pWin && pWin->IsSystemWindow() ) pTList = ((SystemWindow*)pWin)->mpImplData->mpTaskPaneList; } @@ -156,7 +156,7 @@ bool SystemWindow::PreNotify( NotifyEvent& rNEvt ) { // search topmost system window which is the one to handle dialog/toolbar cycling SystemWindow *pSysWin = this; - Window *pWin = this; + vcl::Window *pWin = this; while( pWin ) { pWin = pWin->GetParent(); @@ -182,7 +182,7 @@ TaskPaneList* SystemWindow::GetTaskPaneList() MenuBar* pMBar = mpMenuBar; if ( !pMBar && ( GetType() == WINDOW_FLOATINGWINDOW ) ) { - Window* pWin = ImplGetFrameWindow()->ImplGetWindow(); + vcl::Window* pWin = ImplGetFrameWindow()->ImplGetWindow(); if ( pWin && pWin->IsSystemWindow() ) pMBar = ((SystemWindow*)pWin)->GetMenuBar(); } @@ -205,7 +205,7 @@ bool SystemWindow::Close() return false; // Is Window not closeable, ignore close - Window* pBorderWin = ImplGetBorderWindow(); + vcl::Window* pBorderWin = ImplGetBorderWindow(); WinBits nStyle; if ( pBorderWin ) nStyle = pBorderWin->GetStyle(); @@ -241,7 +241,7 @@ void SystemWindow::SetRepresentedURL( const OUString& i_rURL ) mpImplData->maRepresentedURL = i_rURL; if ( !mbSysChild && bChanged ) { - const Window* pWindow = this; + const vcl::Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) pWindow = pWindow->mpWindowImpl->mpBorderWindow; @@ -259,7 +259,7 @@ void SystemWindow::SetIcon( sal_uInt16 nIcon ) if ( !mbSysChild ) { - const Window* pWindow = this; + const vcl::Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) pWindow = pWindow->mpWindowImpl->mpBorderWindow; @@ -273,7 +273,7 @@ void SystemWindow::EnableSaveBackground( bool bSave ) if( ImplGetSVData()->maWinData.mbNoSaveBackground ) bSave = false; - Window* pWindow = this; + vcl::Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) pWindow = pWindow->mpWindowImpl->mpBorderWindow; if ( pWindow->mpWindowImpl->mbOverlapWin && !pWindow->mpWindowImpl->mbFrame ) @@ -286,7 +286,7 @@ void SystemWindow::EnableSaveBackground( bool bSave ) bool SystemWindow::IsSaveBackgroundEnabled() const { - const Window* pWindow = this; + const vcl::Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) pWindow = pWindow->mpWindowImpl->mpBorderWindow; if ( pWindow->mpWindowImpl->mpOverlapData ) @@ -567,7 +567,7 @@ static OString ImplWindowStateToStr(const WindowStateData& rData) return rStrBuf.makeStringAndClear(); } -void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, Window* i_pConfigureWin ) +void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, vcl::Window* i_pConfigureWin ) { Rectangle aScreenRect; if( !Application::IsUnifiedDisplay() ) @@ -609,7 +609,7 @@ void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, lo bMove = true; io_rY = aScreenRect.Bottom() - i_nHeight; } - Window* pParent = i_pConfigureWin->GetParent(); + vcl::Window* pParent = i_pConfigureWin->GetParent(); if( bMove && pParent ) { // calculate absolute screen pos here, since that is what is contained in WindowState @@ -631,7 +631,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) if ( mbSysChild ) return; - Window* pWindow = this; + vcl::Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) pWindow = pWindow->mpWindowImpl->mpBorderWindow; @@ -675,7 +675,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) { Rectangle aDesktop = GetDesktopRectPixel(); ImplSVData *pSVData = ImplGetSVData(); - Window *pWin = pSVData->maWinData.mpFirstFrame; + vcl::Window *pWin = pSVData->maWinData.mpFirstFrame; bool bWrapped = false; while( pWin ) { @@ -784,7 +784,7 @@ void SystemWindow::GetWindowStateData( WindowStateData& rData ) const if ( mbSysChild ) return; - const Window* pWindow = this; + const vcl::Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) pWindow = pWindow->mpWindowImpl->mpBorderWindow; @@ -884,8 +884,8 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar, const css::uno::Reference<css:: if ( mpMenuBar != pMenuBar ) { MenuBar* pOldMenuBar = mpMenuBar; - Window* pOldWindow = NULL; - Window* pNewWindow=NULL; + vcl::Window* pOldWindow = NULL; + vcl::Window* pNewWindow=NULL; mpMenuBar = pMenuBar; if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) ) @@ -956,7 +956,7 @@ void SystemWindow::SetMenuBarMode( sal_uInt16 nMode ) } } -bool SystemWindow::ImplIsInTaskPaneList( Window* pWin ) +bool SystemWindow::ImplIsInTaskPaneList( vcl::Window* pWin ) { if( mpImplData && mpImplData->mpTaskPaneList ) return mpImplData->mpTaskPaneList->IsInList( pWin ); diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx index cbd60dc7abe4..b67b978d9166 100644 --- a/vcl/source/window/tabdlg.cxx +++ b/vcl/source/window/tabdlg.cxx @@ -39,9 +39,9 @@ void TabDialog::ImplPosControls() Size aCtrlSize( IMPL_MINSIZE_BUTTON_WIDTH, IMPL_MINSIZE_BUTTON_HEIGHT ); long nDownCtrl = 0; long nOffY = 0; - Window* pTabControl = NULL; + vcl::Window* pTabControl = NULL; - Window* pChild = GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window* pChild = GetWindow( WINDOW_FIRSTCHILD ); while ( pChild ) { if ( pChild->IsVisible() && (pChild != mpViewWindow) ) @@ -155,7 +155,7 @@ void TabDialog::ImplPosControls() if ( nCtrlBarWidth <= (aTabSize.Width()+nBtnEx) ) nX = (aTabSize.Width()+nBtnEx) - nCtrlBarWidth + IMPL_DIALOG_OFFSET; - Window* pChild2 = GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window* pChild2 = GetWindow( WINDOW_FIRSTCHILD ); while ( pChild2 ) { if ( pChild2->IsVisible() && (pChild2 != mpViewWindow) ) @@ -206,14 +206,14 @@ void TabDialog::ImplPosControls() mbPosControls = false; } -TabDialog::TabDialog( Window* pParent, WinBits nStyle ) : +TabDialog::TabDialog( vcl::Window* pParent, WinBits nStyle ) : Dialog( WINDOW_TABDIALOG ) { ImplInitTabDialogData(); ImplInit( pParent, nStyle ); } -TabDialog::TabDialog( Window* pParent, const OString& rID, const OUString& rUIXMLDescription ) : +TabDialog::TabDialog( vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription ) : Dialog(pParent, rID, rUIXMLDescription, WINDOW_TABDIALOG) { ImplInitTabDialogData(); diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index 655c334292c2..f96cbebd0cb7 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -31,7 +31,7 @@ #include <com/sun/star/accessibility/XAccessible.hpp> -void TabPage::ImplInit( Window* pParent, WinBits nStyle ) +void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle ) { if ( !(nStyle & WB_NODIALOGCONTROL) ) nStyle |= WB_DIALOGCONTROL; @@ -48,7 +48,7 @@ void TabPage::ImplInit( Window* pParent, WinBits nStyle ) void TabPage::ImplInitSettings() { - Window* pParent = GetParent(); + vcl::Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { EnableChildTransparentMode( true ); @@ -69,13 +69,13 @@ void TabPage::ImplInitSettings() } } -TabPage::TabPage( Window* pParent, WinBits nStyle ) : +TabPage::TabPage( vcl::Window* pParent, WinBits nStyle ) : Window( WINDOW_TABPAGE ) { ImplInit( pParent, nStyle ); } -TabPage::TabPage(Window *pParent, const OString& rID, const OUString& rUIXMLDescription) +TabPage::TabPage(vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription) : Window(WINDOW_TABPAGE) { ImplInit(pParent, 0); diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx index 29e70809bec6..f5cb91b4d57f 100644 --- a/vcl/source/window/taskpanelist.cxx +++ b/vcl/source/window/taskpanelist.cxx @@ -28,13 +28,13 @@ #include <algorithm> // can't have static linkage because SUNPRO 5.2 complains -Point ImplTaskPaneListGetPos( const Window *w ) +Point ImplTaskPaneListGetPos( const vcl::Window *w ) { Point pos; if( w->ImplIsDockingWindow() ) { pos = ((DockingWindow*)w)->GetPosPixel(); - Window *pF = ((DockingWindow*)w)->GetFloatingWindow(); + vcl::Window *pF = ((DockingWindow*)w)->GetFloatingWindow(); if( pF ) pos = pF->OutputToAbsoluteScreenPixel( pF->ScreenToOutputPixel( pos ) ); else @@ -47,9 +47,9 @@ Point ImplTaskPaneListGetPos( const Window *w ) } // compares window pos left-to-right -struct LTRSort : public ::std::binary_function< const Window*, const Window*, bool > +struct LTRSort : public ::std::binary_function< const vcl::Window*, const vcl::Window*, bool > { - bool operator()( const Window* w1, const Window* w2 ) const + bool operator()( const vcl::Window* w1, const vcl::Window* w2 ) const { Point pos1(ImplTaskPaneListGetPos( w1 )); Point pos2(ImplTaskPaneListGetPos( w2 )); @@ -60,9 +60,9 @@ struct LTRSort : public ::std::binary_function< const Window*, const Window*, bo return ( pos1.X() < pos2.X() ); } }; -struct LTRSortBackward : public ::std::binary_function< const Window*, const Window*, bool > +struct LTRSortBackward : public ::std::binary_function< const vcl::Window*, const vcl::Window*, bool > { - bool operator()( const Window* w2, const Window* w1 ) const + bool operator()( const vcl::Window* w2, const vcl::Window* w1 ) const { Point pos1(ImplTaskPaneListGetPos( w1 )); Point pos2(ImplTaskPaneListGetPos( w2 )); @@ -74,7 +74,7 @@ struct LTRSortBackward : public ::std::binary_function< const Window*, const Win } }; -static void ImplTaskPaneListGrabFocus( Window *pWindow, bool bForward ) +static void ImplTaskPaneListGrabFocus( vcl::Window *pWindow, bool bForward ) { // put focus in child of floating windows which is typically a toolbar // that can deal with the focus @@ -91,12 +91,12 @@ TaskPaneList::~TaskPaneList() { } -void TaskPaneList::AddWindow( Window *pWindow ) +void TaskPaneList::AddWindow( vcl::Window *pWindow ) { if( pWindow ) { - ::std::vector< Window* >::iterator insertionPos = mTaskPanes.end(); - for ( ::std::vector< Window* >::iterator p = mTaskPanes.begin(); + ::std::vector< vcl::Window* >::iterator insertionPos = mTaskPanes.end(); + for ( ::std::vector< vcl::Window* >::iterator p = mTaskPanes.begin(); p != mTaskPanes.end(); ++p ) @@ -129,9 +129,9 @@ void TaskPaneList::AddWindow( Window *pWindow ) } } -void TaskPaneList::RemoveWindow( Window *pWindow ) +void TaskPaneList::RemoveWindow( vcl::Window *pWindow ) { - ::std::vector< Window* >::iterator p; + ::std::vector< vcl::Window* >::iterator p; p = ::std::find( mTaskPanes.begin(), mTaskPanes.end(), pWindow ); if( p != mTaskPanes.end() ) { @@ -140,9 +140,9 @@ void TaskPaneList::RemoveWindow( Window *pWindow ) } } -bool TaskPaneList::IsInList( Window *pWindow ) +bool TaskPaneList::IsInList( vcl::Window *pWindow ) { - ::std::vector< Window* >::iterator p; + ::std::vector< vcl::Window* >::iterator p; p = ::std::find( mTaskPanes.begin(), mTaskPanes.end(), pWindow ); if( p != mTaskPanes.end() ) return true; @@ -171,10 +171,10 @@ bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) bSplitterOnly = aKeyCode.IsMod1() && aKeyCode.IsShift(); // is the focus in the list ? - ::std::vector< Window* >::iterator p = mTaskPanes.begin(); + ::std::vector< vcl::Window* >::iterator p = mTaskPanes.begin(); while( p != mTaskPanes.end() ) { - Window *pWin = *p; + vcl::Window *pWin = *p; if( pWin->HasChildPathFocus( true ) ) { bFocusInList = true; @@ -187,7 +187,7 @@ bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) } // activate next task pane - Window *pNextWin = NULL; + vcl::Window *pNextWin = NULL; if( bSplitterOnly ) pNextWin = FindNextSplitter( *p, true ); @@ -220,7 +220,7 @@ bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) // the focus is not in the list: activate first float if F6 was pressed if( !bFocusInList ) { - Window *pWin; + vcl::Window *pWin; if( bSplitterOnly ) pWin = FindNextSplitter( NULL, true ); else @@ -237,14 +237,14 @@ bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) } // returns next splitter -Window* TaskPaneList::FindNextSplitter( Window *pWindow, bool bForward ) +vcl::Window* TaskPaneList::FindNextSplitter( vcl::Window *pWindow, bool bForward ) { if( bForward ) ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() ); else ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSortBackward() ); - ::std::vector< Window* >::iterator p = mTaskPanes.begin(); + ::std::vector< vcl::Window* >::iterator p = mTaskPanes.begin(); while( p != mTaskPanes.end() ) { if( !pWindow || *p == pWindow ) @@ -274,14 +274,14 @@ Window* TaskPaneList::FindNextSplitter( Window *pWindow, bool bForward ) } // returns first valid item (regardless of type) if pWindow==0, otherwise returns next valid float -Window* TaskPaneList::FindNextFloat( Window *pWindow, bool bForward ) +vcl::Window* TaskPaneList::FindNextFloat( vcl::Window *pWindow, bool bForward ) { if( bForward ) ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() ); else ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSortBackward() ); - ::std::vector< Window* >::iterator p = mTaskPanes.begin(); + ::std::vector< vcl::Window* >::iterator p = mTaskPanes.begin(); while( p != mTaskPanes.end() ) { if( !pWindow || *p == pWindow ) diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 91059ff9fe5c..c42f80f5a45f 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -548,9 +548,9 @@ void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, bool bHighlight // to have the same highlight color (transparency in DrawSelectionBackground()) // items with open popups will also painted using a constant color if( !pThis->mpData->mbNativeButtons && - (bHighlight || ! (((Window*) pThis)->GetStyle() & WB_3DLOOK ) ) ) + (bHighlight || ! (((vcl::Window*) pThis)->GetStyle() & WB_3DLOOK ) ) ) { - if( (((Window*) pThis)->GetStyle() & WB_3DLOOK ) ) + if( (((vcl::Window*) pThis)->GetStyle() & WB_3DLOOK ) ) { pThis->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR ); pThis->SetLineColor(); @@ -1349,7 +1349,7 @@ IMPL_LINK( ImplTBDragMgr, SelectHdl, Accelerator*, pAccel ) return (long) true; } -void ToolBox::ImplInit( Window* pParent, WinBits nStyle ) +void ToolBox::ImplInit( vcl::Window* pParent, WinBits nStyle ) { // initialize variables @@ -1547,16 +1547,16 @@ void ToolBox::ImplLoadRes( const ResId& rResId ) } } -ToolBox::ToolBox( Window* pParent, WinBits nStyle ) : +ToolBox::ToolBox( vcl::Window* pParent, WinBits nStyle ) : DockingWindow( WINDOW_TOOLBOX ) { ImplInit( pParent, nStyle ); } -ToolBox::ToolBox( Window* pParent, const ResId& rResId ) : +ToolBox::ToolBox( vcl::Window* pParent, const ResId& rResId ) : DockingWindow( WINDOW_TOOLBOX ) { - SAL_INFO( "vcl.window", "vcl: ToolBox::ToolBox( Window* pParent, const ResId& rResId )" ); + SAL_INFO( "vcl.window", "vcl: ToolBox::ToolBox( vcl::Window* pParent, const ResId& rResId )" ); rResId.SetRT( RSC_TOOLBOX ); WinBits nStyle = ImplInitRes( rResId ); @@ -3547,7 +3547,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) // eg, in a edit control // and do not highlight when focus is in a different toolbox bool bDrawHotSpot = true; - Window *pWin = Application::GetFocusWindow(); + vcl::Window *pWin = Application::GetFocusWindow(); if( pWin && pWin->ImplGetWindowImpl()->mbToolBox && pWin != this ) bDrawHotSpot = false; @@ -4084,7 +4084,7 @@ void ToolBox::Resize() { if (mpData->m_aItems[i].mbExpand) { - Window *pWindow = mpData->m_aItems[i].mpWindow; + vcl::Window *pWindow = mpData->m_aItems[i].mpWindow; SAL_WARN_IF(!pWindow, "vcl.layout", "only tabitems with window supported at the moment"); if (!pWindow) continue; @@ -4124,7 +4124,7 @@ void ToolBox::Resize() for (size_t i = 0; i < aExpandables.size(); ++i) { size_t nIndex = aExpandables[i]; - Window *pWindow = mpData->m_aItems[nIndex].mpWindow; + vcl::Window *pWindow = mpData->m_aItems[nIndex].mpWindow; Size aWinSize(pWindow->GetSizePixel()); Size aPrefSize(pWindow->get_preferred_size()); aWinSize.Width() = aPrefSize.Width() + nDiff; @@ -4275,7 +4275,7 @@ bool ToolBox::Notify( NotifyEvent& rNEvt ) { // internal TAB cycling only if parent is not a dialog or if we are the only child // otherwise the dialog control will take over - Window *pParent = ImplGetParent(); + vcl::Window *pParent = ImplGetParent(); bool bOldSchoolContainer = ((pParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) == WB_DIALOGCONTROL && pParent->GetChildCount() != 1); @@ -4713,12 +4713,12 @@ Size ToolBox::GetOptimalSize() const { // If we have any expandable entries, then force them to their // optimal sizes, then reset them afterwards - std::map<Window*, Size> aExpandables; + std::map<vcl::Window*, Size> aExpandables; for (size_t i = 0; i < mpData->m_aItems.size(); ++i) { if (mpData->m_aItems[i].mbExpand) { - Window *pWindow = mpData->m_aItems[i].mpWindow; + vcl::Window *pWindow = mpData->m_aItems[i].mpWindow; SAL_WARN_IF(!pWindow, "vcl.layout", "only tabitems with window supported at the moment"); if (!pWindow) continue; @@ -4732,9 +4732,9 @@ Size ToolBox::GetOptimalSize() const Size aSize(ImplCalcSize( this, mnLines )); - for (std::map<Window*, Size>::iterator aI = aExpandables.begin(); aI != aExpandables.end(); ++aI) + for (std::map<vcl::Window*, Size>::iterator aI = aExpandables.begin(); aI != aExpandables.end(); ++aI) { - Window *pWindow = aI->first; + vcl::Window *pWindow = aI->first; Size aWinSize = aI->second; pWindow->SetSizePixel(aWinSize); } @@ -4958,7 +4958,7 @@ bool ToolBox::ImplActivateItem( vcl::KeyCode aKeyCode ) return bRet; } -bool ImplCloseLastPopup( Window *pParent ) +bool ImplCloseLastPopup( vcl::Window *pParent ) { // close last popup toolbox (see also: // ImplHandleMouseFloatMode(...) in winproc.cxx ) @@ -5029,7 +5029,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) mnKeyModifier = aKeyCode.GetModifier(); sal_uInt16 nCode = aKeyCode.GetCode(); - Window *pParent = ImplGetParent(); + vcl::Window *pParent = ImplGetParent(); bool bOldSchoolContainer = ((pParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) == WB_DIALOGCONTROL); bool bParentIsContainer = bOldSchoolContainer || isContainerWindow(pParent); @@ -5128,7 +5128,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) else { // send focus to document pane - Window *pWin = this; + vcl::Window *pWin = this; while( pWin ) { if( !pWin->GetParent() ) @@ -5166,7 +5166,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) // #i13931# forward alphanum keyinput into embedded control if( (aKeyGroup == KEYGROUP_NUM || aKeyGroup == KEYGROUP_ALPHA ) && pItem && pItem->mpWindow && pItem->mbEnabled ) { - Window *pFocusWindow = Application::GetFocusWindow(); + vcl::Window *pFocusWindow = Application::GetFocusWindow(); ImplHideFocus(); mbChangingHighlight = true; // avoid focus change due to loss of focus pItem->mpWindow->ImplControlFocus( GETFOCUS_TAB ); @@ -5193,7 +5193,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if (HasFocus() && mpData->mbKeyInputDisabled && bParentIsContainer) { sal_uInt16 n = 0; - Window *pFocusControl = pParent->ImplGetDlgWindow( n, DLGWINDOW_FIRST ); + vcl::Window *pFocusControl = pParent->ImplGetDlgWindow( n, DLGWINDOW_FIRST ); if ( pFocusControl && pFocusControl != this ) pFocusControl->ImplControlFocus( GETFOCUS_INIT ); } @@ -5532,7 +5532,7 @@ void ToolBox::ImplShowFocus() ImplToolItem* pItem = ImplGetItem( mnHighItemId ); if( pItem->mpWindow ) { - Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow; + vcl::Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow; pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = true; pWin->Invalidate( 0 ); } @@ -5546,7 +5546,7 @@ void ToolBox::ImplHideFocus() ImplToolItem* pItem = ImplGetItem( mnHighItemId ); if( pItem->mpWindow ) { - Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow; + vcl::Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow; pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = false; pWin->Invalidate( 0 ); } diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 0f2731fcef75..2f8e1fdf663c 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -636,7 +636,7 @@ void ToolBox::InsertItem(const OUString& rCommand, const uno::Reference<frame::X pItem->maMinimalItemSize = rRequestedSize; } -void ToolBox::InsertWindow( sal_uInt16 nItemId, Window* pWindow, +void ToolBox::InsertWindow( sal_uInt16 nItemId, vcl::Window* pWindow, ToolBoxItemBits nBits, sal_uInt16 nPos ) { DBG_ASSERT( nItemId, "ToolBox::InsertWindow(): ItemId == 0" ); @@ -1301,7 +1301,7 @@ const OUString& ToolBox::GetItemText( sal_uInt16 nItemId ) const return pItem->maText; } -void ToolBox::SetItemWindow( sal_uInt16 nItemId, Window* pNewWindow ) +void ToolBox::SetItemWindow( sal_uInt16 nItemId, vcl::Window* pNewWindow ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1316,7 +1316,7 @@ void ToolBox::SetItemWindow( sal_uInt16 nItemId, Window* pNewWindow ) } } -Window* ToolBox::GetItemWindow( sal_uInt16 nItemId ) const +vcl::Window* ToolBox::GetItemWindow( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1910,7 +1910,7 @@ void ToolBox::ImplExecuteCustomMenu() ImplDelData aBorderDel; bool bBorderDel = false; - Window *pWin = this; + vcl::Window *pWin = this; Rectangle aMenuRect = mpData->maMenubuttonItem.maRect; if( IsFloatingMode() ) { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index da309e446b8a..74ad67bf23af 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -81,19 +81,21 @@ using namespace ::com::sun::star::datatransfer::dnd; using ::com::sun::star::awt::XTopWindow; +namespace vcl { + Window::Window( WindowType nType ) { ImplInitWindowData( nType ); } -Window::Window( Window* pParent, WinBits nStyle ) +Window::Window( vcl::Window* pParent, WinBits nStyle ) { ImplInitWindowData( WINDOW_WINDOW ); ImplInit( pParent, nStyle, NULL ); } -Window::Window( Window* pParent, const ResId& rResId ) +Window::Window( vcl::Window* pParent, const ResId& rResId ) : mpWindowImpl(NULL) { rResId.SetRT( RSC_WINDOW ); @@ -109,10 +111,10 @@ Window::Window( Window* pParent, const ResId& rResId ) #if OSL_DEBUG_LEVEL > 0 namespace { - OString lcl_createWindowInfo(const Window& i_rWindow) + OString lcl_createWindowInfo(const vcl::Window& i_rWindow) { // skip border windows, they don't carry information which helps diagnosing the problem - const Window* pWindow( &i_rWindow ); + const vcl::Window* pWindow( &i_rWindow ); while ( pWindow && ( pWindow->GetType() == WINDOW_BORDERWINDOW ) ) pWindow = pWindow->GetWindow( WINDOW_FIRSTCHILD ); if ( !pWindow ) @@ -131,7 +133,7 @@ namespace Window::~Window() { - vcl::LazyDeletor<Window>::Undelete( this ); + vcl::LazyDeletor<vcl::Window>::Undelete( this ); DBG_ASSERT( !mpWindowImpl->mbInDtor, "~Window - already in DTOR!" ); @@ -163,8 +165,8 @@ Window::~Window() // remove ownerdraw decorated windows from list in the top-most frame window if( (GetStyle() & WB_OWNERDRAWDECORATION) && mpWindowImpl->mbFrame ) { - ::std::vector< Window* >& rList = ImplGetOwnerDrawList(); - ::std::vector< Window* >::iterator p; + ::std::vector< vcl::Window* >& rList = ImplGetOwnerDrawList(); + ::std::vector< vcl::Window* >::iterator p; p = ::std::find( rList.begin(), rList.end(), this ); if( p != rList.end() ) rList.erase( p ); @@ -246,7 +248,7 @@ Window::~Window() { OStringBuffer aErrorStr; bool bError = false; - Window* pTempWin; + vcl::Window* pTempWin; if (mpWindowImpl->mpFrameData != 0) { pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap; @@ -325,7 +327,7 @@ Window::~Window() Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed! } - Window* pMyParent = GetParent(); + vcl::Window* pMyParent = GetParent(); SystemWindow* pMySysWin = NULL; while ( pMyParent ) @@ -349,7 +351,7 @@ Window::~Window() if( mpWindowImpl->mbIsInTaskPaneList ) { - Window* pMyParent = GetParent(); + vcl::Window* pMyParent = GetParent(); SystemWindow* pMySysWin = NULL; while ( pMyParent ) @@ -418,7 +420,7 @@ Window::~Window() } // if we get focus pass focus to another window - Window* pOverlapWindow = ImplGetFirstOverlapWindow(); + vcl::Window* pOverlapWindow = ImplGetFirstOverlapWindow(); if ( pSVData->maWinData.mpFocusWin == this || bHasFocussedChild ) // #122232#, see above, try some cleanup { @@ -430,8 +432,8 @@ Window::~Window() } else { - Window* pParent = GetParent(); - Window* pBorderWindow = mpWindowImpl->mpBorderWindow; + vcl::Window* pParent = GetParent(); + vcl::Window* pBorderWindow = mpWindowImpl->mpBorderWindow; // when windows overlap, give focus to the parent // of the next FrameWindow if ( pBorderWindow ) @@ -512,7 +514,7 @@ Window::~Window() { ImplWinData* pParentWinData = mpWindowImpl->mpRealParent->ImplGetWinData(); - ::std::list< Window* >::iterator myPos = ::std::find( pParentWinData->maTopWindowChildren.begin(), + ::std::list< vcl::Window* >::iterator myPos = ::std::find( pParentWinData->maTopWindowChildren.begin(), pParentWinData->maTopWindowChildren.end(), this ); DBG_ASSERT( myPos != pParentWinData->maTopWindowChildren.end(), "Window::~Window: inconsistency in top window chain!" ); if ( myPos != pParentWinData->maTopWindowChildren.end() ) @@ -552,7 +554,7 @@ Window::~Window() pSVData->maWinData.mpFirstFrame = mpWindowImpl->mpFrameData->mpNextFrame; else { - Window* pSysWin = pSVData->maWinData.mpFirstFrame; + vcl::Window* pSysWin = pSVData->maWinData.mpFirstFrame; while ( pSysWin->mpWindowImpl->mpFrameData->mpNextFrame != this ) pSysWin = pSysWin->mpWindowImpl->mpFrameData->mpNextFrame; pSysWin->mpWindowImpl->mpFrameData->mpNextFrame = mpWindowImpl->mpFrameData->mpNextFrame; @@ -566,6 +568,8 @@ Window::~Window() delete mpWindowImpl; mpWindowImpl = NULL; } +} /* namespace vcl */ + WindowImpl::WindowImpl( WindowType nType ) { maZoom = Fraction( 1, 1 ); @@ -726,6 +730,8 @@ WindowImpl::~WindowImpl() delete mpControlFont; } +namespace vcl { + bool Window::AcquireGraphics() const { DBG_TESTSOLARMUTEX(); @@ -749,7 +755,7 @@ bool Window::AcquireGraphics() const OutputDevice* pReleaseOutDev = pSVData->maGDIData.mpLastWinGraphics; while ( pReleaseOutDev ) { - if ( ((Window*)pReleaseOutDev)->mpWindowImpl->mpFrame == mpWindowImpl->mpFrame ) + if ( ((vcl::Window*)pReleaseOutDev)->mpWindowImpl->mpFrame == mpWindowImpl->mpFrame ) break; pReleaseOutDev = pReleaseOutDev->mpPrevGraphics; } @@ -777,11 +783,11 @@ bool Window::AcquireGraphics() const if ( mpGraphics ) { mpNextGraphics = pSVData->maGDIData.mpFirstWinGraphics; - pSVData->maGDIData.mpFirstWinGraphics = const_cast<Window*>(this); + pSVData->maGDIData.mpFirstWinGraphics = const_cast<vcl::Window*>(this); if ( mpNextGraphics ) - mpNextGraphics->mpPrevGraphics = const_cast<Window*>(this); + mpNextGraphics->mpPrevGraphics = const_cast<vcl::Window*>(this); if ( !pSVData->maGDIData.mpLastWinGraphics ) - pSVData->maGDIData.mpLastWinGraphics = const_cast<Window*>(this); + pSVData->maGDIData.mpLastWinGraphics = const_cast<vcl::Window*>(this); } if ( mpGraphics ) @@ -806,7 +812,7 @@ void Window::ReleaseGraphics( bool bRelease ) ImplSVData* pSVData = ImplGetSVData(); - Window* pWindow = (Window*)this; + vcl::Window* pWindow = (vcl::Window*)this; if ( bRelease ) pWindow->mpWindowImpl->mpFrame->ReleaseGraphics( mpGraphics ); @@ -844,12 +850,12 @@ static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI) return nResult; } -void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData ) +void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData ) { DBG_ASSERT( mpWindowImpl->mbFrame || pParent, "Window::Window(): pParent == NULL" ); ImplSVData* pSVData = ImplGetSVData(); - Window* pRealParent = pParent; + vcl::Window* pRealParent = pParent; // inherit 3D look if ( !mpWindowImpl->mbOverlapWin && pParent && (pParent->GetStyle() & WB_3DLOOK) ) @@ -870,7 +876,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste nStyle |= WB_BORDER; } ImplBorderWindow* pBorderWin = new ImplBorderWindow( pParent, nStyle & (WB_BORDER | WB_DIALOGCONTROL | WB_NODIALOGCONTROL | WB_NEEDSFOCUS), nBorderTypeStyle ); - ((Window*)pBorderWin)->mpWindowImpl->mpClientWindow = this; + ((vcl::Window*)pBorderWin)->mpWindowImpl->mpClientWindow = this; pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder ); mpWindowImpl->mpBorderWindow = pBorderWin; pParent = mpWindowImpl->mpBorderWindow; @@ -1128,7 +1134,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste GetAccessibleParentWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_CHILDCREATED, this ); } -void Window::ImplInitAppFontData( Window* pWindow ) +void Window::ImplInitAppFontData( vcl::Window* pWindow ) { ImplSVData* pSVData = ImplGetSVData(); long nTextHeight = pWindow->GetTextHeight(); @@ -1192,7 +1198,7 @@ ImplWinData* Window::ImplGetWinData() const { static const char* pNoNWF = getenv( "SAL_NO_NWF" ); - ((Window*)this)->mpWindowImpl->mpWinData = new ImplWinData; + ((vcl::Window*)this)->mpWindowImpl->mpWinData = new ImplWinData; mpWindowImpl->mpWinData->mpExtOldText = NULL; mpWindowImpl->mpWinData->mpExtOldAttrAry = NULL; mpWindowImpl->mpWinData->mpCursorRect = NULL; @@ -1278,20 +1284,6 @@ bool Window::ImplCheckUIFont( const vcl::Font& rFont ) return bUIFontOk; } -bool ImplDoTiledRendering() -{ -#if !HAVE_FEATURE_DESKTOP - // We do tiled rendering only for iOS at the moment, actually, but - // let's see what happens if we assume it for Android, too. - return true; -#else - // We need some way to know globally if this process will use - // tiled rendering or not. Or should this be a per-window setting? - // Or what? - return false; -#endif -} - SalGraphics* Window::ImplGetFrameGraphics() const { if ( mpWindowImpl->mpFrameWindow->mpGraphics ) @@ -1330,7 +1322,7 @@ void Window::ImplSetReallyVisible() // TODO. It's kind of a hack that we're re-using the VCLEVENT_WINDOW_SHOW. Normally, we should // introduce another event which explicitly triggers the Accessibility implementations. - Window* pWindow = mpWindowImpl->mpFirstOverlap; + vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { if ( pWindow->mpWindowImpl->mbVisible ) @@ -1464,13 +1456,13 @@ bool Window::ImplUpdatePos() } else { - Window* pParent = ImplGetParent(); + vcl::Window* pParent = ImplGetParent(); mnOutOffX = mpWindowImpl->mnX + pParent->mnOutOffX; mnOutOffY = mpWindowImpl->mnY + pParent->mnOutOffY; } - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { if ( pChild->ImplUpdatePos() ) @@ -1489,7 +1481,7 @@ void Window::ImplUpdateSysObjPos() if ( mpWindowImpl->mpSysObj ) mpWindowImpl->mpSysObj->SetPosSize( mnOutOffX, mnOutOffY, mnOutWidth, mnOutHeight ); - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->ImplUpdateSysObjPos(); @@ -1804,7 +1796,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, void Window::ImplNewInputContext() { ImplSVData* pSVData = ImplGetSVData(); - Window* pFocusWin = pSVData->maWinData.mpFocusWin; + vcl::Window* pFocusWin = pSVData->maWinData.mpFocusWin; if ( !pFocusWin ) return; @@ -1855,7 +1847,7 @@ void Window::doLazyDelete() Show( false ); SetParent( ImplGetDefaultWindow() ); } - vcl::LazyDeletor<Window>::Delete( this ); + vcl::LazyDeletor<vcl::Window>::Delete( this ); } sal_uInt16 Window::GetIndicatorState() const @@ -2011,7 +2003,7 @@ bool Window::IsLocked( bool bChildren ) const if ( bChildren || mpWindowImpl->mbChildNotify ) { - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { if ( pChild->IsLocked( true ) ) @@ -2039,7 +2031,7 @@ void Window::SetExtendedStyle( WinBits nExtendedStyle ) if ( mpWindowImpl->mnExtendedStyle != nExtendedStyle ) { - Window* pWindow = ImplGetBorderWindow(); + vcl::Window* pWindow = ImplGetBorderWindow(); if( ! pWindow ) pWindow = this; if( pWindow->mpWindowImpl->mbFrame ) @@ -2071,7 +2063,7 @@ void Window::SetBorderStyle( sal_uInt16 nBorderStyle ) // this is a little awkward: some controls (e.g. svtools ProgressBar) // cannot avoid getting constructed with WB_BORDER but want to disable // borders in case of NWF drawing. So they need a method to remove their border window - Window* pBorderWin = mpWindowImpl->mpBorderWindow; + vcl::Window* pBorderWin = mpWindowImpl->mpBorderWindow; // remove us as border window's client pBorderWin->mpWindowImpl->mpClientWindow = NULL; mpWindowImpl->mpBorderWindow = NULL; @@ -2128,9 +2120,9 @@ long Window::CalcTitleWidth() const // border of external dialogs const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); vcl::Font aFont = GetFont(); - ((Window*)this)->SetPointFont( rStyleSettings.GetTitleFont() ); + ((vcl::Window*)this)->SetPointFont( rStyleSettings.GetTitleFont() ); long nTitleWidth = GetTextWidth( GetText() ); - ((Window*)this)->SetFont( aFont ); + ((vcl::Window*)this)->SetFont( aFont ); nTitleWidth += rStyleSettings.GetTitleHeight() * 3; nTitleWidth += rStyleSettings.GetBorderSize() * 2; nTitleWidth += 10; @@ -2208,11 +2200,11 @@ void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLe } } -void Window::CollectChildren(::std::vector<Window *>& rAllChildren ) +void Window::CollectChildren(::std::vector<vcl::Window *>& rAllChildren ) { rAllChildren.push_back( this ); - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->CollectChildren( rAllChildren ); @@ -2357,7 +2349,7 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) StateChanged( STATE_CHANGE_VISIBLE ); - Window* pTestParent; + vcl::Window* pTestParent; if ( ImplIsOverlapWindow() ) pTestParent = mpWindowImpl->mpOverlapWindow; else @@ -2547,7 +2539,7 @@ void Window::Enable( bool bEnable, bool bChild ) if ( bChild || mpWindowImpl->mbChildNotify ) { - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->Enable( bEnable, bChild ); @@ -2563,7 +2555,7 @@ void Window::SetCallHandlersOnInputDisabled( bool bCall ) { mpWindowImpl->mbCallHandlersDuringInputDisabled = bCall ? true : false; - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->SetCallHandlersOnInputDisabled( bCall ); @@ -2620,7 +2612,7 @@ void Window::EnableInput( bool bEnable, bool bChild ) if ( bChild || mpWindowImpl->mbChildNotify ) { - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->EnableInput( bEnable, bChild ); @@ -2640,7 +2632,7 @@ void Window::EnableInput( bool bEnable, bool bChild ) } void Window::EnableInput( bool bEnable, bool bChild, bool bSysWin, - const Window* pExcludeWindow ) + const vcl::Window* pExcludeWindow ) { EnableInput( bEnable, bChild ); @@ -2650,7 +2642,7 @@ void Window::EnableInput( bool bEnable, bool bChild, bool bSysWin, // shouldn't be the case, than this must be changed in dialog.cxx if( pExcludeWindow ) pExcludeWindow = pExcludeWindow->ImplGetFirstOverlapWindow(); - Window* pSysWin = mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrameData->mpFirstOverlap; + vcl::Window* pSysWin = mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrameData->mpFirstOverlap; while ( pSysWin ) { // Is Window in the path from this window @@ -2665,7 +2657,7 @@ void Window::EnableInput( bool bEnable, bool bChild, bool bSysWin, } // enable/disable floating system windows as well - Window* pFrameWin = ImplGetSVData()->maWinData.mpFirstFrame; + vcl::Window* pFrameWin = ImplGetSVData()->maWinData.mpFirstFrame; while ( pFrameWin ) { if( pFrameWin->ImplIsFloatingWindow() ) @@ -2685,8 +2677,8 @@ void Window::EnableInput( bool bEnable, bool bChild, bool bSysWin, // the same for ownerdraw floating windows if( mpWindowImpl->mbFrame ) { - ::std::vector< Window* >& rList = mpWindowImpl->mpFrameData->maOwnerDrawList; - ::std::vector< Window* >::iterator p = rList.begin(); + ::std::vector< vcl::Window* >& rList = mpWindowImpl->mpFrameData->maOwnerDrawList; + ::std::vector< vcl::Window* >::iterator p = rList.begin(); while( p != rList.end() ) { // Is Window in the path from this window @@ -2723,7 +2715,7 @@ void Window::AlwaysEnableInput( bool bAlways, bool bChild ) if ( bChild || mpWindowImpl->mbChildNotify ) { - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->AlwaysEnableInput( bAlways, bChild ); @@ -2752,7 +2744,7 @@ void Window::AlwaysDisableInput( bool bAlways, bool bChild ) if ( bChild || mpWindowImpl->mbChildNotify ) { - Window* pChild = mpWindowImpl->mpFirstChild; + vcl::Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { pChild->AlwaysDisableInput( bAlways, bChild ); @@ -2804,7 +2796,7 @@ void Window::setPosSizePixel( long nX, long nY, mpWindowImpl->mbDefSize = false; // The top BorderWindow is the window which is to be positioned - Window* pWindow = this; + vcl::Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) pWindow = pWindow->mpWindowImpl->mpBorderWindow; @@ -2821,7 +2813,7 @@ void Window::setPosSizePixel( long nX, long nY, nHeight = pWindow->mnOutHeight; sal_uInt16 nSysFlags=0; - Window *pParent = GetParent(); + vcl::Window *pParent = GetParent(); if( nFlags & WINDOW_POSSIZE_WIDTH ) nSysFlags |= SAL_FRAME_POSSIZE_WIDTH; @@ -2970,14 +2962,14 @@ long Window::ImplGetUnmirroredOutOffX() Point Window::OutputToNormalizedScreenPixel( const Point& rPos ) const { // relative to top level parent - long offx = ((Window*) this)->ImplGetUnmirroredOutOffX(); + long offx = ((vcl::Window*) this)->ImplGetUnmirroredOutOffX(); return Point( rPos.X()+offx, rPos.Y()+mnOutOffY ); } Point Window::NormalizedScreenToOutputPixel( const Point& rPos ) const { // relative to top level parent - long offx = ((Window*) this)->ImplGetUnmirroredOutOffX(); + long offx = ((vcl::Window*) this)->ImplGetUnmirroredOutOffX(); return Point( rPos.X()-offx, rPos.Y()-mnOutOffY ); } @@ -3018,24 +3010,24 @@ Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rR return Rectangle( p1, p2 ); } -Rectangle Window::GetWindowExtentsRelative( Window *pRelativeWindow ) const +Rectangle Window::GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const { // with decoration return ImplGetWindowExtentsRelative( pRelativeWindow, false ); } -Rectangle Window::GetClientWindowExtentsRelative( Window *pRelativeWindow ) const +Rectangle Window::GetClientWindowExtentsRelative( vcl::Window *pRelativeWindow ) const { // without decoration return ImplGetWindowExtentsRelative( pRelativeWindow, true ); } -Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, bool bClientOnly ) const +Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bool bClientOnly ) const { SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry(); // make sure we use the extent of our border window, // otherwise we miss a few pixels - const Window *pWin = (!bClientOnly && mpWindowImpl->mpBorderWindow) ? mpWindowImpl->mpBorderWindow : this; + const vcl::Window *pWin = (!bClientOnly && mpWindowImpl->mpBorderWindow) ? mpWindowImpl->mpBorderWindow : this; Point aPos( pWin->OutputToScreenPixel( Point(0,0) ) ); aPos.X() += g.nX; @@ -3052,7 +3044,7 @@ Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, bool bC if( pRelativeWindow ) { // #106399# express coordinates relative to borderwindow - Window *pRelWin = (!bClientOnly && pRelativeWindow->mpWindowImpl->mpBorderWindow) ? pRelativeWindow->mpWindowImpl->mpBorderWindow : pRelativeWindow; + vcl::Window *pRelWin = (!bClientOnly && pRelativeWindow->mpWindowImpl->mpBorderWindow) ? pRelativeWindow->mpWindowImpl->mpBorderWindow : pRelativeWindow; aPos = pRelWin->AbsoluteScreenToOutputPixel( aPos ); } return Rectangle( aPos, aSize ); @@ -3121,7 +3113,7 @@ void Window::SetFakeFocus( bool bFocus ) bool Window::HasChildPathFocus( bool bSystemWindow ) const { - Window* pFocusWin = ImplGetSVData()->maWinData.mpFocusWin; + vcl::Window* pFocusWin = ImplGetSVData()->maWinData.mpFocusWin; if ( pFocusWin ) return ImplIsWindowOrChild( pFocusWin, bSystemWindow ); return false; @@ -3161,7 +3153,7 @@ void Window::SetText( const OUString& rStr ) // name change. if ( IsReallyVisible() ) { - Window* pWindow = GetAccessibleRelationLabelFor(); + vcl::Window* pWindow = GetAccessibleRelationLabelFor(); if ( pWindow && pWindow != this ) pWindow->ImplCallEventListeners( VCLEVENT_WINDOW_FRAMETITLECHANGED, &oldTitle ); } @@ -3220,7 +3212,7 @@ const OUString& Window::GetHelpText() const Help* pHelp = Application::GetHelp(); if ( pHelp ) { - ((Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this ); + ((vcl::Window*)this)->mpWindowImpl->maHelpText = pHelp->GetHelpText( aStrHelpId, this ); mpWindowImpl->mbHelpTextDynamic = false; } } @@ -3270,7 +3262,7 @@ void Window::SetComponentInterface( Reference< css::awt::XWindowPeer > xIFace ) pWrapper->SetWindowInterface( this, xIFace ); } -void Window::ImplCallDeactivateListeners( Window *pNew ) +void Window::ImplCallDeactivateListeners( vcl::Window *pNew ) { // no deactivation if the newly activated window is my child if ( !pNew || !ImplIsChild( pNew ) ) @@ -3287,7 +3279,7 @@ void Window::ImplCallDeactivateListeners( Window *pNew ) } } -void Window::ImplCallActivateListeners( Window *pOld ) +void Window::ImplCallActivateListeners( vcl::Window *pOld ) { // no activation if the old active window is my child if ( !pOld || !ImplIsChild( pOld ) ) @@ -3557,7 +3549,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect, // controls should return the window that gets the // focus by default, so keyevents can be sent to that window directly -Window* Window::GetPreferredKeyInputWindow() +vcl::Window* Window::GetPreferredKeyInputWindow() { return this; } @@ -3565,7 +3557,7 @@ Window* Window::GetPreferredKeyInputWindow() bool Window::IsScrollable() const { // check for scrollbars - Window *pChild = mpWindowImpl->mpFirstChild; + vcl::Window *pChild = mpWindowImpl->mpFirstChild; while( pChild ) { if( pChild->GetType() == WINDOW_SCROLLBAR ) @@ -3597,8 +3589,8 @@ bool Window::IsInModalNonRefMode() const void Window::ImplIncModalCount() { - Window* pFrameWindow = mpWindowImpl->mpFrameWindow; - Window* pParent = pFrameWindow; + vcl::Window* pFrameWindow = mpWindowImpl->mpFrameWindow; + vcl::Window* pParent = pFrameWindow; while( pFrameWindow ) { pFrameWindow->mpWindowImpl->mpFrameData->mnModalMode++; @@ -3611,8 +3603,8 @@ void Window::ImplIncModalCount() } void Window::ImplDecModalCount() { - Window* pFrameWindow = mpWindowImpl->mpFrameWindow; - Window* pParent = pFrameWindow; + vcl::Window* pFrameWindow = mpWindowImpl->mpFrameWindow; + vcl::Window* pParent = pFrameWindow; while( pFrameWindow ) { pFrameWindow->mpWindowImpl->mpFrameData->mnModalMode--; @@ -3640,13 +3632,13 @@ void Window::ImplNotifyIconifiedState( bool bIconified ) bool Window::HasActiveChildFrame() { bool bRet = false; - Window *pFrameWin = ImplGetSVData()->maWinData.mpFirstFrame; + vcl::Window *pFrameWin = ImplGetSVData()->maWinData.mpFirstFrame; while( pFrameWin ) { if( pFrameWin != mpWindowImpl->mpFrameWindow ) { bool bDecorated = false; - Window *pChildFrame = pFrameWin->ImplGetWindow(); + vcl::Window *pChildFrame = pFrameWin->ImplGetWindow(); // #i15285# unfortunately WB_MOVEABLE is the same as WB_TABSTOP which can // be removed for ToolBoxes to influence the keyboard accessibility // thus WB_MOVEABLE is no indicator for decoration anymore @@ -3695,7 +3687,7 @@ void Window::EnableNativeWidget( bool bEnable ) } // push down, useful for compound controls - Window *pChild = mpWindowImpl->mpFirstChild; + vcl::Window *pChild = mpWindowImpl->mpFirstChild; while( pChild ) { pChild->EnableNativeWidget( bEnable ); @@ -3752,7 +3744,7 @@ Reference< css::rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscr aArg[ 3 ] = makeAny( mpWindowImpl->mbAlwaysOnTop ? true : false ); aArg[ 4 ] = makeAny( Reference< css::awt::XWindow >( - const_cast<Window*>(this)->GetComponentInterface(), + const_cast<vcl::Window*>(this)->GetComponentInterface(), UNO_QUERY )); Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); @@ -3891,4 +3883,21 @@ Any Window::GetSystemDataAny() const return aRet; } +} /* namespace vcl */ + +bool ImplDoTiledRendering() +{ +#if !HAVE_FEATURE_DESKTOP + // We do tiled rendering only for iOS at the moment, actually, but + // let's see what happens if we assume it for Android, too. + return true; +#else + // We need some way to know globally if this process will use + // tiled rendering or not. Or should this be a per-window setting? + // Or what? + return false; +#endif +} + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 9b42b5763660..9d143f1aabdd 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -47,6 +47,8 @@ using namespace com::sun::star; +namespace vcl { + void Window::ShowFocus( const Rectangle& rRect ) { if( mpWindowImpl->mbInShowFocus ) @@ -934,7 +936,7 @@ void Window::EnableDocking( bool bEnable ) } // retrieves the list of owner draw decorated windows for this window hiearchy -::std::vector<Window *>& Window::ImplGetOwnerDrawList() +::std::vector<vcl::Window *>& Window::ImplGetOwnerDrawList() { return ImplGetTopmostFrameWindow()->mpWindowImpl->mpFrameData->maOwnerDrawList; } @@ -961,7 +963,7 @@ const OString& Window::GetUniqueId() const // --------- old inline methods --------------- -Window* Window::ImplGetWindow() +vcl::Window* Window::ImplGetWindow() { if ( mpWindowImpl->mpClientWindow ) return mpWindowImpl->mpClientWindow; @@ -979,22 +981,22 @@ SalFrame* Window::ImplGetFrame() const return mpWindowImpl->mpFrame; } -Window* Window::ImplGetParent() const +vcl::Window* Window::ImplGetParent() const { return mpWindowImpl->mpParent; } -Window* Window::ImplGetClientWindow() const +vcl::Window* Window::ImplGetClientWindow() const { return mpWindowImpl->mpClientWindow; } -Window* Window::ImplGetBorderWindow() const +vcl::Window* Window::ImplGetBorderWindow() const { return mpWindowImpl->mpBorderWindow; } -Window* Window::ImplGetFirstOverlapWindow() +vcl::Window* Window::ImplGetFirstOverlapWindow() { if ( mpWindowImpl->mbOverlapWin ) return this; @@ -1002,7 +1004,7 @@ Window* Window::ImplGetFirstOverlapWindow() return mpWindowImpl->mpOverlapWindow; } -const Window* Window::ImplGetFirstOverlapWindow() const +const vcl::Window* Window::ImplGetFirstOverlapWindow() const { if ( mpWindowImpl->mbOverlapWin ) return this; @@ -1010,7 +1012,7 @@ const Window* Window::ImplGetFirstOverlapWindow() const return mpWindowImpl->mpOverlapWindow; } -Window* Window::ImplGetFrameWindow() const +vcl::Window* Window::ImplGetFrameWindow() const { return mpWindowImpl->mpFrameWindow; } @@ -1097,7 +1099,7 @@ WindowType Window::GetType() const Dialog* Window::GetParentDialog() const { - const Window *pWindow = this; + const vcl::Window *pWindow = this; while( pWindow ) { @@ -1210,7 +1212,7 @@ bool Window::IsInPaint() const return mpWindowImpl->mbInPaint; } -Window* Window::GetParent() const +vcl::Window* Window::GetParent() const { return mpWindowImpl->mpRealParent; } @@ -1401,11 +1403,11 @@ void Window::SetOutputSizePixel( const Size& rNewSize ) //as dirty for the size remains unchanged, but layout changed circumstances namespace { - bool queue_ungrouped_resize(Window *pOrigWindow) + bool queue_ungrouped_resize(vcl::Window *pOrigWindow) { bool bSomeoneCares = false; - Window *pWindow = pOrigWindow->GetParent(); + vcl::Window *pWindow = pOrigWindow->GetParent(); if (pWindow) { if (isContainerWindow(*pWindow)) @@ -1435,11 +1437,11 @@ void Window::queue_resize(StateChangedType eReason) } if (pWindowImpl->m_xSizeGroup && pWindowImpl->m_xSizeGroup->get_mode() != VCL_SIZE_GROUP_NONE) { - std::set<Window*> &rWindows = pWindowImpl->m_xSizeGroup->get_widgets(); - for (std::set<Window*>::iterator aI = rWindows.begin(), + std::set<vcl::Window*> &rWindows = pWindowImpl->m_xSizeGroup->get_widgets(); + for (std::set<vcl::Window*>::iterator aI = rWindows.begin(), aEnd = rWindows.end(); aI != aEnd; ++aI) { - Window *pOther = *aI; + vcl::Window *pOther = *aI; if (pOther == this) continue; queue_ungrouped_resize(pOther); @@ -1450,7 +1452,7 @@ void Window::queue_resize(StateChangedType eReason) { //fdo#57090 force a resync of the borders of the borderwindow onto this //window in case they have changed - Window* pBorderWindow = ImplGetBorderWindow(); + vcl::Window* pBorderWindow = ImplGetBorderWindow(); if (pBorderWindow) pBorderWindow->Resize(); } @@ -1727,11 +1729,11 @@ Size Window::get_preferred_size() const if (eMode != VCL_SIZE_GROUP_NONE) { const bool bIgnoreInHidden = pWindowImpl->m_xSizeGroup->get_ignore_hidden(); - const std::set<Window*> &rWindows = pWindowImpl->m_xSizeGroup->get_widgets(); - for (std::set<Window*>::const_iterator aI = rWindows.begin(), + const std::set<vcl::Window*> &rWindows = pWindowImpl->m_xSizeGroup->get_widgets(); + for (std::set<vcl::Window*>::const_iterator aI = rWindows.begin(), aEnd = rWindows.end(); aI != aEnd; ++aI) { - const Window *pOther = *aI; + const vcl::Window *pOther = *aI; if (pOther == this) continue; if (bIgnoreInHidden && !pOther->IsVisible()) @@ -2035,4 +2037,7 @@ std::vector<FixedText*> Window::list_mnemonic_labels() const return mpWindowImpl->m_aMnemonicLabels; } +} /* namespace vcl */ + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/window3.cxx b/vcl/source/window/window3.cxx index 6774a022ad4f..570b7478fa98 100644 --- a/vcl/source/window/window3.cxx +++ b/vcl/source/window/window3.cxx @@ -27,6 +27,8 @@ WaitObject::~WaitObject() mpWindow->LeaveWait(); } +namespace vcl { + Size Window::GetOptimalSize() const { return Size(); @@ -45,7 +47,7 @@ void Window::ImplAdjustNWFSizes() default: { // iterate over children - Window* pWin = GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window* pWin = GetWindow( WINDOW_FIRSTCHILD ); while( pWin ) { pWin->ImplAdjustNWFSizes(); @@ -56,4 +58,7 @@ void Window::ImplAdjustNWFSizes() } } +} /* namespace vcl */ + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 197a173b2d7f..4c948b4fd0d6 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -60,7 +60,7 @@ bool ImplCallPreNotify( NotifyEvent& rEvt ) || rEvt.GetWindow()->PreNotify( rEvt ); } -static bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, +static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePos, sal_uInt16 nCode, sal_uInt16 nSVEvent, bool bMouseLeave ) { @@ -160,7 +160,7 @@ static bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, return false; } -static void ImplHandleMouseHelpRequest( Window* pChild, const Point& rMousePos ) +static void ImplHandleMouseHelpRequest( vcl::Window* pChild, const Point& rMousePos ) { ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->maHelpData.mpHelpWin || @@ -190,7 +190,7 @@ static void ImplHandleMouseHelpRequest( Window* pChild, const Point& rMousePos ) } } -static void ImplSetMousePointer( Window* pChild ) +static void ImplSetMousePointer( vcl::Window* pChild ) { ImplSVData* pSVData = ImplGetSVData(); if ( pSVData->maHelpData.mbExtHelpMode ) @@ -199,7 +199,7 @@ static void ImplSetMousePointer( Window* pChild ) pChild->ImplGetFrame()->SetPointer( pChild->ImplGetMousePointer() ); } -static bool ImplCallCommand( Window* pChild, sal_uInt16 nEvt, void* pData = NULL, +static bool ImplCallCommand( vcl::Window* pChild, sal_uInt16 nEvt, void* pData = NULL, bool bMouse = false, Point* pPos = NULL ) { Point aPos; @@ -246,7 +246,7 @@ static bool ImplCallCommand( Window* pChild, sal_uInt16 nEvt, void* pData = NULL struct ContextMenuEvent { - Window* pWindow; + vcl::Window* pWindow; ImplDelData aDelData; Point aChildPos; }; @@ -265,13 +265,13 @@ static long ContextMenuEventLink( void* pCEvent, void* ) return 0; } -bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeave, +bool ImplHandleMouseEvent( vcl::Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeave, long nX, long nY, sal_uLong nMsgTime, sal_uInt16 nCode, sal_uInt16 nMode ) { ImplSVData* pSVData = ImplGetSVData(); Point aMousePos( nX, nY ); - Window* pChild(NULL); + vcl::Window* pChild(NULL); bool bRet(false); sal_uInt16 nClicks(0); ImplFrameData* pWinFrameData = pWindow->ImplGetFrameData(); @@ -450,7 +450,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeav // call Start-Drag handler if required // Warning: should be called before Move, as otherwise during // fast mouse movements the applications move to the selection state - Window* pMouseDownWin = pWinFrameData->mpMouseDownWin; + vcl::Window* pMouseDownWin = pWinFrameData->mpMouseDownWin; if ( pMouseDownWin ) { // check for matching StartDrag mode. We only compare @@ -526,7 +526,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeav } // test for mouseleave and mouseenter - Window* pMouseMoveWin = pWinFrameData->mpMouseMoveWin; + vcl::Window* pMouseMoveWin = pWinFrameData->mpMouseMoveWin; if ( pChild != pMouseMoveWin ) { if ( pMouseMoveWin ) @@ -709,7 +709,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeav { // if the MouseMove handler changes the help window's visibility // the HelpRequest handler should not be called anymore - Window* pOldHelpTextWin = pSVData->maHelpData.mpHelpWin; + vcl::Window* pOldHelpTextWin = pSVData->maHelpData.mpHelpWin; pChild->ImplGetWindowImpl()->mbMouseMove = false; pChild->MouseMove( aMEvt ); if ( pOldHelpTextWin != pSVData->maHelpData.mpHelpWin ) @@ -831,7 +831,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeav return bRet; } -static Window* ImplGetKeyInputWindow( Window* pWindow ) +static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow ) { ImplSVData* pSVData = ImplGetSVData(); @@ -845,7 +845,7 @@ static Window* ImplGetKeyInputWindow( Window* pWindow ) // find window - is every time the window which has currently the // focus or the last time the focus. // the first floating window always has the focus - Window* pChild = pSVData->maWinData.mpFirstFloat; + vcl::Window* pChild = pSVData->maWinData.mpFirstFloat; if( !pChild || ( pChild->ImplGetWindowImpl()->mbFloatWin && !((FloatingWindow *)pChild)->GrabsFocus() ) ) pChild = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; else @@ -872,7 +872,7 @@ static Window* ImplGetKeyInputWindow( Window* pWindow ) return pChild; } -static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, +static bool ImplHandleKey( vcl::Window* pWindow, sal_uInt16 nSVEvent, sal_uInt16 nKeyCode, sal_uInt16 nCharCode, sal_uInt16 nRepeat, bool bForward ) { ImplSVData* pSVData = ImplGetSVData(); @@ -1001,7 +1001,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, } // find window - Window* pChild = ImplGetKeyInputWindow( pWindow ); + vcl::Window* pChild = ImplGetKeyInputWindow( pWindow ); if ( !pChild ) return false; @@ -1051,7 +1051,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, bool bToolboxFocus=false; if( (nCode == KEY_F1) && aKeyCode.IsShift() ) { - Window *pWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; + vcl::Window *pWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; while( pWin ) { if( pWin->ImplGetWindowImpl()->mbToolBox ) @@ -1159,13 +1159,13 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, return nRet; } -static bool ImplHandleExtTextInput( Window* pWindow, +static bool ImplHandleExtTextInput( vcl::Window* pWindow, const OUString& rText, const sal_uInt16* pTextAttr, sal_Int32 nCursorPos, sal_uInt16 nCursorFlags ) { ImplSVData* pSVData = ImplGetSVData(); - Window* pChild = NULL; + vcl::Window* pChild = NULL; int nTries = 200; while( nTries-- ) @@ -1252,10 +1252,10 @@ static bool ImplHandleExtTextInput( Window* pWindow, return !ImplCallCommand( pChild, COMMAND_EXTTEXTINPUT, &aData ); } -static bool ImplHandleEndExtTextInput( Window* /* pWindow */ ) +static bool ImplHandleEndExtTextInput( vcl::Window* /* pWindow */ ) { ImplSVData* pSVData = ImplGetSVData(); - Window* pChild = pSVData->maWinData.mpExtTextInputWin; + vcl::Window* pChild = pSVData->maWinData.mpExtTextInputWin; bool nRet = false; if ( pChild ) @@ -1279,12 +1279,12 @@ static bool ImplHandleEndExtTextInput( Window* /* pWindow */ ) return nRet; } -static void ImplHandleExtTextInputPos( Window* pWindow, +static void ImplHandleExtTextInputPos( vcl::Window* pWindow, Rectangle& rRect, long& rInputWidth, bool * pVertical ) { ImplSVData* pSVData = ImplGetSVData(); - Window* pChild = pSVData->maWinData.mpExtTextInputWin; + vcl::Window* pChild = pSVData->maWinData.mpExtTextInputWin; if ( !pChild ) pChild = ImplGetKeyInputWindow( pWindow ); @@ -1325,14 +1325,14 @@ static void ImplHandleExtTextInputPos( Window* pWindow, = pChild != 0 && pChild->GetInputContext().GetFont().IsVertical(); } -static bool ImplHandleInputContextChange( Window* pWindow, LanguageType eNewLang ) +static bool ImplHandleInputContextChange( vcl::Window* pWindow, LanguageType eNewLang ) { - Window* pChild = ImplGetKeyInputWindow( pWindow ); + vcl::Window* pChild = ImplGetKeyInputWindow( pWindow ); CommandInputContextData aData( eNewLang ); return !ImplCallCommand( pChild, COMMAND_INPUTCONTEXTCHANGE, &aData ); } -static bool ImplCallWheelCommand( Window* pWindow, const Point& rPos, +static bool ImplCallWheelCommand( vcl::Window* pWindow, const Point& rPos, const CommandWheelData* pWheelData ) { Point aCmdMousePos = pWindow->ImplFrameToOutput( rPos ); @@ -1354,7 +1354,7 @@ static bool ImplCallWheelCommand( Window* pWindow, const Point& rPos, return false; } -static bool acceptableWheelScrollTarget(const Window *pMouseWindow) +static bool acceptableWheelScrollTarget(const vcl::Window *pMouseWindow) { return (pMouseWindow && pMouseWindow->IsInputEnabled() && !pMouseWindow->IsInModalMode()); } @@ -1370,10 +1370,10 @@ static bool shouldReusePreviousMouseWindow(const SalWheelMouseEvent& rPrevEvt, c return (rEvt.mnX == rPrevEvt.mnX && rEvt.mnY == rPrevEvt.mnY && rEvt.mnTime-rPrevEvt.mnTime < 500/*ms*/); } -static bool ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEvt, bool scaleDirectly = false ) +static bool ImplHandleWheelEvent( vcl::Window* pWindow, const SalWheelMouseEvent& rEvt, bool scaleDirectly = false ) { static SalWheelMouseEvent aPreviousEvent; - static Window *pPreviousWindow; + static vcl::Window *pPreviousWindow; ImplDelData aDogTag( pWindow ); @@ -1409,7 +1409,7 @@ static bool ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv // first check any floating window ( eg. drop down listboxes) bool bIsFloat = false; - Window *pMouseWindow = NULL; + vcl::Window *pMouseWindow = NULL; if ( pSVData->maWinData.mpFirstFloat && !pSVData->maWinData.mpCaptureWin && !pSVData->maWinData.mpFirstFloat->ImplIsFloatPopupModeWindow( pWindow ) ) { @@ -1463,7 +1463,7 @@ static bool ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv // if the command was not handled try the focus window if ( bRet ) { - Window* pFocusWindow = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; + vcl::Window* pFocusWindow = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; if ( pFocusWindow && (pFocusWindow != pMouseWindow) && (pFocusWindow == pSVData->maWinData.mpFocusWin) ) { @@ -1499,13 +1499,13 @@ static bool ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv #define IMPL_PAINT_CHECKRTL ((sal_uInt16)0x0020) -static void ImplHandlePaint( Window* pWindow, const Rectangle& rBoundRect, bool bImmediateUpdate ) +static void ImplHandlePaint( vcl::Window* pWindow, const Rectangle& rBoundRect, bool bImmediateUpdate ) { // give up background save when system paints arrive - Window* pSaveBackWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFirstBackWin; + vcl::Window* pSaveBackWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFirstBackWin; while ( pSaveBackWin ) { - Window* pNext = pSaveBackWin->ImplGetWindowImpl()->mpOverlapData->mpNextBackWin; + vcl::Window* pNext = pSaveBackWin->ImplGetWindowImpl()->mpOverlapData->mpNextBackWin; Rectangle aRect( Point( pSaveBackWin->GetOutOffXPixel(), pSaveBackWin->GetOutOffYPixel() ), Size( pSaveBackWin->GetOutputWidthPixel(), pSaveBackWin->GetOutputHeightPixel() ) ); if ( aRect.IsOver( rBoundRect ) ) @@ -1529,11 +1529,11 @@ static void ImplHandlePaint( Window* pWindow, const Rectangle& rBoundRect, bool } } -static void KillOwnPopups( Window* pWindow ) +static void KillOwnPopups( vcl::Window* pWindow ) { ImplSVData* pSVData = ImplGetSVData(); - Window *pParent = pWindow->ImplGetWindowImpl()->mpFrameWindow; - Window *pChild = pSVData->maWinData.mpFirstFloat; + vcl::Window *pParent = pWindow->ImplGetWindowImpl()->mpFrameWindow; + vcl::Window *pChild = pSVData->maWinData.mpFirstFloat; if ( pChild && pParent->ImplIsWindowOrChild( pChild, true ) ) { if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE) ) @@ -1541,7 +1541,7 @@ static void KillOwnPopups( Window* pWindow ) } } -void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight ) +void ImplHandleResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight ) { if( pWindow->GetStyle() & (WB_MOVEABLE|WB_SIZEABLE) ) { @@ -1608,7 +1608,7 @@ void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight ) pWindow->ImplGetWindowImpl()->mpFrameData->mbMinimized = bMinimized; } -static void ImplHandleMove( Window* pWindow ) +static void ImplHandleMove( vcl::Window* pWindow ) { if( pWindow->ImplGetWindowImpl()->mbFrame && pWindow->ImplIsFloatingWindow() && pWindow->IsReallyVisible() ) { @@ -1633,16 +1633,16 @@ static void ImplHandleMove( Window* pWindow ) } -static void ImplHandleMoveResize( Window* pWindow, long nNewWidth, long nNewHeight ) +static void ImplHandleMoveResize( vcl::Window* pWindow, long nNewWidth, long nNewHeight ) { ImplHandleMove( pWindow ); ImplHandleResize( pWindow, nNewWidth, nNewHeight ); } -static void ImplActivateFloatingWindows( Window* pWindow, bool bActive ) +static void ImplActivateFloatingWindows( vcl::Window* pWindow, bool bActive ) { // First check all overlapping windows - Window* pTempWindow = pWindow->ImplGetWindowImpl()->mpFirstOverlap; + vcl::Window* pTempWindow = pWindow->ImplGetWindowImpl()->mpFirstOverlap; while ( pTempWindow ) { if ( !pTempWindow->GetActivateMode() ) @@ -1657,7 +1657,7 @@ static void ImplActivateFloatingWindows( Window* pWindow, bool bActive ) } } -IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) +IMPL_LINK_NOARG(vcl::Window, ImplAsyncFocusHdl) { ImplGetWindowImpl()->mpFrameData->mnFocusId = 0; @@ -1694,7 +1694,7 @@ IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) if ( !bHandled ) { ImplSVData* pSVData = ImplGetSVData(); - Window* pTopLevelWindow = ImplGetWindowImpl()->mpFrameData->mpFocusWin->ImplGetFirstOverlapWindow(); + vcl::Window* pTopLevelWindow = ImplGetWindowImpl()->mpFrameData->mpFocusWin->ImplGetFirstOverlapWindow(); if ( ( ! pTopLevelWindow->IsInputEnabled() || pTopLevelWindow->IsInModalMode() ) && pSVData->maWinData.mpLastExecuteDlg ) pSVData->maWinData.mpLastExecuteDlg->ToTop( TOTOP_RESTOREWHENMIN | TOTOP_GRABFOCUSONLY); @@ -1707,7 +1707,7 @@ IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) } else { - Window* pFocusWin = ImplGetWindowImpl()->mpFrameData->mpFocusWin; + vcl::Window* pFocusWin = ImplGetWindowImpl()->mpFrameData->mpFocusWin; if ( pFocusWin ) { ImplSVData* pSVData = ImplGetSVData(); @@ -1715,7 +1715,7 @@ IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) if ( pSVData->maWinData.mpFocusWin == pFocusWin ) { // FocusWindow umsetzen - Window* pOverlapWindow = pFocusWin->ImplGetFirstOverlapWindow(); + vcl::Window* pOverlapWindow = pFocusWin->ImplGetFirstOverlapWindow(); pOverlapWindow->ImplGetWindowImpl()->mpLastFocusWindow = pFocusWin; pSVData->maWinData.mpFocusWin = NULL; @@ -1723,11 +1723,11 @@ IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide( true ); // Deaktivate rufen - Window* pOldFocusWindow = pFocusWin; + vcl::Window* pOldFocusWindow = pFocusWin; if ( pOldFocusWindow ) { - Window* pOldOverlapWindow = pOldFocusWindow->ImplGetFirstOverlapWindow(); - Window* pOldRealWindow = pOldOverlapWindow->ImplGetWindow(); + vcl::Window* pOldOverlapWindow = pOldFocusWindow->ImplGetFirstOverlapWindow(); + vcl::Window* pOldRealWindow = pOldOverlapWindow->ImplGetWindow(); pOldOverlapWindow->ImplGetWindowImpl()->mbActive = false; pOldOverlapWindow->Deactivate(); @@ -1765,7 +1765,7 @@ IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) return 0; } -static void ImplHandleGetFocus( Window* pWindow ) +static void ImplHandleGetFocus( vcl::Window* pWindow ) { pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = true; @@ -1774,14 +1774,14 @@ static void ImplHandleGetFocus( Window* pWindow ) if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId ) { pWindow->ImplGetWindowImpl()->mpFrameData->mbStartFocusState = !pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus; - pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, Window, ImplAsyncFocusHdl ) ); - Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; + pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ) ); + vcl::Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor ) pFocusWin->ImplGetWindowImpl()->mpCursor->ImplShow(); } } -static void ImplHandleLoseFocus( Window* pWindow ) +static void ImplHandleLoseFocus( vcl::Window* pWindow ) { ImplSVData* pSVData = ImplGetSVData(); @@ -1811,17 +1811,17 @@ static void ImplHandleLoseFocus( Window* pWindow ) if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId ) { pWindow->ImplGetWindowImpl()->mpFrameData->mbStartFocusState = !pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus; - pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, Window, ImplAsyncFocusHdl ) ); + pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ) ); } - Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; + vcl::Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor ) pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide( true ); } struct DelayedCloseEvent { - Window* pWindow; + vcl::Window* pWindow; ImplDelData aDelData; }; @@ -1843,7 +1843,7 @@ static long DelayedCloseEventLink( void* pCEvent, void* ) return 0; } -void ImplHandleClose( Window* pWindow ) +void ImplHandleClose( vcl::Window* pWindow ) { ImplSVData* pSVData = ImplGetSVData(); @@ -1875,7 +1875,7 @@ void ImplHandleClose( Window* pWindow ) if (bWasPopup) return; - Window *pWin = pWindow->ImplGetWindow(); + vcl::Window *pWin = pWindow->ImplGetWindow(); SystemWindow* pSysWin = dynamic_cast<SystemWindow*>(pWin); if (pSysWin) { @@ -1948,7 +1948,7 @@ static sal_uInt16 ImplGetMouseButtonMode( SalMouseEvent* pEvent ) return nMode; } -inline bool ImplHandleSalMouseLeave( Window* pWindow, SalMouseEvent* pEvent ) +inline bool ImplHandleSalMouseLeave( vcl::Window* pWindow, SalMouseEvent* pEvent ) { return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, true, pEvent->mnX, pEvent->mnY, @@ -1956,7 +1956,7 @@ inline bool ImplHandleSalMouseLeave( Window* pWindow, SalMouseEvent* pEvent ) ImplGetMouseMoveMode( pEvent ) ); } -inline bool ImplHandleSalMouseMove( Window* pWindow, SalMouseEvent* pEvent ) +inline bool ImplHandleSalMouseMove( vcl::Window* pWindow, SalMouseEvent* pEvent ) { return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, false, pEvent->mnX, pEvent->mnY, @@ -1964,7 +1964,7 @@ inline bool ImplHandleSalMouseMove( Window* pWindow, SalMouseEvent* pEvent ) ImplGetMouseMoveMode( pEvent ) ); } -inline bool ImplHandleSalMouseButtonDown( Window* pWindow, SalMouseEvent* pEvent ) +inline bool ImplHandleSalMouseButtonDown( vcl::Window* pWindow, SalMouseEvent* pEvent ) { return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONDOWN, false, pEvent->mnX, pEvent->mnY, @@ -1977,7 +1977,7 @@ inline bool ImplHandleSalMouseButtonDown( Window* pWindow, SalMouseEvent* pEvent ImplGetMouseButtonMode( pEvent ) ); } -inline bool ImplHandleSalMouseButtonUp( Window* pWindow, SalMouseEvent* pEvent ) +inline bool ImplHandleSalMouseButtonUp( vcl::Window* pWindow, SalMouseEvent* pEvent ) { return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONUP, false, pEvent->mnX, pEvent->mnY, @@ -1990,16 +1990,16 @@ inline bool ImplHandleSalMouseButtonUp( Window* pWindow, SalMouseEvent* pEvent ) ImplGetMouseButtonMode( pEvent ) ); } -static bool ImplHandleSalMouseActivate( Window* /*pWindow*/, SalMouseActivateEvent* /*pEvent*/ ) +static bool ImplHandleSalMouseActivate( vcl::Window* /*pWindow*/, SalMouseActivateEvent* /*pEvent*/ ) { return false; } -static bool ImplHandleMenuEvent( Window* pWindow, SalMenuEvent* pEvent, sal_uInt16 nEvent ) +static bool ImplHandleMenuEvent( vcl::Window* pWindow, SalMenuEvent* pEvent, sal_uInt16 nEvent ) { // Find SystemWindow and its Menubar and let it dispatch the command bool nRet = false; - Window *pWin = pWindow->ImplGetWindowImpl()->mpFirstChild; + vcl::Window *pWin = pWindow->ImplGetWindowImpl()->mpFirstChild; while ( pWin ) { if ( pWin->ImplGetWindowImpl()->mbSysWin ) @@ -2036,10 +2036,10 @@ static bool ImplHandleMenuEvent( Window* pWindow, SalMenuEvent* pEvent, sal_uInt return nRet; } -static void ImplHandleSalKeyMod( Window* pWindow, SalKeyModEvent* pEvent ) +static void ImplHandleSalKeyMod( vcl::Window* pWindow, SalKeyModEvent* pEvent ) { ImplSVData* pSVData = ImplGetSVData(); - Window* pTrackWin = pSVData->maWinData.mpTrackWin; + vcl::Window* pTrackWin = pSVData->maWinData.mpTrackWin; if ( pTrackWin ) pWindow = pTrackWin; #ifdef MACOSX @@ -2061,7 +2061,7 @@ static void ImplHandleSalKeyMod( Window* pWindow, SalKeyModEvent* pEvent ) // #105224# send commandevent to allow special treatment of Ctrl-LeftShift/Ctrl-RightShift etc. // find window - Window* pChild = ImplGetKeyInputWindow( pWindow ); + vcl::Window* pChild = ImplGetKeyInputWindow( pWindow ); if ( !pChild ) return; @@ -2073,10 +2073,10 @@ static void ImplHandleSalKeyMod( Window* pWindow, SalKeyModEvent* pEvent ) } } -static void ImplHandleInputLanguageChange( Window* pWindow ) +static void ImplHandleInputLanguageChange( vcl::Window* pWindow ) { // find window - Window* pChild = ImplGetKeyInputWindow( pWindow ); + vcl::Window* pChild = ImplGetKeyInputWindow( pWindow ); if ( !pChild ) return; @@ -2135,7 +2135,7 @@ static void ImplHandleSalSettings( sal_uInt16 nEvent ) } } -static void ImplHandleSalExtTextInputPos( Window* pWindow, SalExtTextInputPosEvent* pEvt ) +static void ImplHandleSalExtTextInputPos( vcl::Window* pWindow, SalExtTextInputPosEvent* pEvt ) { Rectangle aCursorRect; ImplHandleExtTextInputPos( pWindow, aCursorRect, pEvt->mnExtWidth, &pEvt->mbVertical ); @@ -2155,14 +2155,14 @@ static void ImplHandleSalExtTextInputPos( Window* pWindow, SalExtTextInputPosEve } } -static bool ImplHandleShowDialog( Window* pWindow, int nDialogId ) +static bool ImplHandleShowDialog( vcl::Window* pWindow, int nDialogId ) { if( ! pWindow ) return false; if( pWindow->GetType() == WINDOW_BORDERWINDOW ) { - Window* pWrkWin = pWindow->GetWindow( WINDOW_CLIENT ); + vcl::Window* pWrkWin = pWindow->GetWindow( WINDOW_CLIENT ); if( pWrkWin ) pWindow = pWrkWin; } @@ -2170,11 +2170,11 @@ static bool ImplHandleShowDialog( Window* pWindow, int nDialogId ) return ImplCallCommand( pWindow, COMMAND_SHOWDIALOG, &aCmdData ); } -static void ImplHandleSurroundingTextRequest( Window *pWindow, +static void ImplHandleSurroundingTextRequest( vcl::Window *pWindow, OUString& rText, Selection &rSelRange ) { - Window* pChild = ImplGetKeyInputWindow( pWindow ); + vcl::Window* pChild = ImplGetKeyInputWindow( pWindow ); if ( !pChild ) { @@ -2191,7 +2191,7 @@ static void ImplHandleSurroundingTextRequest( Window *pWindow, } } -static void ImplHandleSalSurroundingTextRequest( Window *pWindow, +static void ImplHandleSalSurroundingTextRequest( vcl::Window *pWindow, SalSurroundingTextRequestEvent *pEvt ) { Selection aSelRange; @@ -2214,11 +2214,11 @@ static void ImplHandleSalSurroundingTextRequest( Window *pWindow, pEvt->mnEnd = aSelRange.Max(); } -static void ImplHandleSurroundingTextSelectionChange( Window *pWindow, +static void ImplHandleSurroundingTextSelectionChange( vcl::Window *pWindow, sal_uLong nStart, sal_uLong nEnd ) { - Window* pChild = ImplGetKeyInputWindow( pWindow ); + vcl::Window* pChild = ImplGetKeyInputWindow( pWindow ); if( pChild ) { CommandSelectionChangeData data( nStart, nEnd ); @@ -2226,14 +2226,14 @@ static void ImplHandleSurroundingTextSelectionChange( Window *pWindow, } } -static void ImplHandleStartReconversion( Window *pWindow ) +static void ImplHandleStartReconversion( vcl::Window *pWindow ) { - Window* pChild = ImplGetKeyInputWindow( pWindow ); + vcl::Window* pChild = ImplGetKeyInputWindow( pWindow ); if( pChild ) ImplCallCommand( pChild, COMMAND_PREPARERECONVERSION ); } -static void ImplHandleSalQueryCharPosition( Window *pWindow, +static void ImplHandleSalQueryCharPosition( vcl::Window *pWindow, SalQueryCharPositionEvent *pEvt ) { pEvt->mbValid = false; @@ -2244,7 +2244,7 @@ static void ImplHandleSalQueryCharPosition( Window *pWindow, pEvt->mnCursorBoundHeight = 0; ImplSVData* pSVData = ImplGetSVData(); - Window* pChild = pSVData->maWinData.mpExtTextInputWin; + vcl::Window* pChild = pSVData->maWinData.mpExtTextInputWin; if ( !pChild ) pChild = ImplGetKeyInputWindow( pWindow ); @@ -2276,7 +2276,7 @@ static void ImplHandleSalQueryCharPosition( Window *pWindow, } } -bool ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/, +bool ImplWindowFrameProc( vcl::Window* pWindow, SalFrame* /*pFrame*/, sal_uInt16 nEvent, const void* pEvent ) { DBG_TESTSOLARMUTEX(); diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx index 9b614ea12181..33515067570e 100644 --- a/vcl/source/window/wrkwin.cxx +++ b/vcl/source/window/wrkwin.cxx @@ -43,7 +43,7 @@ void WorkWindow::ImplInitWorkWindowData() mbFullScreenMode = false; } -void WorkWindow::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData ) +void WorkWindow::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData ) { sal_uInt16 nFrameStyle = BORDERWINDOW_STYLE_FRAME; if ( nStyle & WB_APP ) @@ -67,14 +67,14 @@ void WorkWindow::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pS SetActivateMode( ACTIVATE_MODE_GRABFOCUS ); } -void WorkWindow::ImplInit( Window* pParent, WinBits nStyle, const ::com::sun::star::uno::Any& aSystemWorkWindowToken ) +void WorkWindow::ImplInit( vcl::Window* pParent, WinBits nStyle, const ::com::sun::star::uno::Any& aSystemWorkWindowToken ) { if( aSystemWorkWindowToken.hasValue() ) { ::com::sun::star::uno::Sequence< sal_Int8 > aSeq; aSystemWorkWindowToken >>= aSeq; SystemParentData* pData = (SystemParentData*)aSeq.getArray(); - DBG_ASSERT( aSeq.getLength() == sizeof( SystemParentData ) && pData->nSize == sizeof( SystemParentData ), "WorkWindow::WorkWindow( Window*, const Any&, WinBits ) called with invalid Any" ); + DBG_ASSERT( aSeq.getLength() == sizeof( SystemParentData ) && pData->nSize == sizeof( SystemParentData ), "WorkWindow::WorkWindow( vcl::Window*, const Any&, WinBits ) called with invalid Any" ); // init with style 0 as does WorkWindow::WorkWindow( SystemParentData* ); ImplInit( pParent, 0, pData ); } @@ -88,14 +88,14 @@ WorkWindow::WorkWindow( WindowType nType ) : ImplInitWorkWindowData(); } -WorkWindow::WorkWindow( Window* pParent, WinBits nStyle ) : +WorkWindow::WorkWindow( vcl::Window* pParent, WinBits nStyle ) : SystemWindow( WINDOW_WORKWINDOW ) { ImplInitWorkWindowData(); ImplInit( pParent, nStyle, NULL ); } -WorkWindow::WorkWindow( Window* pParent, const ::com::sun::star::uno::Any& aSystemWorkWindowToken, WinBits nStyle ) : +WorkWindow::WorkWindow( vcl::Window* pParent, const ::com::sun::star::uno::Any& aSystemWorkWindowToken, WinBits nStyle ) : SystemWindow( WINDOW_WORKWINDOW ) { ImplInitWorkWindowData(); diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx index 1679306486b2..fc219b7b3142 100644 --- a/vcl/unx/generic/app/i18n_ic.cxx +++ b/vcl/unx/generic/app/i18n_ic.cxx @@ -176,8 +176,8 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) : && SupportInputMethodStyle( pInputMethod->GetSupportedStyles() ) ) { const SystemEnvData* pEnv = pFrame->GetSystemData(); - XLIB_Window aClientWindow = pEnv->aShellWindow; - XLIB_Window aFocusWindow = pEnv->aWindow; + ::Window aClientWindow = pEnv->aShellWindow; + ::Window aFocusWindow = pEnv->aWindow; // for status callbacks and commit string callbacks #define PREEDIT_BUFSZ 16 @@ -420,7 +420,7 @@ SalI18N_InputContext::HandleDestroyIM() // called once on each frame, it relys on a valid maContext void -SalI18N_InputContext::ExtendEventMask( XLIB_Window aFocusWindow ) +SalI18N_InputContext::ExtendEventMask( ::Window aFocusWindow ) { unsigned long nIMEventMask; XWindowAttributes aWindowAttributes; @@ -587,8 +587,8 @@ SalI18N_InputContext::SetICFocus( SalFrame* pFocusFrame ) maClientData.pFrame = pFocusFrame; const SystemEnvData* pEnv = pFocusFrame->GetSystemData(); - XLIB_Window aClientWindow = pEnv->aShellWindow; - XLIB_Window aFocusWindow = pEnv->aWindow; + ::Window aClientWindow = pEnv->aShellWindow; + ::Window aFocusWindow = pEnv->aWindow; XSetICValues( maContext, XNFocusWindow, aFocusWindow, diff --git a/vcl/unx/generic/app/i18n_im.cxx b/vcl/unx/generic/app/i18n_im.cxx index 7e1587386546..0cd33d220168 100644 --- a/vcl/unx/generic/app/i18n_im.cxx +++ b/vcl/unx/generic/app/i18n_im.cxx @@ -378,7 +378,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay ) // give IM the opportunity to look at the event, and possibly hide it bool -SalI18N_InputMethod::FilterEvent( XEvent *pEvent, XLIB_Window window ) +SalI18N_InputMethod::FilterEvent( XEvent *pEvent, ::Window window ) { if (!mbUseable) return False; diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx index b0d5e8eb9a8a..2291f6be95f4 100644 --- a/vcl/unx/generic/app/i18n_status.cxx +++ b/vcl/unx/generic/app/i18n_status.cxx @@ -195,9 +195,9 @@ Point XIMStatusWindow::updatePosition() SalExtTextInputPosEvent aPosEvent; m_pLastParent->CallCallback( SALEVENT_EXTTEXTINPUTPOS, (void*)&aPosEvent ); int x, y; - XLIB_Window aChild; + ::Window aChild; XTranslateCoordinates( (Display*)pParentEnvData->pDisplay, - (XLIB_Window)pParentEnvData->aShellWindow, + (::Window)pParentEnvData->aShellWindow, GetGenericData()->GetSalDisplay()->GetRootWindow( GetGenericData()->GetSalDisplay()->GetDefaultXScreen() ), 0, 0, &x, &y, @@ -269,7 +269,7 @@ IMPL_LINK_NOARG(XIMStatusWindow, DelayedShowHdl) if( m_bDelayedShow ) { XRaiseWindow( (Display*)pData->pDisplay, - (XLIB_Window)pData->aShellWindow ); + (::Window)pData->aShellWindow ); } return 0; } @@ -351,7 +351,7 @@ IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) : if( nDistance < 20 ) nDistance = 20; XMoveWindow( (Display*)pEnvData->pDisplay, - (XLIB_Window)pEnvData->aShellWindow, + (::Window)pEnvData->aShellWindow, rGeom.nX, rGeom.nY + rGeom.nHeight + nDistance ); @@ -441,7 +441,7 @@ void IIIMPStatusWindow::GetFocus() const SystemEnvData* pParentEnvData = m_pResetFocus->GetSystemData(); GetGenericData()->ErrorTrapPush(); XSetInputFocus( (Display*)pParentEnvData->pDisplay, - (XLIB_Window)pParentEnvData->aShellWindow, + (::Window)pParentEnvData->aShellWindow, RevertToNone, CurrentTime ); @@ -471,7 +471,7 @@ IMPL_LINK( IIIMPStatusWindow, SelectHdl, MenuButton*, pBtn ) const SystemEnvData* pEnv = pParent->GetSystemData(); GetGenericData()->ErrorTrapPush(); XSetInputFocus( (Display*)pEnv->pDisplay, - (XLIB_Window)pEnv->aShellWindow, + (::Window)pEnv->aShellWindow, RevertToNone, CurrentTime ); diff --git a/vcl/unx/generic/app/randrwrapper.cxx b/vcl/unx/generic/app/randrwrapper.cxx index ee3cc914ffb5..82e94a544b27 100644 --- a/vcl/unx/generic/app/randrwrapper.cxx +++ b/vcl/unx/generic/app/randrwrapper.cxx @@ -39,11 +39,11 @@ class RandRWrapper Bool(*m_pXRRQueryExtension)(Display*,int*,int*); XRRScreenConfiguration*(*m_pXRRGetScreenInfo)(Display*,Drawable); void(*m_pXRRFreeScreenConfigInfo)(XRRScreenConfiguration*); - void(*m_pXRRSelectInput)(Display*,XLIB_Window,int); + void(*m_pXRRSelectInput)(Display*,::Window,int); int(*m_pXRRUpdateConfiguration)(XEvent*); XRRScreenSize*(*m_pXRRConfigSizes)(XRRScreenConfiguration*,int*); SizeID(*m_pXRRConfigCurrentConfiguration)(XRRScreenConfiguration*,Rotation*); - int(*m_pXRRRootToScreen)(Display*, XLIB_Window); + int(*m_pXRRRootToScreen)(Display*, ::Window); bool m_bValid; @@ -71,7 +71,7 @@ public: if( m_bValid ) m_pXRRFreeScreenConfigInfo( i_pConfig ); } - void XRRSelectInput( Display* i_pDisp, XLIB_Window i_window, int i_nMask ) + void XRRSelectInput( Display* i_pDisp, ::Window i_window, int i_nMask ) { if( m_bValid ) m_pXRRSelectInput( i_pDisp, i_window, i_nMask ); @@ -88,7 +88,7 @@ public: { return m_bValid ? m_pXRRConfigCurrentConfiguration( i_pConfig, o_pRot ) : 0; } - int XRRRootToScreen( Display *dpy, XLIB_Window root ) + int XRRRootToScreen( Display *dpy, ::Window root ) { return m_bValid ? m_pXRRRootToScreen( dpy, root ) : -1; } @@ -99,11 +99,11 @@ void RandRWrapper::initFromModule() m_pXRRQueryExtension = (Bool(*)(Display*,int*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRQueryExtension" ); m_pXRRGetScreenInfo = (XRRScreenConfiguration*(*)(Display*,Drawable))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRGetScreenInfo" ); m_pXRRFreeScreenConfigInfo = (void(*)(XRRScreenConfiguration*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRFreeScreenConfigInfo" ); - m_pXRRSelectInput = (void(*)(Display*,XLIB_Window,int))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRSelectInput" ); + m_pXRRSelectInput = (void(*)(Display*,::Window,int))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRSelectInput" ); m_pXRRUpdateConfiguration = (int(*)(XEvent*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRUpdateConfiguration" ); m_pXRRConfigSizes = (XRRScreenSize*(*)(XRRScreenConfiguration*,int*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigSizes" ); m_pXRRConfigCurrentConfiguration = (SizeID(*)(XRRScreenConfiguration*,Rotation*))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRConfigCurrentConfiguration" ); - m_pXRRRootToScreen = (int(*)(Display*,XLIB_Window))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRRootToScreen" ); + m_pXRRRootToScreen = (int(*)(Display*,::Window))osl_getAsciiFunctionSymbol( m_pRandRLib, "XRRRootToScreen" ); m_bValid = m_pXRRQueryExtension && m_pXRRGetScreenInfo && @@ -197,7 +197,7 @@ public: if( m_bValid ) ::XRRFreeScreenConfigInfo( i_pConfig ); } - void XRRSelectInput( Display* i_pDisp, XLIB_Window i_window, int i_nMask ) + void XRRSelectInput( Display* i_pDisp, ::Window i_window, int i_nMask ) { if( m_bValid ) ::XRRSelectInput( i_pDisp, i_window, i_nMask ); @@ -214,7 +214,7 @@ public: { return m_bValid ? ::XRRConfigCurrentConfiguration( i_pConfig, o_pRot ) : 0; } - int XRRRootToScreen( Display *dpy, XLIB_Window root ) + int XRRRootToScreen( Display *dpy, ::Window root ) { return m_bValid ? ::XRRRootToScreen( dpy, root ) : -1; } @@ -255,7 +255,7 @@ void RandRWrapper::releaseWrapper() #include <cstdio> #endif -void SalDisplay::InitRandR( XLIB_Window aRoot ) const +void SalDisplay::InitRandR( ::Window aRoot ) const { #ifdef USE_RANDR if( m_bUseRandRWrapper ) diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index ee6aad78d4e2..325062954cdb 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -1830,7 +1830,7 @@ int SalDisplay::CaptureMouse( SalFrame *pCapture ) if( !pEnv || !*pEnv ) { int ret = XGrabPointer( GetDisplay(), - (XLIB_Window)pEnvData->aWindow, + (::Window)pEnvData->aWindow, False, PointerMotionMask| ButtonPressMask|ButtonReleaseMask, GrabModeAsync, @@ -1889,7 +1889,7 @@ bool SalX11Display::Dispatch( XEvent *pEvent ) { if( pEvent->type == XLIB_KeyPress || pEvent->type == KeyRelease ) { - XLIB_Window aWindow = pEvent->xkey.window; + ::Window aWindow = pEvent->xkey.window; std::list< SalFrame* >::const_iterator it; for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it ) @@ -1969,7 +1969,7 @@ bool SalX11Display::Dispatch( XEvent *pEvent ) for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it ) { X11SalFrame* pFrame = static_cast< X11SalFrame* >(*it); - XLIB_Window aDispatchWindow = pEvent->xany.window; + ::Window aDispatchWindow = pEvent->xany.window; if( pFrame->GetWindow() == aDispatchWindow || pFrame->GetShellWindow() == aDispatchWindow || pFrame->GetForeignParent() == aDispatchWindow diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx index 5ce45b825580..4c0536f9f5cf 100644 --- a/vcl/unx/generic/app/sm.cxx +++ b/vcl/unx/generic/app/sm.cxx @@ -263,7 +263,7 @@ IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, SaveYourselfHdl, void*, pStat const std::list< SalFrame* >& rFrames = GetGenericData()->GetSalDisplay()->getFrames(); for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it ) { - Window *pWindow = (*it)->GetWindow(); + vcl::Window *pWindow = (*it)->GetWindow(); if (pWindow && pWindow->IsVisible()) { *pSmRestartHint = SmRestartIfRunning; diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 4d67081bd683..20bb31e3a801 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -539,7 +539,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) : // check for GnomeWM if( m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ WIN_PROTOCOLS ] ) { - XLIB_Window aWMChild = None; + ::Window aWMChild = None; if( XGetWindowProperty( m_pDisplay, m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultXScreen() ), m_aWMAtoms[ WIN_SUPPORTING_WM_CHECK ], @@ -556,10 +556,10 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) : && nItems != 0 ) { - aWMChild = *(XLIB_Window*)pProperty; + aWMChild = *(::Window*)pProperty; XFree( pProperty ); pProperty = NULL; - XLIB_Window aCheckWindow = None; + ::Window aCheckWindow = None; GetGenericData()->ErrorTrapPush(); if( XGetWindowProperty( m_pDisplay, aWMChild, @@ -580,7 +580,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) : { GetGenericData()->ErrorTrapPush(); - aCheckWindow = *(XLIB_Window*)pProperty; + aCheckWindow = *(::Window*)pProperty; XFree( pProperty ); pProperty = NULL; if( aCheckWindow == aWMChild ) @@ -744,7 +744,7 @@ bool WMAdaptor::getNetWmName() if( m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ NET_WM_NAME ] ) { - XLIB_Window aWMChild = None; + ::Window aWMChild = None; if( XGetWindowProperty( m_pDisplay, m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultXScreen() ), m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ], @@ -761,10 +761,10 @@ bool WMAdaptor::getNetWmName() && nItems != 0 ) { - aWMChild = *(XLIB_Window*)pProperty; + aWMChild = *(::Window*)pProperty; XFree( pProperty ); pProperty = NULL; - XLIB_Window aCheckWindow = None; + ::Window aCheckWindow = None; GetGenericData()->ErrorTrapPush(); if( XGetWindowProperty( m_pDisplay, aWMChild, @@ -784,7 +784,7 @@ bool WMAdaptor::getNetWmName() if ( ! GetGenericData()->ErrorTrapPop( false ) ) { GetGenericData()->ErrorTrapPush(); - aCheckWindow = *(XLIB_Window*)pProperty; + aCheckWindow = *(::Window*)pProperty; XFree( pProperty ); pProperty = NULL; if( aCheckWindow == aWMChild ) @@ -1050,7 +1050,7 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const int nBytes = aProp.nitems ? aProp.nitems : aTitle.getLength(); const SystemEnvData* pEnv = pFrame->GetSystemData(); XChangeProperty( m_pDisplay, - (XLIB_Window)pEnv->aShellWindow, + (::Window)pEnv->aShellWindow, XA_WM_NAME, nType, nFormat, @@ -1058,7 +1058,7 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const pData, nBytes ); XChangeProperty( m_pDisplay, - (XLIB_Window)pEnv->aShellWindow, + (::Window)pEnv->aShellWindow, XA_WM_ICON_NAME, nType, nFormat, @@ -1066,7 +1066,7 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const pData, nBytes ); XChangeProperty( m_pDisplay, - (XLIB_Window)pEnv->aShellWindow, + (::Window)pEnv->aShellWindow, m_aWMAtoms[ WM_LOCALE_NAME ], XA_STRING, 8, @@ -1092,7 +1092,7 @@ void NetWMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) con const SystemEnvData* pEnv = pFrame->GetSystemData(); if( m_aWMAtoms[ NET_WM_NAME ] ) XChangeProperty( m_pDisplay, - (XLIB_Window)pEnv->aShellWindow, + (::Window)pEnv->aShellWindow, m_aWMAtoms[ NET_WM_NAME ], m_aWMAtoms[ UTF8_STRING ], 8, @@ -1101,7 +1101,7 @@ void NetWMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) con aTitle.getLength() ); if( m_aWMAtoms[ NET_WM_ICON_NAME ] ) XChangeProperty( m_pDisplay, - (XLIB_Window)pEnv->aShellWindow, + (::Window)pEnv->aShellWindow, m_aWMAtoms[ NET_WM_ICON_NAME ], m_aWMAtoms[ UTF8_STRING ], 8, @@ -1801,7 +1801,7 @@ void WMAdaptor::changeReferenceFrame( X11SalFrame* pFrame, X11SalFrame* pReferen && ! pFrame->IsFloatGrabWindow() ) { - XLIB_Window aTransient = pFrame->pDisplay_->GetRootWindow( pFrame->GetScreenNumber() ); + ::Window aTransient = pFrame->pDisplay_->GetRootWindow( pFrame->GetScreenNumber() ); pFrame->mbTransientForRoot = true; if( pReferenceFrame ) { @@ -2102,7 +2102,7 @@ void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const { if( m_pSalDisplay->IsXinerama() ) { - XLIB_Window aRoot, aChild; + ::Window aRoot, aChild; int root_x = 0, root_y = 0, lx, ly; unsigned int mask; XQueryPointer( m_pDisplay, @@ -2180,7 +2180,7 @@ int WMAdaptor::getCurrentWorkArea() const /* * WMAdaptor::getWindowWorkArea */ -int WMAdaptor::getWindowWorkArea( XLIB_Window aWindow ) const +int WMAdaptor::getWindowWorkArea( ::Window aWindow ) const { int nCurrent = -1; if( m_aWMAtoms[ NET_WM_DESKTOP ] ) diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx index aa1c84a30846..163d48eadb43 100644 --- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx +++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx @@ -72,7 +72,7 @@ static bool is_gnome_desktop( Display* pDisplay ) if( nUTFAtom && nNetWMNameAtom ) { // another, more expensive check: search for a gnome-panel - XLIB_Window aRoot, aParent, *pChildren = NULL; + ::Window aRoot, aParent, *pChildren = NULL; unsigned int nChildren = 0; XQueryTree( pDisplay, DefaultRootWindow( pDisplay ), &aRoot, &aParent, &pChildren, &nChildren ); diff --git a/vcl/unx/generic/dtrans/X11_dndcontext.cxx b/vcl/unx/generic/dtrans/X11_dndcontext.cxx index 19df17212532..3a8f67a0d037 100644 --- a/vcl/unx/generic/dtrans/X11_dndcontext.cxx +++ b/vcl/unx/generic/dtrans/X11_dndcontext.cxx @@ -28,7 +28,7 @@ using namespace x11; */ DropTargetDropContext::DropTargetDropContext( - XLIB_Window aDropWindow, + ::Window aDropWindow, XLIB_Time aTimestamp, SelectionManager& rManager ) : m_aDropWindow( aDropWindow ), @@ -62,7 +62,7 @@ void DropTargetDropContext::dropComplete( sal_Bool success ) throw(std::exceptio */ DropTargetDragContext::DropTargetDragContext( - XLIB_Window aDropWindow, + ::Window aDropWindow, XLIB_Time aTimestamp, SelectionManager& rManager ) : m_aDropWindow( aDropWindow ), @@ -91,7 +91,7 @@ void DropTargetDragContext::rejectDrag() throw(std::exception) */ DragSourceContext::DragSourceContext( - XLIB_Window aDropWindow, + ::Window aDropWindow, XLIB_Time aTimestamp, SelectionManager& rManager ) : m_aDropWindow( aDropWindow ), diff --git a/vcl/unx/generic/dtrans/X11_dndcontext.hxx b/vcl/unx/generic/dtrans/X11_dndcontext.hxx index 3b9138bb7981..bf162092024d 100644 --- a/vcl/unx/generic/dtrans/X11_dndcontext.hxx +++ b/vcl/unx/generic/dtrans/X11_dndcontext.hxx @@ -38,12 +38,12 @@ namespace x11 { ::com::sun::star::datatransfer::dnd::XDropTargetDropContext > { - XLIB_Window m_aDropWindow; + ::Window m_aDropWindow; XLIB_Time m_nTimestamp; SelectionManager& m_rManager; com::sun::star::uno::Reference< XInterface > m_xManagerRef; public: - DropTargetDropContext( XLIB_Window, XLIB_Time, SelectionManager& ); + DropTargetDropContext( ::Window, XLIB_Time, SelectionManager& ); virtual ~DropTargetDropContext(); // XDropTargetDropContext @@ -57,12 +57,12 @@ namespace x11 { ::com::sun::star::datatransfer::dnd::XDropTargetDragContext > { - XLIB_Window m_aDropWindow; + ::Window m_aDropWindow; XLIB_Time m_nTimestamp; SelectionManager& m_rManager; com::sun::star::uno::Reference< XInterface > m_xManagerRef; public: - DropTargetDragContext( XLIB_Window, XLIB_Time, SelectionManager& ); + DropTargetDragContext( ::Window, XLIB_Time, SelectionManager& ); virtual ~DropTargetDragContext(); // XDropTargetDragContext @@ -75,12 +75,12 @@ namespace x11 { ::com::sun::star::datatransfer::dnd::XDragSourceContext > { - XLIB_Window m_aDropWindow; + ::Window m_aDropWindow; XLIB_Time m_nTimestamp; SelectionManager& m_rManager; com::sun::star::uno::Reference< XInterface > m_xManagerRef; public: - DragSourceContext( XLIB_Window, XLIB_Time, SelectionManager& ); + DragSourceContext( ::Window, XLIB_Time, SelectionManager& ); virtual ~DragSourceContext(); // XDragSourceContext diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index 3bcc984f13c4..4082bab94404 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -876,7 +876,7 @@ bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_In if( it == m_aSelections.end() ) return false; - XLIB_Window aSelectionOwner = XGetSelectionOwner( m_pDisplay, selection ); + ::Window aSelectionOwner = XGetSelectionOwner( m_pDisplay, selection ); if( aSelectionOwner == None ) return false; if( aSelectionOwner == m_aWindow ) @@ -1423,7 +1423,7 @@ static sal_Size GetTrueFormatSize(int nFormat) } bool SelectionManager::sendData( SelectionAdaptor* pAdaptor, - XLIB_Window requestor, + ::Window requestor, Atom target, Atom property, Atom selection ) @@ -1510,7 +1510,7 @@ bool SelectionManager::sendData( SelectionAdaptor* pAdaptor, { #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "using INCR protocol\n" ); - boost::unordered_map< XLIB_Window, boost::unordered_map< Atom, IncrementalTransfer > >::const_iterator win_it = m_aIncrementals.find( requestor ); + boost::unordered_map< ::Window, boost::unordered_map< Atom, IncrementalTransfer > >::const_iterator win_it = m_aIncrementals.find( requestor ); if( win_it != m_aIncrementals.end() ) { boost::unordered_map< Atom, IncrementalTransfer >::const_iterator inc_it = win_it->second.find( property ); @@ -1904,7 +1904,7 @@ bool SelectionManager::handleSendPropertyNotify( XPropertyEvent& rNotify ) // feed incrementals if( rNotify.state == PropertyDelete ) { - boost::unordered_map< XLIB_Window, boost::unordered_map< Atom, IncrementalTransfer > >::iterator it; + boost::unordered_map< ::Window, boost::unordered_map< Atom, IncrementalTransfer > >::iterator it; it = m_aIncrementals.find( rNotify.window ); if( it != m_aIncrementals.end() ) { @@ -2082,12 +2082,12 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) osl::ResettableMutexGuard aGuard(m_aMutex); // handle drop related events - XLIB_Window aSource = rMessage.data.l[0]; - XLIB_Window aTarget = rMessage.window; + ::Window aSource = rMessage.data.l[0]; + ::Window aTarget = rMessage.window; bool bHandled = false; - ::boost::unordered_map< XLIB_Window, DropTargetEntry >::iterator it = + ::boost::unordered_map< ::Window, DropTargetEntry >::iterator it = m_aDropTargets.find( aTarget ); #if OSL_DEBUG_LEVEL > 1 @@ -2101,7 +2101,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) fprintf( stderr, "but no target found\n" ); else if( ! it->second.m_pTarget->m_bActive ) fprintf( stderr, "but target is inactive\n" ); - else if( m_aDropEnterEvent.data.l[0] != None && (XLIB_Window)m_aDropEnterEvent.data.l[0] != aSource ) + else if( m_aDropEnterEvent.data.l[0] != None && (::Window)m_aDropEnterEvent.data.l[0] != aSource ) fprintf( stderr, "but source 0x%lx is unknown (expected 0x%lx or 0)\n", aSource, m_aDropEnterEvent.data.l[0] ); else fprintf( stderr, "processing.\n" ); @@ -2122,7 +2122,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) if( it != m_aDropTargets.end() && it->second.m_pTarget->m_bActive && - ( m_aDropEnterEvent.data.l[0] == None || XLIB_Window(m_aDropEnterEvent.data.l[0]) == aSource ) + ( m_aDropEnterEvent.data.l[0] == None || ::Window(m_aDropEnterEvent.data.l[0]) == aSource ) ) { if( rMessage.message_type == m_nXdndEnter ) @@ -2138,7 +2138,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) } else if( rMessage.message_type == m_nXdndPosition && - aSource == XLIB_Window(m_aDropEnterEvent.data.l[0]) + aSource == ::Window(m_aDropEnterEvent.data.l[0]) ) { bHandled = true; @@ -2146,7 +2146,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) if( ! m_bDropEnterSent ) m_nDropTimestamp = m_nDropTime; - XLIB_Window aChild; + ::Window aChild; XTranslateCoordinates( m_pDisplay, it->second.m_aRootWindow, it->first, @@ -2194,7 +2194,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) } else if( rMessage.message_type == m_nXdndLeave && - aSource == XLIB_Window(m_aDropEnterEvent.data.l[0]) + aSource == ::Window(m_aDropEnterEvent.data.l[0]) ) { bHandled = true; @@ -2212,7 +2212,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) } else if( rMessage.message_type == m_nXdndDrop && - aSource == XLIB_Window(m_aDropEnterEvent.data.l[0]) + aSource == ::Window(m_aDropEnterEvent.data.l[0]) ) { bHandled = true; @@ -2259,7 +2259,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) * methods for XDropTargetDropContext */ -void SelectionManager::dropComplete( bool bSuccess, XLIB_Window aDropWindow, XLIB_Time ) +void SelectionManager::dropComplete( bool bSuccess, ::Window aDropWindow, XLIB_Time ) { osl::ClearableMutexGuard aGuard(m_aMutex); @@ -2455,14 +2455,14 @@ void SelectionManager::sendDropPosition( bool bForce, XLIB_Time eventTime ) if( m_bDropSent ) return; - ::boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it = + ::boost::unordered_map< ::Window, DropTargetEntry >::const_iterator it = m_aDropTargets.find( m_aDropWindow ); if( it != m_aDropTargets.end() ) { if( it->second.m_pTarget->m_bActive ) { int x, y; - XLIB_Window aChild; + ::Window aChild; XTranslateCoordinates( m_pDisplay, it->second.m_aRootWindow, m_aDropWindow, m_nLastDragX, m_nLastDragY, &x, &y, &aChild ); DropTargetDragEvent dtde; dtde.Source = static_cast< OWeakObject* >(it->second.m_pTarget ); @@ -2516,7 +2516,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage ) bool bHandled = false; // for shortcut - ::boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it = + ::boost::unordered_map< ::Window, DropTargetEntry >::const_iterator it = m_aDropTargets.find( m_aDropWindow ); #if OSL_DEBUG_LEVEL > 1 switch( rMessage.type ) @@ -2622,7 +2622,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage ) bool bForce = false; int root_x = rMessage.type == MotionNotify ? rMessage.xmotion.x_root : rMessage.xcrossing.x_root; int root_y = rMessage.type == MotionNotify ? rMessage.xmotion.y_root : rMessage.xcrossing.y_root; - XLIB_Window root = rMessage.type == MotionNotify ? rMessage.xmotion.root : rMessage.xcrossing.root; + ::Window root = rMessage.type == MotionNotify ? rMessage.xmotion.root : rMessage.xcrossing.root; m_nDragTimestamp = rMessage.type == MotionNotify ? rMessage.xmotion.time : rMessage.xcrossing.time; aGuard.clear(); @@ -2718,7 +2718,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage ) { bHandled = true; int x, y; - XLIB_Window aChild; + ::Window aChild; XTranslateCoordinates( m_pDisplay, rMessage.xbutton.root, m_aDropWindow, rMessage.xbutton.x_root, rMessage.xbutton.y_root, &x, &y, &aChild ); DropTargetDropEvent dtde; dtde.Source = static_cast< OWeakObject* >(it->second.m_pTarget ); @@ -2768,7 +2768,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage ) { bHandled = true; - XLIB_Window aDummy; + ::Window aDummy; XEvent aEvent; aEvent.type = ButtonPress; aEvent.xbutton.display = m_pDisplay; @@ -2825,7 +2825,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage ) return bHandled; } -void SelectionManager::accept( sal_Int8 dragOperation, XLIB_Window aDropWindow, XLIB_Time ) +void SelectionManager::accept( sal_Int8 dragOperation, ::Window aDropWindow, XLIB_Time ) { if( aDropWindow == m_aCurrentDropWindow ) { @@ -2845,7 +2845,7 @@ void SelectionManager::accept( sal_Int8 dragOperation, XLIB_Window aDropWindow, } } -void SelectionManager::reject( XLIB_Window aDropWindow, XLIB_Time ) +void SelectionManager::reject( ::Window aDropWindow, XLIB_Time ) { if( aDropWindow == m_aCurrentDropWindow ) { @@ -2889,7 +2889,7 @@ sal_Int32 SelectionManager::getDefaultCursor( sal_Int8 dragAction ) throw(std::e return aCursor; } -int SelectionManager::getXdndVersion( XLIB_Window aWindow, XLIB_Window& rProxy ) +int SelectionManager::getXdndVersion( ::Window aWindow, ::Window& rProxy ) { Atom* pProperties = NULL; int nProperties = 0; @@ -2917,7 +2917,7 @@ int SelectionManager::getXdndVersion( XLIB_Window aWindow, XLIB_Window& rProxy ) if( pBytes ) { if( nType == XA_WINDOW ) - rProxy = *(XLIB_Window*)pBytes; + rProxy = *(::Window*)pBytes; XFree( pBytes ); pBytes = NULL; if( rProxy != None ) @@ -2927,7 +2927,7 @@ int SelectionManager::getXdndVersion( XLIB_Window aWindow, XLIB_Window& rProxy ) &nType, &nFormat, &nItems, &nBytes, &pBytes ); if( pBytes ) { - if( nType == XA_WINDOW && *(XLIB_Window*)pBytes != rProxy ) + if( nType == XA_WINDOW && *(::Window*)pBytes != rProxy ) rProxy = None; XFree( pBytes ); pBytes = NULL; @@ -2942,7 +2942,7 @@ int SelectionManager::getXdndVersion( XLIB_Window aWindow, XLIB_Window& rProxy ) if ( pProperties ) XFree (pProperties); - XLIB_Window aAwareWindow = rProxy != None ? rProxy : aWindow; + ::Window aAwareWindow = rProxy != None ? rProxy : aWindow; XGetWindowProperty( m_pDisplay, aAwareWindow, m_nXdndAware, 0, 1, False, XA_ATOM, &nType, &nFormat, &nItems, &nBytes, &pBytes ); @@ -2958,7 +2958,7 @@ int SelectionManager::getXdndVersion( XLIB_Window aWindow, XLIB_Window& rProxy ) return nVersion; } -void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot ) +void SelectionManager::updateDragWindow( int nX, int nY, ::Window aRoot ) { osl::ResettableMutexGuard aGuard( m_aMutex ); @@ -2967,9 +2967,9 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot ) m_nLastDragX = nX; m_nLastDragY = nY; - XLIB_Window aParent = aRoot; - XLIB_Window aChild; - XLIB_Window aNewProxy = None, aNewCurrentWindow = None; + ::Window aParent = aRoot; + ::Window aChild; + ::Window aNewProxy = None, aNewCurrentWindow = None; int nNewProtocolVersion = -1; int nWinX, nWinY; @@ -3009,7 +3009,7 @@ void SelectionManager::updateDragWindow( int nX, int nY, XLIB_Window aRoot ) dsde.DropAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY; dsde.UserAction = nNewProtocolVersion >= 0 ? m_nUserDragAction : DNDConstants::ACTION_COPY; - ::boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it; + ::boost::unordered_map< ::Window, DropTargetEntry >::const_iterator it; if( aNewCurrentWindow != m_aDropWindow ) { #if OSL_DEBUG_LEVEL > 1 @@ -3158,11 +3158,11 @@ void SelectionManager::startDrag( // the pointer is located in. since said window should be one // of our DropTargets at the time of executeDrag we can use // them for a start - XLIB_Window aRoot, aParent, aChild; + ::Window aRoot, aParent, aChild; int root_x(0), root_y(0), win_x(0), win_y(0); unsigned int mask(0); - ::boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it; + ::boost::unordered_map< ::Window, DropTargetEntry >::const_iterator it; it = m_aDropTargets.begin(); while( it != m_aDropTargets.end() ) { @@ -3457,7 +3457,7 @@ void SelectionManager::dragDoDispatch() */ -void SelectionManager::setCursor( sal_Int32 cursor, XLIB_Window aDropWindow, XLIB_Time ) +void SelectionManager::setCursor( sal_Int32 cursor, ::Window aDropWindow, XLIB_Time ) { osl::MutexGuard aGuard( m_aMutex ); if( aDropWindow == m_aDropWindow && Cursor(cursor) != m_aCurrentCursor ) @@ -3471,7 +3471,7 @@ void SelectionManager::setCursor( sal_Int32 cursor, XLIB_Window aDropWindow, XLI } } -void SelectionManager::setImage( sal_Int32, XLIB_Window, XLIB_Time ) +void SelectionManager::setImage( sal_Int32, ::Window, XLIB_Time ) { } @@ -3687,7 +3687,7 @@ void SelectionManager::run( void* pThis ) { if( it->first != This->m_nXdndSelection && ! it->second->m_bOwner ) { - XLIB_Window aOwner = XGetSelectionOwner( This->m_pDisplay, it->first ); + ::Window aOwner = XGetSelectionOwner( This->m_pDisplay, it->first ); if( aOwner != it->second->m_aLastOwner ) { it->second->m_aLastOwner = aOwner; @@ -3868,12 +3868,12 @@ extern "C" typedef int(*xerror_hdl_t)(Display*,XErrorEvent*); } -void SelectionManager::registerDropTarget( XLIB_Window aWindow, DropTarget* pTarget ) +void SelectionManager::registerDropTarget( ::Window aWindow, DropTarget* pTarget ) { osl::MutexGuard aGuard(m_aMutex); // sanity check - ::boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it = + ::boost::unordered_map< ::Window, DropTargetEntry >::const_iterator it = m_aDropTargets.find( aWindow ); if( it != m_aDropTargets.end() ) OSL_FAIL( "attempt to register window as drop target twice" ); @@ -3910,7 +3910,7 @@ void SelectionManager::registerDropTarget( XLIB_Window aWindow, DropTarget* pTar OSL_FAIL( "attempt to register None as drop target" ); } -void SelectionManager::deregisterDropTarget( XLIB_Window aWindow ) +void SelectionManager::deregisterDropTarget( ::Window aWindow ) { osl::ClearableMutexGuard aGuard(m_aMutex); @@ -3918,7 +3918,7 @@ void SelectionManager::deregisterDropTarget( XLIB_Window aWindow ) if( aWindow == m_aDragSourceWindow && m_aDragRunning.check() ) { // abort drag - boost::unordered_map< XLIB_Window, DropTargetEntry >::const_iterator it = + boost::unordered_map< ::Window, DropTargetEntry >::const_iterator it = m_aDropTargets.find( m_aDropWindow ); if( it != m_aDropTargets.end() ) { diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx index 4aef1eb4d00b..489a915a62ad 100644 --- a/vcl/unx/generic/dtrans/X11_selection.hxx +++ b/vcl/unx/generic/dtrans/X11_selection.hxx @@ -74,7 +74,7 @@ namespace x11 { ::osl::Mutex m_aMutex; bool m_bActive; sal_Int8 m_nDefaultActions; - XLIB_Window m_aTargetWindow; + ::Window m_aTargetWindow; class SelectionManager* m_pSelectionManager; css::uno::Reference< css::datatransfer::dnd::XDragSource > m_xSelectionManager; @@ -165,7 +165,7 @@ namespace x11 { { css::uno::Sequence< sal_Int8 > m_aData; int m_nBufferPos; - XLIB_Window m_aRequestor; + ::Window m_aRequestor; Atom m_aProperty; Atom m_aTarget; int m_nFormat; @@ -199,7 +199,7 @@ namespace x11 { Atom m_aUTF8Type; bool m_bHaveCompound; bool m_bOwner; - XLIB_Window m_aLastOwner; + ::Window m_aLastOwner; PixmapHolder* m_pPixmap; // m_nOrigXLIB_Timestamp contains the XLIB_Timestamp at which the seclection // was acquired; needed for XLIB_TimeSTAMP target @@ -224,7 +224,7 @@ namespace x11 { struct DropTargetEntry { DropTarget* m_pTarget; - XLIB_Window m_aRootWindow; + ::Window m_aRootWindow; DropTargetEntry() : m_pTarget( NULL ), m_aRootWindow( None ) {} DropTargetEntry( DropTarget* pTarget ) : @@ -248,7 +248,7 @@ namespace x11 { int m_EndThreadPipe[2]; oslThread m_aDragExecuteThread; ::osl::Condition m_aDragRunning; - XLIB_Window m_aWindow; + ::Window m_aWindow; css::uno::Reference< css::frame::XDesktop2 > m_xDesktop; css::uno::Reference< css::awt::XDisplayConnection > m_xDisplayConnection; @@ -261,13 +261,13 @@ namespace x11 { // contains the XdndEnterEvent of a drop action running // with one of our targets. The data.l[0] member - // (conatining the drag source XLIB_Window) is set + // (conatining the drag source ::Window) is set // to None while that is not the case XClientMessageEvent m_aDropEnterEvent; // set to false on XdndEnter // set to true on first XdndPosition or XdndLeave bool m_bDropEnterSent; - XLIB_Window m_aCurrentDropWindow; + ::Window m_aCurrentDropWindow; // XLIB_Time code of XdndDrop XLIB_Time m_nDropTime; sal_Int8 m_nLastDropAction; @@ -285,10 +285,10 @@ namespace x11 { // drag only // None if no Dnd action is running with us as source - XLIB_Window m_aDropWindow; - // either m_aDropXLIB_Window or its XdndProxy - XLIB_Window m_aDropProxy; - XLIB_Window m_aDragSourceWindow; + ::Window m_aDropWindow; + // either m_aDropWindow or its XdndProxy + ::Window m_aDropProxy; + ::Window m_aDragSourceWindow; // XTransferable for Xdnd when we are drag source css::uno::Reference< css::datatransfer::XTransferable > m_xDragSourceTransferable; @@ -322,7 +322,7 @@ namespace x11 { // drag and drop int m_nCurrentProtocolVersion; - ::boost::unordered_map< XLIB_Window, DropTargetEntry > + ::boost::unordered_map< ::Window, DropTargetEntry > m_aDropTargets; // some special atoms that are needed often @@ -361,7 +361,7 @@ namespace x11 { ::boost::unordered_map< Atom, Selection* > m_aSelections; // IncrementalTransfers in progress - boost::unordered_map< XLIB_Window, boost::unordered_map< Atom, IncrementalTransfer > > + boost::unordered_map< ::Window, boost::unordered_map< Atom, IncrementalTransfer > > m_aIncrementals; // do not use X11 multithreading capabilities @@ -388,10 +388,10 @@ namespace x11 { void sendDragStatus( Atom nDropAction ); void sendDropPosition( bool bForce, XLIB_Time eventXLIB_Time ); bool updateDragAction( int modifierState ); - int getXdndVersion( XLIB_Window aXLIB_Window, XLIB_Window& rProxy ); + int getXdndVersion( ::Window aXLIB_Window, ::Window& rProxy ); Cursor createCursor( const unsigned char* pPointerData, const unsigned char* pMaskData, int width, int height, int hotX, int hotY ); - // coordinates on root XLIB_Window - void updateDragWindow( int nX, int nY, XLIB_Window aRoot ); + // coordinates on root ::Window + void updateDragWindow( int nX, int nY, ::Window aRoot ); bool getPasteData( Atom selection, Atom type, css::uno::Sequence< sal_Int8 >& rData ); // returns true if conversion was successful @@ -400,7 +400,7 @@ namespace x11 { Atom nSelection, int & rFormat, css::uno::Sequence< sal_Int8 >& rData ); - bool sendData( SelectionAdaptor* pAdaptor, XLIB_Window requestor, Atom target, Atom property, Atom selection ); + bool sendData( SelectionAdaptor* pAdaptor, ::Window requestor, Atom target, Atom property, Atom selection ); // thread dispatch loop public: @@ -426,7 +426,7 @@ namespace x11 { static SelectionManager& get( const OUString& rDisplayName = OUString() ); Display * getDisplay() { return m_pDisplay; }; - XLIB_Window getWindow() { return m_aWindow; }; + ::Window getWindow() { return m_aWindow; }; void registerHandler( Atom selection, SelectionAdaptor& rAdaptor ); void deregisterHandler( Atom selection ); @@ -450,18 +450,18 @@ namespace x11 { bool getPasteData( Atom selection, const OUString& rType, css::uno::Sequence< sal_Int8 >& rData ); // for XDropTarget to register/deregister itself - void registerDropTarget( XLIB_Window aXLIB_Window, DropTarget* pTarget ); - void deregisterDropTarget( XLIB_Window aXLIB_Window ); + void registerDropTarget( ::Window aXLIB_Window, DropTarget* pTarget ); + void deregisterDropTarget( ::Window aXLIB_Window ); // for XDropTarget{Drag|Drop}Context - void accept( sal_Int8 dragOperation, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - void reject( XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - void dropComplete( bool success, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void accept( sal_Int8 dragOperation, ::Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void reject( ::Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void dropComplete( bool success, ::Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); // for XDragSourceContext sal_Int32 getCurrentCursor() { return m_aCurrentCursor;} - void setCursor( sal_Int32 cursor, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - void setImage( sal_Int32 image, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void setCursor( sal_Int32 cursor, ::Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void setImage( sal_Int32 image, ::Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); void transferablesFlavorsChanged(); void shutdown() throw(); diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx index 0fb3fe6bdee9..3f47e88885ea 100644 --- a/vcl/unx/generic/dtrans/bmp.cxx +++ b/vcl/unx/generic/dtrans/bmp.cxx @@ -306,7 +306,7 @@ sal_uInt8* x11::X11_getBmpFromPixmap( ) { // get geometry of drawable - XLIB_Window aRoot; + ::Window aRoot; int x,y; unsigned int w, h, bw, d; XGetGeometry( pDisplay, aDrawable, &aRoot, &x, &y, &w, &h, &bw, &d ); diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx index 4af97a5dc49c..84859dad4b85 100644 --- a/vcl/unx/generic/gdi/salgdi2.cxx +++ b/vcl/unx/generic/gdi/salgdi2.cxx @@ -240,7 +240,7 @@ void X11SalGraphics::YieldGraphicsExpose() // get frame if necessary SalFrame* pFrame = m_pFrame; Display* pDisplay = GetXDisplay(); - XLIB_Window aWindow = GetDrawable(); + ::Window aWindow = GetDrawable(); if( ! pFrame ) { const std::list< SalFrame* >& rFrames = GetGenericData()->GetSalDisplay()->getFrames(); diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index cd0d0b5c0aeb..83925d9f3186 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -42,7 +42,7 @@ SalVirtualDevice* X11SalInstance::CreateVirtualDevice( SalGraphics* pGraphics, if( pData && pData->hDrawable != None ) { - XLIB_Window aRoot; + ::Window aRoot; int x, y; unsigned int w = 0, h = 0, bw, d; Display* pDisp = GetGenericData()->GetSalDisplay()->GetDisplay(); diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx index 99417d8304f5..a9727e9f07ed 100644 --- a/vcl/unx/generic/printer/cupsmgr.cxx +++ b/vcl/unx/generic/printer/cupsmgr.cxx @@ -844,13 +844,13 @@ namespace Edit* m_pPassEdit; public: - RTSPWDialog(const OString& rServer, const OString& rUserName, Window* pParent); + RTSPWDialog(const OString& rServer, const OString& rUserName, vcl::Window* pParent); OString getUserName() const; OString getPassword() const; }; - RTSPWDialog::RTSPWDialog( const OString& rServer, const OString& rUserName, Window* pParent ) + RTSPWDialog::RTSPWDialog( const OString& rServer, const OString& rUserName, vcl::Window* pParent ) : ModalDialog(pParent, "CUPSPasswordDialog", "vcl/ui/cupspassworddialog.ui") { diff --git a/vcl/unx/generic/window/FWS.cxx b/vcl/unx/generic/window/FWS.cxx index a2dbdae3da16..97a089d0c4cf 100644 --- a/vcl/unx/generic/window/FWS.cxx +++ b/vcl/unx/generic/window/FWS.cxx @@ -102,7 +102,7 @@ WMSupportsFWS (Display *display, int screen) return False; } - fwsCommWindow = *(Window *) propData; + fwsCommWindow = *(::Window *) propData; #if OSL_DEBUG_LEVEL > 1 fprintf (stderr, "Using fwsCommWindow = 0x%lx.\n", fwsCommWindow); #endif diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index ebce145a0e45..b99c2aa9a899 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -94,8 +94,8 @@ using namespace vcl_sal; | PropertyChangeMask \ | ColormapChangeMask -static XLIB_Window hPresentationWindow = None, hPresFocusWindow = None; -static ::std::list< XLIB_Window > aPresentationReparentList; +static ::Window hPresentationWindow = None, hPresFocusWindow = None; +static ::std::list< ::Window > aPresentationReparentList; static int nVisibleFloats = 0; static void doReparentPresentationDialogues( SalDisplay* pDisplay ) @@ -104,7 +104,7 @@ static void doReparentPresentationDialogues( SalDisplay* pDisplay ) while( aPresentationReparentList.begin() != aPresentationReparentList.end() ) { int x, y; - XLIB_Window aRoot, aChild; + ::Window aRoot, aChild; unsigned int w, h, bw, d; XGetGeometry( pDisplay->GetDisplay(), aPresentationReparentList.front(), @@ -353,8 +353,8 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP Attributes.event_mask = CLIENT_EVENTS; const SalVisual& rVis = GetDisplay()->GetVisual( m_nXScreen ); - XLIB_Window aFrameParent = pParentData ? pParentData->aWindow : GetDisplay()->GetRootWindow( m_nXScreen ); - XLIB_Window aClientLeader = None; + ::Window aFrameParent = pParentData ? pParentData->aWindow : GetDisplay()->GetRootWindow( m_nXScreen ); + ::Window aClientLeader = None; if( bUseGeometry ) { @@ -403,14 +403,14 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP int x_ret, y_ret; unsigned int bw, d; - XLIB_Window aRoot, aParent; + ::Window aRoot, aParent; XGetGeometry( GetXDisplay(), pParentData->aWindow, &aRoot, &x_ret, &y_ret, &w, &h, &bw, &d ); mhForeignParent = pParentData->aWindow; mhShellWindow = aParent = mhForeignParent; - XLIB_Window* pChildren; + ::Window* pChildren; unsigned int nChildren; bool bBreak = false; do @@ -500,7 +500,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP else if( GetDisplay()->IsXinerama() ) { // place frame on same screen as mouse pointer - XLIB_Window aRoot, aChild; + ::Window aRoot, aChild; int root_x = 0, root_y = 0, lx, ly; unsigned int mask; XQueryPointer( GetXDisplay(), @@ -1378,7 +1378,7 @@ void X11SalFrame::ToTop( sal_uInt16 nFlags ) XMapWindow( GetXDisplay(), GetWindow() ); } - XLIB_Window aToTopWindow = IsSysChildWindow() ? GetWindow() : GetShellWindow(); + ::Window aToTopWindow = IsSysChildWindow() ? GetWindow() : GetShellWindow(); if( ! (nFlags & SAL_FRAME_TOTOP_GRABFOCUS_ONLY) ) { XRaiseWindow( GetXDisplay(), aToTopWindow ); @@ -1442,7 +1442,7 @@ void X11SalFrame::Center( ) // get xinerama screen we are on // if there is a parent, use its center for screen determination // else use the pointer - XLIB_Window aRoot, aChild; + ::Window aRoot, aChild; int root_x, root_y, x, y; unsigned int mask; if( mpParent ) @@ -1486,7 +1486,7 @@ void X11SalFrame::Center( ) if( pFrame->nStyle_ & SAL_FRAME_STYLE_PLUG ) { - XLIB_Window aRoot; + ::Window aRoot; unsigned int bw, depth; XGetGeometry( GetXDisplay(), pFrame->GetShellWindow(), @@ -1897,7 +1897,7 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize ) if( Application::GetSettings().GetLayoutRTL() ) values.x = mpParent->maGeometry.nWidth-values.width-1-values.x; - XLIB_Window aChild; + ::Window aChild; // coordinates are relative to parent, so translate to root coordinates XTranslateCoordinates( GetDisplay()->GetDisplay(), mpParent->GetWindow(), @@ -2203,7 +2203,7 @@ void X11SalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen ) ------------------------------------------------------------------- */ static Bool -IsRunningXAutoLock( Display *p_display, XLIB_Window a_window ) +IsRunningXAutoLock( Display *p_display, ::Window a_window ) { const char *p_atomname = "XAUTOLOCK_SEMAPHORE_PID"; Atom a_pidatom; @@ -2247,7 +2247,7 @@ MessageToXAutoLock( Display *p_display, int n_message ) { const char *p_atomname = "XAUTOLOCK_MESSAGE" ; Atom a_messageatom; - XLIB_Window a_rootwindow; + ::Window a_rootwindow; a_rootwindow = RootWindowOfScreen( ScreenOfDisplay(p_display, 0) ); if ( ! IsRunningXAutoLock(p_display, a_rootwindow) ) @@ -2555,7 +2555,7 @@ SalFrame* X11SalFrame::GetParent() const return mpParent; } -void X11SalFrame::createNewWindow( XLIB_Window aNewParent, SalX11Screen nXScreen ) +void X11SalFrame::createNewWindow( ::Window aNewParent, SalX11Screen nXScreen ) { bool bWasVisible = bMapped_; if( bWasVisible ) @@ -2682,7 +2682,7 @@ static sal_uInt16 sal_GetCode( int state ) SalFrame::SalPointerState X11SalFrame::GetPointerState() { SalPointerState aState; - XLIB_Window aRoot, aChild; + ::Window aRoot, aChild; int rx, ry, wx, wy; unsigned int nMask = 0; XQueryPointer( GetXDisplay(), @@ -2847,7 +2847,7 @@ long X11SalFrame::HandleMouseEvent( XEvent *pEvent ) * is unknown (the above case implicitly assumes * that floats are on top which should be true) */ - XLIB_Window aRoot, aChild; + ::Window aRoot, aChild; int root_x, root_y, win_x, win_y; unsigned int mask_return; if( XQueryPointer( GetXDisplay(), @@ -3482,7 +3482,7 @@ long X11SalFrame::HandleExposeEvent( XEvent *pEvent ) return 1; } -void X11SalFrame::RestackChildren( XLIB_Window* pTopLevelWindows, int nTopLevelWindows ) +void X11SalFrame::RestackChildren( ::Window* pTopLevelWindows, int nTopLevelWindows ) { if( maChildren.begin() != maChildren.end() ) { @@ -3528,7 +3528,7 @@ void X11SalFrame::RestackChildren() if( ! GetDisplay()->getWMAdaptor()->isTransientBehaviourAsExpected() && maChildren.begin() != maChildren.end() ) { - XLIB_Window aRoot, aParent, *pChildren = NULL; + ::Window aRoot, aParent, *pChildren = NULL; unsigned int nChildren; if( XQueryTree( GetXDisplay(), GetDisplay()->GetRootWindow( m_nXScreen ), @@ -3596,7 +3596,7 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent ) pEvent->width, pEvent->height ); - XLIB_Window hDummy; + ::Window hDummy; XTranslateCoordinates( GetXDisplay(), GetWindow(), pDisplay_->GetRootWindow( pDisplay_->GetDefaultXScreen() ), @@ -3664,8 +3664,8 @@ IMPL_LINK_NOARG(X11SalFrame, HandleAlwaysOnTopRaise) long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent ) { Display *pDisplay = pEvent->display; - XLIB_Window hWM_Parent; - XLIB_Window hRoot, *Children, hDummy; + ::Window hWM_Parent; + ::Window hRoot, *Children, hDummy; unsigned int nChildren; bool bNone = pDisplay_->GetProperties() & PROPERTY_SUPPORT_WM_Parent_Pixmap_None; @@ -3755,7 +3755,7 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent ) ) { int x = 0, y = 0; - XLIB_Window aChild; + ::Window aChild; XTranslateCoordinates( GetXDisplay(), GetStackingWindow(), GetDisplay()->GetRootWindow( m_nXScreen ), @@ -4207,7 +4207,7 @@ void X11SalFrame::ResetClipRegion() XWindowAttributes win_attrib; XRectangle win_size; - XLIB_Window aShapeWindow = mhShellWindow; + ::Window aShapeWindow = mhShellWindow; XGetWindowAttributes ( GetDisplay()->GetDisplay(), aShapeWindow, @@ -4257,7 +4257,7 @@ void X11SalFrame::EndSetClipRegion() const int ordering = YSorted; const int op = ShapeSet; - XLIB_Window aShapeWindow = mhShellWindow; + ::Window aShapeWindow = mhShellWindow; XShapeCombineRectangles ( GetDisplay()->GetDisplay(), aShapeWindow, dest_kind, diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx index 7a61bd1c92bd..4b53995fd186 100644 --- a/vcl/unx/generic/window/salobj.cxx +++ b/vcl/unx/generic/window/salobj.cxx @@ -62,7 +62,7 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p SalDisplay* pSalDisp = GetGenericData()->GetSalDisplay(); const SystemEnvData* pEnv = pParent->GetSystemData(); Display* pDisp = pSalDisp->GetDisplay(); - XLIB_Window aObjectParent = (XLIB_Window)pEnv->aWindow; + ::Window aObjectParent = (::Window)pEnv->aWindow; // find out on which screen that window is XWindowAttributes aParentAttr; @@ -271,7 +271,7 @@ X11SalObject::ResetClipRegion() XWindowAttributes win_attrib; XRectangle win_size; - XLIB_Window aShapeWindow = maPrimary; + ::Window aShapeWindow = maPrimary; XGetWindowAttributes ( (Display*)maSystemChildData.pDisplay, aShapeWindow, @@ -329,7 +329,7 @@ X11SalObject::EndSetClipRegion() op = ShapeUnion; } - XLIB_Window aShapeWindow = maPrimary; + ::Window aShapeWindow = maPrimary; XShapeCombineRectangles ( (Display*)maSystemChildData.pDisplay, aShapeWindow, @@ -439,7 +439,7 @@ bool X11SalObject::Dispatch( XEvent* pEvent ) SalMouseEvent aEvt; const SystemEnvData* pParentData = pObject->mpParent->GetSystemData(); int dest_x, dest_y; - XLIB_Window aChild = None; + ::Window aChild = None; XTranslateCoordinates( pEvent->xbutton.display, pEvent->xbutton.root, pParentData->aWindow, diff --git a/vcl/unx/gtk/a11y/atkfactory.cxx b/vcl/unx/gtk/a11y/atkfactory.cxx index 01a55a72ac8f..54e0ac3e0b18 100644 --- a/vcl/unx/gtk/a11y/atkfactory.cxx +++ b/vcl/unx/gtk/a11y/atkfactory.cxx @@ -111,10 +111,10 @@ wrapper_factory_create_accessible( GObject *obj ) GtkSalFrame* pFrame = GtkSalFrame::getFromWindow( GTK_WINDOW( parent_widget ) ); g_return_val_if_fail( pFrame != NULL, NULL ); - Window* pFrameWindow = pFrame->GetWindow(); + vcl::Window* pFrameWindow = pFrame->GetWindow(); if( pFrameWindow ) { - Window* pWindow = pFrameWindow; + vcl::Window* pWindow = pFrameWindow; // skip accessible objects already exposed by the frame objects if( WINDOW_BORDERWINDOW == pWindow->GetType() ) diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index 96990c910f5c..b2eae95ea044 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -396,7 +396,7 @@ void DocumentFocusListener::detachRecursive( * page tabs in gtk are widgets, so we need to simulate focus events for those */ -static void handle_tabpage_activated(Window *pWindow) +static void handle_tabpage_activated(vcl::Window *pWindow) { uno::Reference< accessibility::XAccessible > xAccessible = pWindow->GetAccessible(); @@ -436,7 +436,7 @@ static void notify_toolbox_item_focus(ToolBox *pToolBox) atk_wrapper_focus_tracker_notify_when_idle( xContext->getAccessibleChild( nPos ) ); } -static void handle_toolbox_highlight(Window *pWindow) +static void handle_toolbox_highlight(vcl::Window *pWindow) { ToolBox *pToolBox = static_cast <ToolBox *> (pWindow); @@ -451,7 +451,7 @@ static void handle_toolbox_highlight(Window *pWindow) notify_toolbox_item_focus(pToolBox); } -static void handle_toolbox_highlightoff(Window *pWindow) +static void handle_toolbox_highlightoff(vcl::Window *pWindow) { ToolBox *pToolBox = static_cast <ToolBox *> (pWindow); ToolBox* pToolBoxParent = dynamic_cast< ToolBox* >( pToolBox->GetParent() ); @@ -482,7 +482,7 @@ static void create_wrapper_for_child( static void handle_toolbox_buttonchange(VclWindowEvent const *pEvent) { - Window* pWindow = pEvent->GetWindow(); + vcl::Window* pWindow = pEvent->GetWindow(); sal_Int32 index = (sal_Int32)(sal_IntPtr) pEvent->GetData(); if( pWindow && pWindow->IsReallyVisible() ) @@ -497,14 +497,14 @@ static void handle_toolbox_buttonchange(VclWindowEvent const *pEvent) /*****************************************************************************/ -static std::set< Window * > g_aWindowList; +static std::set< vcl::Window * > g_aWindowList; static void handle_get_focus(::VclWindowEvent const * pEvent) { static rtl::Reference< DocumentFocusListener > aDocumentFocusListener = new DocumentFocusListener(); - Window *pWindow = pEvent->GetWindow(); + vcl::Window *pWindow = pEvent->GetWindow(); // The menu bar is handled through VCLEVENT_MENU_HIGHLIGHTED if( ! pWindow || !pWindow->IsReallyVisible() || pWindow->GetType() == WINDOW_MENUBARWINDOW ) diff --git a/vcl/unx/gtk/a11y/atkwindow.cxx b/vcl/unx/gtk/a11y/atkwindow.cxx index a74de46bc0d0..0f39c0169f23 100644 --- a/vcl/unx/gtk/a11y/atkwindow.cxx +++ b/vcl/unx/gtk/a11y/atkwindow.cxx @@ -37,7 +37,7 @@ static void (* window_real_initialize) (AtkObject *obj, gpointer data) = NULL; static void (* window_real_finalize) (GObject *obj) = NULL; static void -init_from_window( AtkObject *accessible, Window *pWindow ) +init_from_window( AtkObject *accessible, vcl::Window *pWindow ) { static AtkRole aDefaultRole = ATK_ROLE_INVALID; @@ -75,7 +75,7 @@ init_from_window( AtkObject *accessible, Window *pWindow ) sal_uInt16 type = WINDOW_WINDOW; bool parentIsMenuFloatingWindow = false; - Window *pParent = pWindow->GetParent(); + vcl::Window *pParent = pWindow->GetParent(); if( pParent ) { type = pParent->GetType(); parentIsMenuFloatingWindow = pParent->IsMenuFloatingWindow(); @@ -91,7 +91,7 @@ init_from_window( AtkObject *accessible, Window *pWindow ) default: { - Window *pChild = pWindow->GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pChild = pWindow->GetWindow(WINDOW_FIRSTCHILD); if( pChild ) { if( WINDOW_HELPTEXTWINDOW == pChild->GetType() ) @@ -159,9 +159,9 @@ static gboolean ooo_tooltip_unmap( GtkWidget* pToolTip, gpointer ) /*****************************************************************************/ static bool -isChildPopupMenu(Window* pWindow) +isChildPopupMenu(vcl::Window* pWindow) { - Window* pChild = pWindow->GetAccessibleChildWindow(0); + vcl::Window* pChild = pWindow->GetAccessibleChildWindow(0); if (!pChild) return false; @@ -183,7 +183,7 @@ ooo_window_wrapper_real_initialize(AtkObject *obj, gpointer data) GtkSalFrame *pFrame = GtkSalFrame::getFromWindow( GTK_WINDOW( data ) ); if( pFrame ) { - Window *pWindow = pFrame->GetWindow(); + vcl::Window *pWindow = pFrame->GetWindow(); if( pWindow ) { init_from_window( obj, pWindow ); diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx index ccae7d181a80..f2e70b3e8ab1 100644 --- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx @@ -111,7 +111,7 @@ RunDialog::RunDialog( GtkWidget *pDialog, uno::Reference< awt::XExtendedToolkit { GtkWindow *pParent = NULL; - ::Window * pWindow = ::Application::GetActiveTopWindow(); + vcl::Window * pWindow = ::Application::GetActiveTopWindow(); if( pWindow ) { GtkSalFrame *pFrame = dynamic_cast<GtkSalFrame *>( pWindow->ImplGetFrame() ); diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index dd9dc6e0797e..38e02484cb68 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -525,7 +525,7 @@ void GtkSalGraphics::copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) { GtkSalFrame* pFrame = GetGtkFrame(); - XLIB_Window aWin = None; + ::Window aWin = None; if( pFrame && m_pWindow ) { /* #i64117# some themes set the background pixmap VERY frequently */ diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx index 2056a13b87fb..71fb8251c4ff 100644 --- a/vcl/unx/gtk/gdi/salprn-gtk.cxx +++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx @@ -412,7 +412,7 @@ GtkPrintDialog::impl_initDialog() //To-Do, like fpicker, set UI language m_pDialog = m_pWrapper->print_unix_dialog_new(NULL, NULL); - Window* const pTopWindow(Application::GetActiveTopWindow()); + vcl::Window* const pTopWindow(Application::GetActiveTopWindow()); if (pTopWindow) { GtkSalFrame* const pFrame(dynamic_cast<GtkSalFrame*>(pTopWindow->ImplGetFrame())); diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index ad8e692d65d7..b39875f99d2a 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -672,7 +672,7 @@ gboolean ensure_dbus_setup( gpointer data ) GActionGroup* pActionGroup = ( ( GActionGroup* ) g_lo_action_group_new( reinterpret_cast< gpointer >( pSalFrame ) ) ); // Generate menu paths. - XLIB_Window windowId = GDK_WINDOW_XID( gdkWindow ); + ::Window windowId = GDK_WINDOW_XID( gdkWindow ); gchar* aDBusWindowPath = g_strdup_printf( "/org/libreoffice/window/%lu", windowId ); gchar* aDBusMenubarPath = g_strdup_printf( "/org/libreoffice/window/%lu/menus/menubar", windowId ); @@ -1153,7 +1153,7 @@ static void lcl_set_accept_focus( GtkWindow* pWindow, gboolean bAccept, bool bBe else if( ! bBeforeRealize ) { Display* pDisplay = GetGtkSalData()->GetGtkDisplay()->GetDisplay(); - XLIB_Window aWindow = widget_get_xid(GTK_WIDGET(pWindow)); + ::Window aWindow = widget_get_xid(GTK_WIDGET(pWindow)); XWMHints* pHints = XGetWMHints( pDisplay, aWindow ); if( ! pHints ) { @@ -1375,8 +1375,8 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle ) GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow ) { #if !GTK_CHECK_VERSION(3,0,0) - XLIB_Window aRoot, aParent; - XLIB_Window* pChildren; + ::Window aRoot, aParent; + ::Window* pChildren; unsigned int nChildren; bool bBreak = false; do @@ -1442,7 +1442,7 @@ void GtkSalFrame::Init( SystemParentData* pSysData ) #if !GTK_CHECK_VERSION(3,0,0) int x_ret, y_ret; unsigned int w, h, bw, d; - XLIB_Window aRoot; + ::Window aRoot; XGetGeometry( getDisplay()->GetDisplay(), pSysData->aWindow, &aRoot, &x_ret, &y_ret, &w, &h, &bw, &d ); maGeometry.nWidth = w; @@ -1453,7 +1453,7 @@ void GtkSalFrame::Init( SystemParentData* pSysData ) { XReparentWindow( getDisplay()->GetDisplay(), widget_get_xid(m_pWindow), - (XLIB_Window)pSysData->aWindow, + (::Window)pSysData->aWindow, 0, 0 ); } #else @@ -2927,7 +2927,7 @@ void GtkSalFrame::SetParent( SalFrame* pNewParent ) #if !GTK_CHECK_VERSION(3,0,0) -void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, SalX11Screen nXScreen ) +void GtkSalFrame::createNewWindow( ::Window aNewParent, bool bXEmbed, SalX11Screen nXScreen ) { bool bWasVisible = m_pWindow && IS_WIDGET_MAPPED(m_pWindow); if( bWasVisible ) @@ -3121,7 +3121,7 @@ bool GtkSalFrame::Dispatch( const XEvent* pEvent ) bContinueDispatch = false; // update position int x = 0, y = 0; - XLIB_Window aChild; + ::Window aChild; XTranslateCoordinates( getDisplay()->GetDisplay(), widget_get_xid(m_pWindow), getDisplay()->GetRootWindow( getDisplay()->GetDefaultXScreen() ), @@ -3884,7 +3884,7 @@ void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer fram GdkWindow* pWin = widget_get_window(GTK_WIDGET(pThis->getWindow())); if( pWin ) { - XLIB_Window aWin = GDK_WINDOW_XWINDOW(pWin); + ::Window aWin = GDK_WINDOW_XWINDOW(pWin); if( aWin != None ) XSetWindowBackgroundPixmap( pThis->getDisplay()->GetDisplay(), aWin, @@ -4437,7 +4437,7 @@ uno::Reference<accessibility::XAccessibleEditableText> return uno::Reference< accessibility::XAccessibleEditableText >(); } -static uno::Reference<accessibility::XAccessibleEditableText> lcl_GetxText(Window *pFocusWin) +static uno::Reference<accessibility::XAccessibleEditableText> lcl_GetxText(vcl::Window *pFocusWin) { uno::Reference<accessibility::XAccessibleEditableText> xText; try @@ -4455,7 +4455,7 @@ static uno::Reference<accessibility::XAccessibleEditableText> lcl_GetxText(Windo gboolean GtkSalFrame::IMHandler::signalIMRetrieveSurrounding( GtkIMContext* pContext, gpointer /*im_handler*/ ) { - Window *pFocusWin = Application::GetFocusWindow(); + vcl::Window *pFocusWin = Application::GetFocusWindow(); if (!pFocusWin) return true; @@ -4477,7 +4477,7 @@ gboolean GtkSalFrame::IMHandler::signalIMRetrieveSurrounding( GtkIMContext* pCon gboolean GtkSalFrame::IMHandler::signalIMDeleteSurrounding( GtkIMContext*, gint offset, gint nchars, gpointer /*im_handler*/ ) { - Window *pFocusWin = Application::GetFocusWindow(); + vcl::Window *pFocusWin = Application::GetFocusWindow(); if (!pFocusWin) return true; diff --git a/vcl/unx/kde/UnxFilePicker.cxx b/vcl/unx/kde/UnxFilePicker.cxx index fd92f1359ced..4acd5f5053d2 100644 --- a/vcl/unx/kde/UnxFilePicker.cxx +++ b/vcl/unx/kde/UnxFilePicker.cxx @@ -708,7 +708,7 @@ void UnxFilePicker::initFilePicker() // TODO pass here the real parent (not possible for system dialogs // yet), and default to GetDefDialogParent() only when the real parent // is NULL - Window *pParentWin = Application::GetDefDialogParent(); + vcl::Window *pParentWin = Application::GetDefDialogParent(); if ( pParentWin ) { const SystemEnvData* pSysData = ((SystemWindow *)pParentWin)->GetSystemData(); diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx index 816292668aa6..c4e16c3c8a89 100644 --- a/vcl/unx/kde/salnativewidgets-kde.cxx +++ b/vcl/unx/kde/salnativewidgets-kde.cxx @@ -272,7 +272,7 @@ class WidgetPainter */ bool drawStyledWidget( QWidget *pWidget, ControlState nState, const ImplControlValue& aValue, - Display *dpy, XLIB_Window drawable, SalX11Screen nXScreen, + Display *dpy, ::Window drawable, SalX11Screen nXScreen, int nDepth, GC gc, ControlPart nPart = PART_ENTIRE_CONTROL ); @@ -465,7 +465,7 @@ WidgetPainter::~WidgetPainter( void ) bool WidgetPainter::drawStyledWidget( QWidget *pWidget, ControlState nState, const ImplControlValue& aValue, - Display *dpy, XLIB_Window drawable, SalX11Screen nXScreen, + Display *dpy, ::Window drawable, SalX11Screen nXScreen, int nDepth, GC gc, ControlPart nPart ) { if ( !pWidget ) @@ -1383,7 +1383,7 @@ bool KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, bool bReturn = false; Display *dpy = GetXDisplay(); - XLIB_Window drawable = GetDrawable(); + ::Window drawable = GetDrawable(); GC gc = SelectPen(); //SelectFont(); // GC with current clipping region set if ( (nType == CTRL_PUSHBUTTON) && (nPart == PART_ENTIRE_CONTROL) ) diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx index 8fa2bf080530..17ae41c76f09 100644 --- a/vcl/unx/kde4/KDE4FilePicker.cxx +++ b/vcl/unx/kde4/KDE4FilePicker.cxx @@ -243,7 +243,7 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute() } //get the window id of the main OO window to set it for the dialog as a parent - Window *pParentWin = Application::GetDefDialogParent(); + vcl::Window *pParentWin = Application::GetDefDialogParent(); if ( pParentWin ) { const SystemEnvData* pSysData = ((SystemWindow *)pParentWin)->GetSystemData(); diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 63a5dc1d6c62..d37b009adf79 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -199,7 +199,7 @@ void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect ) WinSalFrame* pFrame = GetWindowPtr( hWnd ); if( pFrame ) { - Window *pWin = pFrame->GetWindow(); + vcl::Window *pWin = pFrame->GetWindow(); while( pWin ) { WorkWindow *pWorkWin = (pWin->GetType() == WINDOW_WORKWINDOW) ? (WorkWindow *) pWin : NULL; @@ -1113,7 +1113,7 @@ HWND ImplGetParentHwnd( HWND hWnd ) WinSalFrame* pFrame = GetWindowPtr( hWnd ); if( !pFrame || !pFrame->GetWindow()) return ::GetParent( hWnd ); - Window *pRealParent = pFrame->GetWindow()->ImplGetWindowImpl()->mpRealParent; + vcl::Window *pRealParent = pFrame->GetWindow()->ImplGetWindowImpl()->mpRealParent; if( pRealParent ) return static_cast<WinSalFrame*>(pRealParent->ImplGetWindowImpl()->mpFrame)->mhWnd; else @@ -1172,7 +1172,7 @@ static void ImplSalShow( HWND hWnd, bool bVisible, bool bNoActivate ) if( aDogTag.isDeleted() ) return; - Window *pClientWin = pFrame->GetWindow()->ImplGetClientWindow(); + vcl::Window *pClientWin = pFrame->GetWindow()->ImplGetClientWindow(); if ( pFrame->mbFloatWin || ( pClientWin && (pClientWin->GetStyle() & WB_SYSTEMFLOATWIN) ) ) pFrame->mnShowState = SW_SHOWNOACTIVATE; else @@ -1235,7 +1235,7 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, bool bVisible = (GetWindowStyle( mhWnd ) & WS_VISIBLE) != 0; if ( !bVisible ) { - Window *pClientWin = GetWindow()->ImplGetClientWindow(); + vcl::Window *pClientWin = GetWindow()->ImplGetClientWindow(); if ( mbFloatWin || ( pClientWin && (pClientWin->GetStyle() & WB_SYSTEMFLOATWIN) ) ) mnShowState = SW_SHOWNOACTIVATE; else @@ -3043,7 +3043,7 @@ static long ImplHandleMouseMsg( HWND hWnd, UINT nMsg, // #103168# post again if async focus has not arrived yet // hopefully we will not receive the corresponding button up before this // button down arrives again - Window *pWin = pFrame->GetWindow(); + vcl::Window *pWin = pFrame->GetWindow(); if( pWin && pWin->ImplGetWindowImpl()->mpFrameData->mnFocusId ) { ImplPostMessage( hWnd, nMsg, wParam, lParam ); @@ -5218,7 +5218,7 @@ static boolean ImplHandleAppCommand( HWND hWnd, LPARAM lParam ) } WinSalFrame* pFrame = GetWindowPtr( hWnd ); - Window *pWindow = pFrame ? pFrame->GetWindow() : NULL; + vcl::Window *pWindow = pFrame ? pFrame->GetWindow() : NULL; if( pWindow ) { @@ -5695,7 +5695,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP // #95133# a system dialog is opened/closed, using our app window as parent { WinSalFrame* pFrame = GetWindowPtr( hWnd ); - Window *pWin = NULL; + vcl::Window *pWin = NULL; if( pFrame ) pWin = pFrame->GetWindow(); diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index eb992818fa00..f251a9a33ba7 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -64,7 +64,7 @@ public: class TestWindow : public Dialog { public: - TestWindow() : Dialog( (Window *) NULL ) + TestWindow() : Dialog( (vcl::Window *) NULL ) { SetText( OUString("OutDev grinding") ); SetSizePixel( Size( 1024, 1024 ) ); diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx index 3224694f4c26..ed2b297d01b9 100644 --- a/vcl/workben/svdem.cxx +++ b/vcl/workben/svdem.cxx @@ -60,7 +60,7 @@ SAL_IMPLEMENT_MAIN() class MyWin : public WorkWindow { public: - MyWin( Window* pParent, WinBits nWinStyle ); + MyWin( vcl::Window* pParent, WinBits nWinStyle ); void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -80,7 +80,7 @@ void Main() Application::Execute(); } -MyWin::MyWin( Window* pParent, WinBits nWinStyle ) : +MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) : WorkWindow( pParent, nWinStyle ) { } diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx index 050b0dbea485..c47169c7da51 100644 --- a/vcl/workben/svpclient.cxx +++ b/vcl/workben/svpclient.cxx @@ -84,7 +84,7 @@ class MyWin : public WorkWindow ImageControl m_aImage; PushButton m_aQuitButton; public: - MyWin( Window* pParent, WinBits nWinStyle ); + MyWin( vcl::Window* pParent, WinBits nWinStyle ); virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -113,7 +113,7 @@ void Main() Application::Execute(); } -MyWin::MyWin( Window* pParent, WinBits nWinStyle ) : +MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) : WorkWindow( pParent, nWinStyle ), m_aListButton( this, 0 ), m_aSvpBitmaps( this, WB_BORDER ), diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index 2ccde8f781d9..edaad437ed8e 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -69,7 +69,7 @@ class MyWin : public WorkWindow { Bitmap m_aBitmap; public: - MyWin( Window* pParent, WinBits nWinStyle ); + MyWin( vcl::Window* pParent, WinBits nWinStyle ); virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -89,7 +89,7 @@ void Main() Application::Execute(); } -MyWin::MyWin( Window* pParent, WinBits nWinStyle ) : +MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) : WorkWindow( pParent, nWinStyle ), m_aBitmap( Size( 256, 256 ), 32 ) { diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index f8490d84dfc1..f79340135004 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -63,7 +63,7 @@ SAL_IMPLEMENT_MAIN() class MyWin : public WorkWindow { public: - MyWin( Window* pParent, WinBits nWinStyle ); + MyWin( vcl::Window* pParent, WinBits nWinStyle ); virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; @@ -83,7 +83,7 @@ void Main() Application::Execute(); } -MyWin::MyWin( Window* pParent, WinBits nWinStyle ) : +MyWin::MyWin( vcl::Window* pParent, WinBits nWinStyle ) : WorkWindow( pParent, nWinStyle ) { } |