20#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
37 : GenericDialogController(pParent,
"modules/swriter/ui/insertscript.ui",
"InsertScriptDialog")
41 , m_xTypeED(m_xBuilder->weld_entry(
"scripttype"))
42 , m_xUrlRB(m_xBuilder->weld_radio_button(
"url"))
43 , m_xEditRB(m_xBuilder->weld_radio_button(
"text"))
44 , m_xUrlPB(m_xBuilder->weld_button(
"browse"))
45 , m_xUrlED(m_xBuilder->weld_entry(
"urlentry"))
46 , m_xEditED(m_xBuilder->weld_text_view(
"textentry"))
47 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
48 , m_xPrevBtn(m_xBuilder->weld_button(
"previous"))
49 , m_xNextBtn(m_xBuilder->weld_button(
"next"))
83 m_pSh->EnterStdMode();
87 m_pField =
static_cast<SwScriptField*
>(m_pMgr->GetCurField());
89 UpdateFromRadioButtons();
94 m_pSh->EnterStdMode();
98 m_pField =
static_cast<SwScriptField*
>(m_pMgr->GetCurField());
100 UpdateFromRadioButtons();
111 bool bTravel =
false;
112 bool bNext(
false), bPrev(
false);
127 bTravel |= bNext || bPrev;
202 if (!rButton.get_active())
204 UpdateFromRadioButtons();
209 bool bEnable =
m_xUrlRB->get_active();
221 if(
m_xUrlPB->get_sensitive() && !bEnable )
230 m_pFileDlg.reset(new ::sfx2::FileDialogHelper(
231 ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
232 FileDialogFlags::Insert,
"swriter", SfxFilterFlags::NONE, SfxFilterFlags::NONE,
m_xDialog.get()));
242 OUString sFileName = m_pFileDlg->GetPath();
243 if ( !sFileName.isEmpty() )
246 if ( INetProtocol::File == aINetURL.
GetProtocol() )
249 m_xUrlED->set_text(sFileName);
Reference< XExecutableDialog > m_xDialog
OUString PathToFileName() const
INetProtocol GetProtocol() const
const INetURLObject & GetURLObject() const
SfxMedium * GetMedium() const
bool IsReadOnlyAvailable() const
SwPaM * CreateCursor()
delete the current cursor and make the following into the current
void EndAction(const bool bIdleEnd=false)
void DestroyCursor()
transform TableCursor to normal cursor, nullify Tablemode
bool HasReadonlySel(bool isReplace=false) const
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
SwFieldType * GetTyp() const
std::unique_ptr< weld::Button > m_xPrevBtn
std::unique_ptr< weld::Button > m_xOKBtn
std::unique_ptr< weld::RadioButton > m_xEditRB
std::unique_ptr< weld::TextView > m_xEditED
virtual ~SwJavaEditDialog() override
std::unique_ptr< sfx2::FileDialogHelper > m_pFileDlg
void UpdateFromRadioButtons()
std::unique_ptr< SwFieldMgr > m_pMgr
std::unique_ptr< weld::Button > m_xUrlPB
std::unique_ptr< weld::Entry > m_xTypeED
std::unique_ptr< weld::RadioButton > m_xUrlRB
std::unique_ptr< weld::Button > m_xNextBtn
SwJavaEditDialog(weld::Window *pParent, SwWrtShell *pWrtSh)
std::unique_ptr< weld::Entry > m_xUrlED
virtual OUString GetPar1() const override
Type.
virtual OUString GetPar2() const override
Text.
SwDocShell * GetDocShell()
Used by the UI to modify the document model.
const SwView & GetView() const
std::shared_ptr< weld::Dialog > m_xDialog
IMPL_LINK_NOARG(SwJavaEditDialog, PrevHdl, weld::Button &, void)
IMPL_LINK(SwJavaEditDialog, RadioButtonHdl, weld::Toggleable &, rButton, void)
#define LINK(Instance, Class, Member)
SVL_DLLPUBLIC Link< OUString *, bool > const & GetMaybeFileHdl()
SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const &rTheBaseURIRef, OUString const &rTheRelURIRef, Link< OUString *, bool > const &rMaybeFileHdl=Link< OUString *, bool >(), bool bCheckFileExists=true, bool bIgnoreFragment=false, INetURLObject::EncodeMechanism eEncodeMechanism=INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
OUString SwResId(TranslateId aId)