summaryrefslogtreecommitdiff
path: root/sw/inc/ToxTextGenerator.hxx
diff options
context:
space:
mode:
authorTobias Lippert <drtl@fastmail.fm>2014-06-01 14:13:28 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-06-05 14:25:52 +0000
commit4ed0c3dd4e71275b7018d86bc71f8a935219aeae (patch)
treed828184f7776ec180191f2fa6a87b4d676180207 /sw/inc/ToxTextGenerator.hxx
parent655377e90c57bb68e5000f06f76531baf9eeaa37 (diff)
Extract TOX text generation to its own source file
The separate source file will make it easier to unit test the functionality Also: move some constants to tox.hxx to have them available in the new source file Conflicts: sw/source/core/doc/doctxm.cxx Change-Id: Ib0369cc4875043829f55d30a549997560a38cc35 Reviewed-on: https://gerrit.libreoffice.org/9607 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/inc/ToxTextGenerator.hxx')
-rw-r--r--sw/inc/ToxTextGenerator.hxx59
1 files changed, 59 insertions, 0 deletions
diff --git a/sw/inc/ToxTextGenerator.hxx b/sw/inc/ToxTextGenerator.hxx
new file mode 100644
index 000000000000..6a5dbd9e5e95
--- /dev/null
+++ b/sw/inc/ToxTextGenerator.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef SW_TOXTEXTGENERATOR_HXX_
+#define SW_TOXTEXTGENERATOR_HXX_
+
+#include "sal/types.h"
+#include "swdllapi.h"
+#include <vector>
+
+class SwDoc;
+class SwForm;
+class SwPageDesc;
+class SwTOXSortTabBase;
+
+namespace sw {
+
+class SW_DLLPUBLIC ToxTextGenerator
+{
+public:
+ ToxTextGenerator(const SwForm& toxForm)
+ : mToxForm(toxForm)
+ {}
+ /** Generate the text for an entry of a table of X (X is, e.g., content).
+ *
+ * This method will process the entries in @p entries, starting at @p indexOfEntryToProcess and
+ * process @p numberOfEntriesToProcess entries.
+ */
+ void
+ GenerateText(SwDoc *doc, const std::vector<SwTOXSortTabBase*>& entries,
+ sal_uInt16 indexOfEntryToProcess, sal_uInt16 numberOfEntriesToProcess,
+ sal_uInt32 _nTOXSectNdIdx, const SwPageDesc* _pDefaultPageDesc);
+
+
+private:
+ const SwForm& mToxForm;
+};
+
+}
+
+#endif /* SW_TOXTEXTGENERATOR_HXX_ */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */