[Libreoffice-commits] .: writerfilter/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Fri Dec 23 15:33:55 PST 2011
writerfilter/source/dmapper/DomainMapper.cxx | 5 ++-
writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 9 +-----
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 9 +-----
writerfilter/source/dmapper/OLEHandler.cxx | 15 ++--------
writerfilter/source/dmapper/PropertyMap.cxx | 21 +++------------
5 files changed, 15 insertions(+), 44 deletions(-)
New commits:
commit ce43f9f59f216d7f278e21c2bdf8be6901d78510
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Sat Dec 24 00:32:04 2011 +0100
dmapper: clog -> SAL_WARN
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 4bbba6d..62a4e4a 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -81,6 +81,7 @@
#include <comphelper/storagehelper.hxx>
#include <rtl/ustrbuf.hxx>
+#include <rtl/oustringostreaminserter.hxx>
#include <boost/shared_ptr.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <tools/color.hxx>
@@ -3381,9 +3382,9 @@ void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len)
m_pImpl->appendTextPortion( sText, pContext );
}
}
- catch( const uno::RuntimeException& )
+ catch( const uno::RuntimeException& e )
{
- std::clog << __FILE__ << "(l" << __LINE__ << ")" << std::endl;
+ SAL_WARN("writerfilter", "failed. Message :" << e.Message);
}
}
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 4990112..6b04424 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -36,10 +36,7 @@
#ifdef DEBUG_DMAPPER_TABLE_HANDLER
#include <PropertyMapHelper.hxx>
-#endif
-
-#if OSL_DEBUG_LEVEL > 1
-#include <stdio.h>
+#include <rtl/oustringostreaminserter.hxx>
#endif
namespace writerfilter {
@@ -63,9 +60,7 @@ static void lcl_printProperties( PropertyMapPtr pProps )
PropertyNameSupplier& rPropSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
for( ; aMapIter != aEndIter; ++aMapIter )
{
- rtl::OUString aOUStr = rPropSupplier.GetName( aMapIter->first.eId );
- rtl::OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US );
- clog << aOStr.getStr();
+ SAL_INFO("writerfilter", rPropSupplier.GetName(aMapIter->first.eId));
table::BorderLine2 aLine;
sal_Int32 nColor;
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 484895a..abb97e6 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -74,6 +74,7 @@
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <rtl/ustrbuf.hxx>
#include <rtl/string.h>
+#include <rtl/oustringostreaminserter.hxx>
#include "FieldTypes.hxx"
#include <oox/mathml/import.hxx>
@@ -1577,13 +1578,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
}
catch ( const uno::Exception& e )
{
-#if DEBUG
- clog << "Exception when adding shape: ";
- clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( );
- clog << endl;
-#else
- (void) e;
-#endif
+ SAL_WARN("writerfilter", "Exception when adding shape: " << e.Message);
}
}
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index 907e4a7..9ef3364 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -31,6 +31,7 @@
#include <doctok/resourceids.hxx>
#include <ooxml/resourceids.hxx>
+#include <rtl/oustringostreaminserter.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/document/XEmbeddedObjectResolver.hpp>
@@ -124,12 +125,7 @@ void OLEHandler::lcl_attribute(Id rName, Value & rVal)
}
catch( const uno::Exception& e )
{
-#if DEBUG
- clog << "Exception in OLE Handler: ";
- clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( ) << endl;
-#else
- (void)e;
-#endif
+ SAL_WARN("writerfilter", "Exception in OLE Handler: " << e.Message);
}
}
}
@@ -175,12 +171,7 @@ void OLEHandler::lcl_sprm(Sprm & rSprm)
}
catch( const uno::Exception& e )
{
-#if DEBUG
- clog << "Exception in OLE Handler: ";
- clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( ) << endl;
-#else
- (void)e;
-#endif
+ SAL_WARN("writerfilter", "Exception in OLE Handler: " << e.Message);
}
}
}
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index e74e784..d720594 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -30,6 +30,7 @@
#include <DomainMapper_Impl.hxx>
#include <ConversionHelper.hxx>
#include <i18npool/paper.hxx>
+#include <rtl/oustringostreaminserter.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
@@ -632,9 +633,7 @@ bool SectionPropertyMap::HasFooter(bool bFirstPage) const
void SectionPropertyMap::CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Impl& rDM_Impl )
{
-#if DEBUG
- clog << "START>>> SectionPropertyMap::CopyLastHeaderFooter()" << endl;
-#endif
+ SAL_INFO("writerfilter", "START>>> SectionPropertyMap::CopyLastHeaderFooter()");
SectionPropertyMap* pLastContext = rDM_Impl.GetLastSectionContext( );
if ( pLastContext )
{
@@ -692,10 +691,7 @@ void SectionPropertyMap::CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Imp
if ( ( bIsHeader && bCopyHeader ) || ( !bIsHeader && bCopyFooter ) )
{
-#if DEBUG
- clog << "Copying ";
- clog << rtl::OUStringToOString( sName, RTL_TEXTENCODING_UTF8 ).getStr( ) << endl;
-#endif
+ SAL_INFO("writerfilter", "Copying " << sName);
// TODO has to be copied
uno::Reference< text::XTextCopy > xTxt;
if (xStyle.is())
@@ -711,17 +707,10 @@ void SectionPropertyMap::CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Imp
}
catch ( const uno::Exception& e )
{
-#if DEBUG
- clog << "An exception occurred in SectionPropertyMap::CopyLastHeaderFooter( ) - ";
- clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( ) << endl;
-#else
- (void) e;
-#endif
+ SAL_INFO("writerfilter", "An exception occurred in SectionPropertyMap::CopyLastHeaderFooter( ) - " << e.Message);
}
}
-#if DEBUG
- clog << "END>>> SectionPropertyMap::CopyLastHeaderFooter()" << endl;
-#endif
+ SAL_INFO("writerfilter", "END>>> SectionPropertyMap::CopyLastHeaderFooter()");
}
void SectionPropertyMap::PrepareHeaderFooterProperties( bool bFirstPage )
More information about the Libreoffice-commits
mailing list