From 84d63cfccf7af8f2b3b689ab0e622f8b408eb470 Mon Sep 17 00:00:00 2001 From: Attila Szűcs Date: Thu, 11 Jul 2024 11:24:28 +0200 Subject: Sw: extract/transform document structure 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit inserting a ContentControl, now generate a unique ID for it... search the lowest possible non used (non negative) number added a GetType() function for SwXContentControl that get it from SwContentControl, and used it for extract and transform. Added some support for all other types.. some are not really usable yet. Fixed a problem when setting checkbox check, did not changed its content. If content is set to “”. It now set as placeholder, and reset its content to the initial placeholder value, like: “Choose an item” or “Click here to enter text” (work for checkbox, and picture CntentControl.) Change-Id: I0fc696f73734bdfb9ac5b8fdc6891168b8d4ed5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170600 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- desktop/source/lib/init.cxx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'desktop/source') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 2769c47bf9b0..48b771c9f7f3 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2588,7 +2588,8 @@ static void lo_setOption(LibreOfficeKit* pThis, const char* pOption, const char* static void lo_dumpState(LibreOfficeKit* pThis, const char* pOptions, char** pState); -static char* lo_extractDocumentStructureRequest(LibreOfficeKit* pThis, const char* pFilePath); +static char* lo_extractDocumentStructureRequest(LibreOfficeKit* pThis, const char* pFilePath, + const char* pFilter); LibLibreOffice_Impl::LibLibreOffice_Impl() : m_pOfficeClass( gOfficeClass.lock() ) @@ -3147,7 +3148,8 @@ static char* lo_extractRequest(LibreOfficeKit* /*pThis*/, const char* pFilePath) return strdup("{ }"); } -static char* lo_extractDocumentStructureRequest(LibreOfficeKit* /*pThis*/, const char* pFilePath) +static char* lo_extractDocumentStructureRequest(LibreOfficeKit* /*pThis*/, const char* pFilePath, + const char* pFilter) { uno::Reference xComponentLoader = frame::Desktop::create(xContext); uno::Reference< css::lang::XComponent > xComp; @@ -3194,9 +3196,14 @@ static char* lo_extractDocumentStructureRequest(LibreOfficeKit* /*pThis*/, const { tools::JsonWriter aJson; { - pDoc->getCommandValues(aJson, ".uno:ExtractDocumentStructure"); - //auto aNode = aJson.startNode("Controls"); - //extractLinks(xLTS->getLinks(), false, aJson); + OString aCommand = ".uno:ExtractDocumentStructure"_ostr; + if (pFilter && pFilter[0]) + { + aCommand + = OString::Concat(aCommand) + "?filter="_ostr + pFilter; + } + + pDoc->getCommandValues(aJson, aCommand); } return convertOString(aJson.finishAndGetAsOString()); } -- cgit o-24.04.9 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/canvas
AgeCommit message (Expand)Author
2024-10-21vcl: move bitmap filter headers into vcl/bitmap global header directoryChris Sherlock
2024-09-25tdf#163145: revert commit 6f224a17dbf635319503a81ce4038b1ae2ad6de0Mike Kaganski
2024-08-16cid#1557618 COPY_INSTEAD_OF_MOVECaolán McNamara
2024-08-06cid#555593 COPY_INSTEAD_OF_MOVECaolán McNamara
2024-07-31cid#1555587 COPY_INSTEAD_OF_MOVECaolán McNamara
2024-05-18cid#1598237 Uncaught exceptionCaolán McNamara
2024-05-15use more officecfg in CanvasFactoryNoel Grandin
2024-05-12Drop some uses of css::uno::Sequence::getConstArrayMike Kaganski
2024-05-06loplugin:ostr in canvasNoel Grandin
2024-04-30WaE: C6011 Dereferencing NULL pointer warningsCaolán McNamara
2024-04-29Drop uses of css::uno::Sequence::getConstArray in canvas .. connectivityMike Kaganski
2024-04-15Generalize basegfx::fround for templated return typeMike Kaganski
2024-03-30convert CanvasFont to comphelper::WeakComponentImplHelperNoel Grandin
2024-03-14tdf#141908 - CppUnittests: replace usage of sal_Int32 with colorsRafał Dobrakowski
2024-02-08canvas : use more OUString literalsArnaud VERSINI
2024-01-15tdf#156830: fix faulty transformation order in cairo canvas for patternsSarper Akdemir
2024-01-12cid#1546414 COPY_INSTEAD_OF_MOVECaolán McNamara
2024-01-02tdf#145538 Use range based for loopsLuv Sharma
2023-12-30move IsFuzzing to comphelperCaolán McNamara
2023-12-07simplify and modernise ScopedBitmapAccessNoel Grandin
2023-11-20Extended loplugin:ostr: canvasStephan Bergmann
2023-11-18c++20: use std::erase instead of std::removed followed by erase (part 2)Julien Nabet
2023-11-17c++20: use std::erase instead of std::removed followed by eraseJulien Nabet
2023-10-25tdf#157790 invert alpha maskPatrick Luby
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
2023-09-21tdf#146619 Recheck include/basegfx with IWYUGabor Kelemen
2023-09-02replace set(nullptr) with clear()Noel Grandin
2023-08-19loplugin: new global analysis locking2Noel Grandin
2023-08-16tdf#144073 and tdf#147645: use bounds and angle for gradientPatrick Luby
2023-08-13Revert "clang-tidy bugprone-parent-virtual-call in canvas"Noel Grandin
2023-08-11clang-tidy bugprone-parent-virtual-call in canvasNoel Grandin
2023-08-06tdf#156540 invert alpha mask when drawing spritesThorsten Behrens
2023-08-06Revert "tdf#156540 invert alpha when drawing sprites"Patrick Luby
2023-08-05tdf#156540 invert alpha when drawing spritesPatrick Luby
2023-07-25Convert internal vcl bitmap formats transparency->alpha (II)Noel Grandin
2023-07-13basegfx: replace typedef with a class B2ISize based on Size2DTomaž Vajngerl
2023-07-10tdf#147999: Fix canvas font width for fallback fonts on WindowsKhaled Hosny
2023-07-06make tools::Poly*gon single-arg constructors explicitNoel Grandin
2023-07-06ScanlineFormat::N1BitLsbPal is unusedNoel Grandin