summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appopen.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-11-22 09:54:44 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-11-22 09:54:44 +0000
commitbe94358809914d54335f933a3d8574bc21c890fa (patch)
tree689180d2dd2dd67d7b6303e1c8ddba6ed5b0269a /sfx2/source/appl/appopen.cxx
parentaffddb66e306ce2bf9bcf2df2aea4e2baade0e57 (diff)
INTEGRATION: CWS asyncdialogs (1.101.20); FILE MERGED
2006/10/31 17:53:38 pb 1.101.20.8: RESYNC: (1.107-1.108); FILE MERGED 2006/09/20 20:22:22 pb 1.101.20.7: RESYNC: (1.106-1.107); FILE MERGED 2006/08/30 16:27:35 pb 1.101.20.6: RESYNC: (1.105-1.106); FILE MERGED 2006/07/12 20:44:44 pb 1.101.20.5: RESYNC: (1.104-1.105); FILE MERGED 2006/06/28 04:33:48 pb 1.101.20.4: fix: #i57125# InsertDocumentsDialog() removed (after merge) 2006/05/31 14:35:00 pb 1.101.20.3: RESYNC: (1.103-1.104); FILE MERGED 2006/03/22 11:43:00 pb 1.101.20.2: RESYNC: (1.101-1.103); FILE MERGED 2006/03/01 09:26:22 pb 1.101.20.1: fix: #i57125# InsertDocumentsDialog() removed
Diffstat (limited to 'sfx2/source/appl/appopen.cxx')
-rw-r--r--sfx2/source/appl/appopen.cxx121
1 files changed, 3 insertions, 118 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 9f3599ef9b..c7de093837 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: appopen.cxx,v $
*
- * $Revision: 1.108 $
+ * $Revision: 1.109 $
*
- * last change: $Author: obo $ $Date: 2006-10-12 15:47:09 $
+ * last change: $Author: vg $ $Date: 2006-11-22 10:54:44 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -552,121 +552,6 @@ ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFil
//--------------------------------------------------------------------
-SfxMedium* SfxApplication::InsertDocumentDialog
-(
- ULONG nFlags,
- const String& rFact
-)
-{
- return InsertDocumentDialog( nFlags, rFact, 0 );
-}
-
-//--------------------------------------------------------------------
-
-SfxMedium* SfxApplication::InsertDocumentDialog
-(
- ULONG nFlags,
- const String& rFact,
- ULONG nHelpId
-)
-{
- SfxMedium *pMedium=0;
- SvStringsDtor* pURLList = NULL;
- String aFilter;
- SfxItemSet* pSet=0;
- ErrCode nErr = sfx2::FileOpenDialog_Impl( nFlags | SFXWB_INSERT | WB_3DLOOK, rFact, pURLList, aFilter, pSet, String(), nHelpId );
- if( pURLList && !nErr )
- {
- DBG_ASSERT( pURLList->Count() == 1, "invalid URLList count" );
- String aURL = *(pURLList->GetObject(0));
- pMedium = new SfxMedium(
- aURL, SFX_STREAM_READONLY, FALSE,
- GetFilterMatcher().GetFilter4FilterName( aFilter ), pSet );
-
- pMedium->UseInteractionHandler(TRUE);
-
- SfxFilterMatcher* pMatcher = NULL;
- if ( rFact.Len() )
- pMatcher = new SfxFilterMatcher( rFact );
- else
- pMatcher = new SfxFilterMatcher();
-
- const SfxFilter* pFilter=0;
- sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter, FALSE );
- if ( nError == ERRCODE_NONE && pFilter )
- pMedium->SetFilter( pFilter );
- else
- DELETEZ( pMedium );
-
- if( pMedium && CheckPasswd_Impl( 0, SFX_APP()->GetPool(), pMedium ) == ERRCODE_ABORT )
- pMedium = NULL;
-
- DELETEZ( pMatcher );
- }
-
- delete pURLList;
- return pMedium;
-}
-
-//--------------------------------------------------------------------
-
-SfxMediumList* SfxApplication::InsertDocumentsDialog
-(
- ULONG nFlags,
- const String& rFact,
- ULONG nHelpId
-)
-{
- SfxMediumList *pMediumList=new SfxMediumList;
- SvStringsDtor* pURLList = NULL;
- String aFilter;
- SfxItemSet* pSet=0;
- ErrCode nErr = sfx2::FileOpenDialog_Impl( nFlags | SFXWB_INSERT | SFXWB_MULTISELECTION | WB_3DLOOK, rFact, pURLList, aFilter, pSet, String(), nHelpId );
- DBG_ASSERT( pURLList, "invalid URLList" );
- if( pURLList && !nErr )
- {
- for ( USHORT n=0; n<pURLList->Count(); n++ )
- {
- String aURL = *(pURLList->GetObject(n));
- SfxMedium* pMedium = new SfxMedium(
- aURL, SFX_STREAM_READONLY, FALSE,
- GetFilterMatcher().GetFilter4FilterName( aFilter ), pSet );
-
- pMedium->UseInteractionHandler(TRUE);
-
- SfxFilterMatcher aMatcher( rFact );
- const SfxFilter* pFilter=0;
- sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, &pFilter, FALSE );
- if ( nError == ERRCODE_NONE && pFilter )
- pMedium->SetFilter( pFilter );
- else
- DELETEZ( pMedium );
-
- if( pMedium && CheckPasswd_Impl( 0, GetPool(), pMedium ) != ERRCODE_ABORT )
- {
- pMediumList->Insert( pMedium );
- }
- else
- delete pMedium;
- }
- }
-
- delete pURLList;
- return pMediumList;
-}
-
-//--------------------------------------------------------------------
-
-SfxMediumList* SfxApplication::InsertDocumentsDialog
-(
- ULONG nFlags,
- const String& rFact
-)
-{
- return InsertDocumentsDialog( nFlags, rFact, 0 );
-}
-
-//--------------------------------------------------------------------
SfxObjectShellLock SfxApplication::NewDoc_Impl( const String& rFact, const SfxItemSet *pSet )
{
SfxObjectShellLock xDoc;
@@ -1021,7 +906,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
ULONG nErr = sfx2::FileOpenDialog_Impl(
- WB_OPEN | SFXWB_MULTISELECTION | SFXWB_SHOWVERSIONS, String(), pURLList, aFilter, pSet, aPath );
+ WB_OPEN | SFXWB_MULTISELECTION | SFXWB_SHOWVERSIONS, String(), pURLList, aFilter, pSet, &aPath );
if ( nErr == ERRCODE_ABORT )
{