1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
15 #include <basegfx/range/b2drange.hxx>
24 CommonNode
= 2 // node in a SdrObject
27 struct SearchIndexData
29 NodeType meType
= NodeType::Undefined
;
30 SwNodeOffset mnNodeIndex
{ 0 };
31 OUString maObjectName
;
35 SearchIndexData(NodeType eType
, SwNodeOffset nNodeIndex
, OUString aObjectName
= OUString())
37 , mnNodeIndex(nNodeIndex
)
38 , maObjectName(std::move(aObjectName
))
46 std::vector
<basegfx::B2DRange
> maRectangles
;
49 class SW_DLLPUBLIC SearchResultLocator
53 void findOne(LocationResult
& rResult
, SearchIndexData
const& rSearchIndexData
);
54 static bool tryParseJSON(const char* pPayload
,
55 std::vector
<sw::search::SearchIndexData
>& rDataVector
);
56 static bool tryParseXML(const char* pPayload
,
57 std::vector
<sw::search::SearchIndexData
>& rDataVector
);
60 SearchResultLocator(SwDoc
* pDoc
)
65 LocationResult
find(std::vector
<SearchIndexData
> const& rSearchIndexDataVector
);
66 LocationResult
findForPayload(const char* pPayload
);
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */