summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorRadu Ioan <ioan.radu.g@gmail.com>2013-04-03 00:04:46 +0300
committerThomas Arnhold <thomas@arnhold.org>2013-04-03 20:40:07 +0000
commit16d142443395b888c909fa92570e1a47833da3ff (patch)
treef61d402472fe96fac4b3e481a1f05ec7f001be31 /vbahelper
parentde2ccd8e1ad3eeb5545e4dcccfe40ec81929a9ed (diff)
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@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/msforms/service.cxx4
-rw-r--r--vbahelper/source/msforms/vbacombobox.cxx4
-rw-r--r--vbahelper/source/msforms/vbatogglebutton.cxx8
-rw-r--r--vbahelper/source/msforms/vbauserform.cxx8
-rw-r--r--vbahelper/source/vbahelper/vbacommandbar.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrol.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbadocumentbase.cxx2
-rw-r--r--vbahelper/source/vbahelper/vbaeventshelperbase.cxx6
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx10
-rw-r--r--vbahelper/source/vbahelper/vbashape.cxx2
11 files changed, 24 insertions, 26 deletions
diff --git a/vbahelper/source/msforms/service.cxx b/vbahelper/source/msforms/service.cxx
index 9bc7953429cf..5a9120fef119 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 b78dea3111f8..63856e56f8b6 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 6bf65c1e6d01..93073bc3739a 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 988e83748223..e2a76525e8cb 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 9c1387274a47..a9a85ccf72a8 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 4be6c82ef840..f2d3a7d765da 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 5bfd4d213ab7..0273548892c2 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 27ddd5ee08a2..5816b32c864a 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 7938b704fcf7..b6a7e7a2923c 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 871242849308..d12bfdd425b7 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 98a697d2e0b0..690f7b751545 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;