From 018f32c1b53d0785dd05100da3aa19b0264f76d7 Mon Sep 17 00:00:00 2001 From: Sascha Woitschetzki Date: Mon, 14 Jun 2021 11:50:17 +0200 Subject: [PATCH] Anschreiben korrigiert und optimiert --- Gremlin/DE-83PE89-421-6000.aux | 21 ++++++++++++++++ Gremlin/DE-83PE89-421-6000.out | 0 .../GremlinUI/Operations/TexFileHandler.cs | 25 ++++++++----------- 3 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 Gremlin/DE-83PE89-421-6000.aux create mode 100644 Gremlin/DE-83PE89-421-6000.out diff --git a/Gremlin/DE-83PE89-421-6000.aux b/Gremlin/DE-83PE89-421-6000.aux new file mode 100644 index 0000000..341dbc1 --- /dev/null +++ b/Gremlin/DE-83PE89-421-6000.aux @@ -0,0 +1,21 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand*\new@tpo@label[2]{} +\@nameuse{bbl@beforestart} +\catcode `"\active +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} diff --git a/Gremlin/DE-83PE89-421-6000.out b/Gremlin/DE-83PE89-421-6000.out new file mode 100644 index 0000000..e69de29 diff --git a/Gremlin/GremlinUI/Operations/TexFileHandler.cs b/Gremlin/GremlinUI/Operations/TexFileHandler.cs index a5e4572..c147e7b 100644 --- a/Gremlin/GremlinUI/Operations/TexFileHandler.cs +++ b/Gremlin/GremlinUI/Operations/TexFileHandler.cs @@ -84,6 +84,13 @@ namespace Gremlin.Operations return texFile; } + private static string GetAnschreibenZeile(LineItemVM lineItemVM) + { + return lineItemVM.CustomDescription.CoverletterText == null || lineItemVM.CustomDescription.CoverletterText == "" + ? $"\\item {lineItemVM.CustomDescription.Heading} (\\#{lineItemVM.Position})" + : $"\\item {lineItemVM.CustomDescription.CoverletterText} (\\#{lineItemVM.Position})"; + } + private static StringBuilder ErstelleAnschreibenListe(QuoteVM quoteVM) { bool subitem = false; @@ -101,29 +108,17 @@ namespace Gremlin.Operations _ = anschreibenListe.AppendLine(@"\end{itemize}"); subitem = false; } - _ = lineItemVM.CustomDescription.CoverletterText == null - ? anschreibenListe.AppendLine($"\\item {lineItemVM.CustomDescription.Heading} (\\#{lineItemVM.Position})") - : anschreibenListe.AppendLine($"\\item {lineItemVM.CustomDescription.CoverletterText} (\\#{lineItemVM.Position})"); } else { - if (subitem) - { - //weiteres Subitem - _ = lineItemVM.CustomDescription.CoverletterText == null - ? anschreibenListe.AppendLine($"\\item {lineItemVM.CustomDescription.Heading} (\\#{lineItemVM.Position})") - : anschreibenListe.AppendLine($"\\item {lineItemVM.CustomDescription.CoverletterText} (\\#{lineItemVM.Position})"); - } - else + if (!subitem) { //neues Subitem subitem = true; _ = anschreibenListe.AppendLine("\\begin{itemize}"); - _ = lineItemVM.CustomDescription.CoverletterText == null - ? anschreibenListe.AppendLine($"\\item {lineItemVM.CustomDescription.Heading} (\\#{lineItemVM.Position})") - : anschreibenListe.AppendLine($"\\item {lineItemVM.CustomDescription.CoverletterText} (\\#{lineItemVM.Position})"); } } + anschreibenListe.AppendLine(GetAnschreibenZeile(lineItemVM)); } if (subitem) @@ -138,4 +133,4 @@ namespace Gremlin.Operations } } -} +} \ No newline at end of file