On 2026-11-02 22:33, Laurent Balland wrote:
I'm trying to write a cppunit test which modify some options. But at compilation, I've got the error:/home/laurent/devlo/libo/sc/qa/unit/uicalc/uicalc2.cxx:63:10: fatal error: officecfg/Office/Calc.hxx: No file or directory with this name (personal translation of: Aucun fichier ou dossier de ce nom)63 | #include <officecfg/Office/Calc.hxx>I've no problem to make sc/qa/unit/parallelism.cxx, which includes the same file. The only difference I noticed is that uicalc2.cxx is located in a subdirectory compared to parallelism.cxx.How can I include <officecfg/Office/Calc.hxx>?
It should work as usual with this additional change to the relevant Makefile to make those headers available:
diff --git a/sc/CppunitTest_sc_uicalc2.mk b/sc/CppunitTest_sc_uicalc2.mk
index 84848c35c838..8eeb08145938 100644
--- a/sc/CppunitTest_sc_uicalc2.mk
+++ b/sc/CppunitTest_sc_uicalc2.mk
@@ -50,6 +50,10 @@ $(eval $(call gb_CppunitTest_set_include,sc_uicalc2,\
$$(INCLUDE) \
))
+$(eval $(call gb_CppunitTest_use_custom_headers,sc_uicalc2,\
+ officecfg/registry \
+))
+
$(eval $(call gb_CppunitTest_use_sdk_api,sc_uicalc2))
$(eval $(call gb_CppunitTest_use_ure,sc_uicalc2))
OpenPGP_signature.asc
Description: OpenPGP digital signature
