20 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
32 #include <strings.hrc>
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);
#define LINK(Instance, Class, Member)
std::shared_ptr< weld::Dialog > m_xDialog
std::unique_ptr< weld::Button > m_xNextBtn
std::unique_ptr< SwFieldMgr > m_pMgr
std::unique_ptr< weld::RadioButton > m_xUrlRB
sal_uInt32 GetFormat() const
Query parameters for dialog and for BASIC.
std::unique_ptr< weld::Entry > m_xUrlED
std::unique_ptr< weld::Button > m_xUrlPB
void DestroyCursor()
transform TableCursor to normal cursor, nullify Tablemode
void UpdateFromRadioButtons()
virtual OUString GetPar1() const override
Type.
OUString PathToFileName() const
Used by the UI to modify the document model.
OUString SwResId(TranslateId aId)
std::unique_ptr< sfx2::FileDialogHelper > m_pFileDlg
std::unique_ptr< weld::Button > m_xPrevBtn
const SwView & GetView() const
std::unique_ptr< weld::TextView > m_xEditED
SwPaM * CreateCursor()
delete the current cursor and make the following into the current
SVL_DLLPUBLIC Link< OUString *, bool > const & GetMaybeFileHdl()
SwJavaEditDialog(weld::Window *pParent, SwWrtShell *pWrtSh)
virtual OUString GetPar2() const override
Text.
std::unique_ptr< weld::Entry > m_xTypeED
bool HasReadonlySel() const
SwDocShell * GetDocShell()
SwFieldType * GetTyp() const
IMPL_LINK(SwJavaEditDialog, RadioButtonHdl, weld::Toggleable &, rButton, void)
bool IsReadOnlyAvailable() const
INetProtocol GetProtocol() const
std::unique_ptr< weld::RadioButton > m_xEditRB
Reference< XExecutableDialog > m_xDialog
const INetURLObject & GetURLObject() const
virtual ~SwJavaEditDialog() override
IMPL_LINK_NOARG(SwJavaEditDialog, PrevHdl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xOKBtn
void EndAction(const bool bIdleEnd=false)
bool m_bDetectedRangeSegmentation false
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)
SfxMedium * GetMedium() const