summaryrefslogtreecommitdiffstats
path: root/toolkit/inc/awt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /toolkit/inc/awt
parentInitial commit. (diff)
downloadlibreoffice-cb75148ebd0135178ff46f89a30139c44f8d2040.tar.xz
libreoffice-cb75148ebd0135178ff46f89a30139c44f8d2040.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/inc/awt')
-rw-r--r--toolkit/inc/awt/animatedimagespeer.hxx103
-rw-r--r--toolkit/inc/awt/vclxbitmap.hxx67
-rw-r--r--toolkit/inc/awt/vclxcontainer.hxx62
-rw-r--r--toolkit/inc/awt/vclxgraphics.hxx122
-rw-r--r--toolkit/inc/awt/vclxpointer.hxx62
-rw-r--r--toolkit/inc/awt/vclxprinter.hxx194
-rw-r--r--toolkit/inc/awt/vclxregion.hxx67
-rw-r--r--toolkit/inc/awt/vclxspinbutton.hxx88
-rw-r--r--toolkit/inc/awt/vclxsystemdependentwindow.hxx49
-rw-r--r--toolkit/inc/awt/vclxtabpagecontainer.hxx73
-rw-r--r--toolkit/inc/awt/vclxtopwindow.hxx78
-rw-r--r--toolkit/inc/awt/vclxwindows.hxx697
12 files changed, 1662 insertions, 0 deletions
diff --git a/toolkit/inc/awt/animatedimagespeer.hxx b/toolkit/inc/awt/animatedimagespeer.hxx
new file mode 100644
index 000000000..839e249b3
--- /dev/null
+++ b/toolkit/inc/awt/animatedimagespeer.hxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <toolkit/awt/vclxwindow.hxx>
+#include <com/sun/star/container/XContainerListener.hpp>
+
+#include <com/sun/star/awt/XAnimatedImages.hpp>
+#include <com/sun/star/awt/XAnimation.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/util/XModifyListener.hpp>
+
+#include <cppuhelper/implbase.hxx>
+
+namespace toolkit
+{
+
+
+ //= AnimatedImagesPeer
+
+ struct AnimatedImagesPeer_Data;
+ typedef cppu::ImplInheritanceHelper< VCLXWindow,
+ css::awt::XAnimation,
+ css::container::XContainerListener,
+ css::util::XModifyListener
+ > AnimatedImagesPeer_Base;
+
+ class AnimatedImagesPeer final : public AnimatedImagesPeer_Base
+ {
+ public:
+ AnimatedImagesPeer();
+
+ private:
+ virtual ~AnimatedImagesPeer() override;
+
+ public:
+ // XAnimation
+ virtual void SAL_CALL startAnimation( ) override;
+ virtual void SAL_CALL stopAnimation( ) override;
+ virtual sal_Bool SAL_CALL isAnimationRunning( ) override;
+
+ // VclWindowPeer
+ virtual void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ virtual css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ // XContainerListener
+ virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
+ virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) override;
+ virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) override;
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const css::lang::EventObject& i_event ) override;
+
+ // XModifyListener
+ virtual void SAL_CALL modified( const css::lang::EventObject& i_event ) override;
+
+ // XComponent
+ void SAL_CALL dispose( ) override;
+
+ struct CachedImage
+ {
+ OUString sImageURL;
+ mutable css::uno::Reference< css::graphic::XGraphic > xGraphic;
+ };
+
+ private:
+ void ProcessWindowEvent( const VclWindowEvent& i_windowEvent ) override;
+
+ /** updates our images with the ones from the given XAnimatedImages component
+ */
+ void impl_updateImages_nolck( const css::uno::Reference< css::uno::XInterface >& i_animatedImages );
+
+ AnimatedImagesPeer(const AnimatedImagesPeer&) = delete;
+ AnimatedImagesPeer& operator=(const AnimatedImagesPeer&) = delete;
+
+ void updateImageList_nothrow();
+ void updateImageList_nothrow( const css::uno::Reference< css::awt::XAnimatedImages >& i_images );
+
+ std::vector< std::vector< CachedImage > > maCachedImageSets;
+ };
+
+
+} // namespace toolkit
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/awt/vclxbitmap.hxx b/toolkit/inc/awt/vclxbitmap.hxx
new file mode 100644
index 000000000..6cf8928e0
--- /dev/null
+++ b/toolkit/inc/awt/vclxbitmap.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/awt/XDisplayBitmap.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/util/XAccounting.hpp>
+#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <mutex>
+#include <vcl/bitmapex.hxx>
+
+
+
+
+class VCLXBitmap final : public cppu::WeakImplHelper<
+ css::awt::XBitmap,
+ css::awt::XDisplayBitmap,
+ css::lang::XUnoTunnel,
+ css::util::XAccounting>
+{
+ std::mutex maMutex;
+ BitmapEx maBitmap;
+
+ std::mutex& GetMutex() { return maMutex; }
+
+
+public:
+ // inline constructors
+ VCLXBitmap() : maMutex(), maBitmap() {}
+ VCLXBitmap(const BitmapEx& rBitmapEx) : maMutex(), maBitmap(rBitmapEx) {}
+
+ void SetBitmap( const BitmapEx& rBmp ) { maBitmap = rBmp; }
+ const BitmapEx& GetBitmap() const { return maBitmap; }
+
+ // css::lang::XUnoTunnel
+ UNO3_GETIMPLEMENTATION_DECL(VCLXBitmap)
+
+ // css::awt::XBitmap
+ css::awt::Size SAL_CALL getSize() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getDIB() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getMaskDIB() override;
+
+ // XAccounting
+ sal_Int64 SAL_CALL estimateUsage() override;
+};
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/awt/vclxcontainer.hxx b/toolkit/inc/awt/vclxcontainer.hxx
new file mode 100644
index 000000000..d93c967b8
--- /dev/null
+++ b/toolkit/inc/awt/vclxcontainer.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/awt/XVclContainer.hpp>
+#include <com/sun/star/awt/XVclContainerPeer.hpp>
+#include <cppuhelper/weak.hxx>
+
+#include <toolkit/awt/vclxwindow.hxx>
+
+class VCLXContainer : public css::awt::XVclContainer,
+ public css::awt::XVclContainerPeer,
+ public VCLXWindow
+{
+public:
+ VCLXContainer();
+ virtual ~VCLXContainer() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XVclContainer
+ void SAL_CALL addVclContainerListener( const css::uno::Reference< css::awt::XVclContainerListener >& l ) override;
+ void SAL_CALL removeVclContainerListener( const css::uno::Reference< css::awt::XVclContainerListener >& l ) override;
+ css::uno::Sequence< css::uno::Reference< css::awt::XWindow > > SAL_CALL getWindows( ) override;
+
+ // css::awt::XVclContainerPeer
+ void SAL_CALL enableDialogControl( sal_Bool bEnable ) override;
+ void SAL_CALL setTabOrder( const css::uno::Sequence< css::uno::Reference< css::awt::XWindow > >& WindowOrder, const css::uno::Sequence< css::uno::Any >& Tabs, sal_Bool GroupControl ) override;
+ void SAL_CALL setGroup( const css::uno::Sequence< css::uno::Reference< css::awt::XWindow > >& Windows ) override;
+
+ // css::awt::XVclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/awt/vclxgraphics.hxx b/toolkit/inc/awt/vclxgraphics.hxx
new file mode 100644
index 000000000..ff697ead3
--- /dev/null
+++ b/toolkit/inc/awt/vclxgraphics.hxx
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <tools/color.hxx>
+#include <o3tl/typed_flags_set.hxx>
+#include <vcl/font.hxx>
+#include <vcl/rendercontext/RasterOp.hxx>
+#include <vcl/vclptr.hxx>
+
+#include <com/sun/star/awt/XGraphics2.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+
+#include <memory>
+
+class OutputDevice;
+namespace vcl { class Region; }
+namespace com::sun::star::graphic { class XGraphic; }
+
+
+enum class InitOutDevFlags
+{
+ NONE = 0x0000,
+ FONT = 0x0001,
+ COLORS = 0x0002,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<InitOutDevFlags> : is_typed_flags<InitOutDevFlags, 0x03> {};
+}
+
+
+
+
+class VCLXGraphics final : public cppu::WeakImplHelper<
+ css::awt::XGraphics2,
+ css::lang::XUnoTunnel>
+{
+private:
+ // used to return same reference on each call to getDevice()
+ css::uno::Reference< css::awt::XDevice> mxDevice;
+
+ VclPtr<OutputDevice> mpOutputDevice;
+ vcl::Font maFont;
+ Color maTextColor;
+ Color maTextFillColor;
+ Color maLineColor;
+ Color maFillColor;
+ RasterOp meRasterOp;
+ std::unique_ptr<vcl::Region> mpClipRegion;
+
+ void initAttrs();
+
+public:
+ VCLXGraphics();
+ virtual ~VCLXGraphics() override;
+
+ void Init( OutputDevice* pOutDev );
+ void InitOutputDevice( InitOutDevFlags nFlags );
+
+ void SetOutputDevice( OutputDevice* pOutDev );
+ OutputDevice* GetOutputDevice() const { return mpOutputDevice; }
+
+ // css::lang::XUnoTunnel
+ UNO3_GETIMPLEMENTATION_DECL(VCLXGraphics)
+
+ // css::awt::XGraphics Attributes
+ virtual css::uno::Reference< css::awt::XDevice > SAL_CALL getDevice() override;
+ virtual void SAL_CALL setTextColor( ::sal_Int32 _textcolor ) override;
+ virtual void SAL_CALL setTextFillColor( ::sal_Int32 _textfillcolor ) override;
+ virtual void SAL_CALL setLineColor( ::sal_Int32 _linecolor ) override;
+ virtual void SAL_CALL setFillColor( ::sal_Int32 _fillcolor ) override;
+ virtual void SAL_CALL setRasterOp( css::awt::RasterOperation _rasterop ) override;
+ virtual void SAL_CALL setFont( const css::uno::Reference< css::awt::XFont >& _font ) override;
+ virtual css::awt::SimpleFontMetric SAL_CALL getFontMetric() override;
+
+ // css::awt::XGraphics Methods
+ virtual void SAL_CALL selectFont( const css::awt::FontDescriptor& aDescription ) override;
+ virtual void SAL_CALL setClipRegion( const css::uno::Reference< css::awt::XRegion >& Clipping ) override;
+ virtual void SAL_CALL intersectClipRegion( const css::uno::Reference< css::awt::XRegion >& xClipping ) override;
+ virtual void SAL_CALL push( ) override;
+ virtual void SAL_CALL pop( ) override;
+ virtual void SAL_CALL clear( const css::awt::Rectangle& aRect ) override;
+ virtual void SAL_CALL copy( const css::uno::Reference< css::awt::XDevice >& xSource, ::sal_Int32 nSourceX, ::sal_Int32 nSourceY, ::sal_Int32 nSourceWidth, ::sal_Int32 nSourceHeight, ::sal_Int32 nDestX, ::sal_Int32 nDestY, ::sal_Int32 nDestWidth, ::sal_Int32 nDestHeight ) override;
+ virtual void SAL_CALL draw( const css::uno::Reference< css::awt::XDisplayBitmap >& xBitmapHandle, ::sal_Int32 SourceX, ::sal_Int32 SourceY, ::sal_Int32 SourceWidth, ::sal_Int32 SourceHeight, ::sal_Int32 DestX, ::sal_Int32 DestY, ::sal_Int32 DestWidth, ::sal_Int32 DestHeight ) override;
+ virtual void SAL_CALL drawPixel( ::sal_Int32 X, ::sal_Int32 Y ) override;
+ virtual void SAL_CALL drawLine( ::sal_Int32 X1, ::sal_Int32 Y1, ::sal_Int32 X2, ::sal_Int32 Y2 ) override;
+ virtual void SAL_CALL drawRect( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height ) override;
+ virtual void SAL_CALL drawRoundedRect( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int32 nHorzRound, ::sal_Int32 nVertRound ) override;
+ virtual void SAL_CALL drawPolyLine( const css::uno::Sequence< ::sal_Int32 >& DataX, const css::uno::Sequence< ::sal_Int32 >& DataY ) override;
+ virtual void SAL_CALL drawPolygon( const css::uno::Sequence< ::sal_Int32 >& DataX, const css::uno::Sequence< ::sal_Int32 >& DataY ) override;
+ virtual void SAL_CALL drawPolyPolygon( const css::uno::Sequence< css::uno::Sequence< ::sal_Int32 > >& DataX, const css::uno::Sequence< css::uno::Sequence< ::sal_Int32 > >& DataY ) override;
+ virtual void SAL_CALL drawEllipse( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height ) override;
+ virtual void SAL_CALL drawArc( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int32 X1, ::sal_Int32 Y1, ::sal_Int32 X2, ::sal_Int32 Y2 ) override;
+ virtual void SAL_CALL drawPie( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int32 X1, ::sal_Int32 Y1, ::sal_Int32 X2, ::sal_Int32 Y2 ) override;
+ virtual void SAL_CALL drawChord( ::sal_Int32 nX, ::sal_Int32 nY, ::sal_Int32 nWidth, ::sal_Int32 nHeight, ::sal_Int32 nX1, ::sal_Int32 nY1, ::sal_Int32 nX2, ::sal_Int32 nY2 ) override;
+ virtual void SAL_CALL drawGradient( ::sal_Int32 nX, ::sal_Int32 nY, ::sal_Int32 nWidth, ::sal_Int32 Height, const css::awt::Gradient& aGradient ) override;
+ virtual void SAL_CALL drawText( ::sal_Int32 X, ::sal_Int32 Y, const OUString& Text ) override;
+ virtual void SAL_CALL drawTextArray( ::sal_Int32 X, ::sal_Int32 Y, const OUString& Text, const css::uno::Sequence< ::sal_Int32 >& Longs ) override;
+ virtual void SAL_CALL drawImage( ::sal_Int32 nX, ::sal_Int32 nY, ::sal_Int32 nWidth, ::sal_Int32 nHeight, ::sal_Int16 nStyle, const css::uno::Reference< css::graphic::XGraphic >& aGraphic ) override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/awt/vclxpointer.hxx b/toolkit/inc/awt/vclxpointer.hxx
new file mode 100644
index 000000000..3bfcceeab
--- /dev/null
+++ b/toolkit/inc/awt/vclxpointer.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+
+#include <com/sun/star/awt/XPointer.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <mutex>
+
+#include <vcl/ptrstyle.hxx>
+
+
+
+
+class VCLXPointer final : public cppu::WeakImplHelper<
+ css::awt::XPointer, css::lang::XUnoTunnel, css::lang::XServiceInfo>
+{
+ std::mutex maMutex;
+ PointerStyle maPointer;
+
+public:
+ VCLXPointer();
+ virtual ~VCLXPointer() override;
+
+ PointerStyle GetPointer() const { return maPointer; }
+
+ // css::lang::XUnoTunnel
+ UNO3_GETIMPLEMENTATION_DECL(VCLXPointer)
+
+ // css::awt::XPointer
+ void SAL_CALL setType( sal_Int32 nType ) override;
+ sal_Int32 SAL_CALL getType( ) override;
+
+ OUString SAL_CALL getImplementationName() override;
+
+ sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
+
+ css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+};
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/awt/vclxprinter.hxx b/toolkit/inc/awt/vclxprinter.hxx
new file mode 100644
index 000000000..41a74044b
--- /dev/null
+++ b/toolkit/inc/awt/vclxprinter.hxx
@@ -0,0 +1,194 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+
+#include <com/sun/star/awt/XPrinterPropertySet.hpp>
+#include <com/sun/star/awt/XPrinterServer2.hpp>
+#include <com/sun/star/awt/XInfoPrinter.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
+#include <toolkit/helper/mutexandbroadcasthelper.hxx>
+#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <comphelper/uno3.hxx>
+#include <vcl/vclptr.hxx>
+#include <vcl/jobset.hxx>
+
+#include <memory>
+
+namespace com::sun::star::awt { class XPrinter; }
+namespace vcl { class OldStylePrintAdaptor; }
+class Printer;
+
+// relevant properties for the printer:
+/*
+ sal_Bool Horizontal
+ sal_uInt16 CopyCount;
+ sal_Bool Collate;
+ String FormDescriptor;
+ sal_uInt16 Orientation; // PORTRAIT, LANDSCAPE
+*/
+
+
+
+
+typedef ::cppu::WeakImplHelper < css::awt::XPrinterPropertySet
+ > VCLXPrinterPropertySet_Base;
+class VCLXPrinterPropertySet :public VCLXPrinterPropertySet_Base
+ ,public MutexAndBroadcastHelper
+ ,public ::cppu::OPropertySetHelper
+{
+protected:
+ VclPtr<Printer> mxPrinter;
+ css::uno::Reference< css::awt::XDevice > mxPrnDevice;
+
+ sal_Int16 mnOrientation;
+ bool mbHorizontal;
+public:
+ VCLXPrinterPropertySet( const OUString& rPrinterName );
+ virtual ~VCLXPrinterPropertySet() override;
+
+ Printer* GetPrinter() const { return mxPrinter.get(); }
+ css::uno::Reference< css::awt::XDevice > const & GetDevice();
+
+ // css::uno::XInterface
+ DECLARE_XINTERFACE();
+
+ // css::lang::XTypeProvider
+ DECLARE_XTYPEPROVIDER();
+
+ // css::beans::XPropertySet
+ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
+ void SAL_CALL setPropertyValue( const OUString& rPropertyName, const css::uno::Any& aValue ) override { OPropertySetHelper::setPropertyValue( rPropertyName, aValue ); }
+ css::uno::Any SAL_CALL getPropertyValue( const OUString& rPropertyName ) override { return OPropertySetHelper::getPropertyValue( rPropertyName ); }
+ void SAL_CALL addPropertyChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& rxListener ) override { OPropertySetHelper::addPropertyChangeListener( rPropertyName, rxListener ); }
+ void SAL_CALL removePropertyChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& rxListener ) override { OPropertySetHelper::removePropertyChangeListener( rPropertyName, rxListener ); }
+ void SAL_CALL addVetoableChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& rxListener ) override { OPropertySetHelper::addVetoableChangeListener( rPropertyName, rxListener ); }
+ void SAL_CALL removeVetoableChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& rxListener ) override { OPropertySetHelper::removeVetoableChangeListener( rPropertyName, rxListener ); }
+
+ // ::cppu::OPropertySetHelper
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
+ sal_Bool SAL_CALL convertFastPropertyValue( css::uno::Any & rConvertedValue, css::uno::Any & rOldValue, sal_Int32 nHandle, const css::uno::Any& rValue ) override;
+ void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue ) override;
+ using cppu::OPropertySetHelper::getFastPropertyValue;
+ void SAL_CALL getFastPropertyValue( css::uno::Any& rValue, sal_Int32 nHandle ) const override;
+
+ // css::awt::XPrinterPropertySet
+ void SAL_CALL setHorizontal( sal_Bool bHorizontal ) override;
+ css::uno::Sequence< OUString > SAL_CALL getFormDescriptions( ) override;
+ void SAL_CALL selectForm( const OUString& aFormDescription ) override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getBinarySetup( ) override;
+ void SAL_CALL setBinarySetup( const css::uno::Sequence< sal_Int8 >& data ) override;
+};
+
+
+
+
+typedef ::cppu::ImplInheritanceHelper < VCLXPrinterPropertySet
+ , css::awt::XPrinter
+ > VCLXPrinter_Base;
+class VCLXPrinter final : public VCLXPrinter_Base
+{
+ std::shared_ptr<vcl::OldStylePrintAdaptor> mxListener;
+ JobSetup maInitJobSetup;
+public:
+ VCLXPrinter( const OUString& rPrinterName );
+ virtual ~VCLXPrinter() override;
+
+ // css::beans::XPropertySet
+ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override { return VCLXPrinterPropertySet::getPropertySetInfo(); }
+ void SAL_CALL setPropertyValue( const OUString& rPropertyName, const css::uno::Any& aValue ) override { VCLXPrinterPropertySet::setPropertyValue( rPropertyName, aValue ); }
+ css::uno::Any SAL_CALL getPropertyValue( const OUString& rPropertyName ) override { return VCLXPrinterPropertySet::getPropertyValue( rPropertyName ); }
+ void SAL_CALL addPropertyChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& rxListener ) override { VCLXPrinterPropertySet::addPropertyChangeListener( rPropertyName, rxListener ); }
+ void SAL_CALL removePropertyChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& rxListener ) override { VCLXPrinterPropertySet::removePropertyChangeListener( rPropertyName, rxListener ); }
+ void SAL_CALL addVetoableChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& rxListener ) override { VCLXPrinterPropertySet::addVetoableChangeListener( rPropertyName, rxListener ); }
+ void SAL_CALL removeVetoableChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& rxListener ) override { VCLXPrinterPropertySet::removeVetoableChangeListener( rPropertyName, rxListener ); }
+
+ // css::awt::XPrinterPropertySet
+ void SAL_CALL setHorizontal( sal_Bool bHorizontal ) override { VCLXPrinterPropertySet::setHorizontal( bHorizontal ); }
+ css::uno::Sequence< OUString > SAL_CALL getFormDescriptions( ) override { return VCLXPrinterPropertySet::getFormDescriptions(); }
+ void SAL_CALL selectForm( const OUString& aFormDescription ) override { VCLXPrinterPropertySet::selectForm( aFormDescription ); }
+ css::uno::Sequence< sal_Int8 > SAL_CALL getBinarySetup( ) override { return VCLXPrinterPropertySet::getBinarySetup(); }
+ void SAL_CALL setBinarySetup( const css::uno::Sequence< sal_Int8 >& data ) override { VCLXPrinterPropertySet::setBinarySetup( data ); }
+
+ // css::awt::XPrinter
+ sal_Bool SAL_CALL start( const OUString& nJobName, sal_Int16 nCopies, sal_Bool nCollate ) override;
+ void SAL_CALL end( ) override;
+ void SAL_CALL terminate( ) override;
+ css::uno::Reference< css::awt::XDevice > SAL_CALL startPage( ) override;
+ void SAL_CALL endPage( ) override;
+};
+
+
+
+
+typedef ::cppu::ImplInheritanceHelper < VCLXPrinterPropertySet
+ , css::awt::XInfoPrinter
+ > VCLXInfoPrinter_Base;
+class VCLXInfoPrinter final : public VCLXInfoPrinter_Base
+{
+public:
+ VCLXInfoPrinter( const OUString& rPrinterName );
+ virtual ~VCLXInfoPrinter() override;
+
+ // css::beans::XPropertySet
+ css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override { return VCLXPrinterPropertySet::getPropertySetInfo(); }
+ void SAL_CALL setPropertyValue( const OUString& rPropertyName, const css::uno::Any& aValue ) override { VCLXPrinterPropertySet::setPropertyValue( rPropertyName, aValue ); }
+ css::uno::Any SAL_CALL getPropertyValue( const OUString& rPropertyName ) override { return VCLXPrinterPropertySet::getPropertyValue( rPropertyName ); }
+ void SAL_CALL addPropertyChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& rxListener ) override { VCLXPrinterPropertySet::addPropertyChangeListener( rPropertyName, rxListener ); }
+ void SAL_CALL removePropertyChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& rxListener ) override { VCLXPrinterPropertySet::removePropertyChangeListener( rPropertyName, rxListener ); }
+ void SAL_CALL addVetoableChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& rxListener ) override { VCLXPrinterPropertySet::addVetoableChangeListener( rPropertyName, rxListener ); }
+ void SAL_CALL removeVetoableChangeListener( const OUString& rPropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& rxListener ) override { VCLXPrinterPropertySet::removeVetoableChangeListener( rPropertyName, rxListener ); }
+
+ // css::awt::XPrinterPropertySet
+ void SAL_CALL setHorizontal( sal_Bool bHorizontal ) override { VCLXPrinterPropertySet::setHorizontal( bHorizontal ); }
+ css::uno::Sequence< OUString > SAL_CALL getFormDescriptions( ) override { return VCLXPrinterPropertySet::getFormDescriptions(); }
+ void SAL_CALL selectForm( const OUString& aFormDescription ) override { VCLXPrinterPropertySet::selectForm( aFormDescription ); }
+ css::uno::Sequence< sal_Int8 > SAL_CALL getBinarySetup( ) override { return VCLXPrinterPropertySet::getBinarySetup(); }
+ void SAL_CALL setBinarySetup( const css::uno::Sequence< sal_Int8 >& data ) override { VCLXPrinterPropertySet::setBinarySetup( data ); }
+
+ // css::awt::XInfoPrinter
+ css::uno::Reference< css::awt::XDevice > SAL_CALL createDevice( ) override;
+};
+
+
+
+
+typedef ::cppu::WeakImplHelper < css::awt::XPrinterServer2,
+ css::lang::XServiceInfo
+ > VCLXPrinterServer_Base;
+class VCLXPrinterServer final : public VCLXPrinterServer_Base
+{
+public:
+ // css::awt::XPrinterServer2
+ css::uno::Sequence< OUString > SAL_CALL getPrinterNames( ) override;
+ OUString SAL_CALL getDefaultPrinterName() override;
+ css::uno::Reference< css::awt::XPrinter > SAL_CALL createPrinter( const OUString& printerName ) override;
+ css::uno::Reference< css::awt::XInfoPrinter > SAL_CALL createInfoPrinter( const OUString& printerName ) override;
+
+ OUString SAL_CALL getImplementationName() override;
+
+ sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
+
+ css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/awt/vclxregion.hxx b/toolkit/inc/awt/vclxregion.hxx
new file mode 100644
index 000000000..70b79990c
--- /dev/null
+++ b/toolkit/inc/awt/vclxregion.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+
+#include <com/sun/star/awt/XRegion.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <comphelper/servicehelper.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <mutex>
+
+#include <vcl/region.hxx>
+
+
+
+
+class VCLXRegion final : public cppu::WeakImplHelper<
+ css::awt::XRegion,
+ css::lang::XUnoTunnel>
+{
+ std::mutex maMutex;
+ vcl::Region maRegion;
+
+public:
+ VCLXRegion();
+ virtual ~VCLXRegion() override;
+
+ const vcl::Region& GetRegion() const { return maRegion; }
+
+ // css::lang::XUnoTunnel
+ UNO3_GETIMPLEMENTATION_DECL(VCLXRegion)
+
+ // css::awt::XRegion
+ css::awt::Rectangle SAL_CALL getBounds() override;
+ void SAL_CALL clear() override;
+ void SAL_CALL move( sal_Int32 nHorzMove, sal_Int32 nVertMove ) override;
+ void SAL_CALL unionRectangle( const css::awt::Rectangle& rRect ) override;
+ void SAL_CALL intersectRectangle( const css::awt::Rectangle& rRect ) override;
+ void SAL_CALL excludeRectangle( const css::awt::Rectangle& rRect ) override;
+ void SAL_CALL xOrRectangle( const css::awt::Rectangle& rRect ) override;
+ void SAL_CALL unionRegion( const css::uno::Reference< css::awt::XRegion >& rxRegion ) override;
+ void SAL_CALL intersectRegion( const css::uno::Reference< css::awt::XRegion >& rxRegion ) override;
+ void SAL_CALL excludeRegion( const css::uno::Reference< css::awt::XRegion >& rxRegion ) override;
+ void SAL_CALL xOrRegion( const css::uno::Reference< css::awt::XRegion >& rxRegion ) override;
+ css::uno::Sequence< css::awt::Rectangle > SAL_CALL getRectangles() override;
+
+};
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/awt/vclxspinbutton.hxx b/toolkit/inc/awt/vclxspinbutton.hxx
new file mode 100644
index 000000000..acd7a6898
--- /dev/null
+++ b/toolkit/inc/awt/vclxspinbutton.hxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#pragma once
+
+#include <toolkit/awt/vclxwindow.hxx>
+#include <toolkit/helper/listenermultiplexer.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <comphelper/uno3.hxx>
+#include <com/sun/star/awt/XSpinValue.hpp>
+
+
+namespace toolkit
+{
+
+
+ //= VCLXSpinButton
+
+ typedef ::cppu::ImplHelper1 < css::awt::XSpinValue
+ > VCLXSpinButton_Base;
+
+ class VCLXSpinButton final : public VCLXWindow
+ ,public VCLXSpinButton_Base
+ {
+ private:
+ AdjustmentListenerMultiplexer maAdjustmentListeners;
+
+ public:
+ VCLXSpinButton();
+
+ private:
+ virtual ~VCLXSpinButton( ) override;
+
+ // XInterface
+ DECLARE_XINTERFACE()
+
+ // XTypeProvider
+ DECLARE_XTYPEPROVIDER()
+
+ // XComponent
+ void SAL_CALL dispose( ) override;
+
+ // XSpinValue
+ virtual void SAL_CALL addAdjustmentListener( const css::uno::Reference< css::awt::XAdjustmentListener >& listener ) override;
+ virtual void SAL_CALL removeAdjustmentListener( const css::uno::Reference< css::awt::XAdjustmentListener >& listener ) override;
+ virtual void SAL_CALL setValue( sal_Int32 n ) override;
+ virtual void SAL_CALL setValues( sal_Int32 minValue, sal_Int32 maxValue, sal_Int32 currentValue ) override;
+ virtual sal_Int32 SAL_CALL getValue( ) override;
+ virtual void SAL_CALL setMinimum( sal_Int32 minValue ) override;
+ virtual void SAL_CALL setMaximum( sal_Int32 maxValue ) override;
+ virtual sal_Int32 SAL_CALL getMinimum( ) override;
+ virtual sal_Int32 SAL_CALL getMaximum( ) override;
+ virtual void SAL_CALL setSpinIncrement( sal_Int32 spinIncrement ) override;
+ virtual sal_Int32 SAL_CALL getSpinIncrement( ) override;
+ virtual void SAL_CALL setOrientation( sal_Int32 orientation ) override;
+ virtual sal_Int32 SAL_CALL getOrientation( ) override;
+
+ // VclWindowPeer
+ virtual void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ virtual css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ // VCLXWindow
+ void ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent ) override;
+
+ VCLXSpinButton( const VCLXSpinButton& ) = delete;
+ VCLXSpinButton& operator=( const VCLXSpinButton& ) = delete;
+ };
+
+
+} // namespacetoolkit
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/awt/vclxsystemdependentwindow.hxx b/toolkit/inc/awt/vclxsystemdependentwindow.hxx
new file mode 100644
index 000000000..4bab43c49
--- /dev/null
+++ b/toolkit/inc/awt/vclxsystemdependentwindow.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+
+#include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
+#include <cppuhelper/weak.hxx>
+
+#include <toolkit/awt/vclxwindow.hxx>
+
+class VCLXSystemDependentWindow final : public css::awt::XSystemDependentWindowPeer,
+ public VCLXWindow
+{
+public:
+ VCLXSystemDependentWindow();
+ virtual ~VCLXSystemDependentWindow() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XSystemDependentWindowPeer
+ css::uno::Any SAL_CALL getWindowHandle( const css::uno::Sequence< sal_Int8 >& ProcessId, sal_Int16 SystemType ) override;
+};
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/awt/vclxtabpagecontainer.hxx b/toolkit/inc/awt/vclxtabpagecontainer.hxx
new file mode 100644
index 000000000..e300e03af
--- /dev/null
+++ b/toolkit/inc/awt/vclxtabpagecontainer.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/container/XContainerListener.hpp>
+#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#include <com/sun/star/awt/tab/XTabPageContainer.hpp>
+#include <cppuhelper/implbase.hxx>
+#include <toolkit/helper/listenermultiplexer.hxx>
+#include <awt/vclxcontainer.hxx>
+
+
+typedef cppu::ImplInheritanceHelper< VCLXContainer,
+ css::awt::tab::XTabPageContainer,
+ css::beans::XPropertiesChangeListener,
+ css::container::XContainerListener
+ > VCLXTabPageContainer_Base;
+class VCLXTabPageContainer final : public VCLXTabPageContainer_Base
+{
+public:
+ VCLXTabPageContainer();
+ virtual ~VCLXTabPageContainer() override;
+
+ // css::awt::XView
+ void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) override;
+
+ // css::awt::grid::XTabPageContainer
+ virtual ::sal_Int16 SAL_CALL getActiveTabPageID() override;
+ virtual void SAL_CALL setActiveTabPageID( ::sal_Int16 _activetabpageid ) override;
+ virtual ::sal_Int16 SAL_CALL getTabPageCount( ) override;
+ virtual sal_Bool SAL_CALL isTabPageActive( ::sal_Int16 tabPageIndex ) override;
+ virtual css::uno::Reference< css::awt::tab::XTabPage > SAL_CALL getTabPage( ::sal_Int16 tabPageIndex ) override;
+ virtual css::uno::Reference< css::awt::tab::XTabPage > SAL_CALL getTabPageByID( ::sal_Int16 tabPageID ) override;
+ virtual void SAL_CALL addTabPageContainerListener( const css::uno::Reference< css::awt::tab::XTabPageContainerListener >& listener ) override;
+ virtual void SAL_CALL removeTabPageContainerListener( const css::uno::Reference< css::awt::tab::XTabPageContainerListener >& listener ) override;
+
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override;
+
+ virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
+ virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
+ virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) override;
+ virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) override;
+
+ // css::beans::XPropertiesChangeListener
+ virtual void SAL_CALL propertiesChange( const ::css::uno::Sequence< ::css::beans::PropertyChangeEvent >& aEvent ) override;
+
+ // css::awt::XVclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+private:
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
+
+ TabPageListenerMultiplexer m_aTabPageListeners;
+ ::std::vector< css::uno::Reference< css::awt::tab::XTabPage > > m_aTabPages;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/awt/vclxtopwindow.hxx b/toolkit/inc/awt/vclxtopwindow.hxx
new file mode 100644
index 000000000..ad07c2780
--- /dev/null
+++ b/toolkit/inc/awt/vclxtopwindow.hxx
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_TOOLKIT_AWT_VCLXTOPWINDOW_HXX
+#define INCLUDED_TOOLKIT_AWT_VCLXTOPWINDOW_HXX
+
+#include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
+#include <com/sun/star/awt/XTopWindow2.hpp>
+#include <cppuhelper/weak.hxx>
+
+#include <cppuhelper/implbase2.hxx>
+
+#include <awt/vclxcontainer.hxx>
+
+namespace com::sun::star::awt { class XMenuBar; }
+
+typedef ::cppu::ImplHelper2 < css::awt::XTopWindow2, css::awt::XSystemDependentWindowPeer
+ > VCLXTopWindow_XBase;
+
+
+class VCLXTopWindow: public VCLXTopWindow_XBase,
+ public VCLXContainer
+{
+public:
+ VCLXTopWindow();
+ virtual ~VCLXTopWindow() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XSystemDependentWindowPeer
+ css::uno::Any SAL_CALL getWindowHandle( const css::uno::Sequence< sal_Int8 >& ProcessId, sal_Int16 SystemType ) override;
+
+ // css::awt::XTopWindow
+ void SAL_CALL addTopWindowListener( const css::uno::Reference< css::awt::XTopWindowListener >& rxListener ) override;
+ void SAL_CALL removeTopWindowListener( const css::uno::Reference< css::awt::XTopWindowListener >& rxListener ) override;
+ void SAL_CALL toFront() override;
+ void SAL_CALL toBack() override;
+ void SAL_CALL setMenuBar( const css::uno::Reference< css::awt::XMenuBar >& xMenu ) override;
+
+ // XTopWindow2
+ virtual sal_Bool SAL_CALL getIsMaximized() override;
+ virtual void SAL_CALL setIsMaximized( sal_Bool _ismaximized ) override;
+ virtual sal_Bool SAL_CALL getIsMinimized() override;
+ virtual void SAL_CALL setIsMinimized( sal_Bool _isminimized ) override;
+ virtual ::sal_Int32 SAL_CALL getDisplay() override;
+ virtual void SAL_CALL setDisplay( ::sal_Int32 _display ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+
+#endif // INCLUDED_TOOLKIT_AWT_VCLXTOPWINDOW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/inc/awt/vclxwindows.hxx b/toolkit/inc/awt/vclxwindows.hxx
new file mode 100644
index 000000000..21950271e
--- /dev/null
+++ b/toolkit/inc/awt/vclxwindows.hxx
@@ -0,0 +1,697 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <com/sun/star/awt/XCurrencyField.hpp>
+#include <com/sun/star/awt/XDateField.hpp>
+#include <com/sun/star/awt/XDialog2.hpp>
+#include <com/sun/star/awt/XMessageBox.hpp>
+#include <com/sun/star/awt/XMetricField.hpp>
+#include <com/sun/star/awt/XNumericField.hpp>
+#include <com/sun/star/awt/XPatternField.hpp>
+#include <com/sun/star/awt/XProgressBar.hpp>
+#include <com/sun/star/awt/XSimpleTabController.hpp>
+#include <com/sun/star/awt/XTextArea.hpp>
+#include <com/sun/star/awt/XTimeField.hpp>
+#include <com/sun/star/util/Time.hpp>
+#include <com/sun/star/util/Date.hpp>
+
+#include <tools/lineend.hxx>
+
+#include <awt/vclxtopwindow.hxx>
+#include <toolkit/awt/vclxwindows.hxx>
+
+class FormatterBase;
+class TabControl;
+class TabPage;
+class Edit;
+
+// class VCLXImageControl
+class VCLXImageControl final : public VCLXGraphicControl
+{
+public:
+ VCLXImageControl();
+ virtual ~VCLXImageControl() override;
+
+ // css::awt::XLayoutConstrains
+ css::awt::Size SAL_CALL getMinimumSize( ) override;
+ css::awt::Size SAL_CALL getPreferredSize( ) override;
+ css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& rNewSize ) override;
+
+ // css::awt::VclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+
+private:
+ virtual void ImplSetNewImage() override;
+};
+
+// class VCLXMessageBox
+class VCLXMessageBox final : public css::awt::XMessageBox,
+ public VCLXTopWindow
+{
+public:
+ VCLXMessageBox();
+ virtual ~VCLXMessageBox() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+
+ // css::awt::XMessageBox
+ void SAL_CALL setCaptionText( const OUString& aText ) override;
+ OUString SAL_CALL getCaptionText( ) override;
+ void SAL_CALL setMessageText( const OUString& aText ) override;
+ OUString SAL_CALL getMessageText( ) override;
+ sal_Int16 SAL_CALL execute( ) override;
+
+ // css::awt::XLayoutConstrains
+ css::awt::Size SAL_CALL getMinimumSize() override;
+
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override;
+};
+
+// class VCLXFrame
+class VCLXFrame final : public VCLXContainer
+{
+ void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
+
+public:
+ VCLXFrame();
+ virtual ~VCLXFrame() override;
+
+ // css::uno::XInterface
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XView
+ void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) override;
+
+ // css::awt::XVclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+// class VCLXDialog
+class VCLXDialog final : public css::awt::XDialog2,
+ public VCLXTopWindow
+{
+public:
+ VCLXDialog();
+ virtual ~VCLXDialog() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XDialog2
+ virtual void SAL_CALL endDialog( ::sal_Int32 Result ) override;
+ virtual void SAL_CALL setHelpId( const OUString& Id ) override;
+
+ // css::awt::XDialog
+ void SAL_CALL setTitle( const OUString& Title ) override;
+ OUString SAL_CALL getTitle( ) override;
+ sal_Int16 SAL_CALL execute( ) override;
+ void SAL_CALL endExecute( ) override;
+
+ // css::awt::XView
+ void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) override;
+
+ // css::awt::XDevice,
+ css::awt::DeviceInfo SAL_CALL getInfo() override;
+
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override;
+
+ // css::awt::XVclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+
+};
+
+// class VCLXTabPage
+class VCLXTabPage final : public VCLXContainer
+{
+public:
+ VCLXTabPage();
+ virtual ~VCLXTabPage() override;
+
+ // css::uno::XInterface
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XView
+ void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) override;
+
+ // css::awt::XVclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+
+ /// @throws css::uno::RuntimeException
+ TabPage* getTabPage() const;
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+class VCLXMultiPage final : public css::awt::XSimpleTabController, public VCLXContainer
+{
+ TabListenerMultiplexer maTabListeners;
+ sal_Int32 mTabId;
+
+ void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
+public:
+ VCLXMultiPage();
+ virtual ~VCLXMultiPage() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::lang::XComponent
+ void SAL_CALL dispose( ) override;
+
+ // css::awt::XView
+ void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) override;
+
+ // css::awt::XVclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+ // XSimpleTabController
+ virtual ::sal_Int32 SAL_CALL insertTab() override;
+ virtual void SAL_CALL removeTab( ::sal_Int32 ID ) override;
+
+ virtual void SAL_CALL setTabProps( ::sal_Int32 ID, const css::uno::Sequence< css::beans::NamedValue >& Properties ) override;
+ virtual css::uno::Sequence< css::beans::NamedValue > SAL_CALL getTabProps( ::sal_Int32 ID ) override;
+
+ virtual void SAL_CALL activateTab( ::sal_Int32 ID ) override;
+ virtual ::sal_Int32 SAL_CALL getActiveTabID() override;
+
+ virtual void SAL_CALL addTabListener( const css::uno::Reference< css::awt::XTabListener >& Listener ) override;
+ virtual void SAL_CALL removeTabListener( const css::uno::Reference< css::awt::XTabListener >& Listener ) override;
+ // C++
+ /// @throws css::uno::RuntimeException
+ TabControl* getTabControl() const;
+ sal_uInt16 insertTab( TabPage*, OUString const & sTitle );
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+class VCLXMultiLineEdit final : public css::awt::XTextComponent,
+ public css::awt::XTextArea,
+ public css::awt::XTextLayoutConstrains,
+ public VCLXWindow
+{
+private:
+ TextListenerMultiplexer maTextListeners;
+ LineEnd meLineEndType;
+
+ void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
+
+public:
+ VCLXMultiLineEdit();
+ virtual ~VCLXMultiLineEdit() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { VCLXWindow::acquire(); }
+ void SAL_CALL release() noexcept override { VCLXWindow::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XTextComponent
+ void SAL_CALL addTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) override;
+ void SAL_CALL removeTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) override;
+ void SAL_CALL setText( const OUString& aText ) override;
+ void SAL_CALL insertText( const css::awt::Selection& Sel, const OUString& Text ) override;
+ OUString SAL_CALL getText( ) override;
+ OUString SAL_CALL getSelectedText( ) override;
+ void SAL_CALL setSelection( const css::awt::Selection& aSelection ) override;
+ css::awt::Selection SAL_CALL getSelection( ) override;
+ sal_Bool SAL_CALL isEditable( ) override;
+ void SAL_CALL setEditable( sal_Bool bEditable ) override;
+ void SAL_CALL setMaxTextLen( sal_Int16 nLen ) override;
+ sal_Int16 SAL_CALL getMaxTextLen( ) override;
+
+ //XTextArea
+ OUString SAL_CALL getTextLines( ) override;
+
+ // css::awt::XLayoutConstrains
+ css::awt::Size SAL_CALL getMinimumSize( ) override;
+ css::awt::Size SAL_CALL getPreferredSize( ) override;
+ css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& aNewSize ) override;
+
+ // css::awt::XTextLayoutConstrains
+ css::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) override;
+ void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) override;
+
+ // css::awt::XVclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ // css::awt::XWindow
+ void SAL_CALL setFocus( ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+// class VCLXProgressBar
+class VCLXProgressBar final : public css::awt::XProgressBar
+ , public VCLXWindow
+{
+private:
+ sal_Int32 m_nValue;
+ sal_Int32 m_nValueMin;
+ sal_Int32 m_nValueMax;
+
+ void ImplUpdateValue();
+
+public:
+ VCLXProgressBar();
+ virtual ~VCLXProgressBar() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { VCLXWindow::acquire(); }
+ void SAL_CALL release() noexcept override { VCLXWindow::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XProgressBar
+ void SAL_CALL setForegroundColor( sal_Int32 nColor ) override;
+ void SAL_CALL setBackgroundColor( sal_Int32 nColor ) override;
+ void SAL_CALL setValue( sal_Int32 nValue ) override;
+ void SAL_CALL setRange( sal_Int32 nMin, sal_Int32 nMax ) override;
+ sal_Int32 SAL_CALL getValue() override;
+
+ // css::awt::VclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+
+// class VCLXFormattedSpinField
+class VCLXFormattedSpinField : public VCLXSpinField
+{
+private:
+ FormatterBase* mpFormatter;
+
+protected:
+ FormatterBase* GetFormatter() const { return GetWindow() ? mpFormatter : nullptr; }
+
+public:
+ VCLXFormattedSpinField();
+ virtual ~VCLXFormattedSpinField() override;
+
+ void SetFormatter( FormatterBase* pFormatter ) { mpFormatter = pFormatter; }
+
+ void setStrictFormat( bool bStrict );
+ bool isStrictFormat() const;
+
+ // css::awt::VclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+
+// class VCLXDateField
+
+class VCLXDateField : public css::awt::XDateField,
+ public VCLXFormattedSpinField
+{
+protected:
+ virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
+public:
+ VCLXDateField();
+ virtual ~VCLXDateField() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+
+ // css::awt::XDateField
+ void SAL_CALL setDate( const css::util::Date& Date ) override;
+ css::util::Date SAL_CALL getDate( ) override;
+ void SAL_CALL setMin( const css::util::Date& Date ) override;
+ css::util::Date SAL_CALL getMin( ) override;
+ void SAL_CALL setMax( const css::util::Date& Date ) override;
+ css::util::Date SAL_CALL getMax( ) override;
+ void SAL_CALL setFirst( const css::util::Date& Date ) override;
+ css::util::Date SAL_CALL getFirst( ) override;
+ void SAL_CALL setLast( const css::util::Date& Date ) override;
+ css::util::Date SAL_CALL getLast( ) override;
+ void SAL_CALL setLongFormat( sal_Bool bLong ) override;
+ sal_Bool SAL_CALL isLongFormat( ) override;
+ void SAL_CALL setEmpty( ) override;
+ sal_Bool SAL_CALL isEmpty( ) override;
+ void SAL_CALL setStrictFormat( sal_Bool bStrict ) override;
+ sal_Bool SAL_CALL isStrictFormat( ) override;
+
+ // css::awt::VclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+
+// class VCLXTimeField
+
+class VCLXTimeField final : public css::awt::XTimeField,
+ public VCLXFormattedSpinField
+{
+ virtual css::uno::Reference< css::accessibility::XAccessibleContext > CreateAccessibleContext() override;
+public:
+ VCLXTimeField();
+ virtual ~VCLXTimeField() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XTimeField
+ void SAL_CALL setTime( const css::util::Time& Time ) override;
+ css::util::Time SAL_CALL getTime( ) override;
+ void SAL_CALL setMin( const css::util::Time& Time ) override;
+ css::util::Time SAL_CALL getMin( ) override;
+ void SAL_CALL setMax( const css::util::Time& Time ) override;
+ css::util::Time SAL_CALL getMax( ) override;
+ void SAL_CALL setFirst( const css::util::Time& Time ) override;
+ css::util::Time SAL_CALL getFirst( ) override;
+ void SAL_CALL setLast( const css::util::Time& Time ) override;
+ css::util::Time SAL_CALL getLast( ) override;
+ void SAL_CALL setEmpty( ) override;
+ sal_Bool SAL_CALL isEmpty( ) override;
+ void SAL_CALL setStrictFormat( sal_Bool bStrict ) override;
+ sal_Bool SAL_CALL isStrictFormat( ) override;
+
+ // css::awt::VclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+
+// class VCLXNumericField
+
+class VCLXNumericField final : public css::awt::XNumericField,
+ public VCLXFormattedSpinField
+{
+public:
+ VCLXNumericField();
+ virtual ~VCLXNumericField() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XNumericField
+ void SAL_CALL setValue( double Value ) override;
+ double SAL_CALL getValue( ) override;
+ void SAL_CALL setMin( double Value ) override;
+ double SAL_CALL getMin( ) override;
+ void SAL_CALL setMax( double Value ) override;
+ double SAL_CALL getMax( ) override;
+ void SAL_CALL setFirst( double Value ) override;
+ double SAL_CALL getFirst( ) override;
+ void SAL_CALL setLast( double Value ) override;
+ double SAL_CALL getLast( ) override;
+ void SAL_CALL setSpinSize( double Value ) override;
+ double SAL_CALL getSpinSize( ) override;
+ void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) override;
+ sal_Int16 SAL_CALL getDecimalDigits( ) override;
+ void SAL_CALL setStrictFormat( sal_Bool bStrict ) override;
+ sal_Bool SAL_CALL isStrictFormat( ) override;
+
+ // css::awt::VclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+
+// class VCLXMetricField
+
+class MetricFormatter;
+class MetricField;
+class VCLXMetricField final : public css::awt::XMetricField,
+ public VCLXFormattedSpinField
+{
+ /// @throws css::uno::RuntimeException
+ MetricFormatter *GetMetricFormatter();
+ /// @throws css::uno::RuntimeException
+ MetricField *GetMetricField();
+ void CallListeners();
+public:
+ VCLXMetricField();
+ virtual ~VCLXMetricField() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XMetricField
+ virtual void SAL_CALL setValue( ::sal_Int64 Value, ::sal_Int16 Unit ) override;
+ virtual void SAL_CALL setUserValue( ::sal_Int64 Value, ::sal_Int16 Unit ) override;
+ virtual ::sal_Int64 SAL_CALL getValue( ::sal_Int16 Unit ) override;
+ virtual ::sal_Int64 SAL_CALL getCorrectedValue( ::sal_Int16 Unit ) override;
+ virtual void SAL_CALL setMin( ::sal_Int64 Value, ::sal_Int16 Unit ) override;
+ virtual ::sal_Int64 SAL_CALL getMin( ::sal_Int16 Unit ) override;
+ virtual void SAL_CALL setMax( ::sal_Int64 Value, ::sal_Int16 Unit ) override;
+ virtual ::sal_Int64 SAL_CALL getMax( ::sal_Int16 Unit ) override;
+ virtual void SAL_CALL setFirst( ::sal_Int64 Value, ::sal_Int16 Unit ) override;
+ virtual ::sal_Int64 SAL_CALL getFirst( ::sal_Int16 Unit ) override;
+ virtual void SAL_CALL setLast( ::sal_Int64 Value, ::sal_Int16 Unit ) override;
+ virtual ::sal_Int64 SAL_CALL getLast( ::sal_Int16 Unit ) override;
+ virtual void SAL_CALL setSpinSize( ::sal_Int64 Value ) override;
+ virtual ::sal_Int64 SAL_CALL getSpinSize( ) override;
+ virtual void SAL_CALL setDecimalDigits( ::sal_Int16 nDigits ) override;
+ virtual ::sal_Int16 SAL_CALL getDecimalDigits( ) override;
+ virtual void SAL_CALL setStrictFormat( sal_Bool bStrict ) override;
+ virtual sal_Bool SAL_CALL isStrictFormat( ) override;
+
+ // css::awt::VclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+// class VCLXPatternField
+class VCLXPatternField final : public css::awt::XPatternField,
+ public VCLXFormattedSpinField
+{
+public:
+ VCLXPatternField();
+ virtual ~VCLXPatternField() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { OWeakObject::acquire(); }
+ void SAL_CALL release() noexcept override { OWeakObject::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+
+ // css::awt::XPatternField
+ void SAL_CALL setMasks( const OUString& EditMask, const OUString& LiteralMask ) override;
+ void SAL_CALL getMasks( OUString& EditMask, OUString& LiteralMask ) override;
+ void SAL_CALL setString( const OUString& Str ) override;
+ OUString SAL_CALL getString( ) override;
+ void SAL_CALL setStrictFormat( sal_Bool bStrict ) override;
+ sal_Bool SAL_CALL isStrictFormat( ) override;
+
+ // css::awt::VclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+
+class VCLXFileControl final : public css::awt::XTextComponent, public css::awt::XTextLayoutConstrains, public VCLXWindow
+{
+ DECL_LINK(ModifyHdl, Edit&, void);
+ void ModifyHdl();
+ TextListenerMultiplexer maTextListeners;
+
+public:
+ VCLXFileControl();
+ virtual ~VCLXFileControl() override;
+
+ virtual void SetWindow( const VclPtr< vcl::Window > &pWindow ) override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { VCLXWindow::acquire(); }
+ void SAL_CALL release() noexcept override { VCLXWindow::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XTextComponent
+ void SAL_CALL addTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) override;
+ void SAL_CALL removeTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) override;
+ void SAL_CALL setText( const OUString& aText ) override;
+ void SAL_CALL insertText( const css::awt::Selection& Sel, const OUString& Text ) override;
+ OUString SAL_CALL getText( ) override;
+ OUString SAL_CALL getSelectedText( ) override;
+ void SAL_CALL setSelection( const css::awt::Selection& aSelection ) override;
+ css::awt::Selection SAL_CALL getSelection( ) override;
+ sal_Bool SAL_CALL isEditable( ) override;
+ void SAL_CALL setEditable( sal_Bool bEditable ) override;
+ void SAL_CALL setMaxTextLen( sal_Int16 nLen ) override;
+ sal_Int16 SAL_CALL getMaxTextLen( ) override;
+
+ // css::awt::XLayoutConstrains
+ css::awt::Size SAL_CALL getMinimumSize( ) override;
+ css::awt::Size SAL_CALL getPreferredSize( ) override;
+ css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& aNewSize ) override;
+
+ // css::awt::XTextLayoutConstrains
+ css::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) override;
+ void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) override;
+
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+class SVTXCurrencyField final : public css::awt::XCurrencyField, public SVTXFormattedField
+{
+public:
+ SVTXCurrencyField();
+ virtual ~SVTXCurrencyField() override;
+
+ // css::uno::XInterface
+ css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ void SAL_CALL acquire() noexcept override { SVTXFormattedField::acquire(); }
+ void SAL_CALL release() noexcept override { SVTXFormattedField::release(); }
+
+ // css::lang::XTypeProvider
+ css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+ css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+
+ // css::awt::XVclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ // css::awt::XCurrencyField
+ void SAL_CALL setValue( double Value ) override;
+ double SAL_CALL getValue( ) override;
+ void SAL_CALL setMin( double Value ) override;
+ double SAL_CALL getMin( ) override;
+ void SAL_CALL setMax( double Value ) override;
+ double SAL_CALL getMax( ) override;
+ void SAL_CALL setFirst( double Value ) override;
+ double SAL_CALL getFirst( ) override;
+ void SAL_CALL setLast( double Value ) override;
+ double SAL_CALL getLast( ) override;
+ void SAL_CALL setSpinSize( double Value ) override;
+ double SAL_CALL getSpinSize( ) override;
+ void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) override;
+ sal_Int16 SAL_CALL getDecimalDigits( ) override;
+ void SAL_CALL setStrictFormat( sal_Bool bStrict ) override;
+ sal_Bool SAL_CALL isStrictFormat( ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+
+class SVTXDateField final : public VCLXDateField
+{
+public:
+ SVTXDateField();
+ virtual ~SVTXDateField() override;
+
+ // css::awt::VclWindowPeer
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+
+ static void ImplGetPropertyIds( std::vector< sal_uInt16 > &aIds );
+ virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */