Kaydet (Commit) 72ebf150 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SwCaptionDialog

Change-Id: I5babfbf3489f88c5d6cdeffbd514d86368f04fa9
Reviewed-on: https://gerrit.libreoffice.org/65014
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 320e8d38
......@@ -223,9 +223,6 @@
<glade-widget-class title="Calc Table Preview" name="sclo-ScAutoFmtPreview"
generic-name="Calc Table Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Caption Preview" name="swuilo-SwCaptionPreview"
generic-name="Caption Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Extension List" name="deploymentgui-ExtensionBox"
generic-name="Extensions List" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
......
......@@ -510,7 +510,6 @@ custom_widgets = [
'SvxTextEncodingBox',
'SvxTextEncodingBox',
'SwAddressPreview',
'SwCaptionPreview',
'SwFieldRefTreeListBox',
'SwGlTreeListBox',
'SwIdxTreeListBox',
......
......@@ -377,7 +377,7 @@ public:
virtual VclPtr<SfxAbstractTabDialog> CreateSwCharDlg(weld::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
SwCharDlgMode nDialogMode, const OUString* pFormatStr = nullptr) = 0;
virtual VclPtr<AbstractSwConvertTableDlg> CreateSwConvertTableDlg(SwView& rView, bool bToTable) = 0;
virtual VclPtr<VclAbstractDialog> CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV) = 0;
virtual VclPtr<VclAbstractDialog> CreateSwCaptionDialog(weld::Window *pParent, SwView &rV) = 0;
virtual VclPtr<AbstractSwInsertDBColAutoPilot> CreateSwInsertDBColAutoPilot(SwView& rView,
css::uno::Reference< css::sdbc::XDataSource> rxSource,
......
......@@ -495,7 +495,6 @@ void CaptionPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rect
rRenderContext.DrawText(Point(4, 6), maText);
}
IMPL_LINK(SwCaptionOptPage, TextFilterHdl, OUString&, rTest, bool)
{
rTest = m_aTextFilter.filter(rTest);
......
......@@ -801,10 +801,9 @@ VclPtr<AbstractSwConvertTableDlg> SwAbstractDialogFactory_Impl::CreateSwConvertT
return VclPtr<AbstractSwConvertTableDlg_Impl>::Create(o3tl::make_unique<SwConvertTableDlg>(rView, bToTable));
}
VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV)
VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwCaptionDialog(weld::Window *pParent, SwView &rV)
{
VclPtr<Dialog> pDlg = VclPtr<SwCaptionDialog>::Create( pParent, rV );
return VclPtr<VclAbstractDialog_Impl>::Create( pDlg );
return VclPtr<AbstractGenericDialog_Impl>::Create(o3tl::make_unique<SwCaptionDialog>(pParent, rV));
}
VclPtr<AbstractSwInsertDBColAutoPilot> SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView,
......
......@@ -604,7 +604,7 @@ public:
virtual VclPtr<SfxAbstractTabDialog> CreateSwCharDlg(weld::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
SwCharDlgMode nDialogMode, const OUString* pFormatStr = nullptr) override;
virtual VclPtr<AbstractSwConvertTableDlg> CreateSwConvertTableDlg(SwView& rView, bool bToTable) override;
virtual VclPtr<VclAbstractDialog> CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV) override;
virtual VclPtr<VclAbstractDialog> CreateSwCaptionDialog(weld::Window *pParent, SwView &rV) override;
virtual VclPtr<AbstractSwInsertDBColAutoPilot> CreateSwInsertDBColAutoPilot(SwView& rView,
css::uno::Reference< css::sdbc::XDataSource> rxSource,
css::uno::Reference<css::sdbcx::XColumnsSupplier> xColSupp,
......
This diff is collapsed.
......@@ -19,11 +19,7 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_CPTION_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_CPTION_HXX
#include <svx/stddlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/edit.hxx>
#include <vcl/button.hxx>
#include <sfx2/basedlgs.hxx>
#include "actctrl.hxx"
#include <com/sun/star/container/XNameAccess.hpp>
......@@ -34,28 +30,10 @@
class SwFieldMgr;
class SwView;
class SwCaptionDialog : public SvxStandardDialog
class SwCaptionDialog : public SfxDialogController
{
VclPtr<Edit> m_pTextEdit;
VclPtr<ComboBox> m_pCategoryBox;
OUString const m_sNone;
TextFilterAutoConvert m_aTextFilter;
VclPtr<FixedText> m_pFormatText;
VclPtr<ListBox> m_pFormatBox;
//#i61007# order of captions
VclPtr<FixedText> m_pNumberingSeparatorFT;
VclPtr<Edit> m_pNumberingSeparatorED;
VclPtr<FixedText> m_pSepText;
VclPtr<Edit> m_pSepEdit;
VclPtr<FixedText> m_pPosText;
VclPtr<ListBox> m_pPosBox;
VclPtr<OKButton> m_pOKButton;
VclPtr<PushButton> m_pAutoCaptionButton;
VclPtr<PushButton> m_pOptionButton;
VclPtr<SwCaptionPreview> m_pPreview;
SwView &rView; // search per active, avoid View
std::unique_ptr<SwFieldMgr> pMgr; // pointer to save the include
......@@ -65,22 +43,41 @@ class SwCaptionDialog : public SvxStandardDialog
css::uno::Reference< css::container::XNameAccess > xNameAccess;
DECL_LINK(SelectHdl, ComboBox&, void);
DECL_LINK(SelectListBoxHdl, ListBox&, void);
DECL_LINK(ModifyHdl, Edit&, void);
DECL_LINK(OptionHdl, Button *, void);
DECL_LINK(CaptionHdl, Button *, void);
virtual void Apply() override;
void DrawSample();
void ApplyCaptionOrder(); //#i61007# order of captions
CaptionPreview m_aPreview;
std::unique_ptr<weld::Entry> m_xTextEdit;
std::unique_ptr<weld::ComboBox> m_xCategoryBox;
std::unique_ptr<weld::Label> m_xFormatText;
std::unique_ptr<weld::ComboBox> m_xFormatBox;
//#i61007# order of captions
std::unique_ptr<weld::Label> m_xNumberingSeparatorFT;
std::unique_ptr<weld::Entry> m_xNumberingSeparatorED;
std::unique_ptr<weld::Label> m_xSepText;
std::unique_ptr<weld::Entry> m_xSepEdit;
std::unique_ptr<weld::Label> m_xPosText;
std::unique_ptr<weld::ComboBox> m_xPosBox;
std::unique_ptr<weld::Button> m_xOKButton;
std::unique_ptr<weld::Button> m_xAutoCaptionButton;
std::unique_ptr<weld::Button> m_xOptionButton;
std::unique_ptr<weld::CustomWeld> m_xPreview;
DECL_LINK(SelectListBoxHdl, weld::ComboBox&, void);
DECL_LINK(ModifyEntryHdl, weld::Entry&, void);
DECL_LINK(ModifyComboHdl, weld::ComboBox&, void);
DECL_LINK(OptionHdl, weld::Button&, void);
DECL_LINK(CaptionHdl, weld::Button&, void);
DECL_LINK(TextFilterHdl, OUString&, bool);
void Apply();
void ModifyHdl();
void DrawSample();
void ApplyCaptionOrder(); //#i61007# order of captions
static OUString our_aSepTextSave; // Save caption separator text
public:
SwCaptionDialog( vcl::Window *pParent, SwView &rV );
SwCaptionDialog(weld::Window *pParent, SwView &rV);
virtual short run() override;
virtual ~SwCaptionDialog() override;
virtual void dispose() override;
};
#endif
......
......@@ -46,14 +46,12 @@ using namespace css;
void SwView::ExecDlgExt(SfxRequest const &rReq)
{
vcl::Window& rMDI = GetViewFrame()->GetWindow();
switch ( rReq.GetSlot() )
{
case FN_INSERT_CAPTION:
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
ScopedVclPtr<VclAbstractDialog> pDialog(pFact->CreateSwCaptionDialog( &rMDI, *this ));
ScopedVclPtr<VclAbstractDialog> pDialog(pFact->CreateSwCaptionDialog(GetFrameWeld(), *this ));
pDialog->Execute();
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment