diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-14 11:05:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-17 13:38:03 +0200 |
commit | 1e97ca02773e2ba968606eed61d25d88f0d7e417 (patch) | |
tree | fea05eb4d8162b8db030d6a970dfb12f8fadd37e /sc/source/ui/inc/csvgrid.hxx | |
parent | dae96d4e629c5eccaacdc763cd390d341c16175d (diff) |
weld ScImportAsciiDlg
notably the csv control is always LTR even in RTL mode, but the surrounding
ScrollingWindow follows the environment direction, except the horizontal
scrolling widget itself must LTR scroll.
Change-Id: I72ee2b9dade73a11bcc4391e755fdb02886a884d
Reviewed-on: https://gerrit.libreoffice.org/80765
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/inc/csvgrid.hxx')
-rw-r--r-- | sc/source/ui/inc/csvgrid.hxx | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx index 641613342a03..77f5c74b4a2b 100644 --- a/sc/source/ui/inc/csvgrid.hxx +++ b/sc/source/ui/inc/csvgrid.hxx @@ -35,6 +35,7 @@ namespace svtools { class ColorConfig; } class EditEngine; class ScAsciiOptions; class ScAccessibleCsvControl; +class ScCsvTableBox; const sal_uInt32 CSV_COLUMN_INVALID = CSV_VEC_NOTFOUND; @@ -60,9 +61,10 @@ class SC_DLLPUBLIC ScCsvGrid : public ScCsvControl, public utl::ConfigurationLis private: typedef ::std::unique_ptr< ScEditEngineDefaulter > ScEditEnginePtr; + ScCsvTableBox* mpTableBox; /// Grid Parent VclPtr<VirtualDevice> mpBackgrDev; /// Grid background, headers, cell texts. VclPtr<VirtualDevice> mpGridDev; /// Data grid with selection and cursor. - VclPtr<PopupMenu> mpPopup; /// Popup menu for column types. + std::unique_ptr<weld::Menu> mxPopup; /// Popup menu for column types. ::svtools::ColorConfig* mpColorConfig; /// Application color configuration. Color maBackColor; /// Cell background color. @@ -76,7 +78,7 @@ private: Color maSelectColor; /// Header color of selected columns. ScEditEnginePtr mpEditEngine; /// For drawing cell texts. - vcl::Font const maHeaderFont; /// Font for column and row headers. + vcl::Font maHeaderFont; /// Font for column and row headers. vcl::Font maMonoFont; /// Monospace font for data cells. Size maWinSize; /// Size of the control. Size maEdEngSize; /// Paper size for edit engine. @@ -89,12 +91,14 @@ private: sal_Int32 mnFirstImpLine; /// First imported line (0-based). sal_uInt32 mnRecentSelCol; /// Index of most recently selected column. sal_uInt32 mnMTCurrCol; /// Current column of mouse tracking. - bool mbMTSelecting; /// Mouse tracking: true = select, false = deselect. + bool mbTracking; /// True if Mouse tracking + bool mbMTSelecting; /// Mouse tracking mode: true = select, false = deselect. public: - explicit ScCsvGrid( ScCsvControl& rParent ); - virtual ~ScCsvGrid() override; - virtual void dispose() override; + explicit ScCsvGrid(const ScCsvLayoutData& rData, std::unique_ptr<weld::Menu> xPopup, ScCsvTableBox* pTableBox); + virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; + ScCsvTableBox* GetTableBox() { return mpTableBox; } + virtual ~ScCsvGrid() override; /** Finishes initialization. Must be called after constructing a new object. */ void Init(); @@ -247,12 +251,15 @@ protected: virtual void GetFocus() override; virtual void LoseFocus() override; - virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual void Tracking( const TrackingEvent& rTEvt ) override; - virtual void KeyInput( const KeyEvent& rKEvt ) override; - virtual void Command( const CommandEvent& rCEvt ) override; + virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override; + virtual bool MouseMove( const MouseEvent& rMEvt ) override; + virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override; + virtual bool KeyInput( const KeyEvent& rKEvt ) override; + virtual bool Command( const CommandEvent& rCEvt ) override; - virtual void DataChanged( const DataChangedEvent& rDCEvt ) override; + virtual tools::Rectangle GetFocusRect() override; + + virtual void StyleUpdated() override; virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, ConfigurationHints ) override; @@ -262,7 +269,7 @@ protected: public: /** Redraws the entire data grid. */ - void ImplRedraw(); + void ImplRedraw(vcl::RenderContext& rRenderContext); /** Returns a pointer to the used edit engine. */ EditEngine* GetEditEngine(); @@ -302,13 +309,10 @@ private: /** Inverts the cursor bar at the specified position in maGridDev. */ SAL_DLLPRIVATE void ImplInvertCursor( sal_Int32 nPos ); - /** Draws directly tracking rectangle to the column with the specified index. */ - SAL_DLLPRIVATE void ImplDrawTrackingRect( sal_uInt32 nColIndex ); - // accessibility ---------------------------------------------------------- protected: /** Creates a new accessible object. */ - virtual rtl::Reference<ScAccessibleCsvControl> ImplCreateAccessible() override; + virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; }; #endif |