loplugin:nullptr (automatic rewrite)
Change-Id: I8aec30601862feaeb99e3ce01adf61665688fa9a
This commit is contained in:
parent
92c697c0e3
commit
d930b6c2e6
@ -81,7 +81,7 @@ class ConfigurationAccess
|
||||
public:
|
||||
|
||||
ConfigurationAccess( const css::uno::Reference< css::uno::XComponentContext >& rXFactory,
|
||||
OptimizerSettings* pDefaultSettings = NULL );
|
||||
OptimizerSettings* pDefaultSettings = nullptr );
|
||||
~ConfigurationAccess();
|
||||
void SaveConfiguration();
|
||||
|
||||
|
@ -314,7 +314,7 @@ void InformationDialog::InitDialog()
|
||||
|
||||
InformationDialog::InformationDialog( const Reference< XComponentContext > &rxContext, Reference< XFrame >& rxFrame, const OUString& rSaveAsURL, bool& rbOpenNewDocument, const sal_Int64& rSourceSize, const sal_Int64& rDestSize, const sal_Int64& rApproxSize ) :
|
||||
UnoDialog( rxContext, rxFrame ),
|
||||
ConfigurationAccess( rxContext, NULL ),
|
||||
ConfigurationAccess( rxContext, nullptr ),
|
||||
mxFrame( rxFrame ),
|
||||
mxActionListener( new OKActionListener( *this ) ),
|
||||
mnSourceSize( rSourceSize ),
|
||||
|
@ -49,7 +49,7 @@ void OptimizationStats::SetStatusValue( const PPPOptimizerTokenEnum eStat, const
|
||||
const uno::Any* OptimizationStats::GetStatusValue( const PPPOptimizerTokenEnum eStat ) const
|
||||
{
|
||||
std::map< PPPOptimizerTokenEnum, uno::Any, Compare >::const_iterator aIter( maStats.find( eStat ) );
|
||||
return aIter != maStats.end() ? &((*aIter).second) : NULL;
|
||||
return aIter != maStats.end() ? &((*aIter).second) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -207,7 +207,7 @@ void OptimizerDialog::UpdateConfiguration()
|
||||
|
||||
OptimizerDialog::OptimizerDialog( const Reference< XComponentContext > &rxContext, Reference< XFrame >& rxFrame, Reference< XDispatch > rxStatusDispatcher ) :
|
||||
UnoDialog( rxContext, rxFrame ),
|
||||
ConfigurationAccess( rxContext, NULL ),
|
||||
ConfigurationAccess( rxContext, nullptr ),
|
||||
mnCurrentStep( 0 ),
|
||||
mnTabIndex( 0 ),
|
||||
mxFrame( rxFrame ),
|
||||
|
@ -33,7 +33,7 @@ using namespace ::com::sun::star::beans;
|
||||
|
||||
PPPOptimizerDialog::PPPOptimizerDialog( const Reference< XComponentContext > &xContext ) :
|
||||
mxContext( xContext ),
|
||||
mpOptimizerDialog( NULL )
|
||||
mpOptimizerDialog( nullptr )
|
||||
{
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
|
||||
OUString sResult( sBuf.makeStringAndClear() );
|
||||
SAL_INFO("sdext.minimizer", sResult );
|
||||
}
|
||||
delete mpOptimizerDialog, mpOptimizerDialog = NULL;
|
||||
delete mpOptimizerDialog, mpOptimizerDialog = nullptr;
|
||||
}
|
||||
catch( ... )
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <unordered_map>
|
||||
|
||||
typedef std::unordered_map< const char*, PPPOptimizerTokenEnum, rtl::CStringHash, rtl::CStringEqual> TypeNameHashMap;
|
||||
static TypeNameHashMap* pHashMap = NULL;
|
||||
static TypeNameHashMap* pHashMap = nullptr;
|
||||
static ::osl::Mutex& getHashMapMutex()
|
||||
{
|
||||
static osl::Mutex s_aHashMapProtection;
|
||||
|
@ -35,7 +35,7 @@ extern "C"
|
||||
SAL_UNUSED_PARAMETER void * /*pRegistryKey*/ )
|
||||
{
|
||||
OUString aImplName( OUString::createFromAscii( pImplName ) );
|
||||
void* pRet = 0;
|
||||
void* pRet = nullptr;
|
||||
|
||||
if( pServiceManager )
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ FileEmitContext::FileEmitContext( const OUString& rOr
|
||||
const uno::Reference< uno::XComponentContext >& xContext,
|
||||
const pdfparse::PDFContainer* pTop ) :
|
||||
pdfparse::EmitContext( pTop ),
|
||||
m_aReadHandle(NULL),
|
||||
m_aReadHandle(nullptr),
|
||||
m_nReadLen(0),
|
||||
m_xContextStream(),
|
||||
m_xSeek(),
|
||||
@ -100,7 +100,7 @@ FileEmitContext::FileEmitContext( const OUString& rOr
|
||||
if( aErr != osl_File_E_None )
|
||||
{
|
||||
osl_closeFile( m_aReadHandle );
|
||||
m_aReadHandle = NULL;
|
||||
m_aReadHandle = nullptr;
|
||||
}
|
||||
}
|
||||
m_bDeflate = true;
|
||||
@ -228,7 +228,7 @@ OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue >& rF
|
||||
}
|
||||
if( xInput.is() )
|
||||
{
|
||||
oslFileHandle aFile = NULL;
|
||||
oslFileHandle aFile = nullptr;
|
||||
try {
|
||||
uno::Reference< io::XSeekable > xSeek( xInput, uno::UNO_QUERY );
|
||||
if( xSeek.is() )
|
||||
@ -261,7 +261,7 @@ OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue >& rF
|
||||
)
|
||||
{
|
||||
sal_uInt64 nWritten = 0;
|
||||
if( osl_createTempFile( NULL, &aFile, &aURL.pData ) != osl_File_E_None )
|
||||
if( osl_createTempFile( nullptr, &aFile, &aURL.pData ) != osl_File_E_None )
|
||||
{
|
||||
bSuccess = false;
|
||||
}
|
||||
@ -448,7 +448,7 @@ bool checkDocChecksum( const OUString& rInPDFFileURL,
|
||||
sal_uInt8 nActualChecksum[ RTL_DIGEST_LENGTH_MD5 ];
|
||||
memset( nActualChecksum, 0, sizeof(nActualChecksum) );
|
||||
rtlDigest aActualDigest = rtl_digest_createMD5();
|
||||
oslFileHandle aRead = NULL;
|
||||
oslFileHandle aRead = nullptr;
|
||||
oslFileError aErr = osl_File_E_None;
|
||||
if( (aErr = osl_openFile(rInPDFFileURL.pData,
|
||||
&aRead,
|
||||
@ -527,7 +527,7 @@ uno::Reference< io::XStream > getAdditionalStream( const OUString&
|
||||
continue;
|
||||
}
|
||||
pdfparse::PDFName* pChkSumName = dynamic_cast<pdfparse::PDFName*>(chk->second);
|
||||
if( pChkSumName == NULL )
|
||||
if( pChkSumName == nullptr )
|
||||
{
|
||||
OSL_TRACE( "no name for DocChecksum entry" );
|
||||
continue;
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
virtual bool copyOrigBytes( unsigned int nOrigOffset, unsigned int nLen ) = 0;
|
||||
virtual unsigned int readOrigBytes( unsigned int nOrigOffset, unsigned int nLen, void* pBuf ) = 0;
|
||||
|
||||
explicit EmitContext( const PDFContainer* pTop = NULL );
|
||||
explicit EmitContext( const PDFContainer* pTop = nullptr );
|
||||
virtual ~EmitContext();
|
||||
|
||||
// set this to deflate contained streams
|
||||
@ -210,14 +210,14 @@ struct PDFStream : public PDFEntry
|
||||
virtual bool emit( EmitContext& rWriteContext ) const override;
|
||||
virtual PDFEntry* clone() const override;
|
||||
|
||||
unsigned int getDictLength( const PDFContainer* pObjectContainer = NULL ) const; // get contents of the "Length" entry of the dict
|
||||
unsigned int getDictLength( const PDFContainer* pObjectContainer = nullptr ) const; // get contents of the "Length" entry of the dict
|
||||
};
|
||||
|
||||
struct PDFTrailer : public PDFContainer
|
||||
{
|
||||
PDFDict* m_pDict;
|
||||
|
||||
PDFTrailer() : PDFContainer(), m_pDict( NULL ) {}
|
||||
PDFTrailer() : PDFContainer(), m_pDict( nullptr ) {}
|
||||
virtual ~PDFTrailer();
|
||||
virtual bool emit( EmitContext& rWriteContext ) const override;
|
||||
virtual PDFEntry* clone() const override;
|
||||
@ -235,7 +235,7 @@ public:
|
||||
|
||||
PDFFile()
|
||||
: PDFContainer(),
|
||||
m_pData( NULL ),
|
||||
m_pData( nullptr ),
|
||||
m_nMajor( 0 ), m_nMinor( 0 )
|
||||
{}
|
||||
virtual ~PDFFile();
|
||||
@ -267,7 +267,7 @@ struct PDFObject : public PDFContainer
|
||||
unsigned int m_nGeneration;
|
||||
|
||||
PDFObject( unsigned int nNr, unsigned int nGen )
|
||||
: m_pObject( NULL ), m_pStream( NULL ), m_nNumber( nNr ), m_nGeneration( nGen ) {}
|
||||
: m_pObject( nullptr ), m_pStream( nullptr ), m_nNumber( nNr ), m_nGeneration( nGen ) {}
|
||||
virtual ~PDFObject();
|
||||
virtual bool emit( EmitContext& rWriteContext ) const override;
|
||||
virtual PDFEntry* clone() const override;
|
||||
|
@ -99,10 +99,10 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert
|
||||
uno::Reference< io::XSeekable > xSeek( xInput, uno::UNO_QUERY );
|
||||
if( xSeek.is() )
|
||||
xSeek->seek( 0 );
|
||||
oslFileHandle aFile = NULL;
|
||||
oslFileHandle aFile = nullptr;
|
||||
sal_uInt64 nWritten = 0;
|
||||
OUString aURL;
|
||||
if( osl_createTempFile( NULL, &aFile, &aURL.pData ) == osl_File_E_None )
|
||||
if( osl_createTempFile( nullptr, &aFile, &aURL.pData ) == osl_File_E_None )
|
||||
{
|
||||
SAL_INFO("sdext.pdfimport", "created temp file " << aURL);
|
||||
const sal_Int32 nBufSize = 4096;
|
||||
|
@ -95,7 +95,7 @@ using namespace pdfparse;
|
||||
EmitContext::EmitContext( const PDFContainer* pTop ) :
|
||||
m_bDeflate( false ),
|
||||
m_bDecrypt( false ),
|
||||
m_pImplData( NULL )
|
||||
m_pImplData( nullptr )
|
||||
{
|
||||
if( pTop )
|
||||
m_pImplData = new EmitImplData( pTop );
|
||||
@ -490,7 +490,7 @@ PDFObject* PDFContainer::findObject( unsigned int nNumber, unsigned int nGenerat
|
||||
return pObject;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PDFArray::~PDFArray()
|
||||
@ -559,7 +559,7 @@ void PDFDict::eraseValue( const OString& rName )
|
||||
{
|
||||
for( unsigned int j = i+1; j < nEle; j++ )
|
||||
{
|
||||
if( dynamic_cast<PDFComment*>(m_aSubElements[j]) == NULL )
|
||||
if( dynamic_cast<PDFComment*>(m_aSubElements[j]) == nullptr )
|
||||
{
|
||||
// free name and value
|
||||
delete m_aSubElements[j];
|
||||
@ -581,17 +581,17 @@ PDFEntry* PDFDict::buildMap()
|
||||
m_aMap.clear();
|
||||
// build map
|
||||
unsigned int nEle = m_aSubElements.size();
|
||||
PDFName* pName = NULL;
|
||||
PDFName* pName = nullptr;
|
||||
for( unsigned int i = 0; i < nEle; i++ )
|
||||
{
|
||||
if( dynamic_cast<PDFComment*>(m_aSubElements[i]) == NULL )
|
||||
if( dynamic_cast<PDFComment*>(m_aSubElements[i]) == nullptr )
|
||||
{
|
||||
if( pName )
|
||||
{
|
||||
m_aMap[ pName->m_aName ] = m_aSubElements[i];
|
||||
pName = NULL;
|
||||
pName = nullptr;
|
||||
}
|
||||
else if( (pName = dynamic_cast<PDFName*>(m_aSubElements[i])) == NULL )
|
||||
else if( (pName = dynamic_cast<PDFName*>(m_aSubElements[i])) == nullptr )
|
||||
return m_aSubElements[i];
|
||||
}
|
||||
}
|
||||
@ -617,7 +617,7 @@ bool PDFStream::emit( EmitContext& rWriteContext ) const
|
||||
|
||||
PDFEntry* PDFStream::clone() const
|
||||
{
|
||||
return new PDFStream( m_nBeginOffset, m_nEndOffset, NULL );
|
||||
return new PDFStream( m_nBeginOffset, m_nEndOffset, nullptr );
|
||||
}
|
||||
|
||||
unsigned int PDFStream::getDictLength( const PDFContainer* pContainer ) const
|
||||
@ -670,7 +670,7 @@ bool PDFObject::getDeflatedStream( char** ppStream, unsigned int* pBytes, const
|
||||
if( nRead != nOuterStreamLen )
|
||||
{
|
||||
rtl_freeMemory( *ppStream );
|
||||
*ppStream = NULL;
|
||||
*ppStream = nullptr;
|
||||
*pBytes = 0;
|
||||
return false;
|
||||
}
|
||||
@ -718,7 +718,7 @@ bool PDFObject::getDeflatedStream( char** ppStream, unsigned int* pBytes, const
|
||||
}
|
||||
}
|
||||
else
|
||||
*ppStream = NULL, *pBytes = 0;
|
||||
*ppStream = nullptr, *pBytes = 0;
|
||||
return bIsDeflated;
|
||||
}
|
||||
|
||||
@ -764,7 +764,7 @@ static void unzipToBuffer( char* pBegin, unsigned int nLen,
|
||||
if( err < Z_OK )
|
||||
{
|
||||
rtl_freeMemory( *pOutBuf );
|
||||
*pOutBuf = NULL;
|
||||
*pOutBuf = nullptr;
|
||||
*pOutLen = 0;
|
||||
}
|
||||
}
|
||||
@ -774,11 +774,11 @@ bool PDFObject::writeStream( EmitContext& rWriteContext, const PDFFile* pParsedF
|
||||
bool bSuccess = false;
|
||||
if( m_pStream )
|
||||
{
|
||||
char* pStream = NULL;
|
||||
char* pStream = nullptr;
|
||||
unsigned int nBytes = 0;
|
||||
if( getDeflatedStream( &pStream, &nBytes, pParsedFile, rWriteContext ) && nBytes && rWriteContext.m_bDeflate )
|
||||
{
|
||||
sal_uInt8* pOutBytes = NULL;
|
||||
sal_uInt8* pOutBytes = nullptr;
|
||||
sal_uInt32 nOutBytes = 0;
|
||||
unzipToBuffer( pStream, nBytes, &pOutBytes, &nOutBytes );
|
||||
rWriteContext.write( pOutBytes, nOutBytes );
|
||||
@ -812,13 +812,13 @@ bool PDFObject::emit( EmitContext& rWriteContext ) const
|
||||
pEData->setDecryptObject( m_nNumber, m_nGeneration );
|
||||
if( (rWriteContext.m_bDeflate || rWriteContext.m_bDecrypt) && pEData )
|
||||
{
|
||||
char* pStream = NULL;
|
||||
char* pStream = nullptr;
|
||||
unsigned int nBytes = 0;
|
||||
bool bDeflate = getDeflatedStream( &pStream, &nBytes, pEData->m_pObjectContainer, rWriteContext );
|
||||
if( pStream && nBytes )
|
||||
{
|
||||
// unzip the stream
|
||||
sal_uInt8* pOutBytes = NULL;
|
||||
sal_uInt8* pOutBytes = nullptr;
|
||||
sal_uInt32 nOutBytes = 0;
|
||||
if( bDeflate && rWriteContext.m_bDeflate )
|
||||
unzipToBuffer( pStream, nBytes, &pOutBytes, &nOutBytes );
|
||||
@ -1034,8 +1034,8 @@ struct PDFFileImplData
|
||||
m_nStandardRevision( 0 ),
|
||||
m_nKeyLength( 0 ),
|
||||
m_nPEntry( 0 ),
|
||||
m_aCipher( NULL ),
|
||||
m_aDigest( NULL )
|
||||
m_aCipher( nullptr ),
|
||||
m_aDigest( nullptr )
|
||||
{
|
||||
memset( m_aOEntry, 0, sizeof( m_aOEntry ) );
|
||||
memset( m_aUEntry, 0, sizeof( m_aUEntry ) );
|
||||
@ -1089,7 +1089,7 @@ bool PDFFile::decrypt( const sal_uInt8* pInBuffer, sal_uInt32 nLen, sal_uInt8* p
|
||||
rtlCipherError aErr = rtl_cipher_initARCFOUR( m_pData->m_aCipher,
|
||||
rtl_Cipher_DirectionDecode,
|
||||
aSum, i,
|
||||
NULL, 0 );
|
||||
nullptr, 0 );
|
||||
if( aErr == rtl_Cipher_E_None )
|
||||
aErr = rtl_cipher_decodeARCFOUR( m_pData->m_aCipher,
|
||||
pInBuffer, nLen,
|
||||
@ -1167,7 +1167,7 @@ static bool check_user_password( const OString& rPwd, PDFFileImplData* pData )
|
||||
// encrypt pad string
|
||||
rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode,
|
||||
aKey, nKeyLen,
|
||||
NULL, 0 );
|
||||
nullptr, 0 );
|
||||
rtl_cipher_encodeARCFOUR( pData->m_aCipher, nPadString, sizeof( nPadString ),
|
||||
nEncryptedEntry, sizeof( nEncryptedEntry ) );
|
||||
bValid = (memcmp( nEncryptedEntry, pData->m_aUEntry, 32 ) == 0);
|
||||
@ -1179,7 +1179,7 @@ static bool check_user_password( const OString& rPwd, PDFFileImplData* pData )
|
||||
rtl_digest_updateMD5( pData->m_aDigest, pData->m_aDocID.getStr(), pData->m_aDocID.getLength() );
|
||||
rtl_digest_getMD5( pData->m_aDigest, nEncryptedEntry, sizeof(nEncryptedEntry) );
|
||||
rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode,
|
||||
aKey, sizeof(aKey), NULL, 0 );
|
||||
aKey, sizeof(aKey), nullptr, 0 );
|
||||
rtl_cipher_encodeARCFOUR( pData->m_aCipher,
|
||||
nEncryptedEntry, 16,
|
||||
nEncryptedEntry, 16 ); // encrypt in place
|
||||
@ -1190,7 +1190,7 @@ static bool check_user_password( const OString& rPwd, PDFFileImplData* pData )
|
||||
aTempKey[j] = static_cast<sal_uInt8>( aKey[j] ^ i );
|
||||
|
||||
rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode,
|
||||
aTempKey, sizeof(aTempKey), NULL, 0 );
|
||||
aTempKey, sizeof(aTempKey), nullptr, 0 );
|
||||
rtl_cipher_encodeARCFOUR( pData->m_aCipher,
|
||||
nEncryptedEntry, 16,
|
||||
nEncryptedEntry, 16 ); // encrypt in place
|
||||
@ -1237,7 +1237,7 @@ bool PDFFile::setupDecryptionData( const OString& rPwd ) const
|
||||
if( m_pData->m_nStandardRevision == 2 )
|
||||
{
|
||||
rtl_cipher_initARCFOUR( m_pData->m_aCipher, rtl_Cipher_DirectionDecode,
|
||||
aKey, nKeyLen, NULL, 0 );
|
||||
aKey, nKeyLen, nullptr, 0 );
|
||||
rtl_cipher_decodeARCFOUR( m_pData->m_aCipher,
|
||||
m_pData->m_aOEntry, 32,
|
||||
nPwd, 32 );
|
||||
@ -1251,7 +1251,7 @@ bool PDFFile::setupDecryptionData( const OString& rPwd ) const
|
||||
for( unsigned int j = 0; j < sizeof(nTempKey); j++ )
|
||||
nTempKey[j] = sal_uInt8(aKey[j] ^ i);
|
||||
rtl_cipher_initARCFOUR( m_pData->m_aCipher, rtl_Cipher_DirectionDecode,
|
||||
nTempKey, nKeyLen, NULL, 0 );
|
||||
nTempKey, nKeyLen, nullptr, 0 );
|
||||
rtl_cipher_decodeARCFOUR( m_pData->m_aCipher,
|
||||
nPwd, 32,
|
||||
nPwd, 32 ); // decrypt inplace
|
||||
|
@ -307,30 +307,30 @@ public:
|
||||
if( m_aObjectStack.empty() )
|
||||
m_aObjectStack.push_back( new PDFPart() );
|
||||
PDFContainer* pContainer = dynamic_cast<PDFContainer*>(m_aObjectStack.back());
|
||||
if( pContainer == NULL )
|
||||
if( pContainer == nullptr )
|
||||
parseError( "comment without container", first );
|
||||
pContainer->m_aSubElements.push_back( pComment );
|
||||
}
|
||||
|
||||
void insertNewValue( PDFEntry* pNewValue, iteratorT pPos )
|
||||
{
|
||||
PDFContainer* pContainer = NULL;
|
||||
const char* pMsg = NULL;
|
||||
PDFContainer* pContainer = nullptr;
|
||||
const char* pMsg = nullptr;
|
||||
if( ! m_aObjectStack.empty() &&
|
||||
(pContainer = dynamic_cast<PDFContainer*>(m_aObjectStack.back())) != NULL )
|
||||
(pContainer = dynamic_cast<PDFContainer*>(m_aObjectStack.back())) != nullptr )
|
||||
{
|
||||
if( dynamic_cast<PDFDict*>(pContainer) == NULL &&
|
||||
dynamic_cast<PDFArray*>(pContainer) == NULL )
|
||||
if( dynamic_cast<PDFDict*>(pContainer) == nullptr &&
|
||||
dynamic_cast<PDFArray*>(pContainer) == nullptr )
|
||||
{
|
||||
PDFObject* pObj = dynamic_cast<PDFObject*>(pContainer);
|
||||
if( pObj )
|
||||
{
|
||||
if( pObj->m_pObject == NULL )
|
||||
if( pObj->m_pObject == nullptr )
|
||||
pObj->m_pObject = pNewValue;
|
||||
else
|
||||
{
|
||||
pMsg = "second value for object";
|
||||
pContainer = NULL;
|
||||
pContainer = nullptr;
|
||||
}
|
||||
}
|
||||
else if( dynamic_cast<PDFDict*>(pNewValue) )
|
||||
@ -338,16 +338,16 @@ public:
|
||||
PDFTrailer* pTrailer = dynamic_cast<PDFTrailer*>(pContainer);
|
||||
if( pTrailer )
|
||||
{
|
||||
if( pTrailer->m_pDict == NULL )
|
||||
if( pTrailer->m_pDict == nullptr )
|
||||
pTrailer->m_pDict = dynamic_cast<PDFDict*>(pNewValue);
|
||||
else
|
||||
pContainer = NULL;
|
||||
pContainer = nullptr;
|
||||
}
|
||||
else
|
||||
pContainer = NULL;
|
||||
pContainer = nullptr;
|
||||
}
|
||||
else
|
||||
pContainer = NULL;
|
||||
pContainer = nullptr;
|
||||
}
|
||||
}
|
||||
if( pContainer )
|
||||
@ -421,7 +421,7 @@ public:
|
||||
{
|
||||
if( m_aObjectStack.empty() )
|
||||
parseError( "endobj without obj", first );
|
||||
else if( dynamic_cast<PDFObject*>(m_aObjectStack.back()) == NULL )
|
||||
else if( dynamic_cast<PDFObject*>(m_aObjectStack.back()) == nullptr )
|
||||
parseError( "spurious endobj", first );
|
||||
else
|
||||
m_aObjectStack.pop_back();
|
||||
@ -447,10 +447,10 @@ public:
|
||||
}
|
||||
void endDict( iteratorT first, SAL_UNUSED_PARAMETER iteratorT )
|
||||
{
|
||||
PDFDict* pDict = NULL;
|
||||
PDFDict* pDict = nullptr;
|
||||
if( m_aObjectStack.empty() )
|
||||
parseError( "dictionary end without begin", first );
|
||||
else if( (pDict = dynamic_cast<PDFDict*>(m_aObjectStack.back())) == NULL )
|
||||
else if( (pDict = dynamic_cast<PDFDict*>(m_aObjectStack.back())) == nullptr )
|
||||
parseError( "spurious dictionary end", first );
|
||||
else
|
||||
m_aObjectStack.pop_back();
|
||||
@ -480,7 +480,7 @@ public:
|
||||
{
|
||||
if( m_aObjectStack.empty() )
|
||||
parseError( "array end without begin", first );
|
||||
else if( dynamic_cast<PDFArray*>(m_aObjectStack.back()) == NULL )
|
||||
else if( dynamic_cast<PDFArray*>(m_aObjectStack.back()) == nullptr )
|
||||
parseError( "spurious array end", first );
|
||||
else
|
||||
m_aObjectStack.pop_back();
|
||||
@ -533,7 +533,7 @@ public:
|
||||
{
|
||||
if( m_aObjectStack.empty() )
|
||||
parseError( "%%EOF without trailer", first );
|
||||
else if( dynamic_cast<PDFTrailer*>(m_aObjectStack.back()) == NULL )
|
||||
else if( dynamic_cast<PDFTrailer*>(m_aObjectStack.back()) == nullptr )
|
||||
parseError( "spurious %%EOF", first );
|
||||
else
|
||||
m_aObjectStack.pop_back();
|
||||
@ -617,7 +617,7 @@ PDFEntry* PDFReader::read( const char* pFileName )
|
||||
#else
|
||||
file_iterator<> file_start( pFileName );
|
||||
if( ! file_start )
|
||||
return NULL;
|
||||
return nullptr;
|
||||
file_iterator<> file_end = file_start.make_end();
|
||||
PDFGrammar< file_iterator<> > aGrammar( file_start );
|
||||
|
||||
@ -651,7 +651,7 @@ PDFEntry* PDFReader::read( const char* pFileName )
|
||||
#endif
|
||||
}
|
||||
|
||||
PDFEntry* pRet = NULL;
|
||||
PDFEntry* pRet = nullptr;
|
||||
unsigned int nEntries = aGrammar.m_aObjectStack.size();
|
||||
if( nEntries == 1 )
|
||||
{
|
||||
|
@ -83,9 +83,9 @@ namespace
|
||||
ComponentFactory pFactory;
|
||||
|
||||
ComponentDescription()
|
||||
:pAsciiServiceName( NULL )
|
||||
,pAsciiImplementationName( NULL )
|
||||
,pFactory( NULL )
|
||||
:pAsciiServiceName( nullptr )
|
||||
,pAsciiImplementationName( nullptr )
|
||||
,pFactory( nullptr )
|
||||
{
|
||||
}
|
||||
ComponentDescription( const sal_Char* _pAsciiServiceName, const sal_Char* _pAsciiImplementationName, ComponentFactory _pFactory )
|
||||
@ -120,7 +120,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL pdfimport_component_getFactory(
|
||||
Reference< XSingleComponentFactory > xFactory;
|
||||
|
||||
const ComponentDescription* pComponents = lcl_getComponents();
|
||||
while ( pComponents->pAsciiServiceName != NULL )
|
||||
while ( pComponents->pAsciiServiceName != nullptr )
|
||||
{
|
||||
if ( sImplementationName.equalsAscii( pComponents->pAsciiImplementationName ) )
|
||||
{
|
||||
|
@ -74,7 +74,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
|
||||
|
||||
uno::Reference<pdfi::PDFIRawAdaptor> xAdaptor( new pdfi::PDFIRawAdaptor(OUString(), aEnv.getComponentContext()) );
|
||||
xAdaptor->setTreeVisitorFactory(pTreeFactory);
|
||||
xAdaptor->odfConvert( aSrcURL, new OutputWrap(aDstURL), NULL );
|
||||
xAdaptor->odfConvert( aSrcURL, new OutputWrap(aDstURL), nullptr );
|
||||
}
|
||||
catch (const uno::Exception& e)
|
||||
{
|
||||
|
@ -72,8 +72,8 @@ class FileEmitContext : public EmitContext
|
||||
|
||||
FileEmitContext::FileEmitContext( const char* pFileName, const char* pOrigName, const PDFContainer* pTop )
|
||||
: EmitContext( pTop ),
|
||||
m_aHandle( NULL ),
|
||||
m_aReadHandle( NULL ),
|
||||
m_aHandle( nullptr ),
|
||||
m_aReadHandle( nullptr ),
|
||||
m_nReadLen( 0 )
|
||||
{
|
||||
OUString aSysFile( OStringToOUString( OString( pFileName ), osl_getThreadTextEncoding() ) );
|
||||
@ -90,7 +90,7 @@ FileEmitContext::FileEmitContext( const char* pFileName, const char* pOrigName,
|
||||
{
|
||||
fprintf( stderr, "could not truncate %s\n", pFileName );
|
||||
osl_closeFile( m_aHandle );
|
||||
m_aHandle = NULL;
|
||||
m_aHandle = nullptr;
|
||||
}
|
||||
}
|
||||
else if( osl_openFile( aURL.pData, &m_aHandle,
|
||||
@ -344,8 +344,8 @@ int write_fonts( const char* i_pInFile, const char* i_pOutFile, PDFFile* i_pPDFF
|
||||
continue;
|
||||
OString aFontName( pName->m_aName );
|
||||
|
||||
PDFObjectRef* pStreamRef = 0;
|
||||
const char* pFileType = NULL;
|
||||
PDFObjectRef* pStreamRef = nullptr;
|
||||
const char* pFileType = nullptr;
|
||||
// we have a font descriptor, try for a type 1 font
|
||||
map_it = pDict->m_aMap.find( "FontFile" );
|
||||
if( map_it != pDict->m_aMap.end() )
|
||||
@ -424,9 +424,9 @@ int write_objects( const char* i_pInFile, const char* i_pOutFile, PDFFile* i_pPD
|
||||
|
||||
SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
|
||||
{
|
||||
const char* pInFile = NULL;
|
||||
const char* pOutFile = NULL;
|
||||
const char* pPassword = NULL;
|
||||
const char* pInFile = nullptr;
|
||||
const char* pOutFile = nullptr;
|
||||
const char* pPassword = nullptr;
|
||||
OStringBuffer aOutFile( 256 );
|
||||
PDFFileHdl aHdl = write_unzipFile;
|
||||
|
||||
@ -491,9 +491,9 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if( pInFile == NULL )
|
||||
else if( pInFile == nullptr )
|
||||
pInFile = argv[nArg];
|
||||
else if( pOutFile == NULL )
|
||||
else if( pOutFile == nullptr )
|
||||
pOutFile = argv[nArg];
|
||||
}
|
||||
if( ! pInFile )
|
||||
|
@ -472,12 +472,12 @@ namespace
|
||||
xAdaptor->setTreeVisitorFactory( createDrawTreeVisitorFactory() );
|
||||
|
||||
OUString tempFileURL;
|
||||
CPPUNIT_ASSERT( osl::File::createTempFile( NULL, NULL, &tempFileURL ) == osl::File::E_None );
|
||||
CPPUNIT_ASSERT( osl::File::createTempFile( nullptr, nullptr, &tempFileURL ) == osl::File::E_None );
|
||||
osl::File::remove( tempFileURL ); // FIXME the below apparently fails silently if the file already exists
|
||||
CPPUNIT_ASSERT_MESSAGE("Exporting to ODF",
|
||||
xAdaptor->odfConvert( getURLFromSrc("/sdext/source/pdfimport/test/testinput.pdf"),
|
||||
new OutputWrap(tempFileURL),
|
||||
NULL ));
|
||||
nullptr ));
|
||||
osl::File::remove( tempFileURL );
|
||||
}
|
||||
|
||||
@ -487,12 +487,12 @@ namespace
|
||||
xAdaptor->setTreeVisitorFactory( createWriterTreeVisitorFactory() );
|
||||
|
||||
OUString tempFileURL;
|
||||
CPPUNIT_ASSERT( osl::File::createTempFile( NULL, NULL, &tempFileURL ) == osl::File::E_None );
|
||||
CPPUNIT_ASSERT( osl::File::createTempFile( nullptr, nullptr, &tempFileURL ) == osl::File::E_None );
|
||||
osl::File::remove( tempFileURL ); // FIXME the below apparently fails silently if the file already exists
|
||||
CPPUNIT_ASSERT_MESSAGE("Exporting to ODF",
|
||||
xAdaptor->odfConvert( getURLFromSrc("/sdext/source/pdfimport/test/testinput.pdf"),
|
||||
new OutputWrap(tempFileURL),
|
||||
NULL ));
|
||||
nullptr ));
|
||||
osl::File::remove( tempFileURL );
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ void DrawXmlEmitter::visit( FrameElement& elem, const std::list< Element* >::con
|
||||
if( elem.Children.empty() )
|
||||
return;
|
||||
|
||||
bool bTextBox = (dynamic_cast<ParagraphElement*>(elem.Children.front()) != NULL);
|
||||
bool bTextBox = (dynamic_cast<ParagraphElement*>(elem.Children.front()) != nullptr);
|
||||
PropertyMap aFrameProps;
|
||||
fillFrameProps( elem, aFrameProps, m_rEmitContext );
|
||||
m_rEmitContext.rEmitter.beginTag( "draw:frame", aFrameProps );
|
||||
@ -485,7 +485,7 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co
|
||||
m_rProcessor.sortElements( &elem );
|
||||
|
||||
// find paragraphs in text
|
||||
ParagraphElement* pCurPara = NULL;
|
||||
ParagraphElement* pCurPara = nullptr;
|
||||
std::list< Element* >::iterator page_element, next_page_element;
|
||||
next_page_element = elem.Children.begin();
|
||||
double fCurLineHeight = 0.0; // average height of text items in current para
|
||||
@ -561,7 +561,7 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co
|
||||
line_left = pDraw->x;
|
||||
line_right = pDraw->x + pDraw->w;
|
||||
// begin a new paragraph
|
||||
pCurPara = NULL;
|
||||
pCurPara = nullptr;
|
||||
// mark draw element as character
|
||||
pDraw->isCharacter = true;
|
||||
}
|
||||
@ -569,7 +569,7 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co
|
||||
|
||||
if( ! bInsertToParagraph )
|
||||
{
|
||||
pCurPara = NULL;
|
||||
pCurPara = nullptr;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -589,16 +589,16 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co
|
||||
// if the new text is significantly distant from the paragraph
|
||||
// begin a new paragraph
|
||||
if( pGeo->y > pCurPara->y + pCurPara->h + fCurLineHeight*0.5 )
|
||||
pCurPara = NULL; // insert new paragraph
|
||||
pCurPara = nullptr; // insert new paragraph
|
||||
else if( pGeo->y > (pCurPara->y+pCurPara->h - fCurLineHeight*0.05) )
|
||||
{
|
||||
// new paragraph if either the last line of the paragraph
|
||||
// was significantly shorter than the paragraph as a whole
|
||||
if( (line_right - line_left) < pCurPara->w*0.75 )
|
||||
pCurPara = NULL;
|
||||
pCurPara = nullptr;
|
||||
// or the last line was significantly smaller than the column width
|
||||
else if( (line_right - line_left) < column_width*0.75 )
|
||||
pCurPara = NULL;
|
||||
pCurPara = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -629,7 +629,7 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co
|
||||
// move element to current paragraph
|
||||
if (! pCurPara ) // new paragraph, insert one
|
||||
{
|
||||
pCurPara = ElementFactory::createParagraphElement( NULL );
|
||||
pCurPara = ElementFactory::createParagraphElement( nullptr );
|
||||
// set parent
|
||||
pCurPara->Parent = &elem;
|
||||
//insert new paragraph before current element
|
||||
|
@ -198,11 +198,11 @@ void ParagraphElement::visitedBy( ElementTreeVisitor& r
|
||||
bool ParagraphElement::isSingleLined( PDFIProcessor& rProc ) const
|
||||
{
|
||||
std::list< Element* >::const_iterator it = Children.begin();
|
||||
TextElement* pText = NULL, *pLastText = NULL;
|
||||
TextElement* pText = nullptr, *pLastText = nullptr;
|
||||
while( it != Children.end() )
|
||||
{
|
||||
// a paragraph containing subparagraphs cannot be single lined
|
||||
if( dynamic_cast< ParagraphElement* >(*it) != NULL )
|
||||
if( dynamic_cast< ParagraphElement* >(*it) != nullptr )
|
||||
return false;
|
||||
|
||||
pText = dynamic_cast< TextElement* >(*it);
|
||||
@ -224,7 +224,7 @@ bool ParagraphElement::isSingleLined( PDFIProcessor& rProc ) const
|
||||
}
|
||||
|
||||
// a paragraph without a single text is not considered single lined
|
||||
return pLastText != NULL;
|
||||
return pLastText != nullptr;
|
||||
}
|
||||
|
||||
double ParagraphElement::getLineHeight( PDFIProcessor& rProc ) const
|
||||
@ -233,14 +233,14 @@ double ParagraphElement::getLineHeight( PDFIProcessor& rProc ) const
|
||||
for( std::list< Element* >::const_iterator it = Children.begin(); it != Children.end(); ++it )
|
||||
{
|
||||
ParagraphElement* pPara = dynamic_cast< ParagraphElement* >(*it);
|
||||
TextElement* pText = NULL;
|
||||
TextElement* pText = nullptr;
|
||||
if( pPara )
|
||||
{
|
||||
double lh = pPara->getLineHeight( rProc );
|
||||
if( lh > line_h )
|
||||
line_h = lh;
|
||||
}
|
||||
else if( (pText = dynamic_cast< TextElement* >( *it )) != NULL )
|
||||
else if( (pText = dynamic_cast< TextElement* >( *it )) != nullptr )
|
||||
{
|
||||
const FontAttributes& rFont = rProc.getFont( pText->FontId );
|
||||
double lh = pText->h;
|
||||
@ -255,7 +255,7 @@ double ParagraphElement::getLineHeight( PDFIProcessor& rProc ) const
|
||||
|
||||
TextElement* ParagraphElement::getFirstTextChild() const
|
||||
{
|
||||
TextElement* pText = NULL;
|
||||
TextElement* pText = nullptr;
|
||||
for( std::list< Element* >::const_iterator it = Children.begin();
|
||||
it != Children.end() && ! pText; ++it )
|
||||
{
|
||||
@ -290,7 +290,7 @@ void PageElement::updateParagraphGeometry( Element* pEle )
|
||||
for( std::list< Element* >::iterator it = pEle->Children.begin();
|
||||
it != pEle->Children.end(); ++it )
|
||||
{
|
||||
Element* pChild = NULL;
|
||||
Element* pChild = nullptr;
|
||||
TextElement* pText = dynamic_cast<TextElement*>(*it);
|
||||
if( pText )
|
||||
pChild = pText;
|
||||
@ -448,7 +448,7 @@ void PageElement::resolveUnderlines( PDFIProcessor& rProc )
|
||||
}
|
||||
// second: hyperlinks may be larger than their underline
|
||||
// since they are just arbitrary rectangles in the action definition
|
||||
else if( dynamic_cast< HyperlinkElement* >(pEle) != NULL &&
|
||||
else if( dynamic_cast< HyperlinkElement* >(pEle) != nullptr &&
|
||||
l_x >= pEle->x && r_x <= pEle->x+pEle->w )
|
||||
{
|
||||
bRemovePoly = true;
|
||||
|
@ -110,7 +110,7 @@ namespace pdfi
|
||||
|
||||
struct ListElement : public Element
|
||||
{
|
||||
ListElement() : Element( NULL ) {}
|
||||
ListElement() : Element( nullptr ) {}
|
||||
virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* >::const_iterator& ) override;
|
||||
};
|
||||
|
||||
@ -245,7 +245,7 @@ namespace pdfi
|
||||
PageElement( Element* pParent, sal_Int32 nPageNr )
|
||||
: Element( pParent ), PageNumber( nPageNr ), Hyperlinks(),
|
||||
TopMargin( 0.0 ), BottomMargin( 0.0 ), LeftMargin( 0.0 ), RightMargin( 0.0 ),
|
||||
HeaderElement( NULL ), FooterElement( NULL )
|
||||
HeaderElement( nullptr ), FooterElement( nullptr )
|
||||
{}
|
||||
private:
|
||||
// helper method for resolveHyperlinks
|
||||
@ -274,7 +274,7 @@ namespace pdfi
|
||||
{
|
||||
friend class ElementFactory;
|
||||
protected:
|
||||
DocumentElement() : Element( NULL ) {}
|
||||
DocumentElement() : Element( nullptr ) {}
|
||||
public:
|
||||
virtual ~DocumentElement();
|
||||
|
||||
|
@ -59,8 +59,8 @@ namespace pdfi
|
||||
prevCharWidth(0),
|
||||
m_pElFactory( new ElementFactory() ),
|
||||
m_pDocument( ElementFactory::createDocumentElement() ),
|
||||
m_pCurPage(0),
|
||||
m_pCurElement(0),
|
||||
m_pCurPage(nullptr),
|
||||
m_pCurElement(nullptr),
|
||||
m_nNextFontId( 1 ),
|
||||
m_aIdToFont(),
|
||||
m_aFontToId(),
|
||||
|
@ -87,7 +87,7 @@ const PropertyMap* StyleContainer::getProperties( sal_Int32 nStyleId ) const
|
||||
{
|
||||
std::unordered_map< sal_Int32, HashedStyle >::const_iterator it =
|
||||
m_aIdToStyle.find( nStyleId );
|
||||
return it != m_aIdToStyle.end() ? &(it->second.Properties) : NULL;
|
||||
return it != m_aIdToStyle.end() ? &(it->second.Properties) : nullptr;
|
||||
}
|
||||
|
||||
sal_Int32 StyleContainer::setProperties( sal_Int32 nStyleId, const PropertyMap& rNewProps )
|
||||
|
@ -43,11 +43,11 @@ namespace pdfi
|
||||
Element* ContainedElement;
|
||||
std::vector< Style* > SubStyles;
|
||||
|
||||
Style() : ContainedElement( NULL ) {}
|
||||
Style() : ContainedElement( nullptr ) {}
|
||||
Style( const OString& rName, const PropertyMap& rProps ) :
|
||||
Name( rName ),
|
||||
Properties( rProps ),
|
||||
ContainedElement( NULL )
|
||||
ContainedElement( nullptr )
|
||||
{}
|
||||
};
|
||||
|
||||
@ -63,7 +63,7 @@ namespace pdfi
|
||||
bool IsSubStyle;
|
||||
sal_Int32 RefCount;
|
||||
|
||||
HashedStyle() : ContainedElement( NULL ), IsSubStyle( true ), RefCount( 0 ) {}
|
||||
HashedStyle() : ContainedElement( nullptr ), IsSubStyle( true ), RefCount( 0 ) {}
|
||||
|
||||
HashedStyle( const HashedStyle& rRight ) :
|
||||
Name( rRight.Name ),
|
||||
|
@ -199,7 +199,7 @@ void WriterXmlEmitter::visit( FrameElement& elem, const std::list< Element* >::c
|
||||
if( elem.Children.empty() )
|
||||
return;
|
||||
|
||||
bool bTextBox = (dynamic_cast<ParagraphElement*>(elem.Children.front()) != NULL);
|
||||
bool bTextBox = (dynamic_cast<ParagraphElement*>(elem.Children.front()) != nullptr);
|
||||
PropertyMap aFrameProps;
|
||||
fillFrameProps( elem, aFrameProps, m_rEmitContext );
|
||||
m_rEmitContext.rEmitter.beginTag( "draw:frame", aFrameProps );
|
||||
@ -321,7 +321,7 @@ void WriterXmlEmitter::visit( DocumentElement& elem, const std::list< Element* >
|
||||
// currently these are only DrawElement types
|
||||
for( std::list< Element* >::iterator child_it = pPage->Children.begin(); child_it != pPage->Children.end(); ++child_it )
|
||||
{
|
||||
if( dynamic_cast<DrawElement*>(*child_it) != NULL )
|
||||
if( dynamic_cast<DrawElement*>(*child_it) != nullptr )
|
||||
(*child_it)->visitedBy( *this, child_it );
|
||||
}
|
||||
}
|
||||
@ -332,7 +332,7 @@ void WriterXmlEmitter::visit( DocumentElement& elem, const std::list< Element* >
|
||||
// only DrawElement types
|
||||
for( std::list< Element* >::iterator it = elem.Children.begin(); it != elem.Children.end(); ++it )
|
||||
{
|
||||
if( dynamic_cast<DrawElement*>(*it) == NULL )
|
||||
if( dynamic_cast<DrawElement*>(*it) == nullptr )
|
||||
(*it)->visitedBy( *this, it );
|
||||
}
|
||||
|
||||
@ -425,7 +425,7 @@ void WriterXmlOptimizer::visit( ParagraphElement& elem, const std::list< Element
|
||||
{
|
||||
// find if there is a previous paragraph that might be a heading for this one
|
||||
std::list<Element*>::const_iterator prev = rParentIt;
|
||||
ParagraphElement* pPrevPara = NULL;
|
||||
ParagraphElement* pPrevPara = nullptr;
|
||||
while( prev != elem.Parent->Children.begin() )
|
||||
{
|
||||
--prev;
|
||||
@ -487,7 +487,7 @@ void WriterXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::
|
||||
m_rProcessor.sortElements( &elem );
|
||||
|
||||
// find paragraphs in text
|
||||
ParagraphElement* pCurPara = NULL;
|
||||
ParagraphElement* pCurPara = nullptr;
|
||||
std::list< Element* >::iterator page_element, next_page_element;
|
||||
next_page_element = elem.Children.begin();
|
||||
double fCurLineHeight = 0.0; // average height of text items in current para
|
||||
@ -563,7 +563,7 @@ void WriterXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::
|
||||
line_left = pDraw->x;
|
||||
line_right = pDraw->x + pDraw->w;
|
||||
// begin a new paragraph
|
||||
pCurPara = NULL;
|
||||
pCurPara = nullptr;
|
||||
// mark draw element as character
|
||||
pDraw->isCharacter = true;
|
||||
}
|
||||
@ -571,7 +571,7 @@ void WriterXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::
|
||||
|
||||
if( ! bInsertToParagraph )
|
||||
{
|
||||
pCurPara = NULL;
|
||||
pCurPara = nullptr;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -591,16 +591,16 @@ void WriterXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::
|
||||
// if the new text is significantly distant from the paragraph
|
||||
// begin a new paragraph
|
||||
if( pGeo->y > pCurPara->y+pCurPara->h + fCurLineHeight*0.5 )
|
||||
pCurPara = NULL; // insert new paragraph
|
||||
pCurPara = nullptr; // insert new paragraph
|
||||
else if( pGeo->y > (pCurPara->y+pCurPara->h - fCurLineHeight*0.05) )
|
||||
{
|
||||
// new paragraph if either the last line of the paragraph
|
||||
// was significantly shorter than the paragraph as a whole
|
||||
if( (line_right - line_left) < pCurPara->w*0.75 )
|
||||
pCurPara = NULL;
|
||||
pCurPara = nullptr;
|
||||
// or the last line was significantly smaller than the column width
|
||||
else if( (line_right - line_left) < column_width*0.75 )
|
||||
pCurPara = NULL;
|
||||
pCurPara = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -626,7 +626,7 @@ void WriterXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::
|
||||
// move element to current paragraph
|
||||
if( ! pCurPara ) // new paragraph, insert one
|
||||
{
|
||||
pCurPara = ElementFactory::createParagraphElement( NULL );
|
||||
pCurPara = ElementFactory::createParagraphElement( nullptr );
|
||||
// set parent
|
||||
pCurPara->Parent = &elem;
|
||||
//insert new paragraph before current element
|
||||
@ -674,15 +674,15 @@ void WriterXmlOptimizer::checkHeaderAndFooter( PageElement& rElem )
|
||||
if( pPara->y+pPara->h < rElem.h*0.15 && pPara->isSingleLined( m_rProcessor ) )
|
||||
{
|
||||
std::list< Element* >::iterator next_it = it;
|
||||
ParagraphElement* pNextPara = NULL;
|
||||
while( ++next_it != rElem.Children.end() && pNextPara == NULL )
|
||||
ParagraphElement* pNextPara = nullptr;
|
||||
while( ++next_it != rElem.Children.end() && pNextPara == nullptr )
|
||||
{
|
||||
pNextPara = dynamic_cast<ParagraphElement*>(*next_it);
|
||||
}
|
||||
if( pNextPara && pNextPara->y > pPara->y+pPara->h*2 )
|
||||
{
|
||||
rElem.HeaderElement = pPara;
|
||||
pPara->Parent = NULL;
|
||||
pPara->Parent = nullptr;
|
||||
rElem.Children.remove( pPara );
|
||||
}
|
||||
}
|
||||
@ -701,15 +701,15 @@ void WriterXmlOptimizer::checkHeaderAndFooter( PageElement& rElem )
|
||||
if( pPara->y > rElem.h*0.85 && pPara->isSingleLined( m_rProcessor ) )
|
||||
{
|
||||
std::list< Element* >::reverse_iterator next_it = rit;
|
||||
ParagraphElement* pNextPara = NULL;
|
||||
while( ++next_it != rElem.Children.rend() && pNextPara == NULL )
|
||||
ParagraphElement* pNextPara = nullptr;
|
||||
while( ++next_it != rElem.Children.rend() && pNextPara == nullptr )
|
||||
{
|
||||
pNextPara = dynamic_cast<ParagraphElement*>(*next_it);
|
||||
}
|
||||
if( pNextPara && pNextPara->y < pPara->y-pPara->h*2 )
|
||||
{
|
||||
rElem.FooterElement = pPara;
|
||||
pPara->Parent = NULL;
|
||||
pPara->Parent = nullptr;
|
||||
rElem.Children.remove( pPara );
|
||||
}
|
||||
}
|
||||
@ -996,7 +996,7 @@ void WriterXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element
|
||||
// check whether to leave some space to next paragraph
|
||||
// find whether there is a next paragraph
|
||||
std::list< Element* >::const_iterator it = rParentIt;
|
||||
const ParagraphElement* pNextPara = NULL;
|
||||
const ParagraphElement* pNextPara = nullptr;
|
||||
while( ++it != elem.Parent->Children.end() && ! pNextPara )
|
||||
pNextPara = dynamic_cast< const ParagraphElement* >(*it);
|
||||
if( pNextPara )
|
||||
@ -1091,7 +1091,7 @@ void WriterXmlFinalizer::visit( PageElement& elem, const std::list< Element* >::
|
||||
// calculate page margins out of the relevant children (paragraphs)
|
||||
elem.TopMargin = elem.h, elem.BottomMargin = 0, elem.LeftMargin = elem.w, elem.RightMargin = 0;
|
||||
// first element should be a paragraphy
|
||||
ParagraphElement* pFirstPara = NULL;
|
||||
ParagraphElement* pFirstPara = nullptr;
|
||||
for( std::list< Element* >::const_iterator it = elem.Children.begin(); it != elem.Children.end(); ++it )
|
||||
{
|
||||
if( dynamic_cast<ParagraphElement*>( *it ) )
|
||||
@ -1211,7 +1211,7 @@ void WriterXmlFinalizer::visit( PageElement& elem, const std::list< Element* >::
|
||||
// no paragraph or other elements before the first paragraph
|
||||
if( ! pFirstPara )
|
||||
{
|
||||
pFirstPara = ElementFactory::createParagraphElement( NULL );
|
||||
pFirstPara = ElementFactory::createParagraphElement( nullptr );
|
||||
pFirstPara->Parent = &elem;
|
||||
elem.Children.push_front( pFirstPara );
|
||||
}
|
||||
|
@ -208,7 +208,7 @@ namespace
|
||||
const sal_Char* pRead(pOrig);
|
||||
sal_Char* pWrite(pBuffer);
|
||||
const sal_Char* pCur(pOrig);
|
||||
while ((pCur = strchr(pCur, '\\')) != 0)
|
||||
while ((pCur = strchr(pCur, '\\')) != nullptr)
|
||||
{
|
||||
const sal_Char cNext(pCur[1]);
|
||||
if (cNext == 'n' || cNext == 'r' || cNext == '\\')
|
||||
@ -1070,9 +1070,9 @@ bool xpdf_ImportFromFile( const OUString& rURL,
|
||||
sal_Int32 nArgs = rFilterOptions.isEmpty() ? 2 : 4;
|
||||
|
||||
oslProcess aProcess;
|
||||
oslFileHandle pIn = NULL;
|
||||
oslFileHandle pOut = NULL;
|
||||
oslFileHandle pErr = NULL;
|
||||
oslFileHandle pIn = nullptr;
|
||||
oslFileHandle pOut = nullptr;
|
||||
oslFileHandle pErr = nullptr;
|
||||
oslSecurity pSecurity = osl_getCurrentSecurity ();
|
||||
oslProcessError eErr =
|
||||
osl_executeProcess_WithRedirectedIO(converterURL.pData,
|
||||
@ -1080,7 +1080,7 @@ bool xpdf_ImportFromFile( const OUString& rURL,
|
||||
nArgs,
|
||||
osl_Process_SEARCHPATH|osl_Process_HIDDEN,
|
||||
pSecurity,
|
||||
0, 0, 0,
|
||||
nullptr, nullptr, 0,
|
||||
&aProcess, &pIn, &pOut, &pErr);
|
||||
osl_freeSecurityHandle(pSecurity);
|
||||
|
||||
@ -1206,9 +1206,9 @@ bool xpdf_ImportFromStream( const uno::Reference< io::XInputStream >& xI
|
||||
OSL_ASSERT(rSink);
|
||||
|
||||
// convert XInputStream to local temp file
|
||||
oslFileHandle aFile = NULL;
|
||||
oslFileHandle aFile = nullptr;
|
||||
OUString aURL;
|
||||
if( osl_createTempFile( NULL, &aFile, &aURL.pData ) != osl_File_E_None )
|
||||
if( osl_createTempFile( nullptr, &aFile, &aURL.pData ) != osl_File_E_None )
|
||||
return false;
|
||||
|
||||
// copy content, buffered...
|
||||
|
@ -874,7 +874,7 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y,
|
||||
{
|
||||
assert(state);
|
||||
|
||||
if( u == NULL )
|
||||
if( u == nullptr )
|
||||
return;
|
||||
|
||||
double csdx = 0.0;
|
||||
|
@ -640,7 +640,7 @@ void PresenterAccessible::UpdateAccessibilityHierarchy (
|
||||
if (mpAccessiblePreview.is())
|
||||
{
|
||||
mpAccessibleConsole->RemoveChild(mpAccessiblePreview);
|
||||
mpAccessiblePreview = NULL;
|
||||
mpAccessiblePreview = nullptr;
|
||||
}
|
||||
|
||||
mxPreviewContentWindow = rxPreviewContentWindow;
|
||||
@ -663,7 +663,7 @@ void PresenterAccessible::UpdateAccessibilityHierarchy (
|
||||
if (mpAccessibleNotes.is())
|
||||
{
|
||||
mpAccessibleConsole->RemoveChild(mpAccessibleNotes);
|
||||
mpAccessibleNotes = NULL;
|
||||
mpAccessibleNotes = nullptr;
|
||||
}
|
||||
|
||||
mxNotesContentWindow = rxNotesContentWindow;
|
||||
@ -706,11 +706,11 @@ void PresenterAccessible::NotifyCurrentSlideChange (
|
||||
void SAL_CALL PresenterAccessible::disposing()
|
||||
{
|
||||
UpdateAccessibilityHierarchy(
|
||||
NULL,
|
||||
NULL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
OUString(),
|
||||
NULL,
|
||||
NULL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
std::shared_ptr<PresenterTextView>());
|
||||
|
||||
if (mxMainWindow.is())
|
||||
@ -718,12 +718,12 @@ void SAL_CALL PresenterAccessible::disposing()
|
||||
mxMainWindow->removeFocusListener(this);
|
||||
|
||||
if (mxMainPane.is())
|
||||
mxMainPane->setAccessible(NULL);
|
||||
mxMainPane->setAccessible(nullptr);
|
||||
}
|
||||
|
||||
mpAccessiblePreview = NULL;
|
||||
mpAccessibleNotes = NULL;
|
||||
mpAccessibleConsole = NULL;
|
||||
mpAccessiblePreview = nullptr;
|
||||
mpAccessibleNotes = nullptr;
|
||||
mpAccessibleConsole = nullptr;
|
||||
}
|
||||
|
||||
//----- XAccessible -----------------------------------------------------------
|
||||
@ -741,7 +741,7 @@ Reference<XAccessibleContext> SAL_CALL PresenterAccessible::getAccessibleContext
|
||||
}
|
||||
mpAccessibleConsole = AccessibleConsole::Create(
|
||||
mxComponentContext, css::lang::Locale());
|
||||
mpAccessibleConsole->SetWindow(mxMainWindow, NULL);
|
||||
mpAccessibleConsole->SetWindow(mxMainWindow, nullptr);
|
||||
mpAccessibleConsole->SetAccessibleParent(mxAccessibleParent);
|
||||
UpdateAccessibilityHierarchy();
|
||||
if (mpPresenterController.is())
|
||||
@ -766,7 +766,7 @@ void SAL_CALL PresenterAccessible::focusLost (const css::awt::FocusEvent& rEvent
|
||||
{
|
||||
(void)rEvent;
|
||||
SAL_INFO("sdext.presenter", OSL_THIS_FUNC << ": PresenterAccessible::focusLost at " << this);
|
||||
AccessibleFocusManager::Instance()->FocusObject(NULL);
|
||||
AccessibleFocusManager::Instance()->FocusObject(nullptr);
|
||||
}
|
||||
|
||||
//----- XEventListener ----------------------------------------------------
|
||||
@ -775,7 +775,7 @@ void SAL_CALL PresenterAccessible::disposing (const css::lang::EventObject& rEve
|
||||
throw (css::uno::RuntimeException, std::exception)
|
||||
{
|
||||
if (rEvent.Source == mxMainWindow)
|
||||
mxMainWindow = NULL;
|
||||
mxMainWindow = nullptr;
|
||||
}
|
||||
|
||||
//----- XInitialize -----------------------------------------------------------
|
||||
@ -854,7 +854,7 @@ void PresenterAccessible::AccessibleObject::SetAccessibleParent (
|
||||
void SAL_CALL PresenterAccessible::AccessibleObject::disposing()
|
||||
{
|
||||
AccessibleFocusManager::Instance()->RemoveFocusableObject(this);
|
||||
SetWindow(NULL, NULL);
|
||||
SetWindow(nullptr, nullptr);
|
||||
}
|
||||
|
||||
//----- XAccessible -------------------------------------------------------
|
||||
@ -956,7 +956,7 @@ Reference<XAccessibleRelationSet> SAL_CALL
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference<XAccessibleStateSet> SAL_CALL
|
||||
@ -1164,12 +1164,12 @@ void SAL_CALL PresenterAccessible::AccessibleObject::disposing (const css::lang:
|
||||
{
|
||||
if (rEvent.Source == mxContentWindow)
|
||||
{
|
||||
mxContentWindow = NULL;
|
||||
mxBorderWindow = NULL;
|
||||
mxContentWindow = nullptr;
|
||||
mxBorderWindow = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetWindow(NULL, NULL);
|
||||
SetWindow(nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1813,7 +1813,7 @@ bool PresenterAccessible::AccessibleParagraph::GetWindowState (const sal_Int16 n
|
||||
switch (nType)
|
||||
{
|
||||
case AccessibleStateType::EDITABLE:
|
||||
return mpParagraph.get()!=NULL;
|
||||
return mpParagraph.get()!=nullptr;
|
||||
|
||||
case AccessibleStateType::ACTIVE:
|
||||
return true;
|
||||
|
@ -107,7 +107,7 @@ SharedBitmapDescriptor PresenterBitmapContainer::GetBitmap (
|
||||
BitmapContainer::const_iterator iSet (maIconContainer.find(rsName));
|
||||
if (iSet != maIconContainer.end())
|
||||
return iSet->second;
|
||||
else if (mpParentContainer.get() != NULL)
|
||||
else if (mpParentContainer.get() != nullptr)
|
||||
return mpParentContainer->GetBitmap(rsName);
|
||||
else
|
||||
return SharedBitmapDescriptor();
|
||||
@ -315,7 +315,7 @@ PresenterBitmapContainer::BitmapDescriptor::BitmapDescriptor (
|
||||
mxDisabledBitmap(),
|
||||
mxMaskBitmap()
|
||||
{
|
||||
if (rpDefault.get() != NULL)
|
||||
if (rpDefault.get() != nullptr)
|
||||
{
|
||||
mnWidth = rpDefault->mnWidth;
|
||||
mnHeight = rpDefault->mnHeight;
|
||||
|
@ -92,13 +92,13 @@ public:
|
||||
const std::shared_ptr<PresenterBitmapContainer>& rpParentContainer,
|
||||
const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext,
|
||||
const css::uno::Reference<css::rendering::XCanvas>& rxCanvas,
|
||||
const css::uno::Reference<css::drawing::XPresenterHelper>& rxPresenterHelper = NULL);
|
||||
const css::uno::Reference<css::drawing::XPresenterHelper>& rxPresenterHelper = nullptr);
|
||||
PresenterBitmapContainer (
|
||||
const css::uno::Reference<css::container::XNameAccess>& rsRootNode,
|
||||
const std::shared_ptr<PresenterBitmapContainer>& rpParentContainer,
|
||||
const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext,
|
||||
const css::uno::Reference<css::rendering::XCanvas>& rxCanvas,
|
||||
const css::uno::Reference<css::drawing::XPresenterHelper>& rxPresenterHelper = NULL);
|
||||
const css::uno::Reference<css::drawing::XPresenterHelper>& rxPresenterHelper = nullptr);
|
||||
~PresenterBitmapContainer();
|
||||
|
||||
void Initialize (
|
||||
|
@ -58,11 +58,11 @@ const static double gnVerticalBorder (5);
|
||||
PresenterConfigurationAccess::GetProperty(xProperties, "Action") >>= sAction;
|
||||
|
||||
PresenterTheme::SharedFontDescriptor pFont;
|
||||
if (rpTheme.get() != NULL)
|
||||
if (rpTheme.get() != nullptr)
|
||||
pFont = rpTheme->GetFont("ButtonFont");
|
||||
|
||||
PresenterTheme::SharedFontDescriptor pMouseOverFont;
|
||||
if (rpTheme.get() != NULL)
|
||||
if (rpTheme.get() != nullptr)
|
||||
pMouseOverFont = rpTheme->GetFont("ButtonMouseOverFont");
|
||||
|
||||
rtl::Reference<PresenterButton> pButton (
|
||||
@ -79,7 +79,7 @@ const static double gnVerticalBorder (5);
|
||||
return pButton;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PresenterButton::PresenterButton (
|
||||
@ -153,7 +153,7 @@ void SAL_CALL PresenterButton::disposing()
|
||||
if (mxCanvas.is())
|
||||
{
|
||||
Reference<lang::XComponent> xComponent (mxCanvas, UNO_QUERY);
|
||||
mxCanvas = NULL;
|
||||
mxCanvas = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
@ -165,7 +165,7 @@ void SAL_CALL PresenterButton::disposing()
|
||||
mxWindow->removeMouseListener(this);
|
||||
mxWindow->removeMouseMotionListener(this);
|
||||
Reference<lang::XComponent> xComponent (mxWindow, UNO_QUERY);
|
||||
mxWindow = NULL;
|
||||
mxWindow = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
@ -201,7 +201,7 @@ void PresenterButton::SetCanvas (
|
||||
if (mxCanvas.is())
|
||||
{
|
||||
Reference<lang::XComponent> xComponent (mxCanvas, UNO_QUERY);
|
||||
mxCanvas = NULL;
|
||||
mxCanvas = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
@ -277,7 +277,7 @@ void SAL_CALL PresenterButton::windowPaint (const css::awt::PaintEvent& rEvent)
|
||||
|
||||
rendering::ViewState aViewState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL);
|
||||
nullptr);
|
||||
rendering::RenderState aRenderState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
PresenterGeometryHelper::CreatePolygon(rEvent.UpdateRect, mxCanvas->getDevice()),
|
||||
@ -310,7 +310,7 @@ void SAL_CALL PresenterButton::mouseReleased (const css::awt::MouseEvent& rEvent
|
||||
|
||||
if (meState == PresenterBitmapDescriptor::ButtonDown)
|
||||
{
|
||||
OSL_ASSERT(mpPresenterController.get()!=NULL);
|
||||
OSL_ASSERT(mpPresenterController.get()!=nullptr);
|
||||
mpPresenterController->DispatchUnoCommand(msAction);
|
||||
|
||||
meState = PresenterBitmapDescriptor::Normal;
|
||||
@ -358,16 +358,16 @@ void SAL_CALL PresenterButton::disposing (const css::lang::EventObject& rEvent)
|
||||
throw (css::uno::RuntimeException, std::exception)
|
||||
{
|
||||
if (rEvent.Source == mxWindow)
|
||||
mxWindow = NULL;
|
||||
mxWindow = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
css::geometry::IntegerSize2D PresenterButton::CalculateButtonSize()
|
||||
{
|
||||
if (mpFont.get()!=NULL && !mpFont->mxFont.is() && mxCanvas.is())
|
||||
if (mpFont.get()!=nullptr && !mpFont->mxFont.is() && mxCanvas.is())
|
||||
mpFont->PrepareFont(mxCanvas);
|
||||
if (mpFont.get()==NULL || !mpFont->mxFont.is())
|
||||
if (mpFont.get()==nullptr || !mpFont->mxFont.is())
|
||||
return geometry::IntegerSize2D(-1,-1);
|
||||
|
||||
geometry::RealSize2D aTextSize (PresenterCanvasHelper::GetTextSize(mpFont->mxFont,msText));
|
||||
@ -399,7 +399,7 @@ void PresenterButton::RenderButton (
|
||||
GetBitmap(rpCenter, eMode),
|
||||
GetBitmap(rpRight, eMode));
|
||||
|
||||
if (rpFont.get()==NULL || ! rpFont->mxFont.is())
|
||||
if (rpFont.get()==nullptr || ! rpFont->mxFont.is())
|
||||
return;
|
||||
|
||||
const rendering::StringContext aContext (msText, 0, msText.getLength());
|
||||
@ -407,7 +407,7 @@ void PresenterButton::RenderButton (
|
||||
rpFont->mxFont->createTextLayout(aContext,rendering::TextDirection::WEAK_LEFT_TO_RIGHT,0));
|
||||
const geometry::RealRectangle2D aTextBBox (xLayout->queryTextBounds());
|
||||
|
||||
rendering::RenderState aRenderState (geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL,
|
||||
rendering::RenderState aRenderState (geometry::AffineMatrix2D(1,0,0, 0,1,0), nullptr,
|
||||
Sequence<double>(4), rendering::CompositeOperation::SOURCE);
|
||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, rpFont->mnColor);
|
||||
|
||||
@ -417,7 +417,7 @@ void PresenterButton::RenderButton (
|
||||
/// this is responsible of the close button
|
||||
rxCanvas->drawTextLayout(
|
||||
xLayout,
|
||||
rendering::ViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL),
|
||||
rendering::ViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), nullptr),
|
||||
aRenderState);
|
||||
}
|
||||
|
||||
@ -430,12 +430,12 @@ Reference<rendering::XBitmap> PresenterButton::GetBitmap (
|
||||
const SharedBitmapDescriptor& mpIcon,
|
||||
const PresenterBitmapDescriptor::Mode eMode)
|
||||
{
|
||||
if (mpIcon.get() != NULL)
|
||||
if (mpIcon.get() != nullptr)
|
||||
return mpIcon->GetBitmap(eMode);
|
||||
else
|
||||
{
|
||||
OSL_ASSERT(mpIcon.get()!=NULL);
|
||||
return NULL;
|
||||
OSL_ASSERT(mpIcon.get()!=nullptr);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -470,7 +470,7 @@ void PresenterButton::SetupButtonBitmaps()
|
||||
|
||||
mxMouseOverBitmap = mxCanvas->getDevice()->createCompatibleAlphaBitmap(maButtonSize);
|
||||
xCanvas.set(mxMouseOverBitmap, UNO_QUERY);
|
||||
if (mpMouseOverFont.get()!=NULL && !mpMouseOverFont->mxFont.is() && mxCanvas.is())
|
||||
if (mpMouseOverFont.get()!=nullptr && !mpMouseOverFont->mxFont.is() && mxCanvas.is())
|
||||
mpMouseOverFont->PrepareFont(mxCanvas);
|
||||
if (xCanvas.is())
|
||||
RenderButton(
|
||||
|
@ -33,10 +33,10 @@ namespace sdext { namespace presenter {
|
||||
PresenterCanvasHelper::PresenterCanvasHelper()
|
||||
: maDefaultViewState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL),
|
||||
nullptr),
|
||||
maDefaultRenderState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE)
|
||||
{
|
||||
@ -66,7 +66,7 @@ void PresenterCanvasHelper::PaintRectangle (
|
||||
const css::rendering::ViewState& rDefaultViewState,
|
||||
const css::rendering::RenderState& rDefaultRenderState)
|
||||
{
|
||||
if (rpBitmap.get() == NULL)
|
||||
if (rpBitmap.get() == nullptr)
|
||||
return;
|
||||
|
||||
if ( ! rxCanvas.is() || ! rxCanvas->getDevice().is())
|
||||
|
@ -36,15 +36,15 @@ static const struct ImplementationEntry gServiceEntries[] =
|
||||
PresenterProtocolHandler::Create,
|
||||
PresenterProtocolHandler::getImplementationName_static,
|
||||
PresenterProtocolHandler::getSupportedServiceNames_static,
|
||||
createSingleComponentFactory, 0, 0
|
||||
createSingleComponentFactory, nullptr, 0
|
||||
},
|
||||
{
|
||||
PresenterScreenJob::Create,
|
||||
PresenterScreenJob::getImplementationName_static,
|
||||
PresenterScreenJob::getSupportedServiceNames_static,
|
||||
createSingleComponentFactory, 0, 0
|
||||
createSingleComponentFactory, nullptr, 0
|
||||
},
|
||||
{ 0, 0, 0, 0, 0, 0 }
|
||||
{ nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
|
||||
};
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL presenter_component_getFactory(
|
||||
|
@ -114,7 +114,7 @@ bool PresenterConfigurationAccess::GoToChild (const OUString& rsPathToNode)
|
||||
return true;
|
||||
}
|
||||
|
||||
mxRoot = NULL;
|
||||
mxRoot = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ bool PresenterConfigurationAccess::GoToChild (const Predicate& rPredicate)
|
||||
if (Reference<XInterface>(maNode, UNO_QUERY).is())
|
||||
return true;
|
||||
|
||||
mxRoot = NULL;
|
||||
mxRoot = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -204,14 +204,14 @@ void PresenterController::disposing()
|
||||
mxMainWindow->removeFocusListener(this);
|
||||
mxMainWindow->removeMouseListener(this);
|
||||
mxMainWindow->removeMouseMotionListener(this);
|
||||
mxMainWindow = NULL;
|
||||
mxMainWindow = nullptr;
|
||||
}
|
||||
if (mxConfigurationController.is())
|
||||
mxConfigurationController->removeConfigurationChangeListener(this);
|
||||
|
||||
Reference<XComponent> xWindowManagerComponent (
|
||||
static_cast<XWeak*>(mpWindowManager.get()), UNO_QUERY);
|
||||
mpWindowManager = NULL;
|
||||
mpWindowManager = nullptr;
|
||||
if (xWindowManagerComponent.is())
|
||||
xWindowManagerComponent->dispose();
|
||||
|
||||
@ -220,29 +220,29 @@ void PresenterController::disposing()
|
||||
Reference<frame::XFrame> xFrame (mxController->getFrame());
|
||||
if (xFrame.is())
|
||||
xFrame->removeFrameActionListener(this);
|
||||
mxController = NULL;
|
||||
mxController = nullptr;
|
||||
}
|
||||
|
||||
mxComponentContext = NULL;
|
||||
mxConfigurationController = NULL;
|
||||
mxSlideShowController = NULL;
|
||||
mxMainPaneId = NULL;
|
||||
mpPaneContainer = NULL;
|
||||
mxComponentContext = nullptr;
|
||||
mxConfigurationController = nullptr;
|
||||
mxSlideShowController = nullptr;
|
||||
mxMainPaneId = nullptr;
|
||||
mpPaneContainer = nullptr;
|
||||
mnCurrentSlideIndex = -1;
|
||||
mxCurrentSlide = NULL;
|
||||
mxNextSlide = NULL;
|
||||
mxCurrentSlide = nullptr;
|
||||
mxNextSlide = nullptr;
|
||||
mpTheme.reset();
|
||||
{
|
||||
Reference<lang::XComponent> xComponent (
|
||||
static_cast<XWeak*>(mpPaneBorderPainter.get()), UNO_QUERY);
|
||||
mpPaneBorderPainter = NULL;
|
||||
mpPaneBorderPainter = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
mpCanvasHelper.reset();
|
||||
{
|
||||
Reference<lang::XComponent> xComponent (mxPresenterHelper, UNO_QUERY);
|
||||
mxPresenterHelper = NULL;
|
||||
mxPresenterHelper = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
@ -250,7 +250,7 @@ void PresenterController::disposing()
|
||||
mnPendingSlideNumber = -1;
|
||||
{
|
||||
Reference<lang::XComponent> xComponent (mxUrlTransformer, UNO_QUERY);
|
||||
mxUrlTransformer = NULL;
|
||||
mxUrlTransformer = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
@ -280,7 +280,7 @@ void PresenterController::GetSlides (const sal_Int32 nOffset)
|
||||
return;
|
||||
|
||||
// Get the current slide from the slide show controller.
|
||||
mxCurrentSlide = NULL;
|
||||
mxCurrentSlide = nullptr;
|
||||
Reference<container::XIndexAccess> xIndexAccess(mxSlideShowController, UNO_QUERY);
|
||||
sal_Int32 nSlideIndex = -1;
|
||||
try
|
||||
@ -303,7 +303,7 @@ void PresenterController::GetSlides (const sal_Int32 nOffset)
|
||||
}
|
||||
|
||||
// Get the next slide.
|
||||
mxNextSlide = NULL;
|
||||
mxNextSlide = nullptr;
|
||||
try
|
||||
{
|
||||
const sal_Int32 nNextSlideIndex (mxSlideShowController->getNextSlideIndex()+nOffset);
|
||||
@ -368,7 +368,7 @@ void PresenterController::UpdatePaneTitles()
|
||||
PresenterPaneContainer::PaneList::const_iterator iPane;
|
||||
for (iPane=mpPaneContainer->maPanes.begin(); iPane!=mpPaneContainer->maPanes.end(); ++iPane)
|
||||
{
|
||||
OSL_ASSERT((*iPane).get() != NULL);
|
||||
OSL_ASSERT((*iPane).get() != nullptr);
|
||||
|
||||
OUString sTemplate (IsAccessibilityActive()
|
||||
? (*iPane)->msAccessibleTitleTemplate
|
||||
@ -431,7 +431,7 @@ void PresenterController::UpdateViews()
|
||||
SharedBitmapDescriptor
|
||||
PresenterController::GetViewBackground (const OUString& rsViewURL) const
|
||||
{
|
||||
if (mpTheme.get() != NULL)
|
||||
if (mpTheme.get() != nullptr)
|
||||
{
|
||||
const OUString sStyleName (mpTheme->GetStyleName(rsViewURL));
|
||||
return mpTheme->GetBitmap(sStyleName, "Background");
|
||||
@ -442,7 +442,7 @@ SharedBitmapDescriptor
|
||||
PresenterTheme::SharedFontDescriptor
|
||||
PresenterController::GetViewFont (const OUString& rsViewURL) const
|
||||
{
|
||||
if (mpTheme.get() != NULL)
|
||||
if (mpTheme.get() != nullptr)
|
||||
{
|
||||
const OUString sStyleName (mpTheme->GetStyleName(rsViewURL));
|
||||
return mpTheme->GetFont(sStyleName);
|
||||
@ -495,7 +495,7 @@ void PresenterController::ShowView (const OUString& rsViewURL)
|
||||
{
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPaneContainer->FindViewURL(rsViewURL));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
pDescriptor->mbIsActive = true;
|
||||
mxConfigurationController->requestResourceActivation(
|
||||
@ -514,7 +514,7 @@ void PresenterController::HideView (const OUString& rsViewURL)
|
||||
{
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPaneContainer->FindViewURL(rsViewURL));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
mxConfigurationController->requestResourceDeactivation(
|
||||
ResourceId::createWithAnchor(
|
||||
@ -543,11 +543,11 @@ void PresenterController::DispatchUnoCommand (const OUString& rsCommand) const
|
||||
Reference<css::frame::XDispatch> PresenterController::GetDispatch (const util::URL& rURL) const
|
||||
{
|
||||
if ( ! mxController.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Reference<frame::XDispatchProvider> xDispatchProvider (mxController->getFrame(), UNO_QUERY);
|
||||
if ( ! xDispatchProvider.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return xDispatchProvider->queryDispatch(
|
||||
rURL,
|
||||
@ -783,7 +783,7 @@ void SAL_CALL PresenterController::notifyConfigurationChange (
|
||||
mpWindowManager->Update();
|
||||
// Request the repainting of the area previously
|
||||
// occupied by the view.
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
GetPaintManager()->Invalidate(pDescriptor->mxBorderWindow);
|
||||
}
|
||||
}
|
||||
@ -806,13 +806,13 @@ void SAL_CALL PresenterController::disposing (
|
||||
throw (RuntimeException, std::exception)
|
||||
{
|
||||
if (rEvent.Source == mxController)
|
||||
mxController = NULL;
|
||||
mxController = nullptr;
|
||||
else if (rEvent.Source == mxConfigurationController)
|
||||
mxConfigurationController = NULL;
|
||||
mxConfigurationController = nullptr;
|
||||
else if (rEvent.Source == mxSlideShowController)
|
||||
mxSlideShowController = NULL;
|
||||
mxSlideShowController = nullptr;
|
||||
else if (rEvent.Source == mxMainWindow)
|
||||
mxMainWindow = NULL;
|
||||
mxMainWindow = nullptr;
|
||||
}
|
||||
|
||||
//----- XFrameActionListener --------------------------------------------------
|
||||
@ -976,7 +976,7 @@ void SAL_CALL PresenterController::keyReleased (const awt::KeyEvent& rEvent)
|
||||
|
||||
case awt::Key::F1:
|
||||
// Toggle the help view.
|
||||
if (mpWindowManager.get() != NULL)
|
||||
if (mpWindowManager.get() != nullptr)
|
||||
{
|
||||
if (mpWindowManager->GetViewMode() != PresenterWindowManager::VM_Help)
|
||||
mpWindowManager->SetViewMode(PresenterWindowManager::VM_Help);
|
||||
@ -1018,7 +1018,7 @@ void PresenterController::HandleNumericKeyPress (
|
||||
// Ctrl-1, Ctrl-2, and Ctrl-3 are used to switch between views
|
||||
// (slide view, notes view, normal). Ctrl-4 switches monitors
|
||||
mnPendingSlideNumber = -1;
|
||||
if (mpWindowManager.get() == NULL)
|
||||
if (mpWindowManager.get() == nullptr)
|
||||
return;
|
||||
switch(nKey)
|
||||
{
|
||||
@ -1120,7 +1120,7 @@ void PresenterController::InitializeMainPane (const Reference<XPane>& rxPane)
|
||||
mpWindowManager->SetParentPane(rxPane);
|
||||
mpWindowManager->SetTheme(mpTheme);
|
||||
|
||||
if (mpPaneBorderPainter.get() != NULL)
|
||||
if (mpPaneBorderPainter.get() != nullptr)
|
||||
mpPaneBorderPainter->SetTheme(mpTheme);
|
||||
|
||||
// Add key listener
|
||||
@ -1190,7 +1190,7 @@ void PresenterController::UpdatePendingSlideNumber (const sal_Int32 nPendingSlid
|
||||
{
|
||||
mnPendingSlideNumber = nPendingSlideNumber;
|
||||
|
||||
if (mpTheme.get() == NULL)
|
||||
if (mpTheme.get() == nullptr)
|
||||
return;
|
||||
|
||||
if ( ! mxMainWindow.is())
|
||||
@ -1198,7 +1198,7 @@ void PresenterController::UpdatePendingSlideNumber (const sal_Int32 nPendingSlid
|
||||
|
||||
PresenterTheme::SharedFontDescriptor pFont (
|
||||
mpTheme->GetFont("PendingSlideNumberFont"));
|
||||
if (pFont.get() == NULL)
|
||||
if (pFont.get() == nullptr)
|
||||
return;
|
||||
|
||||
pFont->PrepareFont(Reference<rendering::XCanvas>(mxCanvas, UNO_QUERY));
|
||||
|
@ -55,7 +55,7 @@ void SAL_CALL PresenterCurrentSlideObserver::disposing()
|
||||
if(mxSlideShowController.is())
|
||||
{
|
||||
mxSlideShowController->removeSlideShowListener(static_cast<XSlideShowListener*>(this));
|
||||
mxSlideShowController = NULL;
|
||||
mxSlideShowController = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ void SAL_CALL PresenterCurrentSlideObserver::disposing (
|
||||
if (rEvent.Source == Reference<XInterface>(static_cast<XWeak*>(mpPresenterController.get())))
|
||||
dispose();
|
||||
else if (rEvent.Source == mxSlideShowController)
|
||||
mxSlideShowController = NULL;
|
||||
mxSlideShowController = nullptr;
|
||||
}
|
||||
|
||||
} } // end of namespace ::sdext::presenter
|
||||
|
@ -92,10 +92,10 @@ void PresenterFrameworkObserver::Shutdown()
|
||||
maAction = Action();
|
||||
maPredicate = Predicate();
|
||||
|
||||
if (mxConfigurationController != NULL)
|
||||
if (mxConfigurationController != nullptr)
|
||||
{
|
||||
mxConfigurationController->removeConfigurationChangeListener(this);
|
||||
mxConfigurationController = NULL;
|
||||
mxConfigurationController = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ void SAL_CALL PresenterFrameworkObserver::disposing (const lang::EventObject& rE
|
||||
|
||||
if (rEvent.Source == mxConfigurationController)
|
||||
{
|
||||
mxConfigurationController = NULL;
|
||||
mxConfigurationController = nullptr;
|
||||
if (maAction)
|
||||
maAction(false);
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ Reference<rendering::XPolyPolygon2D> PresenterGeometryHelper::CreatePolygon(
|
||||
const Reference<rendering::XGraphicDevice>& rxDevice)
|
||||
{
|
||||
if ( ! rxDevice.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Sequence<Sequence<geometry::RealPoint2D> > aPoints(1);
|
||||
aPoints[0] = Sequence<geometry::RealPoint2D>(4);
|
||||
@ -203,7 +203,7 @@ Reference<rendering::XPolyPolygon2D> PresenterGeometryHelper::CreatePolygon(
|
||||
const Reference<rendering::XGraphicDevice>& rxDevice)
|
||||
{
|
||||
if ( ! rxDevice.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Sequence<Sequence<geometry::RealPoint2D> > aPoints(1);
|
||||
aPoints[0] = Sequence<geometry::RealPoint2D>(4);
|
||||
@ -225,7 +225,7 @@ Reference<rendering::XPolyPolygon2D> PresenterGeometryHelper::CreatePolygon(
|
||||
const Reference<rendering::XGraphicDevice>& rxDevice)
|
||||
{
|
||||
if ( ! rxDevice.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
const sal_Int32 nCount (rBoxes.size());
|
||||
Sequence<Sequence<geometry::RealPoint2D> > aPoints(nCount);
|
||||
|
@ -156,7 +156,7 @@ PresenterHelpView::PresenterHelpView (
|
||||
if (mpPresenterController.is())
|
||||
{
|
||||
mpFont = mpPresenterController->GetViewFont(mxViewId->getResourceURL());
|
||||
if (mpFont.get() != NULL)
|
||||
if (mpFont.get() != nullptr)
|
||||
{
|
||||
mpFont->PrepareFont(mxCanvas);
|
||||
}
|
||||
@ -176,8 +176,8 @@ PresenterHelpView::PresenterHelpView (
|
||||
}
|
||||
catch (RuntimeException&)
|
||||
{
|
||||
mxViewId = NULL;
|
||||
mxWindow = NULL;
|
||||
mxViewId = nullptr;
|
||||
mxWindow = nullptr;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -188,13 +188,13 @@ PresenterHelpView::~PresenterHelpView()
|
||||
|
||||
void SAL_CALL PresenterHelpView::disposing()
|
||||
{
|
||||
mxViewId = NULL;
|
||||
mxViewId = nullptr;
|
||||
|
||||
if (mpCloseButton.is())
|
||||
{
|
||||
Reference<lang::XComponent> xComponent (
|
||||
static_cast<XWeak*>(mpCloseButton.get()), UNO_QUERY);
|
||||
mpCloseButton = NULL;
|
||||
mpCloseButton = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
@ -213,11 +213,11 @@ void SAL_CALL PresenterHelpView::disposing (const lang::EventObject& rEventObjec
|
||||
{
|
||||
if (rEventObject.Source == mxCanvas)
|
||||
{
|
||||
mxCanvas = NULL;
|
||||
mxCanvas = nullptr;
|
||||
}
|
||||
else if (rEventObject.Source == mxWindow)
|
||||
{
|
||||
mxWindow = NULL;
|
||||
mxWindow = nullptr;
|
||||
dispose();
|
||||
}
|
||||
}
|
||||
@ -285,7 +285,7 @@ void PresenterHelpView::Paint (const awt::Rectangle& rUpdateBox)
|
||||
|
||||
rendering::RenderState aRenderState (
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, mpFont->mnColor);
|
||||
@ -385,7 +385,7 @@ void PresenterHelpView::ProcessString (
|
||||
|
||||
void PresenterHelpView::CheckFontSize()
|
||||
{
|
||||
if (mpFont.get() == NULL)
|
||||
if (mpFont.get() == nullptr)
|
||||
return;
|
||||
|
||||
sal_Int32 nBestSize (6);
|
||||
@ -421,7 +421,7 @@ void PresenterHelpView::CheckFontSize()
|
||||
if (nHeightDifference<=0 && mpFont->mnSize>nBestSize)
|
||||
nBestSize = mpFont->mnSize;
|
||||
mpFont->mnSize = nFontSizeGuess;
|
||||
mpFont->mxFont = NULL;
|
||||
mpFont->mxFont = nullptr;
|
||||
mpFont->PrepareFont(mxCanvas);
|
||||
|
||||
// Reformat blocks.
|
||||
@ -432,7 +432,7 @@ void PresenterHelpView::CheckFontSize()
|
||||
if (nBestSize != mpFont->mnSize)
|
||||
{
|
||||
mpFont->mnSize = nBestSize;
|
||||
mpFont->mxFont = NULL;
|
||||
mpFont->mxFont = nullptr;
|
||||
mpFont->PrepareFont(mxCanvas);
|
||||
|
||||
// Reformat blocks.
|
||||
@ -482,7 +482,7 @@ void PresenterHelpView::ProvideCanvas()
|
||||
|
||||
void PresenterHelpView::Resize()
|
||||
{
|
||||
if (mpCloseButton.get() != NULL && mxWindow.is())
|
||||
if (mpCloseButton.get() != nullptr && mxWindow.is())
|
||||
{
|
||||
const awt::Rectangle aWindowBox (mxWindow->getPosSize());
|
||||
mnMaximalWidth = (mxWindow->getPosSize().Width - 4*gnHorizontalGap) / 2;
|
||||
|
@ -144,25 +144,25 @@ void SAL_CALL PresenterNotesView::disposing()
|
||||
mxParentWindow->removeWindowListener(this);
|
||||
mxParentWindow->removePaintListener(this);
|
||||
mxParentWindow->removeKeyListener(this);
|
||||
mxParentWindow = NULL;
|
||||
mxParentWindow = nullptr;
|
||||
}
|
||||
|
||||
// Dispose tool bar.
|
||||
{
|
||||
Reference<XComponent> xComponent (static_cast<XWeak*>(mpToolBar.get()), UNO_QUERY);
|
||||
mpToolBar = NULL;
|
||||
mpToolBar = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
{
|
||||
Reference<XComponent> xComponent (mxToolBarCanvas, UNO_QUERY);
|
||||
mxToolBarCanvas = NULL;
|
||||
mxToolBarCanvas = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
{
|
||||
Reference<XComponent> xComponent (mxToolBarWindow, UNO_QUERY);
|
||||
mxToolBarWindow = NULL;
|
||||
mxToolBarWindow = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
@ -170,23 +170,23 @@ void SAL_CALL PresenterNotesView::disposing()
|
||||
// Dispose close button
|
||||
{
|
||||
Reference<XComponent> xComponent (static_cast<XWeak*>(mpCloseButton.get()), UNO_QUERY);
|
||||
mpCloseButton = NULL;
|
||||
mpCloseButton = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
|
||||
// Create the tool bar.
|
||||
|
||||
mpScrollBar = NULL;
|
||||
mpScrollBar = nullptr;
|
||||
|
||||
mxViewId = NULL;
|
||||
mxViewId = nullptr;
|
||||
}
|
||||
|
||||
void PresenterNotesView::CreateToolBar (
|
||||
const css::uno::Reference<css::uno::XComponentContext>& rxContext,
|
||||
const ::rtl::Reference<PresenterController>& rpPresenterController)
|
||||
{
|
||||
if (rpPresenterController.get() == NULL)
|
||||
if (rpPresenterController.get() == nullptr)
|
||||
return;
|
||||
|
||||
Reference<drawing::XPresenterHelper> xPresenterHelper (
|
||||
@ -270,7 +270,7 @@ void PresenterNotesView::SetSlide (const Reference<drawing::XDrawPage>& rxNotesP
|
||||
|
||||
Layout();
|
||||
|
||||
if (mpScrollBar.get() != NULL)
|
||||
if (mpScrollBar.get() != nullptr)
|
||||
{
|
||||
mpScrollBar->SetThumbPosition(0, false);
|
||||
UpdateScrollBar();
|
||||
@ -286,7 +286,7 @@ void SAL_CALL PresenterNotesView::disposing (const lang::EventObject& rEventObje
|
||||
throw (RuntimeException, std::exception)
|
||||
{
|
||||
if (rEventObject.Source == mxParentWindow)
|
||||
mxParentWindow = NULL;
|
||||
mxParentWindow = nullptr;
|
||||
}
|
||||
|
||||
//----- XWindowListener -------------------------------------------------------
|
||||
@ -350,7 +350,7 @@ void SAL_CALL PresenterNotesView::setCurrentPage (const Reference<drawing::XDraw
|
||||
throw (RuntimeException, std::exception)
|
||||
{
|
||||
// Get the associated notes page.
|
||||
mxCurrentNotesPage = NULL;
|
||||
mxCurrentNotesPage = nullptr;
|
||||
try
|
||||
{
|
||||
Reference<presentation::XPresentationPage> xPresentationPage(rxSlide, UNO_QUERY);
|
||||
@ -367,7 +367,7 @@ void SAL_CALL PresenterNotesView::setCurrentPage (const Reference<drawing::XDraw
|
||||
Reference<drawing::XDrawPage> SAL_CALL PresenterNotesView::getCurrentPage()
|
||||
throw (RuntimeException, std::exception)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//----- XKeyListener ----------------------------------------------------------
|
||||
@ -440,13 +440,13 @@ void PresenterNotesView::Layout()
|
||||
mnSeparatorYLocation = aWindowBox.Height - nToolBarHeight - gnSpaceBelowSeparator;
|
||||
aNewTextBoundingBox.Y2 = mnSeparatorYLocation - gnSpaceAboveSeparator;
|
||||
// Place the close button.
|
||||
if (mpCloseButton.get() != NULL)
|
||||
if (mpCloseButton.get() != nullptr)
|
||||
mpCloseButton->SetCenter(geometry::RealPoint2D(
|
||||
(aWindowBox.Width + aToolBarSize.Width) / 2,
|
||||
aWindowBox.Height - aToolBarSize.Height/2));
|
||||
}
|
||||
// Check whether the vertical scroll bar is necessary.
|
||||
if (mpScrollBar.get() != NULL)
|
||||
if (mpScrollBar.get() != nullptr)
|
||||
{
|
||||
bool bShowVerticalScrollbar (false);
|
||||
try
|
||||
@ -519,7 +519,7 @@ void PresenterNotesView::Paint (const awt::Rectangle& rUpdateBox)
|
||||
if ( ! mxCanvas.is())
|
||||
return;
|
||||
|
||||
if (mpBackground.get() == NULL)
|
||||
if (mpBackground.get() == nullptr)
|
||||
mpBackground = mpPresenterController->GetViewBackground(mxViewId->getResourceURL());
|
||||
|
||||
if (rUpdateBox.Y < maTextBoundingBox.Y2
|
||||
@ -542,14 +542,14 @@ void PresenterNotesView::PaintToolBar (const awt::Rectangle& rUpdateBox)
|
||||
|
||||
rendering::ViewState aViewState (
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL);
|
||||
nullptr);
|
||||
rendering::RenderState aRenderState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
|
||||
if (mpBackground.get() != NULL)
|
||||
if (mpBackground.get() != nullptr)
|
||||
{
|
||||
// Paint the background.
|
||||
mpPresenterController->GetCanvasHelper()->Paint(
|
||||
@ -584,11 +584,11 @@ void PresenterNotesView::PaintText (const awt::Rectangle& rUpdateBox)
|
||||
PresenterGeometryHelper::CreatePolygon(aBox, mxCanvas->getDevice()));
|
||||
rendering::RenderState aRenderState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(3),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
|
||||
if (mpBackground.get() != NULL)
|
||||
if (mpBackground.get() != nullptr)
|
||||
{
|
||||
// Paint the background.
|
||||
mpPresenterController->GetCanvasHelper()->Paint(
|
||||
@ -645,7 +645,7 @@ void PresenterNotesView::ChangeFontSize (const sal_Int32 nSizeChange)
|
||||
if (nNewSize > 5)
|
||||
{
|
||||
mpFont->mnSize = nNewSize;
|
||||
mpFont->mxFont = NULL;
|
||||
mpFont->mxFont = nullptr;
|
||||
mpTextView->SetFont(mpFont);
|
||||
|
||||
Layout();
|
||||
@ -660,7 +660,7 @@ void PresenterNotesView::ChangeFontSize (const sal_Int32 nSizeChange)
|
||||
std::shared_ptr<PresenterConfigurationAccess> pConfiguration (
|
||||
mpPresenterController->GetTheme()->GetNodeForViewStyle(
|
||||
sStyleName));
|
||||
if (pConfiguration.get()==NULL || ! pConfiguration->IsValid())
|
||||
if (pConfiguration.get()==nullptr || ! pConfiguration->IsValid())
|
||||
return;
|
||||
|
||||
pConfiguration->GoToChild(OUString("Font"));
|
||||
@ -681,7 +681,7 @@ std::shared_ptr<PresenterTextView> PresenterNotesView::GetTextView() const
|
||||
|
||||
void PresenterNotesView::UpdateScrollBar()
|
||||
{
|
||||
if (mpScrollBar.get() != NULL)
|
||||
if (mpScrollBar.get() != nullptr)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ void PresenterPaintManager::Invalidate (
|
||||
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor(
|
||||
mpPaneContainer->FindContentWindow(rxWindow));
|
||||
if (pDescriptor.get()==NULL || ! pDescriptor->mbIsOpaque)
|
||||
if (pDescriptor.get()==nullptr || ! pDescriptor->mbIsOpaque)
|
||||
nInvalidateMode |= awt::InvalidateStyle::TRANSPARENT;
|
||||
else
|
||||
nInvalidateMode |= awt::InvalidateStyle::NOTRANSPARENT;
|
||||
@ -108,7 +108,7 @@ void PresenterPaintManager::Invalidate (
|
||||
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor(
|
||||
mpPaneContainer->FindContentWindow(rxWindow));
|
||||
if (pDescriptor.get()==NULL || ! pDescriptor->mbIsOpaque)
|
||||
if (pDescriptor.get()==nullptr || ! pDescriptor->mbIsOpaque)
|
||||
nInvalidateMode |= awt::InvalidateStyle::TRANSPARENT;
|
||||
else
|
||||
nInvalidateMode |= awt::InvalidateStyle::NOTRANSPARENT;
|
||||
|
@ -59,7 +59,7 @@ PresenterPaneBase::PresenterPaneBase (
|
||||
mbHasCallout(false),
|
||||
maCalloutAnchor()
|
||||
{
|
||||
if (mpPresenterController.get() != NULL)
|
||||
if (mpPresenterController.get() != nullptr)
|
||||
mxPresenterHelper = mpPresenterController->GetPresenterHelper();
|
||||
}
|
||||
|
||||
@ -77,41 +77,41 @@ void PresenterPaneBase::disposing()
|
||||
|
||||
{
|
||||
Reference<XComponent> xComponent (mxContentCanvas, UNO_QUERY);
|
||||
mxContentCanvas = NULL;
|
||||
mxContentCanvas = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
|
||||
{
|
||||
Reference<XComponent> xComponent (mxContentWindow, UNO_QUERY);
|
||||
mxContentWindow = NULL;
|
||||
mxContentWindow = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
|
||||
{
|
||||
Reference<XComponent> xComponent (mxBorderCanvas, UNO_QUERY);
|
||||
mxBorderCanvas = NULL;
|
||||
mxBorderCanvas = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
|
||||
{
|
||||
Reference<XComponent> xComponent (mxBorderWindow, UNO_QUERY);
|
||||
mxBorderWindow = NULL;
|
||||
mxBorderWindow = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
|
||||
mxComponentContext = NULL;
|
||||
mxComponentContext = nullptr;
|
||||
}
|
||||
|
||||
void PresenterPaneBase::SetTitle (const OUString& rsTitle)
|
||||
{
|
||||
msTitle = rsTitle;
|
||||
|
||||
OSL_ASSERT(mpPresenterController.get()!=NULL);
|
||||
OSL_ASSERT(mpPresenterController->GetPaintManager().get()!=NULL);
|
||||
OSL_ASSERT(mpPresenterController.get()!=nullptr);
|
||||
OSL_ASSERT(mpPresenterController->GetPaintManager().get()!=nullptr);
|
||||
|
||||
mpPresenterController->GetPaintManager()->Invalidate(mxBorderWindow);
|
||||
}
|
||||
@ -245,8 +245,8 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
|
||||
}
|
||||
catch (Exception&)
|
||||
{
|
||||
mxContentWindow = NULL;
|
||||
mxComponentContext = NULL;
|
||||
mxContentWindow = nullptr;
|
||||
mxComponentContext = nullptr;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -310,7 +310,7 @@ void SAL_CALL PresenterPaneBase::disposing (const lang::EventObject& rEvent)
|
||||
{
|
||||
if (rEvent.Source == mxBorderWindow)
|
||||
{
|
||||
mxBorderWindow = NULL;
|
||||
mxBorderWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ void SAL_CALL PresenterPaneBorderPainter::paintBorder (
|
||||
}
|
||||
ProvideTheme(rxCanvas);
|
||||
|
||||
if (mpRenderer.get() != NULL)
|
||||
if (mpRenderer.get() != nullptr)
|
||||
{
|
||||
mpRenderer->SetCanvas(rxCanvas);
|
||||
mpRenderer->SetupClipping(
|
||||
@ -252,7 +252,7 @@ void SAL_CALL PresenterPaneBorderPainter::paintBorderWithCallout (
|
||||
}
|
||||
ProvideTheme(rxCanvas);
|
||||
|
||||
if (mpRenderer.get() != NULL)
|
||||
if (mpRenderer.get() != nullptr)
|
||||
{
|
||||
mpRenderer->SetCanvas(rxCanvas);
|
||||
mpRenderer->SetupClipping(
|
||||
@ -274,12 +274,12 @@ awt::Point SAL_CALL PresenterPaneBorderPainter::getCalloutOffset (
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
ProvideTheme();
|
||||
if (mpRenderer.get() != NULL)
|
||||
if (mpRenderer.get() != nullptr)
|
||||
{
|
||||
const std::shared_ptr<RendererPaneStyle> pRendererPaneStyle(
|
||||
mpRenderer->GetRendererPaneStyle(rsPaneBorderStyleName));
|
||||
if (pRendererPaneStyle.get() != NULL
|
||||
&& pRendererPaneStyle->mpBottomCallout.get() != NULL)
|
||||
if (pRendererPaneStyle.get() != nullptr
|
||||
&& pRendererPaneStyle->mpBottomCallout.get() != nullptr)
|
||||
{
|
||||
return awt::Point (
|
||||
0,
|
||||
@ -300,7 +300,7 @@ bool PresenterPaneBorderPainter::ProvideTheme (const Reference<rendering::XCanva
|
||||
if ( ! mxContext.is())
|
||||
return false;
|
||||
|
||||
if (mpTheme.get() != NULL)
|
||||
if (mpTheme.get() != nullptr)
|
||||
{
|
||||
// Check if the theme already has a canvas.
|
||||
if ( ! mpTheme->HasCanvas())
|
||||
@ -315,9 +315,9 @@ bool PresenterPaneBorderPainter::ProvideTheme (const Reference<rendering::XCanva
|
||||
bModified = true;
|
||||
}
|
||||
|
||||
if (mpTheme.get() != NULL && bModified)
|
||||
if (mpTheme.get() != nullptr && bModified)
|
||||
{
|
||||
if (mpRenderer.get() == NULL)
|
||||
if (mpRenderer.get() == nullptr)
|
||||
mpRenderer.reset(new Renderer(mxContext, mpTheme));
|
||||
else
|
||||
mpRenderer->SetCanvas(rxCanvas);
|
||||
@ -328,10 +328,10 @@ bool PresenterPaneBorderPainter::ProvideTheme (const Reference<rendering::XCanva
|
||||
|
||||
bool PresenterPaneBorderPainter::ProvideTheme()
|
||||
{
|
||||
if (mpTheme.get() == NULL)
|
||||
if (mpTheme.get() == nullptr)
|
||||
{
|
||||
// Create a theme without bitmaps (no canvas => no bitmaps).
|
||||
return ProvideTheme(NULL);
|
||||
return ProvideTheme(nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -344,7 +344,7 @@ bool PresenterPaneBorderPainter::ProvideTheme()
|
||||
void PresenterPaneBorderPainter::SetTheme (const std::shared_ptr<PresenterTheme>& rpTheme)
|
||||
{
|
||||
mpTheme = rpTheme;
|
||||
if (mpRenderer.get() == NULL)
|
||||
if (mpRenderer.get() == nullptr)
|
||||
mpRenderer.reset(new Renderer(mxContext, mpTheme));
|
||||
}
|
||||
|
||||
@ -353,10 +353,10 @@ awt::Rectangle PresenterPaneBorderPainter::AddBorder (
|
||||
const awt::Rectangle& rInnerBox,
|
||||
const css::drawing::framework::BorderType eBorderType) const
|
||||
{
|
||||
if (mpRenderer.get() != NULL)
|
||||
if (mpRenderer.get() != nullptr)
|
||||
{
|
||||
const std::shared_ptr<RendererPaneStyle> pRendererPaneStyle(mpRenderer->GetRendererPaneStyle(rsPaneURL));
|
||||
if (pRendererPaneStyle.get() != NULL)
|
||||
if (pRendererPaneStyle.get() != nullptr)
|
||||
return pRendererPaneStyle->AddBorder(rInnerBox, eBorderType);
|
||||
}
|
||||
return rInnerBox;
|
||||
@ -367,10 +367,10 @@ awt::Rectangle PresenterPaneBorderPainter::RemoveBorder (
|
||||
const css::awt::Rectangle& rOuterBox,
|
||||
const css::drawing::framework::BorderType eBorderType) const
|
||||
{
|
||||
if (mpRenderer.get() != NULL)
|
||||
if (mpRenderer.get() != nullptr)
|
||||
{
|
||||
const std::shared_ptr<RendererPaneStyle> pRendererPaneStyle(mpRenderer->GetRendererPaneStyle(rsPaneURL));
|
||||
if (pRendererPaneStyle.get() != NULL)
|
||||
if (pRendererPaneStyle.get() != nullptr)
|
||||
return pRendererPaneStyle->RemoveBorder(rOuterBox, eBorderType);
|
||||
}
|
||||
return rOuterBox;
|
||||
@ -397,7 +397,7 @@ PresenterPaneBorderPainter::Renderer::Renderer (
|
||||
maRendererPaneStyles(),
|
||||
mxCanvas(),
|
||||
mxPresenterHelper(),
|
||||
maViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL),
|
||||
maViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), nullptr),
|
||||
mxViewStateClip(),
|
||||
mbHasCallout(false),
|
||||
maCalloutAnchor()
|
||||
@ -438,7 +438,7 @@ void PresenterPaneBorderPainter::Renderer::PaintBorder (
|
||||
|
||||
// Create the outer and inner border of the, ahm, border.
|
||||
std::shared_ptr<RendererPaneStyle> pStyle (GetRendererPaneStyle(rsPaneURL));
|
||||
if (pStyle.get() == NULL)
|
||||
if (pStyle.get() == nullptr)
|
||||
return;
|
||||
|
||||
awt::Rectangle aOuterBox (rBBox);
|
||||
@ -567,7 +567,7 @@ void PresenterPaneBorderPainter::Renderer::PaintTitle (
|
||||
|
||||
rendering::RenderState aRenderState(
|
||||
geometry::AffineMatrix2D(1,0,nX, 0,1,nY),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
|
||||
@ -605,7 +605,7 @@ void PresenterPaneBorderPainter::Renderer::PaintTitle (
|
||||
std::shared_ptr<RendererPaneStyle>
|
||||
PresenterPaneBorderPainter::Renderer::GetRendererPaneStyle (const OUString& rsResourceURL)
|
||||
{
|
||||
OSL_ASSERT(mpTheme.get()!=NULL);
|
||||
OSL_ASSERT(mpTheme.get()!=nullptr);
|
||||
|
||||
RendererPaneStyleContainer::const_iterator iStyle (maRendererPaneStyles.find(rsResourceURL));
|
||||
if (iStyle == maRendererPaneStyles.end())
|
||||
@ -734,7 +734,7 @@ void PresenterPaneBorderPainter::Renderer::PaintBitmap(
|
||||
geometry::AffineMatrix2D(
|
||||
double(nW)/rpBitmap->mnWidth, 0, nX,
|
||||
0, double(nH)/rpBitmap->mnHeight, nY),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::OVER);
|
||||
|
||||
@ -750,14 +750,14 @@ void PresenterPaneBorderPainter::Renderer::SetupClipping (
|
||||
const awt::Rectangle& rOuterBox,
|
||||
const OUString& rsPaneStyleName)
|
||||
{
|
||||
mxViewStateClip = NULL;
|
||||
maViewState.Clip = NULL;
|
||||
mxViewStateClip = nullptr;
|
||||
maViewState.Clip = nullptr;
|
||||
|
||||
if ( ! mxCanvas.is())
|
||||
return;
|
||||
|
||||
std::shared_ptr<RendererPaneStyle> pStyle (GetRendererPaneStyle(rsPaneStyleName));
|
||||
if (pStyle.get() == NULL)
|
||||
if (pStyle.get() == nullptr)
|
||||
{
|
||||
mxViewStateClip = PresenterGeometryHelper::CreatePolygon(
|
||||
rUpdateBox,
|
||||
@ -815,7 +815,7 @@ RendererPaneStyle::RendererPaneStyle (
|
||||
maOuterBorderSize(),
|
||||
maTotalBorderSize()
|
||||
{
|
||||
if (rpTheme.get() != NULL)
|
||||
if (rpTheme.get() != nullptr)
|
||||
{
|
||||
mpTopLeft = GetBitmap(rpTheme, rsStyleName, "TopLeft");
|
||||
mpTop = GetBitmap(rpTheme, rsStyleName, "Top");
|
||||
@ -832,7 +832,7 @@ RendererPaneStyle::RendererPaneStyle (
|
||||
mpFont = rpTheme->GetFont(rsStyleName);
|
||||
|
||||
OUString sAnchor ("Left");
|
||||
if (mpFont.get() != NULL)
|
||||
if (mpFont.get() != nullptr)
|
||||
{
|
||||
sAnchor = mpFont->msAnchor;
|
||||
mnFontXOffset = mpFont->mnXOffset;
|
||||
@ -876,7 +876,7 @@ awt::Rectangle RendererPaneStyle::AddBorder (
|
||||
const awt::Rectangle& rBox,
|
||||
const drawing::framework::BorderType eBorderType) const
|
||||
{
|
||||
const BorderSize* pBorderSize = NULL;
|
||||
const BorderSize* pBorderSize = nullptr;
|
||||
switch (eBorderType)
|
||||
{
|
||||
case drawing::framework::BorderType_INNER_BORDER:
|
||||
@ -902,7 +902,7 @@ awt::Rectangle RendererPaneStyle::RemoveBorder (
|
||||
const awt::Rectangle& rBox,
|
||||
const css::drawing::framework::BorderType eBorderType) const
|
||||
{
|
||||
const BorderSize* pBorderSize = NULL;
|
||||
const BorderSize* pBorderSize = nullptr;
|
||||
switch (eBorderType)
|
||||
{
|
||||
case drawing::framework::BorderType_INNER_BORDER:
|
||||
@ -927,7 +927,7 @@ awt::Rectangle RendererPaneStyle::RemoveBorder (
|
||||
const Reference<rendering::XCanvasFont> RendererPaneStyle::GetFont (
|
||||
const Reference<rendering::XCanvas>& rxCanvas) const
|
||||
{
|
||||
if (mpFont.get() != NULL)
|
||||
if (mpFont.get() != nullptr)
|
||||
mpFont->PrepareFont(rxCanvas);
|
||||
return mpFont->mxFont;
|
||||
}
|
||||
@ -946,7 +946,7 @@ SharedBitmapDescriptor RendererPaneStyle::GetBitmap(
|
||||
const OUString& rsBitmapName)
|
||||
{
|
||||
SharedBitmapDescriptor pDescriptor (rpTheme->GetBitmap(rsStyleName, rsBitmapName));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
return pDescriptor;
|
||||
else
|
||||
return mpEmpty;
|
||||
|
@ -67,13 +67,13 @@ void PresenterPaneContainer::PreparePane (
|
||||
return;
|
||||
|
||||
SharedPaneDescriptor pPane (FindPaneURL(rxPaneId->getResourceURL()));
|
||||
if (pPane.get() == NULL)
|
||||
if (pPane.get() == nullptr)
|
||||
{
|
||||
// No entry found for the given pane id. Create a new one.
|
||||
SharedPaneDescriptor pDescriptor (new PaneDescriptor());
|
||||
pDescriptor->mxPaneId = rxPaneId;
|
||||
pDescriptor->msViewURL = rsViewURL;
|
||||
pDescriptor->mxPane = NULL;
|
||||
pDescriptor->mxPane = nullptr;
|
||||
if (rsTitle.indexOf('%') < 0)
|
||||
{
|
||||
pDescriptor->msTitle = rsTitle;
|
||||
@ -123,11 +123,11 @@ PresenterPaneContainer::SharedPaneDescriptor
|
||||
sPaneURL = xPaneId->getResourceURL();
|
||||
|
||||
pDescriptor = FindPaneURL(sPaneURL);
|
||||
if (pDescriptor.get() == NULL)
|
||||
if (pDescriptor.get() == nullptr)
|
||||
PreparePane(xPaneId, OUString(), OUString(), OUString(),
|
||||
false, ViewInitializationFunction(), 0,0,0,0);
|
||||
pDescriptor = FindPaneURL(sPaneURL);
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
Reference<awt::XWindow> xWindow (rxPane->getWindow());
|
||||
pDescriptor->mxContentWindow = xWindow;
|
||||
@ -160,7 +160,7 @@ PresenterPaneContainer::SharedPaneDescriptor
|
||||
sPaneURL = rxPaneId->getResourceURL();
|
||||
|
||||
SharedPaneDescriptor pDescriptor (FindPaneURL(sPaneURL));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
pDescriptor->mxBorderWindow = rxBorderWindow;
|
||||
return pDescriptor;
|
||||
@ -188,7 +188,7 @@ PresenterPaneContainer::SharedPaneDescriptor
|
||||
}
|
||||
|
||||
pDescriptor = FindPaneURL(sPaneURL);
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
pDescriptor->mxView = rxView;
|
||||
pDescriptor->mpViewBackground = rpViewBackground;
|
||||
@ -217,14 +217,14 @@ PresenterPaneContainer::SharedPaneDescriptor
|
||||
PresenterPaneContainer::RemovePane (const Reference<XResourceId>& rxPaneId)
|
||||
{
|
||||
SharedPaneDescriptor pDescriptor (FindPaneId(rxPaneId));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
if (pDescriptor->mxContentWindow.is())
|
||||
pDescriptor->mxContentWindow->removeEventListener(this);
|
||||
pDescriptor->mxContentWindow = NULL;
|
||||
pDescriptor->mxBorderWindow = NULL;
|
||||
pDescriptor->mxPane = NULL;
|
||||
pDescriptor->mxView = NULL;
|
||||
pDescriptor->mxContentWindow = nullptr;
|
||||
pDescriptor->mxBorderWindow = nullptr;
|
||||
pDescriptor->mxPane = nullptr;
|
||||
pDescriptor->mxView = nullptr;
|
||||
pDescriptor->mbIsActive = false;
|
||||
}
|
||||
return pDescriptor;
|
||||
@ -247,9 +247,9 @@ PresenterPaneContainer::SharedPaneDescriptor
|
||||
}
|
||||
|
||||
pDescriptor = FindPaneURL(sPaneURL);
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
pDescriptor->mxView = NULL;
|
||||
pDescriptor->mxView = nullptr;
|
||||
pDescriptor->mpViewBackground = SharedBitmapDescriptor();
|
||||
}
|
||||
}
|
||||
@ -329,7 +329,7 @@ PresenterPaneContainer::SharedPaneDescriptor PresenterPaneContainer::FindViewURL
|
||||
OUString PresenterPaneContainer::GetPaneURLForViewURL (const OUString& rsViewURL)
|
||||
{
|
||||
SharedPaneDescriptor pDescriptor (FindViewURL(rsViewURL));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
if (pDescriptor->mxPaneId.is())
|
||||
return pDescriptor->mxPaneId->getResourceURL();
|
||||
return OUString();
|
||||
@ -337,7 +337,7 @@ OUString PresenterPaneContainer::GetPaneURLForViewURL (const OUString& rsViewURL
|
||||
|
||||
void PresenterPaneContainer::ToTop (const SharedPaneDescriptor& rpDescriptor)
|
||||
{
|
||||
if (rpDescriptor.get() != NULL)
|
||||
if (rpDescriptor.get() != nullptr)
|
||||
{
|
||||
// Find iterator for pDescriptor.
|
||||
PaneList::iterator iPane;
|
||||
@ -365,7 +365,7 @@ void SAL_CALL PresenterPaneContainer::disposing (
|
||||
{
|
||||
SharedPaneDescriptor pDescriptor (
|
||||
FindContentWindow(Reference<awt::XWindow>(rEvent.Source, UNO_QUERY)));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
RemovePane(pDescriptor->mxPaneId);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ void SAL_CALL PresenterPaneFactory::disposing()
|
||||
mxConfigurationControllerWeak = WeakReference<XConfigurationController>();
|
||||
|
||||
// Dispose the panes in the cache.
|
||||
if (mpResourceCache.get() != NULL)
|
||||
if (mpResourceCache.get() != nullptr)
|
||||
{
|
||||
ResourceContainer::const_iterator iPane (mpResourceCache->begin());
|
||||
ResourceContainer::const_iterator iEnd (mpResourceCache->end());
|
||||
@ -147,13 +147,13 @@ Reference<XResource> SAL_CALL PresenterPaneFactory::createResource (
|
||||
ThrowIfDisposed();
|
||||
|
||||
if ( ! rxPaneId.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
const OUString sPaneURL (rxPaneId->getResourceURL());
|
||||
if (sPaneURL.isEmpty())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
if (mpResourceCache.get() != NULL)
|
||||
if (mpResourceCache.get() != nullptr)
|
||||
{
|
||||
// Has the requested resource already been created?
|
||||
ResourceContainer::const_iterator iResource (mpResourceCache->find(sPaneURL));
|
||||
@ -164,7 +164,7 @@ Reference<XResource> SAL_CALL PresenterPaneFactory::createResource (
|
||||
mpPresenterController->GetPaneContainer());
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
pPaneContainer->FindPaneURL(sPaneURL));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
pDescriptor->SetActivationState(true);
|
||||
if (pDescriptor->mxBorderWindow.is())
|
||||
@ -195,13 +195,13 @@ void SAL_CALL PresenterPaneFactory::releaseResource (const Reference<XResource>&
|
||||
const OUString sPaneURL (rxResource->getResourceId()->getResourceURL());
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
pPaneContainer->FindPaneURL(sPaneURL));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
pDescriptor->SetActivationState(false);
|
||||
if (pDescriptor->mxBorderWindow.is())
|
||||
pDescriptor->mxBorderWindow->setVisible(sal_False);
|
||||
|
||||
if (mpResourceCache.get() != NULL)
|
||||
if (mpResourceCache.get() != nullptr)
|
||||
{
|
||||
// Store the pane in the cache.
|
||||
(*mpResourceCache)[sPaneURL] = rxResource;
|
||||
@ -223,19 +223,19 @@ Reference<XResource> PresenterPaneFactory::CreatePane (
|
||||
const OUString& rsTitle)
|
||||
{
|
||||
if ( ! rxPaneId.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Reference<XConfigurationController> xCC (mxConfigurationControllerWeak);
|
||||
if ( ! xCC.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Reference<XComponentContext> xContext (mxComponentContextWeak);
|
||||
if ( ! xContext.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Reference<XPane> xParentPane (xCC->getResource(rxPaneId->getAnchor()), UNO_QUERY);
|
||||
if ( ! xParentPane.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
try
|
||||
{
|
||||
@ -250,7 +250,7 @@ Reference<XResource> PresenterPaneFactory::CreatePane (
|
||||
OSL_ASSERT(false);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference<XResource> PresenterPaneFactory::CreatePane (
|
||||
@ -295,7 +295,7 @@ Reference<XResource> PresenterPaneFactory::CreatePane (
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor(
|
||||
pContainer->StoreBorderWindow(rxPaneId, xPane->GetBorderWindow()));
|
||||
pContainer->StorePane(xPane);
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
if (bIsSpritePane)
|
||||
{
|
||||
|
@ -373,10 +373,10 @@ Reference<frame::XDispatch> PresenterProtocolHandler::Dispatch::Create (
|
||||
const ::rtl::Reference<PresenterController>& rpPresenterController)
|
||||
{
|
||||
::rtl::Reference<Dispatch> pDispatch (new Dispatch (rsURLPath, rpPresenterController));
|
||||
if (pDispatch->mpCommand.get() != NULL)
|
||||
if (pDispatch->mpCommand.get() != nullptr)
|
||||
return Reference<frame::XDispatch>(pDispatch.get());
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PresenterProtocolHandler::Dispatch::Dispatch (
|
||||
@ -389,7 +389,7 @@ PresenterProtocolHandler::Dispatch::Dispatch (
|
||||
maStatusListenerContainer(),
|
||||
mbIsListeningToWindowManager(false)
|
||||
{
|
||||
if (mpCommand.get() != NULL)
|
||||
if (mpCommand.get() != nullptr)
|
||||
{
|
||||
mpPresenterController->GetWindowManager()->AddLayoutListener(this);
|
||||
mbIsListeningToWindowManager = true;
|
||||
@ -401,7 +401,7 @@ Command* PresenterProtocolHandler::Dispatch::CreateCommand (
|
||||
const ::rtl::Reference<PresenterController>& rpPresenterController)
|
||||
{
|
||||
if (rsURLPath.getLength() <= 5)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
if (rsURLPath == "CloseNotes")
|
||||
return new SetNotesViewCommand(false, rpPresenterController);
|
||||
@ -430,7 +430,7 @@ Command* PresenterProtocolHandler::Dispatch::CreateCommand (
|
||||
if (rsURLPath == "ShrinkNotesFont")
|
||||
return new NotesFontSizeCommand(rpPresenterController, -1);
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PresenterProtocolHandler::Dispatch::~Dispatch()
|
||||
@ -441,7 +441,7 @@ void PresenterProtocolHandler::Dispatch::disposing()
|
||||
{
|
||||
if (mbIsListeningToWindowManager)
|
||||
{
|
||||
if (mpPresenterController.get() != NULL)
|
||||
if (mpPresenterController.get() != nullptr)
|
||||
mpPresenterController->GetWindowManager()->RemoveLayoutListener(this);
|
||||
mbIsListeningToWindowManager = false;
|
||||
}
|
||||
@ -463,7 +463,7 @@ void SAL_CALL PresenterProtocolHandler::Dispatch::dispatch(
|
||||
if (rURL.Protocol == "vnd.org.libreoffice.presenterscreen:"
|
||||
&& rURL.Path == msURLPath)
|
||||
{
|
||||
if (mpCommand.get() != NULL)
|
||||
if (mpCommand.get() != nullptr)
|
||||
mpCommand->Execute();
|
||||
}
|
||||
else
|
||||
@ -769,14 +769,14 @@ NotesFontSizeCommand::NotesFontSizeCommand(
|
||||
|
||||
::rtl::Reference<PresenterNotesView> NotesFontSizeCommand::GetNotesView() const
|
||||
{
|
||||
if (mpPresenterController.get() == NULL)
|
||||
return NULL;
|
||||
if (mpPresenterController.get() == nullptr)
|
||||
return nullptr;
|
||||
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPresenterController->GetPaneContainer()->FindViewURL(
|
||||
PresenterViewFactory::msNotesViewURL));
|
||||
if (pDescriptor.get() == NULL)
|
||||
return NULL;
|
||||
if (pDescriptor.get() == nullptr)
|
||||
return nullptr;
|
||||
|
||||
return dynamic_cast<PresenterNotesView*>(pDescriptor->mxView.get());
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ PresenterScreenJob::~PresenterScreenJob()
|
||||
|
||||
void SAL_CALL PresenterScreenJob::disposing()
|
||||
{
|
||||
mxComponentContext = NULL;
|
||||
mxComponentContext = nullptr;
|
||||
}
|
||||
|
||||
//----- XJob -----------------------------------------------------------
|
||||
@ -208,7 +208,7 @@ void SAL_CALL PresenterScreenListener::disposing()
|
||||
if (mpPresenterScreen.is())
|
||||
{
|
||||
mpPresenterScreen->RequestShutdownPresenterScreen();
|
||||
mpPresenterScreen = NULL;
|
||||
mpPresenterScreen = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ void SAL_CALL PresenterScreenListener::notifyEvent( const css::document::EventOb
|
||||
if (mpPresenterScreen.is())
|
||||
{
|
||||
mpPresenterScreen->RequestShutdownPresenterScreen();
|
||||
mpPresenterScreen = NULL;
|
||||
mpPresenterScreen = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -244,7 +244,7 @@ void SAL_CALL PresenterScreenListener::disposing (const css::lang::EventObject&
|
||||
if (mpPresenterScreen.is())
|
||||
{
|
||||
mpPresenterScreen->RequestShutdownPresenterScreen();
|
||||
mpPresenterScreen = NULL;
|
||||
mpPresenterScreen = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@ void SAL_CALL PresenterScreen::disposing()
|
||||
{
|
||||
xCC->restoreConfiguration(mxSavedConfiguration);
|
||||
}
|
||||
mxConfigurationControllerWeak = Reference<XConfigurationController>(NULL);
|
||||
mxConfigurationControllerWeak = Reference<XConfigurationController>(nullptr);
|
||||
|
||||
Reference<lang::XComponent> xViewFactoryComponent (mxViewFactory, UNO_QUERY);
|
||||
if (xViewFactoryComponent.is())
|
||||
@ -315,7 +315,7 @@ void SAL_CALL PresenterScreen::disposing()
|
||||
if (xPaneFactoryComponent.is())
|
||||
xPaneFactoryComponent->dispose();
|
||||
|
||||
mxModel = NULL;
|
||||
mxModel = nullptr;
|
||||
}
|
||||
|
||||
//----- XEventListener --------------------------------------------------------
|
||||
@ -560,7 +560,7 @@ Reference<drawing::framework::XResourceId> PresenterScreen::GetMainPaneId (
|
||||
// displays. That leaves no room for the presenter.
|
||||
const sal_Int32 nScreen(GetPresenterScreenNumber(rxPresentation));
|
||||
if (nScreen < 0)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
return ResourceId::create(
|
||||
Reference<XComponentContext>(mxContextWeak),
|
||||
@ -578,7 +578,7 @@ void PresenterScreen::RequestShutdownPresenterScreen()
|
||||
if (xCC.is() && mxSavedConfiguration.is())
|
||||
{
|
||||
xCC->restoreConfiguration(mxSavedConfiguration);
|
||||
mxSavedConfiguration = NULL;
|
||||
mxSavedConfiguration = nullptr;
|
||||
}
|
||||
|
||||
if (xCC.is())
|
||||
@ -600,14 +600,14 @@ void PresenterScreen::ShutdownPresenterScreen()
|
||||
Reference<lang::XComponent> xViewFactoryComponent (mxViewFactory, UNO_QUERY);
|
||||
if (xViewFactoryComponent.is())
|
||||
xViewFactoryComponent->dispose();
|
||||
mxViewFactory = NULL;
|
||||
mxViewFactory = nullptr;
|
||||
|
||||
Reference<lang::XComponent> xPaneFactoryComponent (mxPaneFactory, UNO_QUERY);
|
||||
if (xPaneFactoryComponent.is())
|
||||
xPaneFactoryComponent->dispose();
|
||||
mxPaneFactory = NULL;
|
||||
mxPaneFactory = nullptr;
|
||||
|
||||
if (mpPresenterController.get() != NULL)
|
||||
if (mpPresenterController.get() != nullptr)
|
||||
{
|
||||
mpPresenterController->dispose();
|
||||
mpPresenterController.clear();
|
||||
@ -844,7 +844,7 @@ void PresenterScreen::SetupView(
|
||||
aViewDescriptor = iDescriptor->second;
|
||||
|
||||
// Prepare the pane.
|
||||
OSL_ASSERT(mpPaneContainer.get() != NULL);
|
||||
OSL_ASSERT(mpPaneContainer.get() != nullptr);
|
||||
mpPaneContainer->PreparePane(
|
||||
xPaneId,
|
||||
rsViewURL,
|
||||
|
@ -154,7 +154,7 @@ void SAL_CALL PresenterScrollBar::disposing()
|
||||
mxWindow->removeMouseMotionListener(this);
|
||||
|
||||
Reference<lang::XComponent> xComponent (mxWindow, UNO_QUERY);
|
||||
mxWindow = NULL;
|
||||
mxWindow = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
@ -245,7 +245,7 @@ void PresenterScrollBar::SetCanvas (const Reference<css::rendering::XCanvas>& rx
|
||||
mxCanvas = rxCanvas;
|
||||
if (mxCanvas.is())
|
||||
{
|
||||
if (mpBitmaps.get()==NULL)
|
||||
if (mpBitmaps.get()==nullptr)
|
||||
{
|
||||
if (mpSharedBitmaps.expired())
|
||||
{
|
||||
@ -458,7 +458,7 @@ void SAL_CALL PresenterScrollBar::disposing (const css::lang::EventObject& rEven
|
||||
throw (css::uno::RuntimeException, std::exception)
|
||||
{
|
||||
if (rEvent.Source == mxWindow)
|
||||
mxWindow = NULL;
|
||||
mxWindow = nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -474,7 +474,7 @@ void PresenterScrollBar::Repaint (
|
||||
const geometry::RealRectangle2D& rBox,
|
||||
const bool bAsynchronousUpdate)
|
||||
{
|
||||
if (mpPaintManager.get() != NULL)
|
||||
if (mpPaintManager.get() != nullptr)
|
||||
mpPaintManager->Invalidate(
|
||||
mxWindow,
|
||||
PresenterGeometryHelper::ConvertRectangle(rBox),
|
||||
@ -484,7 +484,7 @@ void PresenterScrollBar::Repaint (
|
||||
void PresenterScrollBar::PaintBackground(
|
||||
const css::awt::Rectangle& rUpdateBox)
|
||||
{
|
||||
if (mpBackgroundBitmap.get() == NULL)
|
||||
if (mpBackgroundBitmap.get() == nullptr)
|
||||
return;
|
||||
|
||||
const awt::Rectangle aWindowBox (mxWindow->getPosSize());
|
||||
@ -528,7 +528,7 @@ void PresenterScrollBar::PaintBitmap(
|
||||
geometry::AffineMatrix2D(
|
||||
1,0,aBox.X1 + (aBox.X2-aBox.X1 - aBitmapSize.Width)/2,
|
||||
0,1,aBox.Y1 + (aBox.Y2-aBox.Y1 - aBitmapSize.Height)/2),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
|
||||
@ -582,7 +582,7 @@ void PresenterScrollBar::UpdateWidthOrHeight (
|
||||
sal_Int32& rSize,
|
||||
const SharedBitmapDescriptor& rpDescriptor)
|
||||
{
|
||||
if (rpDescriptor.get() != NULL)
|
||||
if (rpDescriptor.get() != nullptr)
|
||||
{
|
||||
Reference<rendering::XBitmap> xBitmap (rpDescriptor->GetNormalBitmap());
|
||||
if (xBitmap.is())
|
||||
@ -599,8 +599,8 @@ css::uno::Reference<css::rendering::XBitmap> PresenterScrollBar::GetBitmap (
|
||||
const Area eArea,
|
||||
const SharedBitmapDescriptor& rpBitmaps) const
|
||||
{
|
||||
if (rpBitmaps.get() == NULL)
|
||||
return NULL;
|
||||
if (rpBitmaps.get() == nullptr)
|
||||
return nullptr;
|
||||
else
|
||||
return rpBitmaps->GetBitmap(GetBitmapMode(eArea));
|
||||
}
|
||||
@ -684,7 +684,7 @@ void PresenterVerticalScrollBar::UpdateBorders()
|
||||
const awt::Rectangle aWindowBox (mxWindow->getPosSize());
|
||||
double nBottom = aWindowBox.Height;
|
||||
|
||||
if (mpNextButtonDescriptor.get() != NULL)
|
||||
if (mpNextButtonDescriptor.get() != nullptr)
|
||||
{
|
||||
Reference<rendering::XBitmap> xBitmap (mpNextButtonDescriptor->GetNormalBitmap());
|
||||
if (xBitmap.is())
|
||||
@ -695,7 +695,7 @@ void PresenterVerticalScrollBar::UpdateBorders()
|
||||
nBottom -= aSize.Height + gnScrollBarGap;
|
||||
}
|
||||
}
|
||||
if (mpPrevButtonDescriptor.get() != NULL)
|
||||
if (mpPrevButtonDescriptor.get() != nullptr)
|
||||
{
|
||||
Reference<rendering::XBitmap> xBitmap (mpPrevButtonDescriptor->GetNormalBitmap());
|
||||
if (xBitmap.is())
|
||||
@ -747,7 +747,7 @@ void PresenterVerticalScrollBar::UpdateBorders()
|
||||
|
||||
void PresenterVerticalScrollBar::UpdateBitmaps()
|
||||
{
|
||||
if (mpBitmaps.get() != NULL)
|
||||
if (mpBitmaps.get() != nullptr)
|
||||
{
|
||||
mpPrevButtonDescriptor = mpBitmaps->GetBitmap("Up");
|
||||
mpNextButtonDescriptor = mpBitmaps->GetBitmap("Down");
|
||||
@ -812,7 +812,7 @@ PresenterScrollBar::MousePressRepeater::MousePressRepeater (
|
||||
void PresenterScrollBar::MousePressRepeater::Dispose()
|
||||
{
|
||||
Stop();
|
||||
mpScrollBar = NULL;
|
||||
mpScrollBar = nullptr;
|
||||
}
|
||||
|
||||
void PresenterScrollBar::MousePressRepeater::Start (const PresenterScrollBar::Area& reArea)
|
||||
@ -861,7 +861,7 @@ void PresenterScrollBar::MousePressRepeater::Callback (const TimeValue& rCurrent
|
||||
{
|
||||
(void)rCurrentTime;
|
||||
|
||||
if (mpScrollBar.get() == NULL)
|
||||
if (mpScrollBar.get() == nullptr)
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
|
@ -87,7 +87,7 @@ PresenterSlidePreview::PresenterSlidePreview (
|
||||
mxWindow->setVisible(sal_True);
|
||||
}
|
||||
|
||||
if (mpPresenterController.get() != NULL)
|
||||
if (mpPresenterController.get() != nullptr)
|
||||
mnSlideAspectRatio = mpPresenterController->GetSlideAspectRatio();
|
||||
|
||||
Reference<lang::XMultiComponentFactory> xFactory (rxContext->getServiceManager(), UNO_QUERY);
|
||||
@ -115,8 +115,8 @@ void SAL_CALL PresenterSlidePreview::disposing()
|
||||
{
|
||||
mxWindow->removeWindowListener(this);
|
||||
mxWindow->removePaintListener(this);
|
||||
mxWindow = NULL;
|
||||
mxCanvas = NULL;
|
||||
mxWindow = nullptr;
|
||||
mxCanvas = nullptr;
|
||||
}
|
||||
|
||||
Reference<lang::XComponent> xComponent (mxPreviewRenderer, UNO_QUERY);
|
||||
@ -193,9 +193,9 @@ void SAL_CALL PresenterSlidePreview::disposing (const lang::EventObject& rEvent)
|
||||
{
|
||||
if (rEvent.Source == mxWindow)
|
||||
{
|
||||
mxWindow = NULL;
|
||||
mxCanvas = NULL;
|
||||
mxPreview = NULL;
|
||||
mxWindow = nullptr;
|
||||
mxCanvas = nullptr;
|
||||
mxPreview = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ Reference<drawing::XDrawPage> SAL_CALL PresenterSlidePreview::getCurrentPage()
|
||||
throw (RuntimeException, std::exception)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -221,7 +221,7 @@ Reference<drawing::XDrawPage> SAL_CALL PresenterSlidePreview::getCurrentPage()
|
||||
void PresenterSlidePreview::SetSlide (const Reference<drawing::XDrawPage>& rxPage)
|
||||
{
|
||||
mxCurrentSlide = rxPage;
|
||||
mxPreview = NULL;
|
||||
mxPreview = nullptr;
|
||||
|
||||
Reference<beans::XPropertySet> xPropertySet (mxCurrentSlide, UNO_QUERY);
|
||||
if (xPropertySet.is())
|
||||
@ -310,12 +310,12 @@ void PresenterSlidePreview::Paint (const awt::Rectangle& rBoundingBox)
|
||||
// Paint the preview.
|
||||
const rendering::ViewState aViewState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL);
|
||||
nullptr);
|
||||
|
||||
Sequence<double> aBackgroundColor(4);
|
||||
rendering::RenderState aRenderState (
|
||||
geometry::AffineMatrix2D(1, 0, aPreviewBox.X, 0, 1, aPreviewBox.Y),
|
||||
NULL,
|
||||
nullptr,
|
||||
aBackgroundColor,
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, 0x00000000);
|
||||
@ -329,7 +329,7 @@ void PresenterSlidePreview::Paint (const awt::Rectangle& rBoundingBox)
|
||||
Reference<rendering::XBitmap> xTransitionIcon (aTransitionDescriptor->GetNormalBitmap());
|
||||
rendering::RenderState aTransitionRenderState (
|
||||
geometry::AffineMatrix2D(1, 0, aTransitionPreviewBox.X, 0, 1, aTransitionPreviewBox.Y),
|
||||
NULL,
|
||||
nullptr,
|
||||
aBackgroundColor,
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
mxCanvas->drawBitmap(xTransitionIcon, aViewState, aTransitionRenderState);
|
||||
@ -341,7 +341,7 @@ void PresenterSlidePreview::Paint (const awt::Rectangle& rBoundingBox)
|
||||
Reference<rendering::XBitmap> xAnimationIcon (aAnimationDescriptor->GetNormalBitmap());
|
||||
rendering::RenderState aAnimationRenderState (
|
||||
geometry::AffineMatrix2D(1, 0, aAnimationPreviewBox.X, 0, 1, aAnimationPreviewBox.Y),
|
||||
NULL,
|
||||
nullptr,
|
||||
aBackgroundColor,
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
mxCanvas->drawBitmap(xAnimationIcon, aViewState, aAnimationRenderState);
|
||||
|
@ -84,7 +84,7 @@ PresenterSlideShowView::PresenterSlideShowView (
|
||||
mbIsEndSlideVisible(false),
|
||||
mxCurrentSlide()
|
||||
{
|
||||
if (mpPresenterController.get() != NULL)
|
||||
if (mpPresenterController.get() != nullptr)
|
||||
{
|
||||
mnPageAspectRatio = mpPresenterController->GetSlideAspectRatio();
|
||||
mpBackground = mpPresenterController->GetViewBackground(mxViewId->getResourceURL());
|
||||
@ -186,7 +186,7 @@ void PresenterSlideShowView::disposing()
|
||||
|
||||
::cppu::OInterfaceContainerHelper* pIterator
|
||||
= maBroadcaster.getContainer(cppu::UnoType<lang::XEventListener>::get());
|
||||
if (pIterator != NULL)
|
||||
if (pIterator != nullptr)
|
||||
pIterator->disposeAndClear(aEvent);
|
||||
|
||||
// Do this for
|
||||
@ -198,56 +198,56 @@ void PresenterSlideShowView::disposing()
|
||||
mxWindow->removeMouseListener(this);
|
||||
mxWindow->removeMouseMotionListener(this);
|
||||
mxWindow->removeWindowListener(this);
|
||||
mxWindow = NULL;
|
||||
mxWindow = nullptr;
|
||||
}
|
||||
mxSlideShowController = NULL;
|
||||
mxSlideShow = NULL;
|
||||
mxSlideShowController = nullptr;
|
||||
mxSlideShow = nullptr;
|
||||
if (mxViewCanvas.is())
|
||||
{
|
||||
Reference<XComponent> xComponent (mxViewCanvas, UNO_QUERY);
|
||||
mxViewCanvas = NULL;
|
||||
mxViewCanvas = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
if (mxViewWindow.is())
|
||||
{
|
||||
Reference<XComponent> xComponent (mxViewWindow, UNO_QUERY);
|
||||
mxViewWindow = NULL;
|
||||
mxViewWindow = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
if (mxPointer.is())
|
||||
{
|
||||
Reference<XComponent> xComponent (mxPointer, UNO_QUERY);
|
||||
mxPointer = NULL;
|
||||
mxPointer = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
if (mxBackgroundPolygon1.is())
|
||||
{
|
||||
Reference<XComponent> xComponent (mxBackgroundPolygon1, UNO_QUERY);
|
||||
mxBackgroundPolygon1 = NULL;
|
||||
mxBackgroundPolygon1 = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
if (mxBackgroundPolygon2.is())
|
||||
{
|
||||
Reference<XComponent> xComponent (mxBackgroundPolygon2, UNO_QUERY);
|
||||
mxBackgroundPolygon2 = NULL;
|
||||
mxBackgroundPolygon2 = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
|
||||
mxComponentContext = NULL;
|
||||
mpPresenterController = NULL;
|
||||
mxViewId = NULL;
|
||||
mxController = NULL;
|
||||
mxCanvas = NULL;
|
||||
mxComponentContext = nullptr;
|
||||
mpPresenterController = nullptr;
|
||||
mxViewId = nullptr;
|
||||
mxController = nullptr;
|
||||
mxCanvas = nullptr;
|
||||
mpBackground.reset();
|
||||
msClickToExitPresentationText.clear();
|
||||
msClickToExitPresentationTitle.clear();
|
||||
msTitleTemplate.clear();
|
||||
mxCurrentSlide = NULL;
|
||||
mxCurrentSlide = nullptr;
|
||||
}
|
||||
|
||||
//----- XDrawView -------------------------------------------------------------
|
||||
@ -257,7 +257,7 @@ void SAL_CALL PresenterSlideShowView::setCurrentPage (
|
||||
throw (css::uno::RuntimeException, std::exception)
|
||||
{
|
||||
mxCurrentSlide = rxSlide;
|
||||
if (mpPresenterController.get() != NULL
|
||||
if (mpPresenterController.get() != nullptr
|
||||
&& mxSlideShowController.is()
|
||||
&& ! mpPresenterController->GetCurrentSlide().is()
|
||||
&& ! mxSlideShowController->isPaused())
|
||||
@ -272,7 +272,7 @@ void SAL_CALL PresenterSlideShowView::setCurrentPage (
|
||||
// backwards.
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPresenterController->GetPaneContainer()->FindViewURL(mxViewId->getResourceURL()));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
msTitleTemplate = pDescriptor->msTitleTemplate;
|
||||
pDescriptor->msTitleTemplate = msClickToExitPresentationTitle;
|
||||
@ -286,7 +286,7 @@ void SAL_CALL PresenterSlideShowView::setCurrentPage (
|
||||
// Restore the title template.
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPresenterController->GetPaneContainer()->FindViewURL(mxViewId->getResourceURL()));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
pDescriptor->msTitleTemplate = msTitleTemplate;
|
||||
(pDescriptor->msTitle).clear();
|
||||
@ -339,11 +339,11 @@ void SAL_CALL PresenterSlideShowView::clear()
|
||||
|
||||
rendering::ViewState aViewState (
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL);
|
||||
nullptr);
|
||||
double aColor[4] = {0,0,0,0};
|
||||
rendering::RenderState aRenderState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(aColor,4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
mxViewCanvas->fillPolyPolygon(xPolygon, aViewState, aRenderState);
|
||||
@ -503,9 +503,9 @@ void SAL_CALL PresenterSlideShowView::disposing (const lang::EventObject& rEvent
|
||||
throw (RuntimeException, std::exception)
|
||||
{
|
||||
if (rEvent.Source == mxViewWindow)
|
||||
mxViewWindow = NULL;
|
||||
mxViewWindow = nullptr;
|
||||
else if (rEvent.Source == mxSlideShow)
|
||||
mxSlideShow = NULL;
|
||||
mxSlideShow = nullptr;
|
||||
}
|
||||
|
||||
//----- XPaintListener --------------------------------------------------------
|
||||
@ -538,7 +538,7 @@ void SAL_CALL PresenterSlideShowView::mousePressed (const awt::MouseEvent& rEven
|
||||
aEvent.Source = static_cast<XWeak*>(this);
|
||||
::cppu::OInterfaceContainerHelper* pIterator
|
||||
= maBroadcaster.getContainer(cppu::UnoType<awt::XMouseListener>::get());
|
||||
if (pIterator != NULL)
|
||||
if (pIterator != nullptr)
|
||||
{
|
||||
pIterator->notifyEach(&awt::XMouseListener::mousePressed, aEvent);
|
||||
}
|
||||
@ -547,7 +547,7 @@ void SAL_CALL PresenterSlideShowView::mousePressed (const awt::MouseEvent& rEven
|
||||
// the PresenterController so that it switches to the next slide and
|
||||
// ends the presentation.
|
||||
if (mbIsEndSlideVisible)
|
||||
if (mpPresenterController.get() != NULL)
|
||||
if (mpPresenterController.get() != nullptr)
|
||||
mpPresenterController->HandleMouseClick(rEvent);
|
||||
}
|
||||
|
||||
@ -558,7 +558,7 @@ void SAL_CALL PresenterSlideShowView::mouseReleased (const awt::MouseEvent& rEve
|
||||
aEvent.Source = static_cast<XWeak*>(this);
|
||||
::cppu::OInterfaceContainerHelper* pIterator
|
||||
= maBroadcaster.getContainer(cppu::UnoType<awt::XMouseListener>::get());
|
||||
if (pIterator != NULL)
|
||||
if (pIterator != nullptr)
|
||||
{
|
||||
pIterator->notifyEach(&awt::XMouseListener::mouseReleased, aEvent);
|
||||
}
|
||||
@ -571,7 +571,7 @@ void SAL_CALL PresenterSlideShowView::mouseEntered (const awt::MouseEvent& rEven
|
||||
aEvent.Source = static_cast<XWeak*>(this);
|
||||
::cppu::OInterfaceContainerHelper* pIterator
|
||||
= maBroadcaster.getContainer(cppu::UnoType<awt::XMouseListener>::get());
|
||||
if (pIterator != NULL)
|
||||
if (pIterator != nullptr)
|
||||
{
|
||||
pIterator->notifyEach(&awt::XMouseListener::mouseEntered, aEvent);
|
||||
}
|
||||
@ -584,7 +584,7 @@ void SAL_CALL PresenterSlideShowView::mouseExited (const awt::MouseEvent& rEvent
|
||||
aEvent.Source = static_cast<XWeak*>(this);
|
||||
::cppu::OInterfaceContainerHelper* pIterator
|
||||
= maBroadcaster.getContainer(cppu::UnoType<awt::XMouseListener>::get());
|
||||
if (pIterator != NULL)
|
||||
if (pIterator != nullptr)
|
||||
{
|
||||
pIterator->notifyEach(&awt::XMouseListener::mouseExited, aEvent);
|
||||
}
|
||||
@ -599,7 +599,7 @@ void SAL_CALL PresenterSlideShowView::mouseDragged (const awt::MouseEvent& rEven
|
||||
aEvent.Source = static_cast<XWeak*>(this);
|
||||
::cppu::OInterfaceContainerHelper* pIterator
|
||||
= maBroadcaster.getContainer(cppu::UnoType<awt::XMouseMotionListener>::get());
|
||||
if (pIterator != NULL)
|
||||
if (pIterator != nullptr)
|
||||
{
|
||||
pIterator->notifyEach(&awt::XMouseMotionListener::mouseDragged, aEvent);
|
||||
}
|
||||
@ -612,7 +612,7 @@ void SAL_CALL PresenterSlideShowView::mouseMoved (const awt::MouseEvent& rEvent)
|
||||
aEvent.Source = static_cast<XWeak*>(this);
|
||||
::cppu::OInterfaceContainerHelper* pIterator
|
||||
= maBroadcaster.getContainer(cppu::UnoType<awt::XMouseMotionListener>::get());
|
||||
if (pIterator != NULL)
|
||||
if (pIterator != nullptr)
|
||||
{
|
||||
pIterator->notifyEach(&awt::XMouseMotionListener::mouseMoved, aEvent);
|
||||
}
|
||||
@ -693,7 +693,7 @@ void PresenterSlideShowView::PaintOuterWindow (const awt::Rectangle& rRepaintBox
|
||||
if ( ! mxCanvas.is())
|
||||
return;
|
||||
|
||||
if (mpBackground.get() == NULL)
|
||||
if (mpBackground.get() == nullptr)
|
||||
return;
|
||||
|
||||
const rendering::ViewState aViewState(
|
||||
@ -702,7 +702,7 @@ void PresenterSlideShowView::PaintOuterWindow (const awt::Rectangle& rRepaintBox
|
||||
|
||||
rendering::RenderState aRenderState (
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
|
||||
@ -718,8 +718,8 @@ void PresenterSlideShowView::PaintOuterWindow (const awt::Rectangle& rRepaintBox
|
||||
1,
|
||||
0,
|
||||
xBackgroundBitmap,
|
||||
NULL,
|
||||
NULL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
rendering::StrokeAttributes(),
|
||||
rendering::TexturingMode::REPEAT,
|
||||
rendering::TexturingMode::REPEAT);
|
||||
@ -759,7 +759,7 @@ void PresenterSlideShowView::PaintEndSlide (const awt::Rectangle& rRepaintBox)
|
||||
|
||||
rendering::RenderState aRenderState (
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, util::Color(0x00000000));
|
||||
@ -770,15 +770,15 @@ void PresenterSlideShowView::PaintEndSlide (const awt::Rectangle& rRepaintBox)
|
||||
|
||||
do
|
||||
{
|
||||
if (mpPresenterController.get() == NULL)
|
||||
if (mpPresenterController.get() == nullptr)
|
||||
break;
|
||||
std::shared_ptr<PresenterTheme> pTheme (mpPresenterController->GetTheme());
|
||||
if (pTheme.get() == NULL)
|
||||
if (pTheme.get() == nullptr)
|
||||
break;
|
||||
|
||||
const OUString sViewStyle (pTheme->GetStyleName(mxViewId->getResourceURL()));
|
||||
PresenterTheme::SharedFontDescriptor pFont (pTheme->GetFont(sViewStyle));
|
||||
if (pFont.get() == NULL)
|
||||
if (pFont.get() == nullptr)
|
||||
break;
|
||||
|
||||
/// this is responsible of the " presentation exit " text inside the slide windows
|
||||
@ -811,7 +811,7 @@ void PresenterSlideShowView::PaintInnerWindow (const awt::PaintEvent& rEvent)
|
||||
aEvent.Source = static_cast<XWeak*>(this);
|
||||
::cppu::OInterfaceContainerHelper* pIterator
|
||||
= maBroadcaster.getContainer(cppu::UnoType<awt::XPaintListener>::get());
|
||||
if (pIterator != NULL)
|
||||
if (pIterator != nullptr)
|
||||
{
|
||||
pIterator->notifyEach(&awt::XPaintListener::windowPaint, aEvent);
|
||||
}
|
||||
@ -919,7 +919,7 @@ void PresenterSlideShowView::Resize()
|
||||
lang::EventObject aEvent (static_cast<XWeak*>(this));
|
||||
::cppu::OInterfaceContainerHelper* pIterator
|
||||
= maBroadcaster.getContainer(cppu::UnoType<util::XModifyListener>::get());
|
||||
if (pIterator != NULL)
|
||||
if (pIterator != nullptr)
|
||||
{
|
||||
pIterator->notifyEach(&util::XModifyListener::modified, aEvent);
|
||||
}
|
||||
@ -946,8 +946,8 @@ void PresenterSlideShowView::CreateBackgroundPolygons()
|
||||
const awt::Rectangle aViewWindowBox (mxViewWindow->getPosSize());
|
||||
if (aWindowBox.Height == aViewWindowBox.Height && aWindowBox.Width == aViewWindowBox.Width)
|
||||
{
|
||||
mxBackgroundPolygon1 = NULL;
|
||||
mxBackgroundPolygon2 = NULL;
|
||||
mxBackgroundPolygon1 = nullptr;
|
||||
mxBackgroundPolygon2 = nullptr;
|
||||
}
|
||||
else if (aWindowBox.Height == aViewWindowBox.Height)
|
||||
{
|
||||
|
@ -270,7 +270,7 @@ PresenterSlideSorter::PresenterSlideSorter (
|
||||
if ( ! rxContext.is()
|
||||
|| ! rxViewId.is()
|
||||
|| ! rxController.is()
|
||||
|| rpPresenterController.get()==NULL)
|
||||
|| rpPresenterController.get()==nullptr)
|
||||
{
|
||||
throw lang::IllegalArgumentException();
|
||||
}
|
||||
@ -316,11 +316,11 @@ PresenterSlideSorter::PresenterSlideSorter (
|
||||
mxCanvas,
|
||||
"SlideSorterCloser");
|
||||
|
||||
if (mpPresenterController->GetTheme().get() != NULL)
|
||||
if (mpPresenterController->GetTheme().get() != nullptr)
|
||||
{
|
||||
PresenterTheme::SharedFontDescriptor pFont (
|
||||
mpPresenterController->GetTheme()->GetFont("ButtonFont"));
|
||||
if (pFont.get() != NULL)
|
||||
if (pFont.get() != nullptr)
|
||||
maSeparatorColor = pFont->mnColor;
|
||||
}
|
||||
|
||||
@ -372,15 +372,15 @@ PresenterSlideSorter::~PresenterSlideSorter()
|
||||
|
||||
void SAL_CALL PresenterSlideSorter::disposing()
|
||||
{
|
||||
mxComponentContext = NULL;
|
||||
mxViewId = NULL;
|
||||
mxPane = NULL;
|
||||
mxComponentContext = nullptr;
|
||||
mxViewId = nullptr;
|
||||
mxPane = nullptr;
|
||||
|
||||
if (mpVerticalScrollBar.is())
|
||||
{
|
||||
Reference<lang::XComponent> xComponent (
|
||||
static_cast<XWeak*>(mpVerticalScrollBar.get()), UNO_QUERY);
|
||||
mpVerticalScrollBar = NULL;
|
||||
mpVerticalScrollBar = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
@ -388,7 +388,7 @@ void SAL_CALL PresenterSlideSorter::disposing()
|
||||
{
|
||||
Reference<lang::XComponent> xComponent (
|
||||
static_cast<XWeak*>(mpCloseButton.get()), UNO_QUERY);
|
||||
mpCloseButton = NULL;
|
||||
mpCloseButton = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
@ -398,10 +398,10 @@ void SAL_CALL PresenterSlideSorter::disposing()
|
||||
Reference<lang::XComponent> xComponent (mxCanvas, UNO_QUERY);
|
||||
if (xComponent.is())
|
||||
xComponent->removeEventListener(static_cast<awt::XWindowListener*>(this));
|
||||
mxCanvas = NULL;
|
||||
mxCanvas = nullptr;
|
||||
}
|
||||
mpPresenterController = NULL;
|
||||
mxSlideShowController = NULL;
|
||||
mpPresenterController = nullptr;
|
||||
mxSlideShowController = nullptr;
|
||||
mpLayout.reset();
|
||||
mpMouseOverManager.reset();
|
||||
|
||||
@ -410,7 +410,7 @@ void SAL_CALL PresenterSlideSorter::disposing()
|
||||
mxPreviewCache->removePreviewCreationNotifyListener(this);
|
||||
|
||||
Reference<XComponent> xComponent (mxPreviewCache, UNO_QUERY);
|
||||
mxPreviewCache = NULL;
|
||||
mxPreviewCache = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
}
|
||||
@ -436,17 +436,17 @@ void SAL_CALL PresenterSlideSorter::disposing (const lang::EventObject& rEventOb
|
||||
{
|
||||
if (rEventObject.Source == mxWindow)
|
||||
{
|
||||
mxWindow = NULL;
|
||||
mxWindow = nullptr;
|
||||
dispose();
|
||||
}
|
||||
else if (rEventObject.Source == mxPreviewCache)
|
||||
{
|
||||
mxPreviewCache = NULL;
|
||||
mxPreviewCache = nullptr;
|
||||
dispose();
|
||||
}
|
||||
else if (rEventObject.Source == mxCanvas)
|
||||
{
|
||||
mxCanvas = NULL;
|
||||
mxCanvas = nullptr;
|
||||
mbIsLayoutPending = true;
|
||||
mbIsPaintPending = true;
|
||||
|
||||
@ -543,8 +543,8 @@ void SAL_CALL PresenterSlideSorter::mouseReleased (const css::awt::MouseEvent& r
|
||||
break;
|
||||
|
||||
case 2:
|
||||
OSL_ASSERT(mpPresenterController.get()!=NULL);
|
||||
OSL_ASSERT(mpPresenterController->GetWindowManager().get()!=NULL);
|
||||
OSL_ASSERT(mpPresenterController.get()!=nullptr);
|
||||
OSL_ASSERT(mpPresenterController->GetWindowManager().get()!=nullptr);
|
||||
mpPresenterController->GetWindowManager()->SetSlideSorterState(false);
|
||||
GotoSlide(nSlideIndex);
|
||||
break;
|
||||
@ -563,7 +563,7 @@ void SAL_CALL PresenterSlideSorter::mouseExited (const css::awt::MouseEvent& rEv
|
||||
{
|
||||
(void)rEvent;
|
||||
mnSlideIndexMousePressed = -1;
|
||||
if (mpMouseOverManager.get() != NULL)
|
||||
if (mpMouseOverManager.get() != nullptr)
|
||||
mpMouseOverManager->SetSlide(mnSlideIndexMousePressed, awt::Rectangle(0,0,0,0));
|
||||
}
|
||||
|
||||
@ -572,7 +572,7 @@ void SAL_CALL PresenterSlideSorter::mouseExited (const css::awt::MouseEvent& rEv
|
||||
void SAL_CALL PresenterSlideSorter::mouseMoved (const css::awt::MouseEvent& rEvent)
|
||||
throw (css::uno::RuntimeException, std::exception)
|
||||
{
|
||||
if (mpMouseOverManager.get() != NULL)
|
||||
if (mpMouseOverManager.get() != nullptr)
|
||||
{
|
||||
css::awt::MouseEvent rTemp =rEvent;
|
||||
/// check whether RTL interface or not
|
||||
@ -635,7 +635,7 @@ void SAL_CALL PresenterSlideSorter::notifyPreviewCreation (
|
||||
sal_Int32 nSlideIndex)
|
||||
throw(css::uno::RuntimeException, std::exception)
|
||||
{
|
||||
OSL_ASSERT(mpLayout.get()!=NULL);
|
||||
OSL_ASSERT(mpLayout.get()!=nullptr);
|
||||
|
||||
awt::Rectangle aBBox (mpLayout->GetBoundingBox(nSlideIndex));
|
||||
mpPresenterController->GetPaintManager()->Invalidate(mxWindow, aBBox, true);
|
||||
@ -679,7 +679,7 @@ Reference<drawing::XDrawPage> SAL_CALL PresenterSlideSorter::getCurrentPage()
|
||||
throw (RuntimeException, std::exception)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -702,7 +702,7 @@ void PresenterSlideSorter::UpdateLayout()
|
||||
mxViewId->getResourceURL()));
|
||||
do
|
||||
{
|
||||
if (pPane.get() == NULL)
|
||||
if (pPane.get() == nullptr)
|
||||
break;
|
||||
if ( ! pPane->mxPane.is())
|
||||
break;
|
||||
@ -743,7 +743,7 @@ void PresenterSlideSorter::UpdateLayout()
|
||||
mpLayout->GetLastVisibleSlideIndex());
|
||||
|
||||
// Clear the frame polygon so that it is re-created on the next paint.
|
||||
mxPreviewFrame = NULL;
|
||||
mxPreviewFrame = nullptr;
|
||||
}
|
||||
|
||||
geometry::RealRectangle2D PresenterSlideSorter::PlaceScrollBars (
|
||||
@ -754,7 +754,7 @@ geometry::RealRectangle2D PresenterSlideSorter::PlaceScrollBars (
|
||||
Reference<container::XIndexAccess> xSlides (mxSlideShowController, UNO_QUERY_THROW);
|
||||
if (xSlides.is())
|
||||
bIsScrollBarNeeded = mpLayout->IsScrollBarNeeded(xSlides->getCount());
|
||||
if (mpVerticalScrollBar.get() != NULL)
|
||||
if (mpVerticalScrollBar.get() != nullptr)
|
||||
{
|
||||
if (bIsScrollBarNeeded)
|
||||
{
|
||||
@ -807,7 +807,7 @@ void PresenterSlideSorter::PlaceCloseButton (
|
||||
// centered over the callout. Otherwise it is centered with respect to
|
||||
// the whole window.
|
||||
sal_Int32 nCloseButtonCenter (rCenterBox.Width/2);
|
||||
if (rpPane.get() != NULL && rpPane->mxPane.is())
|
||||
if (rpPane.get() != nullptr && rpPane->mxPane.is())
|
||||
{
|
||||
const sal_Int32 nCalloutCenter (rpPane->mxPane->GetCalloutAnchor().X - nLeftBorderWidth);
|
||||
const sal_Int32 nDistanceFromWindowCenter (abs(nCalloutCenter - rCenterBox.Width/2));
|
||||
@ -874,11 +874,11 @@ double PresenterSlideSorter::GetSlideAspectRatio() const
|
||||
Reference<rendering::XBitmap> PresenterSlideSorter::GetPreview (const sal_Int32 nSlideIndex)
|
||||
{
|
||||
if (nSlideIndex < 0 || nSlideIndex>=mpLayout->mnSlideCount)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
else if (mxPane.is())
|
||||
return mxPreviewCache->getSlidePreview(nSlideIndex, mxPane->getCanvas());
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void PresenterSlideSorter::PaintPreview (
|
||||
@ -931,14 +931,14 @@ void PresenterSlideSorter::PaintPreview (
|
||||
geometry::AffineMatrix2D(
|
||||
1, 0, aTopLeft.X,
|
||||
0, 1, aTopLeft.Y),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
|
||||
// Emphasize the current slide.
|
||||
if (nSlideIndex == mnCurrentSlideIndex)
|
||||
{
|
||||
if (mpCurrentSlideFrameRenderer.get() != NULL)
|
||||
if (mpCurrentSlideFrameRenderer.get() != nullptr)
|
||||
{
|
||||
const awt::Rectangle aSlideBoundingBox(
|
||||
sal::static_int_cast<sal_Int32>(0.5 + aTopLeft.X),
|
||||
@ -970,7 +970,7 @@ void PresenterSlideSorter::PaintPreview (
|
||||
geometry::AffineMatrix2D(
|
||||
1, 0, aAnimationPreviewBox.X,
|
||||
0, 1, aAnimationPreviewBox.Y),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
rxCanvas->drawBitmap(xAnimationIcon, aViewState, aAnimationRenderState);
|
||||
@ -984,7 +984,7 @@ void PresenterSlideSorter::PaintPreview (
|
||||
geometry::AffineMatrix2D(
|
||||
1, 0, aTransitionPreviewBox.X,
|
||||
0, 1, aTransitionPreviewBox.Y),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
rxCanvas->drawBitmap(xTransitionIcon, aViewState, aTransitionRenderState);
|
||||
@ -1043,12 +1043,12 @@ void PresenterSlideSorter::Paint (const awt::Rectangle& rUpdateBox)
|
||||
|
||||
// Paint the horizontal separator.
|
||||
rendering::RenderState aRenderState (geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL, Sequence<double>(4), rendering::CompositeOperation::SOURCE);
|
||||
nullptr, Sequence<double>(4), rendering::CompositeOperation::SOURCE);
|
||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, maSeparatorColor);
|
||||
mxCanvas->drawLine(
|
||||
geometry::RealPoint2D(0, mnSeparatorY),
|
||||
geometry::RealPoint2D(mxWindow->getPosSize().Width, mnSeparatorY),
|
||||
rendering::ViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), NULL),
|
||||
rendering::ViewState(geometry::AffineMatrix2D(1,0,0, 0,1,0), nullptr),
|
||||
aRenderState);
|
||||
|
||||
// Paint the slides.
|
||||
@ -1452,7 +1452,7 @@ void PresenterSlideSorter::Layout::UpdateScrollBars()
|
||||
sal_Int32 nTotalRowCount (0);
|
||||
nTotalRowCount = sal_Int32(ceil(double(mnSlideCount) / double(mnColumnCount)));
|
||||
|
||||
if (mpVerticalScrollBar.get() != NULL)
|
||||
if (mpVerticalScrollBar.get() != nullptr)
|
||||
{
|
||||
mpVerticalScrollBar->SetTotalSize(
|
||||
nTotalRowCount * maPreviewSize.Height
|
||||
@ -1501,10 +1501,10 @@ PresenterSlideSorter::MouseOverManager::MouseOverManager (
|
||||
mxInvalidateTarget(rxInvalidateTarget),
|
||||
mpPaintManager(rpPaintManager)
|
||||
{
|
||||
if (rpTheme.get()!=NULL)
|
||||
if (rpTheme.get()!=nullptr)
|
||||
{
|
||||
std::shared_ptr<PresenterBitmapContainer> pBitmaps (rpTheme->GetBitmapContainer());
|
||||
if (pBitmaps.get() != NULL)
|
||||
if (pBitmaps.get() != nullptr)
|
||||
{
|
||||
mpLeftLabelBitmap = pBitmaps->GetBitmap("LabelLeft");
|
||||
mpCenterLabelBitmap = pBitmaps->GetBitmap("LabelCenter");
|
||||
@ -1529,7 +1529,7 @@ void PresenterSlideSorter::MouseOverManager::Paint (
|
||||
|
||||
if (mxCanvas != rxCanvas)
|
||||
SetCanvas(rxCanvas);
|
||||
if (rxCanvas != NULL)
|
||||
if (rxCanvas != nullptr)
|
||||
{
|
||||
if ( ! mxBitmap.is())
|
||||
mxBitmap = CreateBitmap(msText, maSlideBoundingBox.Width);
|
||||
@ -1547,7 +1547,7 @@ void PresenterSlideSorter::MouseOverManager::Paint (
|
||||
rxClip),
|
||||
rendering::RenderState(
|
||||
geometry::AffineMatrix2D(1,0,nXOffset, 0,1,nYOffset),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE));
|
||||
}
|
||||
@ -1558,7 +1558,7 @@ void PresenterSlideSorter::MouseOverManager::SetCanvas (
|
||||
const Reference<rendering::XCanvas>& rxCanvas)
|
||||
{
|
||||
mxCanvas = rxCanvas;
|
||||
if (mpFont.get() != NULL)
|
||||
if (mpFont.get() != nullptr)
|
||||
mpFont->PrepareFont(Reference<rendering::XCanvas>(mxCanvas, UNO_QUERY));
|
||||
}
|
||||
|
||||
@ -1577,7 +1577,7 @@ void PresenterSlideSorter::MouseOverManager::SetSlide (
|
||||
|
||||
if (nSlideIndex >= 0)
|
||||
{
|
||||
if (mxSlides.get() != NULL)
|
||||
if (mxSlides.get() != nullptr)
|
||||
{
|
||||
msText.clear();
|
||||
|
||||
@ -1593,7 +1593,7 @@ void PresenterSlideSorter::MouseOverManager::SetSlide (
|
||||
{
|
||||
msText.clear();
|
||||
}
|
||||
mxBitmap = NULL;
|
||||
mxBitmap = nullptr;
|
||||
|
||||
Invalidate();
|
||||
}
|
||||
@ -1603,10 +1603,10 @@ Reference<rendering::XBitmap> PresenterSlideSorter::MouseOverManager::CreateBitm
|
||||
const sal_Int32 nMaximalWidth) const
|
||||
{
|
||||
if ( ! mxCanvas.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
if (mpFont.get()==NULL || !mpFont->mxFont.is())
|
||||
return NULL;
|
||||
if (mpFont.get()==nullptr || !mpFont->mxFont.is())
|
||||
return nullptr;
|
||||
|
||||
// Long text has to be shortened.
|
||||
const OUString sText (GetFittingText(rsText, nMaximalWidth
|
||||
@ -1623,11 +1623,11 @@ Reference<rendering::XBitmap> PresenterSlideSorter::MouseOverManager::CreateBitm
|
||||
mxCanvas->getDevice()->createCompatibleAlphaBitmap(aLabelSize));
|
||||
|
||||
if ( ! xBitmap.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
Reference<rendering::XBitmapCanvas> xBitmapCanvas (xBitmap, UNO_QUERY);
|
||||
if ( ! xBitmapCanvas.is())
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
// Paint the background.
|
||||
PaintButtonBackground(xBitmapCanvas, aLabelSize);
|
||||
@ -1647,11 +1647,11 @@ Reference<rendering::XBitmap> PresenterSlideSorter::MouseOverManager::CreateBitm
|
||||
|
||||
const rendering::ViewState aViewState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL);
|
||||
nullptr);
|
||||
|
||||
rendering::RenderState aRenderState (
|
||||
geometry::AffineMatrix2D(1,0,nXOffset, 0,1,nYOffset),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, mpFont->mnColor);
|
||||
@ -1727,7 +1727,7 @@ geometry::IntegerSize2D PresenterSlideSorter::MouseOverManager::CalculateLabelSi
|
||||
{
|
||||
// Height is specified by the label bitmaps.
|
||||
sal_Int32 nHeight (32);
|
||||
if (mpCenterLabelBitmap.get() != NULL)
|
||||
if (mpCenterLabelBitmap.get() != nullptr)
|
||||
{
|
||||
Reference<rendering::XBitmap> xBitmap (mpCenterLabelBitmap->GetNormalBitmap());
|
||||
if (xBitmap.is())
|
||||
@ -1749,15 +1749,15 @@ void PresenterSlideSorter::MouseOverManager::PaintButtonBackground (
|
||||
{
|
||||
// Get the bitmaps for painting the label background.
|
||||
Reference<rendering::XBitmap> xLeftLabelBitmap;
|
||||
if (mpLeftLabelBitmap.get() != NULL)
|
||||
if (mpLeftLabelBitmap.get() != nullptr)
|
||||
xLeftLabelBitmap = mpLeftLabelBitmap->GetNormalBitmap();
|
||||
|
||||
Reference<rendering::XBitmap> xCenterLabelBitmap;
|
||||
if (mpCenterLabelBitmap.get() != NULL)
|
||||
if (mpCenterLabelBitmap.get() != nullptr)
|
||||
xCenterLabelBitmap = mpCenterLabelBitmap->GetNormalBitmap();
|
||||
|
||||
Reference<rendering::XBitmap> xRightLabelBitmap;
|
||||
if (mpRightLabelBitmap.get() != NULL)
|
||||
if (mpRightLabelBitmap.get() != nullptr)
|
||||
xRightLabelBitmap = mpRightLabelBitmap->GetNormalBitmap();
|
||||
|
||||
PresenterUIPainter::PaintHorizontalBitmapComposite (
|
||||
@ -1771,7 +1771,7 @@ void PresenterSlideSorter::MouseOverManager::PaintButtonBackground (
|
||||
|
||||
void PresenterSlideSorter::MouseOverManager::Invalidate()
|
||||
{
|
||||
if (mpPaintManager.get() != NULL)
|
||||
if (mpPaintManager.get() != nullptr)
|
||||
mpPaintManager->Invalidate(mxInvalidateTarget, maSlideBoundingBox, true);
|
||||
}
|
||||
|
||||
@ -1820,31 +1820,31 @@ PresenterSlideSorter::CurrentSlideFrameRenderer::CurrentSlideFrameRenderer (
|
||||
mpBottomRight = aContainer.GetBitmap("BottomRight");
|
||||
|
||||
// Determine size of frame.
|
||||
if (mpTop.get() != NULL)
|
||||
if (mpTop.get() != nullptr)
|
||||
mnTopFrameSize = mpTop->mnHeight;
|
||||
if (mpLeft.get() != NULL)
|
||||
if (mpLeft.get() != nullptr)
|
||||
mnLeftFrameSize = mpLeft->mnWidth;
|
||||
if (mpRight.get() != NULL)
|
||||
if (mpRight.get() != nullptr)
|
||||
mnRightFrameSize = mpRight->mnWidth;
|
||||
if (mpBottom.get() != NULL)
|
||||
if (mpBottom.get() != nullptr)
|
||||
mnBottomFrameSize = mpBottom->mnHeight;
|
||||
|
||||
if (mpTopLeft.get() != NULL)
|
||||
if (mpTopLeft.get() != nullptr)
|
||||
{
|
||||
mnTopFrameSize = ::std::max(mnTopFrameSize, mpTopLeft->mnHeight);
|
||||
mnLeftFrameSize = ::std::max(mnLeftFrameSize, mpTopLeft->mnWidth);
|
||||
}
|
||||
if (mpTopRight.get() != NULL)
|
||||
if (mpTopRight.get() != nullptr)
|
||||
{
|
||||
mnTopFrameSize = ::std::max(mnTopFrameSize, mpTopRight->mnHeight);
|
||||
mnRightFrameSize = ::std::max(mnRightFrameSize, mpTopRight->mnWidth);
|
||||
}
|
||||
if (mpBottomLeft.get() != NULL)
|
||||
if (mpBottomLeft.get() != nullptr)
|
||||
{
|
||||
mnLeftFrameSize = ::std::max(mnLeftFrameSize, mpBottomLeft->mnWidth);
|
||||
mnBottomFrameSize = ::std::max(mnBottomFrameSize, mpBottomLeft->mnHeight);
|
||||
}
|
||||
if (mpBottomRight.get() != NULL)
|
||||
if (mpBottomRight.get() != nullptr)
|
||||
{
|
||||
mnRightFrameSize = ::std::max(mnRightFrameSize, mpBottomRight->mnWidth);
|
||||
mnBottomFrameSize = ::std::max(mnBottomFrameSize, mpBottomRight->mnHeight);
|
||||
@ -1866,7 +1866,7 @@ void PresenterSlideSorter::CurrentSlideFrameRenderer::PaintCurrentSlideFrame (
|
||||
const Reference<rendering::XPolyPolygon2D> xClip (
|
||||
PresenterGeometryHelper::CreatePolygon(rClipBox, rxCanvas->getDevice()));
|
||||
|
||||
if (mpTop.get() != NULL)
|
||||
if (mpTop.get() != nullptr)
|
||||
{
|
||||
PaintBitmapTiled(
|
||||
mpTop->GetNormalBitmap(),
|
||||
@ -1877,7 +1877,7 @@ void PresenterSlideSorter::CurrentSlideFrameRenderer::PaintCurrentSlideFrame (
|
||||
rSlideBoundingBox.Width,
|
||||
mpTop->mnHeight);
|
||||
}
|
||||
if (mpLeft.get() != NULL)
|
||||
if (mpLeft.get() != nullptr)
|
||||
{
|
||||
PaintBitmapTiled(
|
||||
mpLeft->GetNormalBitmap(),
|
||||
@ -1888,7 +1888,7 @@ void PresenterSlideSorter::CurrentSlideFrameRenderer::PaintCurrentSlideFrame (
|
||||
mpLeft->mnWidth,
|
||||
rSlideBoundingBox.Height);
|
||||
}
|
||||
if (mpRight.get() != NULL)
|
||||
if (mpRight.get() != nullptr)
|
||||
{
|
||||
PaintBitmapTiled(
|
||||
mpRight->GetNormalBitmap(),
|
||||
@ -1899,7 +1899,7 @@ void PresenterSlideSorter::CurrentSlideFrameRenderer::PaintCurrentSlideFrame (
|
||||
mpRight->mnWidth,
|
||||
rSlideBoundingBox.Height);
|
||||
}
|
||||
if (mpBottom.get() != NULL)
|
||||
if (mpBottom.get() != nullptr)
|
||||
{
|
||||
PaintBitmapTiled(
|
||||
mpBottom->GetNormalBitmap(),
|
||||
@ -1910,7 +1910,7 @@ void PresenterSlideSorter::CurrentSlideFrameRenderer::PaintCurrentSlideFrame (
|
||||
rSlideBoundingBox.Width,
|
||||
mpBottom->mnHeight);
|
||||
}
|
||||
if (mpTopLeft.get() != NULL)
|
||||
if (mpTopLeft.get() != nullptr)
|
||||
{
|
||||
PaintBitmapOnce(
|
||||
mpTopLeft->GetNormalBitmap(),
|
||||
@ -1919,7 +1919,7 @@ void PresenterSlideSorter::CurrentSlideFrameRenderer::PaintCurrentSlideFrame (
|
||||
rSlideBoundingBox.X - mpTopLeft->mnWidth,
|
||||
rSlideBoundingBox.Y - mpTopLeft->mnHeight);
|
||||
}
|
||||
if (mpTopRight.get() != NULL)
|
||||
if (mpTopRight.get() != nullptr)
|
||||
{
|
||||
PaintBitmapOnce(
|
||||
mpTopRight->GetNormalBitmap(),
|
||||
@ -1928,7 +1928,7 @@ void PresenterSlideSorter::CurrentSlideFrameRenderer::PaintCurrentSlideFrame (
|
||||
rSlideBoundingBox.X + rSlideBoundingBox.Width,
|
||||
rSlideBoundingBox.Y - mpTopLeft->mnHeight);
|
||||
}
|
||||
if (mpBottomLeft.get() != NULL)
|
||||
if (mpBottomLeft.get() != nullptr)
|
||||
{
|
||||
PaintBitmapOnce(
|
||||
mpBottomLeft->GetNormalBitmap(),
|
||||
@ -1937,7 +1937,7 @@ void PresenterSlideSorter::CurrentSlideFrameRenderer::PaintCurrentSlideFrame (
|
||||
rSlideBoundingBox.X - mpBottomLeft->mnWidth,
|
||||
rSlideBoundingBox.Y + rSlideBoundingBox.Height);
|
||||
}
|
||||
if (mpBottomRight.get() != NULL)
|
||||
if (mpBottomRight.get() != nullptr)
|
||||
{
|
||||
PaintBitmapOnce(
|
||||
mpBottomRight->GetNormalBitmap(),
|
||||
@ -1977,7 +1977,7 @@ void PresenterSlideSorter::CurrentSlideFrameRenderer::PaintBitmapOnce(
|
||||
geometry::AffineMatrix2D(
|
||||
1, 0, nX,
|
||||
0, 1, nY),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
|
||||
@ -2014,7 +2014,7 @@ void PresenterSlideSorter::CurrentSlideFrameRenderer::PaintBitmapTiled(
|
||||
geometry::AffineMatrix2D(
|
||||
1, 0, nX0,
|
||||
0, 1, nY0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
|
||||
|
@ -49,7 +49,7 @@ PresenterSprite::~PresenterSprite()
|
||||
Reference<lang::XComponent> xComponent (mxSprite, UNO_QUERY);
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
mxSprite = NULL;
|
||||
mxSprite = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ css::uno::Reference<css::rendering::XCanvas> PresenterSprite::GetCanvas()
|
||||
if (mxSprite.is())
|
||||
return mxSprite->getContentCanvas();
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void PresenterSprite::Show()
|
||||
@ -107,10 +107,10 @@ void PresenterSprite::MoveTo (const css::geometry::RealPoint2D& rLocation)
|
||||
maLocation,
|
||||
rendering::ViewState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL),
|
||||
nullptr),
|
||||
rendering::RenderState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
uno::Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE)
|
||||
);
|
||||
@ -135,10 +135,10 @@ void PresenterSprite::ProvideSprite()
|
||||
mxSprite->move(maLocation,
|
||||
rendering::ViewState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL),
|
||||
nullptr),
|
||||
rendering::RenderState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
uno::Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE)
|
||||
);
|
||||
@ -158,7 +158,7 @@ void PresenterSprite::DisposeSprite()
|
||||
Reference<lang::XComponent> xComponent (mxSprite, UNO_QUERY);
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
mxSprite = NULL;
|
||||
mxSprite = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,9 +53,9 @@ PresenterSpritePane::~PresenterSpritePane()
|
||||
|
||||
void PresenterSpritePane::disposing()
|
||||
{
|
||||
mpSprite->SetFactory(NULL);
|
||||
mxParentWindow = NULL;
|
||||
mxParentCanvas = NULL;
|
||||
mpSprite->SetFactory(nullptr);
|
||||
mxParentWindow = nullptr;
|
||||
mxParentCanvas = nullptr;
|
||||
PresenterPaneBase::disposing();
|
||||
}
|
||||
|
||||
|
@ -334,7 +334,7 @@ void PresenterTextView::Paint (
|
||||
|
||||
rendering::RenderState aRenderState (
|
||||
geometry::AffineMatrix2D(1,0,nX, 0,1,nY),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, mpFont->mnColor);
|
||||
|
@ -313,7 +313,7 @@ OUString PresenterTheme::GetStyleName (const OUString& rsResourceURL) const
|
||||
{
|
||||
OUString sStyleName;
|
||||
std::shared_ptr<Theme> pTheme (mpTheme);
|
||||
while (sStyleName.isEmpty() && pTheme.get()!=NULL)
|
||||
while (sStyleName.isEmpty() && pTheme.get()!=nullptr)
|
||||
{
|
||||
sStyleName = pTheme->maStyleAssociations.GetStyleName(rsResourceURL);
|
||||
pTheme = pTheme->mpParentTheme;
|
||||
@ -325,10 +325,10 @@ OUString PresenterTheme::GetStyleName (const OUString& rsResourceURL) const
|
||||
const OUString& rsStyleName,
|
||||
const bool bOuter) const
|
||||
{
|
||||
OSL_ASSERT(mpTheme.get() != NULL);
|
||||
OSL_ASSERT(mpTheme.get() != nullptr);
|
||||
|
||||
SharedPaneStyle pPaneStyle (mpTheme->GetPaneStyle(rsStyleName));
|
||||
if (pPaneStyle.get() != NULL)
|
||||
if (pPaneStyle.get() != nullptr)
|
||||
if (bOuter)
|
||||
return pPaneStyle->maOuterBorderSize.ToVector();
|
||||
else
|
||||
@ -370,7 +370,7 @@ bool PresenterTheme::ConvertToColor (
|
||||
std::shared_ptr<PresenterConfigurationAccess> PresenterTheme::GetNodeForViewStyle (
|
||||
const OUString& rsStyleName) const
|
||||
{
|
||||
if (mpTheme.get() == NULL)
|
||||
if (mpTheme.get() == nullptr)
|
||||
return std::shared_ptr<PresenterConfigurationAccess>();
|
||||
|
||||
// Open configuration for writing.
|
||||
@ -398,16 +398,16 @@ SharedBitmapDescriptor PresenterTheme::GetBitmap (
|
||||
const OUString& rsStyleName,
|
||||
const OUString& rsBitmapName) const
|
||||
{
|
||||
if (mpTheme.get() != NULL)
|
||||
if (mpTheme.get() != nullptr)
|
||||
{
|
||||
if (rsStyleName.isEmpty())
|
||||
{
|
||||
if (rsBitmapName == "Background")
|
||||
{
|
||||
std::shared_ptr<Theme> pTheme (mpTheme);
|
||||
while (pTheme.get()!=NULL && pTheme->mpBackground.get()==NULL)
|
||||
while (pTheme.get()!=nullptr && pTheme->mpBackground.get()==nullptr)
|
||||
pTheme = pTheme->mpParentTheme;
|
||||
if (pTheme.get() != NULL)
|
||||
if (pTheme.get() != nullptr)
|
||||
return pTheme->mpBackground;
|
||||
else
|
||||
return SharedBitmapDescriptor();
|
||||
@ -416,18 +416,18 @@ SharedBitmapDescriptor PresenterTheme::GetBitmap (
|
||||
else
|
||||
{
|
||||
SharedPaneStyle pPaneStyle (mpTheme->GetPaneStyle(rsStyleName));
|
||||
if (pPaneStyle.get() != NULL)
|
||||
if (pPaneStyle.get() != nullptr)
|
||||
{
|
||||
SharedBitmapDescriptor pBitmap (pPaneStyle->GetBitmap(rsBitmapName));
|
||||
if (pBitmap.get() != NULL)
|
||||
if (pBitmap.get() != nullptr)
|
||||
return pBitmap;
|
||||
}
|
||||
|
||||
SharedViewStyle pViewStyle (mpTheme->GetViewStyle(rsStyleName));
|
||||
if (pViewStyle.get() != NULL)
|
||||
if (pViewStyle.get() != nullptr)
|
||||
{
|
||||
SharedBitmapDescriptor pBitmap (pViewStyle->GetBitmap(rsBitmapName));
|
||||
if (pBitmap.get() != NULL)
|
||||
if (pBitmap.get() != nullptr)
|
||||
return pBitmap;
|
||||
}
|
||||
}
|
||||
@ -439,21 +439,21 @@ SharedBitmapDescriptor PresenterTheme::GetBitmap (
|
||||
SharedBitmapDescriptor PresenterTheme::GetBitmap (
|
||||
const OUString& rsBitmapName) const
|
||||
{
|
||||
if (mpTheme.get() != NULL)
|
||||
if (mpTheme.get() != nullptr)
|
||||
{
|
||||
if (rsBitmapName == "Background")
|
||||
{
|
||||
std::shared_ptr<Theme> pTheme (mpTheme);
|
||||
while (pTheme.get()!=NULL && pTheme->mpBackground.get()==NULL)
|
||||
while (pTheme.get()!=nullptr && pTheme->mpBackground.get()==nullptr)
|
||||
pTheme = pTheme->mpParentTheme;
|
||||
if (pTheme.get() != NULL)
|
||||
if (pTheme.get() != nullptr)
|
||||
return pTheme->mpBackground;
|
||||
else
|
||||
return SharedBitmapDescriptor();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mpTheme->mpIconContainer.get() != NULL)
|
||||
if (mpTheme->mpIconContainer.get() != nullptr)
|
||||
return mpTheme->mpIconContainer->GetBitmap(rsBitmapName);
|
||||
}
|
||||
}
|
||||
@ -463,7 +463,7 @@ SharedBitmapDescriptor PresenterTheme::GetBitmap (
|
||||
|
||||
std::shared_ptr<PresenterBitmapContainer> PresenterTheme::GetBitmapContainer() const
|
||||
{
|
||||
if (mpTheme.get() != NULL)
|
||||
if (mpTheme.get() != nullptr)
|
||||
return mpTheme->mpIconContainer;
|
||||
else
|
||||
return std::shared_ptr<PresenterBitmapContainer>();
|
||||
@ -472,18 +472,18 @@ std::shared_ptr<PresenterBitmapContainer> PresenterTheme::GetBitmapContainer() c
|
||||
PresenterTheme::SharedFontDescriptor PresenterTheme::GetFont (
|
||||
const OUString& rsStyleName) const
|
||||
{
|
||||
if (mpTheme.get() != NULL)
|
||||
if (mpTheme.get() != nullptr)
|
||||
{
|
||||
SharedPaneStyle pPaneStyle (mpTheme->GetPaneStyle(rsStyleName));
|
||||
if (pPaneStyle.get() != NULL)
|
||||
if (pPaneStyle.get() != nullptr)
|
||||
return pPaneStyle->GetFont();
|
||||
|
||||
SharedViewStyle pViewStyle (mpTheme->GetViewStyle(rsStyleName));
|
||||
if (pViewStyle.get() != NULL)
|
||||
if (pViewStyle.get() != nullptr)
|
||||
return pViewStyle->GetFont();
|
||||
|
||||
std::shared_ptr<Theme> pTheme (mpTheme);
|
||||
while (pTheme.get() != NULL)
|
||||
while (pTheme.get() != nullptr)
|
||||
{
|
||||
Theme::FontContainer::const_iterator iFont (pTheme->maFontContainer.find(rsStyleName));
|
||||
if (iFont != pTheme->maFontContainer.end())
|
||||
@ -508,7 +508,7 @@ PresenterTheme::FontDescriptor::FontDescriptor (
|
||||
mnXOffset(0),
|
||||
mnYOffset(0)
|
||||
{
|
||||
if (rpDescriptor.get() != NULL)
|
||||
if (rpDescriptor.get() != nullptr)
|
||||
{
|
||||
msFamilyName = rpDescriptor->msFamilyName;
|
||||
msStyleName = rpDescriptor->msStyleName;
|
||||
@ -644,7 +644,7 @@ void PresenterTheme::Theme::Read (
|
||||
Reference<container::XNameAccess>(
|
||||
PresenterConfigurationAccess::GetConfigurationNode(mxThemeRoot, "Bitmaps"),
|
||||
UNO_QUERY),
|
||||
mpParentTheme.get()!=NULL
|
||||
mpParentTheme.get()!=nullptr
|
||||
? mpParentTheme->mpIconContainer
|
||||
: std::shared_ptr<PresenterBitmapContainer>(),
|
||||
rReadContext.mxComponentContext,
|
||||
@ -663,9 +663,9 @@ void PresenterTheme::Theme::Read (
|
||||
SharedPaneStyle PresenterTheme::Theme::GetPaneStyle (const OUString& rsStyleName) const
|
||||
{
|
||||
SharedPaneStyle pPaneStyle (maPaneStyles.GetPaneStyle(rsStyleName));
|
||||
if (pPaneStyle.get() != NULL)
|
||||
if (pPaneStyle.get() != nullptr)
|
||||
return pPaneStyle;
|
||||
else if (mpParentTheme.get() != NULL)
|
||||
else if (mpParentTheme.get() != nullptr)
|
||||
return mpParentTheme->GetPaneStyle(rsStyleName);
|
||||
else
|
||||
return SharedPaneStyle();
|
||||
@ -674,9 +674,9 @@ SharedPaneStyle PresenterTheme::Theme::GetPaneStyle (const OUString& rsStyleName
|
||||
SharedViewStyle PresenterTheme::Theme::GetViewStyle (const OUString& rsStyleName) const
|
||||
{
|
||||
SharedViewStyle pViewStyle (maViewStyles.GetViewStyle(rsStyleName));
|
||||
if (pViewStyle.get() != NULL)
|
||||
if (pViewStyle.get() != nullptr)
|
||||
return pViewStyle;
|
||||
else if (mpParentTheme.get() != NULL)
|
||||
else if (mpParentTheme.get() != nullptr)
|
||||
return mpParentTheme->GetViewStyle(rsStyleName);
|
||||
else
|
||||
return SharedViewStyle();
|
||||
@ -819,7 +819,7 @@ std::shared_ptr<PresenterTheme::Theme> ReadContext::ReadTheme (
|
||||
}
|
||||
}
|
||||
|
||||
if (pTheme.get() != NULL)
|
||||
if (pTheme.get() != nullptr)
|
||||
{
|
||||
pTheme->Read(rConfiguration, *this);
|
||||
}
|
||||
@ -907,7 +907,7 @@ void PaneStyleContainer::ProcessPaneStyle(
|
||||
Reference<container::XNameAccess> xOuterBorderSizeNode (rValues[4], UNO_QUERY);
|
||||
pStyle->maOuterBorderSize = ReadContext::ReadBorderSize(xOuterBorderSizeNode);
|
||||
|
||||
if (pStyle->mpParentStyle.get() != NULL)
|
||||
if (pStyle->mpParentStyle.get() != nullptr)
|
||||
{
|
||||
pStyle->maInnerBorderSize.Merge(pStyle->mpParentStyle->maInnerBorderSize);
|
||||
pStyle->maOuterBorderSize.Merge(pStyle->mpParentStyle->maOuterBorderSize);
|
||||
@ -918,7 +918,7 @@ void PaneStyleContainer::ProcessPaneStyle(
|
||||
Reference<container::XNameAccess> xBitmapsNode (rValues[5], UNO_QUERY);
|
||||
pStyle->mpBitmaps.reset(new PresenterBitmapContainer(
|
||||
xBitmapsNode,
|
||||
pStyle->mpParentStyle.get()!=NULL
|
||||
pStyle->mpParentStyle.get()!=nullptr
|
||||
? pStyle->mpParentStyle->mpBitmaps
|
||||
: std::shared_ptr<PresenterBitmapContainer>(),
|
||||
rReadContext.mxComponentContext,
|
||||
@ -956,14 +956,14 @@ PaneStyle::~PaneStyle()
|
||||
|
||||
const SharedBitmapDescriptor PaneStyle::GetBitmap (const OUString& rsBitmapName) const
|
||||
{
|
||||
if (mpBitmaps.get() != NULL)
|
||||
if (mpBitmaps.get() != nullptr)
|
||||
{
|
||||
const SharedBitmapDescriptor pBitmap = mpBitmaps->GetBitmap(rsBitmapName);
|
||||
if (pBitmap.get() != NULL)
|
||||
if (pBitmap.get() != nullptr)
|
||||
return pBitmap;
|
||||
}
|
||||
|
||||
if (mpParentStyle.get() != NULL)
|
||||
if (mpParentStyle.get() != nullptr)
|
||||
return mpParentStyle->GetBitmap(rsBitmapName);
|
||||
else
|
||||
return SharedBitmapDescriptor();
|
||||
@ -971,9 +971,9 @@ const SharedBitmapDescriptor PaneStyle::GetBitmap (const OUString& rsBitmapName)
|
||||
|
||||
PresenterTheme::SharedFontDescriptor PaneStyle::GetFont() const
|
||||
{
|
||||
if (mpFont.get() != NULL)
|
||||
if (mpFont.get() != nullptr)
|
||||
return mpFont;
|
||||
else if (mpParentStyle.get() != NULL)
|
||||
else if (mpParentStyle.get() != nullptr)
|
||||
return mpParentStyle->GetFont();
|
||||
else
|
||||
return PresenterTheme::SharedFontDescriptor();
|
||||
@ -1031,7 +1031,7 @@ void ViewStyleContainer::ProcessViewStyle(
|
||||
PresenterConfigurationAccess::GetProperty(rxProperties, "Font"), UNO_QUERY);
|
||||
PresenterTheme::SharedFontDescriptor pFont (
|
||||
ReadContext::ReadFont(xFontNode, sPathToFont, PresenterTheme::SharedFontDescriptor()));
|
||||
if (pFont.get() != NULL)
|
||||
if (pFont.get() != nullptr)
|
||||
pStyle->mpFont = pFont;
|
||||
|
||||
Reference<container::XHierarchicalNameAccess> xBackgroundNode (
|
||||
@ -1043,7 +1043,7 @@ void ViewStyleContainer::ProcessViewStyle(
|
||||
rReadContext.mxPresenterHelper,
|
||||
rReadContext.mxCanvas,
|
||||
SharedBitmapDescriptor()));
|
||||
if (pBackground.get() != NULL && pBackground->GetNormalBitmap().is())
|
||||
if (pBackground.get() != nullptr && pBackground->GetNormalBitmap().is())
|
||||
pStyle->mpBackground = pBackground;
|
||||
|
||||
mStyles.push_back(pStyle);
|
||||
@ -1082,9 +1082,9 @@ const SharedBitmapDescriptor ViewStyle::GetBitmap (const OUString& rsBitmapName)
|
||||
|
||||
PresenterTheme::SharedFontDescriptor ViewStyle::GetFont() const
|
||||
{
|
||||
if (mpFont.get() != NULL)
|
||||
if (mpFont.get() != nullptr)
|
||||
return mpFont;
|
||||
else if (mpParentStyle.get() != NULL)
|
||||
else if (mpParentStyle.get() != nullptr)
|
||||
return mpParentStyle->GetFont();
|
||||
else
|
||||
return PresenterTheme::SharedFontDescriptor();
|
||||
|
@ -149,7 +149,7 @@ sal_Int32 TimerScheduler::mnTaskId = PresenterTimer::NotAValidTaskId;
|
||||
std::shared_ptr<TimerScheduler> TimerScheduler::Instance()
|
||||
{
|
||||
::osl::MutexGuard aGuard (maInstanceMutex);
|
||||
if (mpInstance.get() == NULL)
|
||||
if (mpInstance.get() == nullptr)
|
||||
{
|
||||
mpInstance.reset(new TimerScheduler(), TimerScheduler::Deleter());
|
||||
mpInstance->create();
|
||||
@ -179,7 +179,7 @@ SharedTimerTask TimerScheduler::CreateTimerTask (
|
||||
|
||||
void TimerScheduler::ScheduleTask (const SharedTimerTask& rpTask)
|
||||
{
|
||||
if (rpTask.get() == NULL)
|
||||
if (rpTask.get() == nullptr)
|
||||
return;
|
||||
if (rpTask->mbIsCanceled)
|
||||
return;
|
||||
@ -214,7 +214,7 @@ void TimerScheduler::CancelTask (const sal_Int32 nTaskId)
|
||||
// from being scheduled again and b) tries to prevent its execution.
|
||||
{
|
||||
::osl::MutexGuard aGuard (maCurrentTaskMutex);
|
||||
if (mpCurrentTask.get() != NULL
|
||||
if (mpCurrentTask.get() != nullptr
|
||||
&& mpCurrentTask->mnTaskId == nTaskId)
|
||||
mpCurrentTask->mbIsCanceled = true;
|
||||
}
|
||||
@ -264,7 +264,7 @@ void SAL_CALL TimerScheduler::run()
|
||||
mpCurrentTask = pTask;
|
||||
}
|
||||
|
||||
if (pTask.get() == NULL)
|
||||
if (pTask.get() == nullptr)
|
||||
{
|
||||
// Wait until the first task becomes due.
|
||||
TimeValue aTimeValue;
|
||||
@ -403,7 +403,7 @@ PresenterClockTimer::~PresenterClockTimer()
|
||||
Reference<lang::XComponent> xComponent (mxRequestCallback, UNO_QUERY);
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
mxRequestCallback = NULL;
|
||||
mxRequestCallback = nullptr;
|
||||
}
|
||||
|
||||
void PresenterClockTimer::AddListener (const SharedListener& rListener)
|
||||
@ -440,7 +440,7 @@ void PresenterClockTimer::RemoveListener (const SharedListener& rListener)
|
||||
PresenterTimer::CancelTask(mnTimerTaskId);
|
||||
mnTimerTaskId = PresenterTimer::NotAValidTaskId;
|
||||
}
|
||||
mpInstance = NULL;
|
||||
mpInstance = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -427,7 +427,7 @@ void SAL_CALL PresenterToolBar::disposing()
|
||||
mxWindow->removePaintListener(this);
|
||||
mxWindow->removeMouseListener(this);
|
||||
mxWindow->removeMouseMotionListener(this);
|
||||
mxWindow = NULL;
|
||||
mxWindow = nullptr;
|
||||
}
|
||||
|
||||
// Dispose tool bar elements.
|
||||
@ -435,12 +435,12 @@ void SAL_CALL PresenterToolBar::disposing()
|
||||
ElementContainer::const_iterator iEnd (maElementContainer.end());
|
||||
for ( ; iPart!=iEnd; ++iPart)
|
||||
{
|
||||
OSL_ASSERT(iPart->get()!=NULL);
|
||||
OSL_ASSERT(iPart->get()!=nullptr);
|
||||
ElementContainerPart::iterator iElement ((*iPart)->begin());
|
||||
ElementContainerPart::const_iterator iPartEnd ((*iPart)->end());
|
||||
for ( ; iElement!=iPartEnd; ++iElement)
|
||||
{
|
||||
if (iElement->get() != NULL)
|
||||
if (iElement->get() != nullptr)
|
||||
{
|
||||
::rtl::Reference<Element> pElement (*iElement);
|
||||
Reference<lang::XComponent> xComponent (
|
||||
@ -502,7 +502,7 @@ void SAL_CALL PresenterToolBar::disposing (const lang::EventObject& rEventObject
|
||||
throw (RuntimeException, std::exception)
|
||||
{
|
||||
if (rEventObject.Source == mxWindow)
|
||||
mxWindow = NULL;
|
||||
mxWindow = nullptr;
|
||||
}
|
||||
|
||||
//----- XWindowListener -------------------------------------------------------
|
||||
@ -710,7 +710,7 @@ void PresenterToolBar::ProcessEntry (
|
||||
{
|
||||
pElement->SetModes( pNormalMode, pMouseOverMode, pSelectedMode, pDisabledMode);
|
||||
pElement->UpdateState();
|
||||
if (mpCurrentContainerPart.get() != NULL)
|
||||
if (mpCurrentContainerPart.get() != nullptr)
|
||||
mpCurrentContainerPart->push_back(pElement);
|
||||
}
|
||||
}
|
||||
@ -850,7 +850,7 @@ geometry::RealSize2D PresenterToolBar::CalculatePartSize (
|
||||
ElementContainerPart::const_iterator iElement;
|
||||
for (iElement=rpPart->begin(); iElement!=rpPart->end(); ++iElement)
|
||||
{
|
||||
if (iElement->get() == NULL)
|
||||
if (iElement->get() == nullptr)
|
||||
continue;
|
||||
|
||||
const awt::Size aBSize ((*iElement)->GetBoundingSize(rxCanvas));
|
||||
@ -899,7 +899,7 @@ void PresenterToolBar::LayoutPart (
|
||||
if(!AllSettings::GetLayoutRTL()){
|
||||
for (iElement=rpPart->begin(); iElement!=iEnd; ++iElement)
|
||||
{
|
||||
if (iElement->get() == NULL)
|
||||
if (iElement->get() == nullptr)
|
||||
continue;
|
||||
|
||||
const awt::Size aElementSize ((*iElement)->GetBoundingSize(rxCanvas));
|
||||
@ -932,7 +932,7 @@ void PresenterToolBar::LayoutPart (
|
||||
else {
|
||||
for (iElement=rpPart->end()-1; iElement!=iBegin-1; --iElement)
|
||||
{
|
||||
if (iElement->get() == NULL)
|
||||
if (iElement->get() == nullptr)
|
||||
continue;
|
||||
|
||||
const awt::Size aElementSize ((*iElement)->GetBoundingSize(rxCanvas));
|
||||
@ -993,7 +993,7 @@ void PresenterToolBar::Paint (
|
||||
ElementContainerPart::const_iterator iPartEnd ((*iPart)->end());
|
||||
for (iElement=(*iPart)->begin(); iElement!=iPartEnd; ++iElement)
|
||||
{
|
||||
if (iElement->get() != NULL)
|
||||
if (iElement->get() != nullptr)
|
||||
{
|
||||
if ( ! (*iElement)->IsOutside(rUpdateBox))
|
||||
(*iElement)->Paint(mxCanvas, rViewState);
|
||||
@ -1014,7 +1014,7 @@ void PresenterToolBar::UpdateSlideNumber()
|
||||
ElementContainerPart::const_iterator iPartEnd ((*iPart)->end());
|
||||
for (iElement=(*iPart)->begin(); iElement!=iPartEnd; ++iElement)
|
||||
{
|
||||
if (iElement->get() != NULL)
|
||||
if (iElement->get() != nullptr)
|
||||
(*iElement)->CurrentSlideHasChanged();
|
||||
}
|
||||
}
|
||||
@ -1039,7 +1039,7 @@ void PresenterToolBar::CheckMouseOver (
|
||||
ElementContainerPart::const_iterator iPartEnd ((*iPart)->end());
|
||||
for (iElement=(*iPart)->begin(); iElement!=iPartEnd; ++iElement)
|
||||
{
|
||||
if (iElement->get() == NULL)
|
||||
if (iElement->get() == nullptr)
|
||||
continue;
|
||||
|
||||
awt::Rectangle aBox ((*iElement)->GetBoundingBox());
|
||||
@ -1112,7 +1112,7 @@ PresenterToolBarView::PresenterToolBarView (
|
||||
}
|
||||
catch (RuntimeException&)
|
||||
{
|
||||
mxViewId = NULL;
|
||||
mxViewId = nullptr;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1124,20 +1124,20 @@ PresenterToolBarView::~PresenterToolBarView()
|
||||
void SAL_CALL PresenterToolBarView::disposing()
|
||||
{
|
||||
Reference<lang::XComponent> xComponent (static_cast<XWeak*>(mpToolBar.get()), UNO_QUERY);
|
||||
mpToolBar = NULL;
|
||||
mpToolBar = nullptr;
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
|
||||
if (mxWindow.is())
|
||||
{
|
||||
mxWindow->removePaintListener(this);
|
||||
mxWindow = NULL;
|
||||
mxWindow = nullptr;
|
||||
}
|
||||
mxCanvas = NULL;
|
||||
mxViewId = NULL;
|
||||
mxPane = NULL;
|
||||
mpPresenterController = NULL;
|
||||
mxSlideShowController = NULL;
|
||||
mxCanvas = nullptr;
|
||||
mxViewId = nullptr;
|
||||
mxPane = nullptr;
|
||||
mpPresenterController = nullptr;
|
||||
mxSlideShowController = nullptr;
|
||||
|
||||
}
|
||||
|
||||
@ -1166,7 +1166,7 @@ void SAL_CALL PresenterToolBarView::disposing (const lang::EventObject& rEventOb
|
||||
throw (RuntimeException, std::exception)
|
||||
{
|
||||
if (rEventObject.Source == mxWindow)
|
||||
mxWindow = NULL;
|
||||
mxWindow = nullptr;
|
||||
}
|
||||
|
||||
//----- XResourceId -----------------------------------------------------------
|
||||
@ -1196,7 +1196,7 @@ void SAL_CALL PresenterToolBarView::setCurrentPage (const Reference<drawing::XDr
|
||||
Reference<drawing::XDrawPage> SAL_CALL PresenterToolBarView::getCurrentPage()
|
||||
throw (RuntimeException, std::exception)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//===== PresenterToolBar::Element =============================================
|
||||
@ -1219,7 +1219,7 @@ Element::Element (
|
||||
mbIsSelected(false),
|
||||
mbIsEnabled(true)
|
||||
{
|
||||
if (mpToolBar.get() != NULL)
|
||||
if (mpToolBar.get() != nullptr)
|
||||
{
|
||||
OSL_ASSERT(mpToolBar->GetPresenterController().is());
|
||||
OSL_ASSERT(mpToolBar->GetPresenterController()->GetWindowManager().is());
|
||||
@ -1297,17 +1297,17 @@ bool Element::SetState (
|
||||
|
||||
if (bClicked && mbIsEnabled)
|
||||
{
|
||||
if (mpMode.get() != NULL)
|
||||
if (mpMode.get() != nullptr)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (mpMode->msAction.isEmpty())
|
||||
break;
|
||||
|
||||
if (mpToolBar.get() == NULL)
|
||||
if (mpToolBar.get() == nullptr)
|
||||
break;
|
||||
|
||||
if (mpToolBar->GetPresenterController().get() == NULL)
|
||||
if (mpToolBar->GetPresenterController().get() == nullptr)
|
||||
break;
|
||||
|
||||
mpToolBar->GetPresenterController()->DispatchUnoCommand(mpMode->msAction);
|
||||
@ -1353,10 +1353,10 @@ bool Element::IsFilling() const
|
||||
|
||||
void Element::UpdateState()
|
||||
{
|
||||
OSL_ASSERT(mpToolBar.get() != NULL);
|
||||
OSL_ASSERT(mpToolBar->GetPresenterController().get() != NULL);
|
||||
OSL_ASSERT(mpToolBar.get() != nullptr);
|
||||
OSL_ASSERT(mpToolBar->GetPresenterController().get() != nullptr);
|
||||
|
||||
if (mpMode.get() == NULL)
|
||||
if (mpMode.get() == nullptr)
|
||||
return;
|
||||
|
||||
util::URL aURL (mpToolBar->GetPresenterController()->CreateURLFromString(mpMode->msAction));
|
||||
@ -1429,7 +1429,7 @@ void ElementMode::ReadElementMode (
|
||||
UNO_QUERY);
|
||||
Reference<beans::XPropertySet> xProperties (
|
||||
PresenterConfigurationAccess::GetNodeProperties(xNode, OUString()));
|
||||
if ( ! xProperties.is() && rpDefaultMode.get()!=NULL)
|
||||
if ( ! xProperties.is() && rpDefaultMode.get()!=nullptr)
|
||||
{
|
||||
// The mode is not specified. Use the given, possibly empty,
|
||||
// default mode instead.
|
||||
@ -1440,18 +1440,18 @@ void ElementMode::ReadElementMode (
|
||||
|
||||
// Read action.
|
||||
if ( ! (PresenterConfigurationAccess::GetProperty(xProperties, "Action") >>= msAction))
|
||||
if (rpDefaultMode.get()!=NULL)
|
||||
if (rpDefaultMode.get()!=nullptr)
|
||||
msAction = rpDefaultMode->msAction;
|
||||
|
||||
// Read text and font
|
||||
OUString sText (rpDefaultMode.get()!=NULL ? rpDefaultMode->maText.GetText() : OUString());
|
||||
OUString sText (rpDefaultMode.get()!=nullptr ? rpDefaultMode->maText.GetText() : OUString());
|
||||
PresenterConfigurationAccess::GetProperty(xProperties, "Text") >>= sText;
|
||||
Reference<container::XHierarchicalNameAccess> xFontNode (
|
||||
PresenterConfigurationAccess::GetProperty(xProperties, "Font"), UNO_QUERY);
|
||||
PresenterTheme::SharedFontDescriptor pFont (PresenterTheme::ReadFont(
|
||||
xFontNode,
|
||||
"",
|
||||
rpDefaultMode.get()!=NULL
|
||||
rpDefaultMode.get()!=nullptr
|
||||
? rpDefaultMode->maText.GetFont()
|
||||
: PresenterTheme::SharedFontDescriptor()));
|
||||
maText = Text(sText,pFont);
|
||||
@ -1464,7 +1464,7 @@ void ElementMode::ReadElementMode (
|
||||
"",
|
||||
rContext.mxPresenterHelper,
|
||||
rContext.mxCanvas,
|
||||
rpDefaultMode.get()!=NULL ? rpDefaultMode->mpIcon : SharedBitmapDescriptor());
|
||||
rpDefaultMode.get()!=nullptr ? rpDefaultMode->mpIcon : SharedBitmapDescriptor());
|
||||
}
|
||||
catch(Exception&)
|
||||
{
|
||||
@ -1491,7 +1491,7 @@ Button::Button (
|
||||
: Element(rpToolBar),
|
||||
mbIsListenerRegistered(false)
|
||||
{
|
||||
OSL_ASSERT(mpToolBar.get() != NULL);
|
||||
OSL_ASSERT(mpToolBar.get() != nullptr);
|
||||
OSL_ASSERT(mpToolBar->GetPresenterController().is());
|
||||
OSL_ASSERT(mpToolBar->GetPresenterController()->GetWindowManager().is());
|
||||
}
|
||||
@ -1508,8 +1508,8 @@ void Button::Initialize()
|
||||
|
||||
void Button::disposing()
|
||||
{
|
||||
OSL_ASSERT(mpToolBar.get() != NULL);
|
||||
if (mpToolBar.get() != NULL
|
||||
OSL_ASSERT(mpToolBar.get() != nullptr);
|
||||
if (mpToolBar.get() != nullptr
|
||||
&& mbIsListenerRegistered)
|
||||
{
|
||||
OSL_ASSERT(mpToolBar->GetPresenterController().is());
|
||||
@ -1527,10 +1527,10 @@ void Button::Paint (
|
||||
{
|
||||
OSL_ASSERT(rxCanvas.is());
|
||||
|
||||
if (mpMode.get() == NULL)
|
||||
if (mpMode.get() == nullptr)
|
||||
return;
|
||||
|
||||
if (mpMode->mpIcon.get() == NULL)
|
||||
if (mpMode->mpIcon.get() == nullptr)
|
||||
return;
|
||||
|
||||
geometry::RealRectangle2D aTextBBox (mpMode->maText.GetBoundingBox(rxCanvas));
|
||||
@ -1539,7 +1539,7 @@ void Button::Paint (
|
||||
PaintIcon(rxCanvas, nTextHeight, rViewState);
|
||||
awt::Point aOffset(0,0);
|
||||
if ( ! IsEnabled())
|
||||
if (mpMode->mpIcon.get() != NULL)
|
||||
if (mpMode->mpIcon.get() != nullptr)
|
||||
{
|
||||
Reference<rendering::XBitmap> xBitmap (mpMode->mpIcon->GetNormalBitmap());
|
||||
if (xBitmap.is())
|
||||
@ -1551,7 +1551,7 @@ void Button::Paint (
|
||||
awt::Size Button::CreateBoundingSize (
|
||||
const Reference<rendering::XCanvas>& rxCanvas)
|
||||
{
|
||||
if (mpMode.get() == NULL)
|
||||
if (mpMode.get() == nullptr)
|
||||
return awt::Size();
|
||||
|
||||
geometry::RealRectangle2D aTextBBox (mpMode->maText.GetBoundingBox(rxCanvas));
|
||||
@ -1559,7 +1559,7 @@ awt::Size Button::CreateBoundingSize (
|
||||
sal_Int32 nTextHeight (sal::static_int_cast<sal_Int32>(0.5 + aTextBBox.Y2 - aTextBBox.Y1));
|
||||
sal_Int32 nTextWidth (sal::static_int_cast<sal_Int32>(0.5 + aTextBBox.X2 - aTextBBox.X1));
|
||||
Reference<rendering::XBitmap> xBitmap;
|
||||
if (mpMode->mpIcon.get() != NULL)
|
||||
if (mpMode->mpIcon.get() != nullptr)
|
||||
xBitmap = mpMode->mpIcon->GetNormalBitmap();
|
||||
if (xBitmap.is())
|
||||
{
|
||||
@ -1577,7 +1577,7 @@ void Button::PaintIcon (
|
||||
const sal_Int32 nTextHeight,
|
||||
const rendering::ViewState& rViewState)
|
||||
{
|
||||
if (mpMode.get() == NULL)
|
||||
if (mpMode.get() == nullptr)
|
||||
return;
|
||||
|
||||
Reference<rendering::XBitmap> xBitmap (mpMode->mpIcon->GetBitmap(GetMode()));
|
||||
@ -1591,7 +1591,7 @@ void Button::PaintIcon (
|
||||
+ (maSize.Height - nTextHeight - xBitmap->getSize().Height) / 2);
|
||||
const rendering::RenderState aRenderState(
|
||||
geometry::AffineMatrix2D(1,0,nX, 0,1,nY),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::OVER);
|
||||
rxCanvas->drawBitmap(xBitmap, rViewState, aRenderState);
|
||||
@ -1603,7 +1603,7 @@ void Button::PaintIcon (
|
||||
+ (maSize.Height - nTextHeight - xBitmap->getSize().Height) / 2);
|
||||
const rendering::RenderState aRenderState(
|
||||
geometry::AffineMatrix2D(-1,0,nX, 0,1,nY),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::OVER);
|
||||
rxCanvas->drawBitmap(xBitmap, rViewState, aRenderState);
|
||||
@ -1647,7 +1647,7 @@ Label::Label (const ::rtl::Reference<PresenterToolBar>& rpToolBar)
|
||||
awt::Size Label::CreateBoundingSize (
|
||||
const Reference<rendering::XCanvas>& rxCanvas)
|
||||
{
|
||||
if (mpMode.get() == NULL)
|
||||
if (mpMode.get() == nullptr)
|
||||
return awt::Size(0,0);
|
||||
|
||||
geometry::RealRectangle2D aTextBBox (mpMode->maText.GetBoundingBox(rxCanvas));
|
||||
@ -1658,8 +1658,8 @@ awt::Size Label::CreateBoundingSize (
|
||||
|
||||
void Label::SetText (const OUString& rsText)
|
||||
{
|
||||
OSL_ASSERT(mpToolBar.get() != NULL);
|
||||
if (mpMode.get() == NULL)
|
||||
OSL_ASSERT(mpToolBar.get() != nullptr);
|
||||
if (mpMode.get() == nullptr)
|
||||
return;
|
||||
|
||||
const bool bRequestLayout (mpMode->maText.GetText().getLength() != rsText.getLength());
|
||||
@ -1679,7 +1679,7 @@ void Label::Paint (
|
||||
const rendering::ViewState& rViewState)
|
||||
{
|
||||
OSL_ASSERT(rxCanvas.is());
|
||||
if (mpMode.get() == NULL)
|
||||
if (mpMode.get() == nullptr)
|
||||
return;
|
||||
|
||||
mpMode->maText.Paint(rxCanvas, rViewState, GetBoundingBox(), awt::Point(0,0));
|
||||
@ -1739,7 +1739,7 @@ void Text::Paint (
|
||||
|
||||
if (msText.isEmpty())
|
||||
return;
|
||||
if (mpFont.get() == NULL)
|
||||
if (mpFont.get() == nullptr)
|
||||
return;
|
||||
|
||||
if ( ! mpFont->mxFont.is())
|
||||
@ -1761,7 +1761,7 @@ void Text::Paint (
|
||||
|
||||
rendering::RenderState aRenderState(
|
||||
geometry::AffineMatrix2D(1,0,nX, 0,1,nY),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, mpFont->mnColor);
|
||||
@ -1773,7 +1773,7 @@ void Text::Paint (
|
||||
|
||||
geometry::RealRectangle2D Text::GetBoundingBox (const Reference<rendering::XCanvas>& rxCanvas)
|
||||
{
|
||||
if (mpFont.get() != NULL && !msText.isEmpty())
|
||||
if (mpFont.get() != nullptr && !msText.isEmpty())
|
||||
{
|
||||
if ( ! mpFont->mxFont.is())
|
||||
mpFont->PrepareFont(rxCanvas);
|
||||
@ -1910,7 +1910,7 @@ void CurrentTimeLabel::SetModes (
|
||||
|
||||
PresentationTimeLabel::~PresentationTimeLabel()
|
||||
{
|
||||
mpToolBar->GetPresenterController()->SetPresentationTime(0);
|
||||
mpToolBar->GetPresenterController()->SetPresentationTime(nullptr);
|
||||
}
|
||||
|
||||
PresentationTimeLabel::PresentationTimeLabel (
|
||||
@ -1991,13 +1991,13 @@ void VerticalSeparator::Paint (
|
||||
|
||||
rendering::RenderState aRenderState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::OVER);
|
||||
if (mpMode.get() != NULL)
|
||||
if (mpMode.get() != nullptr)
|
||||
{
|
||||
PresenterTheme::SharedFontDescriptor pFont (mpMode->maText.GetFont());
|
||||
if (pFont.get() != NULL)
|
||||
if (pFont.get() != nullptr)
|
||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, pFont->mnColor);
|
||||
}
|
||||
|
||||
@ -2042,13 +2042,13 @@ void HorizontalSeparator::Paint (
|
||||
|
||||
rendering::RenderState aRenderState(
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::OVER);
|
||||
if (mpMode.get() != NULL)
|
||||
if (mpMode.get() != nullptr)
|
||||
{
|
||||
PresenterTheme::SharedFontDescriptor pFont (mpMode->maText.GetFont());
|
||||
if (pFont.get() != NULL)
|
||||
if (pFont.get() != nullptr)
|
||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, pFont->mnColor);
|
||||
}
|
||||
|
||||
|
@ -58,11 +58,11 @@ void PresenterUIPainter::PaintHorizontalBitmapComposite (
|
||||
// Prepare painting.
|
||||
rendering::ViewState aViewState (
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL);
|
||||
nullptr);
|
||||
|
||||
rendering::RenderState aRenderState (
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
|
||||
@ -160,11 +160,11 @@ void PresenterUIPainter::PaintVerticalBitmapComposite (
|
||||
// Prepare painting.
|
||||
rendering::ViewState aViewState (
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL);
|
||||
nullptr);
|
||||
|
||||
rendering::RenderState aRenderState (
|
||||
geometry::AffineMatrix2D(1,0,0, 0,1,0),
|
||||
NULL,
|
||||
nullptr,
|
||||
Sequence<double>(4),
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
|
||||
|
@ -169,7 +169,7 @@ void PresenterViewFactory::Register (const Reference<frame::XController>& rxCont
|
||||
OSL_ASSERT(false);
|
||||
if (mxConfigurationController.is())
|
||||
mxConfigurationController->removeResourceFactoryForReference(this);
|
||||
mxConfigurationController = NULL;
|
||||
mxConfigurationController = nullptr;
|
||||
|
||||
throw;
|
||||
}
|
||||
@ -184,9 +184,9 @@ void SAL_CALL PresenterViewFactory::disposing()
|
||||
{
|
||||
if (mxConfigurationController.is())
|
||||
mxConfigurationController->removeResourceFactoryForReference(this);
|
||||
mxConfigurationController = NULL;
|
||||
mxConfigurationController = nullptr;
|
||||
|
||||
if (mpResourceCache.get() != NULL)
|
||||
if (mpResourceCache.get() != nullptr)
|
||||
{
|
||||
// Dispose all views in the cache.
|
||||
ResourceContainer::const_iterator iView (mpResourceCache->begin());
|
||||
@ -223,13 +223,13 @@ Reference<XResource> SAL_CALL PresenterViewFactory::createResource (
|
||||
mxConfigurationController->getResource(rxViewId->getAnchor()),
|
||||
UNO_QUERY_THROW);
|
||||
xView = GetViewFromCache(rxViewId, xAnchorPane);
|
||||
if (xView == NULL)
|
||||
if (xView == nullptr)
|
||||
xView = CreateView(rxViewId, xAnchorPane);
|
||||
|
||||
// Activate the view.
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPresenterController->GetPaneContainer()->FindPaneId(rxViewId->getAnchor()));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
pDescriptor->SetActivationState(true);
|
||||
}
|
||||
|
||||
@ -248,16 +248,16 @@ void SAL_CALL PresenterViewFactory::releaseResource (const Reference<XResource>&
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPresenterController->GetPaneContainer()->FindPaneId(
|
||||
rxView->getResourceId()->getAnchor()));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
pDescriptor->SetActivationState(false);
|
||||
|
||||
// Dispose only views that we can not put into the cache.
|
||||
CachablePresenterView* pView = dynamic_cast<CachablePresenterView*>(rxView.get());
|
||||
if (pView == NULL || mpResourceCache.get()==NULL)
|
||||
if (pView == nullptr || mpResourceCache.get()==nullptr)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (pView != NULL)
|
||||
if (pView != nullptr)
|
||||
pView->ReleaseView();
|
||||
Reference<lang::XComponent> xComponent (rxView, UNO_QUERY);
|
||||
if (xComponent.is())
|
||||
@ -292,8 +292,8 @@ Reference<XResource> PresenterViewFactory::GetViewFromCache(
|
||||
const Reference<XResourceId>& rxViewId,
|
||||
const Reference<XPane>& rxAnchorPane) const
|
||||
{
|
||||
if (mpResourceCache.get() == NULL)
|
||||
return NULL;
|
||||
if (mpResourceCache.get() == nullptr)
|
||||
return nullptr;
|
||||
|
||||
try
|
||||
{
|
||||
@ -310,7 +310,7 @@ Reference<XResource> PresenterViewFactory::GetViewFromCache(
|
||||
{
|
||||
CachablePresenterView* pView
|
||||
= dynamic_cast<CachablePresenterView*>(iView->second.first.get());
|
||||
if (pView != NULL)
|
||||
if (pView != nullptr)
|
||||
pView->ActivatePresenterView();
|
||||
return Reference<XResource>(iView->second.first, UNO_QUERY);
|
||||
}
|
||||
@ -321,7 +321,7 @@ Reference<XResource> PresenterViewFactory::GetViewFromCache(
|
||||
catch (RuntimeException&)
|
||||
{
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference<XResource> PresenterViewFactory::CreateView(
|
||||
@ -361,12 +361,12 @@ Reference<XResource> PresenterViewFactory::CreateView(
|
||||
|
||||
// Activate it.
|
||||
CachablePresenterView* pView = dynamic_cast<CachablePresenterView*>(xView.get());
|
||||
if (pView != NULL)
|
||||
if (pView != nullptr)
|
||||
pView->ActivatePresenterView();
|
||||
}
|
||||
catch (RuntimeException&)
|
||||
{
|
||||
xView = NULL;
|
||||
xView = nullptr;
|
||||
}
|
||||
|
||||
return xView;
|
||||
@ -395,7 +395,7 @@ Reference<XView> PresenterViewFactory::CreateSlideShowView(
|
||||
}
|
||||
catch (RuntimeException&)
|
||||
{
|
||||
xView = NULL;
|
||||
xView = nullptr;
|
||||
}
|
||||
|
||||
return xView;
|
||||
@ -424,7 +424,7 @@ Reference<XView> PresenterViewFactory::CreateSlidePreviewView(
|
||||
}
|
||||
catch (RuntimeException&)
|
||||
{
|
||||
xView = NULL;
|
||||
xView = nullptr;
|
||||
}
|
||||
|
||||
return xView;
|
||||
@ -464,7 +464,7 @@ Reference<XView> PresenterViewFactory::CreateNotesView(
|
||||
}
|
||||
catch (RuntimeException&)
|
||||
{
|
||||
xView = NULL;
|
||||
xView = nullptr;
|
||||
}
|
||||
|
||||
return xView;
|
||||
@ -490,14 +490,14 @@ Reference<XView> PresenterViewFactory::CreateSlideSorterView(
|
||||
mpPresenterController));
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPresenterController->GetPaneContainer()->FindPaneId(rxViewId->getAnchor()));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
pDescriptor->maActivator = ::boost::bind(
|
||||
&PresenterSlideSorter::SetActiveState, _1);
|
||||
xView = pView.get();
|
||||
}
|
||||
catch (RuntimeException&)
|
||||
{
|
||||
xView = NULL;
|
||||
xView = nullptr;
|
||||
}
|
||||
|
||||
return xView;
|
||||
|
@ -97,12 +97,12 @@ void SAL_CALL PresenterWindowManager::disposing()
|
||||
{
|
||||
NotifyDisposing();
|
||||
|
||||
SetParentPane(NULL);
|
||||
SetParentPane(nullptr);
|
||||
|
||||
Reference<lang::XComponent> xComponent (mxPaneBorderManager, UNO_QUERY);
|
||||
if (xComponent.is())
|
||||
xComponent->dispose();
|
||||
mxPaneBorderManager = NULL;
|
||||
mxPaneBorderManager = nullptr;
|
||||
|
||||
PresenterPaneContainer::PaneList::const_iterator iPane;
|
||||
PresenterPaneContainer::PaneList::const_iterator iEnd (mpPaneContainer->maPanes.end());
|
||||
@ -129,8 +129,8 @@ void PresenterWindowManager::SetParentPane (
|
||||
mxParentWindow->removeMouseListener(this);
|
||||
mxParentWindow->removeFocusListener(this);
|
||||
}
|
||||
mxParentWindow = NULL;
|
||||
mxParentCanvas = NULL;
|
||||
mxParentWindow = nullptr;
|
||||
mxParentCanvas = nullptr;
|
||||
|
||||
if (rxPane.is())
|
||||
{
|
||||
@ -139,7 +139,7 @@ void PresenterWindowManager::SetParentPane (
|
||||
}
|
||||
else
|
||||
{
|
||||
mxParentWindow = NULL;
|
||||
mxParentWindow = nullptr;
|
||||
}
|
||||
|
||||
if (mxParentWindow.is())
|
||||
@ -162,7 +162,7 @@ void PresenterWindowManager::SetTheme (const std::shared_ptr<PresenterTheme>& rp
|
||||
|
||||
// Get background bitmap or background color from the theme.
|
||||
|
||||
if (mpTheme.get() != NULL)
|
||||
if (mpTheme.get() != nullptr)
|
||||
{
|
||||
mpBackgroundBitmap = mpTheme->GetBitmap(OUString(), "Background");
|
||||
}
|
||||
@ -172,8 +172,8 @@ void PresenterWindowManager::NotifyViewCreation (const Reference<XView>& rxView)
|
||||
{
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPaneContainer->FindPaneId(rxView->getResourceId()->getAnchor()));
|
||||
OSL_ASSERT(pDescriptor.get() != NULL);
|
||||
if (pDescriptor.get() != NULL)
|
||||
OSL_ASSERT(pDescriptor.get() != nullptr);
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
Layout();
|
||||
|
||||
@ -193,7 +193,7 @@ void PresenterWindowManager::SetPanePosSizeAbsolute (
|
||||
{
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPaneContainer->FindPaneURL(rsPaneURL));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
awt::Rectangle aParentBox = mxParentWindow->getPosSize();
|
||||
if (aParentBox.Width > 0 && aParentBox.Height > 0)
|
||||
@ -280,7 +280,7 @@ void SAL_CALL PresenterWindowManager::windowPaint (const awt::PaintEvent& rEvent
|
||||
if ( ! mxParentCanvas.is())
|
||||
return;
|
||||
|
||||
if (mpTheme.get()!=NULL)
|
||||
if (mpTheme.get()!=nullptr)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -362,7 +362,7 @@ void SAL_CALL PresenterWindowManager::disposing (const lang::EventObject& rEvent
|
||||
throw (RuntimeException, std::exception)
|
||||
{
|
||||
if (rEvent.Source == mxParentWindow)
|
||||
mxParentWindow = NULL;
|
||||
mxParentWindow = nullptr;
|
||||
else
|
||||
{
|
||||
Reference<awt::XWindow> xWindow (rEvent.Source, UNO_QUERY);
|
||||
@ -429,7 +429,7 @@ bool PresenterWindowManager::PaintChildren (const awt::PaintEvent& rEvent) const
|
||||
|
||||
void PresenterWindowManager::SetLayoutMode (const LayoutMode eMode)
|
||||
{
|
||||
OSL_ASSERT(mpPresenterController.get() != NULL);
|
||||
OSL_ASSERT(mpPresenterController.get() != nullptr);
|
||||
|
||||
if (meLayoutMode != eMode
|
||||
|| mbIsSlideSorterActive
|
||||
@ -613,8 +613,8 @@ void PresenterWindowManager::Layout()
|
||||
{
|
||||
mbIsLayoutPending = false;
|
||||
mbIsLayouting = true;
|
||||
mxScaledBackgroundBitmap = NULL;
|
||||
mxClipPolygon = NULL;
|
||||
mxScaledBackgroundBitmap = nullptr;
|
||||
mxClipPolygon = nullptr;
|
||||
|
||||
try
|
||||
{
|
||||
@ -660,7 +660,7 @@ void PresenterWindowManager::LayoutStandardMode()
|
||||
// go over the inner pane size.
|
||||
PresenterPaneContainer::SharedPaneDescriptor pPane (
|
||||
mpPaneContainer->FindPaneURL(PresenterPaneFactory::msCurrentSlidePreviewPaneURL));
|
||||
if (pPane.get() != NULL)
|
||||
if (pPane.get() != nullptr)
|
||||
{
|
||||
const awt::Size aCurrentSlideOuterBox(CalculatePaneSize(
|
||||
nHorizontalSlideDivide - 1.5*nGap,
|
||||
@ -682,7 +682,7 @@ void PresenterWindowManager::LayoutStandardMode()
|
||||
// width. This takes into acount the slide aspect ratio and thus has to
|
||||
// go over the inner pane size.
|
||||
pPane = mpPaneContainer->FindPaneURL(PresenterPaneFactory::msNextSlidePreviewPaneURL);
|
||||
if (pPane.get() != NULL)
|
||||
if (pPane.get() != nullptr)
|
||||
{
|
||||
const awt::Size aNextSlideOuterBox (CalculatePaneSize(
|
||||
aBox.Width - nHorizontalSlideDivide - 1.5*nGap,
|
||||
@ -721,7 +721,7 @@ void PresenterWindowManager::LayoutNotesMode()
|
||||
// The notes view has no fixed aspect ratio.
|
||||
PresenterPaneContainer::SharedPaneDescriptor pPane (
|
||||
mpPaneContainer->FindPaneURL(PresenterPaneFactory::msNotesPaneURL));
|
||||
if (pPane.get() != NULL)
|
||||
if (pPane.get() != nullptr)
|
||||
{
|
||||
const geometry::RealSize2D aNotesViewOuterSize(
|
||||
nPrimaryWidth - 1.5*nGap + 0.5,
|
||||
@ -745,7 +745,7 @@ void PresenterWindowManager::LayoutNotesMode()
|
||||
// width. This takes into acount the slide aspect ratio and thus has to
|
||||
// go over the inner pane size.
|
||||
pPane = mpPaneContainer->FindPaneURL(PresenterPaneFactory::msCurrentSlidePreviewPaneURL);
|
||||
if (pPane.get() != NULL)
|
||||
if (pPane.get() != nullptr)
|
||||
{
|
||||
const awt::Size aCurrentSlideOuterBox(CalculatePaneSize(
|
||||
nSecondaryWidth - 1.5*nGap,
|
||||
@ -766,7 +766,7 @@ void PresenterWindowManager::LayoutNotesMode()
|
||||
// width. This takes into acount the slide aspect ratio and thus has to
|
||||
// go over the inner pane size.
|
||||
pPane = mpPaneContainer->FindPaneURL(PresenterPaneFactory::msNextSlidePreviewPaneURL);
|
||||
if (pPane.get() != NULL)
|
||||
if (pPane.get() != nullptr)
|
||||
{
|
||||
const awt::Size aNextSlideOuterBox (CalculatePaneSize(
|
||||
nTertiaryWidth,
|
||||
@ -825,11 +825,11 @@ geometry::RealRectangle2D PresenterWindowManager::LayoutToolBar()
|
||||
// Get access to the tool bar.
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor(
|
||||
mpPaneContainer->FindPaneURL(PresenterPaneFactory::msToolBarPaneURL));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
PresenterToolBarView* pToolBarView
|
||||
= dynamic_cast<PresenterToolBarView*>(pDescriptor->mxView.get());
|
||||
if (pToolBarView != NULL && pToolBarView->GetPresenterToolBar().is())
|
||||
if (pToolBarView != nullptr && pToolBarView->GetPresenterToolBar().is())
|
||||
{
|
||||
geometry::RealSize2D aSize (pToolBarView->GetPresenterToolBar()->GetMinimalSize());
|
||||
|
||||
@ -955,9 +955,9 @@ void PresenterWindowManager::UpdateWindowSize (const Reference<awt::XWindow>& rx
|
||||
{
|
||||
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
|
||||
mpPaneContainer->FindBorderWindow(rxBorderWindow));
|
||||
if (pDescriptor.get() != NULL)
|
||||
if (pDescriptor.get() != nullptr)
|
||||
{
|
||||
mxClipPolygon = NULL;
|
||||
mxClipPolygon = nullptr;
|
||||
|
||||
awt::Rectangle aParentBox = mxParentWindow->getPosSize();
|
||||
awt::Rectangle aBorderBox (pDescriptor->mxBorderWindow->getPosSize());
|
||||
@ -1011,7 +1011,7 @@ void PresenterWindowManager::PaintBackground (const awt::Rectangle& rUpdateBox)
|
||||
rendering::CompositeOperation::SOURCE);
|
||||
|
||||
// Paint the background.
|
||||
if (mpBackgroundBitmap.get() != NULL)
|
||||
if (mpBackgroundBitmap.get() != nullptr)
|
||||
{
|
||||
ProvideBackgroundBitmap();
|
||||
|
||||
@ -1026,8 +1026,8 @@ void PresenterWindowManager::PaintBackground (const awt::Rectangle& rUpdateBox)
|
||||
1,
|
||||
0,
|
||||
mxScaledBackgroundBitmap,
|
||||
NULL,
|
||||
NULL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
rendering::StrokeAttributes(),
|
||||
rendering::TexturingMode::REPEAT,
|
||||
rendering::TexturingMode::REPEAT);
|
||||
@ -1180,7 +1180,7 @@ void PresenterWindowManager::Invalidate()
|
||||
}
|
||||
void PresenterWindowManager::Update()
|
||||
{
|
||||
mxClipPolygon = NULL;
|
||||
mxClipPolygon = nullptr;
|
||||
mbIsLayoutPending = true;
|
||||
|
||||
UpdateWindowList();
|
||||
|
Loading…
x
Reference in New Issue
Block a user