summaryrefslogtreecommitdiff
path: root/sw/source/filter/basflt/shellio.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-24 14:29:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-03-24 14:29:35 +0000
commitcb20ca1f52f2a0d61b972f88fb01e23958a0f3a5 (patch)
treec08d3cf993629315c787d72d3ce0e138365c84a5 /sw/source/filter/basflt/shellio.cxx
parenta85840ecea45d254c932f011f3f43f307b089f8a (diff)
fix indent
Change-Id: Ifc1f654e4f63fc7aa62e1b920d1550281a0fa71e
Diffstat (limited to 'sw/source/filter/basflt/shellio.cxx')
-rw-r--r--sw/source/filter/basflt/shellio.cxx49
1 files changed, 24 insertions, 25 deletions
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 642c84dca8de..0dc77c9d5ea2 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -486,37 +486,36 @@ SwDoc* Reader::GetTemplateDoc()
aChkDateTime += tools::Time( 0L, 1L );
}
- if( bLoad )
+ if (bLoad)
{
ClearTemplate();
OSL_ENSURE( !mxTemplate.is(), "Who holds the template doc?" );
- // If the writer module is not installed,
- // we cannot create a SwDocShell. We could create a
- // SwWebDocShell however, because this exists always
- // for the help.
- SvtModuleOptions aModuleOptions;
- if( aModuleOptions.IsWriter() )
+ // If the writer module is not installed,
+ // we cannot create a SwDocShell. We could create a
+ // SwWebDocShell however, because this exists always
+ // for the help.
+ SvtModuleOptions aModuleOptions;
+ if (aModuleOptions.IsWriter())
+ {
+ SwDocShell *pDocSh = new SwDocShell(SfxObjectCreateMode::INTERNAL);
+ SfxObjectShellLock xDocSh = pDocSh;
+ if (pDocSh->DoInitNew())
{
- SwDocShell *pDocSh =
- new SwDocShell ( SfxObjectCreateMode::INTERNAL );
- SfxObjectShellLock xDocSh = pDocSh;
- if( pDocSh->DoInitNew() )
- {
- mxTemplate = pDocSh->GetDoc();
- mxTemplate->SetOle2Link( Link<bool,void>() );
- // always FALSE
- mxTemplate->GetIDocumentUndoRedo().DoUndo( false );
- mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, bTmplBrowseMode );
- mxTemplate->RemoveAllFormatLanguageDependencies();
-
- ReadXML->SetOrganizerMode( true );
- SfxMedium aMedium( aFileName, StreamMode::NONE );
- SwReader aRdr( aMedium, OUString(), mxTemplate.get() );
- aRdr.Read( *ReadXML );
- ReadXML->SetOrganizerMode( false );
- }
+ mxTemplate = pDocSh->GetDoc();
+ mxTemplate->SetOle2Link( Link<bool,void>() );
+ // always FALSE
+ mxTemplate->GetIDocumentUndoRedo().DoUndo( false );
+ mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, bTmplBrowseMode );
+ mxTemplate->RemoveAllFormatLanguageDependencies();
+
+ ReadXML->SetOrganizerMode( true );
+ SfxMedium aMedium( aFileName, StreamMode::NONE );
+ SwReader aRdr( aMedium, OUString(), mxTemplate.get() );
+ aRdr.Read( *ReadXML );
+ ReadXML->SetOrganizerMode( false );
}
+ }
}
OSL_ENSURE( !mxTemplate.is() || FStatHelper::IsDocument( aFileName ) || aTemplateNm=="$$Dummy$$",