summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-13 15:51:44 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-14 09:56:31 +0100
commit91cc66dfa77cb0130d0bc99875275f7267b7f95a (patch)
treee0d2841ea721fc4bdf0ff4e1fd125a73e438baef /include
parentxmloff: create SchXMLImport instances with an uno constructor (diff)
downloadcore-91cc66dfa77cb0130d0bc99875275f7267b7f95a.tar.gz
core-91cc66dfa77cb0130d0bc99875275f7267b7f95a.zip
move VCLXFileControl to toolkit
Change-Id: I39bb417fe7e033a8f368fa04d4a30b2388bcddfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88615 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/svl/svl.hrc1
-rw-r--r--include/svtools/strings.hrc1
-rw-r--r--include/toolkit/awt/vclxwindows.hxx49
3 files changed, 49 insertions, 2 deletions
diff --git a/include/svl/svl.hrc b/include/svl/svl.hrc
index cd60edf6c346..231d26c0f3b5 100644
--- a/include/svl/svl.hrc
+++ b/include/svl/svl.hrc
@@ -24,6 +24,7 @@
// Internet Media Type Presentations
#define STR_SVT_MIMETYPE_CNT_FSYSBOX NC_("STR_SVT_MIMETYPE_CNT_FSYSBOX", "Workplace")
+#define STR_FILECTRL_BUTTONTEXT NC_("STR_FILECTRL_BUTTONTEXT", "Browse...")
#endif
diff --git a/include/svtools/strings.hrc b/include/svtools/strings.hrc
index 5b99e51605e3..a71792e20026 100644
--- a/include/svtools/strings.hrc
+++ b/include/svtools/strings.hrc
@@ -179,7 +179,6 @@
#define STR_SVT_FONTMAP_STYLENOTAVAILABLE NC_("STR_SVT_FONTMAP_STYLENOTAVAILABLE", "This font style will be simulated or the closest matching style will be used.")
#define STR_SVT_FONTMAP_NOTAVAILABLE NC_("STR_SVT_FONTMAP_NOTAVAILABLE", "This font has not been installed. The closest available font will be used.")
-#define STR_FILECTRL_BUTTONTEXT NC_("STR_FILECTRL_BUTTONTEXT", "Browse...")
#define STR_TABBAR_PUSHBUTTON_MOVET0HOME NC_("STR_TABBAR_PUSHBUTTON_MOVET0HOME", "Move To Home")
#define STR_TABBAR_PUSHBUTTON_MOVELEFT NC_("STR_TABBAR_PUSHBUTTON_MOVELEFT", "Move Left")
#define STR_TABBAR_PUSHBUTTON_MOVERIGHT NC_("STR_TABBAR_PUSHBUTTON_MOVERIGHT", "Move Right")
diff --git a/include/toolkit/awt/vclxwindows.hxx b/include/toolkit/awt/vclxwindows.hxx
index e3763da5012a..e470b5e3a46e 100644
--- a/include/toolkit/awt/vclxwindows.hxx
+++ b/include/toolkit/awt/vclxwindows.hxx
@@ -60,7 +60,7 @@
class FormatterBase;
class TabControl;
class TabPage;
-
+class Edit;
// class VCLXGraphicControl
// deriving from VCLXWindow, drawing the graphic which exists as "Graphic" at the model
@@ -1226,8 +1226,55 @@ public:
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() throw() override { VCLXWindow::acquire(); }
+ void SAL_CALL release() throw() 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 ); }
+};
#endif // INCLUDED_TOOLKIT_AWT_VCLXWINDOWS_HXX