diff --git a/reactos/subsys/system/explorer/doxy-footer.html b/reactos/subsys/system/explorer/doxy-footer.html
index 4fd39a8383f..1552db4afb1 100644
--- a/reactos/subsys/system/explorer/doxy-footer.html
+++ b/reactos/subsys/system/explorer/doxy-footer.html
@@ -3,7 +3,7 @@
ROS Explorer Source Code Documentation
- generated on 22.03.2004 by
+ generated on 27.03.2004 by
|
diff --git a/reactos/subsys/system/explorer/globals.h b/reactos/subsys/system/explorer/globals.h
index 4aa271ab3d3..2712e3fe5a4 100644
--- a/reactos/subsys/system/explorer/globals.h
+++ b/reactos/subsys/system/explorer/globals.h
@@ -28,6 +28,8 @@
#include "utility/xmlstorage.h"
+using namespace XMLStorage;
+
/// management of file types
struct FileTypeInfo {
diff --git a/reactos/subsys/system/explorer/taskbar/traynotify.cpp b/reactos/subsys/system/explorer/taskbar/traynotify.cpp
index a298dafbd8d..c788b71117d 100644
--- a/reactos/subsys/system/explorer/taskbar/traynotify.cpp
+++ b/reactos/subsys/system/explorer/taskbar/traynotify.cpp
@@ -195,11 +195,10 @@ void NotifyArea::read_config()
if (pos.go_down("explorer-cfg")) {
if (pos.go_down("notify-icons")) {
- const XMLNode::Children& children = pos->get_children();
+ XMLChildrenFilter icons(pos, "icon");
- for(XMLNode::Children::const_iterator it=children.begin(); it!=children.end(); ++it) {
+ for(XMLChildrenFilter::iterator it=icons.begin(); it!=icons.end(); ++it) {
const XMLNode& node = **it;
- assert(node==TEXT("icon"));
NotifyIconConfig cfg;
diff --git a/reactos/subsys/system/explorer/utility/utility.h b/reactos/subsys/system/explorer/utility/utility.h
index 45c858c6593..d4fd1255222 100644
--- a/reactos/subsys/system/explorer/utility/utility.h
+++ b/reactos/subsys/system/explorer/utility/utility.h
@@ -772,38 +772,6 @@ struct String
operator wstring() const {WCHAR b[BUFFER_LEN]; return wstring(b, MultiByteToWideChar(CP_ACP, 0, c_str(), -1, b, BUFFER_LEN)-1);}
#endif
- void assign_utf8(const char* str)
- {
- TCHAR buffer[BUFFER_LEN];
-
-#ifdef UNICODE
- int l = MultiByteToWideChar(CP_UTF8, 0, str, -1, buffer, BUFFER_LEN) - 1;
-#else
- WCHAR wbuffer[BUFFER_LEN];
-
- int l = MultiByteToWideChar(CP_UTF8, 0, str, -1, wbuffer, BUFFER_LEN) - 1;
- l = WideCharToMultiByte(CP_ACP, 0, wbuffer, l, buffer, BUFFER_LEN, 0, 0);
-#endif
-
- assign(buffer, l);
- }
-
- string get_utf8() const
- {
- char buffer[BUFFER_LEN];
-
-#ifdef UNICODE
- int l = WideCharToMultiByte(CP_UTF8, 0, c_str(), length(), buffer, BUFFER_LEN, 0, 0);
-#else
- WCHAR wbuffer[BUFFER_LEN];
-
- int l = MultiByteToWideChar(CP_ACP, 0, c_str(), length(), wbuffer, BUFFER_LEN);
- l = WideCharToMultiByte(CP_UTF8, 0, wbuffer, l, buffer, BUFFER_LEN, 0, 0);
-#endif
-
- return string(buffer, l);
- }
-
String& printf(LPCTSTR fmt, ...)
{
va_list l;
@@ -847,6 +815,8 @@ struct String
}
};
+#define _STRING_DEFINED
+
struct FmtString : public String
{
diff --git a/reactos/subsys/system/explorer/utility/xmlstorage.cpp b/reactos/subsys/system/explorer/utility/xmlstorage.cpp
index 0f44e77a4dd..e1b90f2b672 100644
--- a/reactos/subsys/system/explorer/utility/xmlstorage.cpp
+++ b/reactos/subsys/system/explorer/utility/xmlstorage.cpp
@@ -1,50 +1,47 @@
-/*
- * Copyright 2004 Martin Fuchs
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
//
// XML storage classes
//
// xmlstorage.cpp
//
- // Martin Fuchs, 22.03.2004
+ // Copyright (c) 2004, Martin Fuchs
//
+/*
+
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
#include "utility.h"
#include "xmlstorage.h"
-void xml_test() //@@
-{
- XMLDoc doc;
-
- doc.read("explorer-cfg.xml");
- doc.write("out.xml");
-
- XMLPos pos(&doc);
-
- if (pos.go("\\explorer-cfg\\startmenu")) {
-
- pos.back();
- }
-}
+namespace XMLStorage {
/// move X-Path like to position in XML tree
@@ -107,3 +104,6 @@ void XMLCALL XMLReader::XML_DefaultHandler(void* userData, const XML_Char* s, in
else
pThis->_pos->append_trailing(s, len);
}
+
+
+} // namespace XMLStorage
diff --git a/reactos/subsys/system/explorer/utility/xmlstorage.h b/reactos/subsys/system/explorer/utility/xmlstorage.h
index 0c1a7099328..6052d12d1a1 100644
--- a/reactos/subsys/system/explorer/utility/xmlstorage.h
+++ b/reactos/subsys/system/explorer/utility/xmlstorage.h
@@ -1,42 +1,234 @@
-/*
- * Copyright 2004 Martin Fuchs
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
//
// XML storage classes
//
// xmlstorage.h
//
- // Martin Fuchs, 22.03.2004
+ // Copyright (c) 2004, Martin Fuchs
//
-#include "expat.h"
+/*
-#include
-#include
-#include
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+#include "expat.h"
#ifdef _MSC_VER
#pragma comment(lib, "libexpat.lib")
+#pragma warning(disable: 4786)
#endif
+#include // for LPCTSTR
+
+#ifdef UNICODE
+#define _UNICODE
+#endif
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include