summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/objstor.cxx
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2013-10-29 09:46:27 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2013-10-30 23:56:01 +0100
commited4f0a52f0110557f86a63d9758a71c6b2e09e06 (patch)
treec0c65dbeba8a0e5166071709f09732f6a1fb7343 /sfx2/source/doc/objstor.cxx
parentdfe56dfebe5a8c5ee0c3c576158d43fa9fa5678a (diff)
fix indentation
Change-Id: I41c9e96e2202f1dc52ed93c03846d4d37ae6c2cb
Diffstat (limited to 'sfx2/source/doc/objstor.cxx')
-rw-r--r--sfx2/source/doc/objstor.cxx55
1 files changed, 27 insertions, 28 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 67da65855fce..1ed9433f8a72 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1883,38 +1883,37 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl(
sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit )
{
sal_Bool bOk = sal_False;
- {
- ModifyBlocker_Impl aBlock( this );
- uno::Reference < embed::XStorage > xNewStor = rMedium.GetStorage();
- if ( !xNewStor.is() )
- return sal_False;
+ ModifyBlocker_Impl aBlock( this );
- uno::Reference < beans::XPropertySet > xPropSet( xNewStor, uno::UNO_QUERY );
- if ( xPropSet.is() )
- {
- Any a = xPropSet->getPropertyValue("MediaType");
- OUString aMediaType;
- if ( !(a>>=aMediaType) || aMediaType.isEmpty() )
- {
- SAL_WARN( "sfx.doc", "The mediatype must be set already!" );
- SetupStorage( xNewStor, SOFFICE_FILEFORMAT_CURRENT, sal_False, false );
- }
+ uno::Reference < embed::XStorage > xNewStor = rMedium.GetStorage();
+ if ( !xNewStor.is() )
+ return sal_False;
- pImp->bIsSaving = sal_False;
- bOk = SaveAsOwnFormat( rMedium );
+ uno::Reference < beans::XPropertySet > xPropSet( xNewStor, uno::UNO_QUERY );
+ if ( !xPropSet.is() )
+ return sal_False;
- if ( bCommit )
- {
- try {
- uno::Reference< embed::XTransactedObject > xTransact( xNewStor, uno::UNO_QUERY_THROW );
- xTransact->commit();
- }
- catch( uno::Exception& )
- {
- SAL_WARN( "sfx.doc", "The strotage was not commited on DoSaveAs!" );
- }
- }
+ Any a = xPropSet->getPropertyValue("MediaType");
+ OUString aMediaType;
+ if ( !(a>>=aMediaType) || aMediaType.isEmpty() )
+ {
+ SAL_WARN( "sfx.doc", "The mediatype must be set already!" );
+ SetupStorage( xNewStor, SOFFICE_FILEFORMAT_CURRENT, sal_False, false );
+ }
+
+ pImp->bIsSaving = sal_False;
+ bOk = SaveAsOwnFormat( rMedium );
+
+ if ( bCommit )
+ {
+ try {
+ uno::Reference< embed::XTransactedObject > xTransact( xNewStor, uno::UNO_QUERY_THROW );
+ xTransact->commit();
+ }
+ catch( uno::Exception& )
+ {
+ SAL_WARN( "sfx.doc", "The strotage was not commited on DoSaveAs!" );
}
}