[Libreoffice-commits] core.git: sal/inc vbahelper/source
Radu Ioan
ioan.radu.g at gmail.com
Wed Apr 3 13:40:28 PDT 2013
sal/inc/sal/log-areas.dox | 1 +
vbahelper/source/msforms/service.cxx | 4 ++--
vbahelper/source/msforms/vbacombobox.cxx | 4 ++--
vbahelper/source/msforms/vbatogglebutton.cxx | 8 ++++----
vbahelper/source/msforms/vbauserform.cxx | 8 ++++----
vbahelper/source/vbahelper/vbacommandbar.cxx | 2 +-
vbahelper/source/vbahelper/vbacommandbarcontrol.cxx | 2 +-
vbahelper/source/vbahelper/vbacommandbarhelper.cxx | 2 +-
vbahelper/source/vbahelper/vbadocumentbase.cxx | 2 +-
vbahelper/source/vbahelper/vbaeventshelperbase.cxx | 6 +++---
vbahelper/source/vbahelper/vbahelper.cxx | 10 ++++------
vbahelper/source/vbahelper/vbashape.cxx | 2 +-
12 files changed, 25 insertions(+), 26 deletions(-)
New commits:
commit 16d142443395b888c909fa92570e1a47833da3ff
Author: Radu Ioan <ioan.radu.g at gmail.com>
Date: Wed Apr 3 00:04:46 2013 +0300
fdo#43157 - Clean up OSL_ASSERT, DBG_ASSERT
- replaced osl_trace with sal_info
- added new log areas to log-area.dox
Change-Id: I20f539bd9fa62bef2e9a2a82b59e0b15f4efdd48
Reviewed-on: https://gerrit.libreoffice.org/3179
Reviewed-by: Thomas Arnhold <thomas at arnhold.org>
Tested-by: Thomas Arnhold <thomas at arnhold.org>
diff --git a/sal/inc/sal/log-areas.dox b/sal/inc/sal/log-areas.dox
index c36c742..b14cb46 100644
--- a/sal/inc/sal/log-areas.dox
+++ b/sal/inc/sal/log-areas.dox
@@ -334,6 +334,7 @@ certain functionality.
@li @c ucbhelper
@li @c unoidl
@li @c uui
+ at li @c vbahelper
@li @c xmlhelp
@li @c xmloff
@li @c xmlreader
diff --git a/vbahelper/source/msforms/service.cxx b/vbahelper/source/msforms/service.cxx
index 9bc7953..5a9120f 100644
--- a/vbahelper/source/msforms/service.cxx
+++ b/vbahelper/source/msforms/service.cxx
@@ -46,10 +46,10 @@ extern "C"
const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
registry::XRegistryKey * pRegistryKey )
{
- OSL_TRACE("In component_getFactory for %s", pImplName );
+ SAL_INFO("vbahelper", "In component_getFactory for " << pImplName );
void* pRet = component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey, controlprovider::serviceDecl, userform::serviceDecl );
- OSL_TRACE("Ret is 0x%x", pRet);
+ SAL_INFO("vbahelper", "Ret is 0x" << std::hex << pRet);
return pRet;
}
}
diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx
index b78dea3..63856e5 100644
--- a/vbahelper/source/msforms/vbacombobox.cxx
+++ b/vbahelper/source/msforms/vbacombobox.cxx
@@ -104,13 +104,13 @@ ScVbaComboBox::getListIndex() throw (uno::RuntimeException)
{
if ( sItems[ index ].equals( sText ) )
{
- OSL_TRACE("getListIndex returning %d", index );
+ SAL_INFO("vbahelper", "getListIndex returning " << index );
return uno::makeAny( index );
}
}
}
- OSL_TRACE("getListIndex returning %d", -1 );
+ SAL_INFO("vbahelper", "getListIndex returning -1" );
return uno::makeAny( sal_Int32( -1 ) );
}
diff --git a/vbahelper/source/msforms/vbatogglebutton.cxx b/vbahelper/source/msforms/vbatogglebutton.cxx
index 6bf65c1..93073bc 100644
--- a/vbahelper/source/msforms/vbatogglebutton.cxx
+++ b/vbahelper/source/msforms/vbatogglebutton.cxx
@@ -29,13 +29,13 @@ const static OUString TOGGLE( "Toggle" );
const static OUString STATE( "State" );
ScVbaToggleButton::ScVbaToggleButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< uno::XInterface >& xControl, const uno::Reference< frame::XModel >& xModel, ov::AbstractGeometryAttributes* pGeomHelper ) : ToggleButtonImpl_BASE( xParent, xContext, xControl, xModel, pGeomHelper )
{
- OSL_TRACE("ScVbaToggleButton(ctor)");
+ SAL_INFO("vbahelper", "ScVbaToggleButton(ctor)");
m_xProps->setPropertyValue( TOGGLE, uno::makeAny( sal_True ) );
}
ScVbaToggleButton::~ScVbaToggleButton()
{
- OSL_TRACE("~ScVbaToggleButton(dtor)");
+ SAL_INFO("vbahelper", "~ScVbaToggleButton(dtor)");
}
// Attributes
@@ -67,9 +67,9 @@ ScVbaToggleButton::setValue( const uno::Any& _value ) throw (uno::RuntimeExcepti
{
sal_Int16 nState = 0;
_value >>= nState;
- OSL_TRACE( "nState - %d", nState );
+ SAL_INFO("vbahelper", "nState - " << nState );
nState = ( nState == -1 ) ? 1 : 0;
- OSL_TRACE( "nState - %d", nState );
+ SAL_INFO("vbahelper", "nState - " << nState );
m_xProps->setPropertyValue( STATE, uno::makeAny( nState ) );
}
diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx
index 988e837..e2a7652 100644
--- a/vbahelper/source/msforms/vbauserform.cxx
+++ b/vbahelper/source/msforms/vbauserform.cxx
@@ -59,7 +59,7 @@ ScVbaUserForm::~ScVbaUserForm()
void SAL_CALL
ScVbaUserForm::Show( ) throw (uno::RuntimeException)
{
- OSL_TRACE("ScVbaUserForm::Show( )");
+ SAL_INFO("vbahelper", "ScVbaUserForm::Show( )");
short aRet = 0;
mbDispose = true;
@@ -83,7 +83,7 @@ ScVbaUserForm::Show( ) throw (uno::RuntimeException)
aRet = m_xDialog->execute();
}
- OSL_TRACE("ScVbaUserForm::Show() execute returned %d", aRet);
+ SAL_INFO("vbahelper", "ScVbaUserForm::Show() execute returned " << aRet);
if ( mbDispose )
{
try
@@ -276,7 +276,7 @@ ScVbaUserForm::hasProperty( const OUString& aName ) throw (uno::RuntimeException
{
uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY );
- OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d", OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xControl.is() );
+ SAL_INFO("vbahelper", "ScVbaUserForm::hasProperty(" << aName << ") " << xControl.is() );
if ( xControl.is() )
{
uno::Reference< beans::XPropertySet > xDlgProps( xControl->getModel(), uno::UNO_QUERY );
@@ -284,7 +284,7 @@ ScVbaUserForm::hasProperty( const OUString& aName ) throw (uno::RuntimeException
{
uno::Reference< container::XNameContainer > xAllChildren( xDlgProps->getPropertyValue( "AllDialogChildren" ), uno::UNO_QUERY_THROW );
sal_Bool bRes = xAllChildren->hasByName( aName );
- OSL_TRACE("ScVbaUserForm::hasProperty(%s) %d ---> %d", OUStringToOString( aName, RTL_TEXTENCODING_UTF8 ).getStr(), xAllChildren.is(), bRes );
+ SAL_INFO("vbahelper", "ScVbaUserForm::hasProperty(" << aName << ") " << xAllChildren.is() << " ---> " << bRes );
return bRes;
}
}
diff --git a/vbahelper/source/vbahelper/vbacommandbar.cxx b/vbahelper/source/vbahelper/vbacommandbar.cxx
index 9c13872..a9a85cc 100644
--- a/vbahelper/source/vbahelper/vbacommandbar.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbar.cxx
@@ -115,7 +115,7 @@ ScVbaCommandBar::setVisible( ::sal_Bool _visible ) throw (uno::RuntimeException)
}
catch(const uno::Exception&)
{
- OSL_TRACE( "SetVisible get an exception" );
+ SAL_INFO("vbahelper", "SetVisible get an exception" );
}
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
index 4be6c82..f2d3a7d 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
@@ -69,7 +69,7 @@ ScVbaCommandBarControl::setOnAction( const OUString& _onaction ) throw (uno::Run
if ( aResolvedMacro.mbFound )
{
OUString aCommandURL = ooo::vba::makeMacroURL( aResolvedMacro.msResolvedMacro );
- OSL_TRACE(" ScVbaCommandBarControl::setOnAction: %s", OUStringToOString( aCommandURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_INFO("vbahelper", "ScVbaCommandBarControl::setOnAction: " << aCommandURL);
setPropertyValue( m_aPropertyValues, "CommandURL" , uno::makeAny( aCommandURL ) );
ApplyChange();
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index 5bfd4d2..0273548 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -247,7 +247,7 @@ sal_Int32 VbaCommandBarHelper::findControlByName( const css::uno::Reference< css
aBuffer.append( sLabel.copy( index + 1 ) );
}
OUString sNewLabel = aBuffer.makeStringAndClear();
- OSL_TRACE("VbaCommandBarHelper::findControlByName, control name: %s", OUStringToOString( sNewLabel, RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_INFO("vbahelper", "VbaCommandBarHelper::findControlByName, control name: " << sNewLabel);
if( sName.equalsIgnoreAsciiCase( sNewLabel ) )
return i;
}
diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index 27ddd5e..5816b32 100644
--- a/vbahelper/source/vbahelper/vbadocumentbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx
@@ -188,7 +188,7 @@ VbaDocumentBase::Protect( const uno::Any &aPassword ) throw (uno::RuntimeExcepti
{
OUString rPassword;
uno::Reference< util::XProtectable > xProt( getModel(), uno::UNO_QUERY_THROW );
- OSL_TRACE("Workbook::Protect stub");
+ SAL_INFO("vbahelper", "Workbook::Protect stub");
if( aPassword >>= rPassword )
xProt->protect( rPassword );
else
diff --git a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
index 7938b70..b6a7e7a 100644
--- a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
+++ b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
@@ -48,7 +48,7 @@ VbaEventsHelperBase::VbaEventsHelperBase( const uno::Sequence< uno::Any >& rArgs
VbaEventsHelperBase::~VbaEventsHelperBase()
{
- OSL_ENSURE( mbDisposed, "VbaEventsHelperBase::~VbaEventsHelperBase - missing disposing notification" );
+ SAL_WARN_IF( !mbDisposed, "vbahelper", "VbaEventsHelperBase::~VbaEventsHelperBase - missing disposing notification" );
}
sal_Bool SAL_CALL VbaEventsHelperBase::hasVbaEventHandler( sal_Int32 nEventId, const uno::Sequence< uno::Any >& rArgs )
@@ -93,7 +93,7 @@ sal_Bool SAL_CALL VbaEventsHelperBase::processVbaEvent( sal_Int32 nEventId, cons
const EventHandlerInfo& rInfo = getEventHandlerInfo( aEventQueue.front().mnEventId );
uno::Sequence< uno::Any > aEventArgs = aEventQueue.front().maArgs;
aEventQueue.pop_front();
- OSL_TRACE( "VbaEventsHelperBase::processVbaEvent( \"%s\" )", OUStringToOString( rInfo.maMacroName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_INFO("vbahelper", "VbaEventsHelperBase::processVbaEvent( \"" << rInfo.maMacroName << "\" )");
/* Let derived classes prepare the event, they may add new events for
next iteration. If false is returned, the event handler must not be
@@ -140,7 +140,7 @@ sal_Bool SAL_CALL VbaEventsHelperBase::processVbaEvent( sal_Int32 nEventId, cons
void SAL_CALL VbaEventsHelperBase::notifyEvent( const document::EventObject& rEvent ) throw (uno::RuntimeException)
{
- OSL_TRACE( "VbaEventsHelperBase::notifyEvent( \"%s\" )", OUStringToOString( rEvent.EventName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_INFO("vbahelper", "VbaEventsHelperBase::notifyEvent( \"" << rEvent.EventName << "\" )");
if( rEvent.EventName == GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ) )
stopListening();
}
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 8712428..d12bfdd 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -193,7 +193,7 @@ getCurrentDoc( const OUString& sKey ) throw (uno::RuntimeException)
SbxObject* basicChosen = pBasic ;
if ( basicChosen == NULL)
{
- OSL_TRACE("getModelFromBasic() StarBASIC* is NULL" );
+ SAL_INFO("vbahelper", "getModelFromBasic() StarBASIC* is NULL" );
return xModel;
}
SbxObject* p = pBasic;
@@ -224,14 +224,12 @@ getCurrentDoc( const OUString& sKey ) throw (uno::RuntimeException)
}
else
{
- OSL_TRACE("Have model points to url %s",
- OUStringToOString( xModel->getURL(),
- RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ SAL_INFO("vbahelper", "Have model points to url " << xModel->getURL());
}
}
else
{
- OSL_TRACE("Failed to get %s", OUStringToOString( sKey, RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_INFO("vbahelper", "Failed to get " << sKey);
throw uno::RuntimeException(
"Can't determine the currently selected document" ,
uno::Reference< uno::XInterface >() );
@@ -740,7 +738,7 @@ void setCursorHelper( const uno::Reference< frame::XModel >& xModel, const Point
const uno::Reference< awt::XWindow > xWindow ( xFrame->getContainerWindow(), uno::UNO_SET_THROW );
Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- OSL_ENSURE( pWindow, "ScVbaApplication::setCursor: no window!" );
+ SAL_WARN_IF( !pWindow, "vbahelper", "ScVbaApplication::setCursor: no window!" );
if ( !pWindow )
continue;
diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx
index 98a697d..690f7b7 100644
--- a/vbahelper/source/vbahelper/vbashape.cxx
+++ b/vbahelper/source/vbahelper/vbashape.cxx
@@ -116,7 +116,7 @@ ScVbaShape::getType( const css::uno::Reference< drawing::XShape > xShape ) throw
OUString sShapeType;
uno::Reference< drawing::XShapeDescriptor > xShapeDescriptor( xShape, uno::UNO_QUERY_THROW );
sShapeType = xShapeDescriptor->getShapeType();
- OSL_TRACE("ScVbaShape::getType: %s", OUStringToOString( sShapeType, RTL_TEXTENCODING_UTF8 ).getStr() );
+ SAL_INFO("vbahelper", "ScVbaShape::getType: " << sShapeType);
// office::MsoShapeType::msoDiagram to "com.sun.star.drawing.GroupShape"
if( sShapeType == "com.sun.star.drawing.GroupShape" )
return office::MsoShapeType::msoGroup;
More information about the Libreoffice-commits
mailing list