summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/inc')
-rw-r--r--sc/source/ui/inc/AccessibleContextBase.hxx11
-rw-r--r--sc/source/ui/inc/scuitphfedit.hxx77
-rw-r--r--sc/source/ui/inc/tphfedit.hxx42
3 files changed, 78 insertions, 52 deletions
diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx
index d8e7353f123b..8451169a8f70 100644
--- a/sc/source/ui/inc/AccessibleContextBase.hxx
+++ b/sc/source/ui/inc/AccessibleContextBase.hxx
@@ -241,6 +241,12 @@ public:
void
CommitChange(const css::accessibility::AccessibleEventObject& rEvent) const;
+ /// Use this method to set initial Name without notification
+ void SetName(const OUString& rName) { msName = rName; }
+
+ /// Use this method to set initial Description without notification
+ void SetDescription(const OUString& rDesc) { msDescription = rDesc; }
+
protected:
/// Calls all FocusListener to tell they that the focus is gained.
void CommitFocusGained() const;
@@ -253,11 +259,6 @@ protected:
/// @throws css::lang::DisposedException
void IsObjectValid() const;
- /// Use this method to set initial Name without notification
- void SetName(const OUString& rName) { msName = rName; }
- /// Use this method to set initial Description without notification
- void SetDescription(const OUString& rDesc) { msDescription = rDesc; }
-
/// Reference to the parent object.
css::uno::Reference<css::accessibility::XAccessible> mxParent;
diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx
index 541ff19b76ee..d377a12d0cba 100644
--- a/sc/source/ui/inc/scuitphfedit.hxx
+++ b/sc/source/ui/inc/scuitphfedit.hxx
@@ -21,8 +21,8 @@
#define INCLUDED_SC_SOURCE_UI_INC_SCUITPHFEDIT_HXX
#include "tphfedit.hxx"
-#include <sfx2/tabdlg.hxx>
-#include <vcl/menubtn.hxx>
+#include <vcl/customweld.hxx>
+#include <vcl/weld.hxx>
enum ScHFEntryId
{
@@ -54,40 +54,48 @@ public:
void ClearTextAreas();
protected:
- ScHFEditPage( vcl::Window* pParent,
+ ScHFEditPage( TabPageParent pParent,
const SfxItemSet& rCoreSet,
sal_uInt16 nWhich,
bool bHeader );
virtual ~ScHFEditPage() override;
- virtual void dispose() override;
private:
- VclPtr<ScEditWindow> m_pWndLeft;
- VclPtr<ScEditWindow> m_pWndCenter;
- VclPtr<ScEditWindow> m_pWndRight;
- VclPtr<FixedText> m_pFtDefinedHF;
- VclPtr<ListBox> m_pLbDefined;
- VclPtr<FixedText> m_pFtCustomHF;
- VclPtr<PushButton> m_pBtnText;
- VclPtr<MenuButton> m_pBtnFile;
- VclPtr<PushButton> m_pBtnTable;
- VclPtr<PushButton> m_pBtnPage;
- VclPtr<PushButton> m_pBtnLastPage;
- VclPtr<PushButton> m_pBtnDate;
- VclPtr<PushButton> m_pBtnTime;
-
- VclPtr<FixedText> m_pFtConfidential;
- VclPtr<FixedText> m_pFtPage;
- VclPtr<FixedText> m_pFtOfQuestion;
- VclPtr<FixedText> m_pFtOf;
- VclPtr<FixedText> m_pFtNone;
- VclPtr<FixedText> m_pFtCreatedBy;
- VclPtr<FixedText> m_pFtCustomized;
+ sal_uInt16 const nWhich;
+ bool m_bDropDownActive;
+ sal_Int64 m_nTimeToggled;
+
+ std::unique_ptr<weld::Label> m_xFtDefinedHF;
+ std::unique_ptr<weld::ComboBox> m_xLbDefined;
+ std::unique_ptr<weld::Label> m_xFtCustomHF;
+ std::unique_ptr<weld::Button> m_xBtnText;
+ std::unique_ptr<weld::MenuButton> m_xBtnFile;
+ std::unique_ptr<weld::Button> m_xBtnTable;
+ std::unique_ptr<weld::Button> m_xBtnPage;
+ std::unique_ptr<weld::Button> m_xBtnLastPage;
+ std::unique_ptr<weld::Button> m_xBtnDate;
+ std::unique_ptr<weld::Button> m_xBtnTime;
+
+ std::unique_ptr<weld::Label> m_xFtConfidential;
+ std::unique_ptr<weld::Label> m_xFtPage;
+ std::unique_ptr<weld::Label> m_xFtOfQuestion;
+ std::unique_ptr<weld::Label> m_xFtOf;
+ std::unique_ptr<weld::Label> m_xFtNone;
+ std::unique_ptr<weld::Label> m_xFtCreatedBy;
+ std::unique_ptr<weld::Label> m_xFtCustomized;
+
+ std::unique_ptr<weld::Widget> m_xLeft;
+ std::unique_ptr<weld::Widget> m_xRight;
+
+ std::unique_ptr<ScEditWindow> m_xWndLeft;
+ std::unique_ptr<ScEditWindow> m_xWndCenter;
+ std::unique_ptr<ScEditWindow> m_xWndRight;
+ std::unique_ptr<weld::CustomWeld> m_xWndLeftWnd;
+ std::unique_ptr<weld::CustomWeld> m_xWndCenterWnd;
+ std::unique_ptr<weld::CustomWeld> m_xWndRightWnd;
ScEditWindow * m_pEditFocus; ///one of m_pWndLeft, m_pWndCenter, m_pWndRight
- sal_uInt16 const nWhich;
-
DECL_LINK( ObjectSelectHdl, ScEditWindow&, void );
private:
@@ -99,9 +107,10 @@ private:
bool IsPageEntry(EditEngine*pEngine, const EditTextObject* pTextObj);
static bool IsDateEntry(const EditTextObject* pTextObj);
static bool IsExtFileNameEntry(const EditTextObject* pTextObj);
- DECL_LINK( ListHdl_Impl, ListBox&, void);
- DECL_LINK( ClickHdl, Button*, void );
- DECL_LINK( MenuHdl, MenuButton*, void );
+ DECL_LINK( ListHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK( ListToggleHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK( ClickHdl, weld::Button&, void );
+ DECL_LINK( MenuHdl, const OString&, void );
};
class ScRightHeaderEditPage : public ScHFEditPage
@@ -111,7 +120,7 @@ public:
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
private:
- ScRightHeaderEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ ScRightHeaderEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
class ScLeftHeaderEditPage : public ScHFEditPage
@@ -121,7 +130,7 @@ public:
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
private:
- ScLeftHeaderEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ ScLeftHeaderEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
class ScRightFooterEditPage : public ScHFEditPage
@@ -131,7 +140,7 @@ public:
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
private:
- ScRightFooterEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ ScRightFooterEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
class ScLeftFooterEditPage : public ScHFEditPage
@@ -141,7 +150,7 @@ public:
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
private:
- ScLeftFooterEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
+ ScLeftFooterEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
#endif
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
index f7036cf8a22f..790840e85bea 100644
--- a/sc/source/ui/inc/tphfedit.hxx
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -23,9 +23,9 @@
#include <scdllapi.h>
#include <cppuhelper/weakref.hxx>
#include <tools/wintypes.hxx>
+#include <editeng/editview.hxx>
#include <editeng/svxenum.hxx>
-#include <vcl/ctrl.hxx>
-#include <vcl/menu.hxx>
+#include <vcl/customweld.hxx>
#include <functional>
@@ -46,16 +46,15 @@ enum ScEditWindowLocation
Right
};
-class SC_DLLPUBLIC ScEditWindow : public Control
+class SC_DLLPUBLIC ScEditWindow : public weld::CustomWidgetController
+ , public EditViewCallbacks
{
public:
- ScEditWindow( vcl::Window* pParent, WinBits nBits , ScEditWindowLocation eLoc );
- virtual ~ScEditWindow() override;
- virtual void dispose() override;
+ ScEditWindow(ScEditWindowLocation eLoc, weld::Window* pParent);
+ virtual void SetDrawingArea(weld::DrawingArea* pArea) override;
+ virtual ~ScEditWindow() override;
- using Control::SetFont;
void SetFont( const ScPatternAttr& rPattern );
- using Control::SetText;
void SetText( const EditTextObject& rTextObject );
std::unique_ptr<EditTextObject> CreateTextObject();
void SetCharAttributes();
@@ -73,20 +72,37 @@ public:
void SetLocation(ScEditWindowLocation eLoc) { eLocation = eLoc; }
protected:
virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
- virtual void MouseMove( const MouseEvent& rMEvt ) override;
- virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
- virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
- virtual void KeyInput( const KeyEvent& rKEvt ) override;
- virtual void Command( const CommandEvent& rCEvt ) override;
+ virtual bool MouseMove( const MouseEvent& rMEvt ) override;
+ virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
+ virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override;
+ virtual bool KeyInput( const KeyEvent& rKEvt ) override;
virtual void GetFocus() override;
virtual void LoseFocus() override;
virtual void Resize() override;
+ virtual void EditViewInvalidate(const tools::Rectangle& rRect) const override
+ {
+ weld::DrawingArea* pDrawingArea = GetDrawingArea();
+ pDrawingArea->queue_draw_area(rRect.Left(), rRect.Top(), rRect.GetWidth(), rRect.GetHeight());
+ }
+
+ virtual void EditViewSelectionChange() const override
+ {
+ weld::DrawingArea* pDrawingArea = GetDrawingArea();
+ pDrawingArea->queue_draw();
+ }
+
+ virtual OutputDevice& EditViewOutputDevice() const override
+ {
+ return GetDrawingArea()->get_ref_device();
+ }
+
private:
std::unique_ptr<ScHeaderEditEngine> pEdEngine;
std::unique_ptr<EditView> pEdView;
ScEditWindowLocation eLocation;
bool mbRTL;
+ weld::Window* mpDialog;
css::uno::WeakReference< css::accessibility::XAccessible > xAcc;
ScAccessibleEditObject* pAcc;