summaryrefslogtreecommitdiff
path: root/salhelper
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2010-11-04 12:04:32 +0200
committerTor Lillqvist <tml@hemulen.(none)>2010-11-04 12:09:29 +0200
commite3159b33959113d32939983b4e0d9e133836eb84 (patch)
treef8ff8695ffd4030085380cf37e3b2b412ce13e55 /salhelper
parentccce2d1fe8ffaf69e1c8a4f01e0321dc48996fba (diff)
Attempt to fix some vos removal fallout on Windows
After of the vos removal, some classes in other parts of the code now are subclasses of SimpleReferenceObject. To avoid compilation and linking errors in those other parts, we seem to need to have the operator new[] and operator delete[] in SimpleReferenceObject as protected instead of private. We also need an implementation of operator delete[]. As it can be unimplemented with gcc, I hope it isn't actually called, though, so it for now crashes intentionally if called. Will see later if this actually works, this is just a commit to make stuff build.
Diffstat (limited to 'salhelper')
-rw-r--r--salhelper/inc/salhelper/simplereferenceobject.hxx6
-rw-r--r--salhelper/source/msci.map1
-rw-r--r--salhelper/source/simplereferenceobject.cxx15
3 files changed, 22 insertions, 0 deletions
diff --git a/salhelper/inc/salhelper/simplereferenceobject.hxx b/salhelper/inc/salhelper/simplereferenceobject.hxx
index 2d6399c0d..865eff5a3 100644
--- a/salhelper/inc/salhelper/simplereferenceobject.hxx
+++ b/salhelper/inc/salhelper/simplereferenceobject.hxx
@@ -121,6 +121,12 @@ private:
*/
void operator =(SimpleReferenceObject);
+#ifdef _MSC_VER
+/* We can't now have these private with MSVC2008 at least, it leads to
+ compilation errors in xmloff and other places.
+*/
+protected:
+#endif
/** not implemented (see general class documentation)
@internal
*/
diff --git a/salhelper/source/msci.map b/salhelper/source/msci.map
index 145616abe..4968573d6 100644
--- a/salhelper/source/msci.map
+++ b/salhelper/source/msci.map
@@ -19,6 +19,7 @@ GetVersionInfo
UDK_3.1 {
global:
+ ??_VSimpleReferenceObject@salhelper@@KAXPAX@Z;
??_7SimpleReferenceObject@salhelper@@6B@;
??0Condition@salhelper@@QAE@AAVMutex@osl@@@Z;
diff --git a/salhelper/source/simplereferenceobject.cxx b/salhelper/source/simplereferenceobject.cxx
index 764047730..f31089177 100644
--- a/salhelper/source/simplereferenceobject.cxx
+++ b/salhelper/source/simplereferenceobject.cxx
@@ -74,4 +74,19 @@ void SimpleReferenceObject::operator delete(void * pPtr, std::nothrow_t const &)
#endif // WNT
}
+#ifdef _MSC_VER
+
+/* This operator is supposed to be unimplemented, but that now leads
+ * to compilation and/or linking errors with MSVC2008. (Don't know
+ * about MSVC2010.) As it can be left unimplemented just fine with
+ * gcc, presumably it is never called. So do implement it then to
+ * avoid the compilation and/or linking errors, but make it crash
+ * intentionally if called.
+ */
+void SimpleReferenceObject::operator delete[](void * /* pPtr */)
+{
+ free(NULL);
+}
+#endif
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */