From cdba047c3835e54dcd0db567050d77a5740e8a52 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sat, 1 Sep 2018 21:47:13 +0100 Subject: [PATCH 1/1] odthelpbrowser: Remove unused variable and all code paths return values --- source/tools/odthelpbrowser/frmMain.cpp | 1 - source/tools/odthelpbrowser/odt.cpp | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/tools/odthelpbrowser/frmMain.cpp b/source/tools/odthelpbrowser/frmMain.cpp index 193cbb0..f1048e5 100644 --- a/source/tools/odthelpbrowser/frmMain.cpp +++ b/source/tools/odthelpbrowser/frmMain.cpp @@ -23,7 +23,6 @@ frmMainADT( parent ) wxTreeItemId lastItemAtLevel[9]; lastItemAtLevel[ODT::HelpTopicCurrentLevel::TOPIC_LEVEL1] = rootItem; - ODT::HelpTopicCurrentLevel previousLevel; uint32_t itemIndex = 0; for (auto tocItem : document->tocData) diff --git a/source/tools/odthelpbrowser/odt.cpp b/source/tools/odthelpbrowser/odt.cpp index 59f7dad..3ce4456 100644 --- a/source/tools/odthelpbrowser/odt.cpp +++ b/source/tools/odthelpbrowser/odt.cpp @@ -40,6 +40,8 @@ namespace ODT xmlODTDoc = xmlReadMemory(odtDocument.c_str(), (int)odtDocument.size(), "noname.xml", NULL, 0); if (!ProcessDocument(xmlODTDoc)) return false; + + return true; } bool ODT::ProcessDocument(xmlDocPtr document) @@ -493,5 +495,7 @@ namespace ODT return TOPIC_LEVEL3; else if (styleTextIterator->second == "Contents_20_4") return TOPIC_LEVEL4; + + return TOPIC_LEVEL1; } } \ No newline at end of file -- 2.39.2