make writerfilter compile cleanly
This commit is contained in:
parent
423ad850a9
commit
de64ae3b93
14 changed files with 30 additions and 38 deletions
|
@ -29,7 +29,6 @@
|
|||
#ifndef INCLUDED_TAG_LOGGER_HXX
|
||||
#define INCLUDED_TAG_LOGGER_HXX
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <com/sun/star/beans/XPropertySet.hpp>
|
||||
#include <WriterFilterDllApi.hxx>
|
||||
|
@ -84,7 +83,6 @@ namespace writerfilter
|
|||
};
|
||||
}
|
||||
|
||||
#endif // DEBUG
|
||||
#endif // INCLUDED_TAG_LOGGER_HXX
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -28,23 +28,22 @@
|
|||
#ifndef INCLUDED_XPATH_LOGGER_HXX
|
||||
#define INCLUDED_XPATH_LOGGER_HXX
|
||||
|
||||
#include <hash_map>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <WriterFilterDllApi.hxx>
|
||||
|
||||
namespace writerfilter
|
||||
{
|
||||
using ::std::hash_map;
|
||||
using ::std::stack;
|
||||
using ::std::string;
|
||||
using ::std::vector;
|
||||
|
||||
class WRITERFILTER_DLLPUBLIC XPathLogger
|
||||
{
|
||||
typedef hash_map<string, unsigned int> TokenMap_t;
|
||||
typedef boost::unordered_map<string, unsigned int> TokenMap_t;
|
||||
typedef boost::shared_ptr<TokenMap_t> TokenMapPointer_t;
|
||||
|
||||
TokenMapPointer_t mp_tokenMap;
|
||||
|
|
|
@ -38,7 +38,6 @@ namespace dmapper {
|
|||
using namespace ::com::sun::star;
|
||||
using namespace ::writerfilter;
|
||||
|
||||
|
||||
CellMarginHandler::CellMarginHandler() :
|
||||
LoggedProperties(dmapper_logger, "CellMarginHandler"),
|
||||
m_nValue( 0 ),
|
||||
|
|
|
@ -111,28 +111,30 @@ uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues()
|
|||
return m_aValues;
|
||||
}
|
||||
|
||||
void lcl_AnyToTag(XMLTag::Pointer_t pTag, const uno::Any & rAny)
|
||||
#ifdef DEBUG_DMAPPER_PROPERTY_MAP
|
||||
static void lcl_AnyToTag(const uno::Any & rAny)
|
||||
{
|
||||
try {
|
||||
sal_Int32 aInt = 0;
|
||||
rAny >>= aInt;
|
||||
pTag->addAttr("value", aInt);
|
||||
dmapper_logger->attribute("value", aInt);
|
||||
|
||||
sal_uInt32 auInt = 0;
|
||||
rAny >>= auInt;
|
||||
pTag->addAttr("unsignedValue", auInt);
|
||||
dmapper_logger->attribute("unsignedValue", auInt);
|
||||
|
||||
float aFloat = 0.0f;
|
||||
rAny >>= aFloat;
|
||||
pTag->addAttr("floatValue", aFloat);
|
||||
dmapper_logger->attribute("floatValue", aFloat);
|
||||
|
||||
::rtl::OUString aStr;
|
||||
rAny >>= aStr;
|
||||
pTag->addAttr("stringValue", aStr);
|
||||
dmapper_logger->attribute("stringValue", aStr);
|
||||
}
|
||||
catch (...) {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void PropertyMap::Insert( PropertyIds eId, bool bIsTextProperty, const uno::Any& rAny, bool bOverwrite )
|
||||
{
|
||||
|
@ -140,11 +142,10 @@ void PropertyMap::Insert( PropertyIds eId, bool bIsTextProperty, const uno::Any&
|
|||
const ::rtl::OUString& rInsert = PropertyNameSupplier::
|
||||
GetPropertyNameSupplier().GetName(eId);
|
||||
|
||||
XMLTag::Pointer_t pTag(new XMLTag("propertyMap.insert"));
|
||||
pTag->addAttr("name", rInsert);
|
||||
lcl_AnyToTag(pTag, rAny);
|
||||
|
||||
dmapper_logger->addTag(pTag);
|
||||
dmapper_logger->startElement("propertyMap.insert");
|
||||
dmapper_logger->attribute("name", rInsert);
|
||||
lcl_AnyToTag(rAny);
|
||||
dmapper_logger->endElement();
|
||||
#endif
|
||||
|
||||
PropertyMap::iterator aElement = find(PropertyDefinition( eId, bIsTextProperty ) );
|
||||
|
|
|
@ -533,7 +533,6 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case NS_ooxml::LN_CT_DocDefaults_pPrDefault:
|
||||
case NS_ooxml::LN_CT_PPrDefault_pPr:
|
||||
case NS_ooxml::LN_CT_DocDefaults_pPrDefault:
|
||||
m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultParaProps );
|
||||
|
@ -541,7 +540,6 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
|
|||
m_pImpl->m_rDMapper.PopStyleSheetProperties();
|
||||
applyDefaults( true );
|
||||
break;
|
||||
case NS_ooxml::LN_CT_DocDefaults_rPrDefault:
|
||||
case NS_ooxml::LN_CT_RPrDefault_rPr:
|
||||
case NS_ooxml::LN_CT_DocDefaults_rPrDefault:
|
||||
m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultCharProps );
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#ifndef WRAP_POLYGON_HANDLER_HXX
|
||||
#define WRAP_POLYGON_HANDLER_HXX
|
||||
|
||||
#include <deque>
|
||||
#include <com/sun/star/drawing/PointSequenceSequence.hpp>
|
||||
#include <resourcemodel/LoggedResources.hxx>
|
||||
#include <resourcemodel/Fraction.hxx>
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#ifndef INCLUDED_DMAPPER_LOGGERS_HXX
|
||||
#define INCLUDED_DMAPPER_LOGGERS_HXX
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
#include <resourcemodel/TagLogger.hxx>
|
||||
|
||||
namespace writerfilter {
|
||||
|
@ -38,7 +37,6 @@ namespace writerfilter {
|
|||
}
|
||||
}
|
||||
|
||||
#endif // DEBUG
|
||||
#endif // INCLUDED_DMAPPER_LOGGERS_HXX
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -130,7 +130,7 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes
|
|||
oox::StorageRef xVbaPrjStrg( new ::oox::ole::OleStorage( uno::Reference< lang::XMultiServiceFactory >( m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ), pVBAProjectStream->getDocumentStream(), false ) );
|
||||
if( xVbaPrjStrg.get() && xVbaPrjStrg->isStorage() )
|
||||
{
|
||||
::oox::ole::VbaProject aVbaProject( uno::Reference< lang::XMultiServiceFactory >( m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ), xModel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Writer" ) ) );
|
||||
::oox::ole::VbaProject aVbaProject( m_xContext, xModel, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Writer" ) ) );
|
||||
uno::Reference< frame::XFrame > xFrame = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_FRAME(), uno::Reference< frame::XFrame > () );
|
||||
|
||||
// if no XFrame try fallback to what we can glean from the Model
|
||||
|
@ -140,7 +140,7 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes
|
|||
xFrame = xController.is() ? xController->getFrame() : NULL;
|
||||
}
|
||||
|
||||
oox::GraphicHelper gHelper( uno::Reference< lang::XMultiServiceFactory >( m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ), xFrame, xVbaPrjStrg );
|
||||
oox::GraphicHelper gHelper( m_xContext, xFrame, xVbaPrjStrg );
|
||||
aVbaProject.importVbaProject( *xVbaPrjStrg, gHelper );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,6 +178,12 @@ OOXMLFactory_ns::Pointer_t </xsl:text>
|
|||
<xsl:for-each select=".//rng:data[@type='int']">
|
||||
<xsl:text>Integer</xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select=".//rng:data[@type='integer']">
|
||||
<xsl:text>Integer</xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select=".//rng:data[@type='string']">
|
||||
<xsl:text>String</xsl:text>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
|
@ -203,15 +209,6 @@ for a rng:define
|
|||
</xsl:if>
|
||||
<xsl:variable name="resource">
|
||||
<xsl:call-template name="resourceforattribute"/>
|
||||
<xsl:for-each select=".//rng:data[@type='boolean']">
|
||||
<xsl:text>Boolean</xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select=".//rng:data[@type='string']">
|
||||
<xsl:text>String</xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select=".//rng:data[@type='integer']">
|
||||
<xsl:text>Integer</xsl:text>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
|
|
|
@ -48,9 +48,9 @@ void LoggedResourcesHelper::startElement(const string & sElement)
|
|||
mpLogger->startElement(msPrefix + "." + sElement);
|
||||
}
|
||||
|
||||
void LoggedResourcesHelper::endElement(const string & sElement)
|
||||
void LoggedResourcesHelper::endElement(const string & /*sElement*/)
|
||||
{
|
||||
mpLogger->endElement(msPrefix + "." + sElement);
|
||||
mpLogger->endElement();
|
||||
}
|
||||
|
||||
void LoggedResourcesHelper::chars(const ::rtl::OUString & rChars)
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
*
|
||||
************************************************************************/
|
||||
|
||||
#if OSL_DEBUG_LEVEL > 1
|
||||
#include <libxml/xmlstring.h>
|
||||
#include <string.h>
|
||||
#include <resourcemodel/TagLogger.hxx>
|
||||
|
|
|
@ -88,4 +88,6 @@ void XPathLogger::endElement()
|
|||
updateCurrentPath();
|
||||
}
|
||||
|
||||
} // namespace writerfilter
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -73,9 +73,9 @@ SHL1STDLIBS=$(SALLIB)\
|
|||
$(CPPUHELPERLIB) \
|
||||
$(COMPHELPERLIB)
|
||||
|
||||
.IF "$(DBG_LEVEL)">="2"
|
||||
# .IF "$(DBG_LEVEL)">="2"
|
||||
SHL1STDLIBS+= $(LIBXML2LIB)
|
||||
.ENDIF
|
||||
# .ENDIF
|
||||
|
||||
SHL1IMPLIB=i$(SHL1TARGET)
|
||||
SHL1USE_EXPORTS=name
|
||||
|
|
|
@ -62,9 +62,9 @@ SHL1STDLIBS=\
|
|||
$(SALLIB) \
|
||||
$(OOXLIB)
|
||||
|
||||
.IF "$(DBG_LEVEL)">="2"
|
||||
# .IF "$(DBG_LEVEL)">="2"
|
||||
SHL1STDLIBS+= $(LIBXML2LIB)
|
||||
.ENDIF
|
||||
# .ENDIF
|
||||
|
||||
|
||||
SHL1DEPN=
|
||||
|
|
Loading…
Reference in a new issue