diff options
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 2 | ||||
-rw-r--r-- | include/editeng/editeng.hxx | 4 | ||||
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 36 | ||||
-rw-r--r-- | sc/source/filter/inc/htmlpars.hxx | 4 | ||||
-rw-r--r-- | sc/source/filter/inc/rtfparse.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/rtf/rtfparse.cxx | 21 | ||||
-rw-r--r-- | svx/source/table/tablertfimporter.cxx | 23 |
8 files changed, 47 insertions, 51 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 214552b29926..7c62f46b0c1c 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1518,12 +1518,12 @@ Link<EditStatus&, void> EditEngine::GetStatusEventHdl() const return pImpEditEngine->GetStatusEventHdl(); } -void EditEngine::SetImportHdl( const Link<>& rLink ) +void EditEngine::SetImportHdl( const Link<ImportInfo&,void>& rLink ) { pImpEditEngine->aImportHdl = rLink; } -Link<> EditEngine::GetImportHdl() const +Link<ImportInfo&,void> EditEngine::GetImportHdl() const { return pImpEditEngine->aImportHdl; } @@ -2725,7 +2725,7 @@ bool EditEngine::IsImportRTFStyleSheetsSet() const void EditEngine::CallImportHandler(ImportInfo& rInfo) { - pImpEditEngine->aImportHdl.Call(&rInfo); + pImpEditEngine->aImportHdl.Call(rInfo); } EditPaM EditEngine::InsertParaBreak( diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index f495d0d6345e..54b3f2ead560 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -481,7 +481,7 @@ private: Timer aStatusTimer; Link<EditStatus&,void> aStatusHdlLink; Link<EENotify&,void> aNotifyHdl; - Link<> aImportHdl; + Link<ImportInfo&,void> aImportHdl; Link<> aBeginMovingParagraphsHdl; Link<> aEndMovingParagraphsHdl; Link<> aBeginPasteOrDropHdl; diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 5bdae2058805..90fc7cc408fa 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -372,8 +372,8 @@ public: void SetNotifyHdl( const Link<EENotify&,void>& rLink ); Link<EENotify&,void> GetNotifyHdl() const; - void SetImportHdl( const Link<>& rLink ); - Link<> GetImportHdl() const; + void SetImportHdl( const Link<ImportInfo&,void>& rLink ); + Link<ImportInfo&,void> GetImportHdl() const; // Do not evaluate font formatting => For Outliner bool IsFlatMode() const; diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 2559f13094bc..53067062f9d0 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -264,7 +264,7 @@ ScHTMLLayoutParser::~ScHTMLLayoutParser() sal_uLong ScHTMLLayoutParser::Read( SvStream& rStream, const OUString& rBaseURL ) { - Link<> aOldLink = pEdit->GetImportHdl(); + Link<ImportInfo&,void> aOldLink = pEdit->GetImportHdl(); pEdit->SetImportHdl( LINK( this, ScHTMLLayoutParser, HTMLImportHdl ) ); SfxObjectShell* pObjSh = mpDoc->GetDocumentShell(); @@ -881,32 +881,32 @@ void ScHTMLLayoutParser::CloseEntry( ImportInfo* pInfo ) NewActEntry( pActEntry ); // New free flying pActEntry } -IMPL_LINK( ScHTMLLayoutParser, HTMLImportHdl, ImportInfo*, pInfo ) +IMPL_LINK_TYPED( ScHTMLLayoutParser, HTMLImportHdl, ImportInfo&, rInfo, void ) { - switch ( pInfo->eState ) + switch ( rInfo.eState ) { case HTMLIMP_NEXTTOKEN: - ProcToken( pInfo ); + ProcToken( &rInfo ); break; case HTMLIMP_UNKNOWNATTR: - ProcToken( pInfo ); + ProcToken( &rInfo ); break; case HTMLIMP_START: break; case HTMLIMP_END: - if ( pInfo->aSelection.nEndPos ) + if ( rInfo.aSelection.nEndPos ) { // If text remains: create paragraph, without calling CloseEntry(). if( bInCell ) // ...but only in opened table cells. { bInCell = false; - NextRow( pInfo ); + NextRow( &rInfo ); bInCell = true; } - CloseEntry( pInfo ); + CloseEntry( &rInfo ); } while ( nTableLevel > 0 ) - TableOff( pInfo ); // close tables, if </TABLE> missing + TableOff( &rInfo ); // close tables, if </TABLE> missing break; case HTMLIMP_SETATTR: break; @@ -915,8 +915,8 @@ IMPL_LINK( ScHTMLLayoutParser, HTMLImportHdl, ImportInfo*, pInfo ) case HTMLIMP_INSERTPARA: if ( nTableLevel < 1 ) { - CloseEntry( pInfo ); - NextRow( pInfo ); + CloseEntry( &rInfo ); + NextRow( &rInfo ); } break; case HTMLIMP_INSERTFIELD: @@ -924,7 +924,6 @@ IMPL_LINK( ScHTMLLayoutParser, HTMLImportHdl, ImportInfo*, pInfo ) default: OSL_FAIL("HTMLImportHdl: unknown ImportInfo.eState"); } - return 0; } // Greatest common divisor (Euclid) @@ -2874,7 +2873,7 @@ sal_uLong ScHTMLQueryParser::Read( SvStream& rStrm, const OUString& rBaseURL ) } } - Link<> aOldLink = pEdit->GetImportHdl(); + Link<ImportInfo&,void> aOldLink = pEdit->GetImportHdl(); pEdit->SetImportHdl( LINK( this, ScHTMLQueryParser, HTMLImportHdl ) ); sal_uLong nErr = pEdit->Read( rStrm, rBaseURL, EE_FORMAT_HTML, pAttributes ); pEdit->SetImportHdl( aOldLink ); @@ -3215,20 +3214,20 @@ void ScHTMLQueryParser::ParseStyle(const OUString&) {} #endif -IMPL_LINK( ScHTMLQueryParser, HTMLImportHdl, const ImportInfo*, pInfo ) +IMPL_LINK_TYPED( ScHTMLQueryParser, HTMLImportHdl, ImportInfo&, rInfo, void ) { - switch( pInfo->eState ) + switch( rInfo.eState ) { case HTMLIMP_START: break; case HTMLIMP_NEXTTOKEN: case HTMLIMP_UNKNOWNATTR: - ProcessToken( *pInfo ); + ProcessToken( rInfo ); break; case HTMLIMP_INSERTPARA: - mpCurrTable->InsertPara( *pInfo ); + mpCurrTable->InsertPara( rInfo ); break; case HTMLIMP_SETATTR: @@ -3238,13 +3237,12 @@ IMPL_LINK( ScHTMLQueryParser, HTMLImportHdl, const ImportInfo*, pInfo ) case HTMLIMP_END: while( mpCurrTable->GetTableId() != SC_HTML_GLOBAL_TABLE ) - CloseTable( *pInfo ); + CloseTable( rInfo ); break; default: OSL_FAIL( "ScHTMLQueryParser::HTMLImportHdl - unknown ImportInfo::eState" ); } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index 2b5c2c4315ca..27d2b85fdf3b 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -178,7 +178,7 @@ private: bool bInCell:1; bool bInTitle:1; - DECL_LINK( HTMLImportHdl, ImportInfo* ); + DECL_LINK_TYPED( HTMLImportHdl, ImportInfo&, void ); void NewActEntry( ScEEParseEntry* ); static void EntryEnd( ScEEParseEntry*, const ESelection& ); void ProcToken( ImportInfo* ); @@ -619,7 +619,7 @@ private: void ParseStyle(const OUString& rStrm); - DECL_LINK( HTMLImportHdl, const ImportInfo* ); + DECL_LINK_TYPED( HTMLImportHdl, ImportInfo&, void ); private: typedef ::std::unique_ptr< ScHTMLGlobalTable > ScHTMLGlobalTablePtr; diff --git a/sc/source/filter/inc/rtfparse.hxx b/sc/source/filter/inc/rtfparse.hxx index 6d3b8c417c42..857ed87fe0f3 100644 --- a/sc/source/filter/inc/rtfparse.hxx +++ b/sc/source/filter/inc/rtfparse.hxx @@ -61,7 +61,7 @@ private: sal_uInt16 nLastWidth; bool bNewDef; - DECL_LINK( RTFImportHdl, ImportInfo* ); + DECL_LINK_TYPED( RTFImportHdl, ImportInfo&, void ); inline void NextRow(); void EntryEnd( ScEEParseEntry*, const ESelection& ); void ProcToken( ImportInfo* ); diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx index b436ebfb457e..729a8fffce12 100644 --- a/sc/source/filter/rtf/rtfparse.cxx +++ b/sc/source/filter/rtf/rtfparse.cxx @@ -58,7 +58,7 @@ ScRTFParser::~ScRTFParser() sal_uLong ScRTFParser::Read( SvStream& rStream, const OUString& rBaseURL ) { - Link<> aOldLink = pEdit->GetImportHdl(); + Link<ImportInfo&,void> aOldLink = pEdit->GetImportHdl(); pEdit->SetImportHdl( LINK( this, ScRTFParser, RTFImportHdl ) ); sal_uLong nErr = pEdit->Read( rStream, rBaseURL, EE_FORMAT_RTF ); if ( nLastToken == RTF_PAR ) @@ -154,19 +154,19 @@ void ScRTFParser::ColAdjust() } } -IMPL_LINK( ScRTFParser, RTFImportHdl, ImportInfo*, pInfo ) +IMPL_LINK_TYPED( ScRTFParser, RTFImportHdl, ImportInfo&, rInfo, void ) { - switch ( pInfo->eState ) + switch ( rInfo.eState ) { case RTFIMP_NEXTTOKEN: - ProcToken( pInfo ); + ProcToken( &rInfo ); break; case RTFIMP_UNKNOWNATTR: - ProcToken( pInfo ); + ProcToken( &rInfo ); break; case RTFIMP_START: { - SvxRTFParser* pParser = static_cast<SvxRTFParser*>(pInfo->pParser); + SvxRTFParser* pParser = static_cast<SvxRTFParser*>(rInfo.pParser); pParser->SetAttrPool( pPool ); RTFPardAttrMapIds& rMap = pParser->GetPardMap(); rMap.nBrush = ATTR_BACKGROUND; @@ -175,14 +175,14 @@ IMPL_LINK( ScRTFParser, RTFImportHdl, ImportInfo*, pInfo ) } break; case RTFIMP_END: - if ( pInfo->aSelection.nEndPos ) + if ( rInfo.aSelection.nEndPos ) { // If still text: create last paragraph pActDefault = NULL; - pInfo->nToken = RTF_PAR; + rInfo.nToken = RTF_PAR; // EditEngine did not attach an empty paragraph anymore // which EntryEnd could strip - pInfo->aSelection.nEndPara++; - ProcToken( pInfo ); + rInfo.aSelection.nEndPara++; + ProcToken( &rInfo ); } break; case RTFIMP_SETATTR: @@ -194,7 +194,6 @@ IMPL_LINK( ScRTFParser, RTFImportHdl, ImportInfo*, pInfo ) default: OSL_FAIL("unknown ImportInfo.eState"); } - return 0; } // Bad behavior: diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index 3974b367dc89..d37f07cac3b2 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -92,7 +92,7 @@ public: void FillTable(); - DECL_LINK( RTFImportHdl, ImportInfo* ); + DECL_LINK_TYPED( RTFImportHdl, ImportInfo&, void ); private: SdrTableObj& mrTableObj; @@ -154,7 +154,7 @@ void SdrTableRTFParser::Read( SvStream& rStream ) { EditEngine& rEdit = const_cast< EditEngine& >( mpOutliner->GetEditEngine() ); - Link<> aOldLink( rEdit.GetImportHdl() ); + Link<ImportInfo&,void> aOldLink( rEdit.GetImportHdl() ); rEdit.SetImportHdl( LINK( this, SdrTableRTFParser, RTFImportHdl ) ); mpOutliner->Read( rStream, OUString(), EE_FORMAT_RTF ); rEdit.SetImportHdl( aOldLink ); @@ -162,31 +162,31 @@ void SdrTableRTFParser::Read( SvStream& rStream ) FillTable(); } -IMPL_LINK( SdrTableRTFParser, RTFImportHdl, ImportInfo*, pInfo ) +IMPL_LINK_TYPED( SdrTableRTFParser, RTFImportHdl, ImportInfo&, rInfo, void ) { - switch ( pInfo->eState ) + switch ( rInfo.eState ) { case RTFIMP_NEXTTOKEN: - ProcToken( pInfo ); + ProcToken( &rInfo ); break; case RTFIMP_UNKNOWNATTR: - ProcToken( pInfo ); + ProcToken( &rInfo ); break; case RTFIMP_START: { - SvxRTFParser* pParser = static_cast<SvxRTFParser*>(pInfo->pParser); + SvxRTFParser* pParser = static_cast<SvxRTFParser*>(rInfo.pParser); pParser->SetAttrPool( &mrItemPool ); RTFPardAttrMapIds& rMap = pParser->GetPardMap(); rMap.nBox = SDRATTR_TABLE_BORDER; } break; case RTFIMP_END: - if ( pInfo->aSelection.nEndPos ) + if ( rInfo.aSelection.nEndPos ) { mpActDefault = NULL; - pInfo->nToken = RTF_PAR; - pInfo->aSelection.nEndPara++; - ProcToken( pInfo ); + rInfo.nToken = RTF_PAR; + rInfo.aSelection.nEndPara++; + ProcToken( &rInfo ); } break; case RTFIMP_SETATTR: @@ -198,7 +198,6 @@ IMPL_LINK( SdrTableRTFParser, RTFImportHdl, ImportInfo*, pInfo ) default: SAL_WARN( "svx.table","unknown ImportInfo.eState"); } - return 0; } void SdrTableRTFParser::NextRow() |