diff options
author | Wu Yan <wuy@openoffice.org> | 2010-05-26 16:38:12 +0800 |
---|---|---|
committer | Wu Yan <wuy@openoffice.org> | 2010-05-26 16:38:12 +0800 |
commit | 3b7fbe601de8cf26b7765d4b920a861d571f1e16 (patch) | |
tree | 205860f5270fe44e4a7cc036f4a4c931b285580d /svx/inc/tbunosearchcontrollers.hxx | |
parent | 11586ca1f1cf6bb472b70fb9d3171bc451d6a3a1 (diff) |
findbar01: #111826#, #111827# and make some optimizations for the code
Diffstat (limited to 'svx/inc/tbunosearchcontrollers.hxx')
-rw-r--r-- | svx/inc/tbunosearchcontrollers.hxx | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/svx/inc/tbunosearchcontrollers.hxx b/svx/inc/tbunosearchcontrollers.hxx index 3b52852c61fd..aec07042e1fc 100644 --- a/svx/inc/tbunosearchcontrollers.hxx +++ b/svx/inc/tbunosearchcontrollers.hxx @@ -41,6 +41,7 @@ #include <cppuhelper/implbase1.hxx> #include <cppuhelper/weak.hxx> #include <svtools/toolboxcontroller.hxx> +#include <vcl/combobox.hxx> #include <vcl/window.hxx> #include <map> @@ -49,13 +50,26 @@ namespace css = ::com::sun::star ; namespace svx { -class FindTextFieldControl; - -struct ExecuteInfo +class FindTextFieldControl : public ComboBox { - css::uno::Reference< css::frame::XDispatch > xDispatch; - css::util::URL aTargetURL; - css::uno::Sequence< css::beans::PropertyValue > aArgs; +public: + FindTextFieldControl( Window* pParent, WinBits nStyle, + css::uno::Reference< css::frame::XFrame >& xFrame, + css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); + virtual ~FindTextFieldControl(); + + virtual void Modify(); + virtual long PreNotify( NotifyEvent& rNEvt ); + + void InitControls_Impl(); + void Remember_Impl(const String& rStr); + +private: + + css::uno::Reference< css::frame::XFrame > m_xFrame; + css::uno::Reference< css::lang::XMultiServiceFactory > m_xServiceManager; + sal_Bool m_bToClearTextField; + }; class SearchToolbarControllersManager @@ -119,14 +133,10 @@ public: // XStatusListener virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException ); - sal_Int32 getFontSizePixel( const Window* pWindow ); - - DECL_STATIC_LINK( FindTextToolbarController, ExecuteHdl_Impl, ExecuteInfo* ); DECL_LINK(EditModifyHdl, void*); private: - css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; FindTextFieldControl* m_pFindTextFieldControl; USHORT m_nDownSearchId; // item position of findbar @@ -171,12 +181,6 @@ public: // XStatusListener virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ); - DECL_STATIC_LINK( DownSearchToolboxController, ExecuteHdl_Impl, ExecuteInfo* ); - -private : - - css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; - }; class UpSearchToolboxController : public svt::ToolboxController, @@ -216,12 +220,6 @@ public: // XStatusListener virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException ); - DECL_STATIC_LINK( UpSearchToolboxController, ExecuteHdl_Impl, ExecuteInfo* ); - -private : - - css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; - }; // protocol handler for "vnd.sun.star.findbar:*" URLs |