expand out SwRead typedef

not adding any value

Change-Id: I8e7bc1150b4bf7e9431e522be3807007a52f65c4
Reviewed-on: https://gerrit.libreoffice.org/68667
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2019-03-04 10:40:24 +02:00
parent e457b1de6b
commit ba676e500f
5 changed files with 11 additions and 13 deletions

View File

@@ -102,8 +102,6 @@ public:
// Base class of possible options for a special reader. // Base class of possible options for a special reader.
class Reader; class Reader;
// SwRead is pointer to the read-options base class.
typedef Reader *SwRead;
class SwgReaderOption class SwgReaderOption
{ {
@@ -356,9 +354,9 @@ public:
// BEGIN source/filter/basflt/fltini.cxx // BEGIN source/filter/basflt/fltini.cxx
extern SwRead ReadAscii, /*ReadSwg, ReadSw3, */ReadHTML, ReadXML; extern Reader *ReadAscii, *ReadHTML, *ReadXML;
SW_DLLPUBLIC SwRead SwGetReaderXML(); SW_DLLPUBLIC Reader* SwGetReaderXML();
// END source/filter/basflt/fltini.cxx // END source/filter/basflt/fltini.cxx

View File

@@ -62,7 +62,7 @@ using namespace utl;
using namespace com::sun::star::uno; using namespace com::sun::star::uno;
using namespace com::sun::star; using namespace com::sun::star;
SwRead ReadAscii = nullptr, ReadHTML = nullptr, ReadXML = nullptr; Reader *ReadAscii = nullptr, *ReadHTML = nullptr, *ReadXML = nullptr;
static Reader* GetRTFReader(); static Reader* GetRTFReader();
static Reader* GetWW8Reader(); static Reader* GetWW8Reader();
@@ -105,12 +105,12 @@ void SwReaderWriterEntry::GetWriter( const OUString& rNm, const OUString& rBaseU
xWrt = WriterRef(nullptr); xWrt = WriterRef(nullptr);
} }
SwRead SwGetReaderXML() // SW_DLLPUBLIC Reader* SwGetReaderXML() // SW_DLLPUBLIC
{ {
return ReadXML; return ReadXML;
} }
static void SetFltPtr( sal_uInt16 rPos, SwRead pReader ) static void SetFltPtr( sal_uInt16 rPos, Reader* pReader )
{ {
aReaderWriter[ rPos ].pReader = pReader; aReaderWriter[ rPos ].pReader = pReader;
} }
@@ -184,9 +184,9 @@ void GetWriter( const OUString& rFltName, const OUString& rBaseURL, WriterRef& x
} }
} }
SwRead GetReader( const OUString& rFltName ) Reader* GetReader( const OUString& rFltName )
{ {
SwRead pRead = nullptr; Reader* pRead = nullptr;
for( int n = 0; n < MAXFILTER; ++n ) for( int n = 0; n < MAXFILTER; ++n )
{ {
if ( aFilterDetect[n].IsFilter( rFltName ) ) if ( aFilterDetect[n].IsFilter( rFltName ) )

View File

@@ -187,7 +187,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReaderPtr& rpRdr,
return nullptr; return nullptr;
} }
OUString aFileName( rMedium.GetName() ); OUString aFileName( rMedium.GetName() );
SwRead pRead = SwReaderWriter::GetReader( pFlt->GetUserData() ); Reader* pRead = SwReaderWriter::GetReader( pFlt->GetUserData() );
if( !pRead ) if( !pRead )
return nullptr; return nullptr;
@@ -232,7 +232,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReaderPtr& rpRdr,
bool SwDocShell::ConvertFrom( SfxMedium& rMedium ) bool SwDocShell::ConvertFrom( SfxMedium& rMedium )
{ {
SwReaderPtr pRdr; SwReaderPtr pRdr;
SwRead pRead = StartConvertFrom(rMedium, pRdr); Reader* pRead = StartConvertFrom(rMedium, pRdr);
if (!pRead) if (!pRead)
return false; // #129881# return if no reader is found return false; // #129881# return if no reader is found
tools::SvRef<SotStorage> pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls tools::SvRef<SotStorage> pStg=pRead->getSotStorageRef(); // #i45333# save sot storage ref in case of recursive calls

View File

@@ -1614,7 +1614,7 @@ ErrCode SwDocShell::LoadStylesFromFile( const OUString& rURL,
} }
if ( bImport ) if ( bImport )
{ {
SwRead pRead = ReadXML; Reader* pRead = ReadXML;
SwReaderPtr pReader; SwReaderPtr pReader;
std::unique_ptr<SwPaM> pPam; std::unique_ptr<SwPaM> pPam;
// the SW3IO - Reader need the pam/wrtshell, because only then he // the SW3IO - Reader need the pam/wrtshell, because only then he

View File

@@ -1785,7 +1785,7 @@ bool SwTransferable::PasteFileContent( TransferableDataHelper& rData,
tools::SvRef<SotStorageStream> xStrm; tools::SvRef<SotStorageStream> xStrm;
SvStream* pStream = nullptr; SvStream* pStream = nullptr;
SwRead pRead = nullptr; Reader* pRead = nullptr;
OUString sData; OUString sData;
switch( nFormat ) switch( nFormat )
{ {