summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-12-24 23:55:58 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-12-30 14:17:08 +0100
commit4acb0979b10bf35cf929078e53ccccea249e1416 (patch)
tree49cac75d3390b37179297c66648361b507fa5323 /editeng
parent9a62dcf59af3513a82fb5640314021d064d8b9b7 (diff)
editeng: move EditLineList to its own header file
Change-Id: Ic19aa0826050a768e9976d8d3db9eadb108607f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161360 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/inc/EditLineList.hxx45
-rw-r--r--editeng/inc/editdoc.hxx23
2 files changed, 46 insertions, 22 deletions
diff --git a/editeng/inc/EditLineList.hxx b/editeng/inc/EditLineList.hxx
new file mode 100644
index 000000000000..2b3874913cad
--- /dev/null
+++ b/editeng/inc/EditLineList.hxx
@@ -0,0 +1,45 @@
+/* -*- 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 .
+ */
+
+#pragma once
+
+#include <vector>
+#include <sal/types.h>
+
+class EditLineList
+{
+ typedef std::vector<std::unique_ptr<EditLine>> LinesType;
+ LinesType maLines;
+
+public:
+ EditLineList();
+ ~EditLineList();
+
+ void Reset();
+ void DeleteFromLine(sal_Int32 nDelFrom);
+ sal_Int32 FindLine(sal_Int32 nChar, bool bInclEnd);
+ sal_Int32 Count() const;
+ const EditLine& operator[](sal_Int32 nPos) const;
+ EditLine& operator[](sal_Int32 nPos);
+
+ void Append(EditLine* p);
+ void Insert(sal_Int32 nPos, EditLine* p);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx
index c53abc62949c..3db8a8a64a63 100644
--- a/editeng/inc/editdoc.hxx
+++ b/editeng/inc/editdoc.hxx
@@ -34,6 +34,7 @@
#include "ItemList.hxx"
#include "ContentNode.hxx"
#include "EditLine.hxx"
+#include "EditLineList.hxx"
#include <cstddef>
#include <memory>
@@ -159,28 +160,6 @@ public:
sal_Int32 GetPos(const TextPortion* p) const;
};
-class EditLineList
-{
- typedef std::vector<std::unique_ptr<EditLine> > LinesType;
- LinesType maLines;
-
-public:
- EditLineList();
- ~EditLineList();
-
- void Reset();
- void DeleteFromLine(sal_Int32 nDelFrom);
- sal_Int32 FindLine(sal_Int32 nChar, bool bInclEnd);
- sal_Int32 Count() const;
- const EditLine& operator[](sal_Int32 nPos) const;
- EditLine& operator[](sal_Int32 nPos);
-
- void Append(EditLine* p);
- void Insert(sal_Int32 nPos, EditLine* p);
-};
-
-
-
class ParaPortion
{
friend class ImpEditEngine; // to adjust the height