weld SvxMultiPathDialog

Change-Id: I9a509654d72bbe5b346002a3b23793bf69330720
Reviewed-on: https://gerrit.libreoffice.org/67297
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2019-02-02 22:47:36 +00:00
parent a52f5a7fc5
commit 9e8383999c
8 changed files with 186 additions and 147 deletions

View File

@@ -41,33 +41,54 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::uno;
IMPL_LINK_NOARG(SvxMultiPathDialog, SelectHdl_Impl, SvTreeListBox*, void)
IMPL_LINK_NOARG(SvxMultiPathDialog, SelectHdl_Impl, weld::TreeView&, void)
{
sal_uLong nCount = m_pRadioLB->GetEntryCount();
bool bIsSelected = m_pRadioLB->FirstSelected() != nullptr;
auto nCount = m_xRadioLB->n_children();
bool bIsSelected = m_xRadioLB->get_selected_index() != -1;
bool bEnable = nCount > 1;
m_pDelBtn->Enable(bEnable && bIsSelected);
m_xDelBtn->set_sensitive(bEnable && bIsSelected);
}
IMPL_LINK_NOARG(SvxPathSelectDialog, SelectHdl_Impl, weld::TreeView&, void)
{
sal_uLong nCount = m_xPathLB->n_children();
auto nCount = m_xPathLB->n_children();
bool bIsSelected = m_xPathLB->get_selected_index() != -1;
bool bEnable = nCount > 1;
m_xDelBtn->set_sensitive(bEnable && bIsSelected);
}
IMPL_LINK( SvxMultiPathDialog, CheckHdl_Impl, SvTreeListBox*, pBox, void )
void SvxMultiPathDialog::HandleEntryChecked(int nRow)
{
SvTreeListEntry* pEntry =
pBox
? pBox->GetEntry( static_cast<svx::SvxRadioButtonListBox*>(pBox)->GetCurMousePoint() )
: m_pRadioLB->FirstSelected();
if ( pEntry )
m_pRadioLB->HandleEntryChecked( pEntry );
m_xRadioLB->select(nRow);
bool bChecked = m_xRadioLB->get_toggle(nRow, 0);
if (bChecked)
{
// we have radio button behavior -> so uncheck the other entries
int nCount = m_xRadioLB->n_children();
for (int i = 0; i < nCount; ++i)
{
if (i != nRow)
m_xRadioLB->set_toggle(i, false, 0);
}
}
}
IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl, Button*, void)
IMPL_LINK(SvxMultiPathDialog, CheckHdl_Impl, const row_col&, rRowCol, void)
{
HandleEntryChecked(rRowCol.first);
}
void SvxMultiPathDialog::AppendEntry(const OUString& rText, const OUString& rId)
{
m_xRadioLB->insert(nullptr, -1, nullptr, nullptr, nullptr,
nullptr, nullptr, false);
const int nRow = m_xRadioLB->n_children() - 1;
m_xRadioLB->set_toggle(nRow, false, 0);
m_xRadioLB->set_text(nRow, rText, 1);
m_xRadioLB->set_id(nRow, rId);
}
IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl, weld::Button&, void)
{
Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference < XFolderPicker2 > xFolderPicker = FolderPicker::create(xContext);
@@ -80,25 +101,20 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl, Button*, void)
OUString sInsPath;
osl::FileBase::getSystemPathFromFileURL(aURL, sInsPath);
sal_uLong nPos = m_pRadioLB->GetEntryPos( sInsPath, 1 );
if ( 0xffffffff == nPos ) //See svtools/source/contnr/svtabbx.cxx SvTabListBox::GetEntryPos
{
OUString sNewEntry( '\t' );
sNewEntry += sInsPath;
SvTreeListEntry* pEntry = m_pRadioLB->InsertEntry( sNewEntry );
OUString* pData = new OUString( aURL );
pEntry->SetUserData( pData );
}
else
if (m_xRadioLB->find_text(sInsPath) != -1)
{
OUString sMsg( CuiResId( RID_MULTIPATH_DBL_ERR ) );
sMsg = sMsg.replaceFirst( "%1", sInsPath );
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(m_xDialog.get(),
VclMessageType::Info, VclButtonsType::Ok, sMsg));
xInfoBox->run();
}
else
{
AppendEntry(sInsPath, aURL);
}
SelectHdl_Impl( nullptr );
SelectHdl_Impl(*m_xRadioLB);
}
}
@@ -132,30 +148,27 @@ IMPL_LINK_NOARG(SvxPathSelectDialog, AddHdl_Impl, weld::Button&, void)
}
}
IMPL_LINK_NOARG(SvxMultiPathDialog, DelHdl_Impl, Button*, void)
IMPL_LINK_NOARG(SvxMultiPathDialog, DelHdl_Impl, weld::Button&, void)
{
SvTreeListEntry* pEntry = m_pRadioLB->FirstSelected();
delete static_cast<OUString*>(pEntry->GetUserData());
bool bChecked = m_pRadioLB->GetCheckButtonState( pEntry ) == SvButtonState::Checked;
sal_uLong nPos = m_pRadioLB->GetEntryPos( pEntry );
m_pRadioLB->RemoveEntry( pEntry );
sal_uLong nCnt = m_pRadioLB->GetEntryCount();
if ( nCnt )
int nPos = m_xRadioLB->get_selected_index();
bool bChecked = m_xRadioLB->get_toggle(nPos, 0);
m_xRadioLB->remove(nPos);
int nCnt = m_xRadioLB->n_children();
if (nCnt)
{
nCnt--;
--nCnt;
if ( nPos > nCnt )
nPos = nCnt;
pEntry = m_pRadioLB->GetEntry( nPos );
if ( bChecked )
if (bChecked)
{
m_pRadioLB->SetCheckButtonState( pEntry, SvButtonState::Checked );
m_pRadioLB->HandleEntryChecked( pEntry );
m_xRadioLB->set_toggle(nPos, true, 0);
HandleEntryChecked(nPos);
}
else
m_pRadioLB->Select( pEntry );
m_xRadioLB->select(nPos);
}
SelectHdl_Impl( nullptr );
SelectHdl_Impl(*m_xRadioLB);
}
IMPL_LINK_NOARG(SvxPathSelectDialog, DelHdl_Impl, weld::Button&, void)
@@ -176,33 +189,28 @@ IMPL_LINK_NOARG(SvxPathSelectDialog, DelHdl_Impl, weld::Button&, void)
SelectHdl_Impl(*m_xPathLB);
}
SvxMultiPathDialog::SvxMultiPathDialog(vcl::Window* pParent)
: ModalDialog(pParent, "MultiPathDialog", "cui/ui/multipathdialog.ui")
SvxMultiPathDialog::SvxMultiPathDialog(weld::Window* pParent)
: GenericDialogController(pParent, "cui/ui/multipathdialog.ui", "MultiPathDialog")
, m_xRadioLB(m_xBuilder->weld_tree_view("paths"))
, m_xAddBtn(m_xBuilder->weld_button("add"))
, m_xDelBtn(m_xBuilder->weld_button("delete"))
{
get(m_pAddBtn, "add");
get(m_pDelBtn, "delete");
m_xRadioLB->set_size_request(m_xRadioLB->get_approximate_digit_width() * 60,
m_xRadioLB->get_text_height() * 10);
SvSimpleTableContainer* pRadioLBContainer = get<SvSimpleTableContainer>("paths");
Size aSize(LogicToPixel(Size(195, 77), MapMode(MapUnit::MapAppFont)));
pRadioLBContainer->set_width_request(aSize.Width());
pRadioLBContainer->set_height_request(aSize.Height());
m_pRadioLB = VclPtr<svx::SvxRadioButtonListBox>::Create(*pRadioLBContainer, 0);
std::vector<int> aWidths;
aWidths.push_back(m_xRadioLB->get_approximate_digit_width() * 3 + 6);
m_xRadioLB->set_column_fixed_widths(aWidths);
static long aStaticTabs[]= { 0, 12 };
m_pRadioLB->SvSimpleTable::SetTabs( SAL_N_ELEMENTS(aStaticTabs), aStaticTabs );
OUString sHeader(get<FixedText>("pathlist")->GetText());
m_pRadioLB->SetQuickHelpText( sHeader );
sHeader = "\t" + sHeader;
m_pRadioLB->InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HeaderBarItemBits::LEFT );
std::vector<int> aRadioColumns;
aRadioColumns.push_back(0);
m_xRadioLB->set_toggle_columns_as_radio(aRadioColumns);
m_xRadioLB->connect_toggled(LINK(this, SvxMultiPathDialog, CheckHdl_Impl));
m_xRadioLB->connect_changed(LINK(this, SvxMultiPathDialog, SelectHdl_Impl));
m_xAddBtn->connect_clicked(LINK(this, SvxMultiPathDialog, AddHdl_Impl));
m_xDelBtn->connect_clicked(LINK(this, SvxMultiPathDialog, DelHdl_Impl));
m_pRadioLB->SetSelectHdl( LINK( this, SvxMultiPathDialog, SelectHdl_Impl ) );
m_pRadioLB->SetCheckButtonHdl( LINK( this, SvxMultiPathDialog, CheckHdl_Impl ) );
m_pAddBtn->SetClickHdl( LINK( this, SvxMultiPathDialog, AddHdl_Impl ) );
m_pDelBtn->SetClickHdl( LINK( this, SvxMultiPathDialog, DelHdl_Impl ) );
SelectHdl_Impl( nullptr );
m_pRadioLB->ShowTable();
SelectHdl_Impl(*m_xRadioLB);
}
SvxPathSelectDialog::SvxPathSelectDialog(weld::Window* pParent)
@@ -223,25 +231,6 @@ SvxPathSelectDialog::SvxPathSelectDialog(weld::Window* pParent)
SvxMultiPathDialog::~SvxMultiPathDialog()
{
disposeOnce();
}
void SvxMultiPathDialog::dispose()
{
if (m_pRadioLB)
{
sal_uInt16 nPos = static_cast<sal_uInt16>(m_pRadioLB->GetEntryCount());
while ( nPos-- )
{
SvTreeListEntry* pEntry = m_pRadioLB->GetEntry( nPos );
delete static_cast<OUString*>(pEntry->GetUserData());
}
}
m_pRadioLB.disposeAndClear();
m_pAddBtn.clear();
m_pDelBtn.clear();
ModalDialog::dispose();
}
OUString SvxMultiPathDialog::GetPath() const
@@ -250,19 +239,18 @@ OUString SvxMultiPathDialog::GetPath() const
sal_Unicode cDelim = SVT_SEARCHPATH_DELIMITER;
OUString sWritable;
for ( sal_uLong i = 0; i < m_pRadioLB->GetEntryCount(); ++i )
for (int i = 0, nCount = m_xRadioLB->n_children(); i < nCount; ++i)
{
SvTreeListEntry* pEntry = m_pRadioLB->GetEntry(i);
if ( m_pRadioLB->GetCheckButtonState( pEntry ) == SvButtonState::Checked )
sWritable = *static_cast<OUString*>(pEntry->GetUserData());
if (m_xRadioLB->get_toggle(i, 0))
sWritable = m_xRadioLB->get_id(i);
else
{
if ( !sNewPath.isEmpty() )
if (!sNewPath.isEmpty())
sNewPath.append(cDelim);
sNewPath.append( *static_cast<OUString*>(pEntry->GetUserData()) );
sNewPath.append(m_xRadioLB->get_id(i));
}
}
if ( !sNewPath.isEmpty() )
if (!sNewPath.isEmpty())
sNewPath.append(cDelim);
sNewPath.append(sWritable);
@@ -288,7 +276,7 @@ void SvxMultiPathDialog::SetPath( const OUString& rPath )
if ( !rPath.isEmpty() )
{
const sal_Unicode cDelim = SVT_SEARCHPATH_DELIMITER;
sal_uLong nCount = 0;
int nCount = 0;
sal_Int32 nIndex = 0;
do
{
@@ -297,23 +285,20 @@ void SvxMultiPathDialog::SetPath( const OUString& rPath )
bool bIsSystemPath =
osl::FileBase::getSystemPathFromFileURL(sPath, sSystemPath) == osl::FileBase::E_None;
const OUString sEntry( "\t" + (bIsSystemPath ? sSystemPath : sPath));
SvTreeListEntry* pEntry = m_pRadioLB->InsertEntry( sEntry );
OUString* pURL = new OUString( sPath );
pEntry->SetUserData( pURL );
const OUString sEntry((bIsSystemPath ? sSystemPath : sPath));
AppendEntry(sEntry, sPath);
++nCount;
}
while (nIndex >= 0);
SvTreeListEntry* pEntry = m_pRadioLB->GetEntry( nCount - 1 );
if ( pEntry )
if (nCount)
{
m_pRadioLB->SetCheckButtonState( pEntry, SvButtonState::Checked );
m_pRadioLB->HandleEntryChecked( pEntry );
m_xRadioLB->set_toggle(nCount - 1, true, 0);
HandleEntryChecked(nCount - 1);
}
}
SelectHdl_Impl( nullptr );
SelectHdl_Impl(*m_xRadioLB);
}
void SvxPathSelectDialog::SetPath(const OUString& rPath)

View File

@@ -206,7 +206,10 @@ short AbstractSvxObjectTitleDescDialog_Impl::Execute()
return m_xDlg->run();
}
IMPL_ABSTDLG_BASE(AbstractSvxMultiPathDialog_Impl);
short AbstractSvxMultiPathDialog_Impl::Execute()
{
return m_xDlg->run();
}
short AbstractSvxPathSelectDialog_Impl::Execute()
{
@@ -751,17 +754,17 @@ void AbstractSvxObjectTitleDescDialog_Impl::GetDescription(OUString& rDescriptio
OUString AbstractSvxMultiPathDialog_Impl::GetPath() const
{
return pDlg->GetPath();
return m_xDlg->GetPath();
}
void AbstractSvxMultiPathDialog_Impl::SetPath( const OUString& rPath )
{
pDlg->SetPath( rPath );
m_xDlg->SetPath( rPath );
}
void AbstractSvxMultiPathDialog_Impl::SetTitle( const OUString& rNewTitle )
{
pDlg->SetText( rNewTitle );
m_xDlg->SetTitle(rNewTitle);
}
OUString AbstractSvxPathSelectDialog_Impl::GetPath() const
@@ -1230,10 +1233,9 @@ VclPtr<AbstractSvxObjectTitleDescDialog> AbstractDialogFactory_Impl::CreateSvxOb
return VclPtr<AbstractSvxObjectTitleDescDialog_Impl>::Create(std::make_unique<SvxObjectTitleDescDialog>(pParent, rTitle, rDescription));
}
VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxMultiPathDialog(vcl::Window* pParent)
VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxMultiPathDialog(weld::Window* pParent)
{
VclPtrInstance<SvxMultiPathDialog> pDlg(pParent);
return VclPtr<AbstractSvxMultiPathDialog_Impl>::Create( pDlg );
return VclPtr<AbstractSvxMultiPathDialog_Impl>::Create(std::make_unique<SvxMultiPathDialog>(pParent));
}
VclPtr<AbstractSvxMultiPathDialog> AbstractDialogFactory_Impl::CreateSvxPathSelectDialog(weld::Window* pParent)

View File

@@ -463,10 +463,16 @@ public:
virtual void GetDescription(OUString& rName) override;
};
class SvxMultiPathDialog;
class AbstractSvxMultiPathDialog_Impl : public AbstractSvxMultiPathDialog
{
DECL_ABSTDLG_BASE(AbstractSvxMultiPathDialog_Impl,SvxMultiPathDialog)
protected:
std::unique_ptr<SvxMultiPathDialog> m_xDlg;
public:
explicit AbstractSvxMultiPathDialog_Impl(std::unique_ptr<SvxMultiPathDialog> p)
: m_xDlg(std::move(p))
{
}
virtual short Execute() override;
virtual OUString GetPath() const override;
virtual void SetPath( const OUString& rPath ) override;
virtual void SetTitle( const OUString& rNewTitle ) override;
@@ -774,7 +780,7 @@ public:
virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) override;
virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription) override;
virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(vcl::Window* pParent) override;
virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(weld::Window* pParent) override;
virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxPathSelectDialog(weld::Window* pParent) override;
virtual VclPtr<AbstractSvxHpLinkDlg> CreateSvxHpLinkDlg(vcl::Window* pParent, SfxBindings* pBindings) override;
virtual VclPtr<AbstractFmSearchDialog> CreateFmSearchDialog(vcl::Window* pParent,

View File

@@ -19,10 +19,7 @@
#ifndef INCLUDED_CUI_SOURCE_INC_MULTIPAT_HXX
#define INCLUDED_CUI_SOURCE_INC_MULTIPAT_HXX
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <vcl/weld.hxx>
#include "radiobtnbox.hxx"
// define ----------------------------------------------------------------
@@ -35,25 +32,29 @@
#define CLASSPATH_DELIMITER ';'
#endif
class SvxMultiPathDialog : public ModalDialog
class SvxMultiPathDialog : public weld::GenericDialogController
{
private:
VclPtr<svx::SvxRadioButtonListBox> m_pRadioLB;
VclPtr<PushButton> m_pAddBtn;
VclPtr<PushButton> m_pDelBtn;
std::unique_ptr<weld::TreeView> m_xRadioLB;
std::unique_ptr<weld::Button> m_xAddBtn;
std::unique_ptr<weld::Button> m_xDelBtn;
DECL_LINK(AddHdl_Impl, Button*, void);
DECL_LINK(DelHdl_Impl, Button*, void);
DECL_LINK(SelectHdl_Impl, SvTreeListBox*, void);
DECL_LINK(CheckHdl_Impl, SvTreeListBox*, void);
void AppendEntry(const OUString& rText, const OUString& rId);
void HandleEntryChecked(int nRow);
DECL_LINK(AddHdl_Impl, weld::Button&, void);
DECL_LINK(DelHdl_Impl, weld::Button&, void);
DECL_LINK(SelectHdl_Impl, weld::TreeView&, void);
typedef std::pair<int, int> row_col;
DECL_LINK(CheckHdl_Impl, const row_col&, void);
public:
SvxMultiPathDialog(vcl::Window* pParent);
SvxMultiPathDialog(weld::Window* pParent);
virtual ~SvxMultiPathDialog() override;
virtual void dispose() override;
OUString GetPath() const;
void SetPath( const OUString& rPath );
void SetPath(const OUString& rPath);
void SetTitle(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
};
class SvxPathSelectDialog : public weld::GenericDialogController

View File

@@ -558,7 +558,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, Button*, void)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<AbstractSvxMultiPathDialog> pMultiDlg(
pFact->CreateSvxMultiPathDialog( this ));
pFact->CreateSvxMultiPathDialog(GetDialogFrameWeld()));
OUString sPath( sUser );
if ( !sPath.isEmpty() )

View File

@@ -1,14 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
<requires lib="LibreOffice" version="1.0"/>
<object class="GtkTreeStore" id="liststore1">
<columns>
<!-- column-name check1 -->
<column type="gboolean"/>
<!-- column-name text -->
<column type="gchararray"/>
<!-- column-name id -->
<column type="gchararray"/>
<!-- column-name checkvis1 -->
<column type="gboolean"/>
</columns>
</object>
<object class="GtkDialog" id="MultiPathDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="multipathdialog|MultiPathDialog">Select Paths</property>
<property name="resizable">False</property>
<property name="type_hint">normal</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
@@ -140,29 +154,59 @@
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<object class="svtlo-SvSimpleTableContainer" id="paths">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="search_column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Simple Table Container-selection"/>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="paths">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="vexpand">True</property>
<property name="model">liststore1</property>
<property name="search_column">0</property>
<property name="show_expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Macro Library List-selection2"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn4">
<property name="resizable">True</property>
<property name="spacing">6</property>
<property name="alignment">0.5</property>
<child>
<object class="GtkCellRendererToggle" id="cellrenderer5">
<property name="radio">True</property>
</object>
<attributes>
<attribute name="visible">3</attribute>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn5">
<property name="resizable">True</property>
<property name="spacing">6</property>
<property name="title" translatable="yes" context="multipathdialog|pathlist">Path list</property>
<child>
<object class="GtkCellRendererText" id="cellrenderer4"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="pathlist">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="multipathdialog|pathlist">Path list:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>

