Kaydet (Commit) f17eb4c8 authored tarafından Arkadiy Illarionov's avatar Arkadiy Illarionov Kaydeden (comit) Noel Grandin

tdf#96099 Remove *HandlerPtr typedefs in writerfilter

See https://bugs.documentfoundation.org/show_bug.cgi?id=96099#c44

Change-Id: Ib2d828a66bc14faa4f341eec9210e1effdebd7c1
Reviewed-on: https://gerrit.libreoffice.org/56541
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 33af2a8e
......@@ -74,7 +74,6 @@ public:
void enableInteropGrabBag(const OUString& aName);
css::beans::PropertyValue getInteropGrabBag(const OUString& aName = OUString());
};
typedef std::shared_ptr< BorderHandler > BorderHandlerPtr;
}}
#endif
......
......@@ -62,7 +62,6 @@ public:
void disableInteropGrabBag();
bool isInteropGrabBagEnabled();
};
typedef std::shared_ptr< CellColorHandler > CellColorHandlerPtr;
}}
#endif
......
......@@ -20,7 +20,6 @@
#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_CELLMARGINHANDLER_HXX
#include "LoggedResources.hxx"
#include <memory>
#include <vector>
#include <com/sun/star/beans/PropertyValue.hpp>
......@@ -62,7 +61,6 @@ public:
css::beans::PropertyValue getInteropGrabBag();
};
typedef std::shared_ptr< CellMarginHandler > CellMarginHandlerPtr;
}}
#endif
......
......@@ -1326,7 +1326,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
BorderHandlerPtr pBorderHandler( new BorderHandler( true ) );
std::shared_ptr<BorderHandler> pBorderHandler( new BorderHandler( true ) );
pProperties->resolve(*pBorderHandler);
PropertyIds eBorderId = PropertyIds( 0 );
PropertyIds eBorderDistId = PropertyIds( 0 );
......@@ -1378,7 +1378,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
CellColorHandlerPtr pCellColorHandler( new CellColorHandler );
std::shared_ptr<CellColorHandler> pCellColorHandler( new CellColorHandler );
pCellColorHandler->setOutputFormat( CellColorHandler::Paragraph );
bool bEnableTempGrabBag = !pCellColorHandler->isInteropGrabBagEnabled();
if( bEnableTempGrabBag )
......@@ -1750,7 +1750,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
CellColorHandlerPtr pCellColorHandler( new CellColorHandler );
std::shared_ptr<CellColorHandler> pCellColorHandler( new CellColorHandler );
pCellColorHandler->setOutputFormat( CellColorHandler::Character );
pProperties->resolve(*pCellColorHandler);
rContext->InsertProps(pCellColorHandler->getProperties());
......@@ -1854,7 +1854,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
BorderHandlerPtr pBorderHandler( new BorderHandler( true ) );
std::shared_ptr<BorderHandler> pBorderHandler( new BorderHandler( true ) );
pProperties->resolve(*pBorderHandler);
rContext->Insert( PROP_CHAR_TOP_BORDER, uno::makeAny( pBorderHandler->getBorderLine()));
......@@ -2342,7 +2342,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get( ) )
{
OLEHandlerPtr pOLEHandler( new OLEHandler(*this) );
std::shared_ptr<OLEHandler> pOLEHandler( new OLEHandler(*this) );
pProperties->resolve(*pOLEHandler);
if ( pOLEHandler->isOLEObject( ) )
{
......
......@@ -1556,7 +1556,7 @@ void DomainMapper_Impl::appendTextContent(
}
}
void DomainMapper_Impl::appendOLE( const OUString& rStreamName, const OLEHandlerPtr& pOLEHandler )
void DomainMapper_Impl::appendOLE( const OUString& rStreamName, const std::shared_ptr<OLEHandler>& pOLEHandler )
{
try
{
......
......@@ -628,7 +628,7 @@ public:
void finishParagraph( const PropertyMapPtr& pPropertyMap );
void appendTextPortion( const OUString& rString, const PropertyMapPtr& pPropertyMap );
void appendTextContent(const css::uno::Reference<css::text::XTextContent>&, const css::uno::Sequence<css::beans::PropertyValue>&);
void appendOLE( const OUString& rStreamName, const OLEHandlerPtr& pOleHandler );
void appendOLE( const OUString& rStreamName, const std::shared_ptr<OLEHandler>& pOleHandler );
void appendStarMath( const Value& v );
css::uno::Reference<css::beans::XPropertySet> appendTextSectionAfter(css::uno::Reference<css::text::XTextRange> const & xBefore);
......
......@@ -23,8 +23,6 @@
#include "LoggedResources.hxx"
#include <com/sun/star/text/WrapTextMode.hpp>
#include <memory>
#include <map>
#include <utility>
namespace writerfilter {
......@@ -48,7 +46,6 @@ public:
std::pair<OUString, OUString>& m_rPositionOffsets;
std::pair<OUString, OUString>& m_rAligns;
};
typedef std::shared_ptr<PositionHandler> PositionHandlerPtr;
class WrapHandler: public LoggedProperties
{
......
......@@ -1024,7 +1024,7 @@ void GraphicImport::lcl_sprm(Sprm& rSprm)
case NS_ooxml::LN_CT_Anchor_positionH: // 90976;
{
// Use a special handler for the positioning
PositionHandlerPtr pHandler( new PositionHandler( m_pImpl->m_rPositionOffsets, m_pImpl->m_rAligns ));
std::shared_ptr<PositionHandler> pHandler( new PositionHandler( m_pImpl->m_rPositionOffsets, m_pImpl->m_rAligns ));
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get( ) )
{
......@@ -1041,7 +1041,7 @@ void GraphicImport::lcl_sprm(Sprm& rSprm)
case NS_ooxml::LN_CT_Anchor_positionV: // 90977;
{
// Use a special handler for the positioning
PositionHandlerPtr pHandler( new PositionHandler( m_pImpl->m_rPositionOffsets, m_pImpl->m_rAligns));
std::shared_ptr<PositionHandler> pHandler( new PositionHandler( m_pImpl->m_rPositionOffsets, m_pImpl->m_rAligns));
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get( ) )
{
......
......@@ -20,7 +20,6 @@
#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_OLEHANDLER_HXX
#include "LoggedResources.hxx"
#include <memory>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/drawing/XShape.hpp>
......@@ -98,7 +97,6 @@ public:
const css::uno::Reference<css::graphic::XGraphic>& getReplacement() const { return m_xReplacement; }
};
typedef std::shared_ptr< OLEHandler > OLEHandlerPtr;
}}
#endif
......
......@@ -98,7 +98,7 @@ void PageBordersHandler::lcl_sprm( Sprm& rSprm )
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
BorderHandlerPtr pBorderHandler( new BorderHandler( true ) );
std::shared_ptr<BorderHandler> pBorderHandler( new BorderHandler( true ) );
pProperties->resolve(*pBorderHandler);
BorderPosition ePos = BorderPosition( 0 );
switch( rSprm.getId( ) )
......
......@@ -565,7 +565,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get() && m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
{
TblStylePrHandlerPtr pTblStylePrHandler(new TblStylePrHandler(m_pImpl->m_rDMapper));
std::shared_ptr<TblStylePrHandler> pTblStylePrHandler(new TblStylePrHandler(m_pImpl->m_rDMapper));
pProperties->resolve(*pTblStylePrHandler);
StyleSheetEntry* pEntry = m_pImpl->m_pCurrentEntry.get();
TableStyleSheetEntry& rTableEntry = dynamic_cast<TableStyleSheetEntry&>(*pEntry);
......@@ -639,7 +639,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
TblStylePrHandlerPtr pTblStylePrHandler( new TblStylePrHandler( m_pImpl->m_rDMapper ) );
std::shared_ptr<TblStylePrHandler> pTblStylePrHandler( new TblStylePrHandler( m_pImpl->m_rDMapper ) );
pProperties->resolve( *pTblStylePrHandler );
// Add the properties to the table style
......@@ -697,7 +697,7 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
BorderHandlerPtr pBorderHandler( new BorderHandler(m_pImpl->m_rDMapper.IsOOXMLImport()) );
std::shared_ptr<BorderHandler> pBorderHandler( new BorderHandler(m_pImpl->m_rDMapper.IsOOXMLImport()) );
pProperties->resolve(*pBorderHandler);
m_pImpl->m_pCurrentEntry->pProperties->InsertProps(
pBorderHandler->getProperties());
......
......@@ -117,7 +117,7 @@ namespace dmapper {
nToken = XML_tableRowDelete;
break;
};
TrackChangesHandlerPtr pTrackChangesHandler( new TrackChangesHandler( nToken ) );
std::shared_ptr<TrackChangesHandler> pTrackChangesHandler( new TrackChangesHandler( nToken ) );
pProperties->resolve(*pTrackChangesHandler);
TablePropertyMapPtr pPropMap( new TablePropertyMap );
......@@ -148,7 +148,7 @@ namespace dmapper {
throw lang::IllegalArgumentException("illegal redline token type", nullptr, 0);
break;
};
TrackChangesHandlerPtr pTrackChangesHandler( new TrackChangesHandler( nToken ) );
std::shared_ptr<TrackChangesHandler> pTrackChangesHandler( new TrackChangesHandler( nToken ) );
pProperties->resolve(*pTrackChangesHandler);
TablePropertyMapPtr pPropMap( new TablePropertyMap );
......@@ -206,7 +206,7 @@ namespace dmapper {
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
BorderHandlerPtr pBorderHandler(new BorderHandler(true));
std::shared_ptr<BorderHandler> pBorderHandler(new BorderHandler(true));
if (m_pCurrentInteropGrabBag)
pBorderHandler->enableInteropGrabBag("tblBorders");
pProperties->resolve(*pBorderHandler);
......@@ -254,7 +254,7 @@ namespace dmapper {
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if (pProperties.get())
{
CellMarginHandlerPtr pCellMarginHandler(new CellMarginHandler);
std::shared_ptr<CellMarginHandler> pCellMarginHandler(new CellMarginHandler);
if (m_pCurrentInteropGrabBag)
pCellMarginHandler->enableInteropGrabBag("tcMar");
pProperties->resolve(*pCellMarginHandler);
......@@ -278,7 +278,7 @@ namespace dmapper {
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
CellColorHandlerPtr pCellColorHandler( new CellColorHandler);
std::shared_ptr<CellColorHandler> pCellColorHandler( new CellColorHandler);
pProperties->resolve( *pCellColorHandler );
TablePropertyMapPtr pTablePropMap( new TablePropertyMap );
insertTableProps( pCellColorHandler->getProperties() );
......@@ -292,7 +292,7 @@ namespace dmapper {
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
CellColorHandlerPtr pCellColorHandler( new CellColorHandler );
std::shared_ptr<CellColorHandler> pCellColorHandler( new CellColorHandler );
pCellColorHandler->enableInteropGrabBag("shd"); //enable to store shd unsupported props in grab bag
pProperties->resolve( *pCellColorHandler );
TablePropertyMapPtr pPropertyMap = pCellColorHandler->getProperties();
......@@ -312,7 +312,7 @@ namespace dmapper {
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if( pProperties.get())
{
CellMarginHandlerPtr pCellMarginHandler( new CellMarginHandler );
std::shared_ptr<CellMarginHandler> pCellMarginHandler( new CellMarginHandler );
if (m_pCurrentInteropGrabBag)
pCellMarginHandler->enableInteropGrabBag("tblCellMar");
pProperties->resolve( *pCellMarginHandler );
......
......@@ -79,8 +79,6 @@ private:
void resolveSprmProps(Sprm & rSprm);
};
typedef std::shared_ptr< TblStylePrHandler > TblStylePrHandlerPtr;
}}
#endif
......
......@@ -10,7 +10,6 @@
#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_TRACKCHANGESHANDLER_HXX
#include "LoggedResources.hxx"
#include <memory>
#include <com/sun/star/beans/PropertyValue.hpp>
#include "DomainMapper_Impl.hxx"
......@@ -38,7 +37,6 @@ public:
/// Compute the UNO properties for the track changes object based on the received tokens.
css::uno::Sequence<css::beans::PropertyValue> getRedlineProperties() const;
};
typedef std::shared_ptr<TrackChangesHandler> TrackChangesHandlerPtr;
}}
#endif
......
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