summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-12 16:31:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-13 06:12:00 +0000
commitc3586b684c58e06cd80dea87d7681354acfec80b (patch)
tree09e1b3caab55f1c9ecd4c2559250b42892fd5ee7 /cui
parenta005fbeddc4e615cfff56a9bd84355f8d42c1c8c (diff)
OSL_TRACE->SAL in chart2..oox
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2 Reviewed-on: https://gerrit.libreoffice.org/31907 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfg.cxx64
-rw-r--r--cui/source/dialogs/scriptdlg.cxx19
-rw-r--r--cui/source/options/optinet2.cxx42
-rw-r--r--cui/source/options/optupdt.cxx3
4 files changed, 48 insertions, 80 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index c5588c055726..8e8c8dd1d7a5 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -97,8 +97,6 @@
#include "dlgname.hxx"
-#define PRTSTR(x) OUStringToOString(x, RTL_TEXTENCODING_ASCII_US).pData->buffer
-
#define ENTRY_HEIGHT 16
static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
@@ -136,7 +134,7 @@ void printPropertySet(
uno::Sequence< beans::Property > aPropDetails =
xPropSetInfo->getProperties();
- OSL_TRACE("printPropertySet: %d properties", aPropDetails.getLength());
+ SAL_WARN("cui", "printPropertySet: " << aPropDetails.getLength() << " properties" );
for ( sal_Int32 i = 0; i < aPropDetails.getLength(); ++i )
{
@@ -147,18 +145,15 @@ void printPropertySet(
if ( a >>= tmp )
{
- OSL_TRACE("%s: Got property: %s = %s",
- PRTSTR(prefix), PRTSTR(aPropDetails[i].Name), PRTSTR(tmp));
+ SAL_WARN("cui", prefix << ": Got property: " << aPropDetails[i].Name << tmp);
}
else if ( ( a >>= ival ) )
{
- OSL_TRACE("%s: Got property: %s = %d",
- PRTSTR(prefix), PRTSTR(aPropDetails[i].Name), ival);
+ SAL_WARN("cui", prefix << ": Got property: " << aPropDetails[i].Name << " = " << ival);
}
else
{
- OSL_TRACE("%s: Got property: %s of type %s",
- PRTSTR(prefix), PRTSTR(aPropDetails[i].Name), PRTSTR(a.getValueTypeName()));
+ SAL_WARN("cui", prefix << ": Got property: " << aPropDetails[i].Name << " of type " << a.getValueTypeName());
}
}
}
@@ -173,8 +168,7 @@ void printProperties(
aProp[i].Value >>= tmp;
- OSL_TRACE("%s: Got property: %s = %s",
- PRTSTR(prefix), PRTSTR(aProp[i].Name), PRTSTR(tmp));
+ SAL_WARN("cui", prefix << ": Got property: " << aProp[i].Name << " = " << tmp);
}
}
@@ -186,7 +180,7 @@ void printEntries(SvxEntries* entries)
{
SvxConfigEntry* entry = *iter;
- OSL_TRACE("printEntries: %s", PRTSTR(entry->GetName()));
+ SAL_WARN("cui", "printEntries: " << entry->GetName());
}
}
@@ -405,8 +399,6 @@ void RemoveEntry( SvxEntries* pEntries, SvxConfigEntry* pChildEntry )
bool
SvxConfigPage::CanConfig( const OUString& aModuleId )
{
- OSL_TRACE("SupportsDocumentConfig: %s", PRTSTR(aModuleId));
-
if ( aModuleId == "com.sun.star.script.BasicIDE" || aModuleId == "com.sun.star.frame.Bibliography" )
{
return false;
@@ -1197,15 +1189,15 @@ bool MenuSaveInData::Apply()
}
catch ( container::NoSuchElementException& )
{
- OSL_TRACE("caught container::NoSuchElementException saving settings");
+ SAL_WARN("cui.customize", "caught container::NoSuchElementException saving settings");
}
catch ( css::io::IOException& )
{
- OSL_TRACE("caught IOException saving settings");
+ SAL_WARN("cui.customize", "caught IOException saving settings");
}
catch ( css::uno::Exception& )
{
- OSL_TRACE("caught some other exception saving settings");
+ SAL_WARN("cui.customize", "caught some other exception saving settings");
}
SetModified( false );
@@ -3482,7 +3474,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, void )
}
catch ( uno::Exception& )
{
- OSL_TRACE("Error restoring image");
+ SAL_WARN("cui.customize", "Error restoring image");
}
break;
}
@@ -3557,7 +3549,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, void )
}
catch ( uno::Exception& )
{
- OSL_TRACE("Error replacing image");
+ SAL_WARN("cui.customize", "Error replacing image");
}
}
}
@@ -3617,7 +3609,7 @@ IMPL_LINK( SvxToolbarConfigPage, EntrySelectHdl, MenuButton *, pButton, void )
}
catch ( uno::Exception& )
{
- OSL_TRACE("Error resetting image");
+ SAL_WARN("cui.customize", "Error resetting image");
}
break;
}
@@ -3784,7 +3776,7 @@ void ToolbarSaveInData::SetSystemStyle(
catch ( uno::Exception& )
{
// do nothing, a default value is returned
- OSL_TRACE("Exception setting toolbar style");
+ SAL_WARN("cui.customize", "Exception setting toolbar style");
}
}
}
@@ -4140,7 +4132,7 @@ void ToolbarSaveInData::Reset()
}
catch ( uno::Exception& )
{
- OSL_TRACE("Error resetting all icons when resetting toolbars");
+ SAL_WARN("cui.customize", "Error resetting all icons when resetting toolbars");
}
}
@@ -4239,15 +4231,15 @@ void ToolbarSaveInData::ApplyToolbar( SvxConfigEntry* pToolbar )
}
catch ( container::NoSuchElementException& )
{
- OSL_TRACE("caught container::NoSuchElementException saving settings");
+ SAL_WARN("cui.customize", "caught container::NoSuchElementException saving settings");
}
catch ( css::io::IOException& )
{
- OSL_TRACE("caught IOException saving settings");
+ SAL_WARN("cui.customize", "caught IOException saving settings");
}
catch ( css::uno::Exception& )
{
- OSL_TRACE("caught some other exception saving settings");
+ SAL_WARN("cui.customize", "caught some other exception saving settings");
}
PersistChanges( GetConfigManager() );
@@ -4275,19 +4267,19 @@ void ToolbarSaveInData::CreateToolbar( SvxConfigEntry* pToolbar )
}
catch ( container::ElementExistException& )
{
- OSL_TRACE("caught ElementExistsException saving settings");
+ SAL_WARN("cui.customize", "caught ElementExistsException saving settings");
}
catch ( css::lang::IllegalArgumentException& )
{
- OSL_TRACE("caught IOException saving settings");
+ SAL_WARN("cui.customize", "caught IOException saving settings");
}
catch ( css::lang::IllegalAccessException& )
{
- OSL_TRACE("caught IOException saving settings");
+ SAL_WARN("cui.customize", "caught IOException saving settings");
}
catch ( css::uno::Exception& )
{
- OSL_TRACE("caught some other exception saving settings");
+ SAL_WARN("cui.customize", "caught some other exception saving settings");
}
GetEntries()->push_back( pToolbar );
@@ -4369,10 +4361,10 @@ void ToolbarSaveInData::RestoreToolbar( SvxConfigEntry* pToolbar )
{
GetImageManager()->removeImages( GetImageType(), aURLSeq );
}
- catch ( uno::Exception& )
- {
- OSL_TRACE("Error restoring icon when resetting toolbar");
- }
+ catch ( uno::Exception& )
+ {
+ SAL_WARN("cui.customize", "Error restoring icon when resetting toolbar");
+ }
}
PersistChanges( GetImageManager() );
}
@@ -5574,17 +5566,17 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL )
}
else
{
- OSL_TRACE("could not create Image from XGraphic");
+ SAL_WARN("cui.customize", "could not create Image from XGraphic");
}
}
else
{
- OSL_TRACE("could not get query XGraphic");
+ SAL_WARN("cui.customize", "could not get query XGraphic");
}
}
catch( uno::Exception& e )
{
- OSL_TRACE("Caught exception importing XGraphic: %s", PRTSTR(e.Message));
+ SAL_WARN("cui.customize", "Caught exception importing XGraphic: " << e.Message);
}
return result;
}
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 855a5be1b615..84f3a3d68c2d 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -182,9 +182,7 @@ void SFTreeListBox::Init( const OUString& language )
}
catch( Exception& e )
{
- OSL_TRACE("Exception getting root browse node from factory: %s",
- OUStringToOString(
- e.Message , RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ SAL_WARN("cui.dialogs", "Exception getting root browse node from factory: " << e.Message );
// TODO exception handling
}
@@ -762,8 +760,7 @@ IMPL_LINK( SvxScriptOrgDialog, ButtonHdl, Button *, pButton, void )
}
catch( Exception& e )
{
- OSL_TRACE("Caught exception trying to invoke %s", OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
-
+ SAL_WARN("cui.dialogs", "Caught exception trying to invoke " << e.Message );
}
}
}
@@ -940,9 +937,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
}
catch( Exception& e )
{
- OSL_TRACE("Caught exception trying to Create %s",
- OUStringToOString(
- e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ SAL_WARN("cui.dialogs", "Caught exception trying to Create " << e.Message );
}
}
if ( aChildNode.is() )
@@ -1044,9 +1039,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
}
catch( Exception& e )
{
- OSL_TRACE("Caught exception trying to Rename %s",
- OUStringToOString(
- e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ SAL_WARN("cui.dialogs", "Caught exception trying to Rename " << e.Message );
}
}
if ( aChildNode.is() )
@@ -1092,9 +1085,7 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry )
}
catch( Exception& e )
{
- OSL_TRACE("Caught exception trying to delete %s",
- OUStringToOString(
- e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ SAL_WARN("cui.dialogs", "Caught exception trying to delete " << e.Message );
}
}
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 064764916ac3..34a5be87667d 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -290,19 +290,15 @@ void SvxProxyTabPage::ReadConfigData_Impl()
m_pNoProxyForED->SetText( aStringValue );
}
}
-
catch (const container::NoSuchElementException&) {
- OSL_TRACE( "SvxProxyTabPage::ReadConfigData_Impl: NoSuchElementException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::ReadConfigData_Impl: NoSuchElementException caught" );
}
-
catch (const css::lang::WrappedTargetException &) {
- OSL_TRACE( "SvxProxyTabPage::ReadConfigData_Impl: WrappedTargetException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::ReadConfigData_Impl: WrappedTargetException caught" );
}
-
catch (const RuntimeException &) {
- OSL_TRACE( "SvxProxyTabPage::ReadConfigData_Impl: RuntimeException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::ReadConfigData_Impl: RuntimeException caught" );
}
-
}
void SvxProxyTabPage::ReadConfigDefaults_Impl()
@@ -351,16 +347,14 @@ void SvxProxyTabPage::ReadConfigDefaults_Impl()
}
catch (const beans::UnknownPropertyException &)
{
- OSL_TRACE( "SvxProxyTabPage::RestoreConfigDefaults_Impl: UnknownPropertyException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::RestoreConfigDefaults_Impl: UnknownPropertyException caught" );
}
-
catch (const css::lang::WrappedTargetException &) {
- OSL_TRACE( "SvxProxyTabPage::RestoreConfigDefaults_Impl: WrappedTargetException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::RestoreConfigDefaults_Impl: WrappedTargetException caught" );
}
-
catch (const RuntimeException &)
{
- OSL_TRACE( "SvxProxyTabPage::RestoreConfigDefaults_Impl: RuntimeException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::RestoreConfigDefaults_Impl: RuntimeException caught" );
}
}
@@ -382,19 +376,16 @@ void SvxProxyTabPage::RestoreConfigDefaults_Impl()
Reference< util::XChangesBatch > xChangesBatch(m_xConfigurationUpdateAccess, UNO_QUERY_THROW);
xChangesBatch->commitChanges();
}
-
catch (const beans::UnknownPropertyException &)
{
- OSL_TRACE( "SvxProxyTabPage::RestoreConfigDefaults_Impl: UnknownPropertyException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::RestoreConfigDefaults_Impl: UnknownPropertyException caught" );
}
-
catch (const css::lang::WrappedTargetException &) {
- OSL_TRACE( "SvxProxyTabPage::RestoreConfigDefaults_Impl: WrappedTargetException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::RestoreConfigDefaults_Impl: WrappedTargetException caught" );
}
-
catch (const RuntimeException &)
{
- OSL_TRACE( "SvxProxyTabPage::RestoreConfigDefaults_Impl: RuntimeException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::RestoreConfigDefaults_Impl: RuntimeException caught" );
}
}
@@ -480,25 +471,20 @@ bool SvxProxyTabPage::FillItemSet(SfxItemSet* )
Reference< util::XChangesBatch > xChangesBatch(m_xConfigurationUpdateAccess, UNO_QUERY_THROW);
xChangesBatch->commitChanges();
}
-
catch (const css::lang::IllegalArgumentException &) {
- OSL_TRACE( "SvxProxyTabPage::FillItemSet: IllegalArgumentException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::FillItemSet: IllegalArgumentException caught" );
}
-
catch (const beans::UnknownPropertyException &) {
- OSL_TRACE( "SvxProxyTabPage::FillItemSet: UnknownPropertyException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::FillItemSet: UnknownPropertyException caught" );
}
-
catch (const beans::PropertyVetoException &) {
- OSL_TRACE( "SvxProxyTabPage::FillItemSet: PropertyVetoException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::FillItemSet: PropertyVetoException caught" );
}
-
catch (const css::lang::WrappedTargetException &) {
- OSL_TRACE( "SvxProxyTabPage::FillItemSet: WrappedTargetException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::FillItemSet: WrappedTargetException caught" );
}
-
catch (const RuntimeException &) {
- OSL_TRACE( "SvxProxyTabPage::FillItemSet: RuntimeException caught" );
+ SAL_WARN("cui.options", "SvxProxyTabPage::FillItemSet: RuntimeException caught" );
}
return bModified;
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 36e2b998c879..121eed77e551 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -414,8 +414,7 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, CheckNowHdl_Impl, Button*, void)
}
catch( const uno::Exception& e )
{
- OSL_TRACE( "Caught exception: %s\n thread terminated.\n",
- OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
+ SAL_WARN("cui.options", "Caught exception, thread terminated. " << e.Message);
}
}