20#include <osl/diagnose.h>
27 uno::Reference< container::XNamed > & xN,
28 uno::Reference< container::XNameAccess > & xNA )
29 : GenericDialogController(pParent,
"modules/swriter/ui/renameobjectdialog.ui",
"RenameObjectDialog")
32 , m_xNewNameED(m_xBuilder->weld_entry(
"entry"))
33 , m_xOk(m_xBuilder->weld_button(
"ok"))
45 m_xOk->set_sensitive(
false);
50 rTest = m_aTextFilter.filter(rTest);
58 m_xNamed->setName(m_xNewNameED->get_text());
60 catch (
const uno::RuntimeException&)
62 OSL_FAIL(
"name wasn't changed");
69 OUString sTmp(rEdit.get_text());
71 m_xOk->set_sensitive(!sTmp.isEmpty()
72 && !m_xNameAccess->hasByName(sTmp)
73 && (!m_xSecondAccess.is() || !m_xSecondAccess->hasByName(sTmp))
74 && (!m_xThirdAccess.is() || !m_xThirdAccess->hasByName(sTmp))
Reference< XExecutableDialog > m_xDialog
SwRenameXNamedDlg(weld::Widget *pParent, css::uno::Reference< css::container::XNamed > &xNamed, css::uno::Reference< css::container::XNameAccess > &xNameAccess)
std::unique_ptr< weld::Entry > m_xNewNameED
std::unique_ptr< weld::Button > m_xOk
css::uno::Reference< css::container::XNamed > & m_xNamed
std::shared_ptr< weld::Dialog > m_xDialog
#define LINK(Instance, Class, Member)
IMPL_LINK(SwRenameXNamedDlg, TextFilterHdl, OUString &, rTest, bool)
IMPL_LINK_NOARG(SwRenameXNamedDlg, OkHdl, weld::Button &, void)