summaryrefslogtreecommitdiff
path: root/embeddedobj/source/msole/ownview.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'embeddedobj/source/msole/ownview.cxx')
-rw-r--r--embeddedobj/source/msole/ownview.cxx40
1 files changed, 20 insertions, 20 deletions
diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx
index 92f233dd2a29..1585860234f0 100644
--- a/embeddedobj/source/msole/ownview.cxx
+++ b/embeddedobj/source/msole/ownview.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -124,28 +124,28 @@ sal_Bool OwnView_Impl::CreateModelFromURL( const ::rtl::OUString& aFileURL )
if ( aFileURL.getLength() )
{
try {
- uno::Reference < frame::XComponentLoader > xDocumentLoader(
- m_xFactory->createInstance (
+ uno::Reference < frame::XComponentLoader > xDocumentLoader(
+ m_xFactory->createInstance (
::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ),
uno::UNO_QUERY );
if ( xDocumentLoader.is() )
{
uno::Sequence< beans::PropertyValue > aArgs( m_aFilterName.getLength() ? 5 : 4 );
-
+
aArgs[0].Name = ::rtl::OUString::createFromAscii( "URL" );
aArgs[0].Value <<= aFileURL;
-
+
aArgs[1].Name = ::rtl::OUString::createFromAscii( "ReadOnly" );
aArgs[1].Value <<= sal_True;
-
+
aArgs[2].Name = ::rtl::OUString::createFromAscii( "InteractionHandler" );
aArgs[2].Value <<= uno::Reference< task::XInteractionHandler >(
static_cast< ::cppu::OWeakObject* >( new DummyHandler_Impl() ), uno::UNO_QUERY );
aArgs[3].Name = ::rtl::OUString::createFromAscii( "DontEdit" );
aArgs[3].Value <<= sal_True;
-
+
if ( m_aFilterName.getLength() )
{
aArgs[4].Name = ::rtl::OUString::createFromAscii( "FilterName" );
@@ -158,7 +158,7 @@ sal_Bool OwnView_Impl::CreateModelFromURL( const ::rtl::OUString& aFileURL )
0,
aArgs ),
uno::UNO_QUERY );
-
+
if ( xModel.is() )
{
uno::Reference< document::XEventBroadcaster > xBroadCaster( xModel, uno::UNO_QUERY );
@@ -166,16 +166,16 @@ sal_Bool OwnView_Impl::CreateModelFromURL( const ::rtl::OUString& aFileURL )
xBroadCaster->addEventListener( uno::Reference< document::XEventListener >(
static_cast< ::cppu::OWeakObject* >( this ),
uno::UNO_QUERY ) );
-
+
uno::Reference< util::XCloseable > xCloseable( xModel, uno::UNO_QUERY );
if ( xCloseable.is() )
{
xCloseable->addCloseListener( uno::Reference< util::XCloseListener >(
static_cast< ::cppu::OWeakObject* >( this ),
uno::UNO_QUERY ) );
-
+
::osl::MutexGuard aGuard( m_aMutex );
- m_xModel = xModel;
+ m_xModel = xModel;
bResult = sal_True;
}
}
@@ -323,7 +323,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io
(aReadSeq[0] >= '0' && aReadSeq[0] <= '9') ||
(aReadSeq[0] >= 'a' && aReadSeq[0] <= 'z') ||
(aReadSeq[0] >= 'A' && aReadSeq[0] <= 'Z') ||
- aReadSeq[0] == '.'
+ aReadSeq[0] == '.'
)
{
aFileSuffix += ::rtl::OUString::valueOf( (sal_Unicode) aReadSeq[0] );
@@ -354,7 +354,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io
sal_Int64 nTargetPos = xSeekable->getPosition() + nUrlSize;
xSeekable->seek( nTargetPos );
-
+
// get the size of stored data
if ( xInStream->readBytes( aReadSeq, 4 ) != 4 )
return sal_False;
@@ -370,8 +370,8 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io
{
sal_uInt32 nToRead = ( nDataSize - nRead > 32000 ) ? 32000 : nDataSize - nRead;
sal_uInt32 nLocalRead = xInStream->readBytes( aReadSeq, nToRead );
-
-
+
+
if ( !nLocalRead )
{
bFailed = sal_True;
@@ -385,7 +385,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io
aToWrite.realloc( nLocalRead );
xNativeOutTemp->writeBytes( aToWrite );
}
-
+
nRead += nLocalRead;
}
}
@@ -407,7 +407,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io
::comphelper::OStorageHelper::CopyInputToOutput( xInStream, xNativeOutTemp );
}
-
+
xNativeOutTemp->closeOutput();
// The temporary native file is created, now the filter must be detected
@@ -440,7 +440,7 @@ void OwnView_Impl::CreateNative()
uno::Sequence< uno::Any > aArgs( 1 );
aArgs[0] <<= xInStream;
uno::Reference< container::XNameAccess > xNameAccess(
- m_xFactory->createInstanceWithArguments(
+ m_xFactory->createInstanceWithArguments(
::rtl::OUString::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ),
aArgs ),
uno::UNO_QUERY_THROW );
@@ -464,7 +464,7 @@ void OwnView_Impl::CreateNative()
if ( MimeConfigurationHelper::ClassIDsEqual( aPackageClassID, aStorClassID ) )
{
// the storage represents Object Package
-
+
bOk = ReadContentsAndGenerateTempFile( xSubStream->getInputStream(), sal_True );
if ( !bOk && m_aNativeTempURL.getLength() )
@@ -625,7 +625,7 @@ void SAL_CALL OwnView_Impl::notifyEvent( const document::EventObject& aEvent )
xBroadCaster->removeEventListener( uno::Reference< document::XEventListener >(
static_cast< ::cppu::OWeakObject* >( this ),
uno::UNO_QUERY ) );
-
+
uno::Reference< util::XCloseable > xCloseable( xModel, uno::UNO_QUERY );
if ( xCloseable.is() )
xCloseable->removeCloseListener( uno::Reference< util::XCloseListener >(