37#include <com/sun/star/script/XLibraryContainer2.hpp>
38#include <com/sun/star/resource/StringResourceWithLocation.hpp>
39#include <com/sun/star/ucb/SimpleFileAccess.hpp>
40#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
41#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
42#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
43#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
52#include <svx/svxids.hrc>
79 const OUString& aLibName,
const OUString& aName,
80 css::uno::Reference<css::container::XNameContainer>
const& xDialogModel)
83 ,m_pEditor(new
DlgEditor(*this, m_rLayout, rDocument.isDocument()
84 ? rDocument.getDocument()
85 :
Reference<frame::XModel>(), xDialogModel))
87 ,m_nControlSlotId(SID_INSERT_SELECT)
91 m_pEditor->GetModel().SetNotifyUndoActionHdl(
99 if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) )
138 pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER );
152 pBindings->Invalidate( SID_SHOW_PROPERTYBROWSER );
153 pBindings->Invalidate( SID_DOC_MODIFIED );
154 pBindings->Invalidate( SID_SAVEDOC );
155 pBindings->Invalidate( SID_COPY );
156 pBindings->Invalidate( SID_CUT );
172 pDispatcher->Execute( SID_BACKSPACE );
177 pBindings->
Invalidate( SID_SHOW_PROPERTYBROWSER );
182 Window::KeyInput( rKEvt );
196 if ( ( rCEvt.
GetCommand() == CommandEventId::Wheel ) ||
197 ( rCEvt.
GetCommand() == CommandEventId::StartAutoScroll ) ||
198 ( rCEvt.
GetCommand() == CommandEventId::AutoScroll ) )
202 else if ( rCEvt.
GetCommand() == CommandEventId::ContextMenu )
246 bool bIsCalc =
false;
253 if ( xServiceInfo.is() && xServiceInfo->supportsService(
"com.sun.star.sheet.SpreadsheetDocument" ) )
274 if ( !
m_pEditor->GetView().AreObjectsMarked() )
283 if ( !
m_pEditor->GetView().AreObjectsMarked() )
297 case SID_DIALOG_TESTMODE:
306 case SID_CHOOSE_CONTROLS:
313 case SID_SHOW_PROPERTYBROWSER:
317 if ( pViewFrame && !pViewFrame->
HasChildWindow( SID_SHOW_PROPERTYBROWSER ) && !
m_pEditor->GetView().AreObjectsMarked() )
324 case SID_INSERT_FORM_RADIO:
325 case SID_INSERT_FORM_CHECK:
326 case SID_INSERT_FORM_LIST:
327 case SID_INSERT_FORM_COMBO:
328 case SID_INSERT_FORM_VSCROLL:
329 case SID_INSERT_FORM_HSCROLL:
330 case SID_INSERT_FORM_SPIN:
339 case SID_INSERT_SELECT:
340 case SID_INSERT_PUSHBUTTON:
341 case SID_INSERT_RADIOBUTTON:
342 case SID_INSERT_CHECKBOX:
343 case SID_INSERT_LISTBOX:
344 case SID_INSERT_COMBOBOX:
345 case SID_INSERT_GROUPBOX:
346 case SID_INSERT_EDIT:
347 case SID_INSERT_FIXEDTEXT:
348 case SID_INSERT_IMAGECONTROL:
349 case SID_INSERT_PROGRESSBAR:
350 case SID_INSERT_HSCROLLBAR:
351 case SID_INSERT_VSCROLLBAR:
352 case SID_INSERT_HFIXEDLINE:
353 case SID_INSERT_VFIXEDLINE:
354 case SID_INSERT_DATEFIELD:
355 case SID_INSERT_TIMEFIELD:
356 case SID_INSERT_NUMERICFIELD:
357 case SID_INSERT_CURRENCYFIELD:
358 case SID_INSERT_FORMATTEDFIELD:
359 case SID_INSERT_PATTERNFIELD:
360 case SID_INSERT_FILECONTROL:
361 case SID_INSERT_SPINBUTTON:
362 case SID_INSERT_GRIDCONTROL:
363 case SID_INSERT_HYPERLINKCONTROL:
364 case SID_INSERT_TREECONTROL:
392 const sal_uInt16 nSlotId(rReq.
GetSlot());
402 pBindings->Invalidate( SID_DOC_MODIFIED );
410 pBindings->Invalidate( SID_DOC_MODIFIED );
421 pBindings->Invalidate( SID_DOC_MODIFIED );
425 case SID_INSERT_FORM_RADIO:
426 nInsertObj = SdrObjKind::BasicDialogFormRadio;
428 case SID_INSERT_FORM_CHECK:
429 nInsertObj = SdrObjKind::BasicDialogFormCheck;
431 case SID_INSERT_FORM_LIST:
432 nInsertObj = SdrObjKind::BasicDialogFormList;
434 case SID_INSERT_FORM_COMBO:
435 nInsertObj = SdrObjKind::BasicDialogFormCombo;
437 case SID_INSERT_FORM_SPIN:
438 nInsertObj = SdrObjKind::BasicDialogFormSpin;
440 case SID_INSERT_FORM_VSCROLL:
441 nInsertObj = SdrObjKind::BasicDialogFormVerticalScroll;
443 case SID_INSERT_FORM_HSCROLL:
444 nInsertObj = SdrObjKind::BasicDialogFormHorizontalScroll;
446 case SID_INSERT_PUSHBUTTON:
447 nInsertObj = SdrObjKind::BasicDialogPushButton;
449 case SID_INSERT_RADIOBUTTON:
450 nInsertObj = SdrObjKind::BasicDialogRadioButton;
452 case SID_INSERT_CHECKBOX:
453 nInsertObj = SdrObjKind::BasicDialogCheckbox;
455 case SID_INSERT_LISTBOX:
456 nInsertObj = SdrObjKind::BasicDialogListbox;
458 case SID_INSERT_COMBOBOX:
459 nInsertObj = SdrObjKind::BasicDialogCombobox;
461 case SID_INSERT_GROUPBOX:
462 nInsertObj = SdrObjKind::BasicDialogGroupBox;
464 case SID_INSERT_EDIT:
465 nInsertObj = SdrObjKind::BasicDialogEdit;
467 case SID_INSERT_FIXEDTEXT:
468 nInsertObj = SdrObjKind::BasicDialogFixedText;
470 case SID_INSERT_IMAGECONTROL:
471 nInsertObj = SdrObjKind::BasicDialogImageControl;
473 case SID_INSERT_PROGRESSBAR:
474 nInsertObj = SdrObjKind::BasicDialogProgressbar;
476 case SID_INSERT_HSCROLLBAR:
477 nInsertObj = SdrObjKind::BasicDialogHorizontalScrollbar;
479 case SID_INSERT_VSCROLLBAR:
480 nInsertObj = SdrObjKind::BasicDialogVerticalScrollbar;
482 case SID_INSERT_HFIXEDLINE:
483 nInsertObj = SdrObjKind::BasicDialogHorizontalFixedLine;
485 case SID_INSERT_VFIXEDLINE:
486 nInsertObj = SdrObjKind::BasicDialogVerticalFixedLine;
488 case SID_INSERT_DATEFIELD:
489 nInsertObj = SdrObjKind::BasicDialogDateField;
491 case SID_INSERT_TIMEFIELD:
492 nInsertObj = SdrObjKind::BasicDialogTimeField;
494 case SID_INSERT_NUMERICFIELD:
495 nInsertObj = SdrObjKind::BasicDialogNumericField;
497 case SID_INSERT_CURRENCYFIELD:
498 nInsertObj = SdrObjKind::BasicDialogCurencyField;
500 case SID_INSERT_FORMATTEDFIELD:
501 nInsertObj = SdrObjKind::BasicDialogFormattedField;
503 case SID_INSERT_PATTERNFIELD:
504 nInsertObj = SdrObjKind::BasicDialogPatternField;
506 case SID_INSERT_FILECONTROL:
507 nInsertObj = SdrObjKind::BasicDialogFileControl;
509 case SID_INSERT_SPINBUTTON:
510 nInsertObj = SdrObjKind::BasicDialogSpinButton;
512 case SID_INSERT_GRIDCONTROL:
513 nInsertObj = SdrObjKind::BasicDialogGridControl;
515 case SID_INSERT_HYPERLINKCONTROL:
516 nInsertObj = SdrObjKind::BasicDialogHyperlinkControl;
518 case SID_INSERT_TREECONTROL:
519 nInsertObj = SdrObjKind::BasicDialogTreeControl;
521 case SID_INSERT_SELECT:
527 case SID_DIALOG_TESTMODE:
534 pBindings->Invalidate( SID_DIALOG_TESTMODE );
537 case SID_EXPORT_DIALOG:
541 case SID_IMPORT_DIALOG:
545 case SID_BASICIDE_DELETECURRENT:
557 if ( nInsertObj != SdrObjKind::NONE )
567 pBindings->Invalidate( SID_DOC_MODIFIED );
587 pBindings->Invalidate( SID_DOC_MODIFIED );
609 xFP.queryThrow<XFilePickerControlAccess>()->
setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0,
Any(
true));
610 xFP->setDefaultName(
GetName() );
612 OUString aDialogStr(
IDEResId(RID_STR_STDDIALOGNAME));
613 xFP->appendFilter( aDialogStr,
"*.xdl" );
615 xFP->setCurrentFilter( aDialogStr );
620 OUString aSelectedFileURL = xFP->getSelectedFiles()[0];
628 if( xSFI->exists(aSelectedFileURL) )
629 xSFI->kill(aSelectedFileURL);
630 xOutput = xSFI->openFileWrite(aSelectedFileURL);
638 VclMessageType::Warning, VclButtonsType::Ok,
IDEResId(RID_STR_COULDNTWRITE)));
647 xOutput->writeBytes(
bytes);
651 if (
auto xDialogModelPropSet =
GetDialog().query<beans::XPropertySet>())
655 Any aResourceResolver = xDialogModelPropSet->getPropertyValue(
"ResourceResolver" );
656 aResourceResolver >>= xStringResourceResolver;
658 catch(
const beans::UnknownPropertyException& )
663 if (xStringResourceResolver)
664 aLocaleSeq = xStringResourceResolver->getLocales();
665 if (aLocaleSeq.hasElements())
669 OUString aDialogName( aURLObj.
getName() );
672 OUString aComment =
"# " + aDialogName +
" strings" ;
676 if( xSFI->isFolder(
aURL ) )
680 OUString aDialogName_ = aDialogName +
"_" ;
681 for(
const OUString& rCompleteName : aContentSeq )
685 sal_Int32 iDot = rCompleteName.lastIndexOf(
'.' );
688 sal_Int32 iSlash = rCompleteName.lastIndexOf(
'/' );
689 sal_Int32 iCopyFrom = (iSlash != -1) ? iSlash + 1 : 0;
690 aPureName = rCompleteName.copy( iCopyFrom, iDot-iCopyFrom );
691 aExtension = rCompleteName.copy( iDot + 1 );
694 if( aExtension ==
"properties" || aExtension ==
"default" )
696 if( aPureName.startsWith( aDialogName_ ) )
700 xSFI->kill( rCompleteName );
702 catch(
const uno::Exception& )
710 StringResourceWithLocation::create( xContext,
aURL,
false,
711 xStringResourceResolver->getDefaultLocale(), aDialogName, aComment, xDummyHandler );
714 for(
const lang::Locale& rLocale : aLocaleSeq )
716 xStringResourceWithLocation->newLocale( rLocale );
720 xStringResourceResolver, xStringResourceWithLocation );
722 xStringResourceWithLocation->store();
729 std::vector< lang::Locale > avRet;
731 std::copy_if(aFirstSeq.begin(), aFirstSeq.end(),
732 std::back_inserter(avRet),
733 [&aSecondSeq](
const lang::Locale& rFirstLocale) {
735 aSecondSeq.begin(), aSecondSeq.end(),
736 [&rFirstLocale](const lang::Locale& rSecondLocale) {
737 return localesAreEqual(rFirstLocale, rSecondLocale);
745class NameClashQueryBox
750 NameClashQueryBox(
weld::Window* pParent,
const OUString& rTitle,
const OUString& rMessage)
753 if (!rTitle.isEmpty())
763class LanguageMismatchQueryBox
768 LanguageMismatchQueryBox(
weld::Window* pParent,
const OUString& rTitle,
const OUString& rMessage)
771 if (!rTitle.isEmpty())
790 FileDialogFlags::NONE, pWin);
794 OUString aDialogStr(
IDEResId(RID_STR_STDDIALOGNAME));
795 xFP->appendFilter( aDialogStr,
"*.xdl" );
797 xFP->setCurrentFilter( aDialogStr );
804 OUString aOUCurPath( aPaths[0] );
805 sal_Int32 iSlash = aOUCurPath.lastIndexOf(
'/' );
807 aBasePath = aOUCurPath.copy( 0, iSlash + 1 );
813 xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.awt.UnoControlDialogModel", xContext),
819 if( xSFI->exists( aOUCurPath ) )
820 xInput = xSFI->openFileRead( aOUCurPath );
824 OUString aXmlDlgName;
826 assert(xDialogModelPropSet.is());
830 aXmlDialogNameAny >>= aXmlDlgName;
832 catch(
const beans::UnknownPropertyException& )
836 assert( !aXmlDlgName.isEmpty() );
838 bool bDialogAlreadyExists = rDocument.
hasDialog( aLibName, aXmlDlgName );
840 OUString aNewDlgName = aXmlDlgName;
844 CLASH_OVERWRITE_DIALOG,
847 NameClashMode eNameClashMode = NO_CLASH;
848 if( bDialogAlreadyExists )
850 OUString aQueryBoxTitle(
IDEResId(RID_STR_DLGIMP_CLASH_TITLE));
851 OUString aQueryBoxText(
IDEResId(RID_STR_DLGIMP_CLASH_TEXT));
852 aQueryBoxText = aQueryBoxText.replaceAll(
"$(ARG1)", aXmlDlgName);
854 NameClashQueryBox aQueryBox(pWin, aQueryBoxTitle, aQueryBoxText);
855 sal_uInt16 nRet = aQueryBox.run();
859 eNameClashMode = CLASH_RENAME_DIALOG;
866 eNameClashMode = CLASH_OVERWRITE_DIALOG;
881 StringResourceWithLocation::create( xContext, aBasePath,
true,
882 aLocale, aXmlDlgName, OUString(), xDummyHandler );
885 sal_Int32 nImportLocaleCount = aImportLocaleSeq.getLength();
889 sal_Int32 nLibLocaleCount = 0;
891 if( xLibStringResourceManager.is() )
893 aLibLocaleSeq = xLibStringResourceManager->getLocales();
894 nLibLocaleCount = aLibLocaleSeq.getLength();
898 std::vector< lang::Locale > aOnlyInImportLanguages =
900 int nOnlyInImportLanguageCount = aOnlyInImportLanguages.size();
903 bool bLibLocalized = (nLibLocaleCount > 0);
904 bool bImportLocalized = (nImportLocaleCount > 0);
906 bool bAddDialogLanguagesToLib =
false;
907 if( nOnlyInImportLanguageCount > 0 )
909 OUString aQueryBoxTitle(
IDEResId(RID_STR_DLGIMP_MISMATCH_TITLE));
910 OUString aQueryBoxText(
IDEResId(RID_STR_DLGIMP_MISMATCH_TEXT));
911 LanguageMismatchQueryBox aQueryBox(pWin, aQueryBoxTitle, aQueryBoxText);
912 sal_uInt16 nRet = aQueryBox.run();
916 bAddDialogLanguagesToLib =
true;
929 if( bImportLocalized )
931 bool bCopyResourcesForDialog =
true;
932 if( bAddDialogLanguagesToLib )
936 lang::Locale aFirstLocale = aOnlyInImportLanguages[0];
937 if( nOnlyInImportLanguageCount > 1 )
940 lang::Locale aImportDefaultLocale = xImportStringResource->getDefaultLocale();
942 if (std::any_of(aOnlyInImportLanguages.begin(), aOnlyInImportLanguages.end(),
943 [&aImportDefaultLocale](
const lang::Locale& aTmpLocale) {
944 return localesAreEqual(aImportDefaultLocale, aTmpLocale);
947 aFirstLocale = aImportDefaultLocale;
951 pCurMgr->handleAddLocales( {aFirstLocale} );
953 if( nOnlyInImportLanguageCount > 1 )
956 auto pRemainingLocaleSeq = aRemainingLocaleSeq.getArray();
958 for(
const lang::Locale& rLocale : aOnlyInImportLanguages )
961 pRemainingLocaleSeq[iSeq++] = rLocale;
963 pCurMgr->handleAddLocales( aRemainingLocaleSeq );
966 else if( !bLibLocalized )
968 LocalizationMgr::resetResourceForDialog( xDialogModel, xImportStringResource );
969 bCopyResourcesForDialog =
false;
972 if( bCopyResourcesForDialog )
974 LocalizationMgr::copyResourceForDroppedDialog( xDialogModel, aXmlDlgName,
975 xLibStringResourceManager, xImportStringResource );
978 else if( bLibLocalized )
980 LocalizationMgr::setResourceIDsForDialog( xDialogModel, xLibStringResourceManager );
984 LocalizationMgr::setStringResourceAtDialog( rDocument, aLibName, aNewDlgName, xDialogModel );
986 if( eNameClashMode == CLASH_OVERWRITE_DIALOG )
991 if( pDlgWin !=
nullptr )
1002 if( eNameClashMode == CLASH_RENAME_DIALOG )
1004 bool bRenamed =
false;
1005 if( xDialogModelPropSet.is() )
1012 catch(
const beans::UnknownPropertyException& )
1019 LocalizationMgr::renameStringResourceIDs( rDocument, aLibName, aNewDlgName, xDialogModel );
1029 bool bSuccess = rDocument.
insertDialog( aLibName, aNewDlgName, xISP );
1045void DialogWindow::ImportDialog()
1048 OUString aLibName = GetLibName();
1054 return m_pEditor->GetModel();
1059 return m_pEditor->GetPage();
1064 return m_pEditor->GetView();
1067bool DialogWindow::IsModified()
1069 return m_pEditor->IsModified();
1074 return m_pUndoMgr.get();
1077OUString DialogWindow::GetTitle()
1085 OUString aLibName( GetLibName() );
1090void DialogWindow::SetReadOnly (
bool bReadOnly)
1092 m_pEditor->SetMode(
bReadOnly ? DlgEditor::READONLY : DlgEditor::SELECT);
1095bool DialogWindow::IsReadOnly ()
1097 return m_pEditor->GetMode() == DlgEditor::READONLY;
1100bool DialogWindow::IsPasteAllowed()
1102 return m_pEditor->IsPasteAllowed();
1105void DialogWindow::StoreData()
1107 if ( !IsModified() )
1118 if( xDialogModel.is() )
1123 xLib->replaceByName(
GetName(),
Any( xISP ) );
1127 catch (
const uno::Exception& )
1132 m_pEditor->ClearModifyFlag();
1135void DialogWindow::Activating ()
1141void DialogWindow::Deactivating()
1154void DialogWindow::printPage( sal_Int32 nPage,
Printer* pPrinter )
1156 DlgEditor::printPage( nPage, pPrinter, CreateQualifiedName() );
1161 if( (rDCEvt.
GetType()==DataChangedEventType::SETTINGS) && (rDCEvt.
GetFlags() & AllSettingsFlags::STYLE) )
1167 BaseWindow::DataChanged( rDCEvt );
1170void DialogWindow::InitSettings()
1173 const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
1183css::uno::Reference< css::accessibility::XAccessible > DialogWindow::CreateAccessible()
1188OUString DialogWindow::GetHid ()
const
1204 rObjectCatalog(rObjectCatalog_),
1205 pPropertyBrowser(nullptr)
1242 pBindings->Invalidate(SID_SHOW_PROPERTYBROWSER);
1282 case SID_SHOW_PROPERTYBROWSER:
1291 pBindings->Invalidate(SID_SHOW_PROPERTYBROWSER);
1300 case SID_SHOW_PROPERTYBROWSER:
1304 case SID_BASICIDE_CHOOSEMACRO:
std::unique_ptr< weld::MessageDialog > m_xQueryBox
const LanguageTag & GetUILanguageTag() const
static const AllSettings & GetSettings()
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
CommandEventId GetCommand() const
bool IsMouseEvent() const
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
OUString getName(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool removeExtension(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool removeSegment(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
const vcl::KeyCode & GetKeyCode() const
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
bool AreObjectsMarked() const
const tools::Rectangle & GetMarkedRect() const
void Invalidate(sal_uInt16 nId)
void ExecutePopup(const OUString &rResName, vcl::Window *pWin=nullptr, const Point *pPos=nullptr)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void DisableItem(sal_uInt16 nWhich)
sal_uInt16 GetSlot() const
sal_uInt16 GetModifier() const
void Done(bool bRemove=false)
SfxViewFrame * GetFrame() const
bool HasChildWindow(sal_uInt16)
SfxViewFrame & GetViewFrame() const
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetFieldTextColor() const
const vcl::Font & GetFieldFont() const
const Color & GetFaceColor() const
static VclPtr< reference_type > Create(Arg &&... arg)
virtual void dispose() override
const OUString & GetLibName() const
friend class DialogWindow
ScriptDocument m_aDocument
const OUString & GetName() const
const ScriptDocument & GetDocument() const
ScrollAdaptor * GetHScrollBar() const
ScrollAdaptor * GetVScrollBar() const
void ShowPropertyBrowser()
void UpdatePropertyBrowser()
virtual void OnFirstSize(tools::Long nWidth, tools::Long nHeight) override
ObjectCatalog & rObjectCatalog
virtual void Deactivating() override
virtual void Activating(BaseWindow &) override
virtual void dispose() override
VclPtr< PropBrw > pPropertyBrowser
virtual void ExecuteGlobal(SfxRequest &) override
void DisablePropertyBrowser()
virtual void GetState(SfxItemSet &, unsigned nWhich) override
virtual ~DialogWindowLayout() override
void AddPropertyBrowser()
DialogWindowLayout & m_rLayout
virtual void KeyInput(const KeyEvent &rKEvt) override
DlgEdView & GetView() const
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
virtual void dispose() override
virtual void Resize() override
virtual void DoInit() override
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
bool RenameDialog(const OUString &rNewName)
std::unique_ptr< SfxUndoManager > m_pUndoMgr
virtual void SetReadOnly(bool bReadOnly) override
virtual bool IsModified() override
sal_uInt16 m_nControlSlotId
virtual void Command(const CommandEvent &rCEvt) override
virtual void LoseFocus() override
virtual void StoreData() override
virtual void DoScroll(Scrollable *pCurScrollBar) override
DlgEditor & GetEditor() const
std::unique_ptr< DlgEditor > m_pEditor
virtual void MouseMove(const MouseEvent &rMEvt) override
virtual bool IsReadOnly() override
virtual void GetState(SfxItemSet &) override
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
css::uno::Reference< css::container::XNameContainer > const & GetDialog() const
static void NotifyUndoActionHdl(std::unique_ptr< SdrUndoAction >)
virtual void ExecuteCommand(SfxRequest &rReq) override
void SetInsertObj(SdrObjKind eObj)
void CreateDefaultObject()
void SetLayoutWindow(Layout *)
void Remove(DockingWindow *)
virtual void dispose() override
void AddToLeft(DockingWindow *pWin, Size const &rSize)
virtual void Deactivating()
virtual void Activating(BaseWindow &)
static void copyResourceForDialog(const css::uno::Reference< css::container::XNameContainer > &xDialogModel, const css::uno::Reference< css::resource::XStringResourceResolver > &xSourceStringResolver, const css::uno::Reference< css::resource::XStringResourceManager > &xTargetStringResourceManager)
A docking window that contains a tree of the currently loaded macros.
void UpdateEntries()
Update the entries of Object Catalog Treelist.
encapsulates a document which contains Basic scripts and dialogs
css::uno::Reference< css::frame::XModel > getDocument() const
returns the UNO component representing the document which the instance operates on
bool isDocument() const
determines whether the ScriptDocument instance operates on a real document, as opposed to the whole a...
css::uno::Reference< css::container::XNameContainer > getLibrary(LibraryContainerType _eType, const OUString &_rLibName, bool _bLoadLibrary) const
returns a script or dialog library given by name
bool isReadOnly() const
determines whether the document is read-only
bool insertDialog(const OUString &_rLibName, const OUString &_rDialogName, const css::uno::Reference< css::io::XInputStreamProvider > &_rDialogProvider) const
inserts a given dialog into a given library
bool hasDialog(const OUString &_rLibName, const OUString &_rDialogName) const
determines whether a dialog with the given name exists in the given library
OUString createObjectName(LibraryContainerType _eType, const OUString &_rLibName) const
retrieves a name for a newly to be created module or dialog
void RemoveWindow(BaseWindow *pWindow, bool bDestroy, bool bAllowChangeCurWindow=true)
static void InvalidateControlSlots()
VclPtr< DialogWindow > FindDlgWin(const ScriptDocument &rDocument, const OUString &rLibName, const OUString &rName, bool bCreateIfNotExist=false, bool bFindSuspended=false)
const std::shared_ptr< LocalizationMgr > & GetCurLocalizationMgr() const
VclPtr< DialogWindow > CreateDlgWin(const ScriptDocument &rDocument, const OUString &rLibName, const OUString &rDlgName)
void SetCurWindow(BaseWindow *pNewWin, bool bUpdateTabBar=false, bool bRememberAsCurrent=true)
const css::uno::Reference< css::ui::dialogs::XFilePicker3 > & GetFilePicker() const
void SetContext(Context _eNewContext)
Point LogicToPixel(const Point &rLogicPt) const
bool HandleScrollCommand(const CommandEvent &rCmd, Scrollable *pHScrl, Scrollable *pVScrl)
virtual void Command(const CommandEvent &rCEvt)
Size GetOutputSizePixel() const
weld::Window * GetFrameWeld() const
void SetHelpId(const OUString &)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
virtual OUString GetName() const override
constexpr OUStringLiteral HID_BASICIDE_DIALOGWINDOW
constexpr sal_uInt16 KEY_MOD1
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_BACKSPACE
def run(arg=None, arg2=-1)
constexpr OUStringLiteral DLGED_PROP_NAME
SfxBindings * GetBindingsPtr()
static std::vector< lang::Locale > implGetLanguagesOnlyContainedInFirstSeq(const Sequence< lang::Locale > &aFirstSeq, const Sequence< lang::Locale > &aSecondSeq)
bool localesAreEqual(const Locale &rLocaleLeft, const Locale &rLocaleRight)
constexpr OUStringLiteral FilterMask_All
bool implImportDialog(weld::Window *pWin, const ScriptDocument &rDocument, const OUString &aLibName)
bool RemoveDialog(const ScriptDocument &rDocument, const OUString &rLibName, const OUString &rDlgName)
SfxDispatcher * GetDispatcher()
void MarkDocumentModified(const ScriptDocument &rDocument)
bool RenameDialog(weld::Widget *pErrorParent, ScriptDocument const &rDocument, OUString const &rLibName, OUString const &rOldName, OUString const &rNewName)
renames a dialog
bool QueryDelDialog(std::u16string_view rName, weld::Widget *pParent)
OUString IDEResId(TranslateId aId)
Reference< XComponentContext > getProcessComponentContext()
void SetPointFont(OutputDevice &rDevice, const vcl::Font &rFont)
std::vector< sal_uInt8 > bytes
Reference< io::XInputStream > createInputStream(std::vector< sal_Int8 > &&rInData)
uno::Reference< io::XInputStreamProvider > exportDialogModel(uno::Reference< container::XNameContainer > const &xDialogModel, uno::Reference< uno::XComponentContext > const &xContext, uno::Reference< XModel > const &xDocument)
RegError REGISTRY_CALLTYPE setValue(RegKeyHandle hKey, rtl_uString *keyName, RegValueType valueType, RegValue pData, sal_uInt32 valueSize)
OUString VCL_DLLPUBLIC GetStandardText(StandardButtonType eButton)
Reference< XModel > xModel