Kaydet (Commit) d526091e authored tarafından Fridrich Štrba's avatar Fridrich Štrba

WRITER_DEBUG_MSG -> SAL_[INFO/WARN]

Change-Id: I8bdcc273b50e35dbbb0e34183a465e370cc5b22c
üst d5d7d18d
......@@ -17,7 +17,7 @@ gb_AllLangHelp_TRANLATIONSDIR := $(SRCDIR)/translations
# Creates and delivers all language versions of a module.
gb_AllLangHelp_LANGS := en-US $(filter-out en-US,$(gb_WITH_LANG))
gb_AllLangHelp_LANGS := en-US $(filter-out en-US $(WITH_POOR_HELP_LOCALIZATIONS),$(gb_WITH_LANG))
define gb_AllLangHelp__translation_exists
$(or \
......
......@@ -7,7 +7,6 @@
* For further information visit http://libwpd.sourceforge.net
*/
#include "DocumentHandler.hxx"
#include "WriterPerfectDebug.hxx"
#include <string.h>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
......
......@@ -8,7 +8,6 @@
*/
#include "WPXSvStream.hxx"
#include "WriterPerfectDebug.hxx"
#include <tools/stream.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/ucbstreamhelper.hxx>
......@@ -85,7 +84,7 @@ WPXSvInputStreamImpl::WPXSvInputStreamImpl( Reference< XInputStream > xStream )
}
catch ( ... )
{
WRITER_DEBUG_MSG(("mnLength = mxSeekable->getLength() threw exception\n"));
SAL_WARN("writerperfect", "mnLength = mxSeekable->getLength() threw exception");
mnLength = 0;
}
}
......@@ -161,7 +160,7 @@ int WPXSvInputStreamImpl::seek(long offset, WPX_SEEK_TYPE seekType)
}
catch (...)
{
WRITER_DEBUG_MSG(("mxSeekable->seek(offset) threw exception\n"));
SAL_WARN("writerperfect", "mxSeekable->seek(offset) threw exception");
return -1;
}
}
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* WriterPerfectDebug: Debugging information
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* For further information visit http://libwpd.sourceforge.net
*/
#ifndef __FILTERINTERNAL_HXX__
#define __FILTERINTERNAL_HXX__
#include <string.h> // for strcmp
#ifdef DEBUG
#include <stdio.h>
#define WRITER_DEBUG_MSG(M) printf M
#else
#define WRITER_DEBUG_MSG(M)
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -30,7 +30,6 @@
#include "common/DocumentHandler.hxx"
#include "common/WPXSvStream.hxx"
#include "common/WriterPerfectDebug.hxx"
#include "MSWorksImportFilter.hxx"
#include <iostream>
......@@ -59,7 +58,7 @@ using com::sun::star::xml::sax::XParser;
sal_Bool SAL_CALL MSWorksImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
throw (RuntimeException)
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::importImpl: Got here!\n"));
SAL_INFO("writerperfect", "MSWorksImportFilter::importImpl");
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
......@@ -98,20 +97,20 @@ throw (RuntimeException)
sal_Bool SAL_CALL MSWorksImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
throw (RuntimeException)
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::filter: Got here!\n"));
SAL_INFO("writerperfect", "MSWorksImportFilter::filter");
return importImpl ( aDescriptor );
}
void SAL_CALL MSWorksImportFilter::cancel( )
throw (RuntimeException)
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::cancel: Got here!\n"));
SAL_INFO("writerperfect", "MSWorksImportFilter::cancel");
}
// XImporter
void SAL_CALL MSWorksImportFilter::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::getTargetDocument: Got here!\n"));
SAL_INFO("writerperfect", "MSWorksImportFilter::getTargetDocument");
mxDoc = xDoc;
}
......@@ -119,7 +118,7 @@ throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
OUString SAL_CALL MSWorksImportFilter::detect( com::sun::star::uno::Sequence< PropertyValue >& Descriptor )
throw( com::sun::star::uno::RuntimeException )
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::detect: Got here!\n"));
SAL_INFO("writerperfect", "MSWorksImportFilter::detect");
WPSConfidence confidence = WPS_CONFIDENCE_NONE;
OUString sTypeName;
......@@ -164,7 +163,7 @@ throw( com::sun::star::uno::RuntimeException )
void SAL_CALL MSWorksImportFilter::initialize( const Sequence< Any >& aArguments )
throw (Exception, RuntimeException)
{
WRITER_DEBUG_MSG(("MSWorksImportFilter::initialize: Got here!\n"));
SAL_INFO("writerperfect", "MSWorksImportFilter::initialize");
Sequence < PropertyValue > aAnySeq;
sal_Int32 nLength = aArguments.getLength();
if ( nLength && ( aArguments[0] >>= aAnySeq ) )
......
......@@ -29,7 +29,6 @@
#include "common/DocumentHandler.hxx"
#include "common/WPXSvStream.hxx"
#include "common/WriterPerfectDebug.hxx"
#include "MWAWImportFilter.hxx"
#include <iostream>
......@@ -83,7 +82,7 @@ static double getSizeInPt(WPXProperty const &prop)
else if (c == 'n') ;
else if (c == '%')
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::getSizeInPoint: called with a percent property\n"));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::getSizeInPoint: called with a percent property");
}
return res *= 72.;
}
......@@ -271,7 +270,7 @@ bool MWAWObjectHandlerInternal::Shape::read(const char *psName, WPXPropertyList
}
if (!readOk)
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Shape::read: find an unknown key '%s'\n",i.key()));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Shape::read: find an unknown key '" << i.key() << "'");
}
}
}
......@@ -297,7 +296,7 @@ bool MWAWObjectHandlerInternal::Shape::drawLine(OdfDocumentHandler *output) cons
{
if (m_x.size() < 2 || m_y.size() < 2)
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Shape::drawLine: PB\n"));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Shape::drawLine: PB");
return false;
}
......@@ -318,7 +317,7 @@ bool MWAWObjectHandlerInternal::Shape::drawRectangle(OdfDocumentHandler *output)
{
if (m_x.size() < 1 || m_y.size() < 1)
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Shape::drawRectangle: PB\n"));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Shape::drawRectangle: PB");
return false;
}
......@@ -335,7 +334,7 @@ bool MWAWObjectHandlerInternal::Shape::drawRectangle(OdfDocumentHandler *output)
{
if (m_rw > 0.0 || m_rh > 0.0)
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Shape::drawRectangle:: can only create a rectangle\n"));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Shape::drawRectangle:: can only create a rectangle");
}
output->startElement("draw:rect", list);
output->endElement("draw:rect");
......@@ -389,7 +388,7 @@ bool MWAWObjectHandlerInternal::Shape::drawCircle(OdfDocumentHandler *output) co
{
if (m_x.size() < 1 || m_y.size() < 1)
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Shape::drawCircle: PB\n"));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Shape::drawCircle: PB");
return false;
}
......@@ -418,12 +417,12 @@ bool MWAWObjectHandlerInternal::Shape::drawArc(OdfDocumentHandler *output) const
{
if (m_angle.size() < 2)
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Shape::drawArc: angle are filled, call draw Circle\n"));
SAL_INFO("writerperfect", "MWAWObjectHandlerInternal::Shape::drawArc: angle are filled, call draw Circle");
return drawCircle(output);
}
if (m_x.size() < 1 || m_y.size() < 1)
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Shape::drawArc: PB\n"));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Shape::drawArc: PB");
return false;
}
......@@ -469,7 +468,7 @@ bool MWAWObjectHandlerInternal::Shape::drawPolygon(OdfDocumentHandler *output, b
{
if (m_x.size() < 1 || m_y.size() != m_x.size())
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Shape::drawPolygon: PB\n"));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Shape::drawPolygon: PB");
return false;
}
std::stringstream s;
......@@ -513,7 +512,7 @@ bool MWAWObjectHandlerInternal::Shape::drawPath(OdfDocumentHandler *output) cons
{
if (m_path.length()==0 || m_w <= 0 || m_h <= 0)
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Shape::drawPath: PB\n"));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Shape::drawPath: PB");
return false;
}
......@@ -542,7 +541,7 @@ bool MWAWObjectHandlerInternal::Document::open(const char *psName, WPXPropertyLi
psName += 8;
else
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Document::open Unknown tag '%s'..\n", psName));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Document::open Unknown tag '" << psName << "'.." );
return false;
}
if (strcmp(psName, "document") == 0)
......@@ -555,7 +554,7 @@ bool MWAWObjectHandlerInternal::Document::open(const char *psName, WPXPropertyLi
else if (strcmp(i.key(), "h") == 0) m_h = getSizeInPt(*i());
else
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Document::open: find an unknown key '%s'\n",i.key()));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Document::open: find an unknown key '" << i.key() << "'");
}
}
return true;
......@@ -573,14 +572,14 @@ bool MWAWObjectHandlerInternal::Document::open(const char *psName, WPXPropertyLi
{
if (id == 0)
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Document::open shape created without style..\n"));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Document::open shape created without style..");
styles.push_back(WPXPropertyList());
}
shapes.push_back(shape);
return true;
}
}
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Document::open Unknown tag '%s'..\n", psName));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Document::open Unknown tag '" << psName << "'..");
return false;
}
......@@ -591,7 +590,7 @@ bool MWAWObjectHandlerInternal::Document::close(const char *)
void MWAWObjectHandlerInternal::Document::characters(WPXString const &)
{
WRITER_DEBUG_MSG(("Document::characters must NOT be called..\n"));
SAL_WARN("writerperfect", "Document::characters must NOT be called..");
}
void MWAWObjectHandlerInternal::Document::write(OdfDocumentHandler *output)
......@@ -817,7 +816,7 @@ void MWAWObjectHandlerInternal::Document::writeStyle (OdfDocumentHandler *output
list.insert("draw:marker-end-width", getStringSizeInPt(*i()).c_str());
else
{
WRITER_DEBUG_MSG(("MWAWObjectHandlerInternal::Document::writeStyle: find an unknown key '%s'\n",i.key()));
SAL_WARN("writerperfect", "MWAWObjectHandlerInternal::Document::writeStyle: find an unknown key '" << i.key() << "'");
}
}
......@@ -831,7 +830,7 @@ void MWAWObjectHandlerInternal::Document::writeStyle (OdfDocumentHandler *output
sal_Bool SAL_CALL MWAWImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor )
throw (RuntimeException)
{
WRITER_DEBUG_MSG(("MWAWImportFilter::importImpl: Got here!\n"));
SAL_INFO("writerperfect", "MWAWImportFilter::importImpl");
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
......@@ -871,20 +870,20 @@ throw (RuntimeException)
sal_Bool SAL_CALL MWAWImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue > &aDescriptor )
throw (RuntimeException)
{
WRITER_DEBUG_MSG(("MWAWImportFilter::filter: Got here!\n"));
SAL_INFO("writerperfect", "MWAWImportFilter::filter");
return importImpl ( aDescriptor );
}
void SAL_CALL MWAWImportFilter::cancel( )
throw (RuntimeException)
{
WRITER_DEBUG_MSG(("MWAWImportFilter::cancel: Got here!\n"));
SAL_INFO("writerperfect", "MWAWImportFilter::cancel");
}
// XImporter
void SAL_CALL MWAWImportFilter::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent > &xDoc )
throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
WRITER_DEBUG_MSG(("MWAWImportFilter::getTargetDocument: Got here!\n"));
SAL_INFO("writerperfect", "MWAWImportFilter::getTargetDocument");
mxDoc = xDoc;
}
......@@ -892,7 +891,7 @@ throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
OUString SAL_CALL MWAWImportFilter::detect( com::sun::star::uno::Sequence< PropertyValue > &Descriptor )
throw( com::sun::star::uno::RuntimeException )
{
WRITER_DEBUG_MSG(("MWAWImportFilter::detect: Got here!\n"));
SAL_INFO("writerperfect", "MWAWImportFilter::detect");
MWAWConfidence confidence = MWAW_CONFIDENCE_NONE;
MWAWDocument::DocumentType docType = MWAWDocument::UNKNOWN;
......@@ -1007,7 +1006,7 @@ throw( com::sun::star::uno::RuntimeException )
void SAL_CALL MWAWImportFilter::initialize( const Sequence< Any > &aArguments )
throw (Exception, RuntimeException)
{
WRITER_DEBUG_MSG(("MWAWImportFilter::initialize: Got here!\n"));
SAL_INFO("writerperfect", "MWAWImportFilter::initialize");
Sequence < PropertyValue > aAnySeq;
sal_Int32 nLength = aArguments.getLength();
if ( nLength && ( aArguments[0] >>= aAnySeq ) )
......
......@@ -30,7 +30,6 @@
#include "common/DocumentHandler.hxx"
#include "common/WPXSvStream.hxx"
#include "common/WriterPerfectDebug.hxx"
#include "WordPerfectImportFilter.hxx"
using ::ucbhelper::Content;
......@@ -86,7 +85,7 @@ static bool handleEmbeddedWPGImage(const WPXBinaryData &input, WPXBinaryData &ou
sal_Bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
throw (RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::importImpl: Got here!\n"));
SAL_INFO("writerperfect", "WordPerfectImportFilter::importImpl");
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue *pValue = aDescriptor.getConstArray();
......@@ -151,20 +150,20 @@ throw (RuntimeException)
sal_Bool SAL_CALL WordPerfectImportFilter::filter( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor )
throw (RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::filter: Got here!\n"));
SAL_INFO("writerperfect", "WordPerfectImportFilter::filter");
return importImpl ( aDescriptor );
}
void SAL_CALL WordPerfectImportFilter::cancel( )
throw (RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::cancel: Got here!\n"));
SAL_INFO("writerperfect", "WordPerfectImportFilter::cancel");
}
// XImporter
void SAL_CALL WordPerfectImportFilter::setTargetDocument( const Reference< ::com::sun::star::lang::XComponent >& xDoc )
throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::getTargetDocument: Got here!\n"));
SAL_INFO("writerperfect", "WordPerfectImportFilter::getTargetDocument");
mxDoc = xDoc;
}
......@@ -172,7 +171,7 @@ throw (::com::sun::star::lang::IllegalArgumentException, RuntimeException)
OUString SAL_CALL WordPerfectImportFilter::detect( Sequence< PropertyValue >& Descriptor )
throw( RuntimeException )
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::detect: Got here!\n"));
SAL_INFO("writerperfect", "WordPerfectImportFilter::detect");
WPDConfidence confidence = WPD_CONFIDENCE_NONE;
OUString sTypeName;
......@@ -217,7 +216,7 @@ throw( RuntimeException )
void SAL_CALL WordPerfectImportFilter::initialize( const Sequence< Any >& aArguments )
throw (Exception, RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::initialize: Got here!\n"));
SAL_INFO("writerperfect", "WordPerfectImportFilter::initialize");
Sequence < PropertyValue > aAnySeq;
sal_Int32 nLength = aArguments.getLength();
if ( nLength && ( aArguments[0] >>= aAnySeq ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment