Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
878f279f
Kaydet (Commit)
878f279f
authored
Agu 23, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert include/sfx2/mailmodelapi.hxx from String to OUString
Change-Id: Ib6ea30bf17a30f7df9be8ce5643b34eed360a06e
üst
92cda0a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
39 deletions
+23
-39
mailmodelapi.hxx
include/sfx2/mailmodelapi.hxx
+7
-9
mailmodel.cxx
sfx2/source/dialog/mailmodel.cxx
+16
-30
No files found.
include/sfx2/mailmodelapi.hxx
Dosyayı görüntüle @
878f279f
...
...
@@ -27,8 +27,7 @@
#include "sfx2/dllapi.h"
// class AddressList_Impl ------------------------------------------------
typedef
String
*
AddressItemPtr_Impl
;
typedef
::
std
::
vector
<
AddressItemPtr_Impl
>
AddressList_Impl
;
typedef
::
std
::
vector
<
OUString
>
AddressList_Impl
;
// class SfxMailModel_Impl -----------------------------------------------
...
...
@@ -74,13 +73,12 @@ private:
AddressList_Impl
*
mpToList
;
AddressList_Impl
*
mpCcList
;
AddressList_Impl
*
mpBccList
;
String
maFromAddress
;
String
maSubject
;
OUString
maFromAddress
;
OUString
maSubject
;
MailPriority
mePriority
;
sal_Bool
mbLoadDone
;
void
ClearList
(
AddressList_Impl
*
pList
);
SaveResult
ShowFilterOptionsDialog
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xSMGR
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
frame
::
XModel
>
xModel
,
const
OUString
&
rFilterName
,
...
...
@@ -102,9 +100,9 @@ public:
SfxMailModel
();
~
SfxMailModel
();
void
AddAddress
(
const
String
&
rAddress
,
AddressRole
eRole
);
void
SetFromAddress
(
const
String
&
rAddress
)
{
maFromAddress
=
rAddress
;
}
void
SetSubject
(
const
String
&
rSubject
)
{
maSubject
=
rSubject
;
}
void
AddAddress
(
const
OU
String
&
rAddress
,
AddressRole
eRole
);
void
SetFromAddress
(
const
OU
String
&
rAddress
)
{
maFromAddress
=
rAddress
;
}
void
SetSubject
(
const
OU
String
&
rSubject
)
{
maSubject
=
rSubject
;
}
void
SetPriority
(
MailPriority
ePrio
)
{
mePriority
=
ePrio
;
}
/** attaches a document to the current attachment list, can be called more than once.
...
...
@@ -129,7 +127,7 @@ public:
sal_Bool
IsEmpty
()
const
;
};
sal_Bool
CreateFromAddress_Impl
(
String
&
rFrom
);
sal_Bool
CreateFromAddress_Impl
(
OU
String
&
rFrom
);
#endif // INCLUDED_SFX_MAILMODEL_HXX
...
...
sfx2/source/dialog/mailmodel.cxx
Dosyayı görüntüle @
878f279f
...
...
@@ -131,16 +131,6 @@ void PrepareListener_Impl::disposing(const css::lang::EventObject& /*rEvent*/) t
static
const
char
PDF_DOCUMENT_TYPE
[]
=
"pdf_Portable_Document_Format"
;
void
SfxMailModel
::
ClearList
(
AddressList_Impl
*
pList
)
{
if
(
pList
)
{
for
(
size_t
i
=
0
,
n
=
pList
->
size
();
i
<
n
;
++
i
)
delete
pList
->
at
(
i
);
pList
->
clear
();
}
}
sal_Bool
HasDocumentValidSignature
(
const
css
::
uno
::
Reference
<
css
::
frame
::
XModel
>&
xModel
)
{
try
...
...
@@ -701,18 +691,15 @@ SfxMailModel::SfxMailModel() :
SfxMailModel
::~
SfxMailModel
()
{
ClearList
(
mpToList
);
delete
mpToList
;
ClearList
(
mpCcList
);
delete
mpCcList
;
ClearList
(
mpBccList
);
delete
mpBccList
;
}
void
SfxMailModel
::
AddAddress
(
const
String
&
rAddress
,
AddressRole
eRole
)
void
SfxMailModel
::
AddAddress
(
const
OU
String
&
rAddress
,
AddressRole
eRole
)
{
// don't add a empty address
if
(
rAddress
.
Len
()
>
0
)
if
(
!
rAddress
.
isEmpty
()
)
{
AddressList_Impl
*
pList
=
NULL
;
if
(
ROLE_TO
==
eRole
)
...
...
@@ -744,8 +731,7 @@ void SfxMailModel::AddAddress( const String& rAddress, AddressRole eRole )
if
(
pList
)
{
// add address to list
AddressItemPtr_Impl
pAddress
=
new
String
(
rAddress
);
pList
->
push_back
(
pAddress
);
pList
->
push_back
(
rAddress
);
}
}
}
...
...
@@ -804,7 +790,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
if
(
xSimpleMailMessage
.
is
()
)
{
sal_Int32
nSendFlags
=
SimpleMailClientFlags
::
DEFAULTS
;
if
(
maFromAddress
.
Len
()
==
0
)
if
(
maFromAddress
.
isEmpty
()
)
{
// from address not set, try figure out users e-mail address
CreateFromAddress_Impl
(
maFromAddress
);
...
...
@@ -819,12 +805,12 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
if
(
nToCount
>
1
)
{
nCcSeqCount
=
nToCount
-
1
+
nCcCount
;
xSimpleMailMessage
->
setRecipient
(
*
mpToList
->
at
(
0
)
);
xSimpleMailMessage
->
setRecipient
(
mpToList
->
at
(
0
)
);
nSendFlags
=
SimpleMailClientFlags
::
NO_USER_INTERFACE
;
}
else
if
(
nToCount
==
1
)
{
xSimpleMailMessage
->
setRecipient
(
*
mpToList
->
at
(
0
)
);
xSimpleMailMessage
->
setRecipient
(
mpToList
->
at
(
0
)
);
nSendFlags
=
SimpleMailClientFlags
::
NO_USER_INTERFACE
;
}
...
...
@@ -839,13 +825,13 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
{
for
(
size_t
i
=
1
;
i
<
nToCount
;
++
i
)
{
aCcRecipientSeq
[
nIndex
++
]
=
*
mpToList
->
at
(
i
);
aCcRecipientSeq
[
nIndex
++
]
=
mpToList
->
at
(
i
);
}
}
for
(
size_t
i
=
0
;
i
<
nCcCount
;
i
++
)
{
aCcRecipientSeq
[
nIndex
++
]
=
*
mpCcList
->
at
(
i
);
aCcRecipientSeq
[
nIndex
++
]
=
mpCcList
->
at
(
i
);
}
xSimpleMailMessage
->
setCcRecipient
(
aCcRecipientSeq
);
}
...
...
@@ -856,7 +842,7 @@ SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< css:
Sequence
<
OUString
>
aBccRecipientSeq
(
nBccCount
);
for
(
size_t
i
=
0
;
i
<
nBccCount
;
++
i
)
{
aBccRecipientSeq
[
i
]
=
*
mpBccList
->
at
(
i
);
aBccRecipientSeq
[
i
]
=
mpBccList
->
at
(
i
);
}
xSimpleMailMessage
->
setBccRecipient
(
aBccRecipientSeq
);
}
...
...
@@ -928,7 +914,7 @@ SfxMailModel::SendMailResult SfxMailModel::SaveAndSend( const css::uno::Referenc
// functions -------------------------------------------------------------
sal_Bool
CreateFromAddress_Impl
(
String
&
rFrom
)
sal_Bool
CreateFromAddress_Impl
(
OU
String
&
rFrom
)
/* [Description]
...
...
@@ -953,7 +939,7 @@ sal_Bool CreateFromAddress_Impl( String& rFrom )
rFrom
=
comphelper
::
string
::
strip
(
aFirstName
,
' '
);
if
(
aName
.
Len
()
)
rFrom
+=
' '
;
rFrom
+=
" "
;
}
rFrom
+=
comphelper
::
string
::
strip
(
aName
,
' '
);
// remove illegal characters
...
...
@@ -969,13 +955,13 @@ sal_Bool CreateFromAddress_Impl( String& rFrom )
if
(
aEmailName
.
Len
()
)
{
if
(
rFrom
.
Len
()
)
rFrom
+=
' '
;
(
(
rFrom
+=
'<'
)
+=
comphelper
::
string
::
strip
(
aEmailName
,
' '
)
)
+=
'>'
;
if
(
!
rFrom
.
isEmpty
()
)
rFrom
+=
" "
;
rFrom
=
rFrom
+
"<"
+
comphelper
::
string
::
strip
(
aEmailName
,
' '
)
+
">"
;
}
else
rFrom
.
Erase
()
;
return
(
rFrom
.
Len
()
>
0
);
rFrom
=
""
;
return
!
rFrom
.
isEmpty
(
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment