diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-08-16 14:49:43 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-08-16 15:38:37 +0200 |
commit | 9adf29502bf7db90be8c37b2559d8afb9e4bc2af (patch) | |
tree | ed84dba23a2f7c2aa7b215c93c1db7ed328a0999 | |
parent | 86b81fb1ef59b0e9e5892a5f33ccab367d01fb89 (diff) |
tubes: correctly use SAL_INFO and SAL_WARN macros
Change-Id: Ib08ff43a4a65029b37ddbddea1538d570d258300
-rw-r--r-- | sc/source/ui/collab/sccollaboration.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/collab/sendfunc.cxx | 22 | ||||
-rw-r--r-- | sc/source/ui/collab/sendfunc.hxx | 4 | ||||
-rw-r--r-- | tubes/source/contacts.cxx | 4 |
4 files changed, 11 insertions, 24 deletions
diff --git a/sc/source/ui/collab/sccollaboration.cxx b/sc/source/ui/collab/sccollaboration.cxx index 5dc527d13473..3b07f1a06a77 100644 --- a/sc/source/ui/collab/sccollaboration.cxx +++ b/sc/source/ui/collab/sccollaboration.cxx @@ -61,12 +61,9 @@ void ScCollaboration::SaveAndSendFile( TpContact* pContact ) const xDocRecovery->storeToRecoveryFile( aFileURL, aDescriptor.getAsConstPropertyValueList() ); } catch (const css::uno::Exception &ex) { - fprintf( stderr, "exception foo !\n" ); + SAL_WARN( "sc.tubes", "Exception when saving file " << aFileURL ); } - fprintf( stderr, "Temp file is '%s'\n", - rtl::OUStringToOString( aFileURL, RTL_TEXTENCODING_UTF8 ).getStr() ); - SendFile( pContact, aFileURL ); // FIXME: unlink the file after send ... diff --git a/sc/source/ui/collab/sendfunc.cxx b/sc/source/ui/collab/sendfunc.cxx index 7a7c7414e000..3c761fbb911a 100644 --- a/sc/source/ui/collab/sendfunc.cxx +++ b/sc/source/ui/collab/sendfunc.cxx @@ -66,16 +66,15 @@ void ScDocFuncSend::RecvMessage( const rtl::OString &rString ) mpDirect->RenameTable( aReader.getInt( 1 ), aReader.getString( 2 ), aReader.getBool( 3 ), aReader.getBool( 4 ) ); else - fprintf( stderr, "Error: unknown message '%s' (%d)\n", - rString.getStr(), (int)aReader.getArgCount() ); + SAL_WARN( "sc.tubes", "Error: unknown message '" << rString.getStr() + << "' (" << aReader.getArgCount() << ")" ); } catch (const ProtocolError &e) { - fprintf( stderr, "Error: protocol twisting '%s'\n", e.message ); + SAL_WARN( "sc.tubes", "Error: protocol twisting: " << e.message ); } } void ScDocFuncSend::SendMessage( ScChangeOpWriter &rOp ) { - fprintf( stderr, "Op: '%s'\n", rOp.toString().getStr() ); mpCollaboration->SendPacket( rOp.toString() ); } @@ -86,12 +85,10 @@ ScDocFuncSend::ScDocFuncSend( ScDocShell& rDocSh, ScDocFuncDirect *pDirect, ScCo mpDirect( pDirect ), mpCollaboration( pCollaboration ) { - fprintf( stderr, "Sender created !\n" ); } ScDocFuncSend::~ScDocFuncSend() { - fprintf( stderr, "Sender destroyed !\n" ); delete mpDirect; } @@ -131,7 +128,6 @@ sal_Bool ScDocFuncSend::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& r sal_Bool ScDocFuncSend::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sal_Bool bApi ) { - fprintf( stderr, "put cell '%p' type %d %d\n", pNewCell, pNewCell->GetCellType(), bApi ); ScChangeOpWriter aOp( "putCell" ); aOp.appendAddress( rPos ); aOp.appendCell( pNewCell ); @@ -143,7 +139,7 @@ sal_Bool ScDocFuncSend::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sa sal_Bool ScDocFuncSend::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, sal_Bool bInterpret, sal_Bool bApi ) { - fprintf( stderr, "put data\n" ); + SAL_INFO( "sc.tubes", "PutData not implemented!" ); return ScDocFunc::PutData( rPos, rEngine, bInterpret, bApi ); } @@ -152,8 +148,7 @@ sal_Bool ScDocFuncSend::SetCellText( const ScAddress& rPos, const String& rText, const String& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ) { - fprintf( stderr, "set cell text '%s'\n", - rtl::OUStringToOString( rText, RTL_TEXTENCODING_UTF8 ).getStr() ); + SAL_INFO( "sc.tubes", "SetCellText not implemented!" ); return ScDocFunc::SetCellText( rPos, rText, bInterpret, bEnglish, bApi, rFormulaNmsp, eGrammar ); } @@ -191,22 +186,21 @@ sal_Bool ScDocFuncSend::RenameTable( SCTAB nTab, const String& rName, sal_Bool ScDocFuncSend::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, sal_Bool bRecord, sal_Bool bApi ) { - fprintf( stderr, "Apply Attributes\n" ); + SAL_INFO( "sc.tubes", "ApplyAttributes not implemented!" ); return ScDocFunc::ApplyAttributes( rMark, rPattern, bRecord, bApi ); } sal_Bool ScDocFuncSend::ApplyStyle( const ScMarkData& rMark, const String& rStyleName, sal_Bool bRecord, sal_Bool bApi ) { - fprintf( stderr, "Apply Style '%s'\n", - rtl::OUStringToOString( rStyleName, RTL_TEXTENCODING_UTF8 ).getStr() ); + SAL_INFO( "sc.tubes", "ApplyStyle not implemented!" ); return ScDocFunc::ApplyStyle( rMark, rStyleName, bRecord, bApi ); } sal_Bool ScDocFuncSend::MergeCells( const ScCellMergeOption& rOption, sal_Bool bContents, sal_Bool bRecord, sal_Bool bApi ) { - fprintf( stderr, "Merge cells\n" ); + SAL_INFO( "sc.tubes", "MergeCells not implemented!" ); return ScDocFunc::MergeCells( rOption, bContents, bRecord, bApi ); } diff --git a/sc/source/ui/collab/sendfunc.hxx b/sc/source/ui/collab/sendfunc.hxx index 676fc78a915c..f7fcca9b81ed 100644 --- a/sc/source/ui/collab/sendfunc.hxx +++ b/sc/source/ui/collab/sendfunc.hxx @@ -152,10 +152,6 @@ public: } if ( nStart < rString.getLength()) maArgs.push_back( rString.copy( nStart, rString.getLength() - nStart ) ); - - for (size_t i = 0; i < maArgs.size(); i++) - fprintf( stderr, "arg %d: '%s'\n", (int)i, - rtl::OUStringToOString( maArgs[i], RTL_TEXTENCODING_UTF8).getStr() ); } ~ScChangeOpReader() {} diff --git a/tubes/source/contacts.cxx b/tubes/source/contacts.cxx index 5a46248129ce..1017fade4b14 100644 --- a/tubes/source/contacts.cxx +++ b/tubes/source/contacts.cxx @@ -91,7 +91,7 @@ class TubeContacts : public ModelessDialog void Listen() { if (!TeleManager::registerClients()) - SAL_INFO( "sc.tubes", "Could not register client handlers." ); + SAL_INFO( "tubes", "Could not register client handlers." ); } void StartDemoSession() @@ -193,7 +193,7 @@ public: void Populate() { - SAL_INFO( "sc.tubes", "Populating contact list dialog" ); + SAL_INFO( "tubes", "Populating contact list dialog" ); maList.Clear(); maACs.clear(); ContactList *pContacts = TeleManager::getContactList(); |