Kaydet (Commit) 8a35ae3e authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SvxIMapDlg

Change-Id: I5418176a015e61ef8eee4c2acd8e84b008f76f82
Reviewed-on: https://gerrit.libreoffice.org/72249
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 4c2034b8
......@@ -43,7 +43,7 @@
|*
\************************************************************************/
URLDlg::URLDlg(weld::Window* pWindow, const OUString& rURL, const OUString& rAlternativeText,
URLDlg::URLDlg(weld::Widget* pWindow, const OUString& rURL, const OUString& rAlternativeText,
const OUString& rDescription, const OUString& rTarget, const OUString& rName,
TargetList& rTargetList)
: GenericDialogController(pWindow, "cui/ui/cuiimapdlg.ui", "IMapDialog")
......
......@@ -1103,7 +1103,7 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateGalleryThemeProperti
pParent, pData, pItemSet));
}
VclPtr<AbstractURLDlg> AbstractDialogFactory_Impl::CreateURLDialog(weld::Window* pParent,
VclPtr<AbstractURLDlg> AbstractDialogFactory_Impl::CreateURLDialog(weld::Widget* pParent,
const OUString& rURL, const OUString& rAltText, const OUString& rDescription,
const OUString& rTarget, const OUString& rName,
TargetList& rTargetList )
......@@ -1292,7 +1292,7 @@ VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateCharMapDialog(weld::
return VclPtr<AbstractSvxCharacterMapDialog_Impl>::Create(std::make_unique<SvxCharacterMap>(pParent, &rAttr, rDocumentFrame));
}
VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateEventConfigDialog(weld::Window* pParent,
VclPtr<SfxAbstractDialog> AbstractDialogFactory_Impl::CreateEventConfigDialog(weld::Widget* pParent,
const SfxItemSet& rAttr,
const Reference< XFrame >& rDocumentFrame)
{
......
......@@ -685,7 +685,7 @@ public:
virtual VclPtr<SfxAbstractDialog> CreateCharMapDialog(weld::Window* pParent,
const SfxItemSet& rAttr,
const css::uno::Reference< css::frame::XFrame >& rFrame) override;
virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Window* pParent,
virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Widget* pParent,
const SfxItemSet& rAttr,
const css::uno::Reference< css::frame::XFrame >& rFrame) override;
virtual VclPtr<VclAbstractDialog> CreateFrameDialog(vcl::Window* pParent, const css::uno::Reference< css::frame::XFrame >& rxFrame,
......@@ -751,7 +751,7 @@ public:
virtual VclPtr<VclAbstractDialog> CreateGalleryThemePropertiesDialog(weld::Window* pParent,
ExchangeData* pData,
SfxItemSet* pItemSet) override;
virtual VclPtr<AbstractURLDlg> CreateURLDialog(weld::Window* pParent,
virtual VclPtr<AbstractURLDlg> CreateURLDialog(weld::Widget* pParent,
const OUString& rURL, const OUString& rAltText, const OUString& rDescription,
const OUString& rTarget, const OUString& rName,
TargetList& rTargetList ) override;
......
......@@ -32,7 +32,7 @@ class URLDlg : public weld::GenericDialogController
public:
URLDlg(weld::Window* pWindow,
URLDlg(weld::Widget* pWindow,
const OUString& rURL, const OUString& rAlternativeText, const OUString& rDescription,
const OUString& rTarget, const OUString& rName,
TargetList& rTargetList);
......
......@@ -80,7 +80,7 @@ public:
class SfxMacroAssignDlg : public SfxSingleTabDialogController
{
public:
SfxMacroAssignDlg(weld::Window* pParent,
SfxMacroAssignDlg(weld::Widget* pParent,
const css::uno::Reference< css::frame::XFrame >& rxDocumentFrame,
const SfxItemSet& rSet);
SfxMacroTabPage* GetTabPage()
......
......@@ -384,7 +384,7 @@ VclPtr<SfxTabPage> SfxMacroTabPage::Create(TabPageParent pParent, const SfxItemS
return CreateSfxMacroTabPage(pParent, *rAttrSet);
}
SfxMacroAssignDlg::SfxMacroAssignDlg(weld::Window* pParent,
SfxMacroAssignDlg::SfxMacroAssignDlg(weld::Widget* pParent,
const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet)
: SfxSingleTabDialogController(pParent, &rSet,"cui/ui/eventassigndialog.ui",
"EventAssignDialog")
......
......@@ -104,6 +104,7 @@ class SVT_DLLPUBLIC URLBox
bool bHistoryDisabled : 1;
Link<weld::ComboBox&, void> aChangeHdl;
Link<weld::Widget&, void> aFocusOutHdl;
std::unique_ptr<weld::ComboBox> m_xWidget;
......@@ -118,26 +119,29 @@ public:
URLBox(std::unique_ptr<weld::ComboBox> pWidget);
~URLBox();
void set_entry_text(const OUString& rStr) { m_xWidget->set_entry_text(rStr); }
void Clear() { m_xWidget->clear(); }
void connect_entry_activate(const Link<weld::ComboBox&, bool>& rLink) { m_xWidget->connect_entry_activate(rLink); }
void connect_changed(const Link<weld::ComboBox&, void>& rLink) { aChangeHdl = rLink; }
void append_text(const OUString& rStr) { m_xWidget->append_text(rStr); }
OUString get_active_text() const { return m_xWidget->get_active_text(); }
void grab_focus() { m_xWidget->grab_focus(); }
void EnableAutocomplete() { m_xWidget->set_entry_completion(true); }
void SetBaseURL( const OUString& rURL );
void SetSmartProtocol( INetProtocol eProt );
INetProtocol GetSmartProtocol() const { return eSmartProtocol; }
OUString GetURL();
void DisableHistory();
weld::Widget* getWidget() { return m_xWidget.get(); }
static OUString ParseSmart( const OUString& aText, const OUString& aBaseURL );
void SetFilter(const OUString& _sFilter);
void set_entry_text(const OUString& rStr) { m_xWidget->set_entry_text(rStr); }
void Clear() { m_xWidget->clear(); }
void connect_entry_activate(const Link<weld::ComboBox&, bool>& rLink) { m_xWidget->connect_entry_activate(rLink); }
void connect_changed(const Link<weld::ComboBox&, void>& rLink) { aChangeHdl = rLink; }
void connect_focus_out(const Link<weld::Widget&, void>& rLink) { aFocusOutHdl = rLink; }
void append_text(const OUString& rStr) { m_xWidget->append_text(rStr); }
int find_text(const OUString& rStr) const { return m_xWidget->find_text(rStr); }
OUString get_active_text() const { return m_xWidget->get_active_text(); }
void grab_focus() { m_xWidget->grab_focus(); }
void set_sensitive(bool bSensitive) { m_xWidget->set_sensitive(bSensitive); }
void EnableAutocomplete() { m_xWidget->set_entry_completion(true); }
void SetBaseURL( const OUString& rURL );
void SetSmartProtocol( INetProtocol eProt );
INetProtocol GetSmartProtocol() const { return eSmartProtocol; }
OUString GetURL();
void DisableHistory();
weld::Widget* getWidget() { return m_xWidget.get(); }
static OUString ParseSmart( const OUString& aText, const OUString& aBaseURL );
void SetFilter(const OUString& _sFilter);
};
#endif
......
......@@ -106,7 +106,7 @@ public:
virtual SdrPageView* ShowSdrPage(SdrPage* pPage) override;
virtual void HideSdrPage() override;
virtual bool MouseButtonDown( const MouseEvent& _rMEvt, vcl::Window* _pWin ) override;
virtual bool MouseButtonDown( const MouseEvent& _rMEvt, OutputDevice* _pWin ) override;
/** grab the focus to the first form control on the view
*/
......
......@@ -42,6 +42,21 @@ public:
virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& rOldBoundRect) override;
};
class SvxGraphCtrl;
class SvxGraphCtrlUserCall : public SdrObjUserCall
{
SvxGraphCtrl& rWin;
public:
SvxGraphCtrlUserCall(SvxGraphCtrl& rGraphWin)
: rWin(rGraphWin)
{}
virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const tools::Rectangle& rOldBoundRect) override;
};
class SvxGraphCtrlAccessibleContext;
class SVX_DLLPUBLIC GraphCtrl : public Control
......@@ -120,23 +135,91 @@ public:
void QueueIdleUpdate();
void SetSdrMode(bool b);
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
};
class SVX_DLLPUBLIC SvxGraphCtrl : public weld::CustomWidgetController
{
MapMode const aMap100;
friend class SvxGraphCtrlView;
friend class SvxGraphCtrlUserCall;
Graphic aGraphic;
ScopedVclPtrInstance<VirtualDevice> xVD;
Idle aUpdateIdle;
Link<SvxGraphCtrl*,void> aMousePosLink;
Link<SvxGraphCtrl*,void> aGraphSizeLink;
Link<SvxGraphCtrl*,void> aUpdateLink;
MapMode const aMap100;
Size aGraphSize;
Point aMousePos;
std::unique_ptr<SvxGraphCtrlUserCall> pUserCall;
SdrObjKind eObjKind;
sal_uInt16 nPolyEdit;
bool bEditMode;
bool mbSdrMode;
bool mbInIdleUpdate;
weld::Dialog* mpDialog;
DECL_LINK( UpdateHdl, Timer*, void );
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
rtl::Reference<SvxGraphCtrlAccessibleContext> mpAccContext;
protected:
std::unique_ptr<SdrModel> pModel;
std::unique_ptr<SdrView> pView;
virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
virtual void Resize() override;
virtual bool KeyInput(const KeyEvent& rKEvt) override;
virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
virtual bool MouseMove(const MouseEvent& rMEvt) override;
virtual void InitSdrModel();
virtual void SdrObjCreated( const SdrObject& rObj );
virtual void SdrObjChanged( const SdrObject& rObj );
virtual void MarkListHasChanged();
void GraphicToVD();
SdrObjUserCall* GetSdrUserCall() { return pUserCall.get(); }
public:
SvxGraphCtrl();
SvxGraphCtrl(weld::Dialog* pDialog);
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
virtual ~SvxGraphCtrl() override;
void SetGraphic( const Graphic& rGraphic );
void SetGraphic( const Graphic& rGraphic, bool bNewModel = true );
const Graphic& GetGraphic() const { return aGraphic; }
const Size& GetGraphicSize() const { return aGraphSize; }
const Point& GetMousePos() const { return aMousePos; }
void SetEditMode( const bool bEditMode );
void SetPolyEditMode( const sal_uInt16 nPolyEdit );
sal_uInt16 GetPolyEditMode() const { return nPolyEdit; }
void SetObjKind( const SdrObjKind eObjKind );
SdrModel* GetSdrModel() const { return pModel.get(); }
SdrView* GetSdrView() const { return pView.get(); }
SdrObject* GetSelectedSdrObject() const;
bool IsChanged() const { return mbSdrMode && pModel->IsChanged(); }
void SetMousePosLink( const Link<SvxGraphCtrl*,void>& rLink ) { aMousePosLink = rLink; }
void SetGraphSizeLink( const Link<SvxGraphCtrl*,void>& rLink ) { aGraphSizeLink = rLink; }
void SetUpdateLink( const Link<SvxGraphCtrl*,void>& rLink ) { aUpdateLink = rLink; }
void QueueIdleUpdate();
void SetSdrMode(bool b);
Point GetPositionInDialog() const;
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
};
class GraphCtrlView : public SdrView
......@@ -152,15 +235,38 @@ protected:
}
public:
GraphCtrlView(
SdrModel& rSdrModel,
GraphCtrl* pWindow)
: SdrView(rSdrModel, pWindow)
,rGraphCtrl(*pWindow)
GraphCtrlView(SdrModel& rSdrModel, GraphCtrl* pWindow)
: SdrView(rSdrModel, pWindow)
, rGraphCtrl(*pWindow)
{
}
};
class SvxGraphCtrlView : public SdrView
{
SvxGraphCtrl& rGraphCtrl;
protected:
virtual void MarkListHasChanged() override
{
SdrView::MarkListHasChanged();
rGraphCtrl.MarkListHasChanged();
}
public:
SvxGraphCtrlView(SdrModel& rSdrModel, SvxGraphCtrl* pWindow)
: SdrView(rSdrModel, &pWindow->GetDrawingArea()->get_ref_device())
, rGraphCtrl(*pWindow)
{
}
// override these so we can get the occasions SdrPaintView would call Window::Invalidate on its vcl::Window
// if it had one, and route to WidgetController::Invalidate instead
virtual rtl::Reference<sdr::overlay::OverlayManager> CreateOverlayManager(OutputDevice& rDevice) const override;
virtual void InvalidateWindow(const tools::Rectangle& rArea, OutputDevice& rDevice) const override;
};
#endif // INCLUDED_SVX_GRAPHCTL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -24,11 +24,10 @@
#include <sfx2/childwin.hxx>
#include <sfx2/ctrlitem.hxx>
#include <sfx2/basedlgs.hxx>
#include <vcl/fixed.hxx>
#include <vcl/combobox.hxx>
#include <vcl/edit.hxx>
#include <vcl/customweld.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/status.hxx>
#include <vcl/weld.hxx>
#include <svx/svxdllapi.h>
#include <memory>
#include <vector>
......@@ -77,69 +76,53 @@ public:
class IMapOwnData;
class IMapWindow;
class GraphCtrl;
class SvxGraphCtrl;
class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow
class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialogController
{
friend class IMapOwnData;
friend class IMapWindow;
VclPtr<ToolBox> m_pTbxIMapDlg1;
VclPtr<FixedText> m_pFtURL;
VclPtr<SvtURLBox> m_pURLBox;
VclPtr<FixedText> m_pFtText;
VclPtr<Edit> m_pEdtText;
VclPtr<FixedText> m_pFtTarget;
VclPtr<ComboBox> m_pCbbTarget;
VclPtr<StatusBar> m_pStbStatus;
sal_uInt16 mnApplyId;
sal_uInt16 mnOpenId;
sal_uInt16 mnSaveAsId;
sal_uInt16 mnSelectId;
sal_uInt16 mnRectId;
sal_uInt16 mnCircleId;
sal_uInt16 mnPolyId;
sal_uInt16 mnFreePolyId;
sal_uInt16 mnPolyEditId;
sal_uInt16 mnPolyMoveId;
sal_uInt16 mnPolyInsertId;
sal_uInt16 mnPolyDeleteId;
sal_uInt16 mnUndoId;
sal_uInt16 mnRedoId;
sal_uInt16 mnActiveId;
sal_uInt16 mnMacroId;
sal_uInt16 mnPropertyId;
sal_uInt16 mnCloseId;
VclPtr<IMapWindow> pIMapWnd;
std::unique_ptr<IMapOwnData> pOwnData;
void* pCheckObj;
SvxIMapDlgItem aIMapItem;
virtual bool Close() override;
DECL_LINK( TbxClickHdl, ToolBox*, void );
std::unique_ptr<IMapWindow> m_xIMapWnd;
std::unique_ptr<weld::Toolbar> m_xTbxIMapDlg1;
std::unique_ptr<weld::Label> m_xFtURL;
std::unique_ptr<URLBox> m_xURLBox;
std::unique_ptr<weld::Label> m_xFtText;
std::unique_ptr<weld::Entry> m_xEdtText;
std::unique_ptr<weld::Label> m_xFtTarget;
std::unique_ptr<weld::ComboBox> m_xCbbTarget;
std::unique_ptr<weld::Button> m_xCancelBtn;
std::unique_ptr<weld::Label> m_xStbStatus1;
std::unique_ptr<weld::Label> m_xStbStatus2;
std::unique_ptr<weld::Label> m_xStbStatus3;
std::unique_ptr<weld::CustomWeld> m_xIMapWndWeld;
DECL_LINK( TbxClickHdl, const OString&, void );
DECL_LINK( InfoHdl, IMapWindow&, void );
DECL_LINK( MousePosHdl, GraphCtrl*, void );
DECL_LINK( GraphSizeHdl, GraphCtrl*, void );
DECL_LINK( URLModifyHdl, Edit&, void );
DECL_LINK( URLModifyComboBoxHdl, ComboBox&, void );
DECL_LINK( URLLoseFocusHdl, Control&, void );
DECL_LINK( MousePosHdl, SvxGraphCtrl*, void );
DECL_LINK( GraphSizeHdl, SvxGraphCtrl*, void );
DECL_LINK( URLModifyHdl, weld::ComboBox&, void );
DECL_LINK( EntryModifyHdl, weld::Entry&, void );
DECL_LINK( URLModifyComboBoxHdl, weld::ComboBox&, void );
DECL_LINK( URLLoseFocusHdl, weld::Widget&, void );
DECL_LINK( UpdateHdl, Timer *, void );
DECL_LINK( StateHdl, GraphCtrl*, void );
DECL_LINK( MiscHdl, LinkParamNone*, void );
DECL_LINK( StateHdl, SvxGraphCtrl*, void );
DECL_LINK( CancelHdl, weld::Button&, void );
void URLModify();
void DoOpen();
bool DoSave();
void SetActiveTool( sal_uInt16 nId );
void SetActiveTool(const OString& rId);
public:
SvxIMapDlg( SfxBindings *pBindings, SfxChildWindow *pCW,
vcl::Window* pParent );
virtual ~SvxIMapDlg() override;
virtual void dispose() override;
SvxIMapDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
weld::Window* pParent);
virtual ~SvxIMapDlg() override;
void SetExecState( bool bEnable );
......
......@@ -84,7 +84,7 @@ public:
virtual void BrkAction() override;
virtual void TakeActionRect(tools::Rectangle& rRect) const override;
virtual bool MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) override;
virtual bool MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin) override;
void SetMeasureLayer(const OUString& rName) { maMeasureLayer=rName; }
......
......@@ -236,9 +236,9 @@ public:
OutlinerView* GetTextEditOutlinerView() { return pTextEditOutlinerView; }
virtual bool KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin) override;
virtual bool MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin) override;
virtual bool MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin) override;
virtual bool MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) override;
virtual bool MouseButtonDown(const MouseEvent& rMEvt, OutputDevice* pWin) override;
virtual bool MouseButtonUp(const MouseEvent& rMEvt, OutputDevice* pWin) override;
virtual bool MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin) override;
virtual bool Command(const CommandEvent& rCEvt, vcl::Window* pWin) override;
// #97766# make virtual to change implementation e.g. for SdOutlineView
......
......@@ -148,7 +148,7 @@ protected:
void SetMarkRects(); // Rects at the PageViews
void CheckMarked(); // Scan MarkList after Del and Lock Layer ...
void AddDragModeHdl(SdrDragMode eMode);
virtual bool MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) override;
virtual bool MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin) override;
virtual bool RequestHelp(const HelpEvent& rHEvt) override;
// add custom handles (used by other apps, e.g. AnchorPos)
......
......@@ -221,7 +221,7 @@ public:
bool IsPagePaintingAllowed() const { return mbPagePaintingAllowed;}
void SetPagePaintingAllowed(bool bNew);
rtl::Reference<sdr::overlay::OverlayManager> CreateOverlayManager(OutputDevice& rDevice) const;
virtual rtl::Reference<sdr::overlay::OverlayManager> CreateOverlayManager(OutputDevice& rDevice) const;
protected:
svtools::ColorConfig maColorConfig;
......@@ -238,7 +238,7 @@ public:
SdrPaintWindow* GetPaintWindow(sal_uInt32 nIndex) const;
// Replacement for GetWin(0), may return 0L (!)
OutputDevice* GetFirstOutputDevice() const;
static void InvalidateWindow(const tools::Rectangle& rArea, OutputDevice& rDevice);
virtual void InvalidateWindow(const tools::Rectangle& rArea, OutputDevice& rDevice) const;
private:
SVX_DLLPRIVATE void ImpClearVars();
......@@ -465,9 +465,9 @@ public:
void SetSwapAsynchron(bool bJa=true) { mbSwapAsynchron=bJa; }
virtual bool KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin);
virtual bool MouseButtonDown(const MouseEvent& /*rMEvt*/, vcl::Window* /*pWin*/) { return false; }
virtual bool MouseButtonUp(const MouseEvent& /*rMEvt*/, vcl::Window* /*pWin*/) { return false; }
virtual bool MouseMove(const MouseEvent& /*rMEvt*/, vcl::Window* /*pWin*/) { return false; }
virtual bool MouseButtonDown(const MouseEvent& /*rMEvt*/, OutputDevice* /*pWin*/) { return false; }
virtual bool MouseButtonUp(const MouseEvent& /*rMEvt*/, OutputDevice* /*pWin*/) { return false; }
virtual bool MouseMove(const MouseEvent& /*rMEvt*/, OutputDevice* /*pWin*/) { return false; }
virtual bool RequestHelp(const HelpEvent& /*rHEvt*/) { return false; }
virtual bool Command(const CommandEvent& /*rCEvt*/, vcl::Window* /*pWin*/) { return false; }
......
......@@ -183,9 +183,9 @@ public:
bool IsMasterPagePaintCaching() const { return mbMasterPagePaintCaching; }
bool KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin) override;
virtual bool MouseButtonDown(const MouseEvent& rMEvt, vcl::Window* pWin) override;
virtual bool MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin) override;
virtual bool MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) override;
virtual bool MouseButtonDown(const MouseEvent& rMEvt, OutputDevice* pWin) override;
virtual bool MouseButtonUp(const MouseEvent& rMEvt, OutputDevice* pWin) override;
virtual bool MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin) override;
using SdrCreateView::RequestHelp;
virtual bool Command(const CommandEvent& rCEvt, vcl::Window* pWin) override;
......
......@@ -351,7 +351,7 @@ public:
virtual VclPtr<VclAbstractDialog> CreateGalleryThemePropertiesDialog(weld::Window* pParent,
ExchangeData* pData,
SfxItemSet* pItemSet ) = 0;
virtual VclPtr<AbstractURLDlg> CreateURLDialog(weld::Window* pParent,
virtual VclPtr<AbstractURLDlg> CreateURLDialog(weld::Widget* pParent,
const OUString& rURL, const OUString& rAltText, const OUString& rDescription,
const OUString& rTarget, const OUString& rName,
TargetList& rTargetList ) = 0;
......@@ -427,8 +427,8 @@ public:
sal_uInt32 nResId )=0;
virtual VclPtr<SfxAbstractDialog> CreateCharMapDialog(weld::Window* pParent, const SfxItemSet& rAttr,
const css::uno::Reference<css::frame::XFrame>& rFrame) = 0;
virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Window* pParent, const SfxItemSet& rAttr,
const css::uno::Reference< css::frame::XFrame >& _rxFrame) = 0;
virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog(weld::Widget* pParent, const SfxItemSet& rAttr,
const css::uno::Reference< css::frame::XFrame >& rFrame) = 0;
virtual VclPtr<AbstractSvxPostItDialog> CreateSvxPostItDialog(weld::Widget* pParent, const SfxItemSet& rCoreSet, bool bPrevNext = false) = 0;
virtual VclPtr<VclAbstractDialog> CreateSvxScriptOrgDialog(weld::Window* pParent, const OUString& rLanguage) override = 0;
......
......@@ -68,6 +68,7 @@ public:
void EnableRTL(bool bEnable) { m_pDrawingArea->set_direction(bEnable); }
bool IsRTLEnabled() const { return m_pDrawingArea->get_direction(); }
void ReleaseMouse() { m_pDrawingArea->grab_remove(); }
void SetPointer(PointerStyle ePointerStyle) { m_pDrawingArea->set_cursor(ePointerStyle); }
void SetHelpId(const OString& rHelpId) { m_pDrawingArea->set_help_id(rHelpId); }
void SetAccessibleName(const OUString& rName) { m_pDrawingArea->set_accessible_name(rName); }
void set_size_request(int nWidth, int nHeight)
......
......@@ -56,6 +56,7 @@ class XGraphic;
typedef css::uno::Reference<css::accessibility::XAccessible> a11yref;
typedef css::uno::Reference<css::accessibility::XAccessibleRelationSet> a11yrelationset;
enum class PointerStyle;
class SvNumberFormatter;
class KeyEvent;
class MouseEvent;
......@@ -1615,7 +1616,7 @@ public:
virtual void queue_draw_area(int x, int y, int width, int height) = 0;
virtual void queue_resize() = 0;
virtual void set_text_cursor() = 0;
virtual void set_cursor(PointerStyle ePointerStyle) = 0;
// use return here just to generate matching VirtualDevices
virtual OutputDevice& get_ref_device() = 0;
......@@ -1663,6 +1664,25 @@ public:
virtual ~Menu() {}
};
class VCL_DLLPUBLIC Toolbar : virtual public Widget
{
protected:
Link<const OString&, void> m_aClickHdl;
void signal_clicked(const OString& rIdent) { m_aClickHdl.Call(rIdent); }
public:
virtual void set_item_sensitive(const OString& rIdent, bool bSensitive) = 0;
virtual bool get_item_sensitive(const OString& rIdent) const = 0;
virtual void set_item_active(const OString& rIdent, bool bActive) = 0;
virtual bool get_item_active(const OString& rIdent) const = 0;
virtual void insert_separator(int pos, const OUString& rId) = 0;
void append_separator(const OUString& rId) { insert_separator(-1, rId); }
void connect_clicked(const Link<const OString&, void>& rLink) { m_aClickHdl = rLink; }
};
class VCL_DLLPUBLIC SizeGroup
{
public:
......@@ -1755,6 +1775,8 @@ public:
const OString& treeviewid, bool bTakeOwnership = false)
= 0;
virtual std::unique_ptr<Menu> weld_menu(const OString& id, bool bTakeOwnership = true) = 0;
virtual std::unique_ptr<Toolbar> weld_toolbar(const OString& id, bool bTakeOwnership = true)
= 0;
virtual std::unique_ptr<SizeGroup> create_size_group() = 0;
virtual ~Builder() {}
};
......
......@@ -110,7 +110,7 @@ void ScEditWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
pEdView->SetBackgroundColor( aBgColor );
pEdEngine->InsertView( pEdView.get() );
pDrawingArea->set_text_cursor();
pDrawingArea->set_cursor(PointerStyle::Text);
if (pAcc)
{
......
......@@ -42,6 +42,7 @@ namespace sd
SdPhotoAlbumDialog::SdPhotoAlbumDialog(weld::Window* pWindow, SdDrawDocument* pActDoc)
: GenericDialogController(pWindow, "modules/simpress/ui/photoalbum.ui", "PhotoAlbumCreatorDialog")
, m_pDoc(pActDoc)
, m_aImg(m_xDialog.get())
, m_xCancelBtn(m_xBuilder->weld_button("cancel"))
, m_xCreateBtn(m_xBuilder->weld_button("ok"))
, m_xAddBtn(m_xBuilder->weld_button("add_btn"))
......
......@@ -34,6 +34,8 @@ SdVectorizeDlg::SdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::
: GenericDialogController(pParent, "modules/sdraw/ui/vectorize.ui", "VectorizeDialog")
, m_pDocSh(pDocShell)
, aBmp(rBmp)
, m_aBmpWin(m_xDialog.get())
, m_aMtfWin(m_xDialog.get())
, m_xNmLayers(m_xBuilder->weld_spin_button("colors"))
, m_xMtReduce(m_xBuilder->weld_metric_spin_button("points", FieldUnit::PIXEL))
, m_xFtFillHoles(m_xBuilder->weld_label("tilesft"))
......
......@@ -40,6 +40,9 @@ svx/uiconfig/ui/findreplacedialog.ui://GtkLabel[@id='searchdir'] orphan-label
svx/uiconfig/ui/fontworkgallerydialog.ui://GtkLabel[@id='label1'] orphan-label
svx/uiconfig/ui/headfootformatpage.ui://GtkLabel[@id='labelHeaderFormat'] orphan-label
svx/uiconfig/ui/headfootformatpage.ui://GtkLabel[@id='labelFooterFormat'] orphan-label
svx/uiconfig/ui/imapdialog.ui://GtkLabel[@id='statusurl'] orphan-label
svx/uiconfig/ui/imapdialog.ui://GtkLabel[@id='statuspos'] orphan-label
svx/uiconfig/ui/imapdialog.ui://GtkLabel[@id='statussize'] orphan-label
svx/uiconfig/ui/mediaplayback.ui://GtkLabel[@id='label1'] orphan-label
svx/uiconfig/ui/mediaplayback.ui://GtkLabel[@id='label2'] orphan-label
svx/uiconfig/ui/mediaplayback.ui://GtkLabel[@id='label3'] orphan-label
......
......@@ -2143,6 +2143,7 @@ IMPL_LINK_NOARG(URLBox, FocusOutHdl, weld::Widget&, void)
pCtx->join();
pCtx.clear();
}
aFocusOutHdl.Call(*m_xWidget);
}
OUString URLBox::GetURL()
......
......@@ -1760,7 +1760,6 @@ awt::Rectangle SAL_CALL SvtValueSetAcc::getBounds()
return aRet;
}
awt::Point SAL_CALL SvtValueSetAcc::getLocation()
{
ThrowIfDisposed();
......@@ -1773,7 +1772,6 @@ awt::Point SAL_CALL SvtValueSetAcc::getLocation()
return aRet;
}
awt::Point SAL_CALL SvtValueSetAcc::getLocationOnScreen()
{
ThrowIfDisposed();
......@@ -1798,7 +1796,6 @@ awt::Point SAL_CALL SvtValueSetAcc::getLocationOnScreen()
return aScreenLoc;
}
awt::Size SAL_CALL SvtValueSetAcc::getSize()
{
ThrowIfDisposed();
......
......@@ -59,11 +59,9 @@ using namespace ::com::sun::star::accessibility;
// internal
/** initialize this component and set default values */
SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext(
const Reference< XAccessible >& rxParent,
GraphCtrl& rRepr ) :
SvxGraphCtrl& rRepr ) :
SvxGraphCtrlAccessibleContext_Base( m_aMutex ),
mxParent( rxParent ),
mpControl( &rRepr ),
mpModel (nullptr),
mpPage (nullptr),
......@@ -96,7 +94,7 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext(
}
maTreeInfo.SetSdrView( mpView );
maTreeInfo.SetDevice( mpControl );
maTreeInfo.SetDevice(&mpControl->GetDrawingArea()->get_ref_device());
maTreeInfo.SetViewForwarder( this );
}
......@@ -131,7 +129,8 @@ Reference< XAccessible > SvxGraphCtrlAccessibleContext::getAccessible( const Sdr
// create a new one and remember in our internal map
Reference< XShape > xShape( Reference< XShape >::query( const_cast<SdrObject*>(pObj)->getUnoShape() ) );
AccessibleShapeInfo aShapeInfo (xShape,mxParent);