diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-11-16 23:26:51 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-11-17 00:49:48 +0100 |
commit | ce8f0a7e7205e70e7ec5f1be0024e52903fdec7a (patch) | |
tree | d5be2d4a194f5a89a7451d6f2cbe00fe740b36eb /toolkit/source | |
parent | 38b42cee869c573dcdd9af2538a143edf9f18d33 (diff) |
Removing the last remnants of layout - sorry to see it go :-(
Diffstat (limited to 'toolkit/source')
-rw-r--r-- | toolkit/source/awt/vclxbutton.cxx | 129 | ||||
-rw-r--r-- | toolkit/source/awt/vclxbutton.hxx | 117 | ||||
-rw-r--r-- | toolkit/source/awt/vclxdialog.cxx | 274 | ||||
-rw-r--r-- | toolkit/source/awt/vclxdialog.hxx | 109 | ||||
-rw-r--r-- | toolkit/source/awt/vclxfixedline.cxx | 127 | ||||
-rw-r--r-- | toolkit/source/awt/vclxfixedline.hxx | 78 | ||||
-rw-r--r-- | toolkit/source/awt/vclxplugin.cxx | 79 | ||||
-rw-r--r-- | toolkit/source/awt/vclxplugin.hxx | 68 | ||||
-rw-r--r-- | toolkit/source/awt/vclxscroller.cxx | 204 | ||||
-rw-r--r-- | toolkit/source/awt/vclxscroller.hxx | 90 | ||||
-rw-r--r-- | toolkit/source/awt/vclxsplitter.cxx | 249 | ||||
-rw-r--r-- | toolkit/source/awt/vclxsplitter.hxx | 124 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtabcontrol.cxx | 505 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtabcontrol.hxx | 146 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtabpage.cxx | 147 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtabpage.hxx | 76 | ||||
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 1 | ||||
-rw-r--r-- | toolkit/source/helper/registerservices.cxx | 4 |
18 files changed, 0 insertions, 2527 deletions
diff --git a/toolkit/source/awt/vclxbutton.cxx b/toolkit/source/awt/vclxbutton.cxx deleted file mode 100644 index 5a368793fc89..000000000000 --- a/toolkit/source/awt/vclxbutton.cxx +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "vclxbutton.hxx" - -#include <layout/core/helper.hxx> -#include <com/sun/star/awt/ImagePosition.hpp> -#include <vcl/button.hxx> - -namespace css = com::sun::star; - -namespace layoutimpl -{ - -VCLXIconButton::VCLXIconButton( Window *p, rtl::OUString aDefaultLabel, char const *pGraphName ) - : VCLXButton() -{ - /* FIXME: before Window is set, setLabel, setProperty->setImage - * are silent no-ops. */ - p->SetComponentInterface( this ); - - setLabel( aDefaultLabel ); - setProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Graphic")), - css::uno::Any( layoutimpl::loadGraphic( pGraphName ) ) ); - setProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImagePosition")), - css::uno::Any( css::awt::ImagePosition::LeftCenter ) ); - setProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Align")), - css::uno::Any( (sal_Int16) 1 /* magic - center */ ) ); -} - -// FIXME: l10n/i18n of Reset & Apply - -VCLXOKButton::VCLXOKButton( Window *p ) - : VCLXIconButton( p, Button::GetStandardText( BUTTON_OK ), - "cmd/sc_ok.png" ) -{ -} - -VCLXCancelButton::VCLXCancelButton( Window *p ) - : VCLXIconButton( p, Button::GetStandardText( BUTTON_CANCEL ), -// : VCLXIconButton( xButton, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("~Cancel ")), - "cmd/sc_cancel.png" ) -{ -} - -VCLXYesButton::VCLXYesButton( Window *p ) - : VCLXIconButton( p, Button::GetStandardText( BUTTON_YES ), - "cmd/sc_yes.png" ) -{ -} - -VCLXNoButton::VCLXNoButton( Window *p ) - : VCLXIconButton( p, Button::GetStandardText( BUTTON_NO ), - "cmd/sc_no.png" ) -{ -} - -VCLXRetryButton::VCLXRetryButton( Window *p ) - : VCLXIconButton( p, Button::GetStandardText( BUTTON_RETRY ), - "cmd/sc_retry.png" ) -{ -} - -VCLXIgnoreButton::VCLXIgnoreButton( Window *p ) - : VCLXIconButton( p, Button::GetStandardText( BUTTON_IGNORE ), - "cmd/sc_ignore.png" ) -{ -} - -VCLXResetButton::VCLXResetButton( Window *p ) - : VCLXIconButton( p, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("~Reset ")), - "cmd/sc_reset.png" ) -{ -} - -VCLXApplyButton::VCLXApplyButton( Window *p ) - : VCLXIconButton( p, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Apply")), - "cmd/sc_apply.png" ) -{ -} - -VCLXHelpButton::VCLXHelpButton( Window *p ) - : VCLXIconButton( p, Button::GetStandardText( BUTTON_HELP ), - "cmd/sc_help.png" ) -{ -} - -VCLXMoreButton::VCLXMoreButton( Window *p ) - : VCLXIconButton( p, Button::GetStandardText( BUTTON_MORE ), -// : VCLXIconButton( p, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("More ")), - "cmd/sc_more.png" ) -{ -} - -VCLXAdvancedButton::VCLXAdvancedButton( Window *p ) -// : VCLXIconButton( p, Button::GetStandardText( BUTTON_ADVANCED ), - : VCLXIconButton( p, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Advanced ")), - "cmd/sc_advanced.png" ) -{ -} - -} // namespace layoutimpl - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxbutton.hxx b/toolkit/source/awt/vclxbutton.hxx deleted file mode 100644 index 34ac8fe0b84b..000000000000 --- a/toolkit/source/awt/vclxbutton.hxx +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef LAYOUT_AWT_VCLXBUTTON_HXX -#define LAYOUT_AWT_VCLXBUTTON_HXX - -#include <toolkit/awt/vclxwindows.hxx> - -/* Replacements for broken toolkit/ impls. of ok, cancel, help button, etc. */ - -namespace layoutimpl -{ - -class VCLXIconButton : public VCLXButton -{ -public: - VCLXIconButton( Window* p, rtl::OUString aDefaultLabel, const char *pGraphName ); - void Show (); -}; - -class VCLXOKButton : public VCLXIconButton -{ -public: - VCLXOKButton( Window *p ); -}; - -class VCLXCancelButton : public VCLXIconButton -{ -public: - VCLXCancelButton( Window *p ); -}; - -class VCLXYesButton : public VCLXIconButton -{ -public: - VCLXYesButton( Window *p ); -}; - -class VCLXNoButton : public VCLXIconButton -{ -public: - VCLXNoButton( Window *p ); -}; - -class VCLXRetryButton : public VCLXIconButton -{ -public: - VCLXRetryButton( Window *p ); -}; - -class VCLXIgnoreButton : public VCLXIconButton -{ -public: - VCLXIgnoreButton( Window *p ); -}; - -class VCLXResetButton : public VCLXIconButton -{ -public: - VCLXResetButton( Window *p ); -}; - -class VCLXApplyButton : public VCLXIconButton -{ -public: - VCLXApplyButton( Window *p ); -}; - -class VCLXHelpButton : public VCLXIconButton -{ -public: - VCLXHelpButton( Window *p ); -}; - -// TODO. Reuse vcl/Morebutton, or make AdvancedButton reuse me? -class VCLXMoreButton : public VCLXIconButton -{ -public: - VCLXMoreButton( Window *p ); -}; - -class VCLXAdvancedButton : public VCLXIconButton -{ -public: - VCLXAdvancedButton( Window *p ); -}; - -} // namespace layoutimpl - -#endif // LAYOUT_AWT_VCLXBUTTON_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxdialog.cxx b/toolkit/source/awt/vclxdialog.cxx deleted file mode 100644 index 3d301e362b9c..000000000000 --- a/toolkit/source/awt/vclxdialog.cxx +++ /dev/null @@ -1,274 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include <boost/ptr_container/ptr_vector.hpp> -#include "vclxdialog.hxx" - -#include <com/sun/star/awt/PosSize.hpp> -#include <com/sun/star/awt/SystemDependentXWindow.hpp> -#include <com/sun/star/lang/SystemDependent.hpp> - -#include <cppuhelper/typeprovider.hxx> - -#include <toolkit/awt/vclxmenu.hxx> -#include <toolkit/helper/macros.hxx> -#include <toolkit/helper/property.hxx> - -#ifdef QUARTZ -#include "premac.h" -#include <Cocoa/Cocoa.h> -#include "postmac.h" -#endif - -#include <vcl/dialog.hxx> -#include <vcl/msgbox.hxx> -#include <vcl/svapp.hxx> -#include <vcl/sysdata.hxx> -#include <vcl/wrkwin.hxx> - -#include "forward.hxx" - -namespace layoutimpl -{ - -DBG_NAME( VCLXDialog ) - -VCLXDialog::VCLXDialog() - : VCLXWindow() - , VCLXTopWindow_Base( true ) - , VCLXDialog_Base() - , Bin() - , bRealized( false ) - , bResizeSafeguard( false ) -{ - DBG_CTOR( VCLXDialog, NULL ); - -/* mxLayoutUnit = uno::Reference< awt::XLayoutUnit >( new LayoutUnit() ); - assert(mxLayoutUnit.is());*/ -} - -VCLXDialog::~VCLXDialog() -{ - DBG_DTOR( VCLXDialog, NULL ); -} - -Window* VCLXDialog::GetWindowImpl() -{ - return VCLXWindow::GetWindow(); -} - -::cppu::OInterfaceContainerHelper& VCLXDialog::GetTopWindowListenersImpl() -{ - return GetTopWindowListeners(); -} - -IMPLEMENT_2_FORWARD_XINTERFACE2( VCLXDialog, VCLXWindow, Bin, VCLXDialog_Base ); - -IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXDialog, VCLXWindow, VCLXDialog_Base ); - -void SAL_CALL VCLXDialog::dispose() throw(::com::sun::star::uno::RuntimeException) -{ - { - SolarMutexGuard aGuard; - - ::com::sun::star::lang::EventObject aDisposeEvent; - aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); -// maTabListeners.disposeAndClear( aDisposeEvent ); - } - - VCLXWindow::dispose(); -} - -void VCLXDialog::resizedCb() -{ - queueResize(); -} - -void SAL_CALL VCLXDialog::allocateArea( const css::awt::Rectangle &rArea ) - throw (css::uno::RuntimeException) -{ - ::com::sun::star::awt::Size reqSize = Bin::getMinimumSize(); - reqSize.Height = getHeightForWidth( rArea.Width ); - - if ( !bRealized ) - { - setPosSize( 0, 0, reqSize.Width, reqSize.Height, ::com::sun::star::awt::PosSize::SIZE ); - bRealized = true; - setVisible( true ); - } - else - { - ::com::sun::star::awt::Size curSize = getSize(); - if ( reqSize.Width > curSize.Width ) - setPosSize( 0, 0, reqSize.Width, 0, ::com::sun::star::awt::PosSize::WIDTH ); - if ( reqSize.Height > curSize.Height ) - setPosSize( 0, 0, 0, reqSize.Height, ::com::sun::star::awt::PosSize::HEIGHT ); - } - - ::com::sun::star::awt::Size size = getSize(); - maAllocation.Width = size.Width; - maAllocation.Height = size.Height; - - Bin::allocateArea( maAllocation ); -} - -void VCLXDialog::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) -{ - SolarMutexClearableGuard aGuard; - - switch ( _rVclWindowEvent.GetId() ) - { - case VCLEVENT_WINDOW_RESIZE: - resizedCb(); - default: - aGuard.clear(); - VCLXWindow::ProcessWindowEvent( _rVclWindowEvent ); - break; - } -} - -void SAL_CALL VCLXDialog::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any &Value ) throw(::com::sun::star::uno::RuntimeException) -{ - SolarMutexGuard aGuard; - - if ( GetWindow() ) - { -/* sal_uInt16 nPropertyId = GetPropertyId( PropertyName ); - switch ( nPropertyId ) - { - default: -*/ - VCLXWindow::setProperty( PropertyName, Value ); -/* } -*/ - } -} - -::com::sun::star::uno::Any SAL_CALL VCLXDialog::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) -{ - SolarMutexGuard aGuard; - - ::com::sun::star::uno::Any aReturn; - if ( GetWindow() ) - { -/* - sal_uInt16 nPropertyId = GetPropertyId( PropertyName ); - switch ( nPropertyId ) - { - default: -*/ - aReturn = VCLXWindow::getProperty( PropertyName ); -/* - } -*/ - } - return aReturn; -} - -void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException) -{ - SolarMutexGuard aGuard; - - Window* pWindow = GetWindow(); - if ( pWindow ) - pWindow->SetText( Title ); -} - -void VCLXDialog::setHelpId( const rtl::OUString& rId ) throw(::com::sun::star::uno::RuntimeException) -{ - SolarMutexGuard aGuard; - - Window* pWindow = GetWindow(); - if ( pWindow ) - pWindow->SetHelpId( rtl::OUStringToOString( rId, RTL_TEXTENCODING_UTF8 ) ); -} - -::rtl::OUString VCLXDialog::getTitle() throw(::com::sun::star::uno::RuntimeException) -{ - SolarMutexGuard aGuard; - - ::rtl::OUString aTitle; - Window* pWindow = GetWindow(); - if ( pWindow ) - aTitle = pWindow->GetText(); - return aTitle; -} - -sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException) -{ - SolarMutexGuard aGuard; - - sal_Int16 nRet = 0; - if ( GetWindow() ) - { - Dialog* pDlg = (Dialog*) GetWindow(); - Window* pParent = pDlg->GetWindow( WINDOW_PARENTOVERLAP ); - Window* pOldParent = NULL; - if ( pParent && !pParent->IsReallyVisible() ) - { - pOldParent = pDlg->GetParent(); - Window* pFrame = pDlg->GetWindow( WINDOW_FRAME ); - if ( pFrame != pDlg ) - pDlg->SetParent( pFrame ); - } - nRet = pDlg->Execute(); - if ( pOldParent ) - pDlg->SetParent( pOldParent ); - } - return nRet; -} - -void VCLXDialog::endDialog( sal_Int32 nResult ) throw(::com::sun::star::uno::RuntimeException) -{ - SolarMutexGuard aGuard; - - if ( nResult == BUTTONID_HELP ) - { - // UGH: c&p button.cxx - ::Window* pFocusWin = Application::GetFocusWindow(); - if ( !pFocusWin ) - pFocusWin = GetWindow(); - - HelpEvent aEvt( pFocusWin->GetPointerPosPixel(), HELPMODE_CONTEXT ); - pFocusWin->RequestHelp( aEvt ); - return; - } - - Dialog* pDlg = (Dialog*) GetWindow(); - if ( pDlg ) - pDlg->EndDialog( nResult ); -} - -void VCLXDialog::endExecute() throw(::com::sun::star::uno::RuntimeException) -{ - endDialog( 0 ); -} - -} // namespace layoutimpl - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxdialog.hxx b/toolkit/source/awt/vclxdialog.hxx deleted file mode 100644 index 785f6b3b7e48..000000000000 --- a/toolkit/source/awt/vclxdialog.hxx +++ /dev/null @@ -1,109 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef LAYOUT_AWT_VCLXDIALOG_HXX -#define LAYOUT_AWT_VCLXDIALOG_HXX - -#include <com/sun/star/awt/XDialog2.hpp> -#include <com/sun/star/awt/XSystemDependentWindowPeer.hpp> -#include <com/sun/star/awt/XTopWindow.hpp> -#include <comphelper/uno3.hxx> -#include <layout/core/bin.hxx> -#include <toolkit/awt/vclxtopwindow.hxx> - -namespace layoutimpl -{ - -typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XDialog2 > VCLXDialog_Base; - -class TOOLKIT_DLLPUBLIC VCLXDialog : public VCLXWindow - , public VCLXTopWindow_Base - , public VCLXDialog_Base - , public Bin -{ -private: - bool bRealized, bResizeSafeguard; - css::uno::Reference< css::awt::XLayoutUnit > mxLayoutUnit; - - VCLXDialog( const VCLXDialog& ); // never implemented - VCLXDialog& operator=( const VCLXDialog& ); // never implemented - -protected: - Window* GetWindowImpl(); - ::cppu::OInterfaceContainerHelper& GetTopWindowListenersImpl(); - - ~VCLXDialog(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XComponent - void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); - - // VclWindowPeer - virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); - - // VCLXWindow - void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); - - // ::com::sun::star::awt::XDialog - void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException); - ::rtl::OUString SAL_CALL getTitle() throw(::com::sun::star::uno::RuntimeException); - sal_Int16 SAL_CALL execute() throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL endExecute() throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::awt::XLayoutContainer - virtual void SAL_CALL allocateArea( const css::awt::Rectangle &rArea ) - throw (css::uno::RuntimeException); - - void resizedCb(); - - static void ImplGetPropertyIds( std::list< sal_uInt16 > &/*aIds*/ ) - { - } - virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); } - - -public: - VCLXDialog(); - - // ::com::sun::star::awt::XDialog2 - void SAL_CALL endDialog( sal_Int32 nResult ) throw(::com::sun::star::uno::RuntimeException); - void SAL_CALL setHelpId( const rtl::OUString& id ) throw(::com::sun::star::uno::RuntimeException); - -}; - -} // namespace layoutimpl - -#endif /* LAYOUT_AWT_VCLXDIALOG_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxfixedline.cxx b/toolkit/source/awt/vclxfixedline.cxx deleted file mode 100644 index 1d51defe2d7d..000000000000 --- a/toolkit/source/awt/vclxfixedline.cxx +++ /dev/null @@ -1,127 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "vclxfixedline.hxx" - -#include <com/sun/star/awt/PosSize.hpp> -#include <toolkit/helper/property.hxx> -#include <toolkit/helper/vclunohelper.hxx> -#include <tools/debug.hxx> -#include <vcl/fixed.hxx> -#include <vcl/svapp.hxx> - -#include "forward.hxx" - -namespace layoutimpl -{ - -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::awt; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star; - -DBG_NAME( VCLXFixedLine ) - -VCLXFixedLine::VCLXFixedLine() - : VCLXWindow() -{ - DBG_CTOR( VCLXFixedLine, NULL ); -} - -VCLXFixedLine::~VCLXFixedLine() -{ - DBG_DTOR( VCLXFixedLine, NULL ); -} - -IMPLEMENT_FORWARD_XTYPEPROVIDER1( VCLXFixedLine, VCLXWindow ); - -void SAL_CALL VCLXFixedLine::dispose() throw(RuntimeException) -{ - { - SolarMutexGuard aGuard; - - EventObject aDisposeEvent; - aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); - } - - VCLXWindow::dispose(); -} - -::com::sun::star::awt::Size SAL_CALL VCLXFixedLine::getMinimumSize() - throw(::com::sun::star::uno::RuntimeException) -{ - return awt::Size( 8, 8 ); -} - -void VCLXFixedLine::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) -{ - SolarMutexGuard aGuard; - - VCLXWindow::ProcessWindowEvent( _rVclWindowEvent ); -} - -void SAL_CALL VCLXFixedLine::setProperty( const ::rtl::OUString& PropertyName, const Any &Value ) throw(RuntimeException) -{ - SolarMutexGuard aGuard; - - if ( GetWindow() ) - { -/* - sal_uInt16 nPropertyId = GetPropertyId( PropertyName ); - switch ( nPropertyId ) - { - default: -*/ - VCLXWindow::setProperty( PropertyName, Value ); -// } - } -} - -Any SAL_CALL VCLXFixedLine::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException) -{ - SolarMutexGuard aGuard; - - Any aReturn; - if ( GetWindow() ) - { -/* - sal_uInt16 nPropertyId = GetPropertyId( PropertyName ); - switch ( nPropertyId ) - { - default: -*/ - aReturn = VCLXWindow::getProperty( PropertyName ); - // } - } - return aReturn; -} - -} // namespace layoutimpl - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxfixedline.hxx b/toolkit/source/awt/vclxfixedline.hxx deleted file mode 100644 index 8bd26f5ecc0b..000000000000 --- a/toolkit/source/awt/vclxfixedline.hxx +++ /dev/null @@ -1,78 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef LAYOUT_AWT_VCLXFIXEDLINE_HXX -#define LAYOUT_AWT_VCLXFIXEDLINE_HXX - -#include <comphelper/uno3.hxx> -#include <toolkit/awt/vclxwindow.hxx> - -/* We just provide our own FixedLine, because default has no width... */ - -class FixedLine; - -namespace layoutimpl -{ - -class VCLXFixedLine :public VCLXWindow -{ -public: - VCLXFixedLine(); - -protected: - ~VCLXFixedLine(); - - // XInterface - // DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XComponent - void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize() - throw(::com::sun::star::uno::RuntimeException); - - // VclWindowPeer - virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); - - // VCLXWindow - void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); - -private: - VCLXFixedLine( const VCLXFixedLine& ); // never implemented - VCLXFixedLine& operator=( const VCLXFixedLine& ); // never implemented -}; - -} // namespace layoutimpl - -#endif /* LAYOUT_AWT_VCLXFIXEDLINE_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxplugin.cxx b/toolkit/source/awt/vclxplugin.cxx deleted file mode 100644 index de3737897738..000000000000 --- a/toolkit/source/awt/vclxplugin.cxx +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "vclxplugin.hxx" - -#include <com/sun/star/awt/PosSize.hpp> -#include <toolkit/helper/convert.hxx> -#include <toolkit/helper/property.hxx> -#include <vcl/ctrl.hxx> -#include <vcl/svapp.hxx> - -#include "forward.hxx" - -namespace layoutimpl -{ - -using namespace ::com::sun::star; - -VCLXPlugin::VCLXPlugin( Window *p, WinBits b ) - : VCLXWindow() - , mpWindow( p ) - , mpPlugin( 0 ) - , mStyle( b ) -{ -} - -VCLXPlugin::~VCLXPlugin() -{ -} - -void SAL_CALL VCLXPlugin::dispose() throw(uno::RuntimeException) -{ - { - SolarMutexGuard aGuard; - - lang::EventObject aDisposeEvent; - aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); - } - - VCLXWindow::dispose(); -} - -awt::Size SAL_CALL VCLXPlugin::getMinimumSize() - throw(::com::sun::star::uno::RuntimeException) -{ - SolarMutexGuard aGuard; - if ( mpPlugin ) - return AWTSize( mpPlugin->GetSizePixel() ); - return awt::Size(); -} - -} // namespace layoutimpl - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxplugin.hxx b/toolkit/source/awt/vclxplugin.hxx deleted file mode 100644 index 1b838a2820c5..000000000000 --- a/toolkit/source/awt/vclxplugin.hxx +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef LAYOUT_AWT_VCLXPLUGIN_HXX -#define LAYOUT_AWT_VCLXPLUGIN_HXX - -#include <toolkit/awt/vclxwindow.hxx> -#include <tools/wintypes.hxx> - -class Control; -namespace layoutimpl -{ - -namespace css = ::com::sun::star; - -class VCLXPlugin : public VCLXWindow -{ -public: - Window *mpWindow; - ::Control *mpPlugin; - WinBits mStyle; - - VCLXPlugin( Window *p, WinBits b ); - -protected: - ~VCLXPlugin(); - - // XComponent - void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize() - throw(::com::sun::star::uno::RuntimeException); - -private: - VCLXPlugin( VCLXPlugin const & ); - VCLXPlugin& operator=( VCLXPlugin const & ); -}; - -} // namespace layoutimpl - -#endif /* LAYOUT_AWT_VCLXPLUGIN_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxscroller.cxx b/toolkit/source/awt/vclxscroller.cxx deleted file mode 100644 index 407b7552eeec..000000000000 --- a/toolkit/source/awt/vclxscroller.cxx +++ /dev/null @@ -1,204 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "vclxscroller.hxx" - -#include <assert.h> -#include <com/sun/star/awt/PosSize.hpp> -#include <com/sun/star/awt/ScrollBarOrientation.hpp> -#include <sal/macros.h> -#include <toolkit/helper/property.hxx> -#include <tools/debug.hxx> -#include <vcl/scrbar.hxx> -#include <vcl/svapp.hxx> - -#include "forward.hxx" - -namespace layoutimpl -{ - -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::awt; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star; - -DBG_NAME( VCLXScroller ) - -VCLXScroller::VCLXScroller() - : VCLXWindow() - , Bin() -{ - DBG_CTOR( VCLXScroller, NULL ); - mpHorScrollBar = mpVerScrollBar = 0; -} - -VCLXScroller::~VCLXScroller() -{ - DBG_DTOR( VCLXScroller, NULL ); -} - -IMPLEMENT_2_FORWARD_XINTERFACE1( VCLXScroller, VCLXWindow, Container ); - -IMPLEMENT_FORWARD_XTYPEPROVIDER1( VCLXScroller, VCLXWindow ); - -void SAL_CALL VCLXScroller::dispose() throw(RuntimeException) -{ - { - SolarMutexGuard aGuard; - - EventObject aDisposeEvent; - aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); -// maTabListeners.disposeAndClear( aDisposeEvent ); - } - - VCLXWindow::dispose(); -} - -void VCLXScroller::ensureScrollBars() -{ - - if ( !mpVerScrollBar ) - { - mpVerScrollBar = new ScrollBar( GetWindow() , WB_VERT ); - mpVerScrollBar->SetLineSize( 4 ); - mpVerScrollBar->SetPageSize( 15 ); - mpVerScrollBar->Show(); - mpVerScrollBar->SetScrollHdl( LINK( this, VCLXScroller, ScrollHdl ) ); - } - if ( !mpHorScrollBar ) - { - mpHorScrollBar = new ScrollBar( GetWindow() , WB_HORZ ); - mpHorScrollBar->SetLineSize( 4 ); - mpHorScrollBar->SetPageSize( 15 ); - mpHorScrollBar->Show(); - mpHorScrollBar->SetScrollHdl( LINK( this, VCLXScroller, ScrollHdl ) ); - } // mpContent = new FixedImage( this, ImplGetWinBits( WindowAttributes, 0 ) ); - -} - -void SAL_CALL VCLXScroller::allocateArea( - const ::com::sun::star::awt::Rectangle &rArea ) - throw (::com::sun::star::uno::RuntimeException) -{ - ensureScrollBars(); // shouldn't be needed - - maAllocation = rArea; - setPosSize( rArea.X, rArea.Y, rArea.Width, rArea.Height, PosSize::POSSIZE ); - - mpHorScrollBar->SetRangeMin( 0 ); - mpHorScrollBar->SetRangeMax( SAL_MAX( maChildRequisition.Width - rArea.Width, 0 ) ); - mpVerScrollBar->SetRangeMin( 0 ); - mpVerScrollBar->SetRangeMax( SAL_MAX( maChildRequisition.Height - rArea.Height, 0 ) ); - - int thumbX = mpHorScrollBar->GetThumbPos(); - int thumbY = mpVerScrollBar->GetThumbPos(); - int thumbWidth = mpVerScrollBar->GetSizePixel().getWidth(); - int thumbHeight = mpHorScrollBar->GetSizePixel().getHeight(); - - mpHorScrollBar->SetPosSizePixel( rArea.X, rArea.Y + rArea.Height - thumbHeight - 2, - rArea.Width - thumbWidth, thumbHeight ); - mpVerScrollBar->SetPosSizePixel( rArea.X + rArea.Width - thumbWidth - 2, rArea.Y-2, - thumbWidth, rArea.Height - thumbHeight ); - - awt::Rectangle childRect( rArea.X - thumbX, rArea.Y - thumbY, - SAL_MAX( maChildRequisition.Width, rArea.Width ) - thumbWidth - 4, - SAL_MAX( maChildRequisition.Height, rArea.Height ) - thumbHeight - 4 ); - if ( mxChild.is() ) - allocateChildAt( mxChild, childRect ); -} - -#define MAX_CHILD_REQ 40 -::com::sun::star::awt::Size SAL_CALL VCLXScroller::getMinimumSize() - throw(::com::sun::star::uno::RuntimeException) -{ - ensureScrollBars(); - assert( mpHorScrollBar && mpVerScrollBar ); - awt::Size childSize = Bin::getMinimumSize(); - int thumbWidth = mpVerScrollBar->GetSizePixel().getWidth(); - int thumbHeight = mpHorScrollBar->GetSizePixel().getHeight(); - maRequisition = awt::Size( - SAL_MIN( MAX_CHILD_REQ, childSize.Width ) + thumbWidth, - SAL_MIN( MAX_CHILD_REQ, childSize.Height ) + thumbHeight ); - return maRequisition; -} - -void VCLXScroller::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) -{ - VCLXWindow::ProcessWindowEvent( _rVclWindowEvent ); -} - -void SAL_CALL VCLXScroller::setProperty( const ::rtl::OUString& PropertyName, const Any &Value ) throw(RuntimeException) -{ - SolarMutexGuard aGuard; - - if ( GetWindow() ) - { -/* - sal_uInt16 nPropertyId = GetPropertyId( PropertyName ); - switch ( nPropertyId ) - { - default: -*/ - VCLXWindow::setProperty( PropertyName, Value ); -/* - } -*/ - } -} - -Any SAL_CALL VCLXScroller::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException) -{ - SolarMutexGuard aGuard; - - Any aReturn; - if ( GetWindow() ) - { -/* - sal_uInt16 nPropertyId = GetPropertyId( PropertyName ); - switch ( nPropertyId ) - { - default: -*/ - aReturn = VCLXWindow::getProperty( PropertyName ); - -// } - } - return aReturn; -} - -IMPL_LINK( VCLXScroller, ScrollHdl, ScrollBar *, pScrollBar ) -{ - (void) pScrollBar; - forceRecalc(); - return 0; -} - -} // namespace layoutimpl - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxscroller.hxx b/toolkit/source/awt/vclxscroller.hxx deleted file mode 100644 index 7252cd68563a..000000000000 --- a/toolkit/source/awt/vclxscroller.hxx +++ /dev/null @@ -1,90 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef LAYOUT_AWT_VCLXSCROLLER_HXX -#define LAYOUT_AWT_VCLXSCROLLER_HXX - -#include <comphelper/uno3.hxx> -#include <layout/core/bin.hxx> -#include <toolkit/awt/vclxwindow.hxx> - -class ScrollBar; -class FixedImage; - -namespace layoutimpl -{ - -class VCLXScroller :public VCLXWindow - ,public Bin -{ -public: - VCLXScroller(); - -protected: - ~VCLXScroller(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XComponent - void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::awt::XLayoutContainer - virtual void SAL_CALL allocateArea( const ::com::sun::star::awt::Rectangle &rArea ) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize() - throw(::com::sun::star::uno::RuntimeException); - - // VclWindowPeer - virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); - - // VCLXWindow - void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); - -private: - VCLXScroller( const VCLXScroller& ); // never implemented - VCLXScroller& operator=( const VCLXScroller& ); // never implemented - - // because the underlying window is only setup-ed after construction, init - // scrollbars at play-time - void ensureScrollBars(); - - FixedImage *mpContent; // dummy - ScrollBar *mpHorScrollBar, *mpVerScrollBar; - DECL_LINK( ScrollHdl, ScrollBar* ); -}; - -} // namespace layoutimpl - -#endif /* LAYOUT_AWT_VCLXSCROLLER_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxsplitter.cxx b/toolkit/source/awt/vclxsplitter.cxx deleted file mode 100644 index a0b67e2ca823..000000000000 --- a/toolkit/source/awt/vclxsplitter.cxx +++ /dev/null @@ -1,249 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "vclxsplitter.hxx" - -#include <assert.h> -#include <com/sun/star/awt/PosSize.hpp> -#include <sal/macros.h> -#include <toolkit/helper/property.hxx> -#include <toolkit/helper/vclunohelper.hxx> -#include <vcl/split.hxx> -#include <vcl/svapp.hxx> - -#include "forward.hxx" - -namespace layoutimpl -{ - -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::awt; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star; - -VCLXSplitter::ChildProps::ChildProps( VCLXSplitter::ChildData *pData ) -{ - addProp( RTL_CONSTASCII_USTRINGPARAM( "Shrink" ), - ::getCppuType( static_cast< const rtl::OUString* >( NULL ) ), - &(pData->mbShrink) ); -} - -VCLXSplitter::ChildData::ChildData( uno::Reference< awt::XLayoutConstrains > const& xChild ) - : Box_Base::ChildData( xChild ) - , mbShrink( false ) -{ -} - -VCLXSplitter::ChildData* -VCLXSplitter::createChild( uno::Reference< awt::XLayoutConstrains > const& xChild ) -{ - return new ChildData( xChild ); -} - -VCLXSplitter::ChildProps* -VCLXSplitter::createChildProps( Box_Base::ChildData *pData ) -{ - return new ChildProps( static_cast<VCLXSplitter::ChildData*> ( pData ) ); -} - - -DBG_NAME( VCLXSplitter ); - -VCLXSplitter::VCLXSplitter( bool bHorizontal ) - : VCLXWindow() - , Box_Base() -{ - DBG_CTOR( VCLXSplitter, NULL ); - mnHandleRatio = 0.5; - mbHandlePressed = false; - mbHorizontal = bHorizontal; - mpSplitter = NULL; -} - -VCLXSplitter::~VCLXSplitter() -{ - DBG_DTOR( VCLXSplitter, NULL ); -} - -IMPLEMENT_2_FORWARD_XINTERFACE1( VCLXSplitter, VCLXWindow, Container ); - -IMPLEMENT_FORWARD_XTYPEPROVIDER1( VCLXSplitter, VCLXWindow ); - -VCLXSplitter::ChildData* -VCLXSplitter::getChild( int i ) -{ - if ( maChildren.size() && i == 0 ) - return static_cast<VCLXSplitter::ChildData*>( maChildren.front() ); - else if ( maChildren.size() > 1 && i == 1 ) - return static_cast<VCLXSplitter::ChildData*>( maChildren.back() ); - return 0; -} - -void SAL_CALL VCLXSplitter::dispose() throw(RuntimeException) -{ - { - SolarMutexGuard aGuard; - - EventObject aDisposeEvent; - aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); -// maTabListeners.disposeAndClear( aDisposeEvent ); - } - - VCLXWindow::dispose(); -} - -void VCLXSplitter::ensureSplitter() -{ - if ( !mpSplitter ) - { - mpSplitter = new Splitter( GetWindow() , mbHorizontal ? WB_HORZ : WB_VERT ); - mpSplitter->Show(); - mpSplitter->SetEndSplitHdl( LINK( this, VCLXSplitter, HandleMovedHdl ) ); - } -} - -void SAL_CALL VCLXSplitter::addChild( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XLayoutConstrains > &xChild ) - throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::awt::MaxChildrenException) -{ - if ( maChildren.size() == 2 ) - throw css::awt::MaxChildrenException(); - Box_Base::addChild( xChild ); -} - -void SAL_CALL VCLXSplitter::allocateArea( - const ::com::sun::star::awt::Rectangle &rArea ) - throw (::com::sun::star::uno::RuntimeException) -{ - ensureSplitter(); // shouldn't be needed... - getMinimumSize(); - int splitDiff; - if ( mbHorizontal ) - splitDiff = rArea.Width - maAllocation.Width; - else - splitDiff = rArea.Height - maAllocation.Height; - - assert( mpSplitter ); - if ( splitDiff ) - mpSplitter->SetSplitPosPixel( mpSplitter->GetSplitPosPixel() + splitDiff/2 ); - - maAllocation = rArea; - int width = mbHorizontal ? rArea.Width : rArea.Height; - int splitLen = 2; - int splitPos = mpSplitter->GetSplitPosPixel(); - setPosSize( rArea.X, rArea.Y, rArea.Width, rArea.Height, PosSize::POSSIZE ); - if ( mbHorizontal ) - mpSplitter->SetPosSizePixel( splitPos, 0, splitLen, rArea.Height, PosSize::POSSIZE ); - else - mpSplitter->SetPosSizePixel( 0, splitPos, rArea.Width, splitLen, PosSize::POSSIZE ); - mpSplitter->SetDragRectPixel( ::Rectangle( 0, 0, rArea.Width, rArea.Height ) ); - int leftWidth = splitPos; - int rightWidth = width - splitPos; - - if ( getChild( 0 ) && getChild( 0 )->mxChild.is() ) - { - awt::Rectangle childRect( 0, 0, rArea.Width, rArea.Height ); - - if ( mbHorizontal ) - childRect.Width = leftWidth - 2; - else - childRect.Height = leftWidth - 2; - allocateChildAt( getChild( 0 )->mxChild, childRect ); - } - if ( getChild( 0 ) && getChild( 0 )->mxChild.is() ) - { - awt::Rectangle childRect( 0, 0, rArea.Width, rArea.Height ); - - if ( mbHorizontal ) - { - childRect.X += leftWidth + splitLen + 2; - childRect.Width = rightWidth; - } - else - { - childRect.Y += leftWidth + splitLen + 2; - childRect.Height = rightWidth; - } - allocateChildAt( getChild( 1 )->mxChild, childRect ); - } -} - -::com::sun::star::awt::Size SAL_CALL VCLXSplitter::getMinimumSize() - throw(::com::sun::star::uno::RuntimeException) -{ - ensureSplitter(); - - awt::Size size( mbHorizontal ? 2 : 0, mbHorizontal ? 0 : 2 ); - for ( unsigned int i = 0; i < 2; i++ ) - { - if ( getChild( i ) && getChild( i )->mxChild.is() ) - { - awt::Size childSize = getChild( i )->mxChild->getMinimumSize(); - if ( mbHorizontal ) - { - size.Width += childSize.Width; - size.Height = SAL_MAX( size.Height, childSize.Height ); - } - else - { - size.Width = SAL_MAX( size.Width, childSize.Width ); - size.Height += childSize.Height; - } - } - } - - maRequisition = size; - return size; -} - -void VCLXSplitter::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) -{ - VCLXWindow::ProcessWindowEvent( _rVclWindowEvent ); -} - -void SAL_CALL VCLXSplitter::setProperty( const ::rtl::OUString& PropertyName, const Any &Value ) throw(RuntimeException) -{ - VCLXWindow::setProperty( PropertyName, Value ); -} - -Any SAL_CALL VCLXSplitter::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException) -{ - return VCLXWindow::getProperty( PropertyName ); -} - -IMPL_LINK( VCLXSplitter, HandleMovedHdl, Splitter *, pSplitter ) -{ - (void) pSplitter; - forceRecalc(); - return 0; -} - -} // namespace layoutimpl - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxsplitter.hxx b/toolkit/source/awt/vclxsplitter.hxx deleted file mode 100644 index 2880e70993ef..000000000000 --- a/toolkit/source/awt/vclxsplitter.hxx +++ /dev/null @@ -1,124 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef LAYOUT_AWT_VCLXSPLITTER_HXX -#define LAYOUT_AWT_VCLXSPLITTER_HXX - -#include <com/sun/star/awt/MaxChildrenException.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include <comphelper/uno3.hxx> -#include <layout/core/box-base.hxx> -#include <toolkit/awt/vclxwindow.hxx> - -class Splitter; - -namespace layoutimpl -{ - -class VCLXSplitter :public VCLXWindow - ,public Box_Base -{ -private: - VCLXSplitter( const VCLXSplitter& ); // never implemented - VCLXSplitter& operator=( const VCLXSplitter& ); // never implemented - -public: - VCLXSplitter( bool bHorizontal ); - -protected: - ~VCLXSplitter(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XComponent - void SAL_CALL dispose( ) throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::awt::XLayoutContainer - virtual void SAL_CALL addChild( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XLayoutConstrains >& Child ) - throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::awt::MaxChildrenException); - - virtual void SAL_CALL allocateArea( const ::com::sun::star::awt::Rectangle &rArea ) - throw (::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize() - throw(::com::sun::star::uno::RuntimeException); - - // unimplemented: - virtual sal_Bool SAL_CALL hasHeightForWidth() - throw(css::uno::RuntimeException) - { return false; } - virtual sal_Int32 SAL_CALL getHeightForWidth( sal_Int32 /*nWidth*/ ) - throw(css::uno::RuntimeException) - { return maRequisition.Height; } - - // VclWindowPeer - virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); - - // VCLXWindow - void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); - -public: - // Maps page ids to child references - struct ChildData : public Box_Base::ChildData - { - sal_Bool mbShrink; - ChildData( css::uno::Reference< css::awt::XLayoutConstrains > const& xChild ); - }; - - struct ChildProps : public Box_Base::ChildProps - { - ChildProps( VCLXSplitter::ChildData *pData ); - }; - -protected: - - ChildData *createChild( css::uno::Reference< css::awt::XLayoutConstrains > const& xChild ); - ChildProps *createChildProps( Box_Base::ChildData* pData ); - - ChildData* getChild( int i ); - - float mnHandleRatio; - bool mbHandlePressed; - - DECL_LINK( HandleMovedHdl, Splitter* ); - bool mbHorizontal; - Splitter *mpSplitter; - void ensureSplitter(); -}; - -} // namespace layoutimpl - -#endif /* LAYOUT_AWT_VCLXSPLITTER_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxtabcontrol.cxx b/toolkit/source/awt/vclxtabcontrol.cxx deleted file mode 100644 index 221cbe915678..000000000000 --- a/toolkit/source/awt/vclxtabcontrol.cxx +++ /dev/null @@ -1,505 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include <vclxtabcontrol.hxx> - -#include <com/sun/star/awt/PosSize.hpp> -#include <sal/macros.h> -#include <toolkit/helper/property.hxx> -#include <toolkit/helper/vclunohelper.hxx> -#include <vcl/tabctrl.hxx> -#include <vcl/tabpage.hxx> -#include <vcl/svapp.hxx> - -#include "forward.hxx" - -namespace layoutimpl -{ - -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star; - -VCLXTabControl::ChildProps::ChildProps( VCLXTabControl::ChildData *pData ) -{ - addProp( RTL_CONSTASCII_USTRINGPARAM( "Title" ), - ::getCppuType( static_cast< const rtl::OUString* >( NULL ) ), - &(pData->maTitle) ); -} - -VCLXTabControl::ChildData::ChildData( uno::Reference< awt::XLayoutConstrains > const& xChild ) - : Box_Base::ChildData( xChild ) - , maTitle() -{ -} - -VCLXTabControl::ChildData* -VCLXTabControl::createChild( uno::Reference< awt::XLayoutConstrains > const& xChild ) -{ - return new ChildData( xChild ); -} - -VCLXTabControl::ChildProps* -VCLXTabControl::createChildProps( Box_Base::ChildData *pData ) -{ - return new ChildProps( static_cast<VCLXTabControl::ChildData*> ( pData ) ); -} - -DBG_NAME( VCLXTabControl ); - -#if !defined (__GNUC__) -#define __PRETTY_FUNCTION__ __FUNCTION__ -#endif /* !__GNUC__ */ - -VCLXTabControl::VCLXTabControl() - : VCLXWindow() - , VCLXTabControl_Base() - , Box_Base() - , mTabId (1) - , bRealized (false) -{ -#ifndef __SUNPRO_CC - OSL_TRACE ("\n********%s:%x", __PRETTY_FUNCTION__, this); -#endif - DBG_CTOR( VCLXTabControl, NULL ); -} - -VCLXTabControl::~VCLXTabControl() -{ - DBG_DTOR( VCLXTabControl, NULL ); -} - -IMPLEMENT_2_FORWARD_XINTERFACE2( VCLXTabControl, VCLXWindow, Container, VCLXTabControl_Base ); - -IMPLEMENT_FORWARD_XTYPEPROVIDER2( VCLXTabControl, VCLXWindow, VCLXTabControl_Base ); - -void SAL_CALL VCLXTabControl::dispose( ) throw(uno::RuntimeException) -{ - { - SolarMutexGuard aGuard; - - EventObject aDisposeEvent; - aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); -// maTabListeners.disposeAndClear( aDisposeEvent ); - } - - VCLXWindow::dispose(); -} - - -TabControl *VCLXTabControl::getTabControl() const throw (uno::RuntimeException) -{ - TabControl *pTabControl = static_cast< TabControl* >( GetWindow() ); - if ( pTabControl ) - return pTabControl; - throw uno::RuntimeException(); -} - -sal_Int32 SAL_CALL VCLXTabControl::insertTab() throw (uno::RuntimeException) -{ - TabControl *pTabControl = getTabControl(); - sal_uInt16 id = sal::static_int_cast< sal_uInt16 >( mTabId++ ); - rtl::OUString title (RTL_CONSTASCII_USTRINGPARAM( "" ) ); - pTabControl->InsertPage( id, title.getStr(), TAB_APPEND ); - pTabControl->SetTabPage( id, new TabPage( pTabControl ) ); - return id; -} - -void SAL_CALL VCLXTabControl::removeTab( sal_Int32 ID ) throw (uno::RuntimeException, IndexOutOfBoundsException) -{ - TabControl *pTabControl = getTabControl(); - if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL ) - throw IndexOutOfBoundsException(); - pTabControl->RemovePage( sal::static_int_cast< sal_uInt16 >( ID ) ); -} - -void SAL_CALL VCLXTabControl::activateTab( sal_Int32 ID ) throw (uno::RuntimeException, IndexOutOfBoundsException) -{ - TabControl *pTabControl = getTabControl(); - if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL ) - throw IndexOutOfBoundsException(); - pTabControl->SelectTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ); -} - -sal_Int32 SAL_CALL VCLXTabControl::getActiveTabID() throw (uno::RuntimeException) -{ - return getTabControl()->GetCurPageId( ); -} - -void SAL_CALL VCLXTabControl::addTabListener( const uno::Reference< awt::XTabListener >& xListener ) throw (uno::RuntimeException) -{ - for ( std::list< uno::Reference - < awt::XTabListener > >::const_iterator it - = mxTabListeners.begin(); it != mxTabListeners.end(); ++it ) - { - if ( *it == xListener ) - // already added - return; - } - mxTabListeners.push_back( xListener ); -} - -void SAL_CALL VCLXTabControl::removeTabListener( const uno::Reference< awt::XTabListener >& xListener ) throw (uno::RuntimeException) -{ - for ( std::list< uno::Reference - < awt::XTabListener > >::iterator it - = mxTabListeners.begin(); it != mxTabListeners.end(); ++it ) - { - if ( *it == xListener ) - { - mxTabListeners.erase( it ); - break; - } - } -} - -void SAL_CALL VCLXTabControl::setTabProps( sal_Int32 ID, const uno::Sequence< NamedValue >& Properties ) throw (uno::RuntimeException, IndexOutOfBoundsException) -{ - TabControl *pTabControl = getTabControl(); - if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL ) - throw IndexOutOfBoundsException(); - - for ( int i = 0; i < Properties.getLength(); i++ ) - { - const rtl::OUString &name = Properties[i].Name; - const uno::Any &value = Properties[i].Value; - - if ( name == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ) ) - { - rtl::OUString title = value.get<rtl::OUString>(); - pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( ID ), title.getStr() ); - } - } -} - -uno::Sequence< NamedValue > SAL_CALL VCLXTabControl::getTabProps( sal_Int32 ID ) - throw (IndexOutOfBoundsException, uno::RuntimeException) -{ - TabControl *pTabControl = getTabControl(); - if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( ID ) ) == NULL ) - throw IndexOutOfBoundsException(); - -#define ADD_PROP( seq, i, name, val ) { \ - NamedValue value; \ - value.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( name ) ); \ - value.Value = uno::makeAny( val ); \ - seq[i] = value; \ - } - - uno::Sequence< NamedValue > props( 2 ); - ADD_PROP( props, 0, "Title", rtl::OUString( pTabControl->GetPageText( sal::static_int_cast< sal_uInt16 >( ID ) ) ) ); - ADD_PROP( props, 1, "Position", pTabControl->GetPagePos( sal::static_int_cast< sal_uInt16 >( ID ) ) ); -#undef ADD_PROP - return props; -} - -// TODO: draw tab border here -void SAL_CALL VCLXTabControl::draw( sal_Int32 nX, sal_Int32 nY ) throw(uno::RuntimeException) -{ - SolarMutexGuard aGuard; - - TabControl *pTabControl = getTabControl(); - TabPage *pTabPage = pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( getActiveTabID() ) ); - if ( pTabPage ) - { - ::Point aPos( nX, nY ); - ::Size aSize = pTabPage->GetSizePixel(); - - OutputDevice* pDev = VCLUnoHelper::GetOutputDevice( getGraphics() ); - aPos = pDev->PixelToLogic( aPos ); - aSize = pDev->PixelToLogic( aSize ); - - pTabPage->Draw( pDev, aPos, aSize, 0 ); - } - - VCLXWindow::draw( nX, nY ); -} - -void SAL_CALL VCLXTabControl::addChild( - const uno::Reference< awt::XLayoutConstrains > &xChild ) - throw (uno::RuntimeException, awt::MaxChildrenException) -{ - mIdMap[ xChild ] = insertTab(); - Box_Base::addChild( xChild ); -} - -void SAL_CALL VCLXTabControl::removeChild( const uno::Reference< awt::XLayoutConstrains > &xChild ) - throw (uno::RuntimeException) -{ - removeTab( mIdMap[xChild] ); - mIdMap[ xChild ] = -1; - Box_Base::removeChild( xChild ); -} - -static void setChildrenVisible( uno::Reference < awt::XLayoutConstrains > xChild, bool visible ) -{ - uno::Reference< awt::XWindow > xWin( xChild, uno::UNO_QUERY); - if ( xWin.is() ) - { - xWin->setVisible( visible ); - } - - uno::Reference < awt::XLayoutContainer > xCont( xChild, uno::UNO_QUERY ); - if ( xCont.is()) - { - uno::Sequence< uno::Reference < awt::XLayoutConstrains > > children = xCont->getChildren(); - for ( int i = 0; i < children.getLength(); i++ ) - { - setChildrenVisible( children[i], visible ); - } - } -} - -void SAL_CALL VCLXTabControl::allocateArea (awt::Rectangle const &area) - throw (uno::RuntimeException) -{ -#ifndef __SUNPRO_CC - OSL_TRACE ("\n%s", __PRETTY_FUNCTION__); -#endif - maAllocation = area; - - TabControl *pTabControl = getTabControl(); - -// FIXME: this is wrong. We just want to set tab controls pos/size for -// the tabs menu, otherwise, it gets events that should go to children -// (I guess we could solve this by making the tabcontrol as the actual -// XWindow parent of its children, when importing...) Not sure about -// TabPage drawing... That doesn't work on gtk+; just ignoring that. -// LATER: Nah, the proper fix is to get the XWindow hierarchy -// straight. - - awt::Size currentSize = getSize(); - awt::Size requestedSize (area.Width, area.Height); -// requestedSize.Height = getHeightForWidth( area.Width ); - - awt::Size minimumSize = getMinimumSize(); - if (requestedSize.Width < minimumSize.Width) - requestedSize.Width = minimumSize.Width; - if (requestedSize.Height < minimumSize.Height) - requestedSize.Height = minimumSize.Height; - - Size pageSize = static_cast<TabControl*> (GetWindow ())->GetTabPageSizePixel (); - awt::Size pageBasedSize (0, 0); - pageBasedSize.Width = pageSize.Width (); - pageBasedSize.Height = pageSize.Height (); - - const int wc = 0; - const int hc = 20; - static int pwc = 0; - static int phc = 40; - - if (requestedSize.Width < pageBasedSize.Width) - requestedSize.Width = pageBasedSize.Width + wc; - if (requestedSize.Height < pageBasedSize.Height) - requestedSize.Height = pageBasedSize.Height + hc; - - Window *parent = GetWindow()->GetParent(); - Size parentSize = parent->GetSizePixel(); - -#ifndef __SUNPRO_CC -#ifdef GCC_MAJOR - OSL_TRACE ("\n%s", __PRETTY_FUNCTION__); -#endif /* GCC_MAJOR */ - OSL_TRACE ("%s: cursize: %d ,%d", __FUNCTION__, currentSize.Width, currentSize.Height ); - OSL_TRACE ("%s: area: %d, %d", __FUNCTION__, area.Width, area.Height ); - OSL_TRACE ("%s: minimum: %d, %d", __FUNCTION__, minimumSize.Width, minimumSize.Height ); - OSL_TRACE ("%s: requestedSize: %d, %d", __FUNCTION__, requestedSize.Width, requestedSize.Height ); - OSL_TRACE ("%s: pageBasedSize: %d, %d", __FUNCTION__, pageBasedSize.Width, pageBasedSize.Height ); -#endif - - //bRealized = false; - if (!bRealized) - { - setPosSize( area.X, area.Y, requestedSize.Width, requestedSize.Height, awt::PosSize::POSSIZE ); - bRealized = true; - } - else - { - if ( requestedSize.Width > currentSize.Width + 10) - setPosSize( 0, 0, requestedSize.Width, 0, awt::PosSize::WIDTH ); - if ( requestedSize.Height > currentSize.Height + 10) - setPosSize( 0, 0, 0, requestedSize.Height, awt::PosSize::HEIGHT ); - } - - if (pageBasedSize.Width > parentSize.Width () - || pageBasedSize.Height > parentSize.Height ()) - //parent->SetSizePixel ( Size (pageBasedSize.Width, pageBasedSize.Height)); - //parent->SetSizePixel ( Size (pageBasedSize.Width + pwc, pageBasedSize.Height + phc)); - parent->SetSizePixel ( Size (requestedSize.Width + pwc, requestedSize.Height + phc)); - - // FIXME: we can save cycles by setting visibility more sensibly. Having - // it here does makes it easier when changing tabs (just needs a recalc()) - unsigned i = 0; - for ( std::list<Box_Base::ChildData *>::const_iterator it - = maChildren.begin(); it != maChildren.end(); ++it, ++i ) - { - ChildData *child = static_cast<VCLXTabControl::ChildData*> ( *it ); - uno::Reference - < awt::XLayoutConstrains > xChild( child->mxChild ); - if ( xChild.is() ) - { - uno::Reference< awt::XWindow > xWin( xChild, uno::UNO_QUERY ); - bool active = (i+1 == (unsigned) getActiveTabID()); - - // HACK: since our layout:: container don't implement XWindow, we have no easy - // way to set them invisible; lets just set all their children as such :P - setChildrenVisible( xChild, active ); - - if ( active ) - { - ::Rectangle label_rect = pTabControl->GetTabBounds( sal::static_int_cast< sal_uInt16 >( i+1 ) ); - ::Rectangle page_rect = pTabControl->GetTabPageBounds( sal::static_int_cast< sal_uInt16 >( i+1 ) ); - - awt::Rectangle childRect; - childRect.X = page_rect.Left(); - childRect.Y = SAL_MAX( label_rect.Bottom(), page_rect.Top() ); - childRect.Width = page_rect.Right() - page_rect.Left(); - childRect.Height = page_rect.Bottom() - childRect.Y; - - allocateChildAt( xChild, childRect ); - } - } - } -} - -awt::Size SAL_CALL VCLXTabControl::getMinimumSize() - throw(uno::RuntimeException) -{ - awt::Size requestedSize = VCLXWindow::getMinimumSize(); - awt::Size childrenSize( 0, 0 ); - - TabControl* pTabControl = static_cast< TabControl* >( GetWindow() ); - if ( !pTabControl ) - return requestedSize; - - // calculate size to accomodate all children - unsigned i = 0; - for ( std::list<Box_Base::ChildData *>::const_iterator it - = maChildren.begin(); it != maChildren.end(); ++it, ++i ) - { - ChildData *child = static_cast<VCLXTabControl::ChildData*> ( *it ); - if ( child->mxChild.is() ) - { - // set the title prop here... - pTabControl->SetPageText( sal::static_int_cast< sal_uInt16 >( i+1 ), child->maTitle.getStr() ); - - awt::Size childSize( child->mxChild->getMinimumSize() ); - childrenSize.Width = SAL_MAX( childSize.Width, childrenSize.Width ); - childrenSize.Height = SAL_MAX( childSize.Height, childrenSize.Height ); - } - } - -#ifndef __SUNPRO_CC -#ifdef GCC_MAJOR - OSL_TRACE ("\n%s", __PRETTY_FUNCTION__); -#endif /* GCC_MAJOR */ - OSL_TRACE ("%s: children: %d", __FUNCTION__, i); - OSL_TRACE ("%s: childrenSize: %d, %d", __FUNCTION__, childrenSize.Width, childrenSize.Height ); -#endif - - requestedSize.Width += childrenSize.Width; - requestedSize.Height += childrenSize.Height + 20; - - maRequisition = requestedSize; - return requestedSize; -} - -void VCLXTabControl::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) -{ - SolarMutexClearableGuard aGuard; - TabControl* pTabControl = static_cast< TabControl* >( GetWindow() ); - if ( !pTabControl ) - return; - - switch ( _rVclWindowEvent.GetId() ) - { - case VCLEVENT_TABPAGE_ACTIVATE: - forceRecalc(); - case VCLEVENT_TABPAGE_DEACTIVATE: - case VCLEVENT_TABPAGE_INSERTED: - case VCLEVENT_TABPAGE_REMOVED: - case VCLEVENT_TABPAGE_REMOVEDALL: - case VCLEVENT_TABPAGE_PAGETEXTCHANGED: - { - sal_uLong page = (sal_uLong) _rVclWindowEvent.GetData(); - for ( std::list< uno::Reference - < awt::XTabListener > >::iterator it - = mxTabListeners.begin(); it != mxTabListeners.end(); ++it ) - { - uno::Reference - < awt::XTabListener > listener = *it; - - switch ( _rVclWindowEvent.GetId() ) - { - - case VCLEVENT_TABPAGE_ACTIVATE: - listener->activated( page ); - break; - case VCLEVENT_TABPAGE_DEACTIVATE: - listener->deactivated( page ); - break; - case VCLEVENT_TABPAGE_INSERTED: - listener->inserted( page ); - break; - case VCLEVENT_TABPAGE_REMOVED: - listener->removed( page ); - break; - case VCLEVENT_TABPAGE_REMOVEDALL: - for ( int i = 1; i < mTabId; i++) - { - if ( pTabControl->GetTabPage( sal::static_int_cast< sal_uInt16 >( i ) ) ) - listener->removed( i ); - } - break; - case VCLEVENT_TABPAGE_PAGETEXTCHANGED: - listener->changed( page, getTabProps( page ) ); - break; - } - } - break; - } - default: - aGuard.clear(); - VCLXWindow::ProcessWindowEvent( _rVclWindowEvent ); - break; - } -} - -void SAL_CALL VCLXTabControl::setProperty( const ::rtl::OUString& PropertyName, const uno::Any &Value ) throw(uno::RuntimeException) -{ - VCLXWindow::setProperty( PropertyName, Value ); -} - -uno::Any SAL_CALL VCLXTabControl::getProperty( const ::rtl::OUString& PropertyName ) throw(uno::RuntimeException) -{ - return VCLXWindow::getProperty( PropertyName ); -} - -} // namespace layoutimpl - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxtabcontrol.hxx b/toolkit/source/awt/vclxtabcontrol.hxx deleted file mode 100644 index 9b20182e7d16..000000000000 --- a/toolkit/source/awt/vclxtabcontrol.hxx +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef LAYOUT_AWT_VCLXTABCONTROLLER_HXX -#define LAYOUT_AWT_VCLXTABCONTROLLER_HXX - -#include <com/sun/star/awt/XSimpleTabController.hpp> -#include <comphelper/uno3.hxx> -#include <layout/core/box-base.hxx> -#include <map> -#include <toolkit/awt/vclxwindow.hxx> - -class TabControl; - -namespace layoutimpl -{ - -typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XSimpleTabController - > VCLXTabControl_Base; - -class VCLXTabControl :public VCLXWindow - ,public VCLXTabControl_Base - ,public Box_Base -{ - int mTabId; - bool bRealized; - -public: - VCLXTabControl(); - -protected: - ~VCLXTabControl(); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - - // XComponent - void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) throw (::com::sun::star::uno::RuntimeException); - - // XSimpleTabController - virtual ::sal_Int32 SAL_CALL insertTab() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL setTabProps( ::sal_Int32 ID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Properties ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > SAL_CALL getTabProps( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL activateTab( ::sal_Int32 ID ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getActiveTabID() throw (::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL addTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeTabListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTabListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::awt::XLayoutContainer - virtual void SAL_CALL addChild( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XLayoutConstrains >& Child ) - throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::awt::MaxChildrenException); - virtual void SAL_CALL removeChild( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XLayoutConstrains >& Child ) - throw (::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL allocateArea( const ::com::sun::star::awt::Rectangle &rArea ) - throw (::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize() - throw(::com::sun::star::uno::RuntimeException); - - // unimplemented: - virtual sal_Bool SAL_CALL hasHeightForWidth() - throw(css::uno::RuntimeException) - { return false; } - virtual sal_Int32 SAL_CALL getHeightForWidth( sal_Int32 /*nWidth*/ ) - throw(css::uno::RuntimeException) - { return maRequisition.Height; } - - // VclWindowPeer - virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); - - // VCLXWindow - void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ); - -public: - // Maps page ids to child references - struct ChildData : public Box_Base::ChildData - { - rtl::OUString maTitle; - ChildData( css::uno::Reference< css::awt::XLayoutConstrains > const& xChild ); - }; - - struct ChildProps : public Box_Base::ChildProps - { - ChildProps( VCLXTabControl::ChildData *pData ); - }; - - inline TabControl *getTabControl() const throw (::com::sun::star::uno::RuntimeException); - -protected: - ChildData *createChild( css::uno::Reference< css::awt::XLayoutConstrains > const& xChild ); - ChildProps *createChildProps( Box_Base::ChildData* pData ); - - - std::map< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XLayoutConstrains >, sal_Int32 > mIdMap; - // FIXME: we might want to use a Multiplexer - std::list< ::com::sun::star::uno::Reference - < ::com::sun::star::awt::XTabListener > > mxTabListeners; - - -private: - VCLXTabControl( const VCLXTabControl& ); // never implemented - VCLXTabControl& operator=( const VCLXTabControl& ); // never implemented -}; - -} // namespace layoutimpl - -#endif /* LAYOUT_AWT_VCLXTABCONTROLLER_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxtabpage.cxx b/toolkit/source/awt/vclxtabpage.cxx deleted file mode 100644 index c50e40ec331e..000000000000 --- a/toolkit/source/awt/vclxtabpage.cxx +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include <vclxtabpage.hxx> - -#include "forward.hxx" - -#include <com/sun/star/awt/PosSize.hpp> -#include <toolkit/helper/convert.hxx> -#include <vcl/tabpage.hxx> -#include <vcl/tabctrl.hxx> -#include <vcl/svapp.hxx> - -#if !defined (__GNUC__) -#define __PRETTY_FUNCTION__ __FUNCTION__ -#endif /* !__GNUC__ */ - -namespace layoutimpl -{ - -using namespace ::com::sun::star; - -// XInterface -IMPLEMENT_FORWARD_XINTERFACE2( VCLXTabPage, VCLXWindow, Bin ); - -// XTypeProvider -IMPLEMENT_FORWARD_XTYPEPROVIDER1( VCLXTabPage, VCLXWindow ); - -VCLXTabPage::VCLXTabPage( Window *p ) - : VCLXWindow() - , Bin() - , bRealized( false ) -{ - /* FIXME: before Window is set, setLabel, setProperty->setImage - * are silent no-ops. */ - p->SetComponentInterface( this ); -} - -VCLXTabPage::~VCLXTabPage() -{ -} - -void SAL_CALL VCLXTabPage::dispose() throw(uno::RuntimeException) -{ - { - SolarMutexGuard aGuard; - - lang::EventObject aDisposeEvent; - aDisposeEvent.Source = W3K_EXPLICIT_CAST (*this); - } - - VCLXWindow::dispose(); -} - -void SAL_CALL VCLXTabPage::allocateArea( awt::Rectangle const& area ) - throw (uno::RuntimeException) -{ - awt::Size currentSize = getSize(); - awt::Size requestedSize = getMinimumSize(); - requestedSize.Height = getHeightForWidth( area.Width ); - - if ( currentSize.Width > 0 && currentSize.Height > 0 - && requestedSize.Width > currentSize.Width ) - requestedSize.Width = currentSize.Width; - if ( currentSize.Width > 0 && currentSize.Height > 0 - && requestedSize.Height > currentSize.Height ) - requestedSize.Height = currentSize.Height; - - // FIXME: missing destructor? - if ( !GetWindow() ) - return; - - Size windowSize = GetWindow()->GetSizePixel(); - Window *parent = GetWindow()->GetParent(); - Size parentSize = parent->GetSizePixel(); - - Point pos = GetWindow()->GetPosPixel(); -#ifndef __SUNPRO_CC - OSL_TRACE ("\n%s", __PRETTY_FUNCTION__); - OSL_TRACE ("%s: curpos: %d ,%d", __FUNCTION__, pos.X(), pos.Y() ); - - OSL_TRACE ("%s: cursize: %d ,%d", __FUNCTION__, currentSize.Width, currentSize.Height ); - OSL_TRACE ("%s: area: %d, %d", __FUNCTION__, area.Width, area.Height ); - OSL_TRACE ("%s: requestedSize: %d, %d", __FUNCTION__, requestedSize.Width, requestedSize.Height ); - OSL_TRACE ("%s: parent: %d, %d", __FUNCTION__, parentSize.Width(), parentSize.Height() ); - OSL_TRACE ("%s: window: %d, %d", __FUNCTION__, windowSize.Width(), windowSize.Height() ); -#endif - - if ( !bRealized ) - { - setPosSize( area.X, area.Y, requestedSize.Width, requestedSize.Height, awt::PosSize::SIZE ); - bRealized = true; - } - else - { - if ( requestedSize.Width > currentSize.Width + 10) - setPosSize( 0, 0, requestedSize.Width, 0, awt::PosSize::WIDTH ); - if ( requestedSize.Height > currentSize.Height + 10) - setPosSize( 0, 0, 0, requestedSize.Height, awt::PosSize::HEIGHT ); - } - - awt::Size newSize = getSize(); -#ifndef __SUNPRO_CC - OSL_TRACE ("%s: newSize: %d, %d", __FUNCTION__, newSize.Width, newSize.Height ); -#endif - maAllocation.Width = newSize.Width; - maAllocation.Height = newSize.Height; - - Bin::allocateArea( maAllocation ); -} - -awt::Size SAL_CALL VCLXTabPage::getMinimumSize() - throw(uno::RuntimeException) -{ - SolarMutexGuard aGuard; - - return Bin::getMinimumSize(); -} - -} // namespace layoutimpl - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxtabpage.hxx b/toolkit/source/awt/vclxtabpage.hxx deleted file mode 100644 index 81560e07da76..000000000000 --- a/toolkit/source/awt/vclxtabpage.hxx +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef LAYOUT_AWT_VCLXTABPAGE_HXX -#define LAYOUT_AWT_VCLXTABPAGE_HXX - -#include <toolkit/awt/vclxwindow.hxx> -#include <layout/core/bin.hxx> -#include <comphelper/uno3.hxx> - -namespace layoutimpl -{ - -namespace css = ::com::sun::star; - -class VCLXTabPage : public VCLXWindow - , public Bin -{ - bool bRealized; - -public: - VCLXTabPage( Window *p ); - - // XInterface - DECLARE_XINTERFACE() - - // XTypeProvider - DECLARE_XTYPEPROVIDER() - -protected: - ~VCLXTabPage(); - - // XComponent - void SAL_CALL dispose() throw(css::uno::RuntimeException); - - // ::com::sun::star::awt::XLayoutContainer - virtual void SAL_CALL allocateArea( css::awt::Rectangle const& rArea ) - throw (css::uno::RuntimeException); - virtual css::awt::Size SAL_CALL getMinimumSize() - throw(css::uno::RuntimeException); - -private: - VCLXTabPage( VCLXTabPage const & ); - VCLXTabPage& operator=( VCLXTabPage const & ); -}; - -} // namespace layoutimpl - -#endif /* LAYOUT_AWT_VCLXTABPAGE_HXX */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 7fdf3b522d8f..7b310b788910 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -129,7 +129,6 @@ #include <tools/debug.hxx> #include <comphelper/processfactory.hxx> -#include "awt/vclxtabcontrol.hxx" namespace css = ::com::sun::star; diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index 3a532b83de14..ae78563e2ea4 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -231,8 +231,6 @@ extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL extern void * SAL_CALL comp_AsyncCallback_component_getFactory( const char * implName, void * serviceManager, void * registryKey ); -extern void * SAL_CALL comp_Layout_component_getFactory( const char * implName, void * serviceManager, void * registryKey ); - extern "C" { @@ -330,8 +328,6 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImple if ( rtl_str_compare( sImplementationName, "com.sun.star.awt.comp.AsyncCallback" ) == 0 ) return comp_AsyncCallback_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey ); - if( pRet == 0 ) - pRet = comp_Layout_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey ); } return pRet; } |