summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-09-01 10:51:23 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2023-09-01 16:13:25 +0200
commit847df831b1c46a257fd371c6a193387cc9c06c4b (patch)
treea8bfaec1b8bdc6ce175fef738c7d7a4a4680a53a /include
parent9a559df3fe2f623ac4eace30cdfeabb3a747c0e9 (diff)
tdf#104833 Move VCLXMultiLineEdit to public toolkit header
This is in preparation of having the a11y factory create a proper accessible context for it. Change-Id: If60efa84263c2d68eb57daa3aae4834a060529c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156401 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'include')
-rw-r--r--include/toolkit/awt/vclxwindows.hxx54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/toolkit/awt/vclxwindows.hxx b/include/toolkit/awt/vclxwindows.hxx
index bffddf6fd63e..3a86cdecdfef 100644
--- a/include/toolkit/awt/vclxwindows.hxx
+++ b/include/toolkit/awt/vclxwindows.hxx
@@ -21,6 +21,7 @@
#include <toolkit/dllapi.h>
+#include <com/sun/star/awt/XTextArea.hpp>
#include <com/sun/star/awt/XTextComponent.hpp>
#include <com/sun/star/awt/XListBox.hpp>
#include <com/sun/star/awt/XNumericField.hpp>
@@ -41,6 +42,7 @@
#include <svl/numuno.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
+#include <tools/lineend.hxx>
#include <vcl/image.hxx>
@@ -408,6 +410,58 @@ public:
virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
};
+class VCLXMultiLineEdit final : public cppu::ImplInheritanceHelper<
+ VCLXWindow,
+ css::awt::XTextComponent,
+ css::awt::XTextArea,
+ css::awt::XTextLayoutConstrains>
+{
+private:
+ TextListenerMultiplexer maTextListeners;
+ LineEnd meLineEndType;
+
+ void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
+
+public:
+ VCLXMultiLineEdit();
+ virtual ~VCLXMultiLineEdit() 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 VCLXSpinField
class VCLXSpinField : public cppu::ImplInheritanceHelper<VCLXEdit, css::awt::XSpinField>