Files
odfstudio/filter
Stephan Bergmann e3c26324dd Silence some more bogus -Wrestrict
...that hit at least with GCC 17,

> In file included from ~/gcc/inst/include/c++/17.0.0/memory:71,
>                  from engine/include/sfx2/tabdlg.hxx:22,
>                  from engine/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx:21,
>                  from engine/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx:20:
> In function ‘constexpr _ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const int*, vector<int> >; _ForwardIterator = int*]’,
>     inlined from ‘constexpr _ForwardIterator std::__uninitialized_copy_a(_InputIterator, _Sentinel, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const int*, vector<int> >; _Sentinel = __gnu_cxx::__normal_iterator<const int*, vector<int> >; _ForwardIterator = int*; _Tp = int]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:659:32,
>     inlined from ‘constexpr std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::_Alloc_result std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::_M_allocate_and_copy(size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; _Tp = int; _Alloc = std::allocator<int>]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_vector.h:1957:6,
>     inlined from ‘constexpr void std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::_M_replace_with(size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = __gnu_cxx::__normal_iterator<const int*, std::vector<int> >; _Tp = int; _Alloc = std::allocator<int>]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_vector.h:1979:44,
>     inlined from ‘constexpr std::vector<_Tp, _Alloc>& std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::operator=(const std::vector< <template-parameter-1-1>, <template-parameter-1-2> >&) [with _Tp = int; _Alloc = std::allocator<int>]’ at ~/gcc/inst/include/c++/17.0.0/bits/vector.tcc:236:21,
>     inlined from ‘virtual void chart::SchOptionTabPage::Reset(const SfxItemSet*)’ at engine/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx:168:69:
> ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:294:31: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing between 9223372032559808516 and 9223372036854775804 bytes at offsets 0 and 0 overlaps 9223372028264841225 bytes at offset 4294967291 [-Werror=restrict]
>   294 |               __builtin_memcpy(std::__niter_base(__result),
>       |               ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   295 |                                std::__miter_base(std::__niter_base(__first)),
>       |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   296 |                                __n * sizeof(_ValT));
>       |                                ~~~~~~~~~~~~~~~~~~~~

and

> In file included from ~/gcc/inst/include/c++/17.0.0/memory:71,
>                  from engine/include/rtl/stringconcat.hxx:20,
>                  from engine/include/rtl/string.hxx:44,
>                  from engine/include/rtl/ustring.hxx:39,
>                  from engine/include/com/sun/star/uno/Type.h:25,
>                  from engine/include/com/sun/star/uno/Sequence.h:25,
>                  from engine/include/com/sun/star/uno/Sequence.hxx:32,
>                  from engine/include/filter/msfilter/mscodec.hxx:22,
>                  from engine/filter/source/msfilter/mscodec.cxx:20:
> In function ‘constexpr _ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = __gnu_cxx::__normal_iterator<const unsigned char*, vector<unsigned char> >; _ForwardIterator = unsigned char*]’,
>     inlined from ‘constexpr _ForwardIterator std::__uninitialized_copy_a(_InputIterator, _Sentinel, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = __gnu_cxx::__normal_iterator<const unsigned char*, vector<unsigned char> >; _Sentinel = __gnu_cxx::__normal_iterator<const unsigned char*, vector<unsigned char> >; _ForwardIterator = unsigned char*; _Tp = unsigned char]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:659:32,
>     inlined from ‘constexpr std::vector< <template-parameter-1-1>, <template-parameter-1-2> >::vector(const std::vector< <template-parameter-1-1>, <template-parameter-1-2> >&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]’ at ~/gcc/inst/include/c++/17.0.0/bits/stl_vector.h:678:31,
>     inlined from ‘virtual bool msfilter::MSCodec_CryptoAPI::InitCipher(sal_uInt32)’ at engine/filter/source/msfilter/mscodec.cxx:471:51:
> ~/gcc/inst/include/c++/17.0.0/bits/stl_uninitialized.h:294:31: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372032559808513 or more bytes at offsets 0 and 0 overlaps 9223372028264841219 bytes at offset 4294967294 [-Werror=restrict]
>   294 |               __builtin_memcpy(std::__niter_base(__result),
>       |               ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   295 |                                std::__miter_base(std::__niter_base(__first)),
>       |                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   296 |                                __n * sizeof(_ValT));
>       |                                ~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: Ic7474db25c2c88c8796c44a110bdfecca0fa42fa
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4852
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit cf408bbc72fc2cd5d97ea767804f941770f3740c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207167
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-23 12:17:51 +02:00
..
2026-06-23 12:17:51 +02:00
…
…

LibreOffice Filters

Filter registration and some simple filters (also descriptions).

Desperate splitting of code into small shared libraries for historical reasons presumably (OS/2 and Windows 3.x). The libraries produced from the code in each subdirectory of filter/source/graphicfilter are graphic format import or export filters. But they don't have uniform API. Some have either a GraphicImport or GraphicExport entry point, and are loaded and used in a uniform fashion from code in svtools/source/filter/filter.cxx. Others have different API and are loaded from other places. For instance icgm has ImportCGM, and is loaded and used by sd/source/filter/cgm/sdcgmfilter.cxx (!). Svgreader is used for "File -> Open" and then to choose the svg file. For "Insert -> Picture -> From File", see svgio/source/svgreader directory.

Filter Configuration

The filter configuration consists of two parts, the type definition in filter/source/config/fragments/types/ and the actual filter definition in filter/source/config/fragments/filters/.

Each file type e.g. text file should be represented by exactly one type definition. This type can then be referenced by several different filters, e.g. calc text, writer text.