From 76c5f33e65e9a36c94c46f1ed0b6d33721d21cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Fri, 4 Oct 2019 13:23:55 +0100 Subject: [PATCH] move file picker only code to fpicker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I47cc2cb7db396a06a2abeffe4a5d40a039f21c58 Reviewed-on: https://gerrit.libreoffice.org/80222 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- dbaccess/source/ui/app/AppControllerDnD.cxx | 2 +- dbaccess/source/ui/misc/UITools.cxx | 1 - fpicker/Library_fps_office.mk | 5 ++ fpicker/inc/bitmaps.hlst | 2 + fpicker/source/office/OfficeControlAccess.hxx | 2 +- fpicker/source/office/RemoteFilesDialog.hxx | 4 +- fpicker/source/office/asyncfilepicker.cxx | 2 +- .../source/office}/contentenumeration.cxx | 0 .../source/office}/contentenumeration.hxx | 0 .../source/office}/fileview.cxx | 48 ++--------------- .../source/office}/fileview.hxx | 33 ++---------- .../source/office}/foldertree.cxx | 2 +- .../source/office}/foldertree.hxx | 5 +- .../source/office}/iconview.cxx | 6 +-- .../source/office}/iconview.hxx | 0 .../source/office}/iconviewimpl.cxx | 4 +- .../source/office}/iconviewimpl.hxx | 0 fpicker/source/office/iodlg.cxx | 2 +- fpicker/source/office/iodlgimp.cxx | 2 +- include/svtools/querydelete.hxx | 52 +++++++++++++++++++ include/{svl => svtools}/urlfilter.hxx | 3 +- solenv/clang-format/blacklist | 22 ++++---- svtools/Library_svt.mk | 6 +-- svtools/inc/bitmaps.hlst | 1 - svtools/source/contnr/querydelete.cxx | 35 +++++++++++++ svtools/source/control/inettbc.cxx | 26 +++++++++- 26 files changed, 154 insertions(+), 111 deletions(-) rename {svtools/source/contnr => fpicker/source/office}/contentenumeration.cxx (100%) rename {svtools/source/contnr => fpicker/source/office}/contentenumeration.hxx (100%) rename {svtools/source/contnr => fpicker/source/office}/fileview.cxx (98%) rename {include/svtools => fpicker/source/office}/fileview.hxx (91%) rename {svtools/source/contnr => fpicker/source/office}/foldertree.cxx (99%) rename {include/svtools => fpicker/source/office}/foldertree.hxx (94%) rename {svtools/source/contnr => fpicker/source/office}/iconview.cxx (98%) rename {include/svtools => fpicker/source/office}/iconview.hxx (100%) rename {svtools/source/contnr => fpicker/source/office}/iconviewimpl.cxx (99%) rename {svtools/source/inc => fpicker/source/office}/iconviewimpl.hxx (100%) create mode 100644 include/svtools/querydelete.hxx rename include/{svl => svtools}/urlfilter.hxx (95%) create mode 100644 svtools/source/contnr/querydelete.cxx diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index 4051a29245b9..8e285146644c 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -69,9 +69,9 @@ #include #include #include +#include #include #include -#include #include #include #include diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 417b42eb7aa1..fe68343700d1 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -105,7 +105,6 @@ #include #include #include -#include #include #include diff --git a/fpicker/Library_fps_office.mk b/fpicker/Library_fps_office.mk index 996e5994d07a..626f357a98b3 100644 --- a/fpicker/Library_fps_office.mk +++ b/fpicker/Library_fps_office.mk @@ -45,9 +45,14 @@ $(eval $(call gb_Library_add_exception_objects,fps_office,\ fpicker/source/office/asyncfilepicker \ fpicker/source/office/breadcrumb \ fpicker/source/office/commonpicker \ + fpicker/source/office/contentenumeration \ + fpicker/source/office/fileview \ + fpicker/source/office/foldertree \ fpicker/source/office/fpinteraction \ fpicker/source/office/fpsmartcontent \ fpicker/source/office/fps_office \ + fpicker/source/office/iconview \ + fpicker/source/office/iconviewimpl \ fpicker/source/office/iodlg \ fpicker/source/office/iodlgimp \ fpicker/source/office/OfficeControlAccess \ diff --git a/fpicker/inc/bitmaps.hlst b/fpicker/inc/bitmaps.hlst index 61d5b71186de..878058154fb6 100644 --- a/fpicker/inc/bitmaps.hlst +++ b/fpicker/inc/bitmaps.hlst @@ -10,10 +10,12 @@ #ifndef INCLUDED_FPICKER_INC_BITMAPS_HRC #define INCLUDED_FPICKER_INC_BITMAPS_HRC +#define RID_BMP_FOLDER_OPEN "res/folderop.png" #define BMP_FILEDLG_BTN_UP "res/fp010.png" #define BMP_FILEDLG_CREATEFOLDER "fpicker/res/fp014.png" #define BMP_FILEDLG_PLACE_LOCAL "fpicker/res/fp015.png" #define BMP_FILEDLG_PLACE_REMOTE "fpicker/res/fp016.png" +#define RID_BMP_FOLDER "svtools/res/folder.png" #endif diff --git a/fpicker/source/office/OfficeControlAccess.hxx b/fpicker/source/office/OfficeControlAccess.hxx index 7f1600bd587c..fcba48674dc9 100644 --- a/fpicker/source/office/OfficeControlAccess.hxx +++ b/fpicker/source/office/OfficeControlAccess.hxx @@ -20,9 +20,9 @@ #ifndef INCLUDED_FPICKER_SOURCE_OFFICE_OFFICECONTROLACCESS_HXX #define INCLUDED_FPICKER_SOURCE_OFFICE_OFFICECONTROLACCESS_HXX -#include #include #include +#include "fileview.hxx" #include "pickercallbacks.hxx" #include diff --git a/fpicker/source/office/RemoteFilesDialog.hxx b/fpicker/source/office/RemoteFilesDialog.hxx index 140dd65622ec..5331107018d5 100644 --- a/fpicker/source/office/RemoteFilesDialog.hxx +++ b/fpicker/source/office/RemoteFilesDialog.hxx @@ -11,10 +11,8 @@ #define INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX #include -#include #include #include -#include #include @@ -38,6 +36,8 @@ #include "fpdialogbase.hxx" #include "breadcrumb.hxx" +#include "fileview.hxx" +#include "foldertree.hxx" #include "QueryFolderName.hxx" using namespace ::com::sun::star::beans; diff --git a/fpicker/source/office/asyncfilepicker.cxx b/fpicker/source/office/asyncfilepicker.cxx index f547b2fd634f..4dc64af3d4eb 100644 --- a/fpicker/source/office/asyncfilepicker.cxx +++ b/fpicker/source/office/asyncfilepicker.cxx @@ -19,8 +19,8 @@ #include "asyncfilepicker.hxx" +#include "fileview.hxx" #include "iodlg.hxx" -#include #include #include diff --git a/svtools/source/contnr/contentenumeration.cxx b/fpicker/source/office/contentenumeration.cxx similarity index 100% rename from svtools/source/contnr/contentenumeration.cxx rename to fpicker/source/office/contentenumeration.cxx diff --git a/svtools/source/contnr/contentenumeration.hxx b/fpicker/source/office/contentenumeration.hxx similarity index 100% rename from svtools/source/contnr/contentenumeration.hxx rename to fpicker/source/office/contentenumeration.hxx diff --git a/svtools/source/contnr/fileview.cxx b/fpicker/source/office/fileview.cxx similarity index 98% rename from svtools/source/contnr/fileview.cxx rename to fpicker/source/office/fileview.cxx index 51b28daa7954..09ff753dd373 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/fpicker/source/office/fileview.cxx @@ -18,14 +18,13 @@ */ #include -#include #include #include #include #include -#include #include #include +#include #include #include #include @@ -62,9 +61,11 @@ #include #include #include -#include +#include #include #include +#include "fileview.hxx" +#include "iconview.hxx" using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdbc; @@ -121,30 +122,6 @@ namespace } -void FilterMatch::createWildCardFilterList(const OUString& _rFilterList,::std::vector< WildCard >& _rFilters) -{ - if( _rFilterList.getLength() ) - { - // filter is given - sal_Int32 nIndex = 0; - OUString sToken; - do - { - sToken = _rFilterList.getToken( 0, ';', nIndex ); - if ( !sToken.isEmpty() ) - { - _rFilters.emplace_back( sToken.toAsciiUpperCase() ); - } - } - while ( nIndex >= 0 ); - } - else - { - // no filter is given -> match all - _rFilters.emplace_back("*" ); - } -} - class ViewTabListBox_Impl : public SvHeaderTabListBox { private: @@ -1932,23 +1909,6 @@ bool SvtFileView_Impl::SearchNextEntry( sal_uInt32& nIndex, const OUString& rTit return false; } - -namespace svtools { - -QueryDeleteDlg_Impl::QueryDeleteDlg_Impl(weld::Widget* pParent, const OUString& rName) - : MessageDialogController(pParent, "svt/ui/querydeletedialog.ui", "QueryDeleteDialog") - , m_xAllButton(m_xBuilder->weld_button("all")) -{ - // display specified texts - m_xDialog->set_secondary_text(m_xDialog->get_secondary_text().replaceFirst("%s", rName)); -} - -QueryDeleteDlg_Impl::~QueryDeleteDlg_Impl() -{ -} - -} - namespace { void SAL_CALL CallbackTimer::onShot() { diff --git a/include/svtools/fileview.hxx b/fpicker/source/office/fileview.hxx similarity index 91% rename from include/svtools/fileview.hxx rename to fpicker/source/office/fileview.hxx index ea3a23e1fd47..e655b8c4dcd3 100644 --- a/include/svtools/fileview.hxx +++ b/fpicker/source/office/fileview.hxx @@ -20,7 +20,6 @@ #define INCLUDED_VCL_FILEVIEW_HXX #include -#include #include #include #include @@ -64,14 +63,14 @@ struct FileViewAsyncAction } }; -class SVT_DLLPUBLIC SvtFileView : public Control +class SvtFileView : public Control { private: std::unique_ptr mpImpl; css::uno::Sequence< OUString > mpBlackList; - DECL_DLLPRIVATE_LINK( HeaderSelect_Impl, HeaderBar*, void ); - DECL_DLLPRIVATE_LINK( HeaderEndDrag_Impl, HeaderBar*, void ); + DECL_LINK( HeaderSelect_Impl, HeaderBar*, void ); + DECL_LINK( HeaderEndDrag_Impl, HeaderBar*, void ); protected: virtual void GetFocus() override; @@ -193,32 +192,6 @@ struct SvtContentEntry mbIsFolder( bIsFolder ), maURL( rURL ) {} }; -namespace svtools { - - -// QueryDeleteDlg_Impl - - -enum QueryDeleteResult_Impl -{ - QUERYDELETE_YES = RET_YES, - QUERYDELETE_ALL = 101 -}; - -class SVT_DLLPUBLIC QueryDeleteDlg_Impl : public weld::MessageDialogController -{ -private: - std::unique_ptr m_xAllButton; -public: - - QueryDeleteDlg_Impl(weld::Widget* pParent, const OUString& rName); - virtual ~QueryDeleteDlg_Impl() override; - - void EnableAllButton() { m_xAllButton->set_sensitive(true); } -}; - -} - #endif // INCLUDED_VCL_FILEVIEW_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/contnr/foldertree.cxx b/fpicker/source/office/foldertree.cxx similarity index 99% rename from svtools/source/contnr/foldertree.cxx rename to fpicker/source/office/foldertree.cxx index b135b644fda6..a2cc56aca385 100644 --- a/svtools/source/contnr/foldertree.cxx +++ b/fpicker/source/office/foldertree.cxx @@ -8,7 +8,6 @@ */ #include -#include #include #include #include @@ -17,6 +16,7 @@ #include #include #include "contentenumeration.hxx" +#include "foldertree.hxx" #include using namespace ::com::sun::star::task; diff --git a/include/svtools/foldertree.hxx b/fpicker/source/office/foldertree.hxx similarity index 94% rename from include/svtools/foldertree.hxx rename to fpicker/source/office/foldertree.hxx index f62cc71be6f3..03710efb2076 100644 --- a/include/svtools/foldertree.hxx +++ b/fpicker/source/office/foldertree.hxx @@ -11,9 +11,6 @@ #define INCLUDED_SVTOOLS_FOLDERTREE_HXX #include - -#include - #include #include @@ -25,7 +22,7 @@ using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::uno; using namespace ::svt; -class SVT_DLLPUBLIC FolderTree : public SvTreeListBox +class FolderTree : public SvTreeListBox { private: Reference< XCommandEnvironment > m_xEnv; diff --git a/svtools/source/contnr/iconview.cxx b/fpicker/source/office/iconview.cxx similarity index 98% rename from svtools/source/contnr/iconview.cxx rename to fpicker/source/office/iconview.cxx index 4f94a21b87cf..b6571b72d1da 100644 --- a/svtools/source/contnr/iconview.cxx +++ b/fpicker/source/office/iconview.cxx @@ -17,11 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include #include #include -#include -#include +#include "fileview.hxx" +#include "iconview.hxx" +#include "iconviewimpl.hxx" IconView::IconView( vcl::Window* pParent, WinBits nBits ) : SvTreeListBox( pParent, nBits ) diff --git a/include/svtools/iconview.hxx b/fpicker/source/office/iconview.hxx similarity index 100% rename from include/svtools/iconview.hxx rename to fpicker/source/office/iconview.hxx diff --git a/svtools/source/contnr/iconviewimpl.cxx b/fpicker/source/office/iconviewimpl.cxx similarity index 99% rename from svtools/source/contnr/iconviewimpl.cxx rename to fpicker/source/office/iconviewimpl.cxx index 14f3a65942f2..ff3bdfcd9e76 100644 --- a/svtools/source/contnr/iconviewimpl.cxx +++ b/fpicker/source/office/iconviewimpl.cxx @@ -18,9 +18,9 @@ */ #include -#include -#include #include +#include "iconview.hxx" +#include "iconviewimpl.hxx" IconViewImpl::IconViewImpl( SvTreeListBox* pTreeListBox, SvTreeList* pTreeList, WinBits nWinStyle ) : SvImpLBox( pTreeListBox, pTreeList, nWinStyle ) diff --git a/svtools/source/inc/iconviewimpl.hxx b/fpicker/source/office/iconviewimpl.hxx similarity index 100% rename from svtools/source/inc/iconviewimpl.hxx rename to fpicker/source/office/iconviewimpl.hxx diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index abd187f13a24..ed097017dc5e 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -21,6 +21,7 @@ #include #include +#include "fileview.hxx" #include "iodlg.hxx" #include #include "PlacesListBox.hxx" @@ -37,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx index a19f55c9319f..b78603711847 100644 --- a/fpicker/source/office/iodlgimp.cxx +++ b/fpicker/source/office/iodlgimp.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "fileview.hxx" #include "iodlgimp.hxx" #include #include @@ -26,7 +27,6 @@ #include #include #include -#include #include #include "iodlg.hxx" #include diff --git a/include/svtools/querydelete.hxx b/include/svtools/querydelete.hxx new file mode 100644 index 000000000000..91e2096615ee --- /dev/null +++ b/include/svtools/querydelete.hxx @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_SVTOOLS_FILEVIEW_HXX +#define INCLUDED_SVTOOLS_FILEVIEW_HXX + +#include +#include +#include +#include + +namespace svtools +{ +// QueryDeleteDlg_Impl + +enum QueryDeleteResult_Impl +{ + QUERYDELETE_YES = RET_YES, + QUERYDELETE_ALL = 101 +}; + +class SVT_DLLPUBLIC QueryDeleteDlg_Impl : public weld::MessageDialogController +{ +private: + std::unique_ptr m_xAllButton; + +public: + QueryDeleteDlg_Impl(weld::Widget* pParent, const OUString& rName); + virtual ~QueryDeleteDlg_Impl() override; + + void EnableAllButton() { m_xAllButton->set_sensitive(true); } +}; +} + +#endif // INCLUDED_SVTOOLS_FILEVIEW_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svl/urlfilter.hxx b/include/svtools/urlfilter.hxx similarity index 95% rename from include/svl/urlfilter.hxx rename to include/svtools/urlfilter.hxx index d7d9d1d106fd..9ca75ed5b57e 100644 --- a/include/svl/urlfilter.hxx +++ b/include/svtools/urlfilter.hxx @@ -20,10 +20,11 @@ #ifndef INCLUDED_SVL_URLFILTER_HXX #define INCLUDED_SVL_URLFILTER_HXX +#include #include #include -struct FilterMatch +struct SVT_DLLPUBLIC FilterMatch { private: const OUString& m_rCompareString; diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index 6e357d57af75..0367f48f13e2 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -4985,6 +4985,16 @@ fpicker/source/office/breadcrumb.cxx fpicker/source/office/breadcrumb.hxx fpicker/source/office/commonpicker.cxx fpicker/source/office/commonpicker.hxx +fpicker/source/office/contentenumeration.cxx +fpicker/source/office/contentenumeration.hxx +fpicker/source/office/fileview.cxx +fpicker/source/office/fileview.hxx +fpicker/source/office/foldertree.cxx +fpicker/source/office/foldertree.hxx +fpicker/source/office/iconview.cxx +fpicker/source/office/iconview.hxx +fpicker/source/office/iconviewimpl.cxx +fpicker/source/office/iconviewimpl.hxx fpicker/source/office/fpdialogbase.hxx fpicker/source/office/fpinteraction.cxx fpicker/source/office/fpinteraction.hxx @@ -6890,7 +6900,6 @@ include/svl/svlresid.hxx include/svl/undo.hxx include/svl/urihelper.hxx include/svl/urlbmk.hxx -include/svl/urlfilter.hxx include/svl/visitem.hxx include/svl/whiter.hxx include/svl/zforlist.hxx @@ -6931,8 +6940,6 @@ include/svtools/extcolorcfg.hxx include/svtools/filechangedchecker.hxx include/svtools/filectrl.hxx include/svtools/fileurlbox.hxx -include/svtools/fileview.hxx -include/svtools/foldertree.hxx include/svtools/fontsubstconfig.hxx include/svtools/framestatuslistener.hxx include/svtools/generictoolboxcontroller.hxx @@ -6943,7 +6950,6 @@ include/svtools/htmlcfg.hxx include/svtools/htmlkywd.hxx include/svtools/htmlout.hxx include/svtools/htmltokn.h -include/svtools/iconview.hxx include/svtools/imagemgr.hxx include/svtools/imageresourceaccess.hxx include/svtools/imgdef.hxx @@ -6997,6 +7003,7 @@ include/svtools/toolboxcontroller.hxx include/svtools/unitconv.hxx include/svtools/unoevent.hxx include/svtools/unoimap.hxx +include/svtools/urlfilter.hxx include/svtools/valueset.hxx include/svx/AccessibleControlShape.hxx include/svx/AccessibleGraphicShape.hxx @@ -13686,12 +13693,6 @@ svtools/source/config/printoptions.cxx svtools/source/config/slidesorterbaropt.cxx svtools/source/config/test/test.cxx svtools/source/contnr/DocumentInfoPreview.cxx -svtools/source/contnr/contentenumeration.cxx -svtools/source/contnr/contentenumeration.hxx -svtools/source/contnr/fileview.cxx -svtools/source/contnr/foldertree.cxx -svtools/source/contnr/iconview.cxx -svtools/source/contnr/iconviewimpl.cxx svtools/source/contnr/simptabl.cxx svtools/source/contnr/templwin.cxx svtools/source/contnr/templwin.hxx @@ -13739,7 +13740,6 @@ svtools/source/hatchwindow/hatchwindowfactory.cxx svtools/source/hatchwindow/ipwin.cxx svtools/source/hatchwindow/ipwin.hxx svtools/source/inc/hatchwindow.hxx -svtools/source/inc/iconviewimpl.hxx svtools/source/inc/unoiface.hxx svtools/source/java/javacontext.cxx svtools/source/java/javainteractionhandler.cxx diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index 9bc158bed49a..5eefaf54d144 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -88,11 +88,7 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ svtools/source/config/optionsdrawinglayer \ svtools/source/config/printoptions \ svtools/source/contnr/DocumentInfoPreview \ - svtools/source/contnr/contentenumeration \ - svtools/source/contnr/fileview \ - svtools/source/contnr/foldertree \ - svtools/source/contnr/iconview \ - svtools/source/contnr/iconviewimpl \ + svtools/source/contnr/querydelete \ svtools/source/contnr/simptabl \ svtools/source/contnr/templwin \ svtools/source/control/accessibleruler \ diff --git a/svtools/inc/bitmaps.hlst b/svtools/inc/bitmaps.hlst index c991817439e1..9d2e9feb4afb 100644 --- a/svtools/inc/bitmaps.hlst +++ b/svtools/inc/bitmaps.hlst @@ -103,7 +103,6 @@ #define BMP_EXTENSION_LC "res/lx03256.png" #define BMP_PLUGIN "res/plugin.png" #define RID_BMP_FOLDER "svtools/res/folder.png" -#define RID_BMP_FOLDER_OPEN "res/folderop.png" #define BMP_CURRENT "svtools/res/ed01.png" #define BMP_MODIFIED "svtools/res/ed02.png" #define BMP_NEW "svtools/res/ed03.png" diff --git a/svtools/source/contnr/querydelete.cxx b/svtools/source/contnr/querydelete.cxx new file mode 100644 index 000000000000..334d75eac300 --- /dev/null +++ b/svtools/source/contnr/querydelete.cxx @@ -0,0 +1,35 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include + +namespace svtools +{ +QueryDeleteDlg_Impl::QueryDeleteDlg_Impl(weld::Widget* pParent, const OUString& rName) + : MessageDialogController(pParent, "svt/ui/querydeletedialog.ui", "QueryDeleteDialog") + , m_xAllButton(m_xBuilder->weld_button("all")) +{ + // display specified texts + m_xDialog->set_secondary_text(m_xDialog->get_secondary_text().replaceFirst("%s", rName)); +} + +QueryDeleteDlg_Impl::~QueryDeleteDlg_Impl() {} +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 7f1a940f1981..2b359eb06509 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include @@ -2202,4 +2202,28 @@ void URLBox::SetFilter(const OUString& _sFilter) FilterMatch::createWildCardFilterList(_sFilter,pImpl->m_aFilters); } +void FilterMatch::createWildCardFilterList(const OUString& _rFilterList,::std::vector< WildCard >& _rFilters) +{ + if( _rFilterList.getLength() ) + { + // filter is given + sal_Int32 nIndex = 0; + OUString sToken; + do + { + sToken = _rFilterList.getToken( 0, ';', nIndex ); + if ( !sToken.isEmpty() ) + { + _rFilters.emplace_back( sToken.toAsciiUpperCase() ); + } + } + while ( nIndex >= 0 ); + } + else + { + // no filter is given -> match all + _rFilters.emplace_back("*" ); + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */