summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmloff/source/transform/EventMap.cxx140
-rw-r--r--xmloff/source/transform/EventMap.hxx7
-rw-r--r--xmloff/source/transform/EventOASISTContext.cxx6
-rw-r--r--xmloff/source/transform/EventOOoTContext.cxx6
4 files changed, 80 insertions, 79 deletions
diff --git a/xmloff/source/transform/EventMap.cxx b/xmloff/source/transform/EventMap.cxx
index 3cfa08a15db0..d509de7352b9 100644
--- a/xmloff/source/transform/EventMap.cxx
+++ b/xmloff/source/transform/EventMap.cxx
@@ -23,81 +23,81 @@
XMLTransformerEventMapEntry const aTransformerEventMap[] =
{
- { XML_NAMESPACE_DOM, "select", "on-select" },
- { XML_NAMESPACE_OFFICE, "insert-start", "on-insert-start" },
- { XML_NAMESPACE_OFFICE, "insert-done", "on-insert-done" },
- { XML_NAMESPACE_OFFICE, "mail-merge", "on-mail-merge" },
- { XML_NAMESPACE_OFFICE, "alpha-char-input", "on-alpha-char-input" },
- { XML_NAMESPACE_OFFICE, "non-alpha-char-input", "on-non-alpha-char-input" },
- { XML_NAMESPACE_DOM, "resize", "on-resize" },
- { XML_NAMESPACE_OFFICE, "move", "on-move" },
- { XML_NAMESPACE_OFFICE, "page-count-change", "on-page-count-change" },
- { XML_NAMESPACE_DOM, "mouseover", "on-mouse-over" },
- { XML_NAMESPACE_DOM, "click", "on-click" },
- { XML_NAMESPACE_DOM, "mouseout", "on-mouse-out" },
- { XML_NAMESPACE_OFFICE, "load-error", "on-load-error" },
- { XML_NAMESPACE_OFFICE, "load-cancel", "on-load-cancel" },
- { XML_NAMESPACE_OFFICE, "load-done", "on-load-done" },
- { XML_NAMESPACE_DOM, "load", "on-load" },
- { XML_NAMESPACE_DOM, "unload", "on-unload" },
- { XML_NAMESPACE_OFFICE, "start-app", "on-start-app" },
- { XML_NAMESPACE_OFFICE, "close-app", "on-close-app" },
- { XML_NAMESPACE_OFFICE, "new", "on-new" },
- { XML_NAMESPACE_OFFICE, "save", "on-save" },
- { XML_NAMESPACE_OFFICE, "save-as", "on-save-as" },
- { XML_NAMESPACE_DOM, "DOMFocusIn", "on-focus" },
- { XML_NAMESPACE_DOM, "DOMFocusOut", "on-unfocus" },
- { XML_NAMESPACE_OFFICE, "print", "on-print" },
- { XML_NAMESPACE_DOM, "error", "on-error" },
- { XML_NAMESPACE_OFFICE, "load-finished", "on-load-finished" },
- { XML_NAMESPACE_OFFICE, "save-finished", "on-save-finished" },
- { XML_NAMESPACE_OFFICE, "modify-changed", "on-modify-changed" },
- { XML_NAMESPACE_OFFICE, "prepare-unload", "on-prepare-unload" },
- { XML_NAMESPACE_OFFICE, "new-mail", "on-new-mail" },
- { XML_NAMESPACE_OFFICE, "toggle-fullscreen", "on-toggle-fullscreen" },
- { XML_NAMESPACE_OFFICE, "save-done", "on-save-done" },
- { XML_NAMESPACE_OFFICE, "save-as-done", "on-save-as-done" },
- { XML_NAMESPACE_OFFICE, "create", "on-create" },
- { XML_NAMESPACE_OFFICE, "save-as-failed", "on-save-as-failed" },
- { XML_NAMESPACE_OFFICE, "save-failed", "on-save-failed" },
- { XML_NAMESPACE_OFFICE, "copy-to-failed", "on-copy-to-failed" },
- { XML_NAMESPACE_OFFICE, "title-changed", "on-title-changed" },
+ { XML_NAMESPACE_DOM, u"select"_ustr, u"on-select"_ustr },
+ { XML_NAMESPACE_OFFICE, u"insert-start"_ustr, u"on-insert-start"_ustr },
+ { XML_NAMESPACE_OFFICE, u"insert-done"_ustr, u"on-insert-done"_ustr },
+ { XML_NAMESPACE_OFFICE, u"mail-merge"_ustr, u"on-mail-merge"_ustr },
+ { XML_NAMESPACE_OFFICE, u"alpha-char-input"_ustr, u"on-alpha-char-input"_ustr },
+ { XML_NAMESPACE_OFFICE, u"non-alpha-char-input"_ustr, u"on-non-alpha-char-input"_ustr },
+ { XML_NAMESPACE_DOM, u"resize"_ustr, u"on-resize"_ustr },
+ { XML_NAMESPACE_OFFICE, u"move"_ustr, u"on-move"_ustr },
+ { XML_NAMESPACE_OFFICE, u"page-count-change"_ustr, u"on-page-count-change"_ustr },
+ { XML_NAMESPACE_DOM, u"mouseover"_ustr, u"on-mouse-over"_ustr },
+ { XML_NAMESPACE_DOM, u"click"_ustr, u"on-click"_ustr },
+ { XML_NAMESPACE_DOM, u"mouseout"_ustr, u"on-mouse-out"_ustr },
+ { XML_NAMESPACE_OFFICE, u"load-error"_ustr, u"on-load-error"_ustr },
+ { XML_NAMESPACE_OFFICE, u"load-cancel"_ustr, u"on-load-cancel"_ustr },
+ { XML_NAMESPACE_OFFICE, u"load-done"_ustr, u"on-load-done"_ustr },
+ { XML_NAMESPACE_DOM, u"load"_ustr, u"on-load"_ustr },
+ { XML_NAMESPACE_DOM, u"unload"_ustr, u"on-unload"_ustr },
+ { XML_NAMESPACE_OFFICE, u"start-app"_ustr, u"on-start-app"_ustr },
+ { XML_NAMESPACE_OFFICE, u"close-app"_ustr, u"on-close-app"_ustr },
+ { XML_NAMESPACE_OFFICE, u"new"_ustr, u"on-new"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save"_ustr, u"on-save"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-as"_ustr, u"on-save-as"_ustr },
+ { XML_NAMESPACE_DOM, u"DOMFocusIn"_ustr, u"on-focus"_ustr },
+ { XML_NAMESPACE_DOM, u"DOMFocusOut"_ustr, u"on-unfocus"_ustr },
+ { XML_NAMESPACE_OFFICE, u"print"_ustr, u"on-print"_ustr },
+ { XML_NAMESPACE_DOM, u"error"_ustr, u"on-error"_ustr },
+ { XML_NAMESPACE_OFFICE, u"load-finished"_ustr, u"on-load-finished"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-finished"_ustr, u"on-save-finished"_ustr },
+ { XML_NAMESPACE_OFFICE, u"modify-changed"_ustr, u"on-modify-changed"_ustr },
+ { XML_NAMESPACE_OFFICE, u"prepare-unload"_ustr, u"on-prepare-unload"_ustr },
+ { XML_NAMESPACE_OFFICE, u"new-mail"_ustr, u"on-new-mail"_ustr },
+ { XML_NAMESPACE_OFFICE, u"toggle-fullscreen"_ustr, u"on-toggle-fullscreen"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-done"_ustr, u"on-save-done"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-as-done"_ustr, u"on-save-as-done"_ustr },
+ { XML_NAMESPACE_OFFICE, u"create"_ustr, u"on-create"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-as-failed"_ustr, u"on-save-as-failed"_ustr },
+ { XML_NAMESPACE_OFFICE, u"save-failed"_ustr, u"on-save-failed"_ustr },
+ { XML_NAMESPACE_OFFICE, u"copy-to-failed"_ustr, u"on-copy-to-failed"_ustr },
+ { XML_NAMESPACE_OFFICE, u"title-changed"_ustr, u"on-title-changed"_ustr },
- { XML_NAMESPACE_FORM, "approveaction", "on-approveaction" },
- { XML_NAMESPACE_FORM, "performaction", "on-performaction" },
- { XML_NAMESPACE_DOM, "change", "on-change" },
- { XML_NAMESPACE_FORM, "textchange", "on-textchange" },
- { XML_NAMESPACE_FORM, "itemstatechange", "on-itemstatechange" },
- { XML_NAMESPACE_DOM, "keydown", "on-keydown" },
- { XML_NAMESPACE_DOM, "keyup", "on-keyup" },
- { XML_NAMESPACE_FORM, "mousedrag", "on-mousedrag" },
- { XML_NAMESPACE_DOM, "mousemove", "on-mousemove" },
- { XML_NAMESPACE_DOM, "mousedown", "on-mousedown" },
- { XML_NAMESPACE_DOM, "mouseup", "on-mouseup" },
- { XML_NAMESPACE_FORM, "approvereset", "on-approvereset" },
- { XML_NAMESPACE_DOM, "reset", "on-reset" },
- { XML_NAMESPACE_DOM, "submit", "on-submit" },
- { XML_NAMESPACE_FORM, "approveupdate", "on-approveupdate" },
- { XML_NAMESPACE_FORM, "update", "on-update" },
- { XML_NAMESPACE_FORM, "startreload", "on-startreload" },
- { XML_NAMESPACE_FORM, "reload", "on-reload" },
- { XML_NAMESPACE_FORM, "startunload", "on-startunload" },
- { XML_NAMESPACE_FORM, "confirmdelete", "on-confirmdelete" },
- { XML_NAMESPACE_FORM, "approverowchange", "on-approverowchange" },
- { XML_NAMESPACE_FORM, "rowchange", "on-rowchange" },
- { XML_NAMESPACE_FORM, "approvecursormove", "on-approvecursormove" },
- { XML_NAMESPACE_FORM, "cursormove", "on-cursormove" },
- { XML_NAMESPACE_FORM, "supplyparameter", "on-supplyparameter" },
- { XML_NAMESPACE_FORM, "adjust", "on-adjust" },
- { 0, nullptr, nullptr }
+ { XML_NAMESPACE_FORM, u"approveaction"_ustr, u"on-approveaction"_ustr },
+ { XML_NAMESPACE_FORM, u"performaction"_ustr, u"on-performaction"_ustr },
+ { XML_NAMESPACE_DOM, u"change"_ustr, u"on-change"_ustr },
+ { XML_NAMESPACE_FORM, u"textchange"_ustr, u"on-textchange"_ustr },
+ { XML_NAMESPACE_FORM, u"itemstatechange"_ustr, u"on-itemstatechange"_ustr },
+ { XML_NAMESPACE_DOM, u"keydown"_ustr, u"on-keydown"_ustr },
+ { XML_NAMESPACE_DOM, u"keyup"_ustr, u"on-keyup"_ustr },
+ { XML_NAMESPACE_FORM, u"mousedrag"_ustr, u"on-mousedrag"_ustr },
+ { XML_NAMESPACE_DOM, u"mousemove"_ustr, u"on-mousemove"_ustr },
+ { XML_NAMESPACE_DOM, u"mousedown"_ustr, u"on-mousedown"_ustr },
+ { XML_NAMESPACE_DOM, u"mouseup"_ustr, u"on-mouseup"_ustr },
+ { XML_NAMESPACE_FORM, u"approvereset"_ustr, u"on-approvereset"_ustr },
+ { XML_NAMESPACE_DOM, u"reset"_ustr, u"on-reset"_ustr },
+ { XML_NAMESPACE_DOM, u"submit"_ustr, u"on-submit"_ustr },
+ { XML_NAMESPACE_FORM, u"approveupdate"_ustr, u"on-approveupdate"_ustr },
+ { XML_NAMESPACE_FORM, u"update"_ustr, u"on-update"_ustr },
+ { XML_NAMESPACE_FORM, u"startreload"_ustr, u"on-startreload"_ustr },
+ { XML_NAMESPACE_FORM, u"reload"_ustr, u"on-reload"_ustr },
+ { XML_NAMESPACE_FORM, u"startunload"_ustr, u"on-startunload"_ustr },
+ { XML_NAMESPACE_FORM, u"confirmdelete"_ustr, u"on-confirmdelete"_ustr },
+ { XML_NAMESPACE_FORM, u"approverowchange"_ustr, u"on-approverowchange"_ustr },
+ { XML_NAMESPACE_FORM, u"rowchange"_ustr, u"on-rowchange"_ustr },
+ { XML_NAMESPACE_FORM, u"approvecursormove"_ustr, u"on-approvecursormove"_ustr },
+ { XML_NAMESPACE_FORM, u"cursormove"_ustr, u"on-cursormove"_ustr },
+ { XML_NAMESPACE_FORM, u"supplyparameter"_ustr, u"on-supplyparameter"_ustr },
+ { XML_NAMESPACE_FORM, u"adjust"_ustr, u"on-adjust"_ustr },
+ { 0, u""_ustr, u""_ustr }
};
XMLTransformerEventMapEntry const aFormTransformerEventMap[] =
{
- { XML_NAMESPACE_DOM, "mouseover", "on-mouseover" },
- { XML_NAMESPACE_DOM, "mouseout", "on-mouseout" },
- { XML_NAMESPACE_DOM, "DOMFocusOut", "on-blur" },
- { 0, nullptr, nullptr }
+ { XML_NAMESPACE_DOM, u"mouseover"_ustr, u"on-mouseover"_ustr },
+ { XML_NAMESPACE_DOM, u"mouseout"_ustr, u"on-mouseout"_ustr },
+ { XML_NAMESPACE_DOM, u"DOMFocusOut"_ustr, u"on-blur"_ustr },
+ { 0, u""_ustr, u""_ustr }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/transform/EventMap.hxx b/xmloff/source/transform/EventMap.hxx
index 11d20e1850e0..09caa74fdf2a 100644
--- a/xmloff/source/transform/EventMap.hxx
+++ b/xmloff/source/transform/EventMap.hxx
@@ -20,12 +20,13 @@
#pragma once
#include <sal/types.h>
+#include <rtl/ustring.hxx>
struct XMLTransformerEventMapEntry
{
- sal_uInt16 const m_nOASISPrefix;
- const char* m_pOASISName;
- const char* m_pOOoName;
+ sal_uInt16 m_nOASISPrefix;
+ OUString m_pOASISName;
+ OUString m_pOOoName;
};
extern XMLTransformerEventMapEntry const aTransformerEventMap[];
diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx
index 5d2e31b37cb9..5957000d6a61 100644
--- a/xmloff/source/transform/EventOASISTContext.cxx
+++ b/xmloff/source/transform/EventOASISTContext.cxx
@@ -55,14 +55,14 @@ XMLTransformerOASISEventMap_Impl::XMLTransformerOASISEventMap_Impl( XMLTransform
XMLTransformerOASISEventMap_Impl::key_type aKey;
XMLTransformerOASISEventMap_Impl::mapped_type aData;
- while( pInit->m_pOASISName )
+ while( !pInit->m_pOASISName.isEmpty() )
{
aKey.m_nPrefix = pInit->m_nOASISPrefix;
- aKey.m_aLocalName = OUString::createFromAscii(pInit->m_pOASISName);
+ aKey.m_aLocalName = pInit->m_pOASISName;
OSL_ENSURE( find( aKey ) == end(), "duplicate event map entry" );
- aData = OUString::createFromAscii(pInit->m_pOOoName);
+ aData = pInit->m_pOOoName;
XMLTransformerOASISEventMap_Impl::value_type aVal( aKey, aData );
diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx
index 1611e6b7a10f..210f046d4d9e 100644
--- a/xmloff/source/transform/EventOOoTContext.cxx
+++ b/xmloff/source/transform/EventOOoTContext.cxx
@@ -47,14 +47,14 @@ void XMLTransformerOOoEventMap_Impl::AddMap( XMLTransformerEventMapEntry const *
{
XMLTransformerOOoEventMap_Impl::key_type aKey;
XMLTransformerOOoEventMap_Impl::mapped_type aData;
- while( pInit->m_pOOoName )
+ while( !pInit->m_pOOoName.isEmpty() )
{
- aKey = OUString::createFromAscii(pInit->m_pOOoName);
+ aKey = pInit->m_pOOoName;
OSL_ENSURE( find( aKey ) == end(), "duplicate event map entry" );
aData.m_nPrefix = pInit->m_nOASISPrefix;
- aData.m_aLocalName = OUString::createFromAscii(pInit->m_pOASISName);
+ aData.m_aLocalName = pInit->m_pOASISName;
XMLTransformerOOoEventMap_Impl::value_type aVal( aKey, aData );