summaryrefslogtreecommitdiff
path: root/unoxml/source/events
diff options
context:
space:
mode:
authorLars Oppermann <lo@openoffice.org>2004-02-27 16:14:27 +0000
committerLars Oppermann <lo@openoffice.org>2004-02-27 16:14:27 +0000
commita8f5420adc32465d43053a922295cc067553046f (patch)
tree6edf0c59f43102b115e77f9f2cd748975b4e962b /unoxml/source/events
parentddbb3e1ba8d2f86544bc52314c7134987e6c4bc7 (diff)
#i25594# event type strings
Diffstat (limited to 'unoxml/source/events')
-rw-r--r--unoxml/source/events/testlistener.cxx16
-rw-r--r--unoxml/source/events/testlistener.hxx6
2 files changed, 9 insertions, 13 deletions
diff --git a/unoxml/source/events/testlistener.cxx b/unoxml/source/events/testlistener.cxx
index 695507ec9caa..96be7b75f5f0 100644
--- a/unoxml/source/events/testlistener.cxx
+++ b/unoxml/source/events/testlistener.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: testlistener.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: lo $ $Date: 2004-02-16 16:41:53 $
+ * last change: $Author: lo $ $Date: 2004-02-27 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -131,13 +131,9 @@ namespace DOM { namespace events
if(! (args[0] >>= aTarget)) throw IllegalArgumentException(
OUString::createFromAscii("Illegal argument 1"), Reference< XInterface >(), 1);
- EventType aType = (EventType)0;
- if (! (args[1] >>= aType)) {
- sal_Int32 i = 0;
- if (args[1] >>= i) aType = (EventType)i;
- else throw IllegalArgumentException(
- OUString::createFromAscii("Illegal argument 2"), Reference< XInterface >(), 2);
- }
+ OUString aType;
+ if (! (args[1] >>= aType))
+ throw IllegalArgumentException(OUString::createFromAscii("Illegal argument 2"), Reference< XInterface >(), 2);
sal_Bool bCapture = sal_False;
if(! (args[2] >>= bCapture)) throw IllegalArgumentException(
@@ -167,7 +163,7 @@ namespace DOM { namespace events
{
FILE* f = fopen("C:\\listener.out", "a");
fprintf(f, "CTestListener::handleEvent in %s\n", U2S(m_name));
- fprintf(f, " type: %d\n\n", evt->getType());
+ fprintf(f, " type: %s\n\n", OUStringToOString(evt->getType(), RTL_TEXTENCODING_ASCII_US).getStr());
fclose(f);
}
diff --git a/unoxml/source/events/testlistener.hxx b/unoxml/source/events/testlistener.hxx
index 52fd8d5ed3f8..744afc1c45c0 100644
--- a/unoxml/source/events/testlistener.hxx
+++ b/unoxml/source/events/testlistener.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: testlistener.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: lo $ $Date: 2004-02-16 16:41:54 $
+ * last change: $Author: lo $ $Date: 2004-02-27 17:14:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -101,7 +101,7 @@ namespace DOM { namespace events
private:
Reference< XMultiServiceFactory > m_factory;
Reference <XEventTarget> m_target;
- EventType m_type;
+ OUString m_type;
sal_Bool m_capture;
OUString m_name;