ScTokenArray needs to be a complete type here

...after 865521aee1b989afd2c994bbbdc6a5e319940d92 "tdf#166791 sc: handle
copy/paste when selection overlaps array formulas",

> In file included from sc/source/ui/docshell/arealink.cxx:20:
> In file included from include/sfx2/fcontnr.hxx:25:
> In file included from include/rtl/ustring.hxx:45:
> In file included from include/rtl/string.hxx:51:
> In file included from include/rtl/stringconcat.hxx:22:
> In file included from /usr/lib/gcc/x86_64-redhat-linux/16/../../../../include/c++/16/memory:80:
> /usr/lib/gcc/x86_64-redhat-linux/16/../../../../include/c++/16/bits/unique_ptr.h:90:16: error: invalid application of 'sizeof' to an incomplete type 'ScTokenArray'
>    90 |         static_assert(sizeof(_Tp)>0,
>       |                       ^~~~~~~~~~~
> /usr/lib/gcc/x86_64-redhat-linux/16/../../../../include/c++/16/bits/unique_ptr.h:398:4: note: in instantiation of member function 'std::default_delete<ScTokenArray>::operator()' requested here
>   398 |           get_deleter()(std::move(__ptr));
>       |           ^
> sc/source/ui/inc/undoblk.hxx:759:84: note: in instantiation of member function 'std::unique_ptr<ScTokenArray>::~unique_ptr' requested here
>   759 |                                        std::unique_ptr<ScTokenArray> pTokenArray = nullptr );
>       |                                                                                    ^
> sc/inc/rangenam.hxx:33:7: note: forward declaration of 'ScTokenArray'
>    33 | class ScTokenArray;
>       |       ^

Change-Id: I40f7b71c913f3cd3bd17cf943e57e2401c29fb23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202690
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
This commit is contained in:
Stephan Bergmann
2026-03-27 08:00:26 +01:00
parent bf10f19a02
commit abb0783c0a
+1 -2
View File
@@ -23,6 +23,7 @@
#include "spellparam.hxx"
#include "cellmergeoption.hxx"
#include <paramisc.hxx>
#include <tokenarray.hxx>
#include <editeng/boxitem.hxx>
#include <memory>
@@ -728,8 +729,6 @@ private:
ScDocumentUniquePtr xRedoDoc;
};
class ScTokenArray;
class ScUndoEnterMatrix: public ScBlockUndo
{
public: