[Libreoffice-commits] .: writerfilter/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Thu Dec 8 12:45:44 PST 2011
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 4 -
writerfilter/source/filter/RtfFilter.cxx | 4 -
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 33 +++++++--------
writerfilter/source/rtftok/rtfsdrimport.cxx | 8 +--
writerfilter/source/rtftok/rtfskipdestination.cxx | 2
writerfilter/source/rtftok/rtftokenizer.cxx | 14 +++---
6 files changed, 33 insertions(+), 32 deletions(-)
New commits:
commit 52422457d4aada3d9a12cd8cf2945c46dea7b275
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Thu Dec 8 21:43:19 2011 +0100
Writerfilter: replace OSL_TRACE(...) by SAL_INFO("writerfilter",...)
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 3bfb463..bca93f9 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -261,13 +261,13 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
// Binary filter takes BiDirection into account ( but I have no idea about that here )
// or even what it is. But... here's where to handle it if it becomes an issue
pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( VERT_TOP_RIGHT ));
- OSL_TRACE("Have inserted textDirection %d", nIntValue );
+ SAL_INFO( "writerfilter", "Have inserted textDirection " << nIntValue );
break;
case 3: // btLr
// We have to fake this text direction
pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( HORI_LEFT_TOP ));
pPropMap->Insert( PROP_CHAR_ROTATION, false, uno::makeAny( sal_Int16( 900 ) ));
- OSL_TRACE("Have inserted textDirection %d", nIntValue );
+ SAL_INFO( "writerfilter", "Have inserted textDirection " << nIntValue );
break;
case 4: // lrTbV
pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( HORI_LEFT_TOP ));
diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx
index 8786539..80fba44 100644
--- a/writerfilter/source/filter/RtfFilter.cxx
+++ b/writerfilter/source/filter/RtfFilter.cxx
@@ -54,7 +54,7 @@ RtfFilter::~RtfFilter()
sal_Bool RtfFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescriptor )
throw (uno::RuntimeException)
{
- OSL_TRACE("%s", OSL_THIS_FUNC);
+ SAL_INFO("writerfilter", OSL_THIS_FUNC);
if( m_xSrcDoc.is() )
{
uno::Reference< lang::XMultiServiceFactory > xMSF(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW);
@@ -102,7 +102,7 @@ sal_Bool RtfFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescri
catch (const uno::Exception& e)
{
#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "Exception caught: %s",
+ SAL_INFO("writerfilter", "Exception caught: " <<
rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
#endif
(void)e;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index a378e83..06f0580 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -374,9 +374,9 @@ void RTFDocumentImpl::resolveSubstream(sal_uInt32 nPos, Id nId, OUString& rIgnor
m_aAuthor = OUString();
}
pImpl->seek(nPos);
- OSL_TRACE("substream start");
+ SAL_INFO("writerfilter", "substream start");
Mapper().substream(nId, pImpl);
- OSL_TRACE("substream end");
+ SAL_INFO("writerfilter", "substream end");
Strm().Seek(nCurrent);
nPos = 0;
}
@@ -523,25 +523,25 @@ void RTFDocumentImpl::resolve(Stream & rMapper)
switch (m_pTokenizer->resolveParse())
{
case ERROR_OK:
- OSL_TRACE("%s: finished without errors", OSL_THIS_FUNC);
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": finished without errors");
break;
case ERROR_GROUP_UNDER:
- OSL_TRACE("%s: unmatched '}'", OSL_THIS_FUNC);
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unmatched '}'");
break;
case ERROR_GROUP_OVER:
- OSL_TRACE("%s: unmatched '{'", OSL_THIS_FUNC);
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unmatched '{'");
throw io::UnexpectedEOFException();
break;
case ERROR_EOF:
- OSL_TRACE("%s: unexpected end of file", OSL_THIS_FUNC);
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unexpected end of file");
throw io::UnexpectedEOFException();
break;
case ERROR_HEX_INVALID:
- OSL_TRACE("%s: invalid hex char", OSL_THIS_FUNC);
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": invalid hex char");
throw io::WrongFormatException();
break;
case ERROR_CHAR_OVER:
- OSL_TRACE("%s: characters after last '}'", OSL_THIS_FUNC);
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": characters after last '}'");
break;
}
}
@@ -736,7 +736,7 @@ int RTFDocumentImpl::resolveChars(char ch)
m_aStates.top().aLevelNumbers.push_back(sal_Int32(ch));
return 0;
}
- OSL_TRACE("%s: collected '%s'", OSL_THIS_FUNC, aStr.getStr());
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": collected '" << aStr.getStr() << "'");
OUString aOUStr(OStringToOUString(aStr, m_aStates.top().nCurrentEncoding));
@@ -1227,7 +1227,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
break;
default:
#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE("%s: TODO handle destination '%s'", OSL_THIS_FUNC, lcl_RtfToString(nKeyword));
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle destination '" << lcl_RtfToString(nKeyword) << "'");
#endif
// Make sure we skip destinations (even without \*) till we don't handle them
m_aStates.top().nDestinationState = DESTINATION_SKIP;
@@ -1412,7 +1412,7 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
break;
default:
#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE("%s: TODO handle symbol '%s'", OSL_THIS_FUNC, lcl_RtfToString(nKeyword));
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle symbol '" << lcl_RtfToString(nKeyword) << "'");
#endif
aSkip.setParsed(false);
break;
@@ -1870,7 +1870,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
case RTF_POSXR: m_aStates.top().aFrame.nHoriAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_right; break;
default:
#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE("%s: TODO handle flag '%s'", OSL_THIS_FUNC, lcl_RtfToString(nKeyword));
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle flag '" << lcl_RtfToString(nKeyword) << "'");
#endif
aSkip.setParsed(false);
break;
@@ -2515,7 +2515,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
break;
default:
#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE("%s: TODO handle value '%s'", OSL_THIS_FUNC, lcl_RtfToString(nKeyword));
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle value '" << lcl_RtfToString(nKeyword) << "'");
#endif
aSkip.setParsed(false);
break;
@@ -2614,7 +2614,7 @@ int RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam
break;
default:
#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE("%s: TODO handle toggle '%s'", OSL_THIS_FUNC, lcl_RtfToString(nKeyword));
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle toggle '" << lcl_RtfToString(nKeyword) << "'");
#endif
aSkip.setParsed(false);
break;
@@ -2624,7 +2624,7 @@ int RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam
int RTFDocumentImpl::pushState()
{
- //OSL_TRACE("%s before push: %d", OSL_THIS_FUNC, m_nGroup);
+ //SAL_INFO("writerfilter", OSL_THIS_FUNC << " before push: " << m_nGroup);
checkUnicode();
m_nGroupStartPos = Strm().Tell();
@@ -2703,7 +2703,8 @@ void RTFDocumentImpl::resetAttributes()
int RTFDocumentImpl::popState()
{
- //OSL_TRACE("%s before pop: m_nGroup %d, dest state: %d", OSL_THIS_FUNC, m_nGroup, m_aStates.top().nDestinationState);
+ //SAL_INFO("writerfilter", OSL_THIS_FUNC << " before pop: m_nGroup " << m_nGroup <<
+ // ", dest state: " << m_aStates.top().nDestinationState);
checkUnicode();
RTFSprms aSprms;
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 46664f5..6c7dd78 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -249,7 +249,7 @@ void RTFSdrImport::resolve(RTFShape& rShape)
aSegments[nIndex].Count = sal_Int32(0);
break;
default:
- OSL_TRACE("%s: unhandled segment '%x' in the path", OSL_THIS_FUNC, nSeg);
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unhandled segment '" << hex << nSeg << "' in the path");
break;
}
nIndex++;
@@ -269,9 +269,9 @@ void RTFSdrImport::resolve(RTFShape& rShape)
else if (i->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("geoBottom")))
aViewBox.Height = i->second.toInt32();
else
- OSL_TRACE("%s: TODO handle shape property '%s':'%s'", OSL_THIS_FUNC,
- OUStringToOString( i->first, RTL_TEXTENCODING_UTF8 ).getStr(),
- OUStringToOString( i->second, RTL_TEXTENCODING_UTF8 ).getStr());
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle shape property '" <<
+ OUStringToOString( i->first, RTL_TEXTENCODING_UTF8 ).getStr() << "':'" <<
+ OUStringToOString( i->second, RTL_TEXTENCODING_UTF8 ).getStr() << "'");
}
if (nType == 75) // picture frame
diff --git a/writerfilter/source/rtftok/rtfskipdestination.cxx b/writerfilter/source/rtftok/rtfskipdestination.cxx
index 9ad1d1d..bbc466a 100644
--- a/writerfilter/source/rtftok/rtfskipdestination.cxx
+++ b/writerfilter/source/rtftok/rtfskipdestination.cxx
@@ -43,7 +43,7 @@ RTFSkipDestination::~RTFSkipDestination()
{
if (!m_bParsed)
{
- OSL_TRACE("%s: skipping destination", OSL_THIS_FUNC);
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": skipping destination");
m_rImport.getState().nDestinationState = DESTINATION_SKIP;
}
m_rImport.setSkipUnknown(false);
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx
index 7dedd40..e881ea1 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -56,7 +56,7 @@ SvStream& RTFTokenizer::Strm()
int RTFTokenizer::resolveParse()
{
- OSL_TRACE("%s", OSL_THIS_FUNC);
+ SAL_INFO( "writerfilter", OSL_THIS_FUNC );
char ch;
int ret;
// for hex chars
@@ -64,12 +64,12 @@ int RTFTokenizer::resolveParse()
while ((Strm() >> ch, !Strm().IsEof()))
{
- //OSL_TRACE("%s: parsing character '%c'", OSL_THIS_FUNC, ch);
+ //SAL_INFO("writerfilter", OSL_THIS_FUNC << ": parsing character '" << ch << "'");
if (m_rImport.getGroup() < 0)
return ERROR_GROUP_UNDER;
if (!m_rImport.isEmpty() && m_rImport.getState().nInternalState == INTERNAL_BIN)
{
- OSL_TRACE("%s: TODO, binary internal state", OSL_THIS_FUNC);
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO, binary internal state");
}
else
{
@@ -110,7 +110,7 @@ int RTFTokenizer::resolveParse()
}
else
{
- OSL_TRACE("%s: hex internal state", OSL_THIS_FUNC);
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": hex internal state");
b = b << 4;
sal_Int8 parsed = asHex(ch);
if (parsed == -1)
@@ -226,8 +226,8 @@ int RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nParam)
{
if (m_rImport.getState().nDestinationState == DESTINATION_SKIP)
return 0;
- /*OSL_TRACE("%s: keyword '\\%s' with param? %d param val: '%d'", OSL_THIS_FUNC,
- rKeyword.getStr(), (bParam ? 1 : 0), (bParam ? nParam : 0));*/
+ /*SAL_INFO("writefilter", OSL_THIS_FUNC << ": keyword '\\" << rKeyword.getStr() <<
+ "' with param? " << (bParam ? 1 : 0) <<" param val: '" << (bParam ? nParam : 0) << "'");*/
int i, ret;
for (i = 0; i < nRTFControlWords; i++)
{
@@ -236,7 +236,7 @@ int RTFTokenizer::dispatchKeyword(OString& rKeyword, bool bParam, int nParam)
}
if (i == nRTFControlWords)
{
- OSL_TRACE("%s: unknown keyword '\\%s'", OSL_THIS_FUNC, rKeyword.getStr());
+ SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unknown keyword '\\" << rKeyword.getStr() << "'");
RTFSkipDestination aSkip(m_rImport);
aSkip.setParsed(false);
return 0;
More information about the Libreoffice-commits
mailing list