Fix #89507#: Use file dialog helper class
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: docsh2.cxx,v $
|
* $RCSfile: docsh2.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.32 $
|
* $Revision: 1.33 $
|
||||||
*
|
*
|
||||||
* last change: $Author: os $ $Date: 2001-08-09 06:53:28 $
|
* last change: $Author: fme $ $Date: 2001-08-09 12:41:46 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -278,9 +278,6 @@
|
|||||||
#ifndef _GLOBALS_HRC
|
#ifndef _GLOBALS_HRC
|
||||||
#include <globals.hrc>
|
#include <globals.hrc>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
|
|
||||||
#include <comphelper/processfactory.hxx>
|
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
|
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
|
||||||
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
||||||
#endif
|
#endif
|
||||||
@@ -296,9 +293,6 @@
|
|||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_LISTBOXCONTROLACTIONS_HPP_
|
#ifndef _COM_SUN_STAR_UI_DIALOGS_LISTBOXCONTROLACTIONS_HPP_
|
||||||
#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
|
#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_TEMPLATEDESCRIPTION_HPP_
|
|
||||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
|
||||||
#endif
|
|
||||||
#ifndef _SWSTYLENAMEMAPPER_HXX
|
#ifndef _SWSTYLENAMEMAPPER_HXX
|
||||||
#include <SwStyleNameMapper.hxx>
|
#include <SwStyleNameMapper.hxx>
|
||||||
#endif
|
#endif
|
||||||
@@ -872,22 +866,9 @@ void SwDocShell::Execute(SfxRequest& rReq)
|
|||||||
nRet = pNewFileDlg->Execute();
|
nRet = pNewFileDlg->Execute();
|
||||||
if(RET_TEMPLATE_LOAD == nRet)
|
if(RET_TEMPLATE_LOAD == nRet)
|
||||||
{
|
{
|
||||||
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
|
FileDialogHelper aDlgHelper( FILEOPEN_SIMPLE, 0 );
|
||||||
Reference < XFilePicker > xFP;
|
Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
|
||||||
if( xMgr.is() )
|
|
||||||
{
|
|
||||||
Sequence <Any> aProps(1);
|
|
||||||
aProps.getArray()[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
|
|
||||||
xFP = Reference< XFilePicker >(
|
|
||||||
xMgr->createInstanceWithArguments(
|
|
||||||
C2U( "com.sun.star.ui.dialogs.FilePicker" ), aProps ),
|
|
||||||
UNO_QUERY );
|
|
||||||
}
|
|
||||||
if(!xFP.is())
|
|
||||||
{
|
|
||||||
DBG_ERROR("service com.sun.star.ui.dialogs.FilePicker not found");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
xFP->setDisplayDirectory( aPathOpt.GetWorkPath() );
|
xFP->setDisplayDirectory( aPathOpt.GetWorkPath() );
|
||||||
|
|
||||||
SfxObjectFactory &rFact = GetFactory();
|
SfxObjectFactory &rFact = GetFactory();
|
||||||
@@ -1241,22 +1222,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
|
|||||||
|
|
||||||
const SwTxtFmtColl* pSplitColl = 0;
|
const SwTxtFmtColl* pSplitColl = 0;
|
||||||
|
|
||||||
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
|
FileDialogHelper aDlgHelper( FILESAVE_AUTOEXTENSION_TEMPLATE, 0 );
|
||||||
Reference < XFilePicker > xFP;
|
Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
|
||||||
if( xMgr.is() )
|
|
||||||
{
|
|
||||||
Sequence <Any> aProps(1);
|
|
||||||
aProps.getArray()[0] <<= TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE;
|
|
||||||
xFP = Reference< XFilePicker >(
|
|
||||||
xMgr->createInstanceWithArguments(
|
|
||||||
C2U( "com.sun.star.ui.dialogs.FilePicker" ), aProps ),
|
|
||||||
UNO_QUERY );
|
|
||||||
}
|
|
||||||
if(!xFP.is())
|
|
||||||
{
|
|
||||||
DBG_ERROR("service com.sun.star.ui.dialogs.FilePicker not found");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
const SfxFilter* pFlt;
|
const SfxFilter* pFlt;
|
||||||
USHORT nStrId;
|
USHORT nStrId;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: chardlg.cxx,v $
|
* $RCSfile: chardlg.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.11 $
|
* $Revision: 1.12 $
|
||||||
*
|
*
|
||||||
* last change: $Author: jp $ $Date: 2001-07-31 15:59:28 $
|
* last change: $Author: fme $ $Date: 2001-08-09 12:42:43 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -143,24 +143,21 @@
|
|||||||
#ifndef _CHARDLG_HRC
|
#ifndef _CHARDLG_HRC
|
||||||
#include <chardlg.hrc>
|
#include <chardlg.hrc>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
|
|
||||||
#include <comphelper/processfactory.hxx>
|
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
|
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
|
||||||
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_TEMPLATEDESCRIPTION_HPP_
|
|
||||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
|
||||||
#endif
|
|
||||||
#ifndef _SWSTYLENAMEMAPPER_HXX
|
#ifndef _SWSTYLENAMEMAPPER_HXX
|
||||||
#include <SwStyleNameMapper.hxx>
|
#include <SwStyleNameMapper.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _FILEDLGHELPER_HXX
|
||||||
|
#include <sfx2/filedlghelper.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace com::sun::star::ui::dialogs;
|
using namespace com::sun::star::ui::dialogs;
|
||||||
using namespace ::com::sun::star::lang;
|
using namespace ::com::sun::star::lang;
|
||||||
using namespace ::com::sun::star::uno;
|
using namespace ::com::sun::star::uno;
|
||||||
|
using namespace ::sfx2;
|
||||||
|
|
||||||
#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
|
|
||||||
/*--------------------------------------------------------------------
|
/*--------------------------------------------------------------------
|
||||||
Beschreibung: Der Traeger des Dialoges
|
Beschreibung: Der Traeger des Dialoges
|
||||||
--------------------------------------------------------------------*/
|
--------------------------------------------------------------------*/
|
||||||
@@ -433,18 +430,9 @@ SfxTabPage* SwCharURLPage::Create( Window* pParent,
|
|||||||
|
|
||||||
IMPL_LINK( SwCharURLPage, InsertFileHdl, PushButton *, pBtn )
|
IMPL_LINK( SwCharURLPage, InsertFileHdl, PushButton *, pBtn )
|
||||||
{
|
{
|
||||||
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
|
FileDialogHelper aDlgHelper( FILEOPEN_SIMPLE, 0 );
|
||||||
Reference < XFilePicker > xFP;
|
Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
|
||||||
if( xMgr.is() )
|
|
||||||
{
|
|
||||||
Sequence <Any> aProps(1);
|
|
||||||
aProps.getArray()[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
|
|
||||||
xFP = Reference< XFilePicker >(
|
|
||||||
xMgr->createInstanceWithArguments(
|
|
||||||
C2U( "com.sun.star.ui.dialogs.FilePicker" ), aProps ),
|
|
||||||
UNO_QUERY );
|
|
||||||
}
|
|
||||||
DBG_ERROR("how to set help ids at com.sun.star.ui.dialogs.FilePicker")
|
|
||||||
// pFileDlg->SetHelpId(HID_FILEDLG_CHARDLG);
|
// pFileDlg->SetHelpId(HID_FILEDLG_CHARDLG);
|
||||||
if( xFP->execute() == RET_OK )
|
if( xFP->execute() == RET_OK )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: romenu.cxx,v $
|
* $RCSfile: romenu.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.8 $
|
* $Revision: 1.9 $
|
||||||
*
|
*
|
||||||
* last change: $Author: os $ $Date: 2001-06-15 13:02:30 $
|
* last change: $Author: fme $ $Date: 2001-08-09 12:43:35 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -173,25 +173,20 @@
|
|||||||
#ifndef _DOCVW_HRC
|
#ifndef _DOCVW_HRC
|
||||||
#include <docvw.hrc>
|
#include <docvw.hrc>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
|
|
||||||
#include <comphelper/processfactory.hxx>
|
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
|
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
|
||||||
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILTERMANAGER_HPP_
|
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILTERMANAGER_HPP_
|
||||||
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
|
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_TEMPLATEDESCRIPTION_HPP_
|
#ifndef _FILEDLGHELPER_HXX
|
||||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
#include <sfx2/filedlghelper.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace ::com::sun::star::lang;
|
using namespace ::com::sun::star::lang;
|
||||||
using namespace ::com::sun::star::uno;
|
using namespace ::com::sun::star::uno;
|
||||||
using namespace com::sun::star::ui::dialogs;
|
using namespace com::sun::star::ui::dialogs;
|
||||||
|
using namespace ::sfx2;
|
||||||
#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
|
|
||||||
|
|
||||||
|
|
||||||
SwReadOnlyPopup::~SwReadOnlyPopup()
|
SwReadOnlyPopup::~SwReadOnlyPopup()
|
||||||
{
|
{
|
||||||
@@ -496,18 +491,10 @@ String SwReadOnlyPopup::SaveGraphic( USHORT nId )
|
|||||||
SvtPathOptions aPathOpt;
|
SvtPathOptions aPathOpt;
|
||||||
String sGrfPath( aPathOpt.GetGraphicPath() );
|
String sGrfPath( aPathOpt.GetGraphicPath() );
|
||||||
SwWrtShell &rSh = rView.GetWrtShell();
|
SwWrtShell &rSh = rView.GetWrtShell();
|
||||||
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
|
|
||||||
Reference < XFilePicker > xFP;
|
FileDialogHelper aDlgHelper( FILESAVE_SIMPLE, 0 );
|
||||||
if( xMgr.is() )
|
Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
|
||||||
{
|
|
||||||
Sequence <Any> aProps(1);
|
|
||||||
aProps.getArray()[0] <<= TemplateDescription::FILESAVE_SIMPLE;
|
|
||||||
xFP = Reference< XFilePicker >(
|
|
||||||
xMgr->createInstanceWithArguments(
|
|
||||||
C2U( "com.sun.star.ui.dialogs.FilePicker" ), aProps ),
|
|
||||||
UNO_QUERY );
|
|
||||||
}
|
|
||||||
DBG_ERROR("how to set help ids at com.sun.star.ui.dialogs.FilePicker")
|
|
||||||
// aExpDlg.SetHelpId(HID_FILEDLG_ROMENU);
|
// aExpDlg.SetHelpId(HID_FILEDLG_ROMENU);
|
||||||
INetURLObject aPath;
|
INetURLObject aPath;
|
||||||
aPath.SetSmartURL( sGrfPath);
|
aPath.SetSmartURL( sGrfPath);
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: frmpage.cxx,v $
|
* $RCSfile: frmpage.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.11 $
|
* $Revision: 1.12 $
|
||||||
*
|
*
|
||||||
* last change: $Author: dr $ $Date: 2001-06-22 07:35:46 $
|
* last change: $Author: fme $ $Date: 2001-08-09 12:44:09 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -176,9 +176,6 @@
|
|||||||
#ifndef _FILEDLGHELPER_HXX
|
#ifndef _FILEDLGHELPER_HXX
|
||||||
#include <sfx2/filedlghelper.hxx>
|
#include <sfx2/filedlghelper.hxx>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
|
|
||||||
#include <comphelper/processfactory.hxx>
|
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
|
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
|
||||||
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
||||||
#endif
|
#endif
|
||||||
@@ -188,9 +185,6 @@
|
|||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_EXTENDEDFILEPICKERELEMENTIDS_HPP_
|
#ifndef _COM_SUN_STAR_UI_DIALOGS_EXTENDEDFILEPICKERELEMENTIDS_HPP_
|
||||||
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
|
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_TEMPLATEDESCRIPTION_HPP_
|
|
||||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace ::com::sun::star::lang;
|
using namespace ::com::sun::star::lang;
|
||||||
using namespace ::com::sun::star::uno;
|
using namespace ::com::sun::star::uno;
|
||||||
@@ -199,8 +193,6 @@ using namespace ::com::sun::star;
|
|||||||
using namespace ::rtl;
|
using namespace ::rtl;
|
||||||
using namespace ::sfx2;
|
using namespace ::sfx2;
|
||||||
|
|
||||||
#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
|
|
||||||
|
|
||||||
struct FrmMap
|
struct FrmMap
|
||||||
{
|
{
|
||||||
USHORT nStrId;
|
USHORT nStrId;
|
||||||
@@ -2593,17 +2585,9 @@ SfxTabPage* SwFrmURLPage::Create(Window *pParent, const SfxItemSet &rSet)
|
|||||||
|
|
||||||
IMPL_LINK( SwFrmURLPage, InsertFileHdl, PushButton *, pBtn )
|
IMPL_LINK( SwFrmURLPage, InsertFileHdl, PushButton *, pBtn )
|
||||||
{
|
{
|
||||||
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
|
FileDialogHelper aDlgHelper( FILEOPEN_SIMPLE, 0 );
|
||||||
Reference < XFilePicker > xFP;
|
Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
|
||||||
if( xMgr.is() )
|
|
||||||
{
|
|
||||||
Sequence <Any> aProps(1);
|
|
||||||
aProps.getArray()[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
|
|
||||||
xFP = Reference< XFilePicker >(
|
|
||||||
xMgr->createInstanceWithArguments(
|
|
||||||
C2U( "com.sun.star.ui.dialogs.FilePicker" ), aProps ),
|
|
||||||
UNO_QUERY );
|
|
||||||
}
|
|
||||||
String sTemp(aURLED.GetText());
|
String sTemp(aURLED.GetText());
|
||||||
if(sTemp.Len())
|
if(sTemp.Len())
|
||||||
xFP->setDisplayDirectory(sTemp);
|
xFP->setDisplayDirectory(sTemp);
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: cnttab.cxx,v $
|
* $RCSfile: cnttab.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.27 $
|
* $Revision: 1.28 $
|
||||||
*
|
*
|
||||||
* last change: $Author: jp $ $Date: 2001-07-31 16:03:01 $
|
* last change: $Author: fme $ $Date: 2001-08-09 12:44:58 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -148,12 +148,6 @@
|
|||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILTERMANAGER_HPP_
|
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILTERMANAGER_HPP_
|
||||||
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
|
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_TEMPLATEDESCRIPTION_HPP_
|
|
||||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
|
||||||
#endif
|
|
||||||
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
|
|
||||||
#include <comphelper/processfactory.hxx>
|
|
||||||
#endif
|
|
||||||
#ifndef _UCBHELPER_CONTENT_HXX
|
#ifndef _UCBHELPER_CONTENT_HXX
|
||||||
#include <ucbhelper/content.hxx>
|
#include <ucbhelper/content.hxx>
|
||||||
#endif
|
#endif
|
||||||
@@ -260,7 +254,9 @@
|
|||||||
#ifndef _SWSTYLENAMEMAPPER_HXX
|
#ifndef _SWSTYLENAMEMAPPER_HXX
|
||||||
#include <SwStyleNameMapper.hxx>
|
#include <SwStyleNameMapper.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _FILEDLGHELPER_HXX
|
||||||
|
#include <sfx2/filedlghelper.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace ::com::sun::star;
|
using namespace ::com::sun::star;
|
||||||
using namespace ::com::sun::star::text;
|
using namespace ::com::sun::star::text;
|
||||||
@@ -271,6 +267,7 @@ using namespace ::com::sun::star::ucb;
|
|||||||
using namespace ::com::sun::star::uno;
|
using namespace ::com::sun::star::uno;
|
||||||
using namespace com::sun::star::ui::dialogs;
|
using namespace com::sun::star::ui::dialogs;
|
||||||
using namespace ::rtl;
|
using namespace ::rtl;
|
||||||
|
using namespace ::sfx2;
|
||||||
|
|
||||||
#define C2S(cChar) UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(cChar))
|
#define C2S(cChar) UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(cChar))
|
||||||
#define C2U(cChar) OUString::createFromAscii(cChar)
|
#define C2U(cChar) OUString::createFromAscii(cChar)
|
||||||
@@ -311,18 +308,8 @@ String lcl_CreateAutoMarkFileDlg( Window* pParent, const String& rURL,
|
|||||||
{
|
{
|
||||||
String sRet;
|
String sRet;
|
||||||
|
|
||||||
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
|
FileDialogHelper aDlgHelper( bOpen ? FILEOPEN_SIMPLE : FILESAVE_SIMPLE, 0 );
|
||||||
Reference < XFilePicker > xFP;
|
Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
|
||||||
if( xMgr.is() )
|
|
||||||
{
|
|
||||||
Sequence <Any> aProps(1);
|
|
||||||
aProps.getArray()[0] <<= bOpen ?
|
|
||||||
TemplateDescription::FILEOPEN_SIMPLE : TemplateDescription::FILESAVE_SIMPLE;
|
|
||||||
xFP = Reference< XFilePicker >(
|
|
||||||
xMgr->createInstanceWithArguments(
|
|
||||||
C2U( "com.sun.star.ui.dialogs.FilePicker" ), aProps ),
|
|
||||||
UNO_QUERY );
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
|
Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
|
||||||
String sCurFltr( IDX_FILE_EXTENSION );
|
String sCurFltr( IDX_FILE_EXTENSION );
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: glossary.cxx,v $
|
* $RCSfile: glossary.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.20 $
|
* $Revision: 1.21 $
|
||||||
*
|
*
|
||||||
* last change: $Author: jp $ $Date: 2001-07-31 08:41:06 $
|
* last change: $Author: fme $ $Date: 2001-08-09 12:45:40 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -127,30 +127,12 @@
|
|||||||
#ifndef _UCBHELPER_CONTENT_HXX
|
#ifndef _UCBHELPER_CONTENT_HXX
|
||||||
#include <ucbhelper/content.hxx>
|
#include <ucbhelper/content.hxx>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COM_SUN_STAR_TEXT_XAUTOTEXTGROUP_HPP_
|
|
||||||
#include <com/sun/star/text/XAutoTextGroup.hpp>
|
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_TEXT_XAUTOTEXTENTRY_HPP_
|
|
||||||
#include <com/sun/star/text/XAutoTextEntry.hpp>
|
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_TEXT_XAUTOTEXTCONTAINER_HPP_
|
|
||||||
#include <com/sun/star/text/XAutoTextContainer.hpp>
|
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
|
|
||||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_
|
|
||||||
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
|
|
||||||
#endif
|
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
|
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKER_HPP_
|
||||||
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILTERMANAGER_HPP_
|
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILTERMANAGER_HPP_
|
||||||
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
|
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_TEMPLATEDESCRIPTION_HPP_
|
|
||||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SVTOOLS_URIHELPER_HXX
|
#ifndef SVTOOLS_URIHELPER_HXX
|
||||||
#include <svtools/urihelper.hxx>
|
#include <svtools/urihelper.hxx>
|
||||||
@@ -226,6 +208,9 @@
|
|||||||
#ifndef _URLOBJ_HXX
|
#ifndef _URLOBJ_HXX
|
||||||
#include <tools/urlobj.hxx>
|
#include <tools/urlobj.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef _FILEDLGHELPER_HXX
|
||||||
|
#include <sfx2/filedlghelper.hxx>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define LONG_LENGTH 60
|
#define LONG_LENGTH 60
|
||||||
#define SHORT_LENGTH 30
|
#define SHORT_LENGTH 30
|
||||||
@@ -240,6 +225,7 @@ using namespace ::com::sun::star::ui::dialogs;
|
|||||||
using namespace ::comphelper;
|
using namespace ::comphelper;
|
||||||
using namespace ::ucb;
|
using namespace ::ucb;
|
||||||
using namespace ::rtl;
|
using namespace ::rtl;
|
||||||
|
using namespace ::sfx2;
|
||||||
|
|
||||||
/* -----------------------------08.02.00 10:28--------------------------------
|
/* -----------------------------08.02.00 10:28--------------------------------
|
||||||
|
|
||||||
@@ -735,17 +721,9 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
|
|||||||
case FN_GL_IMPORT:
|
case FN_GL_IMPORT:
|
||||||
{
|
{
|
||||||
// call the FileOpenDialog do find WinWord - Files with templates
|
// call the FileOpenDialog do find WinWord - Files with templates
|
||||||
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
|
FileDialogHelper aDlgHelper( FILEOPEN_SIMPLE, 0 );
|
||||||
Reference < XFilePicker > xFP;
|
Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
|
||||||
if( xMgr.is() )
|
|
||||||
{
|
|
||||||
Sequence <Any> aProps(1);
|
|
||||||
aProps.getArray()[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
|
|
||||||
xFP = Reference< XFilePicker >(
|
|
||||||
xMgr->createInstanceWithArguments(
|
|
||||||
C2U( "com.sun.star.ui.dialogs.FilePicker" ), aProps ),
|
|
||||||
UNO_QUERY );
|
|
||||||
}
|
|
||||||
SvtPathOptions aPathOpt;
|
SvtPathOptions aPathOpt;
|
||||||
xFP->setDisplayDirectory(aPathOpt.GetWorkPath() );
|
xFP->setDisplayDirectory(aPathOpt.GetWorkPath() );
|
||||||
String sWW8( C2S(FILTER_WW8) );
|
String sWW8( C2S(FILTER_WW8) );
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: srcview.cxx,v $
|
* $RCSfile: srcview.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.18 $
|
* $Revision: 1.19 $
|
||||||
*
|
*
|
||||||
* last change: $Author: os $ $Date: 2001-07-26 05:53:10 $
|
* last change: $Author: fme $ $Date: 2001-08-09 12:46:23 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -71,9 +71,6 @@
|
|||||||
#ifndef _UIPARAM_HXX
|
#ifndef _UIPARAM_HXX
|
||||||
#include <uiparam.hxx>
|
#include <uiparam.hxx>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
|
|
||||||
#include <comphelper/processfactory.hxx>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _COM_SUN_STAR_UTIL_SEARCHOPTIONS_HPP_
|
#ifndef _COM_SUN_STAR_UTIL_SEARCHOPTIONS_HPP_
|
||||||
#include <com/sun/star/util/SearchOptions.hpp>
|
#include <com/sun/star/util/SearchOptions.hpp>
|
||||||
@@ -245,8 +242,8 @@
|
|||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILTERMANAGER_HPP_
|
#ifndef _COM_SUN_STAR_UI_DIALOGS_XFILTERMANAGER_HPP_
|
||||||
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
|
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _COM_SUN_STAR_UI_DIALOGS_TEMPLATEDESCRIPTION_HPP_
|
#ifndef _FILEDLGHELPER_HXX
|
||||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
#include <sfx2/filedlghelper.hxx>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SwSrcView
|
#define SwSrcView
|
||||||
@@ -265,9 +262,9 @@ using namespace com::sun::star::ui::dialogs;
|
|||||||
using namespace com::sun::star::i18n;
|
using namespace com::sun::star::i18n;
|
||||||
using namespace ::com::sun::star::lang;
|
using namespace ::com::sun::star::lang;
|
||||||
using namespace ::rtl;
|
using namespace ::rtl;
|
||||||
|
using namespace ::sfx2;
|
||||||
|
|
||||||
#define C2S(cChar) UniString::CreateFromAscii(cChar)
|
#define C2S(cChar) UniString::CreateFromAscii(cChar)
|
||||||
#define C2U(cChar) OUString::createFromAscii(cChar)
|
|
||||||
|
|
||||||
#define SWSRCVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \
|
#define SWSRCVIEWFLAGS ( SFX_VIEW_MAXIMIZE_FIRST| \
|
||||||
SFX_VIEW_OBJECTSIZE_EMBEDDED| \
|
SFX_VIEW_OBJECTSIZE_EMBEDDED| \
|
||||||
@@ -566,18 +563,10 @@ void SwSrcView::Execute(SfxRequest& rReq)
|
|||||||
{
|
{
|
||||||
SvtPathOptions aPathOpt;
|
SvtPathOptions aPathOpt;
|
||||||
Window* pParent = &GetViewFrame()->GetWindow();
|
Window* pParent = &GetViewFrame()->GetWindow();
|
||||||
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
|
|
||||||
Reference < XFilePicker > xFP;
|
FileDialogHelper aDlgHelper( FILESAVE_SIMPLE, 0 );
|
||||||
if( xMgr.is() )
|
Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
|
||||||
{
|
|
||||||
Sequence <Any> aProps(1);
|
|
||||||
aProps.getArray()[0] <<= TemplateDescription::FILESAVE_SIMPLE;
|
|
||||||
xFP = Reference< XFilePicker >(
|
|
||||||
xMgr->createInstanceWithArguments(
|
|
||||||
C2U( "com.sun.star.ui.dialogs.FilePicker" ), aProps ),
|
|
||||||
UNO_QUERY );
|
|
||||||
}
|
|
||||||
DBG_ERROR("how to set help ids at com.sun.star.ui.dialogs.FilePicker")
|
|
||||||
// pFileDlg->SetHelpId(HID_FILEDLG_SRCVIEW);
|
// pFileDlg->SetHelpId(HID_FILEDLG_SRCVIEW);
|
||||||
Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
|
Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user