summaryrefslogtreecommitdiff
path: root/embeddedobj/source/msole
diff options
context:
space:
mode:
Diffstat (limited to 'embeddedobj/source/msole')
-rw-r--r--embeddedobj/source/msole/oleembed.cxx16
-rw-r--r--embeddedobj/source/msole/olemisc.cxx54
-rw-r--r--embeddedobj/source/msole/olepersist.cxx78
-rw-r--r--embeddedobj/source/msole/olevisual.cxx4
-rw-r--r--embeddedobj/source/msole/ownview.cxx64
-rw-r--r--embeddedobj/source/msole/ownview.hxx12
-rw-r--r--embeddedobj/source/msole/xolefactory.cxx6
7 files changed, 117 insertions, 117 deletions
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index fe2108676620..800166167746 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -247,16 +247,16 @@ OUString OleEmbeddedObject::MoveToTemporarySubstream()
}
-sal_Bool OleEmbeddedObject::TryToConvertToOOo()
+bool OleEmbeddedObject::TryToConvertToOOo()
{
- sal_Bool bResult = sal_False;
+ bool bResult = false;
OUString aStorageName;
OUString aTmpStreamName;
sal_Int32 nStep = 0;
if ( m_pOleComponent || m_bReadOnly )
- return sal_False;
+ return false;
try
{
@@ -289,7 +289,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo()
{
// create the model
uno::Sequence< uno::Any > aArguments(1);
- aArguments[0] <<= beans::NamedValue( OUString( "EmbeddedObject" ), uno::makeAny( (sal_Bool)sal_True ));
+ aArguments[0] <<= beans::NamedValue( OUString( "EmbeddedObject" ), uno::makeAny( true ));
uno::Reference< util::XCloseable > xDocument( m_xFactory->createInstanceWithArguments( aDocServiceName, aArguments ), uno::UNO_QUERY_THROW );
uno::Reference< frame::XLoadable > xLoadable( xDocument, uno::UNO_QUERY_THROW );
@@ -356,7 +356,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo()
nStep = 4;
m_xWrappedObject.set( xEmbCreator->createInstanceInitFromEntry( m_xParentStorage, m_aEntryName, uno::Sequence< beans::PropertyValue >(), uno::Sequence< beans::PropertyValue >() ), uno::UNO_QUERY_THROW );
- bResult = sal_True; // the change is no more revertable
+ bResult = true; // the change is no more revertable
try
{
m_xParentStorage->removeElement( aTmpStreamName );
@@ -699,7 +699,7 @@ namespace
uno::Sequence< uno::Any > aArgs( 2 );
aArgs[0] <<= xObjectStream;
- aArgs[1] <<= (sal_Bool)sal_True; // do not create copy
+ aArgs[1] <<= true; // do not create copy
uno::Reference< container::XNameContainer > xNameContainer(
xFactory->createInstanceWithArguments(
OUString("com.sun.star.embed.OLESimpleStorage"),
@@ -715,7 +715,7 @@ namespace
// ignore
}
- sal_Bool bCopied = xCONTENTS.is() && lcl_CopyStream(xCONTENTS->getInputStream(), xStream->getOutputStream());
+ bool bCopied = xCONTENTS.is() && lcl_CopyStream(xCONTENTS->getInputStream(), xStream->getOutputStream());
uno::Reference< io::XSeekable > xSeekableStor(xObjectStream, uno::UNO_QUERY);
if (xSeekableStor.is())
@@ -836,7 +836,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID )
// if it is possible, the object will be converted to OOo format
if ( !m_bTriedConversion )
{
- m_bTriedConversion = sal_True;
+ m_bTriedConversion = true;
if ( TryToConvertToOOo() )
{
changeState( embed::EmbedStates::UI_ACTIVE );
diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx
index 96a03922f3ea..7bd0354d5f69 100644
--- a/embeddedobj/source/msole/olemisc.cxx
+++ b/embeddedobj/source/msole/olemisc.cxx
@@ -38,7 +38,7 @@
using namespace ::com::sun::star;
-sal_Bool KillFile_Impl( const OUString& aURL, const uno::Reference< lang::XMultiServiceFactory >& xFactory );
+bool KillFile_Impl( const OUString& aURL, const uno::Reference< lang::XMultiServiceFactory >& xFactory );
@@ -47,7 +47,7 @@ OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceF
const OUString& aClassName )
: m_pOleComponent( NULL )
, m_pInterfaceContainer( NULL )
-, m_bReadOnly( sal_False )
+, m_bReadOnly( false )
, m_bDisposed( false )
, m_nObjectState( -1 )
, m_nTargetState( -1 )
@@ -55,55 +55,55 @@ OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceF
, m_xFactory( xFactory )
, m_aClassID( aClassID )
, m_aClassName( aClassName )
-, m_bWaitSaveCompleted( sal_False )
-, m_bNewVisReplInStream( sal_True )
-, m_bStoreLoaded( sal_False )
-, m_bVisReplInitialized( sal_False )
-, m_bVisReplInStream( sal_False )
-, m_bStoreVisRepl( sal_False )
-, m_bIsLink( sal_False )
-, m_bHasCachedSize( sal_False )
+, m_bWaitSaveCompleted( false )
+, m_bNewVisReplInStream( true )
+, m_bStoreLoaded( false )
+, m_bVisReplInitialized( false )
+, m_bVisReplInStream( false )
+, m_bStoreVisRepl( false )
+, m_bIsLink( false )
+, m_bHasCachedSize( false )
, m_nCachedAspect( 0 )
-, m_bHasSizeToSet( sal_False )
+, m_bHasSizeToSet( false )
, m_nAspectToSet( 0 )
-, m_bGotStatus( sal_False )
+, m_bGotStatus( false )
, m_nStatus( 0 )
, m_nStatusAspect( 0 )
, m_pOwnView( NULL )
-, m_bFromClipboard( sal_False )
-, m_bTriedConversion( sal_False )
+, m_bFromClipboard( false )
+, m_bTriedConversion( false )
{
}
// In case of loading from persistent entry the classID of the object
// will be retrieved from the entry, during construction it is unknown
-OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceFactory >& xFactory, sal_Bool bLink )
+OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceFactory >& xFactory, bool bLink )
: m_pOleComponent( NULL )
, m_pInterfaceContainer( NULL )
-, m_bReadOnly( sal_False )
+, m_bReadOnly( false )
, m_bDisposed( false )
, m_nObjectState( -1 )
, m_nTargetState( -1 )
, m_nUpdateMode( embed::EmbedUpdateModes::ALWAYS_UPDATE )
, m_xFactory( xFactory )
-, m_bWaitSaveCompleted( sal_False )
-, m_bNewVisReplInStream( sal_True )
-, m_bStoreLoaded( sal_False )
-, m_bVisReplInitialized( sal_False )
-, m_bVisReplInStream( sal_False )
-, m_bStoreVisRepl( sal_False )
+, m_bWaitSaveCompleted( false )
+, m_bNewVisReplInStream( true )
+, m_bStoreLoaded( false )
+, m_bVisReplInitialized( false )
+, m_bVisReplInStream( false )
+, m_bStoreVisRepl( false )
, m_bIsLink( bLink )
-, m_bHasCachedSize( sal_False )
+, m_bHasCachedSize( false )
, m_nCachedAspect( 0 )
-, m_bHasSizeToSet( sal_False )
+, m_bHasSizeToSet( false )
, m_nAspectToSet( 0 )
-, m_bGotStatus( sal_False )
+, m_bGotStatus( false )
, m_nStatus( 0 )
, m_nStatusAspect( 0 )
, m_pOwnView( NULL )
-, m_bFromClipboard( sal_False )
-, m_bTriedConversion( sal_False )
+, m_bFromClipboard( false )
+, m_bTriedConversion( false )
{
}
#ifdef WNT
diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx
index f403bb4ecb71..32ac4b0603b7 100644
--- a/embeddedobj/source/msole/olepersist.cxx
+++ b/embeddedobj/source/msole/olepersist.cxx
@@ -54,12 +54,12 @@ using namespace ::com::sun::star;
using namespace ::comphelper;
-sal_Bool KillFile_Impl( const OUString& aURL, const uno::Reference< lang::XMultiServiceFactory >& xFactory )
+bool KillFile_Impl( const OUString& aURL, const uno::Reference< lang::XMultiServiceFactory >& xFactory )
{
if ( !xFactory.is() )
- return sal_False;
+ return false;
- sal_Bool bRet = sal_False;
+ bool bRet = false;
try
{
@@ -67,7 +67,7 @@ sal_Bool KillFile_Impl( const OUString& aURL, const uno::Reference< lang::XMulti
ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) );
xAccess->kill( aURL );
- bRet = sal_True;
+ bRet = true;
}
catch( const uno::Exception& )
{
@@ -204,7 +204,7 @@ void LetCommonStoragePassBeUsed_Impl( const uno::Reference< io::XStream >& xStre
throw uno::RuntimeException(); // Only StorageStreams must be provided here, they must implement the interface
xPropSet->setPropertyValue("UseCommonStoragePasswordEncryption",
- uno::makeAny( (sal_Bool)sal_True ) );
+ uno::makeAny( true ) );
}
#ifdef WNT
@@ -377,7 +377,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea
uno::Sequence< uno::Any > aArgs( 2 );
aArgs[0] <<= xTargetStream;
- aArgs[1] <<= (sal_Bool)sal_True; // do not create copy
+ aArgs[1] <<= true; // do not create copy
uno::Reference< container::XNameContainer > xNameContainer(
m_xFactory->createInstanceWithArguments(
@@ -527,7 +527,7 @@ void OleEmbeddedObject::RemoveVisualCache_Impl( const uno::Reference< io::XStrea
uno::Sequence< uno::Any > aArgs( 2 );
aArgs[0] <<= xTargetStream;
- aArgs[1] <<= (sal_Bool)sal_True; // do not create copy
+ aArgs[1] <<= true; // do not create copy
uno::Reference< container::XNameContainer > xNameContainer(
m_xFactory->createInstanceWithArguments(
OUString( "com.sun.star.embed.OLESimpleStorage" ),
@@ -552,19 +552,19 @@ void OleEmbeddedObject::RemoveVisualCache_Impl( const uno::Reference< io::XStrea
}
-void OleEmbeddedObject::SetVisReplInStream( sal_Bool bExists )
+void OleEmbeddedObject::SetVisReplInStream( bool bExists )
{
- m_bVisReplInitialized = sal_True;
+ m_bVisReplInitialized = true;
m_bVisReplInStream = bExists;
}
-sal_Bool OleEmbeddedObject::HasVisReplInStream()
+bool OleEmbeddedObject::HasVisReplInStream()
{
if ( !m_bVisReplInitialized )
{
if ( m_xCachedVisualRepresentation.is() )
- SetVisReplInStream( sal_True );
+ SetVisReplInStream( true );
else
{
SAL_INFO( "embeddedobj.ole", "embeddedobj (mv76033) OleEmbeddedObject::HasVisualReplInStream, analizing" );
@@ -591,11 +591,11 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream()
if ( xStream.is() )
{
- sal_Bool bExists = sal_False;
+ bool bExists = false;
uno::Sequence< uno::Any > aArgs( 2 );
aArgs[0] <<= xStream;
- aArgs[1] <<= (sal_Bool)sal_True; // do not create copy
+ aArgs[1] <<= true; // do not create copy
uno::Reference< container::XNameContainer > xNameContainer(
m_xFactory->createInstanceWithArguments(
OUString( "com.sun.star.embed.OLESimpleStorage" ),
@@ -627,7 +627,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream()
uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepresentation_Impl(
const uno::Reference< io::XStream >& xStream,
- sal_Bool bAllowToRepair50 )
+ bool bAllowToRepair50 )
throw ()
{
uno::Reference< io::XStream > xResult;
@@ -639,7 +639,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres
uno::Reference< container::XNameContainer > xNameContainer;
uno::Sequence< uno::Any > aArgs( 2 );
aArgs[0] <<= xStream;
- aArgs[1] <<= (sal_Bool)sal_True; // do not create copy
+ aArgs[1] <<= true; // do not create copy
try
{
xNameContainer = uno::Reference< container::XNameContainer >(
@@ -745,7 +745,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres
#endif
}
- xResult = TryToRetrieveCachedVisualRepresentation_Impl( xStream, sal_False );
+ xResult = TryToRetrieveCachedVisualRepresentation_Impl( xStream, false );
}
}
}
@@ -1070,7 +1070,7 @@ void OleEmbeddedObject::StoreToLocation_Impl(
const uno::Reference< embed::XStorage >& xStorage,
const OUString& sEntName,
const uno::Sequence< beans::PropertyValue >& lObjArgs,
- sal_Bool bSaveAs )
+ bool bSaveAs )
throw ( uno::Exception )
{
// TODO: use lObjArgs
@@ -1090,10 +1090,10 @@ void OleEmbeddedObject::StoreToLocation_Impl(
OSL_ENSURE( m_xParentStorage.is() && m_xObjectStream.is(), "The object has no valid persistence!\n" );
- sal_Bool bVisReplIsStored = sal_False;
+ bool bVisReplIsStored = false;
- sal_Bool bTryOptimization = sal_False;
- sal_Bool bStoreVis = m_bStoreVisRepl;
+ bool bTryOptimization = false;
+ bool bStoreVis = m_bStoreVisRepl;
uno::Reference< io::XStream > xCachedVisualRepresentation;
for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ )
{
@@ -1113,11 +1113,11 @@ void OleEmbeddedObject::StoreToLocation_Impl(
throw io::IOException(); // TODO: there is no cached visual representation and nothing is provided from outside
// if the representation is provided from outside it should be copied to a local stream
- sal_Bool bNeedLocalCache = xCachedVisualRepresentation.is();
+ bool bNeedLocalCache = xCachedVisualRepresentation.is();
uno::Reference< io::XStream > xTargetStream;
- sal_Bool bStoreLoaded = sal_False;
+ bool bStoreLoaded = false;
if ( m_nObjectState == embed::EmbedStates::LOADED
#ifdef WNT
// if the object was NOT modified after storing it can be just copied
@@ -1126,7 +1126,7 @@ void OleEmbeddedObject::StoreToLocation_Impl(
#endif
)
{
- sal_Bool bOptimizedCopyingDone = sal_False;
+ bool bOptimizedCopyingDone = false;
if ( bTryOptimization && bStoreVis == HasVisReplInStream() )
{
@@ -1135,7 +1135,7 @@ void OleEmbeddedObject::StoreToLocation_Impl(
uno::Reference< embed::XOptimizedStorage > xSourceOptStor( m_xParentStorage, uno::UNO_QUERY_THROW );
uno::Reference< embed::XOptimizedStorage > xTargetOptStor( xStorage, uno::UNO_QUERY_THROW );
xSourceOptStor->copyElementDirectlyTo( m_aEntryName, xTargetOptStor, sEntName );
- bOptimizedCopyingDone = sal_True;
+ bOptimizedCopyingDone = true;
}
catch( const uno::Exception& )
{
@@ -1153,11 +1153,11 @@ void OleEmbeddedObject::StoreToLocation_Impl(
if ( m_xCachedVisualRepresentation.is() )
{
xCachedVisualRepresentation = m_xCachedVisualRepresentation;
- bNeedLocalCache = sal_False;
+ bNeedLocalCache = false;
}
bVisReplIsStored = HasVisReplInStream();
- bStoreLoaded = sal_True;
+ bStoreLoaded = true;
}
#ifdef WNT
else if ( m_pOleComponent )
@@ -1227,7 +1227,7 @@ void OleEmbeddedObject::StoreToLocation_Impl(
{
xCachedVisualRepresentation
= GetNewFilledTempStream_Impl( xCachedVisualRepresentation->getInputStream() );
- bNeedLocalCache = sal_False;
+ bNeedLocalCache = false;
}
}
@@ -1245,7 +1245,7 @@ void OleEmbeddedObject::StoreToLocation_Impl(
if ( bSaveAs )
{
- m_bWaitSaveCompleted = sal_True;
+ m_bWaitSaveCompleted = true;
m_xNewObjectStream = xTargetStream;
m_xNewParentStorage = xStorage;
m_aNewEntryName = sEntName;
@@ -1353,9 +1353,9 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry(
throw uno::RuntimeException(); //TODO
// detect entry existence
- sal_Bool bElExists = xNameAccess->hasByName( sEntName );
+ bool bElExists = xNameAccess->hasByName( sEntName );
- m_bReadOnly = sal_False;
+ m_bReadOnly = false;
for ( sal_Int32 nInd = 0; nInd < lArguments.getLength(); nInd++ )
if ( lArguments[nInd].Name == "ReadOnly" )
lArguments[nInd].Value >>= m_bReadOnly;
@@ -1516,7 +1516,7 @@ void SAL_CALL OleEmbeddedObject::storeToEntry( const uno::Reference< embed::XSto
VerbExecutionControllerGuard aVerbGuard( m_aVerbExecutionController );
- StoreToLocation_Impl( xStorage, sEntName, lObjArgs, sal_False );
+ StoreToLocation_Impl( xStorage, sEntName, lObjArgs, false );
// TODO: should the listener notification be done?
}
@@ -1550,7 +1550,7 @@ void SAL_CALL OleEmbeddedObject::storeAsEntry( const uno::Reference< embed::XSto
VerbExecutionControllerGuard aVerbGuard( m_aVerbExecutionController );
- StoreToLocation_Impl( xStorage, sEntName, lObjArgs, sal_True );
+ StoreToLocation_Impl( xStorage, sEntName, lObjArgs, true );
// TODO: should the listener notification be done here or in saveCompleted?
}
@@ -1617,21 +1617,21 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew )
}
}
- sal_Bool bStoreLoaded = m_bStoreLoaded;
+ bool bStoreLoaded = m_bStoreLoaded;
m_xNewObjectStream = uno::Reference< io::XStream >();
m_xNewParentStorage = uno::Reference< embed::XStorage >();
m_aNewEntryName = OUString();
- m_bWaitSaveCompleted = sal_False;
- m_bNewVisReplInStream = sal_False;
+ m_bWaitSaveCompleted = false;
+ m_bNewVisReplInStream = false;
m_xNewCachedVisRepl = uno::Reference< io::XStream >();
- m_bStoreLoaded = sal_False;
+ m_bStoreLoaded = false;
if ( bUseNew && m_pOleComponent && m_nUpdateMode == embed::EmbedUpdateModes::ALWAYS_UPDATE && !bStoreLoaded
&& m_nObjectState != embed::EmbedStates::LOADED )
{
// the object replacement image should be updated, so the cached size as well
- m_bHasCachedSize = sal_False;
+ m_bHasCachedSize = false;
try
{
// the call will cache the size in case of success
@@ -1765,7 +1765,7 @@ void SAL_CALL OleEmbeddedObject::storeOwn()
LetCommonStoragePassBeUsed_Impl( m_xObjectStream );
- sal_Bool bStoreLoaded = sal_True;
+ bool bStoreLoaded = true;
#ifdef WNT
if ( m_nObjectState != embed::EmbedStates::LOADED && m_pOleComponent && m_pOleComponent->IsDirty() )
@@ -1818,7 +1818,7 @@ void SAL_CALL OleEmbeddedObject::storeOwn()
if ( m_pOleComponent && m_nUpdateMode == embed::EmbedUpdateModes::ALWAYS_UPDATE && !bStoreLoaded )
{
// the object replacement image should be updated, so the cached size as well
- m_bHasCachedSize = sal_False;
+ m_bHasCachedSize = false;
try
{
// the call will cache the size in case of success
diff --git a/embeddedobj/source/msole/olevisual.cxx b/embeddedobj/source/msole/olevisual.cxx
index b50c031c01e0..2a7625ef50c4 100644
--- a/embeddedobj/source/msole/olevisual.cxx
+++ b/embeddedobj/source/msole/olevisual.cxx
@@ -152,7 +152,7 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt
#endif
// cache the values
- m_bHasCachedSize = sal_True;
+ m_bHasCachedSize = true;
m_aCachedSize = aSize;
m_nCachedAspect = nAspect;
}
@@ -345,7 +345,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres
if ( !m_xCachedVisualRepresentation.is() && ( !m_bVisReplInitialized || m_bVisReplInStream )
&& m_nObjectState == embed::EmbedStates::LOADED )
{
- m_xCachedVisualRepresentation = TryToRetrieveCachedVisualRepresentation_Impl( m_xObjectStream, sal_True );
+ m_xCachedVisualRepresentation = TryToRetrieveCachedVisualRepresentation_Impl( m_xObjectStream, true );
SetVisReplInStream( m_xCachedVisualRepresentation.is() );
}
diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx
index d1515e2458b6..e4e5d8827abe 100644
--- a/embeddedobj/source/msole/ownview.cxx
+++ b/embeddedobj/source/msole/ownview.cxx
@@ -49,7 +49,7 @@
using namespace ::com::sun::star;
using namespace ::comphelper;
-sal_Bool KillFile_Impl( const OUString& aURL, const uno::Reference< lang::XMultiServiceFactory >& xFactory );
+bool KillFile_Impl( const OUString& aURL, const uno::Reference< lang::XMultiServiceFactory >& xFactory );
class DummyHandler_Impl : public ::cppu::WeakImplHelper1< task::XInteractionHandler >
{
@@ -80,8 +80,8 @@ void SAL_CALL DummyHandler_Impl::handle( const uno::Reference< task::XInteractio
OwnView_Impl::OwnView_Impl( const uno::Reference< lang::XMultiServiceFactory >& xFactory,
const uno::Reference< io::XInputStream >& xInputStream )
: m_xFactory( xFactory )
-, m_bBusy( sal_False )
-, m_bUseNative( sal_False )
+, m_bBusy( false )
+, m_bUseNative( false )
{
if ( !xFactory.is() || !xInputStream.is() )
throw uno::RuntimeException();
@@ -103,9 +103,9 @@ OwnView_Impl::~OwnView_Impl()
}
-sal_Bool OwnView_Impl::CreateModelFromURL( const OUString& aFileURL )
+bool OwnView_Impl::CreateModelFromURL( const OUString& aFileURL )
{
- sal_Bool bResult = sal_False;
+ bool bResult = false;
if ( !aFileURL.isEmpty() )
{
@@ -157,7 +157,7 @@ sal_Bool OwnView_Impl::CreateModelFromURL( const OUString& aFileURL )
::osl::MutexGuard aGuard( m_aMutex );
m_xModel = xModel;
- bResult = sal_True;
+ bResult = true;
}
}
}
@@ -172,9 +172,9 @@ sal_Bool OwnView_Impl::CreateModelFromURL( const OUString& aFileURL )
}
-sal_Bool OwnView_Impl::CreateModel( sal_Bool bUseNative )
+bool OwnView_Impl::CreateModel( bool bUseNative )
{
- sal_Bool bResult = sal_False;
+ bool bResult = false;
try {
bResult = CreateModelFromURL( bUseNative ? m_aNativeTempURL : m_aTempFileURL );
@@ -249,8 +249,8 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream(
}
-sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io::XInputStream >& xInStream,
- sal_Bool bParseHeader )
+bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io::XInputStream >& xInStream,
+ bool bParseHeader )
{
uno::Reference< io::XSeekable > xSeekable( xInStream, uno::UNO_QUERY_THROW );
xSeekable->seek( 0 );
@@ -275,7 +275,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io
{
}
- sal_Bool bFailed = sal_False;
+ bool bFailed = false;
OUString aFileSuffix;
if ( bParseHeader )
@@ -283,17 +283,17 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io
uno::Sequence< sal_Int8 > aReadSeq( 4 );
// read the complete size of the Object Package
if ( xInStream->readBytes( aReadSeq, 4 ) != 4 )
- return sal_False;
+ return false;
// read the first header ( have no idea what does this header mean )
if ( xInStream->readBytes( aReadSeq, 2 ) != 2 || aReadSeq[0] != 2 || aReadSeq[1] != 0 )
- return sal_False;
+ return false;
// read file name
// only extension is interesting so only subset of symbols is accepted
do
{
if ( xInStream->readBytes( aReadSeq, 1 ) != 1 )
- return sal_False;
+ return false;
if (
(aReadSeq[0] >= '0' && aReadSeq[0] <= '9') ||
@@ -311,17 +311,17 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io
do
{
if ( xInStream->readBytes( aReadSeq, 1 ) != 1 )
- return sal_False;
+ return false;
} while( aReadSeq[0] );
// check the next header
if ( xInStream->readBytes( aReadSeq, 4 ) != 4
|| aReadSeq[0] || aReadSeq[1] || aReadSeq[2] != 3 || aReadSeq[3] )
- return sal_False;
+ return false;
// get the size of the next entry
if ( xInStream->readBytes( aReadSeq, 4 ) != 4 )
- return sal_False;
+ return false;
sal_uInt32 nUrlSize = (sal_uInt8)aReadSeq[0]
+ (sal_uInt8)aReadSeq[1] * 0x100
@@ -333,7 +333,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io
// get the size of stored data
if ( xInStream->readBytes( aReadSeq, 4 ) != 4 )
- return sal_False;
+ return false;
sal_uInt32 nDataSize = (sal_uInt8)aReadSeq[0]
+ (sal_uInt8)aReadSeq[1] * 0x100
@@ -350,7 +350,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io
if ( !nLocalRead )
{
- bFailed = sal_True;
+ bFailed = true;
break;
}
else if ( nLocalRead == 32000 )
@@ -433,13 +433,13 @@ void OwnView_Impl::CreateNative()
xNameAccess->getByName( aSubStreamName ) >>= xSubStream;
if ( xSubStream.is() )
{
- sal_Bool bOk = sal_False;
+ bool bOk = false;
if ( MimeConfigurationHelper::ClassIDsEqual( aPackageClassID, aStorClassID ) )
{
// the storage represents Object Package
- bOk = ReadContentsAndGenerateTempFile( xSubStream->getInputStream(), sal_True );
+ bOk = ReadContentsAndGenerateTempFile( xSubStream->getInputStream(), true );
if ( !bOk && !m_aNativeTempURL.isEmpty() )
{
@@ -450,7 +450,7 @@ void OwnView_Impl::CreateNative()
if ( !bOk )
{
- bOk = ReadContentsAndGenerateTempFile( xSubStream->getInputStream(), sal_False );
+ bOk = ReadContentsAndGenerateTempFile( xSubStream->getInputStream(), false );
if ( !bOk && !m_aNativeTempURL.isEmpty() )
{
@@ -470,9 +470,9 @@ void OwnView_Impl::CreateNative()
}
-sal_Bool OwnView_Impl::Open()
+bool OwnView_Impl::Open()
{
- sal_Bool bResult = sal_False;
+ bool bResult = false;
uno::Reference< frame::XModel > xExistingModel;
@@ -480,9 +480,9 @@ sal_Bool OwnView_Impl::Open()
::osl::MutexGuard aGuard( m_aMutex );
xExistingModel = m_xModel;
if ( m_bBusy )
- return sal_False;
+ return false;
- m_bBusy = sal_True;
+ m_bBusy = true;
}
if ( xExistingModel.is() )
@@ -499,7 +499,7 @@ sal_Bool OwnView_Impl::Open()
if(xTopWindow.is())
xTopWindow->toFront();
- bResult = sal_True;
+ bResult = true;
}
}
}
@@ -522,14 +522,14 @@ sal_Bool OwnView_Impl::Open()
if ( !m_aNativeTempURL.isEmpty() )
{
- bResult = CreateModel( sal_True );
+ bResult = CreateModel( true );
if ( bResult )
- m_bUseNative = sal_True;
+ m_bUseNative = true;
}
}
}
- m_bBusy = sal_False;
+ m_bBusy = false;
return bResult;
}
@@ -549,7 +549,7 @@ void OwnView_Impl::Close()
if ( m_bBusy )
return;
- m_bBusy = sal_True;
+ m_bBusy = true;
}
try {
@@ -571,7 +571,7 @@ void OwnView_Impl::Close()
catch( uno::Exception& )
{}
- m_bBusy = sal_False;
+ m_bBusy = false;
}
diff --git a/embeddedobj/source/msole/ownview.hxx b/embeddedobj/source/msole/ownview.hxx
index 4b08c5d3779d..2aab2aabbe60 100644
--- a/embeddedobj/source/msole/ownview.hxx
+++ b/embeddedobj/source/msole/ownview.hxx
@@ -43,16 +43,16 @@ class OwnView_Impl : public ::cppu::WeakImplHelper2 < ::com::sun::star::util::XC
OUString m_aFilterName;
- sal_Bool m_bBusy;
+ bool m_bBusy;
- sal_Bool m_bUseNative;
+ bool m_bUseNative;
private:
- sal_Bool CreateModelFromURL( const OUString& aFileURL );
+ bool CreateModelFromURL( const OUString& aFileURL );
- sal_Bool CreateModel( sal_Bool bUseNative );
+ bool CreateModel( bool bUseNative );
- sal_Bool ReadContentsAndGenerateTempFile( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream, sal_Bool bParseHeader );
+ bool ReadContentsAndGenerateTempFile( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream, bool bParseHeader );
void CreateNative();
@@ -66,7 +66,7 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream );
virtual ~OwnView_Impl();
- sal_Bool Open();
+ bool Open();
void Close();
diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx
index eb74f407bf50..1b4f94965df0 100644
--- a/embeddedobj/source/msole/xolefactory.cxx
+++ b/embeddedobj/source/msole/xolefactory.cxx
@@ -94,7 +94,7 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta
}
uno::Reference< uno::XInterface > xResult(
- static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xFactory, sal_False ) ),
+ static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xFactory, false ) ),
uno::UNO_QUERY );
uno::Reference< embed::XEmbedPersist > xPersist( xResult, uno::UNO_QUERY );
@@ -152,7 +152,7 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta
2 );
uno::Reference< uno::XInterface > xResult(
- static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xFactory, sal_False ) ),
+ static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xFactory, false ) ),
uno::UNO_QUERY );
uno::Reference< embed::XEmbedPersist > xPersist( xResult, uno::UNO_QUERY );
@@ -237,7 +237,7 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta
2 );
uno::Reference< uno::XInterface > xResult(
- static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xFactory, sal_True ) ),
+ static_cast< ::cppu::OWeakObject* > ( new OleEmbeddedObject( m_xFactory, true ) ),
uno::UNO_QUERY );
uno::Reference< embed::XEmbedPersist > xPersist( xResult, uno::UNO_QUERY );