summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2011-11-03 16:50:24 +0100
committerStephan Bergmann <sbergman@redhat.com>2011-11-04 08:21:25 +0100
commite04249337551653f63ba9b2a2302578961e38562 (patch)
treec8780254acf0b87c16f47725657a0b8c38871bfe /vcl/inc
parentfb17dce09e29c4518129587d347cc3787f74c396 (diff)
String->OUString, remove unused code
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/vcl/svapp.hxx114
1 files changed, 23 insertions, 91 deletions
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index 1cc0a404b19c..fb32a8ba245c 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -97,105 +97,37 @@ typedef long (*VCLEventHookProc)( NotifyEvent& rEvt, void* pData );
enum Service { SERVICE_OLE, SERVICE_APPEVENT, SERVICE_IPC };
#endif
-class VCL_DLLPUBLIC ApplicationAddress
-{
-friend class Application;
-protected:
- UniString aHostName;
- UniString aDisplayName;
- UniString aDomainName;
- int nPID;
-
-public:
- ApplicationAddress();
- ApplicationAddress( const UniString& rDomain );
- ApplicationAddress( const UniString& rHost,
- const UniString& rDisp,
- const UniString& rDomain );
- ApplicationAddress( const UniString& rHost, int nPID );
-
- const UniString& GetHost() const { return aHostName; }
- const UniString& GetDisplay() const { return aDisplayName; }
- const UniString& GetDomain() const { return aDomainName; }
- int GetPID() const { return nPID; }
-
- sal_Bool IsConnectToSame( const ApplicationAddress& rAdr ) const;
-};
-
-inline ApplicationAddress::ApplicationAddress()
-{
- nPID = 0;
-}
-
-inline ApplicationAddress::ApplicationAddress( const UniString& rDomain )
-{
- aDomainName = rDomain;
- nPID = 0;
-}
-
-inline ApplicationAddress::ApplicationAddress( const UniString& rHost,
- const UniString& rDisp,
- const UniString& rDomain )
-{
- aHostName = rHost;
- aDisplayName = rDisp;
- aDomainName = rDomain;
- nPID = 0;
-}
-
-inline ApplicationAddress::ApplicationAddress( const UniString& rHost, int nPIDPar )
-{
- aHostName = rHost;
- nPID = nPIDPar;
-}
-
-inline sal_Bool ApplicationAddress::IsConnectToSame( const ApplicationAddress& rAdr ) const
-{
- if ( nPID && ((nPID == rAdr.nPID) && (aHostName.Equals( rAdr.aHostName))) )
- return sal_True;
- else
- return sal_False;
-}
-
-#define APPEVENT_PARAM_DELIMITER '\n'
-
#define APPEVENT_OPEN_STRING "Open"
#define APPEVENT_PRINT_STRING "Print"
class VCL_DLLPUBLIC ApplicationEvent
{
-private:
- UniString aSenderAppName; // Absender Applikationsname
- rtl::OString m_aEvent; // Event
- UniString aData; // Uebertragene Daten
- ApplicationAddress aAppAddr; // Absender Addresse
+ rtl::OUString aEvent;
+ rtl::OUString aData;
+ std::vector<rtl::OUString> aParams;
+ ApplicationEvent();
public:
- ApplicationEvent() {}
- ApplicationEvent( const UniString& rSenderAppName,
- const ApplicationAddress& rAppAddr,
- const rtl::OString& rEvent,
- const UniString& rData );
-
- const UniString& GetSenderAppName() const { return aSenderAppName; }
- const rtl::OString& GetEvent() const { return m_aEvent; }
- const UniString& GetData() const { return aData; }
- const ApplicationAddress& GetAppAddress() const { return aAppAddr; }
-
- sal_uInt16 GetParamCount() const { return aData.GetTokenCount( APPEVENT_PARAM_DELIMITER ); }
- UniString GetParam( sal_uInt16 nParam ) const { return aData.GetToken( nParam, APPEVENT_PARAM_DELIMITER ); }
-};
+ ApplicationEvent(const rtl::OUString& rEvent,
+ const rtl::OUString& rData = rtl::OUString()):
+ aEvent(rEvent),
+ aData(rData)
+ {
+ sal_Int32 start = 0;
+ for(sal_Int32 i = 0; i < rData.getLength(); ++i)
+ {
+ if(rData[i] == '\n')
+ {
+ aParams.push_back(rData.copy(start, i - start));
+ start = ++i;
+ }
+ }
+ }
-inline ApplicationEvent::ApplicationEvent( const UniString& rSenderAppName,
- const ApplicationAddress& rAppAddr,
- const rtl::OString& rEvent,
- const UniString& rData ) :
- aSenderAppName( rSenderAppName ),
- m_aEvent( rEvent ),
- aData( rData ),
- aAppAddr( rAppAddr )
-{
-}
+ const rtl::OUString& GetEvent() const { return aEvent; }
+ const rtl::OUString& GetData() const { return aData; }
+ const std::vector<rtl::OUString>& GetParams() const { return aParams; }
+};
class VCL_DLLPUBLIC PropertyHandler
{