View File

@@ -392,7 +392,7 @@ public:
virtual VclPtr<AbstractSvxObjectNameDialog> CreateSvxObjectNameDialog(weld::Window* pParent, const OUString& rName) = 0;
virtual VclPtr<AbstractSvxObjectTitleDescDialog> CreateSvxObjectTitleDescDialog(weld::Window* pParent, const OUString& rTitle, const OUString& rDescription) = 0;
virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(vcl::Window* pParent) = 0 ;
virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxMultiPathDialog(weld::Window* pParent) = 0 ;
virtual VclPtr<AbstractSvxMultiPathDialog> CreateSvxPathSelectDialog(weld::Window* pParent) = 0 ;
virtual VclPtr<AbstractSvxHpLinkDlg> CreateSvxHpLinkDlg(vcl::Window* pParent, SfxBindings* pBindings)=0;
virtual VclPtr<AbstractFmSearchDialog> CreateFmSearchDialog(vcl::Window* pParent,

View File

@@ -5261,7 +5261,7 @@ public:
virtual int find_text(const OUString& rText) const override
{
Search aSearch(rText, 0);
Search aSearch(rText, m_nTextCol);
gtk_tree_model_foreach(GTK_TREE_MODEL(m_pTreeStore), foreach_find, &aSearch);
return aSearch.index;
}
@@ -7185,7 +7185,8 @@ public:
virtual int find_id(const OUString& rId) const override
{
return find(rId, 1);
gint id_column = gtk_combo_box_get_id_column(m_pComboBox);
return find(rId, id_column);
}
virtual void clear() override