Make tests pass again (minor glitches).

This commit is contained in:
Daniel Kraus
2015-09-04 17:59:04 +02:00
parent dccb3145db
commit 8c4de2915a
7 changed files with 13 additions and 23 deletions

View File

@ -142,9 +142,13 @@ namespace zaaReloaded2.Formatter
// Create undo record and styles prior to iterating over the elements
// because a column switching element might trigger output to the
// document.
Globals.ThisAddIn.Application.UndoRecord.StartCustomRecord(
String.Format("Laborformatierung ({0})", Properties.Settings.Default.AddinName)
);
bool hasAddin = Globals.ThisAddIn != null;
if (hasAddin)
{
Globals.ThisAddIn.Application.UndoRecord.StartCustomRecord(
String.Format("Laborformatierung ({0})", Properties.Settings.Default.AddinName)
);
}
CreateStyles();
int current = 0;
@ -172,15 +176,6 @@ namespace zaaReloaded2.Formatter
}
}
// Write everything to the Word document
bool hasAddin = Globals.ThisAddIn != null;
if (hasAddin)
{
Globals.ThisAddIn.Application.UndoRecord.StartCustomRecord(
String.Format("Laborformatierung ({0})", Properties.Settings.Default.AddinName)
);
}
CreateStyles();
_secondaryBuffer.Flush();
if (hasAddin)
{