LibreOffice Module sw (master) 1
|
#include <SearchResultLocator.hxx>
Public Member Functions | |
SearchResultLocator (SwDoc *pDoc) | |
LocationResult | find (std::vector< SearchIndexData > const &rSearchIndexDataVector) |
LocationResult | findForPayload (const char *pPayload) |
Private Member Functions | |
void | findOne (LocationResult &rResult, SearchIndexData const &rSearchIndexData) |
Static Private Member Functions | |
static bool | tryParseJSON (const char *pPayload, std::vector< sw::search::SearchIndexData > &rDataVector) |
Trying to parse the payload as JSON. More... | |
static bool | tryParseXML (const char *pPayload, std::vector< sw::search::SearchIndexData > &rDataVector) |
Trying to parse the payload as XML. More... | |
Private Attributes | |
SwDoc * | mpDocument |
Definition at line 49 of file SearchResultLocator.hxx.
|
inline |
Definition at line 60 of file SearchResultLocator.hxx.
LocationResult sw::search::SearchResultLocator::find | ( | std::vector< SearchIndexData > const & | rSearchIndexDataVector | ) |
Definition at line 80 of file SearchResultLocator.cxx.
References findOne().
Referenced by findForPayload().
LocationResult sw::search::SearchResultLocator::findForPayload | ( | const char * | pPayload | ) |
Definition at line 191 of file SearchResultLocator.cxx.
References find(), tryParseJSON(), and tryParseXML().
Referenced by SwXTextDocument::getSearchResultRectangles().
|
private |
Definition at line 30 of file SearchResultLocator.cxx.
References sw::search::CommonNode, SwNodes::Count(), SwNode::GetContentNode(), IDocumentLayoutAccess::GetCurrentViewShell(), IDocumentDrawModelAccess::GetDrawModel(), SwFrameAreaDefinition::getFrameArea(), SwDoc::getIDocumentDrawModelAccess(), SwDoc::getIDocumentLayoutAccess(), SwDoc::GetNodes(), SdrObjList::GetObj(), SdrObjList::GetObjCount(), SwRect::Height(), SwRect::Left(), sw::search::SearchIndexData::maObjectName, sw::search::LocationResult::maRectangles, sw::search::LocationResult::mbFound, sw::search::SearchIndexData::meType, sw::search::SearchIndexData::mnNodeIndex, mpDocument, pObject, SwRect::Top(), SwRect::Width(), and sw::search::WriterNode.
Referenced by find().
|
staticprivate |
Trying to parse the payload as JSON.
Returns true if parsing was successful and the payload was identified as JSON, else false
Definition at line 93 of file SearchResultLocator.cxx.
References sw::search::CommonNode, nIndex, sType, sw::search::Undefined, and sw::search::WriterNode.
Referenced by findForPayload().
|
staticprivate |
Trying to parse the payload as XML.
Returns true if parsing was successful and the payload was identified as XML, else false
Definition at line 144 of file SearchResultLocator.cxx.
References SL::aData, tools::XmlWalker::attribute(), tools::XmlWalker::children(), sw::search::CommonNode, tools::XmlWalker::isValid(), tools::XmlWalker::name(), tools::XmlWalker::next(), tools::XmlWalker::open(), tools::XmlWalker::parent(), sType, sw::search::Undefined, and sw::search::WriterNode.
Referenced by findForPayload().
|
private |
Definition at line 51 of file SearchResultLocator.hxx.
Referenced by findOne().