summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-19 14:09:49 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-19 14:09:49 +0100
commit970be45287de1a046df1c546abb06ad5f6b9c084 (patch)
tree0a88a771e96b5e9d884e5b087adad9d320bdbe7b /embeddedobj
parente35cffb37a792b78f8dbcd85b329fa88097b1ea5 (diff)
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
Diffstat (limited to 'embeddedobj')
-rwxr-xr-xembeddedobj/source/commonembedding/embedobj.cxx8
-rwxr-xr-xembeddedobj/source/commonembedding/miscobj.cxx2
-rwxr-xr-xembeddedobj/source/commonembedding/persistence.cxx16
-rwxr-xr-xembeddedobj/source/general/docholder.cxx2
-rwxr-xr-xembeddedobj/source/msole/closepreventer.cxx4
-rwxr-xr-xembeddedobj/source/msole/olecomponent.cxx2
-rwxr-xr-xembeddedobj/source/msole/olepersist.cxx2
-rwxr-xr-xembeddedobj/source/msole/oleregister.cxx2
-rwxr-xr-xembeddedobj/source/msole/olevisual.cxx4
-rwxr-xr-xembeddedobj/test/MainThreadExecutor/register.cxx2
-rwxr-xr-xembeddedobj/test/mtexecutor/mteregister.cxx2
11 files changed, 23 insertions, 23 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index 29b76d346a71..73604f5af707 100755
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -215,7 +215,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
}
else
{
- OSL_ENSURE( sal_False, "Unacceptable state switch!\n" );
+ OSL_FAIL( "Unacceptable state switch!\n" );
throw uno::RuntimeException(); // TODO
}
}
@@ -287,7 +287,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
}
else
{
- OSL_ENSURE( sal_False, "Unacceptable state switch!\n" );
+ OSL_FAIL( "Unacceptable state switch!\n" );
throw uno::RuntimeException(); // TODO
}
}
@@ -360,7 +360,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
}
else
{
- OSL_ENSURE( sal_False, "Unacceptable state switch!\n" );
+ OSL_FAIL( "Unacceptable state switch!\n" );
throw uno::RuntimeException(); // TODO
}
}
@@ -373,7 +373,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
}
else
{
- OSL_ENSURE( sal_False, "Unacceptable state switch!\n" );
+ OSL_FAIL( "Unacceptable state switch!\n" );
throw uno::RuntimeException(); // TODO
}
}
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx
index 2ca46ed1227e..5f5b997a9016 100755
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -322,7 +322,7 @@ void OCommonEmbeddedObject::requestPositioning( const awt::Rectangle& aRect )
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Exception on request to resize!\n" );
+ OSL_FAIL( "Exception on request to resize!\n" );
}
}
}
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index 708142c679d5..a67ac4692797 100755
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -638,7 +638,7 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Looks like stream was closed already" );
+ OSL_FAIL( "Looks like stream was closed already" );
}
return aResult;
@@ -665,7 +665,7 @@ void OCommonEmbeddedObject::SaveObject_Impl()
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "The object was not stored!\n" );
+ OSL_FAIL( "The object was not stored!\n" );
}
}
}
@@ -877,7 +877,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_
}
catch ( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Can not retrieve storage media type!\n" );
+ OSL_FAIL( "Can not retrieve storage media type!\n" );
}
if ( m_pDocHolder->GetComponent().is() )
@@ -1203,7 +1203,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed::
}
catch ( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Can not retrieve target storage media type!\n" );
+ OSL_FAIL( "Can not retrieve target storage media type!\n" );
}
try
@@ -1216,7 +1216,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed::
}
catch ( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Can not retrieve own storage media type!\n" );
+ OSL_FAIL( "Can not retrieve own storage media type!\n" );
}
sal_Bool bTryOptimization = sal_False;
@@ -1334,7 +1334,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed::
}
catch ( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Can not retrieve target storage media type!\n" );
+ OSL_FAIL( "Can not retrieve target storage media type!\n" );
}
try
@@ -1347,7 +1347,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed::
}
catch ( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Can not retrieve own storage media type!\n" );
+ OSL_FAIL( "Can not retrieve own storage media type!\n" );
}
PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" )) );
@@ -1623,7 +1623,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn()
}
catch ( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Can not retrieve storage media type!\n" );
+ OSL_FAIL( "Can not retrieve storage media type!\n" );
}
aGuard.clear();
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index d72ab4529ae2..638eb1eeeaf6 100755
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -508,7 +508,7 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >&
if ( !SetFrameLMVisibility( m_xFrame, sal_False ) )
{
- OSL_ENSURE( sal_False, "Can't deactivate LayoutManager!\n" );
+ OSL_FAIL( "Can't deactivate LayoutManager!\n" );
// TODO/LATER: error handling?
}
diff --git a/embeddedobj/source/msole/closepreventer.cxx b/embeddedobj/source/msole/closepreventer.cxx
index c5d744c541a1..b3584ace24cd 100755
--- a/embeddedobj/source/msole/closepreventer.cxx
+++ b/embeddedobj/source/msole/closepreventer.cxx
@@ -41,14 +41,14 @@ void SAL_CALL OClosePreventer::notifyClosing( const com::sun::star::lang::EventO
throw (::com::sun::star::uno::RuntimeException)
{
// just a disaster
- OSL_ENSURE( sal_False, "The object can not be prevented from closing!\n" );
+ OSL_FAIL( "The object can not be prevented from closing!\n" );
}
void SAL_CALL OClosePreventer::disposing( const com::sun::star::lang::EventObject& )
throw (::com::sun::star::uno::RuntimeException)
{
// just a disaster
- OSL_ENSURE( sal_False, "The object can not be prevented from closing!\n" );
+ OSL_FAIL( "The object can not be prevented from closing!\n" );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx
index 2b45ba7aefd4..341cafce10a9 100755
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -1207,7 +1207,7 @@ awt::Size OleComponent::GetExtent( sal_Int64 nAspect )
bGotSize = sal_True;
}
else
- OSL_ENSURE( sal_False, "Unexpected size is provided!" );
+ OSL_FAIL( "Unexpected size is provided!" );
}
}
}
diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx
index 72266e50b729..541c9e9585d0 100755
--- a/embeddedobj/source/msole/olepersist.cxx
+++ b/embeddedobj/source/msole/olepersist.cxx
@@ -519,7 +519,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea
sal_Int64 nLength = xTempSeek->getLength() - 40;
if ( nLength < 0 || nLength >= 0xFFFFFFFF )
{
- OSL_ENSURE( sal_False, "Length is not acceptable!" );
+ OSL_FAIL( "Length is not acceptable!" );
return;
}
for ( sal_Int32 nInd = 0; nInd < 4; nInd++ )
diff --git a/embeddedobj/source/msole/oleregister.cxx b/embeddedobj/source/msole/oleregister.cxx
index 39a35230a13b..05fe53d5d6f6 100755
--- a/embeddedobj/source/msole/oleregister.cxx
+++ b/embeddedobj/source/msole/oleregister.cxx
@@ -114,7 +114,7 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegis
}
catch (registry::InvalidRegistryException &)
{
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+ OSL_FAIL( "### InvalidRegistryException!" );
}
}
return sal_False;
diff --git a/embeddedobj/source/msole/olevisual.cxx b/embeddedobj/source/msole/olevisual.cxx
index cafafec515ba..d6b019e662d1 100755
--- a/embeddedobj/source/msole/olevisual.cxx
+++ b/embeddedobj/source/msole/olevisual.cxx
@@ -137,7 +137,7 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "The object should not be resized without activation!\n" );
+ OSL_FAIL( "The object should not be resized without activation!\n" );
}
aGuard.reset();
}
@@ -220,7 +220,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
sal_Bool bSuccess = sal_False;
if ( getCurrentState() == embed::EmbedStates::LOADED )
{
- OSL_ENSURE( sal_False, "Loaded object has no cached size!\n" );
+ OSL_FAIL( "Loaded object has no cached size!\n" );
// try to switch the object to RUNNING state and request the value again
try {
diff --git a/embeddedobj/test/MainThreadExecutor/register.cxx b/embeddedobj/test/MainThreadExecutor/register.cxx
index bdcb1940151e..0da309845a6f 100755
--- a/embeddedobj/test/MainThreadExecutor/register.cxx
+++ b/embeddedobj/test/MainThreadExecutor/register.cxx
@@ -92,7 +92,7 @@ sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryK
}
catch (registry::InvalidRegistryException &)
{
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+ OSL_FAIL( "### InvalidRegistryException!" );
}
}
return sal_False;
diff --git a/embeddedobj/test/mtexecutor/mteregister.cxx b/embeddedobj/test/mtexecutor/mteregister.cxx
index ee9336e2b6f6..f17fee6d437d 100755
--- a/embeddedobj/test/mtexecutor/mteregister.cxx
+++ b/embeddedobj/test/mtexecutor/mteregister.cxx
@@ -114,7 +114,7 @@ sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryK
}
catch (registry::InvalidRegistryException &)
{
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+ OSL_FAIL( "### InvalidRegistryException!" );
}
}
return sal_False;