[Libreoffice-commits] .: writerfilter/inc

2012-03-17 Thread Lubos Lunak
 writerfilter/inc/resourcemodel/WW8ResourceModel.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d46e382034e918fd0f9c4d75d5fe95abef4bd349
Author: Luboš Luňák l.lu...@suse.cz
Date:   Sat Mar 17 17:09:12 2012 +0100

use SAL_DLLPUBLIC_TEMPLATE for an exported template

diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx 
b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
index e49b3f5..04f0819 100644
--- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
+++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
@@ -90,7 +90,7 @@ using namespace ::std;
 */
 
 template class T
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Reference
+class SAL_DLLPUBLIC_TEMPLATE Reference
 {
 public:
 /**
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: writerfilter/inc

2012-03-11 Thread Miklos Vajna
 writerfilter/inc/resourcemodel/WW8ResourceModel.hxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f32fe9f5012e3ee184e1a1fca6814bee9105d8fb
Author: Arnaud Versini arnaud.vers...@gmail.com
Date:   Sun Mar 11 20:42:44 2012 +0100

Add a virtual destrcutor to value to prevent memory leak in RTFValue

diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx 
b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
index f452a83..9504b6f 100644
--- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
+++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
@@ -295,6 +295,8 @@ public:
 typedef auto_ptrValue Pointer_t;
 SAL_WNODEPRECATED_DECLARATIONS_POP
 
+virtual ~Value() {}
+
 /**
Returns integer representation of the value.
  */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: writerfilter/inc writerfilter/source

2011-12-21 Thread Miklos Vajna
 writerfilter/inc/resourcemodel/TagLogger.hxx|   11 +++
 writerfilter/source/resourcemodel/TagLogger.cxx |   69 
 2 files changed, 80 insertions(+)

New commits:
commit acfdec468d54d44f94ca6752bbbfbdab07ef9a0c
Author: Miklos Vajna vmik...@frugalware.org
Date:   Thu Dec 22 01:46:33 2011 +0100

writerfilter: fix dbglevel=2 build

This basically reverts e8f980d10cf95b8bced1ca18a55b2a4784f6dcc9 and
b0e993d42e1df8c68c4c2684ab9dda27a1329594, while keeping callcatcher
happy.

diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx 
b/writerfilter/inc/resourcemodel/TagLogger.hxx
index 44dc901..f5ca4eb 100644
--- a/writerfilter/inc/resourcemodel/TagLogger.hxx
+++ b/writerfilter/inc/resourcemodel/TagLogger.hxx
@@ -73,7 +73,18 @@ namespace writerfilter
 void element(const std::string  name);
 void unoPropertySet(uno::Referencebeans::XPropertySet rPropSet);
 #endif
+#if OSL_DEBUG_LEVEL  1
+void startElement(const std::string  name);
+#endif
 void attribute(const std::string  name, const std::string  value);
+#if OSL_DEBUG_LEVEL  1
+void attribute(const std::string  name, const ::rtl::OUString  
value);
+void attribute(const std::string  name, sal_uInt32 value);
+void attribute(const std::string  name, const uno::Any aAny);
+void chars(const std::string  chars);
+void chars(const ::rtl::OUString  chars);
+void endElement();
+#endif
 
 #ifdef DEBUG_CONTEXT_HANDLER
 void propertySet(writerfilter::ReferenceProperties::Pointer_t props,
diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx 
b/writerfilter/source/resourcemodel/TagLogger.cxx
index dcdd461..7ee16fe 100644
--- a/writerfilter/source/resourcemodel/TagLogger.cxx
+++ b/writerfilter/source/resourcemodel/TagLogger.cxx
@@ -156,6 +156,15 @@ namespace writerfilter
 
 #endif
 
+#if OSL_DEBUG_LEVEL  1
+void TagLogger::startElement(const string  name)
+{
+xmlChar* xmlName = xmlCharStrdup( name.c_str() );
+xmlTextWriterStartElement( pWriter, xmlName );
+xmlFree( xmlName );
+}
+#endif
+
 void TagLogger::attribute(const string  name, const string  value)
 {
 xmlChar* xmlName = xmlCharStrdup( name.c_str() );
@@ -166,6 +175,66 @@ namespace writerfilter
 xmlFree( xmlName );
 }
 
+#if OSL_DEBUG_LEVEL  1
+void TagLogger::attribute(const string  name, const ::rtl::OUString  
value)
+{
+attribute( name, OUStringToOString( value, RTL_TEXTENCODING_ASCII_US 
).getStr() );
+}
+
+void TagLogger::attribute(const string  name, sal_uInt32 value)
+{
+xmlChar* xmlName = xmlCharStrdup( name.c_str() );
+xmlTextWriterWriteFormatAttribute( pWriter, xmlName,
+   % SAL_PRIuUINT32, value );
+xmlFree( xmlName );
+}
+
+void TagLogger::attribute(const string  name, const uno::Any aAny)
+{
+string aTmpStrInt;
+string aTmpStrFloat;
+string aTmpStrString;
+
+sal_Int32 nInt = 0;
+float nFloat = 0.0;
+::rtl::OUString aStr;
+
+xmlChar* xmlName = xmlCharStrdup( name.c_str() );
+if ( aAny = nInt )
+{
+xmlTextWriterWriteFormatAttribute( pWriter, xmlName,
+   % SAL_PRIdINT32, nInt );
+}
+else if ( aAny = nFloat )
+{
+xmlTextWriterWriteFormatAttribute( pWriter, xmlName,
+   %f, nFloat );
+}
+else if ( aAny = aStr )
+{
+attribute( name, aStr );
+}
+xmlFree( xmlName );
+}
+
+void TagLogger::chars(const string  rChars)
+{
+xmlChar* xmlChars = xmlCharStrdup( rChars.c_str() );
+xmlTextWriterWriteString( pWriter, xmlChars );
+xmlFree( xmlChars );
+}
+
+void TagLogger::chars(const ::rtl::OUString  rChars)
+{
+chars(OUStringToOString(rChars, RTL_TEXTENCODING_ASCII_US).getStr());
+}
+
+void TagLogger::endElement()
+{
+xmlTextWriterEndElement( pWriter );
+}
+#endif
+
 #ifdef DEBUG_CONTEXT_HANDLER
 class PropertySetDumpHandler : public Properties
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits