get rid of interim OUStrings
This commit is contained in:
@@ -31,15 +31,7 @@
|
|||||||
#ifndef __FRAMEWORK_PROTOCOLS_H_
|
#ifndef __FRAMEWORK_PROTOCOLS_H_
|
||||||
#define __FRAMEWORK_PROTOCOLS_H_
|
#define __FRAMEWORK_PROTOCOLS_H_
|
||||||
|
|
||||||
//_________________________________________________________________________________________________________________
|
#include <rtl/ustring.hxx>
|
||||||
// includes
|
|
||||||
//_________________________________________________________________________________________________________________
|
|
||||||
|
|
||||||
#include <macros/generic.hxx>
|
|
||||||
|
|
||||||
//_________________________________________________________________________________________________________________
|
|
||||||
// namespace
|
|
||||||
//_________________________________________________________________________________________________________________
|
|
||||||
|
|
||||||
namespace framework{
|
namespace framework{
|
||||||
|
|
||||||
@@ -50,16 +42,26 @@ namespace framework{
|
|||||||
a real visible component.
|
a real visible component.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SPECIALPROTOCOL_PRIVATE DECLARE_ASCII("private:" ) // indicates a loadable content in general!
|
// 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 "private:"
|
||||||
#define SPECIALPROTOCOL_PRIVATE_STREAM DECLARE_ASCII("private:stream" ) // indicates loading of components using a stream only
|
// indicates loading of components using a model directly
|
||||||
#define SPECIALPROTOCOL_PRIVATE_FACTORY DECLARE_ASCII("private:factory") // indicates creation of empty documents
|
#define SPECIALPROTOCOL_PRIVATE_OBJECT "private:object"
|
||||||
#define SPECIALPROTOCOL_SLOT DECLARE_ASCII("slot:" ) // internal protocol of the sfx project for generic dispatch funtionality
|
// indicates loading of components using a stream only
|
||||||
#define SPECIALPROTOCOL_UNO DECLARE_ASCII(".uno:" ) // external representation of the slot protocol using names instead of id's
|
#define SPECIALPROTOCOL_PRIVATE_STREAM "private:stream"
|
||||||
#define SPECIALPROTOCOL_MACRO DECLARE_ASCII("macro:" ) // special sfx protocol to execute macros
|
// indicates creation of empty documents
|
||||||
#define SPECIALPROTOCOL_SERVICE DECLARE_ASCII("service:" ) // generic way to start uno services during dispatch
|
#define SPECIALPROTOCOL_PRIVATE_FACTORY "private:factory"
|
||||||
#define SPECIALPROTOCOL_MAILTO DECLARE_ASCII("mailto:" ) // for sending mails
|
// internal protocol of the sfx project for generic dispatch funtionality
|
||||||
#define SPECIALPROTOCOL_NEWS DECLARE_ASCII("news:" ) // for sending news
|
#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
|
class ProtocolCheck
|
||||||
{
|
{
|
||||||
@@ -94,34 +96,34 @@ class ProtocolCheck
|
|||||||
{
|
{
|
||||||
// because "private:" is part of e.g. "private:object" too ...
|
// because "private:" is part of e.g. "private:object" too ...
|
||||||
// we must check it before all other ones!!!
|
// 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;
|
return E_PRIVATE;
|
||||||
else
|
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;
|
return E_PRIVATE_OBJECT;
|
||||||
else
|
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;
|
return E_PRIVATE_STREAM;
|
||||||
else
|
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;
|
return E_PRIVATE_FACTORY;
|
||||||
else
|
else
|
||||||
if (sURL.compareTo(SPECIALPROTOCOL_SLOT,SPECIALPROTOCOL_SLOT.getLength()) == 0)
|
if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_SLOT)))
|
||||||
return E_SLOT;
|
return E_SLOT;
|
||||||
else
|
else
|
||||||
if (sURL.compareTo(SPECIALPROTOCOL_UNO,SPECIALPROTOCOL_UNO.getLength()) == 0)
|
if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_UNO)))
|
||||||
return E_UNO;
|
return E_UNO;
|
||||||
else
|
else
|
||||||
if (sURL.compareTo(SPECIALPROTOCOL_MACRO,SPECIALPROTOCOL_MACRO.getLength()) == 0)
|
if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_MACRO)))
|
||||||
return E_MACRO;
|
return E_MACRO;
|
||||||
else
|
else
|
||||||
if (sURL.compareTo(SPECIALPROTOCOL_SERVICE,SPECIALPROTOCOL_SERVICE.getLength()) == 0)
|
if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_SERVICE)))
|
||||||
return E_SERVICE;
|
return E_SERVICE;
|
||||||
else
|
else
|
||||||
if (sURL.compareTo(SPECIALPROTOCOL_MAILTO,SPECIALPROTOCOL_MAILTO.getLength()) == 0)
|
if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_MAILTO)))
|
||||||
return E_MAILTO;
|
return E_MAILTO;
|
||||||
else
|
else
|
||||||
if (sURL.compareTo(SPECIALPROTOCOL_NEWS,SPECIALPROTOCOL_NEWS.getLength()) == 0)
|
if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_NEWS)))
|
||||||
return E_NEWS;
|
return E_NEWS;
|
||||||
else
|
else
|
||||||
return E_UNKNOWN_PROTOCOL;
|
return E_UNKNOWN_PROTOCOL;
|
||||||
@@ -139,34 +141,34 @@ class ProtocolCheck
|
|||||||
switch(eRequired)
|
switch(eRequired)
|
||||||
{
|
{
|
||||||
case E_PRIVATE:
|
case E_PRIVATE:
|
||||||
bRet = (sURL.equalsAsciiL(SPECIALPROTOCOL_PRIVATE ,SPECIALPROTOCOL_PRIVATE.getLength() ) == 0);
|
bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_PRIVATE));
|
||||||
break;
|
break;
|
||||||
case E_PRIVATE_OBJECT:
|
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;
|
break;
|
||||||
case E_PRIVATE_STREAM:
|
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;
|
break;
|
||||||
case E_PRIVATE_FACTORY:
|
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;
|
break;
|
||||||
case E_SLOT:
|
case E_SLOT:
|
||||||
bRet = (sURL.compareTo(SPECIALPROTOCOL_SLOT ,SPECIALPROTOCOL_SLOT.getLength() ) == 0);
|
bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_SLOT));
|
||||||
break;
|
break;
|
||||||
case E_UNO:
|
case E_UNO:
|
||||||
bRet = (sURL.compareTo(SPECIALPROTOCOL_UNO ,SPECIALPROTOCOL_UNO.getLength() ) == 0);
|
bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_UNO));
|
||||||
break;
|
break;
|
||||||
case E_MACRO:
|
case E_MACRO:
|
||||||
bRet = (sURL.compareTo(SPECIALPROTOCOL_MACRO ,SPECIALPROTOCOL_MACRO.getLength() ) == 0);
|
bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_MACRO));
|
||||||
break;
|
break;
|
||||||
case E_SERVICE:
|
case E_SERVICE:
|
||||||
bRet = (sURL.compareTo(SPECIALPROTOCOL_SERVICE ,SPECIALPROTOCOL_SERVICE.getLength() ) == 0);
|
bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_SERVICE));
|
||||||
break;
|
break;
|
||||||
case E_MAILTO:
|
case E_MAILTO:
|
||||||
bRet = (sURL.compareTo(SPECIALPROTOCOL_MAILTO ,SPECIALPROTOCOL_MAILTO.getLength() ) == 0);
|
bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_MAILTO));
|
||||||
break;
|
break;
|
||||||
case E_NEWS:
|
case E_NEWS:
|
||||||
bRet = (sURL.compareTo(SPECIALPROTOCOL_NEWS ,SPECIALPROTOCOL_NEWS.getLength() ) == 0);
|
bRet = sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM(SPECIALPROTOCOL_NEWS));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
bRet = sal_False;
|
bRet = sal_False;
|
||||||
|
Reference in New Issue
Block a user