move file picker only code to fpicker

Change-Id: I47cc2cb7db396a06a2abeffe4a5d40a039f21c58
Reviewed-on: https://gerrit.libreoffice.org/80222
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2019-10-04 13:23:55 +01:00
parent 108d1b7c62
commit 76c5f33e65
26 changed files with 154 additions and 111 deletions

View File

@@ -69,9 +69,9 @@
#include <iterator>
#include <com/sun/star/sdb/XReportDocumentsSupplier.hpp>
#include <com/sun/star/sdb/XFormDocumentsSupplier.hpp>
#include <svtools/querydelete.hxx>
#include <unotools/pathoptions.hxx>
#include <sfx2/docfilt.hxx>
#include <svtools/fileview.hxx>
#include <tools/diagnose_ex.h>
#include <osl/diagnose.h>
#include <defaultobjectnamecheck.hxx>

View File

@@ -105,7 +105,6 @@
#include <svl/numuno.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/filenotation.hxx>
#include <svtools/fileview.hxx>
#include <connectivity/FValue.hxx>
#include <editeng/justifyitem.hxx>

View File

@@ -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 \

View File

@@ -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

View File

@@ -20,9 +20,9 @@
#ifndef INCLUDED_FPICKER_SOURCE_OFFICE_OFFICECONTROLACCESS_HXX
#define INCLUDED_FPICKER_SOURCE_OFFICE_OFFICECONTROLACCESS_HXX
#include <svtools/fileview.hxx>
#include <vcl/lstbox.hxx>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include "fileview.hxx"
#include "pickercallbacks.hxx"
#include <o3tl/typed_flags_set.hxx>

View File

@@ -11,10 +11,8 @@
#define INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX
#include <svtools/autocmpledit.hxx>
#include <svtools/foldertree.hxx>
#include <svtools/place.hxx>
#include <svtools/PlaceEditDialog.hxx>
#include <svtools/fileview.hxx>
#include <vcl/errinf.hxx>
@@ -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;

View File

@@ -19,8 +19,8 @@
#include "asyncfilepicker.hxx"
#include "fileview.hxx"
#include "iodlg.hxx"
#include <svtools/fileview.hxx>
#include <tools/debug.hxx>
#include <osl/diagnose.h>

View File

@@ -18,14 +18,13 @@
*/
#include <vcl/treelistbox.hxx>
#include <svtools/iconview.hxx>
#include <sal/config.h>
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <vcl/treelistentry.hxx>
#include <svtools/fileview.hxx>
#include <svtools/svtresid.hxx>
#include <svtools/imagemgr.hxx>
#include <svtools/querydelete.hxx>
#include <vcl/event.hxx>
#include <vcl/headbar.hxx>
#include <vcl/svtabbx.hxx>
@@ -62,9 +61,11 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/intlwrapper.hxx>
#include <unotools/syslocale.hxx>
#include <svl/urlfilter.hxx>
#include <svtools/urlfilter.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <memory>
#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()
{

View File

@@ -20,7 +20,6 @@
#define INCLUDED_VCL_FILEVIEW_HXX
#include <memory>
#include <svtools/svtdllapi.h>
#include <com/sun/star/uno/Sequence.h>
#include <vcl/ctrl.hxx>
#include <vcl/weld.hxx>
@@ -64,14 +63,14 @@ struct FileViewAsyncAction
}
};
class SVT_DLLPUBLIC SvtFileView : public Control
class SvtFileView : public Control
{
private:
std::unique_ptr<SvtFileView_Impl> 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<weld::Button> 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: */

View File

@@ -8,7 +8,6 @@
*/
#include <comphelper/processfactory.hxx>
#include <svtools/foldertree.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/urlobj.hxx>
#include <ucbhelper/commandenvironment.hxx>
@@ -17,6 +16,7 @@
#include <vcl/ptrstyle.hxx>
#include <com/sun/star/task/InteractionHandler.hpp>
#include "contentenumeration.hxx"
#include "foldertree.hxx"
#include <bitmaps.hlst>
using namespace ::com::sun::star::task;

View File

@@ -11,9 +11,6 @@
#define INCLUDED_SVTOOLS_FOLDERTREE_HXX
#include <com/sun/star/uno/Sequence.hxx>
#include <svtools/svtdllapi.h>
#include <tools/wintypes.hxx>
#include <vcl/treelistbox.hxx>
@@ -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;

View File

@@ -17,11 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <svtools/iconview.hxx>
#include <vcl/treelistentry.hxx>
#include <vcl/viewdataentry.hxx>
#include <svtools/fileview.hxx>
#include <iconviewimpl.hxx>
#include "fileview.hxx"
#include "iconview.hxx"
#include "iconviewimpl.hxx"
IconView::IconView( vcl::Window* pParent, WinBits nBits )
: SvTreeListBox( pParent, nBits )

View File

@@ -18,9 +18,9 @@
*/
#include <vcl/svapp.hxx>
#include <svtools/iconview.hxx>
#include <iconviewimpl.hxx>
#include <tools/debug.hxx>
#include "iconview.hxx"
#include "iconviewimpl.hxx"
IconViewImpl::IconViewImpl( SvTreeListBox* pTreeListBox, SvTreeList* pTreeList, WinBits nWinStyle )
: SvImpLBox( pTreeListBox, pTreeList, nWinStyle )

View File

@@ -21,6 +21,7 @@
#include <sal/macros.h>
#include <sal/log.hxx>
#include "fileview.hxx"
#include "iodlg.hxx"
#include <svtools/PlaceEditDialog.hxx>
#include "PlacesListBox.hxx"
@@ -37,7 +38,6 @@
#include <svl/urihelper.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/viewoptions.hxx>
#include <svtools/fileview.hxx>
#include <svtools/sfxecode.hxx>
#include <vcl/svtabbx.hxx>
#include <vcl/treelistentry.hxx>

View File

@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "fileview.hxx"
#include "iodlgimp.hxx"
#include <vcl/headbar.hxx>
#include <tools/debug.hxx>
@@ -26,7 +27,6 @@
#include <vcl/svapp.hxx>
#include <svl/eitem.hxx>
#include <unotools/viewoptions.hxx>
#include <svtools/fileview.hxx>
#include <svtools/inettbc.hxx>
#include "iodlg.hxx"
#include <bitmaps.hlst>

View File

@@ -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 <memory>
#include <vcl/weld.hxx>
#include <rtl/ustring.hxx>
#include <svtools/svtdllapi.h>
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<weld::Button> 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: */

View File

@@ -20,10 +20,11 @@
#ifndef INCLUDED_SVL_URLFILTER_HXX
#define INCLUDED_SVL_URLFILTER_HXX
#include <svtools/svtdllapi.h>
#include <tools/wldcrd.hxx>
#include <vector>
struct FilterMatch
struct SVT_DLLPUBLIC FilterMatch
{
private:
const OUString& m_rCompareString;

View File

@@ -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

View File

@@ -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 \

View File

@@ -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"

View File

@@ -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 <svtools/querydelete.hxx>
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: */

View File

@@ -53,7 +53,7 @@
#include <ucbhelper/content.hxx>
#include <unotools/ucbhelper.hxx>
#include <svtools/asynclink.hxx>
#include <svl/urlfilter.hxx>
#include <svtools/urlfilter.hxx>
#include <vector>
#include <algorithm>
@@ -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: */