cppu_detail_getUnoType for PropertyValue should arguably be declared here

...contrary to what 31ea498486 "tdf#146619 Use
more forward declarations in include/vcl/[q-w]*" apparently assumed, as the dtor
of NotebookBarAddonsItem is implicitly defined inline here, and otherwise at
least recent Clang 23 trunk against recent libstdc++ 16 trunk would fail with

> In file included from vcl/source/control/combobox.cxx:20:
> In file included from include/vcl/toolkit/combobox.hxx:28:
> In file included from include/vcl/toolkit/edit.hxx:26:
> In file included from include/vcl/ctrl.hxx:26:
> In file included from include/vcl/window.hxx:24:
> In file included from include/vcl/outdev.hxx:28:
> In file included from include/tools/color.hxx:23:
> In file included from include/com/sun/star/uno/Any.hxx:35:
> In file included from include/com/sun/star/uno/Any.h:33:
> include/cppu/unotype.hxx:300:16: error: no matching function for call to 'cppu_detail_getUnoType'
>   300 |         return cppu_detail_getUnoType(static_cast< T1 * >(NULL));
>       |                ^~~~~~~~~~~~~~~~~~~~~~
> include/cppu/unotype.hxx:325:34: note: in instantiation of member function 'cppu::UnoType<com::sun::star::beans::PropertyValue>::get' requested here
>   325 |     return ::cppu::UnoType< T >::get();
>       |                                  ^
> include/com/sun/star/uno/Sequence.hxx:332:22: note: in instantiation of function template specialization 'cppu::getTypeFavourUnsigned<com::sun::star::beans::PropertyValue>' requested here
>   332 |             (::cppu::getTypeFavourUnsigned(
>       |                      ^
> include/com/sun/star/uno/Sequence.hxx:332:22: note: in instantiation of function template specialization 'cppu::getTypeFavourUnsigned<com::sun::star::beans::PropertyValue>' requested here
> include/com/sun/star/uno/Sequence.hxx:122:38: note: in instantiation of function template specialization 'cppu::getTypeFavourUnsigned<com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>>' requested here
>   122 |         const Type & rType = ::cppu::getTypeFavourUnsigned( static_cast<Sequence const *>(NULL) );
>       |                                      ^
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/stl_construct.h:88:15: note: in instantiation of member function 'com::sun::star::uno::Sequence<com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>>::~Sequence' requested here
>    88 |         __location->~_Tp();
>       |                      ^

etc. upon seeing the default argument in the declaration of

>     VclBuilder(vcl::Window* pParent, std::u16string_view sUIRootDir, const OUString& sUIFile,
>                OUString sID = {},
>                css::uno::Reference<css::frame::XFrame> xFrame
>                = css::uno::Reference<css::frame::XFrame>(),
>                bool bLegacy = true,
>                std::unique_ptr<NotebookBarAddonsItem> pNotebookBarAddonsItem = nullptr);

in include/vcl/builder.hxx

Change-Id: Id72f7adec9e1e564cdaa14578ddeb1ef052a023b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198184
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
This commit is contained in:
Stephan Bergmann
2026-01-27 09:18:49 +01:00
parent 39f331e50b
commit 2c99f58b27
@@ -20,14 +20,10 @@
#pragma once
#include <vcl/image.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/uno/Sequence.h>
#include <vector>
namespace com::sun::star::beans
{
struct PropertyValue;
}
struct NotebookBarAddonsItem
{
std::vector<Image> aImageValues;