summaryrefslogtreecommitdiff
path: root/sw/source/core/model
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-06-17 15:31:11 +0900
committerTomaž Vajngerl <quikee@gmail.com>2021-06-19 11:14:01 +0200
commitc23408aeafc1f2ce3f7dde685d0b519d8e2daff7 (patch)
tree93d0669bb6c3fa907bb5f3dcb9e62e6fe31d5ca3 /sw/source/core/model
parent37cd5bd4fdf2317709882c933844c4cc67e4cee4 (diff)
indexing: indexing shapes/text boxes for the IndexingExport
Adds handling of shapes and text boxes to the IndexingExport with exporting the the name, alt text, description and paragraphs of the inner shape text to the indexing xml. Change-Id: I3db68078b7e793cab552b4f7f8e8ddf9bfd1a6f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117359 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw/source/core/model')
-rw-r--r--sw/source/core/model/ModelTraverser.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sw/source/core/model/ModelTraverser.cxx b/sw/source/core/model/ModelTraverser.cxx
index f46e173eca9f..0a01f5cd97c5 100644
--- a/sw/source/core/model/ModelTraverser.cxx
+++ b/sw/source/core/model/ModelTraverser.cxx
@@ -11,6 +11,9 @@
#include <ModelTraverser.hxx>
#include <node.hxx>
#include <ndarr.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <svx/svdpage.hxx>
+#include <drawdoc.hxx>
namespace sw
{
@@ -32,6 +35,24 @@ void ModelTraverser::traverse()
}
}
}
+
+ IDocumentDrawModelAccess& rDrawModelAccess = m_pDoc->getIDocumentDrawModelAccess();
+ auto* pModel = rDrawModelAccess.GetDrawModel();
+ for (sal_uInt16 nPage = 0; nPage < pModel->GetPageCount(); ++nPage)
+ {
+ SdrPage* pPage = pModel->GetPage(nPage);
+ for (size_t nObject = 0; nObject < pPage->GetObjCount(); ++nObject)
+ {
+ SdrObject* pObject = pPage->GetObj(nObject);
+ if (pObject)
+ {
+ for (auto& pNodeHandler : mpNodeHandler)
+ {
+ pNodeHandler->handleSdrObject(pObject);
+ }
+ }
+ }
+ }
}
} // end sw namespace