diff --git a/Tests/Controller/Elements/ItemsTest.cs b/Tests/Controller/Elements/ItemsTest.cs index 28401cb..4c602b4 100755 --- a/Tests/Controller/Elements/ItemsTest.cs +++ b/Tests/Controller/Elements/ItemsTest.cs @@ -182,6 +182,7 @@ namespace Tests.Controller.Elements [Test] public void ItemCommentWithoutHandler() { + CommentPool.Default.Reset(); Laboratory lab = new Laboratory(); TimePoint tp = new TimePoint(); tp.TimeStamp = new DateTime(2015, 7, 13, 13, 31, 00); diff --git a/Tests/Formatter/FormatterTest-all.txt b/Tests/Formatter/FormatterTest-all.txt index e112ed6..85419f7 100755 --- a/Tests/Formatter/FormatterTest-all.txt +++ b/Tests/Formatter/FormatterTest-all.txt @@ -1,7 +1,5 @@ - -Laborwerte vom 04.07.2015 12:31:00: +Laborwerte vom 04.07.2015 12:31:00: Klinische Chemie: Na 144 mM, K 4,3 mM - Laborwerte vom 06.07.2015 10:28:00: Klinische Chemie: Na 138 mM, K 4,6 mM diff --git a/Tests/Formatter/FormatterTest-eachday.txt b/Tests/Formatter/FormatterTest-eachday.txt index 2bad5e3..1974aa1 100755 --- a/Tests/Formatter/FormatterTest-eachday.txt +++ b/Tests/Formatter/FormatterTest-eachday.txt @@ -1,7 +1,5 @@ - -Laborwerte vom 04.07.2015: +Laborwerte vom 04.07.2015: Klinische Chemie: Na 144 mM, K 4,3 mM - Laborwerte vom 06.07.2015: Klinische Chemie: Na 138 mM, K 4,6 mM diff --git a/Tests/Formatter/FormatterTest-firstday.txt b/Tests/Formatter/FormatterTest-firstday.txt index 0aa36d1..0ca8c07 100755 --- a/Tests/Formatter/FormatterTest-firstday.txt +++ b/Tests/Formatter/FormatterTest-firstday.txt @@ -1,4 +1,3 @@ - -Laborwerte vom 04.07.2015: +Laborwerte vom 04.07.2015: Klinische Chemie: Na 144 mM, K 4,3 mM diff --git a/Tests/Formatter/FormatterTest-lastday.txt b/Tests/Formatter/FormatterTest-lastday.txt index b95373f..9b6ba3d 100755 --- a/Tests/Formatter/FormatterTest-lastday.txt +++ b/Tests/Formatter/FormatterTest-lastday.txt @@ -1,4 +1,3 @@ - -Laborwerte vom 06.07.2015: +Laborwerte vom 06.07.2015: Klinische Chemie: Na 138 mM, K 4,6 mM diff --git a/publish/zaaReloaded2.iss b/publish/zaaReloaded2.iss index 9988d0d..0188315 100755 --- a/publish/zaaReloaded2.iss +++ b/publish/zaaReloaded2.iss @@ -3,7 +3,7 @@ ; Apache License Version 2.0 [Setup] -; #define DEBUG +#define DEBUG ; Read the semantic and the installer file version from the VERSION file #define FILE_HANDLE FileOpen("..\zaaReloaded2\VERSION") diff --git a/zaaReloaded2/Formatter/Formatter.cs b/zaaReloaded2/Formatter/Formatter.cs index 6de6ba2..2d39b55 100755 --- a/zaaReloaded2/Formatter/Formatter.cs +++ b/zaaReloaded2/Formatter/Formatter.cs @@ -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) {