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
04d567d4
Kaydet (Commit)
04d567d4
authored
Agu 22, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
get rid of interim OUStrings
üst
86340f0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
39 deletions
+41
-39
protocols.h
framework/inc/protocols.h
+41
-39
No files found.
framework/inc/protocols.h
Dosyayı görüntüle @
04d567d4
...
...
@@ -31,15 +31,7 @@
#ifndef __FRAMEWORK_PROTOCOLS_H_
#define __FRAMEWORK_PROTOCOLS_H_
//_________________________________________________________________________________________________________________
// includes
//_________________________________________________________________________________________________________________
#include <macros/generic.hxx>
//_________________________________________________________________________________________________________________
// namespace
//_________________________________________________________________________________________________________________
#include <rtl/ustring.hxx>
namespace
framework
{
...
...
@@ -50,16 +42,26 @@ namespace framework{
a real visible component.
*/
#define SPECIALPROTOCOL_PRIVATE DECLARE_ASCII("private:" ) // indicates a loadable content in general!
#define SPECIALPROTOCOL_PRIVATE_OBJECT DECLARE_ASCII("private:object" ) // indicates loading of components using a model directly
#define SPECIALPROTOCOL_PRIVATE_STREAM DECLARE_ASCII("private:stream" ) // indicates loading of components using a stream only
#define SPECIALPROTOCOL_PRIVATE_FACTORY DECLARE_ASCII("private:factory") // indicates creation of empty documents
#define SPECIALPROTOCOL_SLOT DECLARE_ASCII("slot:" ) // internal protocol of the sfx project for generic dispatch funtionality
#define SPECIALPROTOCOL_UNO DECLARE_ASCII(".uno:" ) // external representation of the slot protocol using names instead of id's
#define SPECIALPROTOCOL_MACRO DECLARE_ASCII("macro:" ) // special sfx protocol to execute macros
#define SPECIALPROTOCOL_SERVICE DECLARE_ASCII("service:" ) // generic way to start uno services during dispatch
#define SPECIALPROTOCOL_MAILTO DECLARE_ASCII("mailto:" ) // for sending mails
#define SPECIALPROTOCOL_NEWS DECLARE_ASCII("news:" ) // for sending news
// indicates a loadable content in general!
#define SPECIALPROTOCOL_PRIVATE "private:"
// indicates loading of components using a model directly
#define SPECIALPROTOCOL_PRIVATE_OBJECT "private:object"
// indicates loading of components using a stream only
#define SPECIALPROTOCOL_PRIVATE_STREAM "private:stream"
// indicates creation of empty documents
#define SPECIALPROTOCOL_PRIVATE_FACTORY "private:factory"
// internal protocol of the sfx project for generic dispatch funtionality
#define SPECIALPROTOCOL_SLOT "slot:"
// external representation of the slot protocol using names instead of id's
#define SPECIALPROTOCOL_UNO ".uno:"
// special sfx protocol to execute macros
#define SPECIALPROTOCOL_MACRO "macro:"
// generic way to start uno services during dispatch
#define SPECIALPROTOCOL_SERVICE "service:"
// for sending mails
#define SPECIALPROTOCOL_MAILTO "mailto:"
// for sending news
#define SPECIALPROTOCOL_NEWS "news:"
class
ProtocolCheck
{
...
...
@@ -94,34 +96,34 @@ class ProtocolCheck
{
// because "private:" is part of e.g. "private:object" too ...
// we must check it before all other ones!!!
if
(
sURL
.
compareTo
(
SPECIALPROTOCOL_PRIVATE
,
SPECIALPROTOCOL_PRIVATE
.
getLength
())
==
0
)
if
(
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE
))
)
return
E_PRIVATE
;
else
if
(
sURL
.
compareTo
(
SPECIALPROTOCOL_PRIVATE_OBJECT
,
SPECIALPROTOCOL_PRIVATE_OBJECT
.
getLength
())
==
0
)
if
(
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE_OBJECT
))
)
return
E_PRIVATE_OBJECT
;
else
if
(
sURL
.
compareTo
(
SPECIALPROTOCOL_PRIVATE_STREAM
,
SPECIALPROTOCOL_PRIVATE_STREAM
.
getLength
())
==
0
)
if
(
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE_STREAM
))
)
return
E_PRIVATE_STREAM
;
else
if
(
sURL
.
compareTo
(
SPECIALPROTOCOL_PRIVATE_FACTORY
,
SPECIALPROTOCOL_PRIVATE_FACTORY
.
getLength
())
==
0
)
if
(
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE_FACTORY
))
)
return
E_PRIVATE_FACTORY
;
else
if
(
sURL
.
compareTo
(
SPECIALPROTOCOL_SLOT
,
SPECIALPROTOCOL_SLOT
.
getLength
())
==
0
)
if
(
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_SLOT
))
)
return
E_SLOT
;
else
if
(
sURL
.
compareTo
(
SPECIALPROTOCOL_UNO
,
SPECIALPROTOCOL_UNO
.
getLength
())
==
0
)
if
(
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_UNO
))
)
return
E_UNO
;
else
if
(
sURL
.
compareTo
(
SPECIALPROTOCOL_MACRO
,
SPECIALPROTOCOL_MACRO
.
getLength
())
==
0
)
if
(
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_MACRO
))
)
return
E_MACRO
;
else
if
(
sURL
.
compareTo
(
SPECIALPROTOCOL_SERVICE
,
SPECIALPROTOCOL_SERVICE
.
getLength
())
==
0
)
if
(
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_SERVICE
))
)
return
E_SERVICE
;
else
if
(
sURL
.
compareTo
(
SPECIALPROTOCOL_MAILTO
,
SPECIALPROTOCOL_MAILTO
.
getLength
())
==
0
)
if
(
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_MAILTO
))
)
return
E_MAILTO
;
else
if
(
sURL
.
compareTo
(
SPECIALPROTOCOL_NEWS
,
SPECIALPROTOCOL_NEWS
.
getLength
())
==
0
)
if
(
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_NEWS
))
)
return
E_NEWS
;
else
return
E_UNKNOWN_PROTOCOL
;
...
...
@@ -139,34 +141,34 @@ class ProtocolCheck
switch
(
eRequired
)
{
case
E_PRIVATE
:
bRet
=
(
sURL
.
equalsAsciiL
(
SPECIALPROTOCOL_PRIVATE
,
SPECIALPROTOCOL_PRIVATE
.
getLength
()
)
==
0
);
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE
)
);
break
;
case
E_PRIVATE_OBJECT
:
bRet
=
(
sURL
.
compareTo
(
SPECIALPROTOCOL_PRIVATE_OBJECT
,
SPECIALPROTOCOL_PRIVATE_OBJECT
.
getLength
()
)
==
0
);
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE_OBJECT
)
);
break
;
case
E_PRIVATE_STREAM
:
bRet
=
(
sURL
.
compareTo
(
SPECIALPROTOCOL_PRIVATE_STREAM
,
SPECIALPROTOCOL_PRIVATE_STREAM
.
getLength
()
)
==
0
);
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE_STREAM
)
);
break
;
case
E_PRIVATE_FACTORY
:
bRet
=
(
sURL
.
compareTo
(
SPECIALPROTOCOL_PRIVATE_FACTORY
,
SPECIALPROTOCOL_PRIVATE_FACTORY
.
getLength
())
==
0
);
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_PRIVATE_FACTORY
)
);
break
;
case
E_SLOT
:
bRet
=
(
sURL
.
compareTo
(
SPECIALPROTOCOL_SLOT
,
SPECIALPROTOCOL_SLOT
.
getLength
()
)
==
0
);
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_SLOT
)
);
break
;
case
E_UNO
:
bRet
=
(
sURL
.
compareTo
(
SPECIALPROTOCOL_UNO
,
SPECIALPROTOCOL_UNO
.
getLength
()
)
==
0
);
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_UNO
)
);
break
;
case
E_MACRO
:
bRet
=
(
sURL
.
compareTo
(
SPECIALPROTOCOL_MACRO
,
SPECIALPROTOCOL_MACRO
.
getLength
()
)
==
0
);
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_MACRO
)
);
break
;
case
E_SERVICE
:
bRet
=
(
sURL
.
compareTo
(
SPECIALPROTOCOL_SERVICE
,
SPECIALPROTOCOL_SERVICE
.
getLength
()
)
==
0
);
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_SERVICE
)
);
break
;
case
E_MAILTO
:
bRet
=
(
sURL
.
compareTo
(
SPECIALPROTOCOL_MAILTO
,
SPECIALPROTOCOL_MAILTO
.
getLength
()
)
==
0
);
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_MAILTO
)
);
break
;
case
E_NEWS
:
bRet
=
(
sURL
.
compareTo
(
SPECIALPROTOCOL_NEWS
,
SPECIALPROTOCOL_NEWS
.
getLength
()
)
==
0
);
bRet
=
sURL
.
matchAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
SPECIALPROTOCOL_NEWS
)
);
break
;
default:
bRet
=
sal_False
;
...
...
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