24#include <svx/strings.hrc>
26#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
27#include <com/sun/star/container/XNameAccess.hpp>
28#include <com/sun/star/uno/XComponentContext.hpp>
31#include <rtl/ustrbuf.hxx>
43 using ::com::sun::star::uno::Sequence;
44 using ::com::sun::star::uno::Reference;
45 using ::com::sun::star::uno::XComponentContext;
46 using ::com::sun::star::container::XNameAccess;
47 using ::com::sun::star::uno::UNO_QUERY_THROW;
48 using ::com::sun::star::uno::Exception;
50 namespace TemplateDescription = ::com::sun::star::ui::dialogs::TemplateDescription;
56 const Reference<XComponentContext>& _rContext,
63 void setURL(
const OUString& _rURL );
85 ,m_rLocationInput( _rLocationInput )
86 ,m_rDialog( _rDialog )
87 ,m_bNeedExistenceCheck( true )
92 OUStringBuffer aExtensionList;
95 aExtensionList.append( extension +
";" );
104 if ( sURL.isEmpty() )
110 if ( ::utl::UCBContentHelper::Exists( sURL ) )
113 VclMessageType::Question, VclButtonsType::YesNo,
114 SvxResId(RID_STR_ALREADYEXISTOVERWRITE)));
115 if (xQueryBox->run() !=
RET_YES)
142 "/org.openoffice.Setup/Office/Factories/com.sun.star.sdb.OfficeDatabaseDocument"
144 OUString sDatabaseFilter;
145 OSL_VERIFY( aConfig.
getNodeValue(
"ooSetupFactoryActualFilter" ) >>= sDatabaseFilter );
148 Reference< XNameAccess > xFilterFactory(
149 m_xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.document.FilterFactory",
m_xContext),
152 OUString sDocumentType = aFilterProperties.
getOrDefault(
"Type", OUString() );
155 Reference< XNameAccess > xTypeDetection(
156 m_xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.document.TypeDetection",
m_xContext),
170 "DatabaseLocationInputController_Impl::impl_initFilterProperties_nothrow: unable to determine the file extension(s)!" );
179 impl_onBrowseButtonClicked();
185 if ( !sCurrentFile.isEmpty() )
196 TemplateDescription::FILESAVE_AUTOEXTENSION,
197 FileDialogFlags::NONE,
208 if(
aURL.GetProtocol() != INetProtocol::NotValid )
231 return m_pImpl->prepareCommit();
Reference< XComponentContext > m_xContext
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
void set_entry_text(const OUString &rStr)
weld::ComboBox * getWidget()
OUString get_active_text() const
void SetFilter(std::u16string_view _sFilter)
VALUE_TYPE getOrDefault(const OUString &_rValueName, const VALUE_TYPE &_rDefault) const
void AddFilter(const OUString &rFilterName, const OUString &rExtension)
void SetDisplayDirectory(const OUString &rPath)
void SetCurrentFilter(const OUString &rFilter)
OUString get(NOTATION _eOutputNotation) const
css::uno::Any getNodeValue(const OUString &_rPath) const noexcept
static OConfigurationTreeRoot createWithComponentContext(const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const OUString &_rPath, sal_Int32 _nDepth=-1, CREATION_MODE _eMode=CM_UPDATABLE)
#define DBG_UNHANDLED_EXCEPTION(...)
OUString SvxResId(TranslateId aId)
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(SuggestionDisplay, SelectSuggestionValueSetHdl, ValueSet *, void)