engine/bin/find-can-be-private-symbols.functions.results | 3
engine/bin/find-mergedlib-can-be-private-symbols.functions.results | 3
engine/compilerplugins/clang/constantparam.numbers.results | 4
engine/compilerplugins/clang/unusedvariableplus.cxx | 1
engine/solenv/clang-format/excludelist | 1
engine/sw/inc/swfltopt.hxx | 41 ------
engine/sw/source/filter/basflt/fltini.cxx | 60 ----------
engine/sw/source/filter/ww8/ww8par.cxx | 40 ++----
8 files changed, 14 insertions(+), 139 deletions(-)
New commits:
commit 49ab60f14acd6597b84bdae1e73f153bd564422a
Author: Gabor Kelemen <
gabor....@collabora.com>
AuthorDate: Tue Apr 21 12:27:12 2026 +0200
Commit: Andras Timar <
andras...@collabora.com>
CommitDate: Wed Apr 29 08:24:23 2026 +0000
Remove SwFilterOptions in favor of officecfg calls
also improve readability a bit
Change-Id: I2087db966eb7bcecc0bbe768ba64c469e6a84c33
Reviewed-on:
https://gerrit.collaboraoffice.com/c/online/+/1639
Tested-by: Jenkins CPCI <
rel...@collaboraoffice.com>
Reviewed-by: Andras Timar <
andras...@collabora.com>
diff --git a/engine/bin/find-can-be-private-symbols.functions.results b/engine/bin/find-can-be-private-symbols.functions.results
index 8b7c08cf84d3..f3862caf4a83 100644
--- a/engine/bin/find-can-be-private-symbols.functions.results
+++ b/engine/bin/find-can-be-private-symbols.functions.results
@@ -8195,9 +8195,6 @@ SwFileNameField::Copy() const
SwFileNameField::ExpandImpl(SwRootFrame const*) const
SwFileNameField::PutValue(com::sun::star::uno::Any const&, unsigned short)
SwFileNameField::QueryValue(com::sun::star::uno::Any&, unsigned short) const
-SwFilterOptions::GetValues(unsigned short, char const**, unsigned long*)
-SwFilterOptions::ImplCommit()
-SwFilterOptions::Notify(com::sun::star::uno::Sequence<rtl::OUString> const&)
SwFltAnchor::Clone(SfxItemPool*) const
SwFltAnchor::SetFrameFormat(SwFrameFormat*)
SwFltAnchor::SwFltAnchor(SwFltAnchor const&)
diff --git a/engine/bin/find-mergedlib-can-be-private-symbols.functions.results b/engine/bin/find-mergedlib-can-be-private-symbols.functions.results
index 3ef2538cfe46..bfc36adf3b4b 100644
--- a/engine/bin/find-mergedlib-can-be-private-symbols.functions.results
+++ b/engine/bin/find-mergedlib-can-be-private-symbols.functions.results
@@ -10991,9 +10991,6 @@ SwFileNameField::QueryValue(com::sun::star::uno::Any&, unsigned short) const
SwFileNameFieldType::Copy() const
SwFileNameFieldType::Expand(SwFileNameFormat) const
SwFileNameFieldType::SwFileNameFieldType(SwDoc&)
-SwFilterOptions::GetValues(unsigned short, rtl::OUString const*, unsigned long*)
-SwFilterOptions::ImplCommit()
-SwFilterOptions::Notify(com::sun::star::uno::Sequence<rtl::OUString> const&)
SwFltAnchor::Clone(SfxItemPool*) const
SwFltAnchor::SetFrameFormat(SwFrameFormat*)
SwFltAnchor::SwFltAnchor(SwFltAnchor const&)
diff --git a/engine/compilerplugins/clang/constantparam.numbers.results b/engine/compilerplugins/clang/constantparam.numbers.results
index c958e8be6be2..f2565a41e3cf 100644
--- a/engine/compilerplugins/clang/constantparam.numbers.results
+++ b/engine/compilerplugins/clang/constantparam.numbers.results
@@ -2890,10 +2890,6 @@ sw/inc/ndtxt.hxx:465
class SwTextAttr * SwTextNode::GetTextAttrForEndCharAt(int,unsigned short) const
unsigned short nWhich
56
-sw/inc/swfltopt.hxx:31
- void SwFilterOptions::SwFilterOptions(unsigned short,const class rtl::OUString *,unsigned long *)
- unsigned short nCnt
- 13
sw/inc/swregion.hxx:46
void SwRegionRects::SwRegionRects(unsigned short)
unsigned short nInit
diff --git a/engine/compilerplugins/clang/unusedvariableplus.cxx b/engine/compilerplugins/clang/unusedvariableplus.cxx
index 109dcb94037c..5ee02ceec6ef 100644
--- a/engine/compilerplugins/clang/unusedvariableplus.cxx
+++ b/engine/compilerplugins/clang/unusedvariableplus.cxx
@@ -373,7 +373,6 @@ public:
"SwEnhancedPDFExportHelper",
"SwEnterLeave",
"SwFieldSlot",
- "SwFilterOptions",
"SwFntAccess",
"SwFontSave",
"SwFootnoteSave",
diff --git a/engine/solenv/clang-format/excludelist b/engine/solenv/clang-format/excludelist
index 014c47d1619a..c51f3f6dc6c5 100644
--- a/engine/solenv/clang-format/excludelist
+++ b/engine/solenv/clang-format/excludelist
@@ -11782,7 +11782,6 @@ sw/inc/swcrsr.hxx
sw/inc/swdbdata.hxx
sw/inc/swerror.h
sw/inc/swevent.hxx
-sw/inc/swfltopt.hxx
sw/inc/swmodule.hxx
sw/inc/swrect.hxx
sw/inc/swregion.hxx
diff --git a/engine/sw/inc/swfltopt.hxx b/engine/sw/inc/swfltopt.hxx
deleted file mode 100644
index 37ea00599ae5..000000000000
--- a/engine/sw/inc/swfltopt.hxx
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the Collabora Office project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at
http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at
http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SW_INC_SWFLTOPT_HXX
-#define INCLUDED_SW_INC_SWFLTOPT_HXX
-
-#include "swdllapi.h"
-#include <unotools/configitem.hxx>
-
-class SW_DLLPUBLIC SwFilterOptions final : public utl::ConfigItem
-{
-private:
- virtual void ImplCommit() override;
-
-public:
- SwFilterOptions( sal_uInt16 nCnt, const OUString* ppNames,
- sal_uInt64* pValues );
-
- void GetValues( sal_uInt16 nCnt, const OUString* ppNames,
- sal_uInt64* pValues );
- virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/engine/sw/source/filter/basflt/fltini.cxx b/engine/sw/source/filter/basflt/fltini.cxx
index 996e0f1fbcb7..9b5b51c7b2c8 100644
--- a/engine/sw/source/filter/basflt/fltini.cxx
+++ b/engine/sw/source/filter/basflt/fltini.cxx
@@ -31,7 +31,6 @@
#include <fmtcntnt.hxx>
#include <editeng/boxitem.hxx>
#include <ndtxt.hxx>
-#include <swfltopt.hxx>
#include <swdll.hxx>
#include <iodetect.hxx>
#include <osl/module.hxx>
@@ -187,65 +186,6 @@ bool Writer::IsStgWriter() const { return false; }
bool StgWriter::IsStgWriter() const { return true; }
-// Read Filter Flags; used by WW8 / W4W / EXCEL / LOTUS
-
-/*
-<FilterFlags>
- <WinWord>
- <WW1F cfg:type="long">0</WW1F>
- <WW cfg:type="long">0</WW>
- <WW8 cfg:type="long">0</WW8>
- <WWF cfg:type="long">0</WWF>
- <WWFA0 cfg:type="long">0</WWFA0>
- <WWFA1 cfg:type="long">0</WWFA1>
- <WWFA2 cfg:type="long">0</WWFA2>
- <WWFB0 cfg:type="long">0</WWFB0>
- <WWFB1 cfg:type="long">0</WWFB1>
- <WWFB2 cfg:type="long">0</WWFB2>
- <WWFLX cfg:type="long">0</WWFLX>
- <WWFLY cfg:type="long">0</WWFLY>
- <WWFT cfg:type="long">0</WWFT>
- <WWWR cfg:type="long">0</WWWR>
- </WinWord>
-</FilterFlags>
-*/
-
-SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const OUString* ppNames,
- sal_uInt64* pValues )
- : ConfigItem( u"Office.Writer/FilterFlags"_ustr )
-{
- GetValues( nCnt, ppNames, pValues );
-}
-
-void SwFilterOptions::GetValues( sal_uInt16 nCnt, const OUString* ppNames,
- sal_uInt64* pValues )
-{
- Sequence<OUString> aNames( nCnt );
- OUString* pNames = aNames.getArray();
- sal_uInt16 n;
-
- for( n = 0; n < nCnt; ++n )
- pNames[ n ] = ppNames[ n ];
- Sequence<Any> aValues = GetProperties( aNames );
-
- if( nCnt == aValues.getLength() )
- {
- const Any* pAnyValues = aValues.getConstArray();
- for( n = 0; n < nCnt; ++n )
- pValues[ n ] = pAnyValues[ n ].hasValue()
- ? *o3tl::doAccess<sal_uInt64>(pAnyValues[ n ])
- : 0;
- }
- else
- {
- for( n = 0; n < nCnt; ++n )
- pValues[ n ] = 0;
- }
-}
-
-void SwFilterOptions::ImplCommit() {}
-void SwFilterOptions::Notify( const css::uno::Sequence< OUString >& ) {}
-
void StgReader::SetFltName( const OUString& rFltNm )
{
if( SwReaderType::Storage & GetReaderType() )
diff --git a/engine/sw/source/filter/ww8/ww8par.cxx b/engine/sw/source/filter/ww8/ww8par.cxx
index 87162085ca39..9a554d89e032 100644
--- a/engine/sw/source/filter/ww8/ww8par.cxx
+++ b/engine/sw/source/filter/ww8/ww8par.cxx
@@ -97,7 +97,6 @@
#include <IDocumentExternalData.hxx>
#include <../../core/inc/DocumentRedlineManager.hxx>
#include <docufld.hxx>
-#include <swfltopt.hxx>
#include <utility>
#include <viewsh.hxx>
#include <shellres.hxx>
@@ -157,6 +156,7 @@
#include <sfx2/DocumentMetadataAccess.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <officecfg/Office/Common.hxx>
+#include <officecfg/Office/Writer.hxx>
#include <unotxdoc.hxx>
using namespace ::com::sun::star;
@@ -6092,32 +6092,20 @@ ErrCode SwWW8ImplReader::LoadDoc(WW8Glossary *pGloss)
ErrCode nErrRet = ERRCODE_NONE;
{
- static constexpr OUString aNames[ 13 ] = {
- u"WinWord/WW"_ustr, u"WinWord/WW8"_ustr, u"WinWord/WWFT"_ustr,
- u"WinWord/WWFLX"_ustr, u"WinWord/WWFLY"_ustr,
- u"WinWord/WWF"_ustr,
- u"WinWord/WWFA0"_ustr, u"WinWord/WWFA1"_ustr, u"WinWord/WWFA2"_ustr,
- u"WinWord/WWFB0"_ustr, u"WinWord/WWFB1"_ustr, u"WinWord/WWFB2"_ustr,
- u"WinWord/RegardHindiDigits"_ustr
- };
- sal_uInt64 aVal[ 13 ];
-
- SwFilterOptions aOpt( 13, aNames, aVal );
-
- m_nIniFlags = aVal[ 0 ];
- m_nIniFlags1= aVal[ 1 ];
+ m_nIniFlags = officecfg::Office::Writer::FilterFlags::WinWord::WW::get();
+ m_nIniFlags1= officecfg::Office::Writer::FilterFlags::WinWord::WW8::get();
// Moves Flys by x twips to the right or left
- m_nIniFlyDx = aVal[ 3 ];
- m_nIniFlyDy = aVal[ 4 ];
-
- m_nFieldFlags = aVal[ 5 ];
- m_nFieldTagAlways[0] = aVal[ 6 ];
- m_nFieldTagAlways[1] = aVal[ 7 ];
- m_nFieldTagAlways[2] = aVal[ 8 ];
- m_nFieldTagBad[0] = aVal[ 9 ];
- m_nFieldTagBad[1] = aVal[ 10 ];
- m_nFieldTagBad[2] = aVal[ 11 ];
- m_bRegardHindiDigits = aVal[ 12 ] > 0;
+ m_nIniFlyDx = officecfg::Office::Writer::FilterFlags::WinWord::WWFLX::get();
+ m_nIniFlyDy = officecfg::Office::Writer::FilterFlags::WinWord::WWFLY::get();
+
+ m_nFieldFlags = officecfg::Office::Writer::FilterFlags::WinWord::WWF::get();
+ m_nFieldTagAlways[0] = officecfg::Office::Writer::FilterFlags::WinWord::WWFA0::get();
+ m_nFieldTagAlways[1] = officecfg::Office::Writer::FilterFlags::WinWord::WWFA1::get();
+ m_nFieldTagAlways[2] = officecfg::Office::Writer::FilterFlags::WinWord::WWFA2::get();
+ m_nFieldTagBad[0] = officecfg::Office::Writer::FilterFlags::WinWord::WWFB0::get();
+ m_nFieldTagBad[1] = officecfg::Office::Writer::FilterFlags::WinWord::WWFB1::get();
+ m_nFieldTagBad[2] = officecfg::Office::Writer::FilterFlags::WinWord::WWFB2::get();
+ m_bRegardHindiDigits = officecfg::Office::Writer::FilterFlags::WinWord::RegardHindiDigits::get() > 0;
}
sal_uInt16 nMagic(0);