Kaydet (Commit) cb20ca1f authored tarafından Caolán McNamara's avatar Caolán McNamara

fix indent

Change-Id: Ifc1f654e4f63fc7aa62e1b920d1550281a0fa71e
üst a85840ec
...@@ -486,37 +486,36 @@ SwDoc* Reader::GetTemplateDoc() ...@@ -486,37 +486,36 @@ SwDoc* Reader::GetTemplateDoc()
aChkDateTime += tools::Time( 0L, 1L ); aChkDateTime += tools::Time( 0L, 1L );
} }
if( bLoad ) if (bLoad)
{ {
ClearTemplate(); ClearTemplate();
OSL_ENSURE( !mxTemplate.is(), "Who holds the template doc?" ); OSL_ENSURE( !mxTemplate.is(), "Who holds the template doc?" );
// If the writer module is not installed, // If the writer module is not installed,
// we cannot create a SwDocShell. We could create a // we cannot create a SwDocShell. We could create a
// SwWebDocShell however, because this exists always // SwWebDocShell however, because this exists always
// for the help. // for the help.
SvtModuleOptions aModuleOptions; SvtModuleOptions aModuleOptions;
if( aModuleOptions.IsWriter() ) if (aModuleOptions.IsWriter())
{
SwDocShell *pDocSh = new SwDocShell(SfxObjectCreateMode::INTERNAL);
SfxObjectShellLock xDocSh = pDocSh;
if (pDocSh->DoInitNew())
{ {
SwDocShell *pDocSh = mxTemplate = pDocSh->GetDoc();
new SwDocShell ( SfxObjectCreateMode::INTERNAL ); mxTemplate->SetOle2Link( Link<bool,void>() );
SfxObjectShellLock xDocSh = pDocSh; // always FALSE
if( pDocSh->DoInitNew() ) mxTemplate->GetIDocumentUndoRedo().DoUndo( false );
{ mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, bTmplBrowseMode );
mxTemplate = pDocSh->GetDoc(); mxTemplate->RemoveAllFormatLanguageDependencies();
mxTemplate->SetOle2Link( Link<bool,void>() );
// always FALSE ReadXML->SetOrganizerMode( true );
mxTemplate->GetIDocumentUndoRedo().DoUndo( false ); SfxMedium aMedium( aFileName, StreamMode::NONE );
mxTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, bTmplBrowseMode ); SwReader aRdr( aMedium, OUString(), mxTemplate.get() );
mxTemplate->RemoveAllFormatLanguageDependencies(); aRdr.Read( *ReadXML );
ReadXML->SetOrganizerMode( false );
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$$", OSL_ENSURE( !mxTemplate.is() || FStatHelper::IsDocument( aFileName ) || aTemplateNm=="$$Dummy$$",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment