Kaydet (Commit) 73482f5e authored tarafından Caolán McNamara's avatar Caolán McNamara

weld ScSpecialFilterDlg

Change-Id: Iecf88c5720f2407654d85a1a70a04faed43fd690
Reviewed-on: https://gerrit.libreoffice.org/70832
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 6f43902b
This diff is collapsed.
......@@ -33,7 +33,6 @@
#include <vector>
#include <map>
class ScFilterOptionsMgr;
class FilterOptionsMgr;
class ScViewData;
class ScDocument;
......@@ -158,44 +157,24 @@ private:
DECL_LINK( TimeOutHdl, Timer*, void );
};
class ScSpecialFilterDlg : public ScAnyRefDlg
class ScSpecialFilterDlg : public ScAnyRefDlgController
{
public:
ScSpecialFilterDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
const SfxItemSet& rArgSet );
virtual ~ScSpecialFilterDlg() override;
virtual void dispose() override;
ScSpecialFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
const SfxItemSet& rArgSet);
virtual ~ScSpecialFilterDlg() override;
virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override;
virtual bool IsRefInputMode() const override;
virtual void SetActive() override;
virtual bool Close() override;
virtual void Close() override;
private:
VclPtr<ListBox> pLbFilterArea;
VclPtr<formula::RefEdit> pEdFilterArea;
VclPtr<formula::RefButton> pRbFilterArea;
VclPtr<VclExpander> pExpander;
VclPtr<CheckBox> pBtnCase;
VclPtr<CheckBox> pBtnRegExp;
VclPtr<CheckBox> pBtnHeader;
VclPtr<CheckBox> pBtnUnique;
VclPtr<CheckBox> pBtnCopyResult;
VclPtr<ListBox> pLbCopyArea;
VclPtr<formula::RefEdit> pEdCopyArea;
VclPtr<formula::RefButton> pRbCopyArea;
VclPtr<CheckBox> pBtnDestPers;
VclPtr<FixedText> pFtDbAreaLabel;
VclPtr<FixedText> pFtDbArea;
const OUString aStrUndefined;
VclPtr<OKButton> pBtnOk;
VclPtr<CancelButton> pBtnCancel;
std::unique_ptr<ScFilterOptionsMgr> pOptionsMgr;
std::unique_ptr<FilterOptionsMgr> pOptionsMgr;
const sal_uInt16 nWhichQuery;
const ScQueryParam theQueryData;
......@@ -203,21 +182,45 @@ private:
ScViewData* pViewData;
ScDocument* pDoc;
VclPtr<formula::RefEdit> pRefInputEdit;
bool bRefInputMode;
// Hack: RefInput control
std::unique_ptr<Idle> pIdle;
formula::WeldRefEdit* m_pRefInputEdit;
std::unique_ptr<weld::ComboBox> m_xLbFilterArea;
std::unique_ptr<formula::WeldRefEdit> m_xEdFilterArea;
std::unique_ptr<formula::WeldRefButton> m_xRbFilterArea;
std::unique_ptr<weld::Expander> m_xExpander;
std::unique_ptr<weld::CheckButton> m_xBtnCase;
std::unique_ptr<weld::CheckButton> m_xBtnRegExp;
std::unique_ptr<weld::CheckButton> m_xBtnHeader;
std::unique_ptr<weld::CheckButton> m_xBtnUnique;
std::unique_ptr<weld::CheckButton> m_xBtnCopyResult;
std::unique_ptr<weld::ComboBox> m_xLbCopyArea;
std::unique_ptr<formula::WeldRefEdit> m_xEdCopyArea;
std::unique_ptr<formula::WeldRefButton> m_xRbCopyArea;
std::unique_ptr<weld::CheckButton> m_xBtnDestPers;
std::unique_ptr<weld::Label> m_xFtDbAreaLabel;
std::unique_ptr<weld::Label> m_xFtDbArea;
std::unique_ptr<weld::Button> m_xBtnOk;
std::unique_ptr<weld::Button> m_xBtnCancel;
std::unique_ptr<weld::Frame> m_xFilterFrame;
std::unique_ptr<weld::Label> m_xFilterLabel;
private:
void Init( const SfxItemSet& rArgSet );
ScQueryItem* GetOutputItem( const ScQueryParam& rParam,
const ScRange& rSource );
// Handler
DECL_LINK( FilterAreaSelHdl, ListBox&, void );
DECL_LINK( FilterAreaModHdl, Edit&, void );
DECL_LINK( EndDlgHdl, Button*, void );
DECL_LINK( FilterAreaSelHdl, weld::ComboBox&, void );
DECL_LINK( FilterAreaModHdl, formula::WeldRefEdit&, void );
DECL_LINK( EndDlgHdl, weld::Button&, void );
// Hack: RefInput control
DECL_LINK( TimeOutHdl, Timer*, void );
......
......@@ -52,7 +52,7 @@ DECL_WRAPPER_WITHID(ScXMLSourceDlgWrapper)
DECL_WRAPPER_WITHID(ScPivotLayoutWrapper)
DECL_WRAPPER_WITHID_CONTROLLER(ScTabOpDlgWrapper)
DECL_WRAPPER_WITHID_CONTROLLER(ScFilterDlgWrapper)
DECL_WRAPPER_WITHID(ScSpecialFilterDlgWrapper)
DECL_WRAPPER_WITHID_CONTROLLER(ScSpecialFilterDlgWrapper)
DECL_WRAPPER_WITHID_CONTROLLER(ScDbNameDlgWrapper)
DECL_WRAPPER_WITHID_CONTROLLER(ScConsolidateDlgWrapper)
DECL_WRAPPER_WITHID_CONTROLLER(ScPrintAreasDlgWrapper)
......
......@@ -40,7 +40,7 @@ SFX_IMPL_MODELESSDIALOG_WITHID(ScXMLSourceDlgWrapper, SID_MANAGE_XML_SOURCE)
SFX_IMPL_MODELESSDIALOG_WITHID(ScPivotLayoutWrapper, SID_OPENDLG_PIVOTTABLE )
SFX_IMPL_CHILDWINDOW_WITHID(ScTabOpDlgWrapper, SID_OPENDLG_TABOP )
SFX_IMPL_CHILDWINDOW_WITHID(ScFilterDlgWrapper, SID_FILTER )
SFX_IMPL_MODELESSDIALOG_WITHID(ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER )
SFX_IMPL_CHILDWINDOW_WITHID(ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER )
SFX_IMPL_CHILDWINDOW_WITHID(ScDbNameDlgWrapper, SID_DEFINE_DBNAME )
SFX_IMPL_CHILDWINDOW_WITHID(ScConsolidateDlgWrapper, SID_OPENDLG_CONSOLIDATE)
SFX_IMPL_CHILDWINDOW_WITHID(ScPrintAreasDlgWrapper, SID_OPENDLG_EDIT_PRINTAREA )
......@@ -137,7 +137,7 @@ IMPL_CONTROLLER_CHILD_CTOR( ScTabOpDlgWrapper, SID_OPENDLG_TABOP )
IMPL_CONTROLLER_CHILD_CTOR( ScFilterDlgWrapper, SID_FILTER )
IMPL_CHILD_CTOR( ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER )
IMPL_CONTROLLER_CHILD_CTOR( ScSpecialFilterDlgWrapper, SID_SPECIAL_FILTER )
IMPL_CONTROLLER_CHILD_CTOR( ScDbNameDlgWrapper, SID_DEFINE_DBNAME )
......
......@@ -144,35 +144,6 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
switch( nSlotId )
{
case SID_SPECIAL_FILTER:
{
ScQueryParam aQueryParam;
SfxItemSet aArgSet( GetPool(),
svl::Items<SCITEM_QUERYDATA,
SCITEM_QUERYDATA>{} );
ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, ScGetDBSelection::RowDown);
pDBData->ExtendDataArea(pDoc);
pDBData->GetQueryParam( aQueryParam );
ScRange aArea;
pDBData->GetArea(aArea);
MarkRange(aArea, false);
ScQueryItem aItem( SCITEM_QUERYDATA, &GetViewData(), &aQueryParam );
ScRange aAdvSource;
if (pDBData->GetAdvancedQuerySource(aAdvSource))
aItem.SetAdvancedQuerySource( &aAdvSource );
aArgSet.Put( aItem );
// mark current sheet (due to RefInput in dialog)
GetViewData().SetRefTabNo( GetViewData().GetTabNo() );
pResult = VclPtr<ScSpecialFilterDlg>::Create( pB, pCW, pParent, aArgSet );
}
break;
case SID_OPENDLG_OPTSOLVER:
{
ScViewData& rViewData = GetViewData();
......@@ -485,6 +456,34 @@ std::unique_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
xResult.reset(new ScFilterDlg(pB, pCW, pParent, aArgSet));
break;
}
case SID_SPECIAL_FILTER:
{
ScQueryParam aQueryParam;
SfxItemSet aArgSet( GetPool(),
svl::Items<SCITEM_QUERYDATA,
SCITEM_QUERYDATA>{} );
ScDBData* pDBData = GetDBData(false, SC_DB_MAKE, ScGetDBSelection::RowDown);
pDBData->ExtendDataArea(pDoc);
pDBData->GetQueryParam( aQueryParam );
ScRange aArea;
pDBData->GetArea(aArea);
MarkRange(aArea, false);
ScQueryItem aItem( SCITEM_QUERYDATA, &GetViewData(), &aQueryParam );
ScRange aAdvSource;
if (pDBData->GetAdvancedQuerySource(aAdvSource))
aItem.SetAdvancedQuerySource( &aAdvSource );
aArgSet.Put( aItem );
// mark current sheet (due to RefInput in dialog)
GetViewData().SetRefTabNo( GetViewData().GetTabNo() );
xResult.reset(new ScSpecialFilterDlg(pB, pCW, pParent, aArgSet));
break;
}
}
if (xResult)
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<!-- Generated with glade 3.22.1 -->
<interface domain="sc">
<requires lib="gtk+" version="3.18"/>
<requires lib="LibreOffice" version="1.0"/>
<object class="GtkDialog" id="AdvancedFilterDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="advancedfilterdialog|AdvancedFilterDialog">Advanced Filter</property>
<property name="resizable">False</property>
<property name="default_width">0</property>
<property name="default_height">0</property>
<property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="visible">True</property>
......@@ -101,7 +105,7 @@
<property name="vexpand">True</property>
<property name="column_spacing">12</property>
<child>
<object class="foruilo-RefButton" id="rbfilterarea">
<object class="GtkButton" id="rbfilterarea">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......@@ -118,9 +122,6 @@
<object class="GtkComboBoxText" id="lbfilterarea">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="width_chars">20</property>
<property name="entry_text_column">0</property>
<property name="id_column">1</property>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -128,10 +129,11 @@
</packing>
</child>
<child>
<object class="foruilo-RefEdit" id="edfilterarea">
<object class="GtkEntry" id="edfilterarea">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="activates_default">True</property>
<property name="width_chars">30</property>
</object>
<packing>
......@@ -303,9 +305,6 @@
<object class="GtkComboBoxText" id="lbcopyarea">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="width_chars">20</property>
<property name="entry_text_column">0</property>
<property name="id_column">1</property>
<accessibility>
<relation type="labelled-by" target="copyresult"/>
</accessibility>
......@@ -321,7 +320,7 @@
</packing>
</child>
<child>
<object class="foruilo-RefEdit" id="edcopyarea">
<object class="GtkEntry" id="edcopyarea">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="margin_bottom">1</property>
......@@ -342,7 +341,7 @@
</packing>
</child>
<child>
<object class="foruilo-RefButton" id="rbcopyarea">
<object class="GtkButton" id="rbcopyarea">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
......
sc/uiconfig/scalc/ui/advancedfilterdialog.ui://foruilo-RefEdit[@id='edfilterarea'] no-labelled-by
sc/uiconfig/scalc/ui/advancedfilterdialog.ui://GtkEntry[@id='edfilterarea'] no-labelled-by
sc/uiconfig/scalc/ui/advancedfilterdialog.ui://GtkButton[@id='rbfilterarea'] button-no-label
sc/uiconfig/scalc/ui/advancedfilterdialog.ui://GtkButton[@id='rbcopyarea'] button-no-label
sc/uiconfig/scalc/ui/advancedfilterdialog.ui://GtkLabel[@id='dbarealabel'] orphan-label
sc/uiconfig/scalc/ui/advancedfilterdialog.ui://GtkLabel[@id='dbarea'] orphan-label
sc/uiconfig/scalc/ui/aggregatefunctionentry.ui:GtkGrid[@id='grid']/GtkBox/GtkLabel orphan-label
......
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