SvxMultiFileDialog is never created
because the single caller of it is a hidden button in the old mail merge dialog which was never completed to allow attachments to emails (because it never was able to send emails, the new one can FWIW) all of which has logical knock on effects to shrink things down substantially Change-Id: I831cac8f670eaafc96b2ea4d78516f67b662fa7d
This commit is contained in:
parent
5918277a12
commit
200cc2d20a
@ -105,7 +105,6 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
|
||||
cui/source/dialogs/insdlg \
|
||||
cui/source/dialogs/insrc \
|
||||
cui/source/dialogs/linkdlg \
|
||||
cui/source/dialogs/multifil \
|
||||
cui/source/dialogs/multipat \
|
||||
cui/source/dialogs/newtabledlg \
|
||||
cui/source/dialogs/passwdomdlg \
|
||||
|
@ -1,167 +0,0 @@
|
||||
/* -*- 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 "sal/config.h"
|
||||
|
||||
#include <comphelper/processfactory.hxx>
|
||||
#include <tools/shl.hxx>
|
||||
#include <vcl/msgbox.hxx>
|
||||
#include <sfx2/filedlghelper.hxx>
|
||||
|
||||
#include <tools/urlobj.hxx>
|
||||
|
||||
#include "multipat.hxx"
|
||||
#include "multifil.hxx"
|
||||
#include <dialmgr.hxx>
|
||||
|
||||
#include "multipat.hrc"
|
||||
#include <cuires.hrc>
|
||||
|
||||
// #97807# -------------
|
||||
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
|
||||
|
||||
#include "com/sun/star/ui/dialogs/TemplateDescription.hpp"
|
||||
|
||||
using namespace com::sun::star::ucb;
|
||||
using namespace com::sun::star::uno;
|
||||
|
||||
// class SvxMultiFileDialog ----------------------------------------------
|
||||
|
||||
IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn )
|
||||
{
|
||||
sfx2::FileDialogHelper aDlg(
|
||||
com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
|
||||
|
||||
if ( IsClassPathMode() )
|
||||
{
|
||||
aDlg.SetTitle( CUI_RES( RID_SVXSTR_ARCHIVE_TITLE ) );
|
||||
aDlg.AddFilter( CUI_RES( RID_SVXSTR_ARCHIVE_HEADLINE ), OUString("*.jar;*.zip") );
|
||||
}
|
||||
|
||||
if ( aDlg.Execute() == ERRCODE_NONE )
|
||||
{
|
||||
// #97807# URL content comparison of entries -----------
|
||||
INetURLObject aFile( aDlg.GetPath() );
|
||||
OUString sInsFile = aFile.getFSysPath( INetURLObject::FSYS_DETECT );
|
||||
::ucbhelper::Content aContent( aFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
|
||||
Reference< XContent > xContent = aContent.get();
|
||||
OSL_ENSURE( xContent.is(), "AddHdl_Impl: invalid content interface!" );
|
||||
Reference< XContentIdentifier > xID = xContent->getIdentifier();
|
||||
OSL_ENSURE( xID.is(), "AddHdl_Impl: invalid ID interface!" );
|
||||
// ensure the content of files are valid
|
||||
|
||||
sal_uInt16 nCount = aPathLB.GetEntryCount();
|
||||
sal_Bool bDuplicated = sal_False;
|
||||
try
|
||||
{
|
||||
if( nCount > 0 ) // start comparison
|
||||
{
|
||||
sal_uInt16 i;
|
||||
::ucbhelper::Content & VContent = aContent; // temporary Content reference
|
||||
Reference< XContent > xVContent;
|
||||
Reference< XContentIdentifier > xVID;
|
||||
for( i = 0; i < nCount; i++ )
|
||||
{
|
||||
OUString sVFile = aPathLB.GetEntry( i );
|
||||
std::map< OUString, ::ucbhelper::Content >::iterator aCur = aFileContentMap.find( sVFile );
|
||||
if( aCur == aFileContentMap.end() ) // look for File Content in aFileContentMap, but not find it.
|
||||
{
|
||||
INetURLObject aVFile( sVFile, INetURLObject::FSYS_DETECT );
|
||||
aFileContentMap[sVFile] = ::ucbhelper::Content( aVFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() );
|
||||
VContent = aFileContentMap.find( sVFile )->second;
|
||||
}
|
||||
else
|
||||
VContent = aCur->second;
|
||||
xVContent = VContent.get();
|
||||
OSL_ENSURE( xVContent.is(), "AddHdl_Impl: invalid content interface!" );
|
||||
xVID = xVContent->getIdentifier();
|
||||
OSL_ENSURE( xVID.is(), "AddHdl_Impl: invalid ID interface!" );
|
||||
if ( xID.is() && xVID.is()
|
||||
&& ( UniversalContentBroker::create(
|
||||
comphelper::getProcessComponentContext() )->
|
||||
compareContentIds( xID, xVID ) == 0 ) )
|
||||
{
|
||||
bDuplicated = sal_True;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} // end of if the entries are more than zero.
|
||||
} // end of try(}
|
||||
catch( const Exception& ) // catch every exception of comparison
|
||||
{
|
||||
OSL_FAIL( "AddHdl_Impl: caught an unexpected exception!" );
|
||||
}
|
||||
|
||||
if ( bDuplicated ) // #97807# --------------------
|
||||
{
|
||||
OUString sMsg( CUI_RES( RID_SVXSTR_MULTIFILE_DBL_ERR ) );
|
||||
sMsg = sMsg.replaceFirst( "%1", sInsFile );
|
||||
InfoBox( pBtn, sMsg ).Execute();
|
||||
}
|
||||
else
|
||||
{
|
||||
sal_uInt16 nPos = aPathLB.InsertEntry( sInsFile, LISTBOX_APPEND );
|
||||
aPathLB.SetEntryData( nPos, new OUString( sInsFile ) );
|
||||
}
|
||||
|
||||
} // end of if ( aDlg.Execute() == ERRCODE_NONE )
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
IMPL_LINK_NOARG(SvxMultiFileDialog, DelHdl_Impl)
|
||||
{
|
||||
sal_uInt16 nPos = aPathLB.GetSelectEntryPos();
|
||||
aPathLB.RemoveEntry( nPos );
|
||||
sal_uInt16 nCnt = aPathLB.GetEntryCount();
|
||||
|
||||
if ( nCnt )
|
||||
{
|
||||
nCnt--;
|
||||
|
||||
if ( nPos > nCnt )
|
||||
nPos = nCnt;
|
||||
aPathLB.SelectEntryPos( nPos );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
SvxMultiFileDialog::SvxMultiFileDialog( Window* pParent, sal_Bool bEmptyAllowed ) :
|
||||
|
||||
SvxMultiPathDialog( pParent, bEmptyAllowed )
|
||||
|
||||
{
|
||||
aAddBtn.SetClickHdl( LINK( this, SvxMultiFileDialog, AddHdl_Impl ) );
|
||||
aDelBtn.SetClickHdl( LINK( this, SvxMultiFileDialog, DelHdl_Impl ) );
|
||||
SetText( CUI_RES( RID_SVXSTR_FILE_TITLE ) );
|
||||
aPathFL.SetText( CUI_RES( RID_SVXSTR_FILE_HEADLINE ) );
|
||||
aDelBtn.Enable();
|
||||
}
|
||||
|
||||
|
||||
|
||||
SvxMultiFileDialog::~SvxMultiFileDialog()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -40,27 +40,15 @@ using namespace ::com::sun::star::lang;
|
||||
using namespace ::com::sun::star::ui::dialogs;
|
||||
using namespace ::com::sun::star::uno;
|
||||
|
||||
// struct MultiPath_Impl -------------------------------------------------
|
||||
|
||||
struct MultiPath_Impl
|
||||
{
|
||||
sal_Bool bEmptyAllowed;
|
||||
sal_Bool bIsClassPathMode;
|
||||
bool bIsRadioButtonMode;
|
||||
|
||||
MultiPath_Impl( sal_Bool bAllowed ) :
|
||||
bEmptyAllowed( bAllowed ), bIsClassPathMode( sal_False ), bIsRadioButtonMode( false ) {}
|
||||
};
|
||||
|
||||
// class SvxMultiPathDialog ----------------------------------------------
|
||||
|
||||
IMPL_LINK_NOARG(SvxMultiPathDialog, SelectHdl_Impl)
|
||||
{
|
||||
sal_uLong nCount = pImpl->bIsRadioButtonMode ? aRadioLB.GetEntryCount() : aPathLB.GetEntryCount();
|
||||
bool bIsSelected = pImpl->bIsRadioButtonMode
|
||||
sal_uLong nCount = bIsRadioButtonMode ? aRadioLB.GetEntryCount() : aPathLB.GetEntryCount();
|
||||
bool bIsSelected = bIsRadioButtonMode
|
||||
? aRadioLB.FirstSelected() != NULL
|
||||
: aPathLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND;
|
||||
sal_Bool bEnable = ( pImpl->bEmptyAllowed || nCount > 1 );
|
||||
bool bEnable = nCount > 1;
|
||||
aDelBtn.Enable( bEnable && bIsSelected );
|
||||
return 0;
|
||||
}
|
||||
@ -91,7 +79,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl)
|
||||
OUString sInsPath;
|
||||
::utl::LocalFileHelper::ConvertURLToSystemPath( aURL, sInsPath );
|
||||
|
||||
if ( pImpl->bIsRadioButtonMode )
|
||||
if ( bIsRadioButtonMode )
|
||||
{
|
||||
sal_uLong nPos = aRadioLB.GetEntryPos( sInsPath, 1 );
|
||||
if ( 0xffffffff == nPos ) //See svtools/source/contnr/svtabbx.cxx SvTabListBox::GetEntryPos
|
||||
@ -132,7 +120,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl)
|
||||
|
||||
IMPL_LINK_NOARG(SvxMultiPathDialog, DelHdl_Impl)
|
||||
{
|
||||
if ( pImpl->bIsRadioButtonMode )
|
||||
if ( bIsRadioButtonMode )
|
||||
{
|
||||
SvTreeListEntry* pEntry = aRadioLB.FirstSelected();
|
||||
delete (OUString*)pEntry->GetUserData();
|
||||
@ -176,7 +164,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, DelHdl_Impl)
|
||||
|
||||
|
||||
|
||||
SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed ) :
|
||||
SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent ) :
|
||||
|
||||
ModalDialog( pParent, CUI_RES( RID_SVXDLG_MULTIPATH ) ),
|
||||
|
||||
@ -190,7 +178,7 @@ SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed
|
||||
aOKBtn ( this, CUI_RES( BTN_MULTIPATH_OK ) ),
|
||||
aCancelBtn ( this, CUI_RES( BTN_MULTIPATH_CANCEL ) ),
|
||||
aHelpButton ( this, CUI_RES( BTN_MULTIPATH_HELP ) ),
|
||||
pImpl ( new MultiPath_Impl( bEmptyAllowed ) )
|
||||
bIsRadioButtonMode( false )
|
||||
|
||||
{
|
||||
static long aStaticTabs[]= { 2, 0, 12 };
|
||||
@ -214,8 +202,6 @@ SvxMultiPathDialog::SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed
|
||||
aDelBtn.SetAccessibleRelationMemberOf(&aPathLB);
|
||||
}
|
||||
|
||||
|
||||
|
||||
SvxMultiPathDialog::~SvxMultiPathDialog()
|
||||
{
|
||||
sal_uInt16 nPos = aPathLB.GetEntryCount();
|
||||
@ -227,17 +213,14 @@ SvxMultiPathDialog::~SvxMultiPathDialog()
|
||||
SvTreeListEntry* pEntry = aRadioLB.GetEntry( nPos );
|
||||
delete (OUString*)pEntry->GetUserData();
|
||||
}
|
||||
delete pImpl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
OUString SvxMultiPathDialog::GetPath() const
|
||||
{
|
||||
OUString sNewPath;
|
||||
sal_Unicode cDelim = pImpl->bIsClassPathMode ? CLASSPATH_DELIMITER : SVT_SEARCHPATH_DELIMITER;
|
||||
sal_Unicode cDelim = SVT_SEARCHPATH_DELIMITER;
|
||||
|
||||
if ( pImpl->bIsRadioButtonMode )
|
||||
if ( bIsRadioButtonMode )
|
||||
{
|
||||
OUString sWritable;
|
||||
for ( sal_uInt16 i = 0; i < aRadioLB.GetEntryCount(); ++i )
|
||||
@ -272,7 +255,7 @@ OUString SvxMultiPathDialog::GetPath() const
|
||||
|
||||
void SvxMultiPathDialog::SetPath( const OUString& rPath )
|
||||
{
|
||||
sal_Unicode cDelim = pImpl->bIsClassPathMode ? CLASSPATH_DELIMITER : SVT_SEARCHPATH_DELIMITER;
|
||||
sal_Unicode cDelim = SVT_SEARCHPATH_DELIMITER;
|
||||
sal_uInt16 nPos, nCount = comphelper::string::getTokenCount(rPath, cDelim);
|
||||
|
||||
for ( sal_uInt16 i = 0; i < nCount; ++i )
|
||||
@ -282,7 +265,7 @@ void SvxMultiPathDialog::SetPath( const OUString& rPath )
|
||||
sal_Bool bIsSystemPath =
|
||||
::utl::LocalFileHelper::ConvertURLToSystemPath( sPath, sSystemPath );
|
||||
|
||||
if ( pImpl->bIsRadioButtonMode )
|
||||
if ( bIsRadioButtonMode )
|
||||
{
|
||||
OUString sEntry( '\t' );
|
||||
sEntry += (bIsSystemPath ? sSystemPath : OUString(sPath));
|
||||
@ -300,7 +283,7 @@ void SvxMultiPathDialog::SetPath( const OUString& rPath )
|
||||
}
|
||||
}
|
||||
|
||||
if ( pImpl->bIsRadioButtonMode && nCount > 0 )
|
||||
if ( bIsRadioButtonMode && nCount > 0 )
|
||||
{
|
||||
SvTreeListEntry* pEntry = aRadioLB.GetEntry( nCount - 1 );
|
||||
if ( pEntry )
|
||||
@ -313,27 +296,9 @@ void SvxMultiPathDialog::SetPath( const OUString& rPath )
|
||||
SelectHdl_Impl( NULL );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SvxMultiPathDialog::SetClassPathMode()
|
||||
{
|
||||
pImpl->bIsClassPathMode = sal_True;
|
||||
SetText( CUI_RES( RID_SVXSTR_ARCHIVE_TITLE ));
|
||||
aPathFL.SetText( CUI_RES( RID_SVXSTR_ARCHIVE_HEADLINE ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
sal_Bool SvxMultiPathDialog::IsClassPathMode() const
|
||||
{
|
||||
return pImpl->bIsClassPathMode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SvxMultiPathDialog::EnableRadioButtonMode()
|
||||
{
|
||||
pImpl->bIsRadioButtonMode = true;
|
||||
bIsRadioButtonMode = true;
|
||||
|
||||
aPathFL.Hide();
|
||||
aPathLB.Hide();
|
||||
|
@ -96,26 +96,22 @@ ModalDialog RID_SVXDLG_MULTIPATH
|
||||
Text [ en-US ] = "Path list" ;
|
||||
};
|
||||
};
|
||||
|
||||
String RID_MULTIPATH_DBL_ERR
|
||||
{
|
||||
Text [ en-US ] = "The path %1 already exists." ;
|
||||
};
|
||||
String RID_SVXSTR_FILE_TITLE
|
||||
{
|
||||
Text [ en-US ] = "Select files" ;
|
||||
};
|
||||
String RID_SVXSTR_FILE_HEADLINE
|
||||
{
|
||||
Text [ en-US ] = "Files" ;
|
||||
};
|
||||
|
||||
String RID_SVXSTR_ARCHIVE_TITLE
|
||||
{
|
||||
Text [ en-US ] = "Select Archives" ;
|
||||
};
|
||||
|
||||
String RID_SVXSTR_ARCHIVE_HEADLINE
|
||||
{
|
||||
Text [ en-US ] = "Archives" ;
|
||||
};
|
||||
|
||||
String RID_SVXSTR_MULTIFILE_DBL_ERR
|
||||
{
|
||||
Text [ en-US ] = "The file %1 already exists." ;
|
||||
|
@ -48,7 +48,6 @@
|
||||
#include "optdict.hxx"
|
||||
#include "dlgname.hxx"
|
||||
#include "multipat.hxx"
|
||||
#include "multifil.hxx"
|
||||
#include "cuihyperdlg.hxx"
|
||||
#include "cuifmsearch.hxx"
|
||||
#include "cuigrfflt.hxx"
|
||||
@ -136,7 +135,6 @@ IMPL_ABSTDLG_BASE(AbstractSvxObjectTitleDescDialog_Impl);
|
||||
|
||||
IMPL_ABSTDLG_BASE(AbstractSvxMessDialog_Impl);
|
||||
IMPL_ABSTDLG_BASE(AbstractSvxMultiPathDialog_Impl);
|
||||
IMPL_ABSTDLG_BASE(AbstractSvxMultiFileDialog_Impl);
|
||||
IMPL_ABSTDLG_BASE(AbstractSvxHpLinkDlg_Impl);
|
||||
IMPL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl);
|
||||
IMPL_ABSTDLG_BASE(AbstractGraphicFilterDialog_Impl);
|
||||
@ -808,46 +806,6 @@ void AbstractSvxMultiPathDialog_Impl::SetTitle( const OUString& rNewTitle )
|
||||
pDlg->SetText( rNewTitle );
|
||||
}
|
||||
|
||||
OUString AbstractSvxMultiFileDialog_Impl::GetPath() const
|
||||
{
|
||||
return pDlg->GetPath();
|
||||
}
|
||||
|
||||
void AbstractSvxMultiFileDialog_Impl::SetPath( const OUString& rPath )
|
||||
{
|
||||
pDlg->SetPath( rPath );
|
||||
}
|
||||
|
||||
OUString AbstractSvxMultiFileDialog_Impl::GetFiles() const
|
||||
{
|
||||
return pDlg->GetFiles();
|
||||
}
|
||||
|
||||
void AbstractSvxMultiFileDialog_Impl::SetFiles( const OUString& rPath )
|
||||
{
|
||||
pDlg->SetFiles( rPath );
|
||||
}
|
||||
|
||||
void AbstractSvxMultiFileDialog_Impl::SetClassPathMode()
|
||||
{
|
||||
pDlg->SetClassPathMode();
|
||||
}
|
||||
|
||||
void AbstractSvxMultiFileDialog_Impl::EnableRadioButtonMode()
|
||||
{
|
||||
pDlg->EnableRadioButtonMode();
|
||||
}
|
||||
|
||||
void AbstractSvxMultiFileDialog_Impl::SetTitle( const OUString& rNewTitle )
|
||||
{
|
||||
pDlg->SetText( rNewTitle );
|
||||
}
|
||||
|
||||
void AbstractSvxMultiFileDialog_Impl::SetHelpId( const OString& aHelpId )
|
||||
{
|
||||
pDlg->SetHelpId( aHelpId );
|
||||
}
|
||||
|
||||
Window * AbstractSvxHpLinkDlg_Impl::GetWindow()
|
||||
{
|
||||
return (Window *)pDlg;
|
||||
@ -1454,18 +1412,12 @@ AbstractSvxMessDialog * AbstractDialogFactory_Impl::CreateSvxMessDialog( Window*
|
||||
return new AbstractSvxMessDialog_Impl( pDlg );
|
||||
}
|
||||
|
||||
AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxMultiPathDialog( Window* pParent, bool bEmptyAllowed )
|
||||
AbstractSvxMultiPathDialog * AbstractDialogFactory_Impl::CreateSvxMultiPathDialog(Window* pParent)
|
||||
{
|
||||
SvxMultiPathDialog* pDlg = new SvxMultiPathDialog( pParent, bEmptyAllowed );
|
||||
SvxMultiPathDialog* pDlg = new SvxMultiPathDialog(pParent);
|
||||
return new AbstractSvxMultiPathDialog_Impl( pDlg );
|
||||
}
|
||||
|
||||
AbstractSvxMultiFileDialog * AbstractDialogFactory_Impl::CreateSvxMultiFileDialog( Window* pParent, bool bEmptyAllowed )
|
||||
{
|
||||
SvxMultiFileDialog* pDlg = new SvxMultiFileDialog( pParent, bEmptyAllowed );
|
||||
return new AbstractSvxMultiFileDialog_Impl( pDlg );
|
||||
}
|
||||
|
||||
AbstractSvxHpLinkDlg * AbstractDialogFactory_Impl::CreateSvxHpLinkDlg (Window* pParent,
|
||||
SfxBindings* pBindings,
|
||||
sal_uInt32 nResId)
|
||||
|
@ -42,7 +42,6 @@ class SvxObjectTitleDescDialog;
|
||||
|
||||
class SvxMessDialog;
|
||||
class SvxMultiPathDialog;
|
||||
class SvxMultiFileDialog;
|
||||
class SvxHpLinkDlg;
|
||||
class FmSearchDialog;
|
||||
class Graphic;
|
||||
@ -402,23 +401,6 @@ class AbstractSvxMultiPathDialog_Impl :public AbstractSvxMultiPathDialog
|
||||
virtual void SetTitle( const OUString& rNewTitle );
|
||||
};
|
||||
|
||||
class SvxMultiFileDialog;
|
||||
class AbstractSvxMultiFileDialog_Impl :public AbstractSvxMultiFileDialog
|
||||
{
|
||||
DECL_ABSTDLG_BASE(AbstractSvxMultiFileDialog_Impl,SvxMultiFileDialog)
|
||||
virtual OUString GetFiles() const ;
|
||||
virtual void SetFiles( const OUString& rPath ) ;
|
||||
//from SvxMultiPathDialog
|
||||
virtual OUString GetPath() const;
|
||||
virtual void SetPath( const OUString& rPath );
|
||||
virtual void SetClassPathMode();
|
||||
virtual void EnableRadioButtonMode();
|
||||
virtual void SetTitle( const OUString& rNewTitle );
|
||||
//From Class Window
|
||||
virtual void SetHelpId( const OString& ) ;
|
||||
|
||||
};
|
||||
|
||||
class SvxHpLinkDlg;
|
||||
class AbstractSvxHpLinkDlg_Impl :public AbstractSvxHpLinkDlg
|
||||
{
|
||||
@ -643,8 +625,7 @@ public:
|
||||
virtual AbstractSvxMessDialog * CreateSvxMessDialog( Window* pParent, sal_uInt32 nResId,
|
||||
const OUString& rText, const OUString& rDesc,
|
||||
Image* pImg = NULL );
|
||||
virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog( Window* pParent, bool bEmptyAllowed = false );
|
||||
virtual AbstractSvxMultiFileDialog * CreateSvxMultiFileDialog( Window* pParent, bool bEmptyAllowed = false );
|
||||
virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog(Window* pParent);
|
||||
virtual AbstractSvxHpLinkDlg * CreateSvxHpLinkDlg (Window* pParent,
|
||||
SfxBindings* pBindings,
|
||||
sal_uInt32 nResId);
|
||||
|
@ -218,16 +218,12 @@
|
||||
// icon choice
|
||||
#define RID_SVXSTR_ICONCHOICEDLG_RESETBUT (RID_SVX_START + 580)
|
||||
|
||||
// SvxMultiFileDialog
|
||||
#define RID_SVXSTR_FILE_TITLE (RID_SVX_START + 482)
|
||||
#define RID_SVXSTR_FILE_HEADLINE (RID_SVX_START + 483)
|
||||
#define RID_SVXSTR_ARCHIVE_TITLE (RID_SVX_START + 484)
|
||||
#define RID_SVXSTR_ARCHIVE_HEADLINE (RID_SVX_START + 485)
|
||||
#define RID_SVXSTR_MULTIFILE_DBL_ERR (RID_SVX_START + 486)
|
||||
|
||||
// multi path dialog
|
||||
#define RID_SVXDLG_MULTIPATH (RID_SVX_START + 201)
|
||||
#define RID_MULTIPATH_DBL_ERR (RID_SVX_START + 207)
|
||||
#define RID_SVXSTR_ARCHIVE_TITLE (RID_SVX_START + 484)
|
||||
#define RID_SVXSTR_ARCHIVE_HEADLINE (RID_SVX_START + 485)
|
||||
#define RID_SVXSTR_MULTIFILE_DBL_ERR (RID_SVX_START + 486)
|
||||
|
||||
// script organizer
|
||||
#define RID_SVXSTR_DELQUERY (RID_SVX_START + 1027)
|
||||
|
@ -1,50 +0,0 @@
|
||||
/* -*- 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_CUI_SOURCE_INC_MULTIFIL_HXX
|
||||
#define INCLUDED_CUI_SOURCE_INC_MULTIFIL_HXX
|
||||
|
||||
#include "multipat.hxx"
|
||||
|
||||
// #97807# ----------------------------------------------------
|
||||
#include <ucbhelper/content.hxx>
|
||||
#include <map>
|
||||
|
||||
// class SvxMultiFileDialog ----------------------------------------------
|
||||
|
||||
class SvxMultiFileDialog : public SvxMultiPathDialog
|
||||
{
|
||||
private:
|
||||
// #97807# -------------------------------------
|
||||
std::map< OUString, ::ucbhelper::Content > aFileContentMap;
|
||||
|
||||
DECL_LINK( AddHdl_Impl, PushButton * );
|
||||
DECL_LINK(DelHdl_Impl, void *);
|
||||
|
||||
public:
|
||||
SvxMultiFileDialog( Window* pParent, sal_Bool bEmptyAllowed = sal_False );
|
||||
~SvxMultiFileDialog();
|
||||
|
||||
OUString GetFiles() const { return SvxMultiPathDialog::GetPath(); }
|
||||
void SetFiles( const OUString& rPath ) { SvxMultiPathDialog::SetPath(rPath); aDelBtn.Enable(); }
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -36,10 +36,6 @@
|
||||
#define CLASSPATH_DELIMITER ';'
|
||||
#endif
|
||||
|
||||
// forward ---------------------------------------------------------------
|
||||
|
||||
struct MultiPath_Impl;
|
||||
|
||||
// class SvxMultiPathDialog ----------------------------------------------
|
||||
|
||||
class SvxMultiPathDialog : public ModalDialog
|
||||
@ -56,7 +52,7 @@ protected:
|
||||
CancelButton aCancelBtn;
|
||||
HelpButton aHelpButton;
|
||||
|
||||
MultiPath_Impl* pImpl;
|
||||
bool bIsRadioButtonMode;
|
||||
|
||||
DECL_LINK(AddHdl_Impl, void *);
|
||||
DECL_LINK(DelHdl_Impl, void *);
|
||||
@ -64,13 +60,11 @@ protected:
|
||||
DECL_LINK( CheckHdl_Impl, svx::SvxRadioButtonListBox * );
|
||||
|
||||
public:
|
||||
SvxMultiPathDialog( Window* pParent, sal_Bool bEmptyAllowed = sal_False );
|
||||
SvxMultiPathDialog(Window* pParent);
|
||||
~SvxMultiPathDialog();
|
||||
|
||||
OUString GetPath() const;
|
||||
void SetPath( const OUString& rPath );
|
||||
void SetClassPathMode();
|
||||
sal_Bool IsClassPathMode() const;
|
||||
void EnableRadioButtonMode();
|
||||
};
|
||||
|
||||
|
@ -402,8 +402,7 @@ public:
|
||||
const OUString& rText, const OUString& rDesc,
|
||||
Image* pImg = NULL ) = 0;
|
||||
|
||||
virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog( Window* pParent, bool bEmptyAllowed = false ) = 0 ;
|
||||
virtual AbstractSvxMultiFileDialog * CreateSvxMultiFileDialog( Window* pParent, bool bEmptyAllowed = false ) = 0 ;
|
||||
virtual AbstractSvxMultiPathDialog * CreateSvxMultiPathDialog(Window* pParent) = 0 ;
|
||||
virtual AbstractSvxHpLinkDlg * CreateSvxHpLinkDlg (Window* pParent,
|
||||
SfxBindings* pBindings,
|
||||
sal_uInt32 nResId)=0;
|
||||
|
@ -124,7 +124,6 @@
|
||||
|
||||
#define HID_FILEDLG_LOADTEMPLATE "SW_HID_FILEDLG_LOADTEMPLATE"
|
||||
#define HID_FILEDLG_MAILMRGE1 "SW_HID_FILEDLG_MAILMRGE1"
|
||||
#define HID_FILEDLG_MAILMRGE2 "SW_HID_FILEDLG_MAILMRGE2"
|
||||
#define HID_FILEDLG_FRMPAGE "SW_HID_FILEDLG_FRMPAGE"
|
||||
#define HID_FILEDLG_SRCVIEW "SW_HID_FILEDLG_SRCVIEW"
|
||||
#define HID_FILEDLG_WIZDOKU "SW_HID_FILEDLG_WIZDOKU"
|
||||
|
@ -117,7 +117,6 @@ class SwMailMergeDlg : public SvxStandardDialog
|
||||
|
||||
DECL_LINK( ButtonHdl, Button* pBtn );
|
||||
DECL_LINK(InsertPathHdl, void *);
|
||||
DECL_LINK(AttachFileHdl, void *);
|
||||
DECL_LINK( OutputTypeHdl, RadioButton* pBtn );
|
||||
DECL_LINK( FilenameHdl, CheckBox* pBtn );
|
||||
DECL_LINK(ModifyHdl, void *);
|
||||
|
@ -325,11 +325,9 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
|
||||
aOkBTN.SetClickHdl(aLk);
|
||||
|
||||
aPathPB.SetClickHdl(LINK(this, SwMailMergeDlg, InsertPathHdl));
|
||||
aAttachPB.SetClickHdl(LINK(this, SwMailMergeDlg, AttachFileHdl));
|
||||
|
||||
aLk = LINK(this, SwMailMergeDlg, OutputTypeHdl);
|
||||
aPrinterRB.SetClickHdl(aLk);
|
||||
aMailingRB.SetClickHdl(aLk);
|
||||
aFileRB.SetClickHdl(aLk);
|
||||
|
||||
//#i63267# printing might be disabled
|
||||
@ -655,13 +653,6 @@ bool SwMailMergeDlg::ExecQryShell()
|
||||
|
||||
if (aPrinterRB.IsChecked())
|
||||
nMergeType = DBMGR_MERGE_MAILMERGE;
|
||||
else if (aMailingRB.IsChecked())
|
||||
{
|
||||
nMergeType = DBMGR_MERGE_MAILING;
|
||||
pMgr->SetEMailColumn(aAddressFldLB.GetSelectEntry());
|
||||
pMgr->SetSubject(aSubjectED.GetText());
|
||||
pMgr->SetAttachment(aAttachED.GetText());
|
||||
}
|
||||
else
|
||||
{
|
||||
nMergeType = static_cast< sal_uInt16 >( aSaveSingleDocRB.IsChecked() ?
|
||||
@ -781,24 +772,6 @@ IMPL_LINK_NOARG(SwMailMergeDlg, InsertPathHdl)
|
||||
return 0;
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG(SwMailMergeDlg, AttachFileHdl)
|
||||
{
|
||||
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
|
||||
if(pFact)
|
||||
{
|
||||
AbstractSvxMultiFileDialog* pFileDlg = pFact->CreateSvxMultiFileDialog( this );
|
||||
OSL_ENSURE(pFileDlg, "Dialogdiet fail!");
|
||||
pFileDlg->SetFiles(aAttachED.GetText());
|
||||
pFileDlg->SetHelpId(HID_FILEDLG_MAILMRGE2);
|
||||
|
||||
if (pFileDlg->Execute())
|
||||
aAttachED.SetText(pFileDlg->GetFiles());
|
||||
|
||||
delete pFileDlg;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uno::Reference<XResultSet> SwMailMergeDlg::GetResultSet() const
|
||||
{
|
||||
uno::Reference< XResultSet > xResSetClone;
|
||||
|
Loading…
x
Reference in New Issue
Block a user